2 Commits 32840fa8b6 ... adbb6ffc90

Author SHA1 Message Date
  lin-jim-leon adbb6ffc90 Merge remote-tracking branch 'origin/develop' into develop 4 weeks ago
  lin-jim-leon 51ee706ff4 [20250325]合作达人名单+bug修改+查名单 4 weeks ago
40 changed files with 947 additions and 293 deletions
  1. 80 10
      db/data.go
  2. 96 12
      db/link.go
  3. 155 19
      db/locallife_task.go
  4. 214 40
      db/project_task.go
  5. 97 14
      db/sketch.go
  6. 62 23
      db/talent.go
  7. 39 15
      model/gorm_model/info_auto_task.go
  8. 1 1
      model/gorm_model/locallife_info.go
  9. 8 3
      model/gorm_model/locallife_task_info.go
  10. 44 39
      model/gorm_model/selection_task_info.go
  11. 6 6
      model/http_model/PassproTaskCoopRequest.go
  12. 4 3
      model/http_model/RefuseproTaskCoopRequest.go
  13. 6 5
      model/http_model/data_accept.go
  14. 6 5
      model/http_model/data_localaccept.go
  15. 6 5
      model/http_model/data_opinion.go
  16. 3 3
      model/http_model/getgoodstalentrequest.go
  17. 13 10
      model/http_model/getlocallifetalentrequest.go
  18. 3 0
      model/http_model/getlocaltasklist.go
  19. 16 10
      model/http_model/getprojecttalentrequest.go
  20. 3 0
      model/http_model/gettasklist.go
  21. 6 5
      model/http_model/link_accept.go
  22. 6 5
      model/http_model/link_localaccept.go
  23. 6 5
      model/http_model/link_opinion.go
  24. 1 0
      model/http_model/localdata_opinion.go
  25. 1 0
      model/http_model/locallink_opinion.go
  26. 5 4
      model/http_model/localreject_data.go
  27. 5 4
      model/http_model/localreject_link.go
  28. 1 0
      model/http_model/localsketch_opinion.go
  29. 5 4
      model/http_model/reject_data.go
  30. 5 4
      model/http_model/reject_link.go
  31. 6 5
      model/http_model/sketch_accept.go
  32. 6 5
      model/http_model/sketch_loaclaccept.go
  33. 5 4
      model/http_model/sketch_localreject.go
  34. 1 0
      model/http_model/sketch_opinion.go
  35. 5 4
      model/http_model/sketch_reject.go
  36. 1 1
      route/init.go
  37. 2 2
      service/Task.go
  38. 6 6
      service/data.go
  39. 6 6
      service/link.go
  40. 6 6
      service/sketch.go

+ 80 - 10
db/data.go

@@ -152,9 +152,23 @@ func GetTaskDataList(ctx context.Context, projectID string, pageSize, pageNum in
 }
 
 // DataOpinion 提交意见
-func DataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func DataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
 		return err
@@ -186,9 +200,23 @@ func DataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, opera
 }
 
 // DataOpinion 提交意见
-func LocalDataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func LocalDataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
 		return err
@@ -220,9 +248,23 @@ func LocalDataOpinion(ctx context.Context, TaskID string, ReviseOpinion string,
 }
 
 // AcceptData 同意数据-结案
-func AcceptData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int) error {
+func AcceptData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
 		return err
@@ -231,9 +273,23 @@ func AcceptData(ctx context.Context, TaskIDs []string, operatorid string, operat
 }
 
 // RejectData 拒绝数据-结案
-func RejectData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func RejectData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
 		return err
@@ -265,9 +321,23 @@ func RejectData(ctx context.Context, TaskIDs []string, operatorid string, operat
 }
 
 // RejectData 拒绝数据-结案
-func LocalRejectData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func LocalRejectData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
 		return err

+ 96 - 12
db/link.go

@@ -128,9 +128,23 @@ func GetTaskLinkList(ctx context.Context, projectID string, pageSize, pageNum in
 }
 
 // LinkOpinion 提交意见
-func LinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func LinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err
@@ -162,9 +176,23 @@ func LinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string, opera
 }
 
 // LinkOpinion 提交意见
-func LocalLinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func LocalLinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err
@@ -196,9 +224,23 @@ func LocalLinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string,
 }
 
 // AcceptLink 同意链接
-func AcceptLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int) error {
+func AcceptLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err
@@ -253,9 +295,23 @@ func AcceptLink(ctx context.Context, TaskIDs []string, operatorid string, operat
 }
 
 // AcceptLink 同意链接
-func LocalAcceptLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int) error {
+func LocalAcceptLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err
@@ -311,9 +367,23 @@ func LocalAcceptLink(ctx context.Context, TaskIDs []string, operatorid string, o
 }
 
 // RejectLink 不同意链接
-func RejectLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func RejectLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err
@@ -345,9 +415,23 @@ func RejectLink(ctx context.Context, TaskIDs []string, operatorid string, operat
 }
 
 // RejectLink 不同意链接
-func LocalRejectLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func LocalRejectLink(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
 		return err

+ 155 - 19
db/locallife_task.go

@@ -78,7 +78,11 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_status = ?", request.ProjectId, request.CoopType)
-
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalTaskListData{}, err
+	}
 	// 构建查询条件
 	if request.FeeFrom != nil {
 		query = query.Where("fee_form = ?", request.FeeFrom)
@@ -91,6 +95,9 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 			query = query.Where("supplier_id !=0 AND supplier_status = 2")
 		}
 	}
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	if request.TalentFromList != "" {
 		provinceList := strings.Split(request.TalentFromList, ",")                // 解析传入的省份列表
 		query = query.Where("SUBSTRING_INDEX(city, ' ', 1) IN (?)", provinceList) // 提取城市字段中的省份并进行匹配
@@ -162,10 +169,83 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 		case 3:
 			Time = task.CompleteDate
 		}
+		var listtime, stageintro string
+		switch task.TaskStage {
+		case 4:
+			{
+				listtime = task.SelectDate.Format("2006-01-02 15:04:05")
+				stageintro = "执行开始时间"
+			}
+		case 5:
+			{
+				listtime = task.ReserveTime.Format("2006-01-02 15:04:05")
+				stageintro = "达人探店时间预约申请时间"
+			}
+		case 6:
+			{
+				listtime = task.ExploreTime.Format("2006-01-02 15:04:05")
+				stageintro = "达人探店时间预约申请时间"
+			}
+		case 9:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = "初稿上传截止时间"
+			}
+		case 10:
+			{
+				var sketchinfo gorm_model.YounggeeSketchInfo
+				err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&sketchinfo).Error
+				if err != nil {
+					return nil, err
+				}
+				listtime = sketchinfo.SubmitAt.Format("2006-01-02 15:04:05")
+				stageintro = "达人上传初稿时间" //
+			}
+		case 11:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = " 链接上传截止时间"
+			}
+		case 12:
+			{
+				var linkinfo gorm_model.YounggeeLinkInfo
+				err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&linkinfo).Error
+				if err != nil {
+					return nil, err
+				}
+				listtime = linkinfo.SubmitAt.Format("2006-01-02 15:04:05")
+				stageintro = "达人上传链接时间"
+			}
+		case 13:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = "数据待传截止时间"
+			}
+		case 14:
+			{
+				var datainfo gorm_model.YounggeeDataInfo
+				err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&datainfo).Error
+				if err != nil {
+					return nil, err
+				}
+				listtime = datainfo.SubmitAt.Format("2006-01-02 15:04:05")
+				stageintro = "品牌最晚结算时间"
+			}
+		case 15:
+			{
+				listtime = task.CompleteDate.Format("2006-01-02 15:04:05")
+				stageintro = "品牌结算时间"
+			}
+		case 16:
+			{
+				listtime = task.CancelTime.Format("2006-01-02 15:04:05")
+				stageintro = "解约时间"
+			}
+		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterPriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		response := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -189,6 +269,8 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 			Gender:             gender,
 			Sprojectid:         task.SLocalLifeId,
 			City:               task.City,
+			StageIntro:         stageintro,
+			ListTime:           listtime,
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 	}
@@ -299,13 +381,13 @@ func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequ
 				}
 				//服务商s_project已招募人数+1改成s_locallife
 				var sprojectinfo gorm_model.YounggeeSProjectInfo
-				err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", req.SProjectId).Find(&sprojectinfo).Error
+				err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SLocalLifeId).Find(&sprojectinfo).Error
 				if err != nil {
 					return err
 				}
 				sprojectinfo.RecruitNum += 1
 				fmt.Println("......", projectinfo.RecruitNum)
