XingYuXian 1 year ago
parent
commit
d4b9c9b3ef

+ 1 - 2
db/selection.go

@@ -140,13 +140,12 @@ func GetSelectionList(ctx context.Context, enterpriseID string, pageSize, pageNu
 			if selectionStatus != "0" {
 			if selectionStatus != "0" {
 				db = db.Where("selection_status = ?", selectionStatus)
 				db = db.Where("selection_status = ?", selectionStatus)
 			}
 			}
-
 		} else if tag == "search_value" {
 		} else if tag == "search_value" {
 			searchValue = fmt.Sprintf("%v", value.Interface())
 			searchValue = fmt.Sprintf("%v", value.Interface())
 		} else if tag == "submit_at" && value.Interface() != "" {
 		} else if tag == "submit_at" && value.Interface() != "" {
 			db = db.Where(fmt.Sprintf("submit_at like '%s%%'", value.Interface()))
 			db = db.Where(fmt.Sprintf("submit_at like '%s%%'", value.Interface()))
 		} else if tag == "task_ddl" && value.Interface() != "" {
 		} else if tag == "task_ddl" && value.Interface() != "" {
-			db = db.Where(fmt.Sprintf("task_ddl like '%s%%'", value.Interface()))
+			db = db.Where(fmt.Sprintf("updated_at like '%s%%'", value.Interface()))
 		} else if !util.IsBlank(value) && tag != "task_ddl" && tag != "submit_at" && tag != "search_value" {
 		} else if !util.IsBlank(value) && tag != "task_ddl" && tag != "submit_at" && tag != "search_value" {
 			db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
 			db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
 		}
 		}

+ 13 - 12
model/common_model/selection_condition.go

@@ -1,12 +1,13 @@
-package common_model
-
-type SelectionConditions struct {
-	SelectionStatus int8   `condition:"selection_status"` // 选品阶段
-	Platform        int8   `condition:"platform"`         // 社媒平台
-	SampleMode      int8   `condition:"sample_mode"`      // 领样形式
-	ContentType     int8   `condition:"content_type"`     // 内容形式
-	TaskMode        int8   `condition:"task_mode"`        // 任务形式
-	SearchValue     string `condition:"search_value"`     // 项目id或项目名称
-	SubmitAt        string `condition:"submit_at"`        // 提交审核时间
-	TaskDdl         string `condition:"task_ddl"`         // 任务截止时间
-}
+package common_model
+
+type SelectionConditions struct {
+	SelectionStatus int8   `condition:"selection_status"` // 选品阶段
+	Platform        int8   `condition:"platform"`         // 社媒平台
+	SampleMode      int8   `condition:"sample_mode"`      // 领样形式
+	ContentType     int8   `condition:"content_type"`     // 内容形式
+	TaskMode        int8   `condition:"task_mode"`        // 任务形式
+	SearchValue     string `condition:"search_value"`     // 项目id或项目名称
+	SubmitAt        string `condition:"submit_at"`        // 提交审核时间
+	TaskDdl         string `condition:"task_ddl"`         // 任务截止时间
+	UpdatedAt       string `condition:"updated_at"`       // 提交审核时间
+}

+ 33 - 32
model/http_model/FindAllSelectionRequest.go

@@ -1,32 +1,33 @@
-package http_model
-
-import "youngee_m_api/model/gorm_model"
-
-type FindAllSelectionRequest struct {
-	EnterpriseId    string `json:"enterprise_id"`
-	PageSize        int64  `json:"page_size"`
-	PageNum         int64  `json:"page_num"`
-	SelectionStatus int8   `json:"selection_status"` // 选品阶段
-	Platform        int8   `json:"platform"`         // 社媒平台
-	SampleMode      int8   `json:"sample_mode"`      // 领样形式
-	ContentType     int8   `json:"content_type"`     // 内容形式
-	TaskMode        int8   `json:"task_mode"`        // 任务形式
-	SearchValue     string `json:"search_value"`     // 项目id或项目名称
-	SubmitAt        string `json:"submit_at"`        // 提交审核时间
-	TaskDdl         string `json:"task_ddl"`         // 提交审核时间
-}
-
-type SelectionData struct {
-	SelectionInfo []*gorm_model.YounggeeSelectionInfo `json:"selection_info"`
-	Total         string                              `json:"total"`
-}
-
-func NewFindAllSelectionRequest() *FindAllSelectionRequest {
-	return new(FindAllSelectionRequest)
-}
-
-func NewFindAllSelectionResponse() *CommonResponse {
-	resp := new(CommonResponse)
-	resp.Data = new(SelectionData)
-	return resp
-}
+package http_model
+
+import "youngee_m_api/model/gorm_model"
+
+type FindAllSelectionRequest struct {
+	EnterpriseId    string `json:"enterprise_id"`
+	PageSize        int64  `json:"page_size"`
+	PageNum         int64  `json:"page_num"`
+	SelectionStatus int8   `json:"selection_status"` // 选品阶段
+	Platform        int8   `json:"platform"`         // 社媒平台
+	SampleMode      int8   `json:"sample_mode"`      // 领样形式
+	ContentType     int8   `json:"content_type"`     // 内容形式
+	TaskMode        int8   `json:"task_mode"`        // 任务形式
+	SearchValue     string `json:"search_value"`     // 项目id或项目名称
+	SubmitAt        string `json:"submit_at"`        // 提交审核时间
+	TaskDdl         string `json:"task_ddl"`         // 提交审核时间
+	UpdatedAt       string `json:"updated_at"`       // 提交审核时间
+}
+
+type SelectionData struct {
+	SelectionInfo []*gorm_model.YounggeeSelectionInfo `json:"selection_info"`
+	Total         string                              `json:"total"`
+}
+
+func NewFindAllSelectionRequest() *FindAllSelectionRequest {
+	return new(FindAllSelectionRequest)
+}
+
+func NewFindAllSelectionResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(SelectionData)
+	return resp
+}