瀏覽代碼

V4bug003004

XingYuXian 1 年之前
父節點
當前提交
cb3b98ee40
共有 3 個文件被更改,包括 71 次插入70 次删除
  1. 20 20
      model/gorm_model/selection_example_info.go
  2. 50 50
      model/http_model/UpdateSelectionRequest.go
  3. 1 0
      service/selection.go

+ 20 - 20
model/gorm_model/selection_example_info.go

@@ -1,20 +1,20 @@
-package gorm_model
-
-// Code generated by sql2gorm. DO NOT EDIT.
-
-import (
-	"time"
-)
-
-type YounggeeSecExample struct {
-	ExampleID   int       `gorm:"column:example_id;primary_key;AUTO_INCREMENT"` // 选品示例图id
-	FileUrl     string    `gorm:"column:file_url"`                              // 文件url
-	FileUid     string    `gorm:"column:file_uid"`                              // 文件uid
-	SelectionID string    `gorm:"column:selection_id"`                          // 所属项目id
-	CreatedAt   time.Time `gorm:"column:created_at"`                            // 创建时间
-	FileName    string    `gorm:"column:file_name"`                             // 文件名称
-}
-
-func (m *YounggeeSecExample) TableName() string {
-	return "younggee_sec_example"
-}
+package gorm_model
+
+// Code generated by sql2gorm. DO NOT EDIT.
+
+import (
+	"time"
+)
+
+type YounggeeSecExample struct {
+	ExampleID   int       `gorm:"column:example_id;primary_key;AUTO_INCREMENT"` // 选品示例图id
+	FileUrl     string    `gorm:"column:file_url"`                              // 文件url
+	FileUid     string    `gorm:"column:file_uid"`                              // 文件uid
+	SelectionID string    `gorm:"column:selection_id"`                          // 所属项目id
+	CreatedAt   time.Time `gorm:"column:created_at"`                            // 创建时间
+	FileName    string    `gorm:"column:file_name"`                             // 文件名称
+}
+
+func (m *YounggeeSecExample) TableName() string {
+	return "younggee_sec_example"
+}

+ 50 - 50
model/http_model/UpdateSelectionRequest.go

@@ -1,50 +1,50 @@
-package http_model
-
-type UpdateSelectionRequest struct {
-	EnterpriseId     string            `json:"enterprise_id"`
-	SelectionID      string            `json:"selection_id"` // 选品项目id
-	SelectionStatus  int               `json:"selection_status"`
-	Platform         int               `json:"platform"`
-	ProductId        string            `json:"product_id"`
-	ContentType      int               `json:"content_type"`
-	TaskMode         int               `json:"task_mode"`
-	SampleNum        int               `json:"sample_num"`  // 样品数量
-	RemainNum        int               `json:"remain_num"`  // 剩余数量
-	TaskReward       float64           `json:"task_reward"` // 任务悬赏
-	TaskDdl          string            `json:"task_ddl"`
-	SampleMode       int               `json:"sample_mode"`
-	CommissionRate   int               `json:"commission_rate"`
-	ProductUrl       string            `json:"product_url"`
-	SampleCondition  string            `json:"sample_condition"`
-	RewardCondition  string            `json:"reward_condition"` // 返现悬赏条件
-	SecBrief         []*SecBriefInfo   `json:"sec_brief"`
-	SecExample       []*SecExampleInfo `json:"sec_example"`
-	Detail           string            `json:"detail"`
-	SettlementAmount float64           `json:"settlement_amount"`
-}
-
-type SecBriefInfo struct {
-	PhotoUrl string `json:"photo_url"`
-	PhotoUid string `json:"photo_uid"`
-	Name     string `json:"name"`
-}
-
-type SecExampleInfo struct {
-	PhotoUrl string `json:"photo_url"`
-	PhotoUid string `json:"photo_uid"`
-	Name     string `json:"name"`
-}
-
-type UpdateSelectionData struct {
-	SelectionId string `json:"selection_id"`
-}
-
-func NewUpdateSelectionRequest() *UpdateSelectionRequest {
-	return new(UpdateSelectionRequest)
-}
-
-func NewUpdateSelectionResponse() *CommonResponse {
-	resp := new(CommonResponse)
-	resp.Data = new(UpdateSelectionData)
-	return resp
-}
+package http_model
+
+type UpdateSelectionRequest struct {
+	EnterpriseId     string            `json:"enterprise_id"`
+	SelectionID      string            `json:"selection_id"` // 选品项目id
+	SelectionStatus  int               `json:"selection_status"`
+	Platform         int               `json:"platform"`
+	ProductId        string            `json:"product_id"`
+	ContentType      int               `json:"content_type"`
+	TaskMode         int               `json:"task_mode"`
+	SampleNum        int               `json:"sample_num"`  // 样品数量
+	RemainNum        int               `json:"remain_num"`  // 剩余数量
+	TaskReward       float64           `json:"task_reward"` // 任务悬赏
+	TaskDdl          string            `json:"task_ddl"`
+	SampleMode       int               `json:"sample_mode"`
+	CommissionRate   string            `json:"commission_rate"`
+	ProductUrl       string            `json:"product_url"`
+	SampleCondition  string            `json:"sample_condition"`
+	RewardCondition  string            `json:"reward_condition"` // 返现悬赏条件
+	SecBrief         []*SecBriefInfo   `json:"sec_brief"`
+	SecExample       []*SecExampleInfo `json:"sec_example"`
+	Detail           string            `json:"detail"`
+	SettlementAmount float64           `json:"settlement_amount"`
+}
+
+type SecBriefInfo struct {
+	PhotoUrl string `json:"photo_url"`
+	PhotoUid string `json:"photo_uid"`
+	Name     string `json:"name"`
+}
+
+type SecExampleInfo struct {
+	PhotoUrl string `json:"photo_url"`
+	PhotoUid string `json:"photo_uid"`
+	Name     string `json:"name"`
+}
+
+type UpdateSelectionData struct {
+	SelectionId string `json:"selection_id"`
+}
+
+func NewUpdateSelectionRequest() *UpdateSelectionRequest {
+	return new(UpdateSelectionRequest)
+}
+
+func NewUpdateSelectionResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(UpdateSelectionData)
+	return resp
+}

+ 1 - 0
service/selection.go

@@ -65,6 +65,7 @@ func (*selection) Create(ctx context.Context, request http_model.CreateSelection
 		ProductPhotoSnap: string(productPhotosToJson),
 		CreatedAt:        &t,
 		UpdatedAt:        &t,
+		CommissionRate:   "0",
 		EstimatedCost:    "0",
 		TaskReward:       "0",
 		SettlementAmount: "0",