-				err = tx.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", req.SProjectId).Updates(sprojectinfo).Error
+				err = tx.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SLocalLifeId).Updates(sprojectinfo).Error
 				if err != nil {
 					return err
 				} //
@@ -539,6 +621,11 @@ func GetLocallifeData(ctx context.Context, req http_model.LocallifeDataRequest)
 
 func GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketchListRequest) (*http_model.GetLocalSketchTaskListData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalSketchTaskListData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
 	if request.Others != "" {
@@ -607,7 +694,7 @@ func GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketc
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -644,6 +731,11 @@ func GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketc
 
 func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchlistRequest) (*http_model.GetsketchlocaltaskListData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetsketchlocaltaskListData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
 
@@ -710,7 +802,7 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 	taskInfoPointers := make([]*http_model.LocalTasksketchinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -732,9 +824,17 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 			City:               task.City,
 		}
 		var sketchinfo gorm_model.YounggeeSketchInfo
-		err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&sketchinfo).Error
-		if err != nil {
-			return nil, err
+		switch request.ScriptStatus {
+		case 10:
+			err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskId).First(&sketchinfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case 11:
+			err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_ok = 1", task.TaskId).First(&sketchinfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.LocalTasksketchinfo{
@@ -755,6 +855,11 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 
 func GetLocalPreLinkList(ctx context.Context, request http_model.LocalPreLinkListRequest) (*http_model.GetLocalPreLinkListData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalPreLinkListData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
 
@@ -822,7 +927,7 @@ func GetLocalPreLinkList(ctx context.Context, request http_model.LocalPreLinkLis
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -859,6 +964,11 @@ func GetLocalPreLinkList(ctx context.Context, request http_model.LocalPreLinkLis
 
 func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistRequest) (*http_model.GetLocalTaskLinkListData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalTaskLinkListData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
 
@@ -926,7 +1036,7 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -949,9 +1059,17 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 			City:               task.City,
 		}
 		var linkinfo gorm_model.YounggeeLinkInfo
-		err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&linkinfo).Error
-		if err != nil {
-			return nil, err
+		switch request.LinkStatus {
+		case "12":
+			err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskId).First(&linkinfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case "13":
+			err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_ok = 1", task.TaskId).First(&linkinfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.LocalTaskLinkinfo{
@@ -974,6 +1092,11 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 
 func GetLocalPreDataList(ctx context.Context, request http_model.LocalPreDataListRequest) (*http_model.GetLocalPreDataListData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalPreDataListData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
 	if request.Others != "" {
@@ -1039,7 +1162,7 @@ func GetLocalPreDataList(ctx context.Context, request http_model.LocalPreDataLis
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -1076,6 +1199,11 @@ func GetLocalPreDataList(ctx context.Context, request http_model.LocalPreDataLis
 
 func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistRequest) (*http_model.GetLocalTaskDatalistData, error) {
 	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).First(&localinfo).Error
+	if err != nil {
+		return &http_model.GetLocalTaskDatalistData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
 
@@ -1143,7 +1271,7 @@ func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistR
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, localinfo.LocalType)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
@@ -1166,9 +1294,17 @@ func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistR
 			City:               task.City,
 		}
 		var datainfo gorm_model.YounggeeDataInfo
-		err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", task.TaskId).First(&datainfo).Error
-		if err != nil {
-			return nil, err
+		switch request.DataStatus {
+		case "12":
+			err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskId).First(&datainfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case "13":
+			err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_ok = 1", task.TaskId).First(&datainfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.LocalTaskDatainfo{

+ 214 - 40
db/project_task.go

@@ -77,7 +77,11 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_status = ?", request.ProjectId, request.CoopType)
-
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetTaskListData{}, err
+	}
 	// 构建查询条件
 	if request.FeeFrom != nil {
 		query = query.Where("fee_form = ?", request.FeeFrom)
@@ -90,7 +94,9 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 			query = query.Where("supplier_id !=0 AND supplier_status = 2")
 		}
 	}
-
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -160,10 +166,82 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 		case 3:
 			Time = task.CompleteDate
 		}
+		var listtime, stageintro string
+		switch task.TaskStage {
+		case 4:
+			{
+				listtime = task.SelectDate.Format("2006-01-02 15:04:05")
+				stageintro = "执行开始时间"
+			}
+		case 5:
+			{
+				listtime = task.DeliveryDate.Format("2006-01-02 15:04:05")
+				stageintro = "商家寄样时间"
+			}
+		case 9:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = "初稿上传截止时间"
+			}
+		case 10:
+			{
+				var sketchinfo gorm_model.YounggeeSketchInfo
+				err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&sketchinfo).Error
+				if err != nil {
+					return nil, err
+				}
+				listtime = sketchinfo.SubmitAt.Format("2006-01-02 15:04:05")
+				stageintro = "达人上传初稿时间" //
+			}
+		case 11:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = " 链接上传截止时间"
+			}
+		case 12:
+			{
+				var linkinfo gorm_model.YounggeeLinkInfo
+				err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&linkinfo).Error
+				if err != nil {
+					return nil, err
+				}
+				listtime = linkinfo.SubmitAt.Format("2006-01-02 15:04:05")
+				stageintro = "达人上传链接时间"
+			}
+		case 13:
+			{
+				listtime = task.CurBreakAt.Format("2006-01-02 15:04:05")
+				stageintro = "数据待传截止时间"
+			}
+		case 14:
+			{
+				var datainfo gorm_model.YounggeeDataInfo
+				err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&datainfo).Error
+				if err != nil {
+					return nil, err
+				}
+				var auto_task_finish gorm_model.InfoAutoTask
+				db.Model(&gorm_model.InfoAutoTask{}).Where("enterprise_id = ?", request.EnterPriseId).First(&auto_task_finish)
+				// 将小时数转换为 Duration 后相加
+				resultTime := datainfo.SubmitAt.Add(time.Duration(auto_task_finish.TaskFinishAuto) * time.Hour)
+				listtime = resultTime.Format("2006-01-02 15:04:05")
+				stageintro = "品牌最晚结算时间"
+			}
+		case 15:
+			{
+				listtime = task.CompleteDate.Format("2006-01-02 15:04:05")
+				stageintro = "品牌结算时间"
+			}
+		case 16:
+			{
+				listtime = task.CancelTime.Format("2006-01-02 15:04:05")
+				stageintro = "解约时间"
+			}
+		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterPriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		response := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -187,6 +265,8 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 			ISCoop:             Iscoop,
 			Sprojectid:         task.SprojectId,
 			City:               task.City,
+			ListTime:           listtime,
+			StageIntro:         stageintro,
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 	}
@@ -245,18 +325,30 @@ func determineFrom(supplierID, supplierStatus int) int {
 	return 1
 }
 
-func stype(db *gorm.DB, supplierID, supplierStatus int) (int, string) {
-	if supplierID != 0 && supplierStatus == 2 {
-		var supplierinfo gorm_model.Supplier
-		err := db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", supplierID).First(&supplierinfo).Error
-		if err != nil {
-			return 0, "公海"
+func stype(db *gorm.DB, supplierID, supplierStatus int, projecttype int64) (int, string) {
+	if projecttype == 1 {
+		if supplierID != 0 && supplierStatus == 2 {
+			var supplierinfo gorm_model.Supplier
+			err := db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", supplierID).First(&supplierinfo).Error
+			if err != nil {
+				return 0, "公海"
+			}
+			return supplierinfo.SupplierType, supplierinfo.SupplierName
 		}
-		return supplierinfo.SupplierType, supplierinfo.SupplierName
+		return 0, "公海"
+	} else {
+		if supplierID != 0 && supplierStatus == 2 {
+			var supplierinfo gorm_model.Supplier
+			err := db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", supplierID).First(&supplierinfo).Error
+			if err != nil {
+				return 0, "私域"
+			}
+			return supplierinfo.SupplierType, supplierinfo.SupplierName
+		}
+		return 0, "私域"
 	}
-	return 0, "公海"
 }
-func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, operatorid string, operatetype int, Isspecial int, req http_model.PassproTaskCoopRequest) (bool, error) {
+func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, operatorid string, operatetype int, Isspecial int, Enterpriseid string, req http_model.PassproTaskCoopRequest) (bool, error) {
 	db := GetReadDB(ctx)
 	var count int64
 	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id IN ? AND task_stage = 1", taskIds).Count(&count).Error
@@ -317,6 +409,21 @@ func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, op
 		}
 	}
 
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
+
 	//4.根据达人来源改变状态、阶段、数目
 	var tasks []gorm_model.YoungeeTaskInfo
 	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id IN ? AND task_stage = 1", taskIds).Find(&tasks).Error
@@ -331,8 +438,8 @@ func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, op
 					TaskStage:     taskstages,
 					TaskStatus:    2,
 					UpdateAt:      time.Now(),
-					BOperator:     operatorid,
-					BOperatorType: operatetype,
+					BOperator:     opid,
+					BOperatorType: optype,
 					SelectDate:    time.Now(),
 				}
 				err = tx.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ? AND task_stage = 1", taskInfo.TaskID).Updates(updateData).Error
@@ -354,13 +461,13 @@ func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, op
 				}
 				//服务商s_project已招募人数+1
 				var sprojectinfo gorm_model.YounggeeSProjectInfo
-				err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", req.SProjectId).Find(&sprojectinfo).Error
+				err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SprojectId).Find(&sprojectinfo).Error
 				if err != nil {
 					return err
 				}
 				sprojectinfo.RecruitNum += 1
 				fmt.Println("......", projectinfo.RecruitNum)
