yuliang1112 2 rokov pred
rodič
commit
0681033a51

+ 4 - 4
db/data.go

@@ -33,9 +33,9 @@ func GetTaskDataList(ctx context.Context, projectID string, pageSize, pageNum in
 		if tag == "data_status" {
 			fmt.Printf("Data %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 14)
+				db = db.Where("task_stage = 14")
 			} else {
-				db = db.Where("task_stage > ?", 14)
+				db = db.Where("task_stage > 14 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {
@@ -200,9 +200,9 @@ func GetSpecialTaskDataList(ctx context.Context, projectID string, pageSize, pag
 		if tag == "data_status" {
 			fmt.Printf("Data %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 14)
+				db = db.Where("task_stage = 14")
 			} else {
-				db = db.Where("task_stage > ?", 14)
+				db = db.Where("task_stage > 14 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {

+ 1 - 1
db/finish.go

@@ -247,7 +247,7 @@ func GetSpecialTaskFinishList(ctx context.Context, pageSize, pageNum int64, cond
 func GetSpecialFinishDataNumber(ctx context.Context, projectId string) (*http_model.GetSpecialFinishDataData, error) {
 	db := GetReadDB(ctx)
 	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15 and project_id = ?")
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15 and project_id = ?",projectId)
 	var taskInfos []gorm_model.YoungeeTaskInfo
 	// 查询总数
 	var totalTask int64

+ 4 - 4
db/link.go

@@ -32,9 +32,9 @@ func GetTaskLinkList(ctx context.Context, projectID string, pageSize, pageNum in
 		if tag == "link_status" {
 			fmt.Printf("link %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 12)
+				db = db.Where("task_stage = 12")
 			} else {
-				db = db.Where("task_stage > ?", 12)
+				db = db.Where("task_stage > 12 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {
@@ -184,9 +184,9 @@ func GetSpecialTaskLinkList(ctx context.Context, projectID string, pageSize, pag
 		if tag == "link_status" {
 			fmt.Printf("link %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 12)
+				db = db.Where("task_stage = 12")
 			} else {
-				db = db.Where("task_stage > ?", 12)
+				db = db.Where("task_stage > 12 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {

+ 4 - 4
db/script.go

@@ -32,9 +32,9 @@ func GetTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum
 		if tag == "script_status" {
 			fmt.Printf("script %+v", value.Interface() == int64(2))
 			if value.Interface() == int64(2) {
-				db = db.Where("task_stage = ?", 8)
+				db = db.Where("task_stage = 8")
 			} else {
-				db = db.Where("task_stage > ?", 8)
+				db = db.Where("task_stage > 8 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {
@@ -185,9 +185,9 @@ func GetSpecialTaskScriptList(ctx context.Context, projectID string, pageSize, p
 		if tag == "script_status" {
 			fmt.Printf("script %+v", value.Interface() == int64(2))
 			if value.Interface() == int64(2) {
-				db = db.Where("task_stage = ?", 8)
+				db = db.Where("task_stage = 8")
 			} else {
-				db = db.Where("task_stage > ?", 8)
+				db = db.Where("task_stage > 8 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {

+ 5 - 5
db/sketch.go

@@ -32,9 +32,9 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 		if tag == "sketch_status" {
 			fmt.Printf("sketch %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 10)
+				db = db.Where("task_stage = 10")
 			} else {
-				db = db.Where("task_stage > ?", 10)
+				db = db.Where("task_stage > 10 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {
@@ -174,7 +174,7 @@ func AcceptSketch(ctx context.Context, TaskIDs []string) error {
 }
 
 // FindPhoto
-func FindSketchInfo(ctx context.Context, TaskID int64) (*gorm_model.YounggeeSketchInfo, error) {
+func FindSketchInfo(ctx context.Context, TaskID string) (*gorm_model.YounggeeSketchInfo, error) {
 	db := GetReadDB(ctx)
 	var SketchInfo gorm_model.YounggeeSketchInfo
 	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_ok = 1", TaskID).Find(&SketchInfo).Error
@@ -213,9 +213,9 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 		if tag == "sketch_status" {
 			fmt.Printf("sketch %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 10)
+				db = db.Where("task_stage = 10")
 			} else {
-				db = db.Where("task_stage > ?", 10)
+				db = db.Where("task_stage > 10 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {

+ 4 - 0
handler/code_login.go

@@ -44,12 +44,15 @@ type CodeLoginHandler struct {
 func (h *CodeLoginHandler) getRequest() interface{} {
 	return h.req
 }
+
 func (h *CodeLoginHandler) getContext() *gin.Context {
 	return h.ctx
 }
+
 func (h *CodeLoginHandler) getResponse() interface{} {
 	return h.resp
 }
+
 func (h *CodeLoginHandler) run() {
 	token, err := service.LoginAuth.AuthCode(h.ctx, h.req.Phone, h.req.Code)
 	if err != nil {
@@ -63,6 +66,7 @@ func (h *CodeLoginHandler) run() {
 	// h.resp.Message = "登陆成功"
 	h.resp.Data = data
 }
+
 func (h *CodeLoginHandler) checkParam() error {
 	return nil
 }

+ 1 - 2
model/http_model/get_finish_data.go

@@ -25,8 +25,7 @@ type GetFinishDataInfo struct {
 	CollectNumber   string `json:"collect_number"`   // 总收藏量
 	CommentNumber   string `json:"comment_number"`   // 总评论数
 	FinishNumber    string `json:"finish_number"`    // 结案数量
-	TotalOffer      string `json:"total_offer"`      // 支付合计
-
+	TotalOffer      float64 `json:"total_offer"`      // 支付合计
 }
 
 type GetFinishData struct {

+ 2 - 4
model/http_model/logistics_create.go

@@ -1,14 +1,12 @@
 package http_model
 
-import "time"
-
 type CreateLogisticsRequest struct {
 	StrategyID            int64     `json:"strategy_id"`             //招募策略id
 	LogisticsID           int64     `json:"logistics_id"`            // 货物-id
 	CompanyName           string    `json:"company_name"`            // 实物商品-物流公司名称
 	LogisticsNumber       string    `json:"logistics_number"`        // 实物商品-物流单号
-	ExplorestoreStarttime time.Time `json:"explorestore_starttime"`  // 线下探店-探店开始时间
-	ExplorestoreEndtime   time.Time `json:"explorestore_endtime"`    // 线下探店-探店结束时间
+	ExplorestoreStarttime string `json:"explorestore_starttime"`  // 线下探店-探店开始时间
+	ExplorestoreEndtime   string `json:"explorestore_endtime"`    // 线下探店-探店结束时间
 	ExplorestorePeriod    string    `json:"explorestore_period"`     // 线下探店-探店持续时间
 	CouponCodeInformation string    `json:"coupon_code_information"` // 虚拟产品-券码信息
 	TaskID                string    `json:"task_id"`                 // 任务id

+ 1 - 1
model/http_model/sktech_info.go

@@ -1,7 +1,7 @@
 package http_model
 
 type GetSketchInfoRequest struct {
-	TaskID int64 `json:"task_id"`
+	TaskID string `json:"task_id"`
 }
 
 type SketchPhotoInfo struct {

+ 1 - 1
pack/get_finish_data.go

@@ -38,6 +38,6 @@ func MGormRecruitStrategyToHttpGetFinishDataInfo(RecruitStrategy *gorm_model.Rec
 		CollectNumber:   conv.MustString(RecruitStrategy.CollectNumber),
 		CommentNumber:   conv.MustString(RecruitStrategy.CommentNumber),
 		FinishNumber:    conv.MustString(RecruitStrategy.FinishNumber),
-		TotalOffer:      conv.MustString(RecruitStrategy.TotalOffer),
+		TotalOffer:      RecruitStrategy.TotalOffer,
 	}
 }

+ 11 - 4
service/logistics.go

@@ -38,8 +38,12 @@ func (*logistics) Create(ctx context.Context, newLogistics http_model.CreateLogi
 		Logistics.LogisticsNumber = newLogistics.LogisticsNumber
 		Logistics.DeliveryTime = time.Now()
 	} else if ThingsType == 3 {
-		Logistics.ExplorestoreStarttime = newLogistics.ExplorestoreStarttime
-		Logistics.ExplorestoreEndtime = newLogistics.ExplorestoreEndtime
+		fmt.Println("开始时间:", newLogistics.ExplorestoreStarttime)
+		fmt.Println("结束时间:", newLogistics.ExplorestoreEndtime)
+		ExplorestoreStarttime, _ := time.ParseInLocation("2006-01-02 15:04:05", newLogistics.ExplorestoreStarttime, time.Local)
+		ExplorestoreEndtime, _ := time.ParseInLocation("2006-01-02 15:04:05", newLogistics.ExplorestoreEndtime, time.Local)
+		Logistics.ExplorestoreStarttime = ExplorestoreStarttime
+		Logistics.ExplorestoreEndtime = ExplorestoreEndtime
 		// Logistics.ExplorestorePeriod = newLogistics.ExplorestorePeriod
 	} else {
 		Logistics.CouponCodeInformation = newLogistics.CouponCodeInformation
@@ -128,8 +132,11 @@ func (*logistics) Update(ctx context.Context, newLogistics http_model.CreateLogi
 		Logistics.LogisticsNumber = newLogistics.LogisticsNumber
 	} else if ThingsType == 3 {
 		fmt.Println("开始时间:", newLogistics.ExplorestoreStarttime)
-		Logistics.ExplorestoreStarttime = newLogistics.ExplorestoreStarttime
-		Logistics.ExplorestoreEndtime = newLogistics.ExplorestoreEndtime
+		fmt.Println("结束时间:", newLogistics.ExplorestoreEndtime)
+		ExplorestoreStarttime, _ := time.ParseInLocation("2006-01-02 15:04:05", newLogistics.ExplorestoreStarttime, time.Local)
+		ExplorestoreEndtime, _ := time.ParseInLocation("2006-01-02 15:04:05", newLogistics.ExplorestoreEndtime, time.Local)
+		Logistics.ExplorestoreStarttime = ExplorestoreStarttime
+		Logistics.ExplorestoreEndtime = ExplorestoreEndtime
 		// Logistics.ExplorestorePeriod = newLogistics.ExplorestorePeriod
 	} else {
 		Logistics.CouponCodeInformation = newLogistics.CouponCodeInformation

+ 0 - 1
service/number_info.go

@@ -157,6 +157,5 @@ func (*number) GetSpecialFinishData(ctx context.Context, request http_model.GetS
 		logrus.WithContext(ctx).Errorf("[Data service] call CreateData error,err:%+v", err)
 		return nil, err
 	}
-
 	return NumberData, nil
 }