-				err = tx.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", req.SProjectId).Updates(sprojectinfo).Error
+				err = tx.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SprojectId).Updates(sprojectinfo).Error
 				if err != nil {
 					return err
 				}
@@ -388,8 +495,8 @@ func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, op
 					TaskStage:     taskstages,
 					TaskStatus:    2,
 					UpdateAt:      time.Now(),
-					BOperator:     operatorid,
-					BOperatorType: operatetype,
+					BOperator:     opid,
+					BOperatorType: optype,
 					SelectDate:    time.Now(),
 				}
 				err = tx.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ? AND task_stage = 1", taskInfo.TaskID).Updates(updateData).Error
@@ -427,7 +534,7 @@ func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, op
 	return true, nil
 }
 
-func RefuseproTaskCoop(ctx context.Context, taskIds []string, operatorid string, operatetype int) (bool, error) {
+func RefuseproTaskCoop(ctx context.Context, taskIds []string, operatorid string, operatetype int, Enterpriseid string) (bool, error) {
 	db := GetWriteDB(ctx)
 	// 1. 校验
 	var count int64
@@ -439,6 +546,21 @@ func RefuseproTaskCoop(ctx context.Context, taskIds []string, operatorid string,
 		return false, errors.New("任务id有误")
 	}
 
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
+
 	// 2. 查询任务对应达人id(用于生成达人消息)
 	var talentIds []string
 	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).Select("talent_id").Find(&talentIds).Error
@@ -456,8 +578,8 @@ func RefuseproTaskCoop(ctx context.Context, taskIds []string, operatorid string,
 				TaskStage:     3,
 				TaskStatus:    3,
 				UpdateAt:      time.Now(),
-				BOperator:     operatorid,
-				BOperatorType: operatetype,
+				BOperator:     opid,
+				BOperatorType: optype,
 				CompleteDate:  time.Now(),
 			}
 			err = tx.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ? AND task_stage = 1", taskInfo.TaskID).Updates(updateData).Error
@@ -479,7 +601,11 @@ func GetPreSketchList(ctx context.Context, request http_model.PreSketchListReque
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
-
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetSketchTaskListData{}, err
+	}
 	if request.Others != "" {
 		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
 	}
@@ -545,7 +671,7 @@ func GetPreSketchList(ctx context.Context, request http_model.PreSketchListReque
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -584,7 +710,11 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
-
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetsketchtaskListData{}, err
+	}
 	if request.Others != "" {
 		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
 	}
@@ -648,7 +778,7 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 	taskInfoPointers := make([]*http_model.Tasksketchinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -669,11 +799,21 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 			HeadUrl:            headurl,
 			City:               task.City,
 		}
+
 		var sketchinfo gorm_model.YounggeeSketchInfo
-		err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&sketchinfo).Error
-		if err != nil {
-			return nil, err
+		switch request.ScriptStatus {
+		case 10:
+			err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskID).First(&sketchinfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case 11:
+			err := db.Model(&gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_ok = 1", task.TaskID).First(&sketchinfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
+
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.Tasksketchinfo{
 			Task:     taskinfo,
@@ -695,7 +835,11 @@ func GetPreLinkList(ctx context.Context, request http_model.PreLinkListRequest)
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
-
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetprelinkListData{}, err
+	}
 	if request.Others != "" {
 		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
 	}
@@ -760,7 +904,7 @@ func GetPreLinkList(ctx context.Context, request http_model.PreLinkListRequest)
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -799,7 +943,11 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
-
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GettasklinkListData{}, err
+	}
 	if request.Others != "" {
 		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
 	}
@@ -864,7 +1012,7 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -887,9 +1035,17 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 			City:               task.City,
 		}
 		var linkinfo gorm_model.YounggeeLinkInfo
-		err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&linkinfo).Error
-		if err != nil {
-			return nil, err
+		switch request.LinkStatus {
+		case "12":
+			err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskID).First(&linkinfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case "13":
+			err := db.Model(&gorm_model.YounggeeLinkInfo{}).Where("task_id = ? and is_ok = 1", task.TaskID).First(&linkinfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.TaskLinkinfo{
@@ -914,6 +1070,11 @@ func GetPreDataList(ctx context.Context, request http_model.PreDataListRequest)
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetPreDataListData{}, err
+	}
 	if request.Others != "" {
 		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
 	}
@@ -977,7 +1138,7 @@ func GetPreDataList(ctx context.Context, request http_model.PreDataListRequest)
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -1014,6 +1175,11 @@ func GetPreDataList(ctx context.Context, request http_model.PreDataListRequest)
 
 func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*http_model.GetTaskDatalistData, error) {
 	db := GetReadDB(ctx)
+	var projectinfo gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).First(&projectinfo).Error
+	if err != nil {
+		return &http_model.GetTaskDatalistData{}, err
+	}
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
 	if request.Others != "" {
@@ -1079,7 +1245,7 @@ func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*
 	for _, task := range projecrtaskinfo {
 		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
-		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus, projectinfo.ProjectType)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
@@ -1102,9 +1268,17 @@ func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*
 			City:               task.City,
 		}
 		var datainfo gorm_model.YounggeeDataInfo
-		err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0", task.TaskID).First(&datainfo).Error
-		if err != nil {
-			return nil, err
+		switch request.DataStatus {
+		case "12":
+			err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_review = 0 ", task.TaskID).First(&datainfo).Error
+			if err != nil {
+				return nil, err
+			}
+		case "13":
+			err := db.Model(&gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_ok = 1", task.TaskID).First(&datainfo).Error
+			if err != nil {
+				return nil, err
+			}
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
 		response := &http_model.TaskDatainfo{

+ 97 - 14
db/sketch.go

@@ -131,10 +131,23 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 }
 
 // SketchOption 提交意见
-func SketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func SketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
 	db := GetReadDB(ctx)
-	fmt.Printf("初稿意见 %d %+v", TaskID, ReviseOpinion)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] call RevisieOption error,err:%+v", err)
 		return err
@@ -167,10 +180,23 @@ func SketchOption(ctx context.Context, TaskID string, ReviseOpinion string, oper
 }
 
 // SketchOption 提交意见
-func LocalSketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string) error {
+func LocalSketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
 	db := GetReadDB(ctx)
-	fmt.Printf("初稿意见 %d %+v", TaskID, ReviseOpinion)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1, "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] call RevisieOption error,err:%+v", err)
 		return err
@@ -203,9 +229,23 @@ func LocalSketchOption(ctx context.Context, TaskID string, ReviseOpinion string,
 }
 
 // AcceptSketch 同意初稿
-func AcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int) error {
+func AcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int, Enterpriseid string) error {
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
 		return err
@@ -242,6 +282,7 @@ func AcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, oper
 			}
 		}
 	}
+
 	var link_default gorm_model.InfoAutoTask
 	err = db.Model(gorm_model.InfoAutoTask{}).Where("auto_task_id = ?", project.AutoTaskID).Find(&link_default).Error
 	if err != nil {
@@ -263,9 +304,23 @@ func AcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, oper
 }
 
 // AcceptSketch 同意初稿
-func LocalAcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int) error {
+func LocalAcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
 		return err
@@ -323,9 +378,23 @@ func LocalAcceptSketch(ctx context.Context, TaskIDs []string, operatorid string,
 }
 
 // RejectSketch 不同意初稿
-func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
 		return err
@@ -359,9 +428,23 @@ func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, oper
 }
 
 // RejectSketch 不同意初稿
-func LocalRejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func LocalRejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, Enterpriseid string) error {
+	var opid string
+	var optype int
+	switch operatetype {
+	case 3:
+		{
+			opid = Enterpriseid
+			optype = 1
+		}
+	case 4:
+		{
+			opid = operatorid
+			optype = 2
+		}
+	}
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id in ? and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": opid, "b_operator_type": optype}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
 		return err

+ 62 - 23
db/talent.go

@@ -111,9 +111,9 @@ func GetGoodstalentList(ctx context.Context, request http_model.GetGoodsTalentRe
 			City:        salesInfo.City,
 			HeadUrl:     salesInfo.HeadUri,
 			FansNum:     fans,
-			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
-			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
-			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
+			ThirtySales: salesInfo.SaleNum30Day,
+			AccSales:    salesInfo.SaleNumTotal,
+			ActualSales: GetActualSales(db, salesInfo.OpenId), //open_id sec_task sale_actual
 			AccCoopTime: item.CooperateNum,
 			FirCoopFrom: "公海",
 		})
@@ -122,6 +122,19 @@ func GetGoodstalentList(ctx context.Context, request http_model.GetGoodsTalentRe
 	return result, nil
 }
 
+func GetActualSales(db *gorm.DB, openid string) int {
+	var sectaskinfo []gorm_model.YounggeeSecTaskInfo
+	if err := db.Where("open_id = ?", openid).Find(&sectaskinfo).Error; err != nil {
+		return 0
+	}
+
+	var total int
+	for _, item := range sectaskinfo {
+		total += item.SaleActual
+	}
+	return total
+}
+
 func GetProjecttalentList(ctx context.Context, request http_model.GetProjectTalentRequest) (*http_model.GetProjectTalentListData, error) {
 	db := GetReadDB(ctx)
 	// 存储达人信息
@@ -204,17 +217,30 @@ func GetProjecttalentList(ctx context.Context, request http_model.GetProjectTale
 			return nil, err
 		}
 		fans, _ := conv.Int(salesInfo.Fan)
+		var taskinfo gorm_model.YoungeeTaskInfo
+		if err := db.Where(gorm_model.YoungeeTaskInfo{TaskID: item.ProjectTaskID}).First(&taskinfo).Error; err != nil {
+			return nil, err
+		}
+		var projectinfo gorm_model.ProjectInfo
+		err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", taskinfo.ProjectID).First(&projectinfo).Error
+		if err != nil {
+			return nil, err
+		}
+		s_type, s_name := stype(db, taskinfo.SupplierId, taskinfo.SupplierStatus, projectinfo.ProjectType)
 		result.TalentList = append(result.TalentList, &http_model.ProjectTalentInfo{
-			TalentId:    item.TalentId,
-			Nickname:    item.TalentName,
-			City:        salesInfo.City,
-			HeadUrl:     salesInfo.HeadUri,
-			FansNum:     fans,
-			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
-			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
-			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
-			AccCoopTime: item.CooperateNum,
-			FirCoopFrom: "公海",
+			TalentId:     item.TalentId,
+			Nickname:     item.TalentName,
+			City:         salesInfo.City,
+			HeadUrl:      salesInfo.HeadUri,
+			FansNum:      fans,
+			AccInteract:  0,
+			AccPlay:      0,
+			AvgCollected: 0,
+			AvgComments:  0,
+			AvgLikes:     0,
+			AccCoopTime:  item.CooperateNum,
+			FirCoopFrom:  s_name,
+			Stype:        s_type,
 		})
 	}
 
@@ -303,17 +329,30 @@ func GetLocallifetalentList(ctx context.Context, request http_model.GetLocallife
 			return nil, err
 		}
 		fans, _ := conv.Int(salesInfo.Fan)
+		var taskinfo gorm_model.YoungeeLocalTaskInfo
+		if err := db.Where(gorm_model.YoungeeLocalTaskInfo{TaskId: item.LocalTaskID}).First(&taskinfo).Error; err != nil {
+			return nil, err
+		}
+		var projectinfo gorm_model.YounggeeLocalLifeInfo
+		err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", taskinfo.LocalId).First(&projectinfo).Error
+		if err != nil {
+			return nil, err
+		}
+		s_type, s_name := stype(db, taskinfo.SupplierId, taskinfo.SupplierStatus, projectinfo.LocalType)
 		result.TalentList = append(result.TalentList, &http_model.LocallifeTalentInfo{
-			TalentId:    item.TalentId,
-			Nickname:    item.TalentName,
-			City:        salesInfo.City,
-			HeadUrl:     salesInfo.HeadUri,
-			FansNum:     fans,
-			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
-			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
-			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
-			AccCoopTime: item.CooperateNum,
-			FirCoopFrom: "公海",
+			TalentId:     item.TalentId,
+			Nickname:     item.TalentName,
+			City:         salesInfo.City,
+			HeadUrl:      salesInfo.HeadUri,
+			FansNum:      fans,
+			AccInteract:  0,
+			AccPlay:      0,
+			AvgCollected: 0,
+			AvgComments:  0,
+			AvgLikes:     0,
+			AccCoopTime:  item.CooperateNum,
+			FirCoopFrom:  s_name,
+			SType:        s_type,
 		})
 	}
 

+ 39 - 15
model/gorm_model/info_auto_task.go

@@ -3,21 +3,45 @@ package gorm_model
 // Code generated by sql2gorm. DO NOT EDIT.
 
 type InfoAutoTask struct {
-	AutoTaskID        int `gorm:"column:auto_task_id;primary_key;AUTO_INCREMENT"` // 自动处理规则id
-	SignInOffline     int `gorm:"column:sign_in_offline"`                         // 线下探店自动签收时间
-	SignInVirtual     int `gorm:"column:sign_in_virtual"`                         // 虚拟产品测评自动签收时间
-	ReviewInMv        int `gorm:"column:review_in_mv"`                            // 视频形式的审稿处理
-	ReviewUnlimited   int `gorm:"column:review_unlimited"`                        // 不限形式的审稿处理
-	Postreview        int `gorm:"column:postreview"`                              // 发布审核自动处理
-	CaseClose         int `gorm:"column:case_close"`                              // 结案自动处理
-	Invalid           int `gorm:"column:invalid"`                                 // 失效自动处理
-	DraftDefaultInPic int `gorm:"column:draft_default_in_pic"`                    // 图片初稿违约自动处理
-	DraftDefaultInMv  int `gorm:"column:draft_default_in_mv"`                     // 视频初稿违约自动处理
-	ScriptDefault     int `gorm:"column:script_default"`                          // 脚本违约自动处理
-	LinkBreach        int `gorm:"column:link_breach"`                             // 链接违约自动处理
-	CaseCloseDefault  int `gorm:"column:case_close_default"`                      // 数据违约时间
-	DraftDefault      int `gorm:"column:draft_default;NOT NULL"`
-	EnterpriseId     string `gorm:"column:enterprise_id"`//   企业ID
+	AutoTaskID   int    `gorm:"column:auto_task_id;primary_key;AUTO_INCREMENT"`
+	EnterpriseId string `gorm:"column:enterprise_id"`
+
+	// 新增字段
+	ReviewAuto                   int `gorm:"column:review_auto"`                     // (审稿自动执行)
+	LinkReviewAuto               int `gorm:"column:link_review_auto"`                // (链接质检自动执行)
+	TaskFinishAuto               int `gorm:"column:task_finish_auto"`                // (任务结算自动执行)
+	SelectionInvalid             int `gorm:"column:selection_invalid"`               // 选品项目失效自动处理
+	DraftCooperateProjectDefault int `gorm:"column:draft_cooperate_project_default"` // 初稿违约2
+	DraftStoreDefault            int `gorm:"column:draft_store_default"`             // 初稿违约3
+	DraftCooperateLocalDefault   int `gorm:"column:draft_cooperate_local_default"`   // 初稿违约4
+
+	// 已有字段
+	Invalid         int `gorm:"column:invalid"`
+	SignInOffline   int `gorm:"column:sign_in_offline"`
+	SignInVirtual   int `gorm:"column:sign_in_virtual"`
+	ReviewInMv      int `gorm:"column:review_in_mv"`
+	ReviewUnlimited int `gorm:"column:review_unlimited"`
+	Postreview      int `gorm:"column:post_review"` // 注意列名映射
+	CaseClose       int `gorm:"column:case_close"`
+	//DraftDefaultInPic                   int    `gorm:"column:draft_default_in_pic"`                    // 需确认表中是否存在该列
+	//DraftDefaultInMv                    int    `gorm:"column:draft_default_in_mv"`                     // 需确认表中是否存在该列
+	ScriptDefault    int `gorm:"column:script_default"`
+	LinkBreach       int `gorm:"column:link_breach"`
+	CaseCloseDefault int `gorm:"column:case_close_default"`
+	DraftDefault     int `gorm:"column:draft_default"`
+
+	// 新增 operator 字段
+	ReviewAutoOperator                   string `gorm:"column:review_auto_operator"`
+	LinkReviewAutoOperator               string `gorm:"column:link_review_auto_operator"`
+	TaskFinishAutoOperator               string `gorm:"column:task_finish_auto_operator"`
+	InvalidOperator                      string `gorm:"column:invalid_operator"`
+	SelectionInvalidOperator             string `gorm:"column:selection_invalid_operator"`
+	DraftDefaultOperator                 string `gorm:"column:draft_default_operator"`
+	DraftCooperateProjectDefaultOperator string `gorm:"column:draft_cooperate_project_default_operator"`
+	DraftStoreDefaultOperator            string `gorm:"column:draft_store_default_operator"`
+	DraftCooperateLocalDefaultOperator   string `gorm:"column:draft_cooperate_local_default_operator"`
+	LinkBreachOperator                   string `gorm:"column:link_breach_operator"`
+	CaseCloseDefaultOperator             string `gorm:"column:case_close_default_operator"`
 }
 
 func (m *InfoAutoTask) TableName() string {

+ 1 - 1
model/gorm_model/locallife_info.go

@@ -7,7 +7,7 @@ import (
 type YounggeeLocalLifeInfo struct {
 	Id                  int        `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:本地生活表主键ID" json:"id"`
 	LocalId             string     `gorm:"column:local_id;type:varchar(10);comment:项目id;NOT NULL" json:"local_id"`
-	LocalType           int        `gorm:"column:local_type;type:tinyint(4);comment:项目类型,1代表公开项目,2代表定向项目" json:"local_type"`
+	LocalType           int64      `gorm:"column:local_type;type:tinyint(4);comment:项目类型,1代表公开项目,2代表定向项目" json:"local_type"`
 	LocalPlatform       int        `gorm:"column:local_platform;type:tinyint(4);comment:项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎" json:"local_platform"`
 	ServiceChargeRate   float64    `gorm:"column:service_charge_rate;type:decimal(10,2);default:0.00;comment:公开服务费率;NOT NULL" json:"service_charge_rate"`
 	StoreId             int        `gorm:"column:store_id;type:int(11);comment:关联门店id" json:"store_id"`

+ 8 - 3
model/gorm_model/locallife_task_info.go

@@ -4,7 +4,7 @@ import (
 	"time"
 )
 
-// 种草子任务
+// 本地生活子任务
 type YoungeeLocalTaskInfo struct {
 	TaskId                 string    `gorm:"column:task_id;type:char(15);primary_key;comment:任务id" json:"task_id"`
 	LocalId                string    `gorm:"column:local_id;type:char(10);comment:项目id;NOT NULL" json:"local_id"`
@@ -61,7 +61,7 @@ type YoungeeLocalTaskInfo struct {
 	SOperator              int       `gorm:"column:s_operator;type:int(11);default:0;comment:服务商提报达人操作人ID" json:"s_operator"`
 	SOperatorType          int       `gorm:"column:s_operator_type;type:int(11);default:0;comment:服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台" json:"s_operator_type"`
 	OpenId                 string    `gorm:"column:open_id;type:varchar(255);comment:达人报名的快手唯一标识" json:"open_id"`
-	SLocalLifeId           int       `gorm:"column:s_local_life_id;type:int(11);comment:服务商种草任务ID" json:"s_local_life_id"`
+	SLocalLifeId           int       `gorm:"column:s_local_id;type:int(11);comment:服务商本地生活任务ID" json:"s_local_life_id"`
 	SupportFee             float64   `gorm:"column:support_fee;type:decimal(10,2);comment:提报价格(达人自报价经过计算后,)" json:"support_fee"`
 	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time;type:datetime;comment:未传初稿违约时间" json:"sketch_missing_time"`
 	SketchMissingStatus    int       `gorm:"column:sketch_missing_status;type:int(11);default:0;comment:未传初稿违约状态,0无违约,1有违约" json:"sketch_missing_status"`
@@ -80,7 +80,12 @@ type YoungeeLocalTaskInfo struct {
 	PlatformId             int       `gorm:"column:platform_id;type:int(11);comment:平台" json:"platform_id"`
 	City                   string    `gorm:"column:city;type:varchar(255);comment:城市" json:"city"`
 	SOperatename           string    `gorm:"column:s_operate_name;type:varchar(255);comment:提报达人服务商名称" json:"s_operate_name"` //提报达人服务商名称
-	TalentName             string    `gorm:"column:talent_name"`
+	ReserveTime            time.Time `gorm:"column:reserve_time;type:datetime;comment:预约探店时间" json:"reserve_time"`
+	ExploreTime            time.Time `gorm:"column:explore_time;type:datetime;comment:探店时间" json:"explore_time"`
+	FinishExploreTime      time.Time `gorm:"column:finish_explore_time;type:datetime;comment:完成探店时间" json:"finish_explore_time"`
+	WxNum                  string    `gorm:"column:wx_num;type:varchar(255);comment:报名时填写的微信号" json:"wx_num"`
+	SLocalId               int       `gorm:"column:s_local_id;type:int(11);comment:服务商本地生活任务ID" json:"s_local_id"`
+	TalentName             string    `gorm:"column:talent_name;type:varchar(255);comment:达人名称" json:"talent_name"`
 }
 
 func (m *YoungeeLocalTaskInfo) TableName() string {

+ 44 - 39
model/gorm_model/selection_task_info.go

@@ -5,45 +5,50 @@ import (
 )
 
 type YounggeeSecTaskInfo struct {
-	ID                     int       `gorm:"column:id;primary_key"`              // 递增id
-	TaskID                 string    `gorm:"column:task_id"`                     // 选品任务id
-	SelectionID            string    `gorm:"column:selection_id"`                // 选品id
-	TalentID               string    `gorm:"column:talent_id"`                   // 达人id
-	AccountID              int       `gorm:"column:account_id"`                  // 账号id
-	TalentPlatformInfoSnap string    `gorm:"column:talent_platform_info_snap"`   // 达人平台信息快照
-	TalentPersonalInfoSnap string    `gorm:"column:talent_personal_info_snap"`   // 达人个人信息快照
-	TalentPostAddrSnap     string    `gorm:"column:talent_post_addr_snap"`       // 收货地址快照
-	TaskReward             string    `gorm:"column:task_reward"`                 //  达人赏金
-	TalentPayment          string    `gorm:"column:talent_payment"`              // 达人垫付金额
-	IsPayPayment           int       `gorm:"column:is_pay_payment"`              // 企业是否返样品钱
-	IsPayReward            int       `gorm:"column:is_pay_reward"`               // 企业是否结算悬赏
-	TaskMode               int       `gorm:"column:task_mode"`                   // 任务形式,1、2分别表示纯佣带货、悬赏任务
-	SampleMode             int       `gorm:"column:sample_mode"`                 // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
-	TaskStatus             int       `gorm:"column:task_status;default:1"`       // 任务状态 1待选 2已选 3落选
-	TaskStage              int       `gorm:"column:task_stage"`                  // 任务阶段,详情见info_sec_task_stage表
-	CreateDate             time.Time `gorm:"column:create_date"`                 // 创建时间
-	SelectDate             time.Time `gorm:"column:select_date"`                 // 反选时间
-	DeliveryDate           time.Time `gorm:"column:delivery_date"`               // 发货时间
-	CompleteDate           time.Time `gorm:"column:complete_date"`               // 结束时间
-	WithdrawDate           time.Time `gorm:"column:withdraw_date"`               // 提现时间
-	CompleteStatus         int       `gorm:"column:complete_status;default:1"`   // 结束方式 1未结束 2正常结束 3反选失败
-	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`  // 发货状态 1 待发货 2已发货 3 已签收
-	AssignmentStatus       uint      `gorm:"column:assignment_status;default:1"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	UpdateAt               time.Time `gorm:"column:update_at"`                   // 更新时间
-	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`   // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
-	LeadTeamID             string    `gorm:"column:lead_team_id"`                // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
-	TeamID                 string    `gorm:"column:team_id"`                     // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
-	TeamIncome             int       `gorm:"column:team_income"`                 // young之团团长现金收益
-	TeamPoint              int       `gorm:"column:team_point"`                  // young之团团长积分收益
-	SignedTime             time.Time `gorm:"column:signed_time"`                 // 快递签收时间
-	SaleNum                int       `gorm:"column:sale_num"`                    // 30天橱窗销量
-	FreeStrategyId         int       `gorm:"column:free_strategy_id"`            // 免费领样策略id
-	ProductId              int       `gorm:"column:product_id"`                  // 商品id
-	SaleActual             int       `gorm:"column:sale_actual"`                 // 实际带货量
-	SaleNumAll             int       `gorm:"column:sale_num_all"`                // 达人对此商品的全部销售量(大于1表示已出单)
-	FansNum                int       `gorm:"column:fans_num"`                    // 粉丝数
-	FreeStage              int       `gorm:"column:free_stage"`                  // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货
-	RewardStage            int       `gorm:"column:reward_stage"`                // 悬赏阶段,1-2分别代表待结算(管理后台设置)、已结算(小程序端设置)
+	ID                     int        `gorm:"column:id;primary_key"`              // 递增id
+	TaskID                 string     `gorm:"column:task_id"`                     // 选品任务id
+	SelectionID            string     `gorm:"column:selection_id"`                // 选品id
+	TalentID               string     `gorm:"column:talent_id"`                   // 达人id
+	AccountID              int        `gorm:"column:account_id"`                  // 账号id
+	TalentPlatformInfoSnap string     `gorm:"column:talent_platform_info_snap"`   // 达人平台信息快照
+	TalentPersonalInfoSnap string     `gorm:"column:talent_personal_info_snap"`   // 达人个人信息快照
+	TalentPostAddrSnap     string     `gorm:"column:talent_post_addr_snap"`       // 收货地址快照
+	TaskReward             string     `gorm:"column:task_reward"`                 //  达人赏金
+	TalentPayment          string     `gorm:"column:talent_payment"`              // 达人垫付金额
+	IsPayPayment           int        `gorm:"column:is_pay_payment"`              // 企业是否返样品钱
+	IsPayReward            int        `gorm:"column:is_pay_reward"`               // 企业是否结算悬赏
+	TaskMode               int        `gorm:"column:task_mode"`                   // 任务形式,1、2分别表示纯佣带货、悬赏任务
+	SampleMode             int        `gorm:"column:sample_mode"`                 // 领样形式,1-3分别表示免费领样、垫付买样、不提供样品
+	TaskStatus             int        `gorm:"column:task_status;default:1"`       // 任务状态 1待选 2已选 3落选
+	TaskStage              int        `gorm:"column:task_stage"`                  // 任务阶段,详情见info_sec_task_stage表
+	CreateDate             time.Time  `gorm:"column:create_date"`                 // 创建时间
+	SelectDate             time.Time  `gorm:"column:select_date"`                 // 反选时间
+	DeliveryDate           time.Time  `gorm:"column:delivery_date"`               // 发货时间
+	CompleteDate           time.Time  `gorm:"column:complete_date"`               // 结束时间
+	WithdrawDate           time.Time  `gorm:"column:withdraw_date"`               // 提现时间
+	CompleteStatus         int        `gorm:"column:complete_status;default:1"`   // 结束方式 1未结束 2正常结束 3反选失败
+	LogisticsStatus        int        `gorm:"column:logistics_status;default:1"`  // 发货状态 1 待发货 2已发货 3 已签收
+	AssignmentStatus       uint       `gorm:"column:assignment_status;default:1"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               time.Time  `gorm:"column:update_at"`                   // 更新时间
+	WithdrawStatus         int        `gorm:"column:withdraw_status;default:1"`   // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamID             string     `gorm:"column:lead_team_id"`                // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamID                 string     `gorm:"column:team_id"`                     // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	TeamIncome             int        `gorm:"column:team_income"`                 // young之团团长现金收益
+	TeamPoint              int        `gorm:"column:team_point"`                  // young之团团长积分收益
+	SignedTime             time.Time  `gorm:"column:signed_time"`                 // 快递签收时间
+	SaleNum                int        `gorm:"column:sale_num"`                    // 30天橱窗销量
+	FreeStrategyId         int        `gorm:"column:free_strategy_id"`            // 免费领样策略id
+	ProductId              int        `gorm:"column:product_id"`                  // 商品id
+	SaleActual             int        `gorm:"column:sale_actual"`                 // 实际带货量
+	SaleNumAll             int        `gorm:"column:sale_num_all"`                // 达人对此商品的全部销售量(大于1表示已出单)
+	FansNum                int        `gorm:"column:fans_num"`                    // 粉丝数
+	FreeStage              int        `gorm:"column:free_stage"`                  // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货
+	RewardStage            int        `gorm:"column:reward_stage"`                // 悬赏阶段,1-2分别代表待结算(管理后台设置)、已结算(小程序端设置)
+	TaskDDL                *time.Time `gorm:"column:task_ddl" json:"task_ddl" comment:"和选品ddl保持一致"`
+	City                   string     `gorm:"column:city;size:255" json:"city" comment:"所在城市"`
+	OpenID                 string     `gorm:"column:open_id;size:255" json:"open_id" comment:"账号唯一标识"`
+	WxNum                  string     `gorm:"column:wx_num;size:255" json:"wx_num" comment:"微信号"`
+	BOperator              string     `gorm:"column:b_operator;size:255" json:"b_operator" comment:"ID"`
 }
 
 func (m *YounggeeSecTaskInfo) TableName() string {

+ 6 - 6
model/http_model/PassproTaskCoopRequest.go

@@ -1,12 +1,12 @@
 package http_model
 
 type PassproTaskCoopRequest struct {
-	ProjectId   string   `json:"project_id"`
-	TaskIds     []string `json:"task_ids"`
-	SProjectId  *int     `json:"s_project_id"`
-	OperatorId  string   `json:"operator_id"`
-	OperateType int      `json:"operate_type"`
-	IsSpecial   int      `json:"is_special"`
+	ProjectId    string   `json:"project_id"`
+	TaskIds      []string `json:"task_ids"`
+	OperatorId   string   `json:"operator_id"`
+	EnterpriseId string   `json:"enterprise_id"`
+	OperateType  int      `json:"operate_type"`
+	IsSpecial    int      `json:"is_special"`
 }
 
 type PassproTaskCoopData struct {

+ 4 - 3
model/http_model/RefuseproTaskCoopRequest.go

@@ -1,9 +1,10 @@
 package http_model
 
 type RefuseproTaskCoopRequest struct {
-	TaskIds     []string `json:"task_ids"`
-	OperatorId  string   `json:"operator_id"`
-	OperateType int      `json:"operate_type"`
+	TaskIds      []string `json:"task_ids"`
+	OperatorId   string   `json:"operator_id"`
+	OperateType  int      `json:"operate_type"`
+	EnterpriseId string   `json:"enterprise_id"`
 }
 
 type RefuseproTaskCoopData struct {

+ 6 - 5
model/http_model/data_accept.go

@@ -2,11 +2,12 @@ package http_model
 
 type AcceptDataRequest struct {
 	//Payment   float64 `json:"payment"`      //招募策略id
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`   //项目id
-	IsSpecial   int    `json:"is_special"`   // 是否为专项项目
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`   //项目id
+	IsSpecial    int    `json:"is_special"`   // 是否为专项项目
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type AcceptDataData struct {

+ 6 - 5
model/http_model/data_localaccept.go

@@ -2,11 +2,12 @@ package http_model
 
 type LocalAcceptDataRequest struct {
 	//Payment   float64 `json:"payment"`      //招募策略id
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`   //项目id
-	IsSpecial   int    `json:"is_special"`   // 是否为专项项目
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`   //项目id
+	IsSpecial    int    `json:"is_special"`   // 是否为专项项目
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LocalAcceptDataData struct {

+ 6 - 5
model/http_model/data_opinion.go

@@ -1,11 +1,12 @@
 package http_model
 
 type DataOpinionRequest struct {
-	TaskID      string `json:"task_id"` //任务-id
-	ProjectId   string `json:"project_id"`
-	DataOpinion string `json:"Data_opinion"` //数据审核意见
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskID       string `json:"task_id"` //任务-id
+	ProjectId    string `json:"project_id"`
+	DataOpinion  string `json:"Data_opinion"` //数据审核意见
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type DataOpinionData struct {

+ 3 - 3
model/http_model/getgoodstalentrequest.go

@@ -23,9 +23,9 @@ type GoodsTalentInfo struct {
 	City        string `json:"city"`
 	HeadUrl     string `json:"head_url"`
 	FansNum     int    `json:"fans_num"`
-	ThirtySales string `json:"thirty_sales"`
-	AccSales    string `json:"acc_sales"`
-	ActualSales string `json:"actual_sales"`
+	ThirtySales int    `json:"thirty_sales"`
+	AccSales    int    `json:"acc_sales"`
+	ActualSales int    `json:"actual_sales"`
 	AccCoopTime int    `json:"acc_coop_time"`
 	FirCoopFrom string `json:"fir_coop_from"`
 }

+ 13 - 10
model/http_model/getlocallifetalentrequest.go

@@ -16,16 +16,19 @@ type GetLocallifeTalentListData struct {
 }
 
 type LocallifeTalentInfo struct {
-	TalentId    string `json:"talent_id"`
-	Nickname    string `json:"nickname"`
-	City        string `json:"city"`
-	HeadUrl     string `json:"head_url"`
-	FansNum     int    `json:"fans_num"`
-	ThirtySales string `json:"thirty_sales"`
-	AccSales    string `json:"acc_sales"`
-	ActualSales string `json:"actual_sales"`
-	AccCoopTime int    `json:"acc_coop_time"`
-	FirCoopFrom string `json:"fir_coop_from"`
+	TalentId     string `json:"talent_id"`
+	Nickname     string `json:"nickname"`
+	City         string `json:"city"`
+	HeadUrl      string `json:"head_url"`
+	FansNum      int    `json:"fans_num"`
+	AvgLikes     int    `json:"avg_likes"`
+	AvgCollected int    `json:"avg_collected"`
+	AvgComments  int    `json:"avg_comments"`
+	AccPlay      int    `json:"acc_play"`
+	AccInteract  int    `json:"acc_interact"`
+	AccCoopTime  int    `json:"acc_coop_time"`
+	FirCoopFrom  string `json:"fir_coop_from"`
+	SType        int    `json:"stype"`
 }
 
 func NewGetLocallifeTalentRequest() *GetLocallifeTalentRequest {

+ 3 - 0
model/http_model/getlocaltasklist.go

@@ -11,6 +11,7 @@ type GetLocalTaskListRequest struct {
 	EnterPriseId   string   `json:"enterprise_id"`
 	SortField      []string `json:"sort_field,omitempty"`
 	SortOrder      []string `json:"sort_order,omitempty"`
+	Others         string   `json:"others,omitempty"`
 }
 
 type GetLocalTaskListData struct {
@@ -42,6 +43,8 @@ type LocaLTaskInfo struct {
 	HeadUrl    string `json:"head_url"`
 	Sprojectid int    `json:"sprojectid"`
 	City       string `json:"city"`
+	ListTime   string `json:"list_time"`
+	StageIntro string `json:"stage_intro"`
 }
 
 func NewGetLocalTaskListRequest() *GetLocalTaskListRequest {

+ 16 - 10
model/http_model/getprojecttalentrequest.go

@@ -16,16 +16,22 @@ type GetProjectTalentListData struct {
 }
 
 type ProjectTalentInfo struct {
-	TalentId    string `json:"talent_id"`
-	Nickname    string `json:"nickname"`
-	City        string `json:"city"`
-	HeadUrl     string `json:"head_url"`
-	FansNum     int    `json:"fans_num"`
-	ThirtySales string `json:"thirty_sales"`
-	AccSales    string `json:"acc_sales"`
-	ActualSales string `json:"actual_sales"`
-	AccCoopTime int    `json:"acc_coop_time"`
-	FirCoopFrom string `json:"fir_coop_from"`
+	TalentId string `json:"talent_id"`
+	Nickname string `json:"nickname"`
+	City     string `json:"city"`
+	HeadUrl  string `json:"head_url"`
+	FansNum  int    `json:"fans_num"`
+	//ThirtySales string `json:"thirty_sales"`
+	//AccSales    string `json:"acc_sales"`
+	//ActualSales string `json:"actual_sales"`
+	AvgLikes     int    `json:"avg_likes"`
+	AvgCollected int    `json:"avg_collected"`
+	AvgComments  int    `json:"avg_comments"`
+	AccPlay      int    `json:"acc_play"`
+	AccInteract  int    `json:"acc_interact"`
+	AccCoopTime  int    `json:"acc_coop_time"`
+	FirCoopFrom  string `json:"fir_coop_from"`
+	Stype        int    `json:"stype"`
 }
 
 func NewGetProjectTalentRequest() *GetProjectTalentRequest {

+ 3 - 0
model/http_model/gettasklist.go

@@ -10,6 +10,7 @@ type GetTaskListRequest struct {
 	EnterPriseId string   `json:"enterprise_id"`
 	SortField    []string `json:"sort_field,omitempty"`
 	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetTaskListData struct {
@@ -41,6 +42,8 @@ type TaskInfo struct {
 	HeadUrl    string `json:"head_url"`
 	City       string `json:"city"`
 	Sprojectid int    `json:"sprojectid"`
+	ListTime   string `json:"list_time"`
+	StageIntro string `json:"stage_intro"`
 }
 
 func NewGetTaskListRequest() *GetTaskListRequest {

+ 6 - 5
model/http_model/link_accept.go

@@ -1,11 +1,12 @@
 package http_model
 
 type AcceptLinkRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
-	Isspecial   int    `json:"is_special"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	Isspecial    int    `json:"is_special"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type AcceptLinkData struct {

+ 6 - 5
model/http_model/link_localaccept.go

@@ -1,11 +1,12 @@
 package http_model
 
 type LocalAcceptLinkRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
-	Isspecial   int    `json:"is_special"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	Isspecial    int    `json:"is_special"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LocalAcceptLinkData struct {

+ 6 - 5
model/http_model/link_opinion.go

@@ -1,11 +1,12 @@
 package http_model
 
 type LinkOpinionRequest struct {
-	TaskID      string `json:"task_id"` //任务-id
-	ProjectId   string `json:"project_id"`
-	LinkOpinion string `json:"Link_opinion"` //链接审核意见
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskID       string `json:"task_id"` //任务-id
+	ProjectId    string `json:"project_id"`
+	LinkOpinion  string `json:"Link_opinion"` //链接审核意见
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LinkOpinionData struct {

+ 1 - 0
model/http_model/localdata_opinion.go

@@ -6,6 +6,7 @@ type LocalDataOpinionRequest struct {
 	LocalDataOpinion string `json:"Data_opinion"` //数据审核意见
 	OperatorId       string `json:"operator_id"`
 	OperateType      int    `json:"operate_type"`
+	EnterpriseId     string `json:"enterprise_id"`
 }
 
 type LocalDataOpinionData struct {

+ 1 - 0
model/http_model/locallink_opinion.go

@@ -6,6 +6,7 @@ type LocalLinkOpinionRequest struct {
 	LocalLinkOpinion string `json:"Link_opinion"` //链接审核意见
 	OperatorId       string `json:"operator_id"`
 	OperateType      int    `json:"operate_type"`
+	EnterpriseId     string `json:"enterprise_id"`
 }
 
 type LocalLinkOpinionData struct {

+ 5 - 4
model/http_model/localreject_data.go

@@ -1,10 +1,11 @@
 package http_model
 
 type LocalRejectDataRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LocalRejectDataData struct {

+ 5 - 4
model/http_model/localreject_link.go

@@ -1,10 +1,11 @@
 package http_model
 
 type LocalRejectLinkRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LocalRejectLinkData struct {

+ 1 - 0
model/http_model/localsketch_opinion.go

@@ -4,6 +4,7 @@ type LocalSketchOpinionRequest struct {
 	TaskID             string `json:"task_id"` //任务-id
 	ProjectId          string `json:"project_id"`
 	LocalSketchOpinion string `json:"sketch_opinion"` //初稿意见
+	EnterpriseId       string `json:"enterprise_id"`
 	OperatorId         string `json:"operator_id"`
 	OperateType        int    `json:"operate_type"`
 }

+ 5 - 4
model/http_model/reject_data.go

@@ -1,10 +1,11 @@
 package http_model
 
 type RejectDataRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type RejectDataData struct {

+ 5 - 4
model/http_model/reject_link.go

@@ -1,10 +1,11 @@
 package http_model
 
 type RejectLinkRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type RejectLinkData struct {

+ 6 - 5
model/http_model/sketch_accept.go

@@ -1,11 +1,12 @@
 package http_model
 
 type AcceptSketchRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
-	IsSpecial   int    `json:"is_special"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
+	IsSpecial    int    `json:"is_special"`
 }
 
 type AcceptSketchData struct {

+ 6 - 5
model/http_model/sketch_loaclaccept.go

@@ -1,11 +1,12 @@
 package http_model
 
 type LocalAcceptSketchRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
-	IsSpecial   int    `json:"is_special"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	EnterpriseId string `json:"enterprise_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	IsSpecial    int    `json:"is_special"`
 }
 
 type LocalAcceptSketchData struct {

+ 5 - 4
model/http_model/sketch_localreject.go

@@ -1,10 +1,11 @@
 package http_model
 
 type LocalRejectSketchRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type LocalRejectSketchData struct {

+ 1 - 0
model/http_model/sketch_opinion.go

@@ -4,6 +4,7 @@ type SketchOpinionRequest struct {
 	TaskID        string `json:"task_id"` //任务-id
 	ProjectId     string `json:"project_id"`
 	SketchOpinion string `json:"sketch_opinion"` //初稿意见
+	EnterpriseId  string `json:"enterprise_id"`
 	OperatorId    string `json:"operator_id"`
 	OperateType   int    `json:"operate_type"`
 }

+ 5 - 4
model/http_model/sketch_reject.go

@@ -1,10 +1,11 @@
 package http_model
 
 type RejectSketchRequest struct {
-	TaskIds     string `json:"task_id_list"` //任务id列表
-	ProjectId   string `json:"project_id"`
-	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
+	TaskIds      string `json:"task_id_list"` //任务id列表
+	ProjectId    string `json:"project_id"`
+	OperatorId   string `json:"operator_id"`
+	OperateType  int    `json:"operate_type"`
+	EnterpriseId string `json:"enterprise_id"`
 }
 
 type RejectSketchData struct {

+ 1 - 1
route/init.go

@@ -232,7 +232,7 @@ func InitRoute(r *gin.Engine) {
 		task.POST("/localLife/close", controller.TaskController{}.LocalLifeClose)                // 结束本地生活
 
 		// 招募中、执行中
-		task.POST("/project/getrecuritddl", handler.WrapGetRecruitTimeHandler)          //本地生活招募截止时间
+		task.POST("/project/getrecuritddl", handler.WrapGetRecruitTimeHandler)          //种草招募截止时间
 		task.POST("/project/gettalentstatusnum", handler.WrapGetTalentstatusNumHandler) //达人状态数量
 		task.POST("/project/getTasklist", handler.WrapGetTaskListHandler)               //种草招募中选达人列表/查名单
 		task.POST("/project/task/coop/pass", handler.WrapPassproTaskCoopHandler)        // 种草同意任务合作

+ 2 - 2
service/Task.go

@@ -39,7 +39,7 @@ func (*task) GetList(ctx context.Context, request http_model.GetTaskListRequest)
 }
 
 func (*task) PassCoop(ctx context.Context, request http_model.PassproTaskCoopRequest) (*http_model.PassSecTaskCoopData, error) {
-	_, err := db.PassProTaskCoop(ctx, request.ProjectId, request.TaskIds, request.OperatorId, request.OperateType, request.IsSpecial, request)
+	_, err := db.PassProTaskCoop(ctx, request.ProjectId, request.TaskIds, request.OperatorId, request.OperateType, request.IsSpecial, request.EnterpriseId, request)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[sectask_service service] call PassCoop error,err:%+v", err)
 		return nil, err
@@ -52,7 +52,7 @@ func (*task) PassCoop(ctx context.Context, request http_model.PassproTaskCoopReq
 
 func (*task) RefuseCoop(ctx context.Context, request http_model.RefuseproTaskCoopRequest) (*http_model.RefuseproTaskCoopData, error) {
 
-	_, err := db.RefuseproTaskCoop(ctx, request.TaskIds, request.OperatorId, request.OperateType)
+	_, err := db.RefuseproTaskCoop(ctx, request.TaskIds, request.OperatorId, request.OperateType, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[sectask_service service] call RefuseCoop error,err:%+v", err)
 		return nil, err

+ 6 - 6
service/data.go

@@ -22,7 +22,7 @@ func (*data) DataOpinion(ctx context.Context, request http_model.DataOpinionRequ
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.DataOpinion,
 	}
-	err := db.DataOpinion(ctx, Data.TaskID, Data.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.DataOpinion(ctx, Data.TaskID, Data.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call CreateData error,err:%+v", err)
 		return nil, err
@@ -52,7 +52,7 @@ func (*data) LocalDataOpinion(ctx context.Context, request http_model.LocalDataO
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.LocalDataOpinion,
 	}
-	err := db.LocalDataOpinion(ctx, Data.TaskID, Data.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalDataOpinion(ctx, Data.TaskID, Data.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call CreateData error,err:%+v", err)
 		return nil, err
@@ -86,7 +86,7 @@ func (*data) AcceptData(ctx context.Context, request http_model.AcceptDataReques
 
 	// 1. 更新YounggeeDataInfo表,通过数据
 	//fmt.Printf("acc request %+v", TaskIDList)
-	err := db.AcceptData(ctx, TaskIDList, request.OperatorId, request.OperateType)
+	err := db.AcceptData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call AcceptData error,err:%+v", err)
 		return nil, err
@@ -186,7 +186,7 @@ func (*data) LocalAcceptData(ctx context.Context, request http_model.LocalAccept
 
 	// 1. 更新YounggeeDataInfo表,通过数据
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.AcceptData(ctx, TaskIDList, request.OperatorId, request.OperateType)
+	err := db.AcceptData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call AcceptData error,err:%+v", err)
 		return nil, err
@@ -283,7 +283,7 @@ func (*data) RejectData(ctx context.Context, request http_model.RejectDataReques
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	//fmt.Printf("acc request %+v", TaskIDList)
-	err := db.RejectData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.RejectData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -316,7 +316,7 @@ func (*data) LocalRejectData(ctx context.Context, request http_model.LocalReject
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.LocalRejectData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalRejectData(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err

+ 6 - 6
service/link.go

@@ -22,7 +22,7 @@ func (*link) LinkOpinion(ctx context.Context, request http_model.LinkOpinionRequ
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.LinkOpinion,
 	}
-	err := db.LinkOpinion(ctx, Link.TaskID, Link.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LinkOpinion(ctx, Link.TaskID, Link.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -52,7 +52,7 @@ func (*link) LocalLinkOpinion(ctx context.Context, request http_model.LocalLinkO
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.LocalLinkOpinion,
 	}
-	err := db.LocalLinkOpinion(ctx, Link.TaskID, Link.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalLinkOpinion(ctx, Link.TaskID, Link.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -84,7 +84,7 @@ func (*link) AcceptLink(ctx context.Context, request http_model.AcceptLinkReques
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.AcceptLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.Isspecial)
+	err := db.AcceptLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.Isspecial, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -117,7 +117,7 @@ func (*link) LocalAcceptLink(ctx context.Context, request http_model.LocalAccept
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.LocalAcceptLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.Isspecial)
+	err := db.LocalAcceptLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.Isspecial, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -150,7 +150,7 @@ func (*link) RejectLink(ctx context.Context, request http_model.RejectLinkReques
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.RejectLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.RejectLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -183,7 +183,7 @@ func (*link) LocalRejectLink(ctx context.Context, request http_model.LocalReject
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.LocalRejectLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalRejectLink(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err

+ 6 - 6
service/sketch.go

@@ -24,7 +24,7 @@ func (*sketch) SketchOption(ctx context.Context, request http_model.SketchOpinio
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.SketchOpinion,
 	}
-	err := db.SketchOption(ctx, Sketch.TaskID, Sketch.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.SketchOption(ctx, Sketch.TaskID, Sketch.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call CreateSketch error,err:%+v", err)
 		return nil, err
@@ -55,7 +55,7 @@ func (*sketch) LocalSketchOption(ctx context.Context, request http_model.LocalSk
 		TaskID:        request.TaskID,
 		ReviseOpinion: request.LocalSketchOpinion,
 	}
-	err := db.LocalSketchOption(ctx, Sketch.TaskID, Sketch.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalSketchOption(ctx, Sketch.TaskID, Sketch.ReviseOpinion, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call CreateSketch error,err:%+v", err)
 		return nil, err
@@ -88,7 +88,7 @@ func (*sketch) AcceptSketch(ctx context.Context, request http_model.AcceptSketch
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.AcceptSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.IsSpecial)
+	err := db.AcceptSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.IsSpecial, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call CreateSketch error,err:%+v", err)
 		return nil, err
@@ -121,7 +121,7 @@ func (*sketch) LocalAcceptSketch(ctx context.Context, request http_model.LocalAc
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.LocalAcceptSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.IsSpecial)
+	err := db.LocalAcceptSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.IsSpecial, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call LocalAcceptSketch error,err:%+v", err)
 		return nil, err
@@ -205,7 +205,7 @@ func (*sketch) RejectSketch(ctx context.Context, request http_model.RejectSketch
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.RejectSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.RejectSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call CreateSketch error,err:%+v", err)
 		return nil, err
@@ -238,7 +238,7 @@ func (*sketch) LocalRejectSketch(ctx context.Context, request http_model.LocalRe
 		TaskIDList = append(TaskIDList, taskId)
 	}
 	fmt.Printf("acc request %+v", TaskIDList)
-	err := db.LocalRejectSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId)
+	err := db.LocalRejectSketch(ctx, TaskIDList, request.OperatorId, request.OperateType, request.ProjectId, request.EnterpriseId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch service] call CreateSketch error,err:%+v", err)
 		return nil, err