Jelajahi Sumber

[20250509]迁移修改

lin-jim-leon 4 hari lalu
induk
melakukan
b1d9e3e0da
100 mengubah file dengan 5913 tambahan dan 4216 penghapusan
  1. 137 137
      db/Settle.go
  2. 22 22
      db/auto_task.go
  3. 34 51
      db/data.go
  4. 859 859
      db/default.go
  5. 4 4
      db/finance.go
  6. 299 299
      db/finish.go
  7. 40 37
      db/link.go
  8. 666 66
      db/locallife_task.go
  9. 4 4
      db/logistics.go
  10. 3 3
      db/message.go
  11. 34 34
      db/operate.go
  12. 603 108
      db/project_task.go
  13. 274 274
      db/script.go
  14. 194 210
      db/sketch.go
  15. 8 8
      db/talent.go
  16. 353 364
      db/task.go
  17. 60 0
      handler/getlocalrecruittime.go
  18. 60 0
      handler/getlocaltalentstatuscountnum.go
  19. 60 0
      handler/getlocaltalentstatusnum.go
  20. 60 0
      handler/getrecruittime.go
  21. 60 0
      handler/getsketchrecordlist.go
  22. 60 0
      handler/gettalentstatuscountnum.go
  23. 60 0
      handler/gettalentstatusnum.go
  24. 59 89
      handler/link_opinion.go
  25. 1 1
      handler/reject_sketch.go
  26. 59 58
      handler/sketch_info.go
  27. 39 15
      model/gorm_model/auto_task.go
  28. 10 2
      model/gorm_model/local_task.go
  29. 4 2
      model/gorm_model/locallife_info.go
  30. 45 50
      model/gorm_model/project.go
  31. 45 48
      model/gorm_model/project_task.go
  32. 2 0
      model/gorm_model/s_project.go
  33. 2 2
      model/gorm_model/supplier.go
  34. 9 8
      model/http_model/LocalPrelinkList.go
  35. 4 6
      model/http_model/PassLocalTaskCoopRequest.go
  36. 4 6
      model/http_model/PassproTaskCoopRequest.go
  37. 9 8
      model/http_model/PreLinkList.go
  38. 2 3
      model/http_model/RefuseproTaskCoopRequest.go
  39. 6 5
      model/http_model/data_accept.go
  40. 5 5
      model/http_model/data_localaccept.go
  41. 0 1
      model/http_model/data_opinion.go
  42. 19 0
      model/http_model/getlocalrecruittimerequest.go
  43. 22 0
      model/http_model/getlocaltalentstatuscountrequest.go
  44. 21 0
      model/http_model/getlocaltalentstatusnumrequest.go
  45. 22 16
      model/http_model/getlocaltasklist.go
  46. 19 0
      model/http_model/getrecruittimerequest.go
  47. 18 0
      model/http_model/getsketchrecordlistrequest.go
  48. 22 0
      model/http_model/gettalentstatuscountnum.go
  49. 23 0
      model/http_model/gettalentstatusnumrequest.go
  50. 21 15
      model/http_model/gettasklist.go
  51. 4 5
      model/http_model/link_accept.go
  52. 4 5
      model/http_model/link_localaccept.go
  53. 0 1
      model/http_model/link_opinion.go
  54. 0 1
      model/http_model/localdata_opinion.go
  55. 0 1
      model/http_model/locallink_opinion.go
  56. 9 8
      model/http_model/localpredatalist.go
  57. 9 8
      model/http_model/localpresketchlistrequest.go
  58. 3 4
      model/http_model/localreject_data.go
  59. 3 4
      model/http_model/localreject_link.go
  60. 0 1
      model/http_model/localsketch_opinion.go
  61. 10 9
      model/http_model/localtaskdatalist.go
  62. 10 9
      model/http_model/localtasklinklist.go
  63. 13 11
      model/http_model/localtasksketchlist.go
  64. 9 8
      model/http_model/predatalist.go
  65. 9 8
      model/http_model/presketchlist.go
  66. 2 3
      model/http_model/refuselocaltaskcooprequest.go
  67. 3 4
      model/http_model/reject_data.go
  68. 3 4
      model/http_model/reject_link.go
  69. 4 5
      model/http_model/sketch_accept.go
  70. 4 5
      model/http_model/sketch_loaclaccept.go
  71. 3 4
      model/http_model/sketch_localreject.go
  72. 0 1
      model/http_model/sketch_opinion.go
  73. 3 4
      model/http_model/sketch_reject.go
  74. 2 4
      model/http_model/sktech_info.go
  75. 10 9
      model/http_model/taskdatalist.go
  76. 10 9
      model/http_model/tasklinklist.go
  77. 13 11
      model/http_model/tasksketchlist.go
  78. 60 60
      pack/project_task_list.go
  79. 71 71
      pack/special_task_data_list.go
  80. 61 61
      pack/special_task_finishdata_list.go
  81. 61 61
      pack/special_task_invite_list.go
  82. 59 59
      pack/special_task_link_list.go
  83. 59 59
      pack/special_task_script_list.go
  84. 74 74
      pack/special_task_settle_list.go
  85. 60 60
      pack/special_task_sketch_list.go
  86. 71 71
      pack/task_data_list.go
  87. 55 55
      pack/task_default_list.go
  88. 53 53
      pack/task_default_review_list.go
  89. 61 61
      pack/task_finish_list.go
  90. 59 59
      pack/task_link_list.go
  91. 147 147
      pack/task_logistics_list.go
  92. 61 61
      pack/task_script_list.go
  93. 63 63
      pack/task_sketch_list.go
  94. 55 55
      pack/task_terminated_list.go
  95. 55 55
      pack/task_terminating_list.go
  96. 28 19
      route/init.go
  97. 36 0
      service/Localtask.go
  98. 29 2
      service/Task.go
  99. 43 38
      service/data.go
  100. 6 6
      service/link.go

+ 137 - 137
db/Settle.go

@@ -1,137 +1,137 @@
-package db
-
-import (
-	"context"
-	"fmt"
-	"reflect"
-	"strings"
-
-	"youngee_m_api/model/common_model"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/pack"
-	"youngee_m_api/util"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/sirupsen/logrus"
-)
-
-// GetSpecialTaskSettleList 专项任务-查询上传链接的task list
-func GetSpecialTaskSettleList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskSettleInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-
-		if tag == "settle_status" {
-			fmt.Printf("Data %+v", value.Interface() == int64(0))
-			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = 15 and settle_status = 1")
-			} else {
-				db = db.Where("task_stage = 15 and settle_status = 2")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskSettleList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-
-	// 查询链接
-	db1 := GetReadDB(ctx)
-	// db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
-	var LinkInfos []gorm_model.YounggeeLinkInfo
-	db1 = db1.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_submit= 1 AND is_ok = 1", taskIds)
-	err := db1.Find(&LinkInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
-	for _, LinkInfo := range LinkInfos {
-		LinkMap[LinkInfo.TaskID] = LinkInfo
-	}
-
-	// 查询数据
-	db2 := GetReadDB(ctx)
-	var DataInfos []gorm_model.YounggeeDataInfo
-	db2 = db2.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_submit= 1 AND is_ok = 1", taskIds)
-	err = db2.Find(&DataInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
-	for _, DataInfo := range DataInfos {
-		DataMap[DataInfo.TaskID] = DataInfo
-	}
-	// 查询总数
-	var totalData int64
-	if err := db2.Count(&totalData).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskSettleList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskSettles []*http_model.SpecialTaskSettle
-	var taskSettles []*http_model.SpecialTaskSettleInfo
-	var newTaskSettles []*http_model.SpecialTaskSettleInfo
-	for _, taskId := range taskIds {
-		TaskSettle := new(http_model.SpecialTaskSettle)
-		TaskSettle.Talent = taskMap[taskId]
-		TaskSettle.Data = DataMap[taskId]
-		TaskSettle.Link = LinkMap[taskId]
-		TaskSettles = append(TaskSettles, TaskSettle)
-	}
-
-	taskSettles = pack.SpecialTaskSettleToTaskInfo(TaskSettles)
-
-	for _, v := range taskSettles {
-		if platform_nickname == "" {
-			newTaskSettles = append(newTaskSettles, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskSettles = append(newTaskSettles, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskSettles = append(newTaskSettles, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskSettles, totalTask, nil
-}
+package db
+
+import (
+	"context"
+	"fmt"
+	"reflect"
+	"strings"
+
+	"youngee_m_api/model/common_model"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/pack"
+	"youngee_m_api/util"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/sirupsen/logrus"
+)
+
+// GetSpecialTaskSettleList 专项任务-查询上传链接的task list
+func GetSpecialTaskSettleList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskSettleInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+
+		if tag == "settle_status" {
+			fmt.Printf("Data %+v", value.Interface() == int64(0))
+			if value.Interface() == int64(0) {
+				db = db.Where("task_stage = 15 and settle_status = 1")
+			} else {
+				db = db.Where("task_stage = 15 and settle_status = 2")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskSettleList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+
+	// 查询链接
+	db1 := GetReadDB(ctx)
+	// db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
+	var LinkInfos []gorm_model.YounggeeLinkInfo
+	db1 = db1.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_submit= 1 AND is_ok = 1", taskIds)
+	err := db1.Find(&LinkInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
+	for _, LinkInfo := range LinkInfos {
+		LinkMap[LinkInfo.TaskID] = LinkInfo
+	}
+
+	// 查询数据
+	db2 := GetReadDB(ctx)
+	var DataInfos []gorm_model.YounggeeDataInfo
+	db2 = db2.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_submit= 1 AND is_ok = 1", taskIds)
+	err = db2.Find(&DataInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
+	for _, DataInfo := range DataInfos {
+		DataMap[DataInfo.TaskID] = DataInfo
+	}
+	// 查询总数
+	var totalData int64
+	if err := db2.Count(&totalData).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskSettleList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskSettles []*http_model.SpecialTaskSettle
+	var taskSettles []*http_model.SpecialTaskSettleInfo
+	var newTaskSettles []*http_model.SpecialTaskSettleInfo
+	for _, taskId := range taskIds {
+		TaskSettle := new(http_model.SpecialTaskSettle)
+		TaskSettle.Talent = taskMap[taskId]
+		TaskSettle.Data = DataMap[taskId]
+		TaskSettle.Link = LinkMap[taskId]
+		TaskSettles = append(TaskSettles, TaskSettle)
+	}
+
+	taskSettles = pack.SpecialTaskSettleToTaskInfo(TaskSettles)
+
+	for _, v := range taskSettles {
+		if platform_nickname == "" {
+			newTaskSettles = append(newTaskSettles, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskSettles = append(newTaskSettles, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskSettles = append(newTaskSettles, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskSettles, totalTask, nil
+}

+ 22 - 22
db/auto_task.go

@@ -1,22 +1,22 @@
-package db
-
-import (
-	"context"
-	"youngee_m_api/model/gorm_model"
-
-	log "github.com/sirupsen/logrus"
-)
-
-func GetLastAutoTaskID() (int32, error) {
-	db := GetReadDB(context.Background())
-	// 查找最后一个
-	LastTask := gorm_model.InfoAutoTask{}
-	result := db.Last(&LastTask)
-	err := result.Error
-	if err != nil {
-		log.Println("DB GetLastAutoTaskID:", err)
-		return 0, err
-	}
-	//fmt.Printf("auto task %+v %+v", result, LastTask)
-	return LastTask.AutoTaskID, nil
-}
+package db
+
+import (
+	"context"
+	"youngee_m_api/model/gorm_model"
+
+	log "github.com/sirupsen/logrus"
+)
+
+func GetLastAutoTaskID() (int, error) {
+	db := GetReadDB(context.Background())
+	// 查找最后一个
+	LastTask := gorm_model.InfoAutoTask{}
+	result := db.Last(&LastTask)
+	err := result.Error
+	if err != nil {
+		log.Println("DB GetLastAutoTaskID:", err)
+		return 0, err
+	}
+	//fmt.Printf("auto task %+v %+v", result, LastTask)
+	return LastTask.AutoTaskID, nil
+}

+ 34 - 51
db/data.go

@@ -60,8 +60,8 @@ func GetTaskDataList(ctx context.Context, projectID string, pageSize, pageNum in
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 
 	// 查询链接
@@ -150,31 +150,14 @@ func GetTaskDataList(ctx context.Context, projectID string, pageSize, pageNum in
 	return newTaskDatas, totalTask, nil
 }
 
-//// DataOpinion 提交意见
-//func DataOpinion(ctx context.Context, TaskID string, ReviseOpinion string) error {
-//	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}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 3}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Data db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 13}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Data db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	return nil
-//}
-
 // 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -205,26 +188,14 @@ func DataOpinion(ctx context.Context, TaskID string, ReviseOpinion string, opera
 	return nil
 }
 
-//// AcceptData 同意数据-结案
-//func AcceptData(ctx context.Context, TaskIDs []string) error {
-//	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()}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Data db] Update YounggeeDataInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Data db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	return nil
-//}
-
 // AcceptData 同意数据-结案
-func AcceptData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int) error {
+func AcceptData(ctx context.Context, TaskIDs []string, operatorid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -233,9 +204,13 @@ func AcceptData(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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -311,8 +286,8 @@ func GetSpecialTaskDataList(ctx context.Context, projectID string, pageSize, pag
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 
 	// 查询链接
@@ -399,9 +374,13 @@ func GetSpecialTaskDataList(ctx context.Context, projectID string, pageSize, pag
 }
 
 // RejectData 拒绝数据-结案
-func RejectData(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func RejectData(ctx context.Context, TaskIDs []string, operatorid string, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -433,9 +412,13 @@ func RejectData(ctx context.Context, TaskIDs []string, operatorid string, operat
 }
 
 // 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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

+ 859 - 859
db/default.go

@@ -1,859 +1,859 @@
-package db
-
-import (
-	"context"
-	"fmt"
-	"reflect"
-	"strings"
-	"time"
-	"youngee_m_api/consts"
-	"youngee_m_api/model/common_model"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/pack"
-	"youngee_m_api/util"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/sirupsen/logrus"
-	"gorm.io/gorm"
-)
-
-func CountDefaultNum(ctx context.Context) (error, *http_model.CountNumOfDefaultsResponse) {
-	db := GetReadDB(ctx)
-	var contractInfos []gorm_model.YoungeeContractInfo
-	err := db.Debug().Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 3").Find(&contractInfos).Error
-	if err != nil {
-		return err, nil
-	}
-	DraftDefaultNum, ScriptDefaultNum, LinkDefaultNum, DataDefaultNum := 0, 0, 0, 0
-	for _, contractInfo := range contractInfos {
-		if contractInfo.BreakType == 1 {
-			ScriptDefaultNum++
-		} else if contractInfo.BreakType == 2 {
-			DraftDefaultNum++
-		} else if contractInfo.BreakType == 3 {
-			LinkDefaultNum++
-		} else {
-			DataDefaultNum++
-		}
-	}
-	data := &http_model.CountNumOfDefaultsResponse{}
-	data.ScriptDefaultNum = int32(ScriptDefaultNum)
-	data.DraftDefaultNum = int32(DraftDefaultNum)
-	data.LinkDefaultNum = int32(LinkDefaultNum)
-	data.DataDefaultNum = int32(DataDefaultNum)
-	return nil, data
-}
-
-func BreachPending(ctx context.Context, pageSize, pageNum int32, req *http_model.BreachPendingRequest) (*http_model.BreachPendingData, error) {
-	db := GetReadDB(ctx)
-	var contractInfos []*gorm_model.YoungeeContractInfo
-	db = db.Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 3")
-	if req.DefaultType != 0 {
-		db = db.Where("break_type = ?", req.DefaultType)
-	}
-	if req.TaskId != "" {
-		db = db.Debug().Where("task_id = ?", req.TaskId)
-	}
-	var findProjectIds []int64
-	if req.ProjectName != "" {
-		db1 := GetReadDB(ctx)
-		db1.Model(gorm_model.ProjectInfo{}).Select("project_id").Where("project_name = ?", req.ProjectName).Find(&findProjectIds)
-		var findTaskIds []int
-		db2 := GetReadDB(ctx)
-		db2.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id IN ?", findProjectIds).Find(&findTaskIds)
-		db = db.Where("task_id IN ?", findTaskIds)
-	}
-	// 查询总数
-	var total int64
-	if err := db.Count(&total).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[BreachPending] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("terminate_at").Limit(int(limit)).Offset(int(offset)).Find(&contractInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[BreachPending] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	var taskIds []string
-	for _, contractInfo := range contractInfos {
-		taskIds = append(taskIds, contractInfo.TaskID)
-	}
-	taskIds = util.RemoveStrRepByMap(taskIds)
-	taskIdToProjectMap := make(map[string]string)
-	taskIdToTalentIdMap := make(map[string]string)
-	taskIdToTaskInfoMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	var projectIds []string
-	for _, taskId := range taskIds {
-		db1 := GetReadDB(ctx)
-		var taskInfo gorm_model.YoungeeTaskInfo
-		db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
-		taskIdToProjectMap[taskId] = taskInfo.ProjectId
-		taskIdToTalentIdMap[taskId] = taskInfo.TalentId
-		taskIdToTaskInfoMap[taskId] = taskInfo
-		projectIds = append(projectIds, taskInfo.ProjectId)
-	}
-	projectIds = util.RemoveStrRepByMap(projectIds)
-	var enterpriseIds []string
-	projectIdToProjectInfoMap := make(map[string]gorm_model.ProjectInfo)
-	for _, projectId := range projectIds {
-		db1 := GetReadDB(ctx)
-		projectInfo := gorm_model.ProjectInfo{}
-		db1.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", projectId).Find(&projectInfo)
-		projectIdToProjectInfoMap[projectInfo.ProjectID] = projectInfo
-		enterpriseIds = append(enterpriseIds, projectInfo.EnterpriseID)
-	}
-	enterpriseIds = util.RemoveStrRepByMap(enterpriseIds)
-	enterpriseIdToUserId := make(map[string]int64)
-	var userIds []int64
-	for _, enterpriseId := range enterpriseIds {
-		db1 := GetReadDB(ctx)
-		var userId int64
-		db1.Model(gorm_model.Enterprise{}).Select("user_id").Where("enterprise_id = ?", enterpriseId).Find(&userId)
-		enterpriseIdToUserId[enterpriseId] = userId
-		userIds = append(userIds, userId)
-	}
-	userIdToUserPhone := make(map[int64]string)
-	for _, userId := range userIds {
-		db1 := GetReadDB(ctx)
-		var userPhone string
-		db1.Model(gorm_model.YounggeeUser{}).Select("phone").Where("id = ?", userId).Find(&userPhone)
-		userIdToUserPhone[userId] = userPhone
-	}
-	talentIdToTalentPhoneMap := make(map[string]string)
-	for _, v := range taskIdToTalentIdMap {
-		if len(talentIdToTalentPhoneMap) == 0 {
-			db1 := GetReadDB(ctx)
-			var talentPhoneNumber string
-			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
-			talentIdToTalentPhoneMap[v] = talentPhoneNumber
-		}
-		if _, ok := talentIdToTalentPhoneMap[v]; !ok {
-			db1 := GetReadDB(ctx)
-			var talentPhoneNumber string
-			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
-			talentIdToTalentPhoneMap[v] = talentPhoneNumber
-		}
-	}
-	taskIdToDefaultInfo := make(map[string]string)
-	if req.DefaultType == 4 {
-		for _, taskId := range taskIds {
-			db1 := GetReadDB(ctx)
-			var link string
-			db1.Debug().Model(gorm_model.YounggeeLinkInfo{}).Select("link_url").Where("task_id = ? AND is_ok = 1", taskId).Find(&link)
-			taskIdToDefaultInfo[taskId] = link
-		}
-	}
-	var BreachPendingPreviews []*http_model.BreachPendingPreview
-	for _, contractInfo := range contractInfos {
-		fmt.Println(contractInfo.TerminateAt)
-		BreachPendingPreview := new(http_model.BreachPendingPreview)
-		BreachPendingPreview.ContractId = int32(contractInfo.ContractID)
-		BreachPendingPreview.ProjectId = taskIdToProjectMap[contractInfo.TaskID]
-		BreachPendingPreview.UserId = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID
-		BreachPendingPreview.ProjectName = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].ProjectName
-		BreachPendingPreview.UserPhone = userIdToUserPhone[enterpriseIdToUserId[projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID]]
-		BreachPendingPreview.TaskId = contractInfo.TaskID
-		BreachPendingPreview.TalentId = taskIdToTalentIdMap[contractInfo.TaskID]
-		BreachPendingPreview.TalentPhone = talentIdToTalentPhoneMap[taskIdToTalentIdMap[contractInfo.TaskID]]
-		BreachPendingPreview.LinkInfo = taskIdToDefaultInfo[contractInfo.TaskID]
-		BreachPendingPreview.Price = taskIdToTaskInfoMap[contractInfo.TaskID].AllPayment
-		BreachPendingPreview.SettlementAmount = taskIdToTaskInfoMap[contractInfo.TaskID].RealPayment
-		BreachPendingPreview.DefaultAt = conv.MustString(contractInfo.BreakAt, "")[0:19]
-		BreachPendingPreview.TerminateAt = conv.MustString(contractInfo.TerminateAt, "")[0:19]
-		BreachPendingPreviews = append(BreachPendingPreviews, BreachPendingPreview)
-	}
-	var BreachPendingData http_model.BreachPendingData
-	BreachPendingData.BreachPendingPreview = BreachPendingPreviews
-	BreachPendingData.Total = total
-	return &BreachPendingData, nil
-}
-
-func ContractBreach(ctx context.Context, req *http_model.ContractBreachRequest) error {
-	db := GetReadDB(ctx)
-	var breakType int
-	db.Model(gorm_model.YoungeeContractInfo{}).Select("break_type").Where("contract_id IN ?", req.ContractIds).Find(&breakType)
-	t := time.Now()
-	err := db.Debug().Where("contract_id IN ?", req.ContractIds).Updates(&gorm_model.YoungeeContractInfo{DefaultStatus: int(req.DefaultStatus), HandleAt: &t}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[ContractBreach] error query mysql total, err:%+v", err)
-		return err
-	}
-	var taskIds []string
-	db.Model(gorm_model.YoungeeContractInfo{}).Select("task_id").Where("contract_id IN ?", req.ContractIds).Find(&taskIds)
-	for _, taskId := range taskIds {
-		if req.DefaultStatus == 5 {
-			var taskInfo gorm_model.YoungeeTaskInfo
-			var enterpriseId string
-
-			db1 := GetReadDB(ctx)
-			db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
-
-			db2 := GetReadDB(ctx)
-			db2.Model(gorm_model.ProjectInfo{}).Select("enterprise_id").Where("project_id = ?", taskInfo.ProjectId).Find(&enterpriseId)
-
-			db3 := GetReadDB(ctx)
-			err := db3.Model(gorm_model.Enterprise{}).Where("enterprise_id = ?", enterpriseId).Updates(
-				map[string]interface{}{
-					"frozen_balance":    gorm.Expr("frozen_balance - ?", taskInfo.RealPayment),
-					"available_balance": gorm.Expr("available_balance + ?", taskInfo.RealPayment)}).Error
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] error update Enterprise, err:%+v", err)
-				return err
-			}
-
-			db = GetReadDB(ctx)
-			db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectId, taskInfo.StrategyId)
-			err = db.Updates(map[string]interface{}{
-				"total_offer": gorm.Expr("total_offer + ?", taskInfo.RealPayment)}).Error
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] error update RecruitStrategy, err:%+v", err)
-				return err
-			}
-
-			err = CreateTaskLog(context.Background(), taskInfo.TaskId, "解约时间")
-			if err != nil {
-				logrus.WithContext(context.Background()).Errorf("[ContractBreach] call CreateTaskLog error,err:%+v", err)
-			}
-
-			db4 := GetReadDB(ctx)
-			if breakType == 1 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
-					map[string]interface{}{
-						"cur_default_type":  2,
-						"task_stage":        16,
-						"script_break_rate": 0}).Error
-				taskInfo.ScriptBreakRate = 0
-			} else if breakType == 2 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
-					map[string]interface{}{
-						"cur_default_type":  4,
-						"task_stage":        16,
-						"sketch_break_rate": 0}).Error
-				taskInfo.SketchBreakRate = 0
-			} else if breakType == 3 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
-					map[string]interface{}{
-						"cur_default_type": 6,
-						"task_stage":       16,
-						"link_break_rate":  0}).Error
-				taskInfo.LinkBreakRate = 0
-			} else if breakType == 4 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
-					map[string]interface{}{
-						"cur_default_type": 8,
-						"task_stage":       16,
-						"data_break_rate":  0}).Error
-				taskInfo.DataBreakRate = 0
-			}
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
-				return err
-			}
-			settleAmount := taskInfo.TaskReward * (1.0 - float64(taskInfo.LinkBreakRate+taskInfo.DataBreakRate+taskInfo.SketchBreakRate+taskInfo.ScriptBreakRate+taskInfo.ErrBreakRate)/100)
-			if settleAmount <= 0 {
-				settleAmount = 0.0
-			}
-			db5 := GetReadDB(ctx)
-			err = db5.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
-				map[string]interface{}{"settle_amount": settleAmount, "withdraw_status": 2, "complete_status": 4, "complete_date": time.Now()}).Error
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
-				return err
-			}
-
-			err = SetProjectFinish(context.Background(), taskInfo.ProjectId)
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] call SetProjectFinish error, err:%+v", err)
-				return err
-			}
-		} else {
-			db4 := GetReadDB(ctx)
-			if breakType == 1 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 1}).Error
-			} else if breakType == 2 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 3}).Error
-			} else if breakType == 3 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 5}).Error
-			} else if breakType == 4 {
-				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 7}).Error
-			}
-			if err != nil {
-				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
-				return err
-			}
-		}
-	}
-	if req.DefaultStatus == 5 {
-		err = SetTalentIncome(context.Background(), taskIds)
-		if err != nil {
-			logrus.WithContext(ctx).Errorf("[ContractBreach] call SetTalentIncome error, err:%+v", err)
-			return err
-		}
-	}
-	return nil
-}
-
-func GetSketchInfoByTaskId(ctx context.Context, request *http_model.GetSketchInfoByTaskIdRequest) (*http_model.SketchInfoResponse, error) {
-	db := GetReadDB(ctx)
-	var sketchInfo gorm_model.YounggeeSketchInfo
-	db.Debug().Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? AND is_ok = 1", request.TaskId).Find(&sketchInfo)
-	db2 := GetReadDB(ctx)
-	sketchPhotoInfo := gorm_model.YounggeeSketchPhoto{}
-	db2.Debug().Model(gorm_model.YounggeeSketchPhoto{}).Where("sketch_id = ?", sketchInfo.SketchID).Find(&sketchPhotoInfo)
-	data := new(http_model.SketchInfoResponse)
-	data.Type = int32(sketchPhotoInfo.Symbol)
-	data.PhotoUrl = sketchPhotoInfo.PhotoUrl
-	data.Content = sketchInfo.Content
-	data.Title = sketchInfo.Title
-	return data, nil
-}
-
-func BreachHandled(ctx context.Context, pageSize, pageNum int32, req *http_model.BreachHandledRequest, conditions *common_model.BreachHandledConditions) (*http_model.BreachHandledData, error) {
-	db := GetReadDB(ctx)
-	var contractInfos []*gorm_model.YoungeeContractInfo
-	db = db.Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 4 OR default_status = 5")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if !util.IsBlank(value) {
-			db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-		}
-	}
-	if req.TaskId != "" {
-		db = db.Where("task_id = ?", req.TaskId)
-	}
-	var findProjectIds []string
-	if req.ProjectName != "" {
-		db1 := GetReadDB(ctx)
-		db1.Model(gorm_model.ProjectInfo{}).Select("project_id").Where("project_name = ?", req.ProjectName).Find(&findProjectIds)
-		var findTaskIds []string
-		db2 := GetReadDB(ctx)
-		db2.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id IN ?", findProjectIds).Find(&findTaskIds)
-		db = db.Where("task_id IN ?", findTaskIds)
-	}
-	// 查询总数
-	var total int64
-	if err := db.Count(&total).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[BreachHandled] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("terminate_at").Limit(int(limit)).Offset(int(offset)).Find(&contractInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[BreachHandled] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-
-	var taskIds []string
-	for _, contractInfo := range contractInfos {
-		taskIds = append(taskIds, contractInfo.TaskID)
-	}
-	taskIds = util.RemoveStrRepByMap(taskIds)
-	taskIdToProjectMap := make(map[string]string)
-	taskIdToTalentIdMap := make(map[string]string)
-	taskIdToTaskInfoMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	var projectIds []string
-	for _, taskId := range taskIds {
-		db1 := GetReadDB(ctx)
-		var taskInfo gorm_model.YoungeeTaskInfo
-		db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
-		taskIdToProjectMap[taskId] = taskInfo.ProjectId
-		taskIdToTalentIdMap[taskId] = taskInfo.TalentId
-		taskIdToTaskInfoMap[taskId] = taskInfo
-		projectIds = append(projectIds, taskInfo.ProjectId)
-	}
-	projectIds = util.RemoveStrRepByMap(projectIds)
-	var enterpriseIds []string
-	projectIdToProjectInfoMap := make(map[string]gorm_model.ProjectInfo)
-	for _, projectId := range projectIds {
-		db1 := GetReadDB(ctx)
-		projectInfo := gorm_model.ProjectInfo{}
-		db1.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", projectId).Find(&projectInfo)
-		projectIdToProjectInfoMap[projectInfo.ProjectID] = projectInfo
-		enterpriseIds = append(enterpriseIds, projectInfo.EnterpriseID)
-	}
-	enterpriseIds = util.RemoveStrRepByMap(enterpriseIds)
-	enterpriseIdToUserId := make(map[string]int64)
-	var userIds []int64
-	for _, enterpriseId := range enterpriseIds {
-		db1 := GetReadDB(ctx)
-		var userId int64
-		db1.Model(gorm_model.Enterprise{}).Select("user_id").Where("enterprise_id = ?", enterpriseId).Find(&userId)
-		enterpriseIdToUserId[enterpriseId] = userId
-		userIds = append(userIds, userId)
-	}
-	userIdToUserPhone := make(map[int64]string)
-	for _, userId := range userIds {
-		db1 := GetReadDB(ctx)
-		var userPhone string
-		db1.Model(gorm_model.YounggeeUser{}).Select("phone").Where("id = ?", userId).Find(&userPhone)
-		userIdToUserPhone[userId] = userPhone
-	}
-	talentIdToTalentPhoneMap := make(map[string]string)
-	for _, v := range taskIdToTalentIdMap {
-		if len(talentIdToTalentPhoneMap) == 0 {
-			db1 := GetReadDB(ctx)
-			var talentPhoneNumber string
-			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
-			talentIdToTalentPhoneMap[v] = talentPhoneNumber
-		}
-		if _, ok := talentIdToTalentPhoneMap[v]; !ok {
-			db1 := GetReadDB(ctx)
-			var talentPhoneNumber string
-			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
-			talentIdToTalentPhoneMap[v] = talentPhoneNumber
-		}
-	}
-	var BreachHandledPreviews []*http_model.BreachHandledPreview
-	for _, contractInfo := range contractInfos {
-		BreachHandledPreview := new(http_model.BreachHandledPreview)
-		BreachHandledPreview.ContractId = int32(contractInfo.ContractID)
-		BreachHandledPreview.ProjectId = taskIdToProjectMap[contractInfo.TaskID]
-		BreachHandledPreview.UserId = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID
-		BreachHandledPreview.ProjectName = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].ProjectName
-		BreachHandledPreview.UserPhone = userIdToUserPhone[enterpriseIdToUserId[projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID]]
-		BreachHandledPreview.TaskId = contractInfo.TaskID
-		BreachHandledPreview.TalentId = taskIdToTalentIdMap[contractInfo.TaskID]
-		BreachHandledPreview.TalentPhone = talentIdToTalentPhoneMap[taskIdToTalentIdMap[contractInfo.TaskID]]
-		BreachHandledPreview.TerminateReason = consts.GetBreakType(contractInfo.BreakType)
-		BreachHandledPreview.HandleResult = consts.GetHandleResult(contractInfo.DefaultStatus)
-		BreachHandledPreview.HandleAt = conv.MustString(contractInfo.HandleAt, "")[0:19]
-		BreachHandledPreviews = append(BreachHandledPreviews, BreachHandledPreview)
-	}
-	var BreachHandledData http_model.BreachHandledData
-	BreachHandledData.BreachHandledPreview = BreachHandledPreviews
-	BreachHandledData.Total = total
-	return &BreachHandledData, nil
-}
-
-func GetTaskDefaultReviewList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskDefaultReviewInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "default_status" {
-			fmt.Printf("default %+v", value.Interface() == int64(0))
-			if value.Interface() == int64(0) {
-				db = db.Where("cur_default_type = 1")
-			} else if value.Interface() == int64(1) {
-				db = db.Where("cur_default_type = 3")
-			} else if value.Interface() == int64(2) {
-				db = db.Where("cur_default_type = 5")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
-
-	var DefaultReviewInfos []gorm_model.YoungeeContractInfo
-	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 4)", taskIds)
-	err := db1.Find(&DefaultReviewInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	DefaultReviewMap := make(map[string]gorm_model.YoungeeContractInfo)
-	for _, DefaultReviewInfo := range DefaultReviewInfos {
-		DefaultReviewMap[DefaultReviewInfo.TaskID] = DefaultReviewInfo
-	}
-	// 查询总数
-	var totalDefaultReview int64
-	if err := db1.Count(&totalDefaultReview).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskDefaultReviews []*http_model.TaskDefaultReview
-	var taskDefaultReviews []*http_model.TaskDefaultReviewInfo
-	var newTaskDefaultReviews []*http_model.TaskDefaultReviewInfo
-	for _, taskId := range taskIds {
-		TaskDefaultReview := new(http_model.TaskDefaultReview)
-		TaskDefaultReview.Talent = taskMap[taskId]
-		TaskDefaultReview.Default = DefaultReviewMap[taskId]
-		TaskDefaultReviews = append(TaskDefaultReviews, TaskDefaultReview)
-	}
-
-	taskDefaultReviews = pack.TaskDefaultReviewToTaskInfo(TaskDefaultReviews)
-
-	for _, v := range taskDefaultReviews {
-		if platform_nickname == "" {
-			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskDefaultReviews, totalTask, nil
-}
-
-func GetTaskDefaultDataList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskDefaultDataInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "default_status" {
-			if value.Interface() == int64(3) {
-				db = db.Where("cur_default_type = 7")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
-
-	var DefaultDataInfos []gorm_model.YoungeeContractInfo
-	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 4)", taskIds)
-	err := db1.Find(&DefaultDataInfos).Error
-	DefaultDataMap := make(map[string]gorm_model.YoungeeContractInfo)
-	for _, DefaultDataInfo := range DefaultDataInfos {
-		DefaultDataMap[DefaultDataInfo.TaskID] = DefaultDataInfo
-	}
-
-	var LinkInfos []gorm_model.YounggeeLinkInfo
-	db2 := GetReadDB(ctx)
-	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
-	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
-	for _, LinkInfo := range LinkInfos {
-		LinkMap[LinkInfo.TaskID] = LinkInfo
-	}
-
-	// 查询总数
-	var totalDefaultData int64
-	if err := db2.Count(&totalDefaultData).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskDefaultDatas []*http_model.TaskDefaultData
-	var taskDefaultDatas []*http_model.TaskDefaultDataInfo
-	var newTaskDefaultDatas []*http_model.TaskDefaultDataInfo
-	for _, taskId := range taskIds {
-		TaskDefaultData := new(http_model.TaskDefaultData)
-		TaskDefaultData.Talent = taskMap[taskId]
-		TaskDefaultData.Default = DefaultDataMap[taskId]
-		TaskDefaultData.Link = LinkMap[taskId]
-		TaskDefaultDatas = append(TaskDefaultDatas, TaskDefaultData)
-	}
-
-	taskDefaultDatas = pack.TaskDefaultDataToTaskInfo(TaskDefaultDatas)
-
-	for _, v := range taskDefaultDatas {
-		if platform_nickname == "" {
-			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskDefaultDatas, totalTask, nil
-}
-
-func GetTaskTerminatingList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskTerminatingInfo, int64, error) {
-	db := GetReadDB(ctx)
-	var taskIds1 []string
-	var totalTerminating int64
-	var TerminatingInfos []gorm_model.YoungeeContractInfo
-	db = db.Model(gorm_model.YoungeeContractInfo{})
-	err := db.Where("default_status = 3 AND project_id = ?", projectID).Find(&TerminatingInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	TerminatingMap := make(map[string]gorm_model.YoungeeContractInfo)
-	for _, TerminatingInfo := range TerminatingInfos {
-		taskIds1 = append(taskIds1, TerminatingInfo.TaskID)
-		TerminatingMap[TerminatingInfo.TaskID] = TerminatingInfo
-	}
-
-	if err := db.Count(&totalTerminating).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	db1 := GetReadDB(ctx)
-	// 查询Task表信息
-	db1 = db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_id in ?", taskIds1)
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "default_status" {
-			if value.Interface() == int64(4) {
-				db1 = db1.Where("cur_default_type = 9")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				if tag == "strategy_id" {
-					fmt.Println("strategy_id:", value.Interface())
-				}
-				db1 = db1.Debug().Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	// db1 = db1.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db1.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db1.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	var misNum int64
-	if totalTerminating > totalTask {
-		misNum = totalTerminating - totalTask
-	} else {
-		misNum = totalTask - totalTerminating
-	}
-	//logrus.Println("totalTerminating,totalTalent,misNum:", totalTerminating, totalTask, misNum)
-
-	// 查询该页数据
-	limit := pageSize + misNum
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db1.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskTerminatings []*http_model.TaskTerminating
-	var taskTerminatings []*http_model.TaskTerminatingInfo
-	var newTaskTerminatings []*http_model.TaskTerminatingInfo
-	for _, taskId := range taskIds {
-		TaskTerminating := new(http_model.TaskTerminating)
-		TaskTerminating.Talent = taskMap[taskId]
-		TaskTerminating.Default = TerminatingMap[taskId]
-		TaskTerminatings = append(TaskTerminatings, TaskTerminating)
-	}
-
-	taskTerminatings = pack.TaskTerminatingToTaskInfo(TaskTerminatings)
-
-	for _, v := range taskTerminatings {
-		if platform_nickname == "" {
-			newTaskTerminatings = append(newTaskTerminatings, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskTerminatings = append(newTaskTerminatings, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskTerminatings = append(newTaskTerminatings, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskTerminatings, totalTask, nil
-}
-
-func GetTaskTerminatedList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskTerminatedInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platformNickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "default_status" {
-			fmt.Printf("default %+v", value.Interface() == int64(0))
-			if value.Interface() == int64(5) {
-				db = db.Where("complete_status = 4")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platformNickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
-	var TerminatedInfos []gorm_model.YoungeeContractInfo
-	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 5)", taskIds)
-	err1 := db1.Find(&TerminatedInfos).Error
-	if err1 != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql find, err:%+v", err1)
-		return nil, 0, err1
-	}
-	TerminatedMap := make(map[string]gorm_model.YoungeeContractInfo)
-	for _, TerminatedInfo := range TerminatedInfos {
-		fmt.Printf("TerminatedInfo%#v", TerminatedInfo)
-		TerminatedMap[TerminatedInfo.TaskID] = TerminatedInfo
-	}
-	// 查询总数
-	var totalTerminated int64
-	if err := db1.Count(&totalTerminated).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskTerminateds []*http_model.TaskTerminated
-	var taskTerminateds []*http_model.TaskTerminatedInfo
-	var newTaskTerminateds []*http_model.TaskTerminatedInfo
-	for _, taskId := range taskIds {
-		TaskTerminated := new(http_model.TaskTerminated)
-		TaskTerminated.Talent = taskMap[taskId]
-		TaskTerminated.Default = TerminatedMap[taskId]
-		TaskTerminateds = append(TaskTerminateds, TaskTerminated)
-	}
-
-	taskTerminateds = pack.TaskTerminatedToTaskInfo(TaskTerminateds)
-
-	for _, v := range taskTerminateds {
-		if platformNickname == "" {
-			newTaskTerminateds = append(newTaskTerminateds, v)
-		} else if strings.Contains(v.PlatformNickname, platformNickname) {
-			newTaskTerminateds = append(newTaskTerminateds, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platformNickname) {
-			newTaskTerminateds = append(newTaskTerminateds, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskTerminateds, totalTask, nil
-}
+package db
+
+import (
+	"context"
+	"fmt"
+	"reflect"
+	"strings"
+	"time"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/common_model"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/pack"
+	"youngee_m_api/util"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/sirupsen/logrus"
+	"gorm.io/gorm"
+)
+
+func CountDefaultNum(ctx context.Context) (error, *http_model.CountNumOfDefaultsResponse) {
+	db := GetReadDB(ctx)
+	var contractInfos []gorm_model.YoungeeContractInfo
+	err := db.Debug().Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 3").Find(&contractInfos).Error
+	if err != nil {
+		return err, nil
+	}
+	DraftDefaultNum, ScriptDefaultNum, LinkDefaultNum, DataDefaultNum := 0, 0, 0, 0
+	for _, contractInfo := range contractInfos {
+		if contractInfo.BreakType == 1 {
+			ScriptDefaultNum++
+		} else if contractInfo.BreakType == 2 {
+			DraftDefaultNum++
+		} else if contractInfo.BreakType == 3 {
+			LinkDefaultNum++
+		} else {
+			DataDefaultNum++
+		}
+	}
+	data := &http_model.CountNumOfDefaultsResponse{}
+	data.ScriptDefaultNum = int32(ScriptDefaultNum)
+	data.DraftDefaultNum = int32(DraftDefaultNum)
+	data.LinkDefaultNum = int32(LinkDefaultNum)
+	data.DataDefaultNum = int32(DataDefaultNum)
+	return nil, data
+}
+
+func BreachPending(ctx context.Context, pageSize, pageNum int32, req *http_model.BreachPendingRequest) (*http_model.BreachPendingData, error) {
+	db := GetReadDB(ctx)
+	var contractInfos []*gorm_model.YoungeeContractInfo
+	db = db.Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 3")
+	if req.DefaultType != 0 {
+		db = db.Where("break_type = ?", req.DefaultType)
+	}
+	if req.TaskId != "" {
+		db = db.Debug().Where("task_id = ?", req.TaskId)
+	}
+	var findProjectIds []int64
+	if req.ProjectName != "" {
+		db1 := GetReadDB(ctx)
+		db1.Model(gorm_model.ProjectInfo{}).Select("project_id").Where("project_name = ?", req.ProjectName).Find(&findProjectIds)
+		var findTaskIds []int
+		db2 := GetReadDB(ctx)
+		db2.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id IN ?", findProjectIds).Find(&findTaskIds)
+		db = db.Where("task_id IN ?", findTaskIds)
+	}
+	// 查询总数
+	var total int64
+	if err := db.Count(&total).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[BreachPending] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("terminate_at").Limit(int(limit)).Offset(int(offset)).Find(&contractInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[BreachPending] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	var taskIds []string
+	for _, contractInfo := range contractInfos {
+		taskIds = append(taskIds, contractInfo.TaskID)
+	}
+	taskIds = util.RemoveStrRepByMap(taskIds)
+	taskIdToProjectMap := make(map[string]string)
+	taskIdToTalentIdMap := make(map[string]string)
+	taskIdToTaskInfoMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	var projectIds []string
+	for _, taskId := range taskIds {
+		db1 := GetReadDB(ctx)
+		var taskInfo gorm_model.YoungeeTaskInfo
+		db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
+		taskIdToProjectMap[taskId] = taskInfo.ProjectID
+		taskIdToTalentIdMap[taskId] = taskInfo.TalentID
+		taskIdToTaskInfoMap[taskId] = taskInfo
+		projectIds = append(projectIds, taskInfo.ProjectID)
+	}
+	projectIds = util.RemoveStrRepByMap(projectIds)
+	var enterpriseIds []string
+	projectIdToProjectInfoMap := make(map[string]gorm_model.ProjectInfo)
+	for _, projectId := range projectIds {
+		db1 := GetReadDB(ctx)
+		projectInfo := gorm_model.ProjectInfo{}
+		db1.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", projectId).Find(&projectInfo)
+		projectIdToProjectInfoMap[projectInfo.ProjectID] = projectInfo
+		enterpriseIds = append(enterpriseIds, projectInfo.EnterpriseID)
+	}
+	enterpriseIds = util.RemoveStrRepByMap(enterpriseIds)
+	enterpriseIdToUserId := make(map[string]int64)
+	var userIds []int64
+	for _, enterpriseId := range enterpriseIds {
+		db1 := GetReadDB(ctx)
+		var userId int64
+		db1.Model(gorm_model.Enterprise{}).Select("user_id").Where("enterprise_id = ?", enterpriseId).Find(&userId)
+		enterpriseIdToUserId[enterpriseId] = userId
+		userIds = append(userIds, userId)
+	}
+	userIdToUserPhone := make(map[int64]string)
+	for _, userId := range userIds {
+		db1 := GetReadDB(ctx)
+		var userPhone string
+		db1.Model(gorm_model.YounggeeUser{}).Select("phone").Where("id = ?", userId).Find(&userPhone)
+		userIdToUserPhone[userId] = userPhone
+	}
+	talentIdToTalentPhoneMap := make(map[string]string)
+	for _, v := range taskIdToTalentIdMap {
+		if len(talentIdToTalentPhoneMap) == 0 {
+			db1 := GetReadDB(ctx)
+			var talentPhoneNumber string
+			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
+			talentIdToTalentPhoneMap[v] = talentPhoneNumber
+		}
+		if _, ok := talentIdToTalentPhoneMap[v]; !ok {
+			db1 := GetReadDB(ctx)
+			var talentPhoneNumber string
+			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
+			talentIdToTalentPhoneMap[v] = talentPhoneNumber
+		}
+	}
+	taskIdToDefaultInfo := make(map[string]string)
+	if req.DefaultType == 4 {
+		for _, taskId := range taskIds {
+			db1 := GetReadDB(ctx)
+			var link string
+			db1.Debug().Model(gorm_model.YounggeeLinkInfo{}).Select("link_url").Where("task_id = ? AND is_ok = 1", taskId).Find(&link)
+			taskIdToDefaultInfo[taskId] = link
+		}
+	}
+	var BreachPendingPreviews []*http_model.BreachPendingPreview
+	for _, contractInfo := range contractInfos {
+		fmt.Println(contractInfo.TerminateAt)
+		BreachPendingPreview := new(http_model.BreachPendingPreview)
+		BreachPendingPreview.ContractId = int32(contractInfo.ContractID)
+		BreachPendingPreview.ProjectId = taskIdToProjectMap[contractInfo.TaskID]
+		BreachPendingPreview.UserId = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID
+		BreachPendingPreview.ProjectName = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].ProjectName
+		BreachPendingPreview.UserPhone = userIdToUserPhone[enterpriseIdToUserId[projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID]]
+		BreachPendingPreview.TaskId = contractInfo.TaskID
+		BreachPendingPreview.TalentId = taskIdToTalentIdMap[contractInfo.TaskID]
+		BreachPendingPreview.TalentPhone = talentIdToTalentPhoneMap[taskIdToTalentIdMap[contractInfo.TaskID]]
+		BreachPendingPreview.LinkInfo = taskIdToDefaultInfo[contractInfo.TaskID]
+		BreachPendingPreview.Price = taskIdToTaskInfoMap[contractInfo.TaskID].AllPayment
+		BreachPendingPreview.SettlementAmount = taskIdToTaskInfoMap[contractInfo.TaskID].RealPayment
+		BreachPendingPreview.DefaultAt = conv.MustString(contractInfo.BreakAt, "")[0:19]
+		BreachPendingPreview.TerminateAt = conv.MustString(contractInfo.TerminateAt, "")[0:19]
+		BreachPendingPreviews = append(BreachPendingPreviews, BreachPendingPreview)
+	}
+	var BreachPendingData http_model.BreachPendingData
+	BreachPendingData.BreachPendingPreview = BreachPendingPreviews
+	BreachPendingData.Total = total
+	return &BreachPendingData, nil
+}
+
+func ContractBreach(ctx context.Context, req *http_model.ContractBreachRequest) error {
+	db := GetReadDB(ctx)
+	var breakType int
+	db.Model(gorm_model.YoungeeContractInfo{}).Select("break_type").Where("contract_id IN ?", req.ContractIds).Find(&breakType)
+	t := time.Now()
+	err := db.Debug().Where("contract_id IN ?", req.ContractIds).Updates(&gorm_model.YoungeeContractInfo{DefaultStatus: int(req.DefaultStatus), HandleAt: &t}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[ContractBreach] error query mysql total, err:%+v", err)
+		return err
+	}
+	var taskIds []string
+	db.Model(gorm_model.YoungeeContractInfo{}).Select("task_id").Where("contract_id IN ?", req.ContractIds).Find(&taskIds)
+	for _, taskId := range taskIds {
+		if req.DefaultStatus == 5 {
+			var taskInfo gorm_model.YoungeeTaskInfo
+			var enterpriseId string
+
+			db1 := GetReadDB(ctx)
+			db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
+
+			db2 := GetReadDB(ctx)
+			db2.Model(gorm_model.ProjectInfo{}).Select("enterprise_id").Where("project_id = ?", taskInfo.ProjectID).Find(&enterpriseId)
+
+			db3 := GetReadDB(ctx)
+			err := db3.Model(gorm_model.Enterprise{}).Where("enterprise_id = ?", enterpriseId).Updates(
+				map[string]interface{}{
+					"frozen_balance":    gorm.Expr("frozen_balance - ?", taskInfo.RealPayment),
+					"available_balance": gorm.Expr("available_balance + ?", taskInfo.RealPayment)}).Error
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] error update Enterprise, err:%+v", err)
+				return err
+			}
+
+			db = GetReadDB(ctx)
+			db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectID, taskInfo.StrategyID)
+			err = db.Updates(map[string]interface{}{
+				"total_offer": gorm.Expr("total_offer + ?", taskInfo.RealPayment)}).Error
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] error update RecruitStrategy, err:%+v", err)
+				return err
+			}
+
+			err = CreateTaskLog(context.Background(), taskInfo.TaskID, "解约时间")
+			if err != nil {
+				logrus.WithContext(context.Background()).Errorf("[ContractBreach] call CreateTaskLog error,err:%+v", err)
+			}
+
+			db4 := GetReadDB(ctx)
+			if breakType == 1 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
+					map[string]interface{}{
+						"cur_default_type":  2,
+						"task_stage":        16,
+						"script_break_rate": 0}).Error
+				taskInfo.ScriptBreakRate = 0
+			} else if breakType == 2 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
+					map[string]interface{}{
+						"cur_default_type":  4,
+						"task_stage":        16,
+						"sketch_break_rate": 0}).Error
+				taskInfo.SketchBreakRate = 0
+			} else if breakType == 3 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
+					map[string]interface{}{
+						"cur_default_type": 6,
+						"task_stage":       16,
+						"link_break_rate":  0}).Error
+				taskInfo.LinkBreakRate = 0
+			} else if breakType == 4 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
+					map[string]interface{}{
+						"cur_default_type": 8,
+						"task_stage":       16,
+						"data_break_rate":  0}).Error
+				taskInfo.DataBreakRate = 0
+			}
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
+				return err
+			}
+			settleAmount := taskInfo.TaskReward * (1.0 - float64(taskInfo.LinkBreakRate+taskInfo.DataBreakRate+taskInfo.SketchBreakRate+taskInfo.ScriptBreakRate+taskInfo.ErrBreakRate)/100)
+			if settleAmount <= 0 {
+				settleAmount = 0.0
+			}
+			db5 := GetReadDB(ctx)
+			err = db5.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(
+				map[string]interface{}{"settle_amount": settleAmount, "withdraw_status": 2, "complete_status": 4, "complete_date": time.Now()}).Error
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
+				return err
+			}
+
+			err = SetProjectFinish(context.Background(), taskInfo.ProjectID)
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] call SetProjectFinish error, err:%+v", err)
+				return err
+			}
+		} else {
+			db4 := GetReadDB(ctx)
+			if breakType == 1 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 1}).Error
+			} else if breakType == 2 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 3}).Error
+			} else if breakType == 3 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 5}).Error
+			} else if breakType == 4 {
+				err = db4.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Updates(gorm_model.YoungeeTaskInfo{CurDefaultType: 7}).Error
+			}
+			if err != nil {
+				logrus.WithContext(ctx).Errorf("[ContractBreach] error update YoungeeTaskInfo, err:%+v", err)
+				return err
+			}
+		}
+	}
+	if req.DefaultStatus == 5 {
+		err = SetTalentIncome(context.Background(), taskIds)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[ContractBreach] call SetTalentIncome error, err:%+v", err)
+			return err
+		}
+	}
+	return nil
+}
+
+func GetSketchInfoByTaskId(ctx context.Context, request *http_model.GetSketchInfoByTaskIdRequest) (*http_model.SketchInfoResponse, error) {
+	db := GetReadDB(ctx)
+	var sketchInfo gorm_model.YounggeeSketchInfo
+	db.Debug().Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? AND is_ok = 1", request.TaskId).Find(&sketchInfo)
+	db2 := GetReadDB(ctx)
+	sketchPhotoInfo := gorm_model.YounggeeSketchPhoto{}
+	db2.Debug().Model(gorm_model.YounggeeSketchPhoto{}).Where("sketch_id = ?", sketchInfo.SketchID).Find(&sketchPhotoInfo)
+	data := new(http_model.SketchInfoResponse)
+	data.Type = int32(sketchPhotoInfo.Symbol)
+	data.PhotoUrl = sketchPhotoInfo.PhotoUrl
+	data.Content = sketchInfo.Content
+	data.Title = sketchInfo.Title
+	return data, nil
+}
+
+func BreachHandled(ctx context.Context, pageSize, pageNum int32, req *http_model.BreachHandledRequest, conditions *common_model.BreachHandledConditions) (*http_model.BreachHandledData, error) {
+	db := GetReadDB(ctx)
+	var contractInfos []*gorm_model.YoungeeContractInfo
+	db = db.Model(gorm_model.YoungeeContractInfo{}).Where("default_status = 4 OR default_status = 5")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if !util.IsBlank(value) {
+			db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+		}
+	}
+	if req.TaskId != "" {
+		db = db.Where("task_id = ?", req.TaskId)
+	}
+	var findProjectIds []string
+	if req.ProjectName != "" {
+		db1 := GetReadDB(ctx)
+		db1.Model(gorm_model.ProjectInfo{}).Select("project_id").Where("project_name = ?", req.ProjectName).Find(&findProjectIds)
+		var findTaskIds []string
+		db2 := GetReadDB(ctx)
+		db2.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id IN ?", findProjectIds).Find(&findTaskIds)
+		db = db.Where("task_id IN ?", findTaskIds)
+	}
+	// 查询总数
+	var total int64
+	if err := db.Count(&total).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[BreachHandled] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("terminate_at").Limit(int(limit)).Offset(int(offset)).Find(&contractInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[BreachHandled] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+
+	var taskIds []string
+	for _, contractInfo := range contractInfos {
+		taskIds = append(taskIds, contractInfo.TaskID)
+	}
+	taskIds = util.RemoveStrRepByMap(taskIds)
+	taskIdToProjectMap := make(map[string]string)
+	taskIdToTalentIdMap := make(map[string]string)
+	taskIdToTaskInfoMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	var projectIds []string
+	for _, taskId := range taskIds {
+		db1 := GetReadDB(ctx)
+		var taskInfo gorm_model.YoungeeTaskInfo
+		db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskId).Find(&taskInfo)
+		taskIdToProjectMap[taskId] = taskInfo.ProjectID
+		taskIdToTalentIdMap[taskId] = taskInfo.TalentID
+		taskIdToTaskInfoMap[taskId] = taskInfo
+		projectIds = append(projectIds, taskInfo.ProjectID)
+	}
+	projectIds = util.RemoveStrRepByMap(projectIds)
+	var enterpriseIds []string
+	projectIdToProjectInfoMap := make(map[string]gorm_model.ProjectInfo)
+	for _, projectId := range projectIds {
+		db1 := GetReadDB(ctx)
+		projectInfo := gorm_model.ProjectInfo{}
+		db1.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", projectId).Find(&projectInfo)
+		projectIdToProjectInfoMap[projectInfo.ProjectID] = projectInfo
+		enterpriseIds = append(enterpriseIds, projectInfo.EnterpriseID)
+	}
+	enterpriseIds = util.RemoveStrRepByMap(enterpriseIds)
+	enterpriseIdToUserId := make(map[string]int64)
+	var userIds []int64
+	for _, enterpriseId := range enterpriseIds {
+		db1 := GetReadDB(ctx)
+		var userId int64
+		db1.Model(gorm_model.Enterprise{}).Select("user_id").Where("enterprise_id = ?", enterpriseId).Find(&userId)
+		enterpriseIdToUserId[enterpriseId] = userId
+		userIds = append(userIds, userId)
+	}
+	userIdToUserPhone := make(map[int64]string)
+	for _, userId := range userIds {
+		db1 := GetReadDB(ctx)
+		var userPhone string
+		db1.Model(gorm_model.YounggeeUser{}).Select("phone").Where("id = ?", userId).Find(&userPhone)
+		userIdToUserPhone[userId] = userPhone
+	}
+	talentIdToTalentPhoneMap := make(map[string]string)
+	for _, v := range taskIdToTalentIdMap {
+		if len(talentIdToTalentPhoneMap) == 0 {
+			db1 := GetReadDB(ctx)
+			var talentPhoneNumber string
+			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
+			talentIdToTalentPhoneMap[v] = talentPhoneNumber
+		}
+		if _, ok := talentIdToTalentPhoneMap[v]; !ok {
+			db1 := GetReadDB(ctx)
+			var talentPhoneNumber string
+			db1.Model(gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", v).Find(&talentPhoneNumber)
+			talentIdToTalentPhoneMap[v] = talentPhoneNumber
+		}
+	}
+	var BreachHandledPreviews []*http_model.BreachHandledPreview
+	for _, contractInfo := range contractInfos {
+		BreachHandledPreview := new(http_model.BreachHandledPreview)
+		BreachHandledPreview.ContractId = int32(contractInfo.ContractID)
+		BreachHandledPreview.ProjectId = taskIdToProjectMap[contractInfo.TaskID]
+		BreachHandledPreview.UserId = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID
+		BreachHandledPreview.ProjectName = projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].ProjectName
+		BreachHandledPreview.UserPhone = userIdToUserPhone[enterpriseIdToUserId[projectIdToProjectInfoMap[taskIdToProjectMap[contractInfo.TaskID]].EnterpriseID]]
+		BreachHandledPreview.TaskId = contractInfo.TaskID
+		BreachHandledPreview.TalentId = taskIdToTalentIdMap[contractInfo.TaskID]
+		BreachHandledPreview.TalentPhone = talentIdToTalentPhoneMap[taskIdToTalentIdMap[contractInfo.TaskID]]
+		BreachHandledPreview.TerminateReason = consts.GetBreakType(contractInfo.BreakType)
+		BreachHandledPreview.HandleResult = consts.GetHandleResult(contractInfo.DefaultStatus)
+		BreachHandledPreview.HandleAt = conv.MustString(contractInfo.HandleAt, "")[0:19]
+		BreachHandledPreviews = append(BreachHandledPreviews, BreachHandledPreview)
+	}
+	var BreachHandledData http_model.BreachHandledData
+	BreachHandledData.BreachHandledPreview = BreachHandledPreviews
+	BreachHandledData.Total = total
+	return &BreachHandledData, nil
+}
+
+func GetTaskDefaultReviewList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskDefaultReviewInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "default_status" {
+			fmt.Printf("default %+v", value.Interface() == int64(0))
+			if value.Interface() == int64(0) {
+				db = db.Where("cur_default_type = 1")
+			} else if value.Interface() == int64(1) {
+				db = db.Where("cur_default_type = 3")
+			} else if value.Interface() == int64(2) {
+				db = db.Where("cur_default_type = 5")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
+
+	var DefaultReviewInfos []gorm_model.YoungeeContractInfo
+	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 4)", taskIds)
+	err := db1.Find(&DefaultReviewInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	DefaultReviewMap := make(map[string]gorm_model.YoungeeContractInfo)
+	for _, DefaultReviewInfo := range DefaultReviewInfos {
+		DefaultReviewMap[DefaultReviewInfo.TaskID] = DefaultReviewInfo
+	}
+	// 查询总数
+	var totalDefaultReview int64
+	if err := db1.Count(&totalDefaultReview).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskDefaultReviews []*http_model.TaskDefaultReview
+	var taskDefaultReviews []*http_model.TaskDefaultReviewInfo
+	var newTaskDefaultReviews []*http_model.TaskDefaultReviewInfo
+	for _, taskId := range taskIds {
+		TaskDefaultReview := new(http_model.TaskDefaultReview)
+		TaskDefaultReview.Talent = taskMap[taskId]
+		TaskDefaultReview.Default = DefaultReviewMap[taskId]
+		TaskDefaultReviews = append(TaskDefaultReviews, TaskDefaultReview)
+	}
+
+	taskDefaultReviews = pack.TaskDefaultReviewToTaskInfo(TaskDefaultReviews)
+
+	for _, v := range taskDefaultReviews {
+		if platform_nickname == "" {
+			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskDefaultReviews = append(newTaskDefaultReviews, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskDefaultReviews, totalTask, nil
+}
+
+func GetTaskDefaultDataList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskDefaultDataInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "default_status" {
+			if value.Interface() == int64(3) {
+				db = db.Where("cur_default_type = 7")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
+
+	var DefaultDataInfos []gorm_model.YoungeeContractInfo
+	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 4)", taskIds)
+	err := db1.Find(&DefaultDataInfos).Error
+	DefaultDataMap := make(map[string]gorm_model.YoungeeContractInfo)
+	for _, DefaultDataInfo := range DefaultDataInfos {
+		DefaultDataMap[DefaultDataInfo.TaskID] = DefaultDataInfo
+	}
+
+	var LinkInfos []gorm_model.YounggeeLinkInfo
+	db2 := GetReadDB(ctx)
+	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
+	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
+	for _, LinkInfo := range LinkInfos {
+		LinkMap[LinkInfo.TaskID] = LinkInfo
+	}
+
+	// 查询总数
+	var totalDefaultData int64
+	if err := db2.Count(&totalDefaultData).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskDefaultDatas []*http_model.TaskDefaultData
+	var taskDefaultDatas []*http_model.TaskDefaultDataInfo
+	var newTaskDefaultDatas []*http_model.TaskDefaultDataInfo
+	for _, taskId := range taskIds {
+		TaskDefaultData := new(http_model.TaskDefaultData)
+		TaskDefaultData.Talent = taskMap[taskId]
+		TaskDefaultData.Default = DefaultDataMap[taskId]
+		TaskDefaultData.Link = LinkMap[taskId]
+		TaskDefaultDatas = append(TaskDefaultDatas, TaskDefaultData)
+	}
+
+	taskDefaultDatas = pack.TaskDefaultDataToTaskInfo(TaskDefaultDatas)
+
+	for _, v := range taskDefaultDatas {
+		if platform_nickname == "" {
+			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskDefaultDatas = append(newTaskDefaultDatas, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskDefaultDatas, totalTask, nil
+}
+
+func GetTaskTerminatingList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskTerminatingInfo, int64, error) {
+	db := GetReadDB(ctx)
+	var taskIds1 []string
+	var totalTerminating int64
+	var TerminatingInfos []gorm_model.YoungeeContractInfo
+	db = db.Model(gorm_model.YoungeeContractInfo{})
+	err := db.Where("default_status = 3 AND project_id = ?", projectID).Find(&TerminatingInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	TerminatingMap := make(map[string]gorm_model.YoungeeContractInfo)
+	for _, TerminatingInfo := range TerminatingInfos {
+		taskIds1 = append(taskIds1, TerminatingInfo.TaskID)
+		TerminatingMap[TerminatingInfo.TaskID] = TerminatingInfo
+	}
+
+	if err := db.Count(&totalTerminating).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	db1 := GetReadDB(ctx)
+	// 查询Task表信息
+	db1 = db1.Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_id in ?", taskIds1)
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "default_status" {
+			if value.Interface() == int64(4) {
+				db1 = db1.Where("cur_default_type = 9")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				if tag == "strategy_id" {
+					fmt.Println("strategy_id:", value.Interface())
+				}
+				db1 = db1.Debug().Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	// db1 = db1.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db1.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db1.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	var misNum int64
+	if totalTerminating > totalTask {
+		misNum = totalTerminating - totalTask
+	} else {
+		misNum = totalTask - totalTerminating
+	}
+	//logrus.Println("totalTerminating,totalTalent,misNum:", totalTerminating, totalTask, misNum)
+
+	// 查询该页数据
+	limit := pageSize + misNum
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db1.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatingList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskTerminatings []*http_model.TaskTerminating
+	var taskTerminatings []*http_model.TaskTerminatingInfo
+	var newTaskTerminatings []*http_model.TaskTerminatingInfo
+	for _, taskId := range taskIds {
+		TaskTerminating := new(http_model.TaskTerminating)
+		TaskTerminating.Talent = taskMap[taskId]
+		TaskTerminating.Default = TerminatingMap[taskId]
+		TaskTerminatings = append(TaskTerminatings, TaskTerminating)
+	}
+
+	taskTerminatings = pack.TaskTerminatingToTaskInfo(TaskTerminatings)
+
+	for _, v := range taskTerminatings {
+		if platform_nickname == "" {
+			newTaskTerminatings = append(newTaskTerminatings, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskTerminatings = append(newTaskTerminatings, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskTerminatings = append(newTaskTerminatings, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskTerminatings, totalTask, nil
+}
+
+func GetTaskTerminatedList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskTerminatedInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platformNickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "default_status" {
+			fmt.Printf("default %+v", value.Interface() == int64(0))
+			if value.Interface() == int64(5) {
+				db = db.Where("complete_status = 4")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platformNickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YoungeeContractInfo{})
+	var TerminatedInfos []gorm_model.YoungeeContractInfo
+	db1 = db1.Model(gorm_model.YoungeeContractInfo{}).Where("task_id IN ? AND (default_status = 1 OR default_status = 5)", taskIds)
+	err1 := db1.Find(&TerminatedInfos).Error
+	if err1 != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql find, err:%+v", err1)
+		return nil, 0, err1
+	}
+	TerminatedMap := make(map[string]gorm_model.YoungeeContractInfo)
+	for _, TerminatedInfo := range TerminatedInfos {
+		fmt.Printf("TerminatedInfo%#v", TerminatedInfo)
+		TerminatedMap[TerminatedInfo.TaskID] = TerminatedInfo
+	}
+	// 查询总数
+	var totalTerminated int64
+	if err := db1.Count(&totalTerminated).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetTaskTerminatedList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskTerminateds []*http_model.TaskTerminated
+	var taskTerminateds []*http_model.TaskTerminatedInfo
+	var newTaskTerminateds []*http_model.TaskTerminatedInfo
+	for _, taskId := range taskIds {
+		TaskTerminated := new(http_model.TaskTerminated)
+		TaskTerminated.Talent = taskMap[taskId]
+		TaskTerminated.Default = TerminatedMap[taskId]
+		TaskTerminateds = append(TaskTerminateds, TaskTerminated)
+	}
+
+	taskTerminateds = pack.TaskTerminatedToTaskInfo(TaskTerminateds)
+
+	for _, v := range taskTerminateds {
+		if platformNickname == "" {
+			newTaskTerminateds = append(newTaskTerminateds, v)
+		} else if strings.Contains(v.PlatformNickname, platformNickname) {
+			newTaskTerminateds = append(newTaskTerminateds, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platformNickname) {
+			newTaskTerminateds = append(newTaskTerminateds, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskTerminateds, totalTask, nil
+}

+ 4 - 4
db/finance.go

@@ -773,8 +773,8 @@ func GetSupplierWithdrawList(ctx context.Context, req http_model.GetSupplierWith
 
 	withdrawPointers := make([]*http_model.SupplierWithdrawListResponse, 0, len(withdrawlist))
 	for _, withdraw := range withdrawlist {
-		var supplier gorm_model.YounggeeSupplier
-		err = db.Model(gorm_model.YounggeeSupplier{}).Where("supplier_id = ?", withdraw.SupplierId).First(&supplier).Error
+		var supplier gorm_model.Supplier
+		err = db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", withdraw.SupplierId).First(&supplier).Error
 		if err != nil {
 			return &http_model.SupplierWithdrawListData{}, err
 		}
@@ -892,8 +892,8 @@ func GetSupplierInvoiceList(ctx context.Context, req http_model.GetSupplierInvoi
 
 	invoicePointers := make([]*http_model.SupplierInvoiceListResponse, 0, len(invoicelist))
 	for _, invoice := range invoicelist {
-		var supplier gorm_model.YounggeeSupplier
-		err = db.Model(gorm_model.YounggeeSupplier{}).Where("supplier_id = ?", invoice.SupplierId).First(&supplier).Error
+		var supplier gorm_model.Supplier
+		err = db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", invoice.SupplierId).First(&supplier).Error
 		if err != nil {
 			return &http_model.SupplierInvoiceListData{}, err
 		}

+ 299 - 299
db/finish.go

@@ -1,299 +1,299 @@
-package db
-
-import (
-	"context"
-	"fmt"
-	"github.com/tidwall/gjson"
-	"reflect"
-	"strings"
-	"youngee_m_api/model/common_model"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/pack"
-	"youngee_m_api/util"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/sirupsen/logrus"
-)
-
-func GetTaskFinishList(ctx context.Context, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskFinishInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
-
-	var DataInfos []gorm_model.YounggeeDataInfo
-	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
-	err := db1.Find(&DataInfos).Error
-	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
-	for _, DataInfo := range DataInfos {
-		DataMap[DataInfo.TaskID] = DataInfo
-	}
-
-	var LinkInfos []gorm_model.YounggeeLinkInfo
-	db2 := GetReadDB(ctx)
-	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
-	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
-	for _, LinkInfo := range LinkInfos {
-		LinkMap[LinkInfo.TaskID] = LinkInfo
-	}
-
-	// 查询总数
-	var totalData int64
-	if err := db2.Count(&totalData).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	var misNum int64
-	if totalData > totalTask {
-		misNum = totalData - totalTask
-	} else {
-		misNum = totalTask - totalData
-	}
-	logrus.Println("totalData,totalTalent,misNum:", totalData, totalTask, misNum)
-
-	// 查询该页数据
-	limit := pageSize + misNum
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskFinishs []*http_model.TaskFinish
-	var taskDatas []*http_model.TaskFinishInfo
-	var newTaskFinishs []*http_model.TaskFinishInfo
-	for _, taskId := range taskIds {
-		TaskFinish := new(http_model.TaskFinish)
-		TaskFinish.Talent = taskMap[taskId]
-		TaskFinish.Data = DataMap[taskId]
-		TaskFinish.Link = LinkMap[taskId]
-		TaskFinishs = append(TaskFinishs, TaskFinish)
-	}
-
-	taskDatas = pack.TaskFinishToTaskInfo(TaskFinishs)
-
-	for _, v := range taskDatas {
-		if platform_nickname == "" {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskFinishs, totalTask, nil
-}
-
-func GetFinishData(ctx context.Context, projectID string) ([]*gorm_model.RecruitStrategy, error) {
-	var finishRecruitStrategy []*gorm_model.RecruitStrategy
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	err := db.Debug().Model(gorm_model.RecruitStrategy{}).Where("project_id = ?", projectID).Scan(&finishRecruitStrategy).Order("strategy_id").Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	return finishRecruitStrategy, nil
-}
-
-func GetSpecialTaskFinishList(ctx context.Context, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskFinishDataInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
-
-	var DataInfos []gorm_model.YounggeeDataInfo
-	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
-	err := db1.Find(&DataInfos).Error
-	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
-	for _, DataInfo := range DataInfos {
-		DataMap[DataInfo.TaskID] = DataInfo
-	}
-
-	var LinkInfos []gorm_model.YounggeeLinkInfo
-	db2 := GetReadDB(ctx)
-	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
-	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
-	for _, LinkInfo := range LinkInfos {
-		LinkMap[LinkInfo.TaskID] = LinkInfo
-	}
-
-	// 查询总数
-	var totalData int64
-	if err := db2.Count(&totalData).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	var misNum int64
-	if totalData > totalTask {
-		misNum = totalData - totalTask
-	} else {
-		misNum = totalTask - totalData
-	}
-	logrus.Println("totalData,totalTalent,misNum:", totalData, totalTask, misNum)
-
-	// 查询该页数据
-	limit := pageSize + misNum
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskFinishs []*http_model.SpecialTaskFinishData
-	var taskDatas []*http_model.SpecialTaskFinishDataInfo
-	var newTaskFinishs []*http_model.SpecialTaskFinishDataInfo
-	for _, taskId := range taskIds {
-		TaskFinish := new(http_model.SpecialTaskFinishData)
-		TaskFinish.Talent = taskMap[taskId]
-		TaskFinish.Data = DataMap[taskId]
-		TaskFinish.Link = LinkMap[taskId]
-		TaskFinishs = append(TaskFinishs, TaskFinish)
-	}
-
-	taskDatas = pack.SpecialTaskFinishDataToTaskInfo(TaskFinishs)
-
-	for _, v := range taskDatas {
-		if platform_nickname == "" {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskFinishs = append(newTaskFinishs, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskFinishs, totalTask, nil
-}
-
-func GetSpecialFinishDataNumber(ctx context.Context, projectId string) (*http_model.GetSpecialFinishDataData, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15 and project_id = ?", projectId)
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetSpecialFinishDataNumber] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
-
-	var DataInfos []gorm_model.YounggeeDataInfo
-	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
-	err := db1.Find(&DataInfos).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetSpecialFinishDataNumber] error query mysql total, err:%+v", err)
-		return nil, err
-	}
-	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
-	for _, DataInfo := range DataInfos {
-		DataMap[DataInfo.TaskID] = DataInfo
-	}
-
-	taskFinishData := http_model.GetSpecialFinishDataData{
-		FinishNumber:  totalTask,
-		FanNumber:     0,
-		PlayNumber:    0,
-		LikeNumber:    0,
-		CommentNumber: 0,
-		CollectNumber: 0,
-	}
-	for _, taskId := range taskIds {
-		fans := conv.MustString(gjson.Get(taskMap[taskId].TalentPlatformInfoSnap, "fans_count"), "")
-		taskFinishData.FanNumber += conv.MustInt(fans, 0)
-		taskFinishData.PlayNumber += DataMap[taskId].PlayNumber
-		taskFinishData.LikeNumber += DataMap[taskId].LikeNumber
-		taskFinishData.CollectNumber += DataMap[taskId].CollectNumber
-		taskFinishData.CommentNumber += DataMap[taskId].CommentNumber
-	}
-	return &taskFinishData, nil
-}
+package db
+
+import (
+	"context"
+	"fmt"
+	"github.com/tidwall/gjson"
+	"reflect"
+	"strings"
+	"youngee_m_api/model/common_model"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/pack"
+	"youngee_m_api/util"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/sirupsen/logrus"
+)
+
+func GetTaskFinishList(ctx context.Context, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskFinishInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
+
+	var DataInfos []gorm_model.YounggeeDataInfo
+	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
+	err := db1.Find(&DataInfos).Error
+	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
+	for _, DataInfo := range DataInfos {
+		DataMap[DataInfo.TaskID] = DataInfo
+	}
+
+	var LinkInfos []gorm_model.YounggeeLinkInfo
+	db2 := GetReadDB(ctx)
+	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
+	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
+	for _, LinkInfo := range LinkInfos {
+		LinkMap[LinkInfo.TaskID] = LinkInfo
+	}
+
+	// 查询总数
+	var totalData int64
+	if err := db2.Count(&totalData).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	var misNum int64
+	if totalData > totalTask {
+		misNum = totalData - totalTask
+	} else {
+		misNum = totalTask - totalData
+	}
+	logrus.Println("totalData,totalTalent,misNum:", totalData, totalTask, misNum)
+
+	// 查询该页数据
+	limit := pageSize + misNum
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskFinishs []*http_model.TaskFinish
+	var taskDatas []*http_model.TaskFinishInfo
+	var newTaskFinishs []*http_model.TaskFinishInfo
+	for _, taskId := range taskIds {
+		TaskFinish := new(http_model.TaskFinish)
+		TaskFinish.Talent = taskMap[taskId]
+		TaskFinish.Data = DataMap[taskId]
+		TaskFinish.Link = LinkMap[taskId]
+		TaskFinishs = append(TaskFinishs, TaskFinish)
+	}
+
+	taskDatas = pack.TaskFinishToTaskInfo(TaskFinishs)
+
+	for _, v := range taskDatas {
+		if platform_nickname == "" {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskFinishs, totalTask, nil
+}
+
+func GetFinishData(ctx context.Context, projectID string) ([]*gorm_model.RecruitStrategy, error) {
+	var finishRecruitStrategy []*gorm_model.RecruitStrategy
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	err := db.Debug().Model(gorm_model.RecruitStrategy{}).Where("project_id = ?", projectID).Scan(&finishRecruitStrategy).Order("strategy_id").Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	return finishRecruitStrategy, nil
+}
+
+func GetSpecialTaskFinishList(ctx context.Context, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskFinishDataInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
+
+	var DataInfos []gorm_model.YounggeeDataInfo
+	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
+	err := db1.Find(&DataInfos).Error
+	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
+	for _, DataInfo := range DataInfos {
+		DataMap[DataInfo.TaskID] = DataInfo
+	}
+
+	var LinkInfos []gorm_model.YounggeeLinkInfo
+	db2 := GetReadDB(ctx)
+	db2 = db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds).Find(&LinkInfos)
+	LinkMap := make(map[string]gorm_model.YounggeeLinkInfo)
+	for _, LinkInfo := range LinkInfos {
+		LinkMap[LinkInfo.TaskID] = LinkInfo
+	}
+
+	// 查询总数
+	var totalData int64
+	if err := db2.Count(&totalData).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	var misNum int64
+	if totalData > totalTask {
+		misNum = totalData - totalTask
+	} else {
+		misNum = totalTask - totalData
+	}
+	logrus.Println("totalData,totalTalent,misNum:", totalData, totalTask, misNum)
+
+	// 查询该页数据
+	limit := pageSize + misNum
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err = db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskFinishs []*http_model.SpecialTaskFinishData
+	var taskDatas []*http_model.SpecialTaskFinishDataInfo
+	var newTaskFinishs []*http_model.SpecialTaskFinishDataInfo
+	for _, taskId := range taskIds {
+		TaskFinish := new(http_model.SpecialTaskFinishData)
+		TaskFinish.Talent = taskMap[taskId]
+		TaskFinish.Data = DataMap[taskId]
+		TaskFinish.Link = LinkMap[taskId]
+		TaskFinishs = append(TaskFinishs, TaskFinish)
+	}
+
+	taskDatas = pack.SpecialTaskFinishDataToTaskInfo(TaskFinishs)
+
+	for _, v := range taskDatas {
+		if platform_nickname == "" {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskFinishs = append(newTaskFinishs, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskFinishs, totalTask, nil
+}
+
+func GetSpecialFinishDataNumber(ctx context.Context, projectId string) (*http_model.GetSpecialFinishDataData, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 and task_stage = 15 and project_id = ?", projectId)
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetSpecialFinishDataNumber] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeDataInfo{})
+
+	var DataInfos []gorm_model.YounggeeDataInfo
+	db1 = db1.Model(gorm_model.YounggeeDataInfo{}).Where("task_id IN ? AND is_ok = 1", taskIds)
+	err := db1.Find(&DataInfos).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetSpecialFinishDataNumber] error query mysql total, err:%+v", err)
+		return nil, err
+	}
+	DataMap := make(map[string]gorm_model.YounggeeDataInfo)
+	for _, DataInfo := range DataInfos {
+		DataMap[DataInfo.TaskID] = DataInfo
+	}
+
+	taskFinishData := http_model.GetSpecialFinishDataData{
+		FinishNumber:  totalTask,
+		FanNumber:     0,
+		PlayNumber:    0,
+		LikeNumber:    0,
+		CommentNumber: 0,
+		CollectNumber: 0,
+	}
+	for _, taskId := range taskIds {
+		fans := conv.MustString(gjson.Get(taskMap[taskId].TalentPlatformInfoSnap, "fans_count"), "")
+		taskFinishData.FanNumber += conv.MustInt(fans, 0)
+		taskFinishData.PlayNumber += DataMap[taskId].PlayNumber
+		taskFinishData.LikeNumber += DataMap[taskId].LikeNumber
+		taskFinishData.CollectNumber += DataMap[taskId].CollectNumber
+		taskFinishData.CommentNumber += DataMap[taskId].CommentNumber
+	}
+	return &taskFinishData, nil
+}

+ 40 - 37
db/link.go

@@ -61,8 +61,8 @@ func GetTaskLinkList(ctx context.Context, projectID string, pageSize, pageNum in
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YounggeeLinkInfo{})
@@ -127,31 +127,14 @@ func GetTaskLinkList(ctx context.Context, projectID string, pageSize, pageNum in
 	return newTaskLinks, totalTask, nil
 }
 
-//// LinkOpinion 提交意见
-//func LinkOpinion(ctx context.Context, TaskID string, ReviseOpinion string) error {
-//	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}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Link db] Update YounggeeLinkInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{LinkStatus: 3}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Link db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 11}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Link db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	return nil
-//}
-
 // 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -183,9 +166,13 @@ 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -238,9 +225,13 @@ 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, projectid string, isspecial int) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -295,9 +286,13 @@ 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, projectid string, isspecial int) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -353,9 +348,13 @@ 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -387,9 +386,13 @@ 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, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -464,8 +467,8 @@ func GetSpecialTaskLinkList(ctx context.Context, projectID string, pageSize, pag
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YounggeeLinkInfo{})

File diff ditekan karena terlalu besar
+ 666 - 66
db/locallife_task.go


+ 4 - 4
db/logistics.go

@@ -91,8 +91,8 @@ func GetTaskLogisticsList(ctx context.Context, projectID string, pageSize, pageN
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YoungeeTaskLogistics{})
@@ -194,8 +194,8 @@ func GetSpecialTaskLogisticsList(ctx context.Context, projectID string, pageSize
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YoungeeTaskLogistics{})

+ 3 - 3
db/message.go

@@ -56,17 +56,17 @@ func CreateMessageByTaskId(ctx context.Context, messageId int, messageType int,
 
 	db1 := GetReadDB(ctx)
 	var projectName string
-	err = db1.Model(gorm_model.ProjectInfo{}).Select("project_name").Where("project_id = ?", taskInfo.ProjectId).Find(&projectName).Error
+	err = db1.Model(gorm_model.ProjectInfo{}).Select("project_name").Where("project_id = ?", taskInfo.ProjectID).Find(&projectName).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
 		return err
 	}
-	fmt.Printf("project_name: %+v, project_id: %+v\n", projectName, taskInfo.ProjectId)
+	fmt.Printf("project_name: %+v, project_id: %+v\n", projectName, taskInfo.ProjectID)
 	messageInfo := gorm_model.YounggeeMessageInfo{
 		MessageID:   messageId,
 		MessageType: messageType,
 		CreatedAt:   time.Now(),
-		TalentID:    taskInfo.TalentId,
+		TalentID:    taskInfo.TalentID,
 		ProjectName: projectName,
 		IsReaded:    0,
 		IsDeleted:   0,

+ 34 - 34
db/operate.go

@@ -269,10 +269,10 @@ func UpdateAutoTaskTime(ctx context.Context, time int32, num int32) error {
 		autoTaskInfo.CaseClose = time
 	case 7:
 		autoTaskInfo.Invalid = time
-	case 8:
-		autoTaskInfo.DraftDefaultInPic = time
-	case 9:
-		autoTaskInfo.DraftDefaultInMv = time
+	//case 8:
+	//	autoTaskInfo.DraftDefaultInPic = time
+	//case 9:
+	//	autoTaskInfo.DraftDefaultInMv = time
 	case 10:
 		autoTaskInfo.ScriptDefault = time
 	case 11:
@@ -374,12 +374,12 @@ func GetSignInOfflineTask(projectForm int32) error {
 			//fmt.Println("taskInfos", taskInfos)
 			for _, taskInfo := range taskInfos {
 				//fmt.Println("TaskId", taskInfo.TaskId)
-				if _, ok1 := taskIDs[taskInfo.TaskId]; !ok1 {
-					taskIds = append(taskIds, taskInfo.TaskId)
-					taskIDs[taskInfo.TaskId] = taskInfo.ProjectId
+				if _, ok1 := taskIDs[taskInfo.TaskID]; !ok1 {
+					taskIds = append(taskIds, taskInfo.TaskID)
+					taskIDs[taskInfo.TaskID] = taskInfo.ProjectID
 					var logisticInfo gorm_model.YoungeeTaskLogistics
 					db2 := GetReadDB(context.Background())
-					db2.Model(gorm_model.YoungeeTaskLogistics{}).Where("task_id = ?", taskInfo.TaskId).Find(&logisticInfo)
+					db2.Model(gorm_model.YoungeeTaskLogistics{}).Where("task_id = ?", taskInfo.TaskID).Find(&logisticInfo)
 					dd, _ := time.ParseDuration(conv.MustString(t, "") + "h")
 					if logisticInfo.AutoSignAt == nil || logisticInfo.AutoSignAt.IsZero() {
 						var t1 time.Time
@@ -485,11 +485,11 @@ func GetAutoReviewTask(contentType int32) error {
 				//fmt.Println("TaskID:", taskInfo.TaskId)
 				db2 := GetReadDB(context.Background())
 				var scriptInfos gorm_model.YounggeeScriptInfo
-				db2.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskId, 1, 0).Find(&scriptInfos)
+				db2.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskID, 1, 0).Find(&scriptInfos)
 				dd, _ := time.ParseDuration(conv.MustString(ReviewInMv, "") + "h")
 				if scriptInfos.AutoAgreeAt.IsZero() {
 					db3 := GetReadDB(context.Background())
-					db3.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ?", taskInfo.TaskId).
+					db3.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ?", taskInfo.TaskID).
 						Updates(&gorm_model.YounggeeScriptInfo{AutoAgreeAt: scriptInfos.SubmitAt.Add(dd)})
 					fmt.Println("已添加脚本自动审核时间")
 				}
@@ -575,7 +575,7 @@ func GetAutoReviewTask(contentType int32) error {
 			for _, taskInfo := range taskInfos {
 				db2 := GetReadDB(context.Background())
 				var sketchInfo gorm_model.YounggeeSketchInfo
-				db2.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskId, 1, 0).Find(&sketchInfo)
+				db2.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskID, 1, 0).Find(&sketchInfo)
 				dd, _ := time.ParseDuration(conv.MustString(ReviewUnlimited, "") + "h")
 				if sketchInfo.AutoAgreeAt.IsZero() {
 					db3 := GetReadDB(context.Background())
@@ -667,7 +667,7 @@ func GetAutoPostReviewTask() error {
 		for _, taskInfo := range taskInfos {
 			db2 := GetReadDB(context.Background())
 			var linkInfos gorm_model.YounggeeLinkInfo
-			db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskId, 1, 0).Find(&linkInfos)
+			db2.Model(gorm_model.YounggeeLinkInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskID, 1, 0).Find(&linkInfos)
 			dd, _ := time.ParseDuration(conv.MustString(Postreview, "") + "h")
 			if linkInfos.AutoAgreeAt.IsZero() && linkInfos.IsSubmit == 1 {
 				db3 := GetReadDB(context.Background())
@@ -758,7 +758,7 @@ func GetAutoCaseCloseTask() error {
 		for _, taskInfo := range taskInfos {
 			db2 := GetReadDB(context.Background())
 			var dataInfos gorm_model.YounggeeDataInfo
-			db2.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskId, 1, 0).Find(&dataInfos)
+			db2.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? AND is_submit = ? AND is_review = ? ", taskInfo.TaskID, 1, 0).Find(&dataInfos)
 			dd, _ := time.ParseDuration(conv.MustString(CaseClose, "") + "h")
 			if dataInfos.AutoAgreeAt.IsZero() && dataInfos.IsSubmit == 1 {
 				db3 := GetReadDB(context.Background())
@@ -841,7 +841,7 @@ func GetAutoCaseCloseTask() error {
 
 		//查询project_info
 		projectInfo := gorm_model.ProjectInfo{}
-		err1 := db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo).Error
+		err1 := db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectID).Scan(&projectInfo).Error
 		if err1 != nil {
 			log.Println("DB GetAutoCaseCloseTask error in data:", err)
 			return err1
@@ -854,9 +854,9 @@ func GetAutoCaseCloseTask() error {
 		}
 		t := time.Now()
 		income := gorm_model.YounggeeTalentIncome{
-			TalentID:       taskInfo.TalentId,
-			ProjectID:      taskInfo.ProjectId,
-			SectaskID:      taskInfo.TaskId,
+			TalentID:       taskInfo.TalentID,
+			ProjectID:      taskInfo.ProjectID,
+			SectaskID:      taskInfo.TaskID,
 			BrandName:      productStruct.BrandName,
 			TaskName:       projectInfo.ProjectName,
 			Income:         strconv.FormatFloat(taskInfo.SettleAmount, 'f', 10, 32),
@@ -872,7 +872,7 @@ func GetAutoCaseCloseTask() error {
 		}
 
 		// 更新招募策略
-		db7 = db7.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectId, taskInfo.StrategyId)
+		db7 = db7.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectID, taskInfo.StrategyID)
 		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count"), ""))
 		err = db7.Updates(map[string]interface{}{
 			"fan_number":     gorm.Expr("fan_number + ?", fansCount),
@@ -1100,17 +1100,17 @@ func GetAutoDraftDefaultInPicTask() error {
 		var taskInfos []gorm_model.YoungeeTaskInfo
 		db1.Model(gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_status = ? AND task_stage = ? AND cur_default_type = ? AND logistics_status = 3", projectId, 2, 9, 0).Find(&taskInfos)
 		for _, taskInfo := range taskInfos {
-			TaskIdToProjectId[taskInfo.TaskId] = projectId
+			TaskIdToProjectId[taskInfo.TaskID] = projectId
 			taskNeedMod := gorm_model.YoungeeTaskInfo{}
 			db2 := GetReadDB(context.Background())
 			// 保存所有满足物流状态为 3 且 初稿上传状态为 1或 3 的任务记录的id
-			db2.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskInfo.TaskId).First(&taskNeedMod)
-			taskIdToFeeFormMap[taskInfo.TaskId] = taskInfo.FeeForm
+			db2.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskInfo.TaskID).First(&taskNeedMod)
+			taskIdToFeeFormMap[taskInfo.TaskID] = taskInfo.FeeForm
 			if taskNeedMod.TaskStage == 9 && taskNeedMod.SketchStatus == 1 {
-				taskNeedModIds = append(taskNeedModIds, taskInfo.TaskId)
+				taskNeedModIds = append(taskNeedModIds, taskInfo.TaskID)
 			}
 			if taskNeedMod.TaskStage == 9 && taskNeedMod.SketchStatus == 3 {
-				submitTaskNeedModIds = append(submitTaskNeedModIds, taskInfo.TaskId)
+				submitTaskNeedModIds = append(submitTaskNeedModIds, taskInfo.TaskID)
 			}
 		}
 	}
@@ -1317,9 +1317,9 @@ func GetAutoDraftDefaultInMvTask() error {
 		db1.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_status = ? AND task_stage = ? AND cur_default_type = ? AND logistics_status = 3",
 			projectInfo.ProjectID, 2, 9, 0).Find(&videoTaskInfos)
 		for _, videoTaskInfo := range videoTaskInfos {
-			taskIdToProjectIdMap[videoTaskInfo.TaskId] = projectInfo.ProjectID
-			taskIdToFeeFormMap[videoTaskInfo.TaskId] = videoTaskInfo.FeeForm
-			videoTaskIds = append(videoTaskIds, videoTaskInfo.TaskId)
+			taskIdToProjectIdMap[videoTaskInfo.TaskID] = projectInfo.ProjectID
+			taskIdToFeeFormMap[videoTaskInfo.TaskID] = videoTaskInfo.FeeForm
+			videoTaskIds = append(videoTaskIds, videoTaskInfo.TaskID)
 		}
 	}
 
@@ -1533,9 +1533,9 @@ func GetAutoScriptDefaultTask() error {
 		db1.Model(&gorm_model.YoungeeTaskInfo{}).
 			Where("project_id = ?  AND task_status = ? AND task_stage = ? AND cur_default_type = ? AND logistics_status = 3", projectInfo.ProjectID, 2, 7, 0).Find(&videoTaskInfos)
 		for _, videoTaskInfo := range videoTaskInfos {
-			taskIdToProjectIdMap[videoTaskInfo.TaskId] = projectInfo.ProjectID
-			taskIdToFeeFormMap[videoTaskInfo.TaskId] = videoTaskInfo.FeeForm
-			videoTaskIds = append(videoTaskIds, videoTaskInfo.TaskId)
+			taskIdToProjectIdMap[videoTaskInfo.TaskID] = projectInfo.ProjectID
+			taskIdToFeeFormMap[videoTaskInfo.TaskID] = videoTaskInfo.FeeForm
+			videoTaskIds = append(videoTaskIds, videoTaskInfo.TaskID)
 		}
 	}
 	for _, videoTaskId := range videoTaskIds {
@@ -1824,9 +1824,9 @@ func GetAutoLinkBreachTask() error {
 		db1 := GetReadDB(context.Background())
 		db1.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_status = ? AND task_stage = ? AND cur_default_type = ? ", projectInfo.ProjectID, 2, 11, 0).Find(&taskInfos)
 		for _, taskInfo := range taskInfos {
-			taskIdToProjectIdMap[taskInfo.TaskId] = projectInfo.ProjectID
-			taskIds = append(taskIds, taskInfo.TaskId)
-			taskIdToFeeFormMap[taskInfo.TaskId] = taskInfo.FeeForm
+			taskIdToProjectIdMap[taskInfo.TaskID] = projectInfo.ProjectID
+			taskIds = append(taskIds, taskInfo.TaskID)
+			taskIdToFeeFormMap[taskInfo.TaskID] = taskInfo.FeeForm
 		}
 	}
 	// 首次提交链接的任务记录id
@@ -2391,8 +2391,8 @@ func GetHours(ctx context.Context) (*http_model.Hours, error) {
 		return nil, err
 	}
 	Hours := http_model.Hours{}
-	Hours.DraftDefaultInPic = infoAuto.DraftDefaultInPic
-	Hours.DraftDefaultInMv = infoAuto.DraftDefaultInMv
+	//Hours.DraftDefaultInPic = infoAuto.DraftDefaultInPic
+	//Hours.DraftDefaultInMv = infoAuto.DraftDefaultInMv
 	Hours.ScriptDefault = infoAuto.ScriptDefault
 	Hours.Invalid = infoAuto.Invalid
 	Hours.LinkBreach = infoAuto.LinkBreach

File diff ditekan karena terlalu besar
+ 603 - 108
db/project_task.go


+ 274 - 274
db/script.go

@@ -1,274 +1,274 @@
-package db
-
-import (
-	"context"
-	"fmt"
-	"reflect"
-	"strings"
-	"time"
-	"youngee_m_api/model/common_model"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/pack"
-	"youngee_m_api/util"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/sirupsen/logrus"
-)
-
-// GetTaskScriptList 查询上传脚本的task list
-func GetTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskScriptInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 ")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "script_status" {
-			fmt.Printf("script %+v", value.Interface() == int64(2))
-			if value.Interface() == int64(2) {
-				db = db.Where("task_stage = 8")
-			} else {
-				db = db.Where("task_stage > 8 and task_stage <> 16")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" || tag == "strategy_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YounggeeScriptInfo{})
-
-	var ScriptInfos []gorm_model.YounggeeScriptInfo
-	db1 = db1.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id IN ? AND is_submit=? ", taskIds, 1)
-	if conditions.ScriptStatus == int64(2) {
-		db1 = db1.Where("is_review = 0").Find(&ScriptInfos)
-	} else {
-		db1 = db1.Where("is_ok = 1").Find(&ScriptInfos)
-	}
-	ScriptMap := make(map[string]gorm_model.YounggeeScriptInfo)
-	for _, ScriptInfo := range ScriptInfos {
-		ScriptMap[ScriptInfo.TaskID] = ScriptInfo
-	}
-	// 查询总数
-	var totalScript int64
-	if err := db1.Count(&totalScript).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskScripts []*http_model.TaskScript
-	var taskScripts []*http_model.TaskScriptInfo
-	var newTaskScripts []*http_model.TaskScriptInfo
-	for _, taskId := range taskIds {
-		TaskScript := new(http_model.TaskScript)
-		TaskScript.Talent = taskMap[taskId]
-		TaskScript.Script = ScriptMap[taskId]
-		TaskScripts = append(TaskScripts, TaskScript)
-	}
-
-	taskScripts = pack.TaskScriptToTaskInfo(TaskScripts)
-
-	for _, v := range taskScripts {
-		if platform_nickname == "" {
-			newTaskScripts = append(newTaskScripts, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskScripts = append(newTaskScripts, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskScripts = append(newTaskScripts, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskScripts, totalTask, nil
-}
-
-// ScriptOpinion 提交意见
-func ScriptOpinion(ctx context.Context, TaskID string, ReviseOpinion string) error {
-	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YounggeeScriptInfo error,err:%+v", err)
-		return err
-	}
-	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{ScriptStatus: 3}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 7}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// AcceptScript 同意脚本
-func AcceptScript(ctx context.Context, TaskIDs []string) error {
-	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now()}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YounggeeScriptInfo error,err:%+v", err)
-		return err
-	}
-	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{ScriptStatus: 5}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 9}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// GetSpecialTaskScriptList 专项任务-查询上传脚本的task list
-func GetSpecialTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskScriptInfo, int64, error) {
-	db := GetReadDB(ctx)
-	// 查询Task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "script_status" {
-			fmt.Printf("script %+v", value.Interface() == int64(2))
-			if value.Interface() == int64(2) {
-				db = db.Where("task_stage = 8")
-			} else {
-				db = db.Where("task_stage > 8 and task_stage <> 16")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询任务id
-	var taskIds []string
-	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
-	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
-	}
-	db1 := GetReadDB(ctx)
-	db1 = db1.Debug().Model(gorm_model.YounggeeScriptInfo{})
-
-	var ScriptInfos []gorm_model.YounggeeScriptInfo
-	db1 = db1.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id IN ? AND is_submit=? ", taskIds, 1)
-	if conditions.ScriptStatus == int64(2) {
-		db1 = db1.Where("is_review = 0").Find(&ScriptInfos)
-	} else {
-		db1 = db1.Where("is_ok = 1").Find(&ScriptInfos)
-	}
-	ScriptMap := make(map[string]gorm_model.YounggeeScriptInfo)
-	for _, ScriptInfo := range ScriptInfos {
-		ScriptMap[ScriptInfo.TaskID] = ScriptInfo
-	}
-	// 查询总数
-	var totalScript int64
-	if err := db1.Count(&totalScript).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	var misNum int64
-	if totalScript > totalTask {
-		misNum = totalScript - totalTask
-	} else {
-		misNum = totalTask - totalScript
-	}
-	//logrus.Println("totalScript,totalTalent,misNum:", totalScript, totalTask, misNum)
-
-	// 查询该页数据
-	limit := pageSize + misNum
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
-
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-
-	var TaskScripts []*http_model.SpecialTaskScript
-	var taskScripts []*http_model.SpecialTaskScriptInfo
-	var newTaskScripts []*http_model.SpecialTaskScriptInfo
-	for _, taskId := range taskIds {
-		TaskScript := new(http_model.SpecialTaskScript)
-		TaskScript.Talent = taskMap[taskId]
-		TaskScript.Script = ScriptMap[taskId]
-		TaskScripts = append(TaskScripts, TaskScript)
-	}
-
-	taskScripts = pack.SpecialTaskScriptToTaskInfo(TaskScripts)
-
-	for _, v := range taskScripts {
-		if platform_nickname == "" {
-			newTaskScripts = append(newTaskScripts, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskScripts = append(newTaskScripts, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskScripts = append(newTaskScripts, v)
-		} else {
-			totalTask--
-		}
-	}
-	return newTaskScripts, totalTask, nil
-}
+package db
+
+import (
+	"context"
+	"fmt"
+	"reflect"
+	"strings"
+	"time"
+	"youngee_m_api/model/common_model"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/pack"
+	"youngee_m_api/util"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/sirupsen/logrus"
+)
+
+// GetTaskScriptList 查询上传脚本的task list
+func GetTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.TaskScriptInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2 ")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "script_status" {
+			fmt.Printf("script %+v", value.Interface() == int64(2))
+			if value.Interface() == int64(2) {
+				db = db.Where("task_stage = 8")
+			} else {
+				db = db.Where("task_stage > 8 and task_stage <> 16")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" || tag == "strategy_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeScriptInfo{})
+
+	var ScriptInfos []gorm_model.YounggeeScriptInfo
+	db1 = db1.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id IN ? AND is_submit=? ", taskIds, 1)
+	if conditions.ScriptStatus == int64(2) {
+		db1 = db1.Where("is_review = 0").Find(&ScriptInfos)
+	} else {
+		db1 = db1.Where("is_ok = 1").Find(&ScriptInfos)
+	}
+	ScriptMap := make(map[string]gorm_model.YounggeeScriptInfo)
+	for _, ScriptInfo := range ScriptInfos {
+		ScriptMap[ScriptInfo.TaskID] = ScriptInfo
+	}
+	// 查询总数
+	var totalScript int64
+	if err := db1.Count(&totalScript).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	// 查询该页数据
+	limit := pageSize
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskScripts []*http_model.TaskScript
+	var taskScripts []*http_model.TaskScriptInfo
+	var newTaskScripts []*http_model.TaskScriptInfo
+	for _, taskId := range taskIds {
+		TaskScript := new(http_model.TaskScript)
+		TaskScript.Talent = taskMap[taskId]
+		TaskScript.Script = ScriptMap[taskId]
+		TaskScripts = append(TaskScripts, TaskScript)
+	}
+
+	taskScripts = pack.TaskScriptToTaskInfo(TaskScripts)
+
+	for _, v := range taskScripts {
+		if platform_nickname == "" {
+			newTaskScripts = append(newTaskScripts, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskScripts = append(newTaskScripts, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskScripts = append(newTaskScripts, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskScripts, totalTask, nil
+}
+
+// ScriptOpinion 提交意见
+func ScriptOpinion(ctx context.Context, TaskID string, ReviseOpinion string) error {
+	db := GetReadDB(ctx)
+	err := db.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id = ? and is_review = 0", TaskID).Updates(map[string]interface{}{"revise_opinion": ReviseOpinion, "reject_at": time.Now(), "is_review": 1}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YounggeeScriptInfo error,err:%+v", err)
+		return err
+	}
+	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{ScriptStatus: 3}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 7}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
+
+// AcceptScript 同意脚本
+func AcceptScript(ctx context.Context, TaskIDs []string) error {
+	db := GetReadDB(ctx)
+	err := db.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id in ?  and is_review = 0", TaskIDs).Updates(map[string]interface{}{"is_ok": 1, "is_review": 1, "agree_at": time.Now()}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YounggeeScriptInfo error,err:%+v", err)
+		return err
+	}
+	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{ScriptStatus: 5}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 9}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Script db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
+
+// GetSpecialTaskScriptList 专项任务-查询上传脚本的task list
+func GetSpecialTaskScriptList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskScriptInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询Task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_status = 2")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platform_nickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "script_status" {
+			fmt.Printf("script %+v", value.Interface() == int64(2))
+			if value.Interface() == int64(2) {
+				db = db.Where("task_stage = 8")
+			} else {
+				db = db.Where("task_stage > 8 and task_stage <> 16")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platform_nickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	// 查询任务id
+	var taskIds []string
+	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
+	for _, taskInfo := range taskInfos {
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
+	}
+	db1 := GetReadDB(ctx)
+	db1 = db1.Debug().Model(gorm_model.YounggeeScriptInfo{})
+
+	var ScriptInfos []gorm_model.YounggeeScriptInfo
+	db1 = db1.Model(gorm_model.YounggeeScriptInfo{}).Where("task_id IN ? AND is_submit=? ", taskIds, 1)
+	if conditions.ScriptStatus == int64(2) {
+		db1 = db1.Where("is_review = 0").Find(&ScriptInfos)
+	} else {
+		db1 = db1.Where("is_ok = 1").Find(&ScriptInfos)
+	}
+	ScriptMap := make(map[string]gorm_model.YounggeeScriptInfo)
+	for _, ScriptInfo := range ScriptInfos {
+		ScriptMap[ScriptInfo.TaskID] = ScriptInfo
+	}
+	// 查询总数
+	var totalScript int64
+	if err := db1.Count(&totalScript).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	var misNum int64
+	if totalScript > totalTask {
+		misNum = totalScript - totalTask
+	} else {
+		misNum = totalTask - totalScript
+	}
+	//logrus.Println("totalScript,totalTalent,misNum:", totalScript, totalTask, misNum)
+
+	// 查询该页数据
+	limit := pageSize + misNum
+	offset := pageSize * pageNum // assert pageNum start with 0
+	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+
+	var TaskScripts []*http_model.SpecialTaskScript
+	var taskScripts []*http_model.SpecialTaskScriptInfo
+	var newTaskScripts []*http_model.SpecialTaskScriptInfo
+	for _, taskId := range taskIds {
+		TaskScript := new(http_model.SpecialTaskScript)
+		TaskScript.Talent = taskMap[taskId]
+		TaskScript.Script = ScriptMap[taskId]
+		TaskScripts = append(TaskScripts, TaskScript)
+	}
+
+	taskScripts = pack.SpecialTaskScriptToTaskInfo(TaskScripts)
+
+	for _, v := range taskScripts {
+		if platform_nickname == "" {
+			newTaskScripts = append(newTaskScripts, v)
+		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
+			newTaskScripts = append(newTaskScripts, v)
+		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+			newTaskScripts = append(newTaskScripts, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskScripts, totalTask, nil
+}

+ 194 - 210
db/sketch.go

@@ -13,7 +13,7 @@ import (
 	"youngee_m_api/pack"
 	"youngee_m_api/util"
 
-	"github.com/caixw/lib.go/conv"
+	"github.com/issue9/conv"
 	"github.com/sirupsen/logrus"
 )
 
@@ -61,8 +61,8 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YounggeeSketchInfo{})
@@ -74,7 +74,7 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 	} else {
 		db1 = db1.Where("is_ok = 1").Find(&SketchInfos)
 	}
-	//fmt.Printf("初稿查询:%+v", SketchInfos)
+	fmt.Printf("初稿查询:%+v", SketchInfos)
 	SketchMap := make(map[string]gorm_model.YounggeeSketchInfo)
 	for _, SketchInfo := range SketchInfos {
 		SketchMap[SketchInfo.TaskID] = SketchInfo
@@ -91,7 +91,7 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 	} else {
 		misNum = totalTask - totalSketch
 	}
-	//logrus.Println("totalSketch,totalTalent,misNum:", totalSketch, totalTask, misNum)
+	logrus.Println("totalSketch,totalTalent,misNum:", totalSketch, totalTask, misNum)
 
 	// 查询该页数据
 	limit := pageSize + misNum
@@ -121,7 +121,7 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 			newTaskSketches = append(newTaskSketches, v)
 		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
 			newTaskSketches = append(newTaskSketches, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+		} else if strings.Contains(conv.MustString(v.TaskID), platform_nickname) {
 			newTaskSketches = append(newTaskSketches, v)
 		} else {
 			totalTask--
@@ -130,33 +130,14 @@ func GetTaskSketchList(ctx context.Context, projectID string, pageSize, pageNum
 	return newTaskSketches, totalTask, nil
 }
 
-//// SketchOption 提交意见
-//func SketchOption(ctx context.Context, TaskID string, ReviseOpinion 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}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] call RevisieOption error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{SketchStatus: 3}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 9}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	return nil
-//}
-
 // 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, projectid 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
+	opid = operatorid
+	optype = 3
+	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
@@ -188,32 +169,53 @@ func SketchOption(ctx context.Context, TaskID string, ReviseOpinion string, oper
 	return nil
 }
 
-//// AcceptSketch 同意初稿
-//func AcceptSketch(ctx context.Context, TaskIDs []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()}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
-//		return err
-//	}
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{SketchStatus: 5}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//
-//	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{TaskStage: 11}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//	return nil
-//}
+// SketchOption 提交意见
+func LocalSketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, projectid string) error {
+	db := GetReadDB(ctx)
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
+	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
+	}
+	var project gorm_model.YounggeeLocalLifeInfo
+	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", projectid).Find(&project).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Find ProjectInfo error,err:%+v", err)
+		return err
+	}
+
+	var draft_default gorm_model.InfoAutoTask
+	err = db.Model(gorm_model.InfoAutoTask{}).Where("auto_task_id = ?", project.AutoTaskId).Find(&draft_default).Error
+	if err != nil {
+		return err
+	}
+
+	duration := time.Duration(draft_default.DraftDefault) * time.Hour
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 3, CurBreakAt: time.Now().Add(duration)}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: 9}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
 
 // 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, projectid string, isspecial int) 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
+	opid = operatorid
+	optype = 3
+	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, "revise_opinion": "初稿通过"}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
 		return err
@@ -250,6 +252,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 {
@@ -270,10 +273,78 @@ func AcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, oper
 	return nil
 }
 
+// AcceptSketch 同意初稿
+func LocalAcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, projectid string, isspecial int) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
+	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": opid, "b_operator_type": optype}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
+		return err
+	}
+
+	var project gorm_model.YounggeeLocalLifeInfo
+	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", projectid).Find(&project).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Find ProjectInfo error,err:%+v", err)
+		return err
+	}
+	taskstages := 11
+	nextstage := [6]int{0, 0, 0, 0, 0, 0} // 数组长度为6,表示6种工具 4,9,11,13
+	if isspecial == 1 {
+
+		toolList := strings.Split(project.Tools, ",")
+		for _, tool := range toolList {
+			// 将 tool 转换为整数
+			if t, err := strconv.Atoi(tool); err == nil && t >= 0 && t <= len(nextstage) {
+				nextstage[t-1] = 1
+			}
+		}
+		for i := 3; i < len(nextstage); i++ { // 从位置1开始
+			if nextstage[i] == 1 {
+				switch i {
+				case 3:
+					taskstages = 11
+				case 4:
+					taskstages = 13
+				case 5:
+					taskstages = 15
+				}
+				break
+			}
+		}
+	}
+	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 {
+		return err
+	}
+	duration := time.Duration(link_default.LinkBreach) * time.Hour
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 5, CurBreakAt: time.Now().Add(duration)}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: taskstages}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
+
 // RejectSketch 不同意初稿
-func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string) error {
+func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
 	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
@@ -306,17 +377,67 @@ func RejectSketch(ctx context.Context, TaskIDs []string, operatorid string, oper
 	return nil
 }
 
+// RejectSketch 不同意初稿
+func LocalRejectSketch(ctx context.Context, TaskIDs []string, operatorid string, projectid string) error {
+	var opid string
+	var optype int
+	opid = operatorid
+	optype = 3
+	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": opid, "b_operator_type": optype}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
+		return err
+	}
+
+	var project gorm_model.YounggeeLocalLifeInfo
+	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", projectid).Find(&project).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
+		return err
+	}
+
+	var draft_default gorm_model.InfoAutoTask
+	err = db.Model(gorm_model.InfoAutoTask{}).Where("auto_task_id = ?", project.AutoTaskId).Find(&draft_default).Error
+	if err != nil {
+		return err
+	}
+	duration := time.Duration(draft_default.DraftDefault) * time.Hour
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 3, CurBreakAt: time.Now().Add(duration)}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
+		return err
+	}
+
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: 9}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
+
 // FindPhoto
 func FindSketchInfo(ctx context.Context, TaskID string) (*gorm_model.YounggeeSketchInfo, error) {
 	db := GetReadDB(ctx)
 	var SketchInfo gorm_model.YounggeeSketchInfo
-	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_ok = 1", TaskID).Find(&SketchInfo).Error
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 0", TaskID).Find(&SketchInfo).Error
 	if err != nil {
 		return nil, err
 	}
 	return &SketchInfo, nil
 }
 
+func FindAllSketchInfo(ctx context.Context, taskid string) ([]gorm_model.YounggeeSketchInfo, error) {
+	db := GetReadDB(ctx)
+	var SketchInfo []gorm_model.YounggeeSketchInfo
+	err := db.Model(gorm_model.YounggeeSketchInfo{}).Where("task_id = ? and is_review = 1", taskid).Find(&SketchInfo).Error
+	if err != nil {
+		return nil, err
+	}
+	return SketchInfo, nil
+}
+
 // FindPhoto
 func FindPhoto(ctx context.Context, SketchID int64) ([]gorm_model.YounggeeSketchPhoto, error) {
 	db := GetReadDB(ctx)
@@ -326,6 +447,7 @@ func FindPhoto(ctx context.Context, SketchID int64) ([]gorm_model.YounggeeSketch
 		return nil, err
 	}
 	return SketchPhotos, nil
+
 }
 
 // GetSpecialTaskSketchList 专项任务-查询上传初稿的task list
@@ -344,9 +466,9 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 		if tag == "sketch_status" {
 			fmt.Printf("sketch %+v", value.Interface() == int64(0))
 			if value.Interface() == int64(0) {
-				db = db.Where("task_stage = ?", 10)
+				db = db.Where("task_stage = 10")
 			} else {
-				db = db.Where("task_stage > ?", 10)
+				db = db.Where("task_stage > 10 and task_stage <> 16")
 			}
 			continue
 		} else if !util.IsBlank(value) {
@@ -372,8 +494,8 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 	var taskIds []string
 	taskMap := make(map[string]gorm_model.YoungeeTaskInfo)
 	for _, taskInfo := range taskInfos {
-		taskIds = append(taskIds, taskInfo.TaskId)
-		taskMap[taskInfo.TaskId] = taskInfo
+		taskIds = append(taskIds, taskInfo.TaskID)
+		taskMap[taskInfo.TaskID] = taskInfo
 	}
 	db1 := GetReadDB(ctx)
 	db1 = db1.Debug().Model(gorm_model.YounggeeSketchInfo{})
@@ -385,6 +507,7 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 	} else {
 		db1 = db1.Where("is_ok = 1").Find(&SketchInfos)
 	}
+	//fmt.Printf("初稿查询:%+v", SketchInfos)
 	SketchMap := make(map[string]gorm_model.YounggeeSketchInfo)
 	for _, SketchInfo := range SketchInfos {
 		SketchMap[SketchInfo.TaskID] = SketchInfo
@@ -395,23 +518,16 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 		logrus.WithContext(ctx).Errorf("[GetProjectTalentList] error query mysql total, err:%+v", err)
 		return nil, 0, err
 	}
-	var misNum int64
-	if totalSketch > totalTask {
-		misNum = totalSketch - totalTask
-	} else {
-		misNum = totalTask - totalSketch
-	}
-	//logrus.Println("totalSketch,totalTalent,misNum:", totalSketch, totalTask, misNum)
-
-	// 查询该页数据
-	limit := pageSize + misNum
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
 
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
+	//// 查询该页数据
+	//limit := pageSize
+	//offset := pageSize * pageNum // assert pageNum start with 0
+	//err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+	//
+	//if err != nil {
+	//	logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+	//	return nil, 0, err
+	//}
 
 	var TaskSketches []*http_model.SpecialTaskSketch
 	var taskSketches []*http_model.SpecialTaskSketchInfo
@@ -430,7 +546,7 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 			newTaskSketches = append(newTaskSketches, v)
 		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
 			newTaskSketches = append(newTaskSketches, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
+		} else if strings.Contains(conv.MustString(v.TaskID), platform_nickname) {
 			newTaskSketches = append(newTaskSketches, v)
 		} else {
 			totalTask--
@@ -438,135 +554,3 @@ func GetSpecialTaskSketchList(ctx context.Context, projectID string, pageSize, p
 	}
 	return newTaskSketches, totalTask, nil
 }
-
-// SketchOption 提交意见
-func LocalSketchOption(ctx context.Context, TaskID string, ReviseOpinion string, operatorid string, operatetype int, projectid 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
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] call RevisieOption error,err:%+v", err)
-		return err
-	}
-	var project gorm_model.YounggeeLocalLifeInfo
-	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", projectid).Find(&project).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Find ProjectInfo error,err:%+v", err)
-		return err
-	}
-
-	var draft_default gorm_model.InfoAutoTask
-	err = db.Model(gorm_model.InfoAutoTask{}).Where("auto_task_id = ?", project.AutoTaskId).Find(&draft_default).Error
-	if err != nil {
-		return err
-	}
-
-	duration := time.Duration(draft_default.DraftDefault) * time.Hour
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 3, CurBreakAt: time.Now().Add(duration)}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id = ?", TaskID).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: 9}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// AcceptSketch 同意初稿
-func LocalAcceptSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid string, isspecial int) 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
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
-		return err
-	}
-
-	var project gorm_model.YounggeeLocalLifeInfo
-	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("LocalId = ?", projectid).Find(&project).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Find ProjectInfo error,err:%+v", err)
-		return err
-	}
-	taskstages := 11
-	nextstage := [6]int{0, 0, 0, 0, 0, 0} // 数组长度为6,表示6种工具 4,9,11,13
-	if isspecial == 1 {
-
-		toolList := strings.Split(project.Tools, ",")
-		for _, tool := range toolList {
-			// 将 tool 转换为整数
-			if t, err := strconv.Atoi(tool); err == nil && t >= 0 && t <= len(nextstage) {
-				nextstage[t-1] = 1
-			}
-		}
-		for i := 3; i < len(nextstage); i++ { // 从位置1开始
-			if nextstage[i] == 1 {
-				switch i {
-				case 3:
-					taskstages = 11
-				case 4:
-					taskstages = 13
-				case 5:
-					taskstages = 15
-				}
-				break
-			}
-		}
-	}
-	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 {
-		return err
-	}
-	duration := time.Duration(link_default.LinkBreach) * time.Hour
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 5, CurBreakAt: time.Now().Add(duration)}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: taskstages}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// RejectSketch 不同意初稿
-func LocalRejectSketch(ctx context.Context, TaskIDs []string, operatorid string, operatetype int, projectid 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": 0, "is_review": 1, "reject_at": time.Now(), "b_operator": operatorid, "b_operator_type": operatetype}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeSketchInfo error,err:%+v", err)
-		return err
-	}
-
-	var project gorm_model.YounggeeLocalLifeInfo
-	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("LocalId = ?", projectid).Find(&project).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
-		return err
-	}
-
-	var draft_default gorm_model.InfoAutoTask
-	err = db.Model(gorm_model.InfoAutoTask{}).Where("auto_task_id = ?", project.AutoTaskId).Find(&draft_default).Error
-	if err != nil {
-		return err
-	}
-	duration := time.Duration(draft_default.DraftDefault) * time.Hour
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{SketchStatus: 3, CurBreakAt: time.Now().Add(duration)}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
-		return err
-	}
-
-	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{TaskStage: 9}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Sketch db] Update YounggeeLocalLifeInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}

+ 8 - 8
db/talent.go

@@ -153,11 +153,11 @@ func GetTaskRecord(ctx context.Context, talentId string) (*http_model.GetTaskRec
 	}
 	projectIdMap := map[string]gorm_model.ProjectInfo{}
 	for _, taskInfo := range taskInfos {
-		if _, ok := projectIdMap[taskInfo.ProjectId]; !ok {
+		if _, ok := projectIdMap[taskInfo.ProjectID]; !ok {
 			db1 := GetReadDB(ctx)
 			projectInfo := gorm_model.ProjectInfo{}
-			db1.Where("project_id = ?", taskInfo.ProjectId).First(&projectInfo)
-			projectIdMap[taskInfo.ProjectId] = projectInfo
+			db1.Where("project_id = ?", taskInfo.ProjectID).First(&projectInfo)
+			projectIdMap[taskInfo.ProjectID] = projectInfo
 		}
 	}
 	var taskRecordDatas []*http_model.TaskRecordData
@@ -165,11 +165,11 @@ func GetTaskRecord(ctx context.Context, talentId string) (*http_model.GetTaskRec
 		updateAt := conv.MustString(taskInfo.UpdateAt, "")
 		updateAt = updateAt[0:19]
 		taskRecordData := http_model.TaskRecordData{
-			ProjectId:       conv.MustString(taskInfo.ProjectId, ""),
-			ProjectName:     projectIdMap[taskInfo.ProjectId].ProjectName,
-			ProjectType:     consts.GetProjectType(projectIdMap[taskInfo.ProjectId].ProjectType),
-			ProjectPlatform: consts.GetProjectPlatform(projectIdMap[taskInfo.ProjectId].ProjectPlatform),
-			TaskId:          conv.MustString(taskInfo.TaskId, ""),
+			ProjectId:       conv.MustString(taskInfo.ProjectID, ""),
+			ProjectName:     projectIdMap[taskInfo.ProjectID].ProjectName,
+			ProjectType:     consts.GetProjectType(projectIdMap[taskInfo.ProjectID].ProjectType),
+			ProjectPlatform: consts.GetProjectPlatform(projectIdMap[taskInfo.ProjectID].ProjectPlatform),
+			TaskId:          conv.MustString(taskInfo.TaskID, ""),
 			TaskStage:       consts.GetTaskStage(taskInfo.TaskStage),
 			UpdatedAt:       updateAt,
 		}

+ 353 - 364
db/task.go

@@ -3,7 +3,6 @@ package db
 import (
 	"context"
 	"fmt"
-	"github.com/tidwall/gjson"
 	"reflect"
 	"strconv"
 	"strings"
@@ -14,16 +13,17 @@ import (
 	"youngee_m_api/pack"
 	"youngee_m_api/util"
 
-	"github.com/caixw/lib.go/conv"
-	"gorm.io/gorm"
-
+	"github.com/issue9/conv"
 	"github.com/sirupsen/logrus"
+	"github.com/tidwall/gjson"
+	"gorm.io/gorm"
 )
 
 func GetTaskList(ctx context.Context, projectID string) ([]gorm_model.YoungeeTaskInfo, error) {
 	db := GetReadDB(ctx)
-	var tasks []gorm_model.YoungeeTaskInfo
-	err := db.Where("project_id = ? AND task_status = 2", projectID).Find(&tasks).Error
+	tasks := []gorm_model.YoungeeTaskInfo{}
+
+	err := db.Where("project_id=? and task_status = 2", projectID).Find(&tasks).Error
 	if err != nil {
 		return nil, err
 	}
@@ -31,6 +31,7 @@ func GetTaskList(ctx context.Context, projectID string) ([]gorm_model.YoungeeTas
 }
 
 func UpdateLogisticsStatus(ctx context.Context, taskID string, status int64) error {
+
 	db := GetReadDB(ctx)
 	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskID).Update("logistics_status", status).Error
 	if err != nil {
@@ -41,6 +42,7 @@ func UpdateLogisticsStatus(ctx context.Context, taskID string, status int64) err
 }
 
 func UpdateLogisticsDate(ctx context.Context, taskID string) error {
+
 	db := GetReadDB(ctx)
 	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", taskID).Update("delivery_date", time.Now()).Error
 	if err != nil {
@@ -58,13 +60,16 @@ func GetProjectIdByTaskId(ctx context.Context, taskID string) (*string, error) {
 		logrus.WithContext(ctx).Errorf("[task db] call UpdateLogisticsStatus error,err:%+v", err)
 		return nil, err
 	}
-	return &task.ProjectId, nil
+	return &task.ProjectID, nil
 }
 
 func ChangeTaskStatus(ctx context.Context, taskIds []string, taskStatus string) ([]int64, error) {
 	db := GetReadDB(ctx)
-
-	taskSta := conv.MustInt(taskStatus, 0)
+	taskSta, err := strconv.Atoi(taskStatus)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]1 error query mysql total, err:%+v", err)
+		return nil, err
+	}
 	if err := db.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).
 		Updates(gorm_model.YoungeeTaskInfo{TaskStatus: taskSta}).Error; err != nil {
 		logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]2 error query mysql total, err:%+v", err)
@@ -72,7 +77,7 @@ func ChangeTaskStatus(ctx context.Context, taskIds []string, taskStatus string)
 	}
 
 	var taskInfos []gorm_model.YoungeeTaskInfo
-	err := db.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).Find(&taskInfos).Error
+	err = db.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).Find(&taskInfos).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]3 error query mysql total, err:%+v", err)
 		return nil, err
@@ -80,7 +85,7 @@ func ChangeTaskStatus(ctx context.Context, taskIds []string, taskStatus string)
 	var recruitStrategysIDs []int64
 	recruitStrategys := gorm_model.RecruitStrategy{}
 	for _, taskInfo := range taskInfos {
-		err2 := db.Debug().Model(gorm_model.RecruitStrategy{}).Where("project_id=? AND strategy_id=?", taskInfo.ProjectId, taskInfo.StrategyId).Scan(&recruitStrategys).Error
+		err2 := db.Debug().Model(gorm_model.RecruitStrategy{}).Where("project_id=? AND strategy_id=?", taskInfo.ProjectID, taskInfo.StrategyID).Scan(&recruitStrategys).Error
 		if err2 != nil {
 			logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]4 error query mysql total, err:%+v", err2)
 			return nil, err2
@@ -98,30 +103,9 @@ func ChangeSpecialTaskStatus(ctx context.Context, taskIds []string, taskStatus s
 		logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]1 error query mysql total, err:%+v", err)
 		return err
 	}
-	err = db.Transaction(func(tx *gorm.DB) error {
-		if err := tx.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).
-			Updates(gorm_model.YoungeeTaskInfo{TaskStatus: status, TaskStage: stage, SelectDate: time.Now()}).Error; err != nil {
-			logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]2 error query mysql total, err:%+v", err)
-			return err
-		}
-		return nil
-	})
-	if err != nil {
-		return err
-	}
-	//if err := db.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).
-	//	Updates(gorm_model.YoungeeTaskInfo{TaskStatus: status, TaskStage: stage, SelectDate: time.Now()}).Error; err != nil {
-	//	logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]2 error query mysql total, err:%+v", err)
-	//	return err
-	//}
-	return nil
-}
-
-func UpdateTaskStage(ctx context.Context, projectID string, taskStatus int64, taskStage int64) error {
-	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("project_id=? and task_status = ?", projectID, taskStatus).Update("task_stage", taskStage).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[UpdateTaskStatusPaying]2 error query mysql total, err:%+v", err)
+	if err := db.Debug().Model(&gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", taskIds).
+		Updates(gorm_model.YoungeeTaskInfo{TaskStatus: status, TaskStage: stage, SelectDate: time.Now()}).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[ChangeTaskStatus]2 error query mysql total, err:%+v", err)
 		return err
 	}
 	return nil
@@ -146,156 +130,27 @@ func UpdateTaskStageByProjectId(ctx context.Context, projectID string, taskStatu
 	}
 	return nil
 }
-
-func GetSpecialTaskInviteList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskInviteInfo, int64, error) {
+func UpdateTaskStageByTaskId(ctx context.Context, taskID string, taskStatus int64, taskStage int64) error {
 	db := GetReadDB(ctx)
-	// 查询task表信息
-	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_stage != 3")
-	// 根据Project条件过滤
-	conditionType := reflect.TypeOf(conditions).Elem()
-	conditionValue := reflect.ValueOf(conditions).Elem()
-	var platform_nickname string = ""
-	for i := 0; i < conditionType.NumField(); i++ {
-		field := conditionType.Field(i)
-		tag := field.Tag.Get("condition")
-		value := conditionValue.FieldByName(field.Name)
-		if tag == "task_status" {
-			fmt.Printf("link %+v", value.Interface() == int64(0))
-			if value.Interface() == int64(0) {
-				db = db.Where("task_status <> 2")
-			} else {
-				db = db.Where("task_status = 2")
-			}
-			continue
-		} else if !util.IsBlank(value) {
-			if tag == "platform_nickname" {
-				platform_nickname = fmt.Sprintf("%v", value.Interface())
-				continue
-			} else if tag == "project_id" {
-				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
-			}
-		}
-	}
-	var taskInfos []gorm_model.YoungeeTaskInfo
-	db = db.Model(gorm_model.YoungeeTaskInfo{})
-	// 查询总数
-	var totalTask int64
-	if err := db.Count(&totalTask).Error; err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
-	}
-	db.Order("task_id").Find(&taskInfos)
-
-	// 查询该页数据
-	limit := pageSize
-	offset := pageSize * pageNum // assert pageNum start with 0
-	err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id=? and task_status = ?", taskID, taskStatus).Update("task_stage", taskStage).Error
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
-		return nil, 0, err
+		logrus.WithContext(ctx).Errorf("[UpdateTaskStageByTaskId]2 error query mysql total, err:%+v", err)
+		return err
 	}
+	return nil
+}
 
-	var taskDatas []*http_model.SpecialTaskInviteInfo
-	var newTaskDatas []*http_model.SpecialTaskInviteInfo
-
-	taskDatas = pack.YoungeeTaskInfoToSpecialTaskInviteInfo(taskInfos)
-
-	for _, v := range taskDatas {
-		if platform_nickname == "" {
-			newTaskDatas = append(newTaskDatas, v)
-		} else if strings.Contains(v.PlatformNickname, platform_nickname) {
-			newTaskDatas = append(newTaskDatas, v)
-		} else if strings.Contains(conv.MustString(v.TaskID, ""), platform_nickname) {
-			newTaskDatas = append(newTaskDatas, v)
-		} else {
-			totalTask--
-		}
+func GetUnfinishedTaskNumber(ctx context.Context, projectID string) (*int64, error) {
+	var unFinishedTaskNumber int64
+	db := GetReadDB(ctx)
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("project_id = ? and task_status = 2 and task_stage < 15", projectID).Count(&unFinishedTaskNumber).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Data db] Find YounggeeTaskInfo error,err:%+v", err)
+		return nil, err
 	}
-	return newTaskDatas, totalTask, nil
+	return &unFinishedTaskNumber, nil
 }
 
-//// SetTaskFinish 任务结案
-//func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
-//	db := GetReadDB(ctx)
-//	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
-//	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).
-//		Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
-//	if err != nil {
-//		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
-//		return err
-//	}
-//
-//	// 2. 修改招募策略表,更新粉丝量、播放量、点赞数、收藏数、评论数、总支付、结案数量
-//	for _, v := range TaskIDs {
-//		// 查询task_info
-//		db = GetReadDB(ctx)
-//		taskInfo := gorm_model.YoungeeTaskInfo{}
-//		err1 := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id = ?", v).Scan(&taskInfo).Error
-//		if err1 != nil {
-//			logrus.WithContext(ctx).Errorf("[Task db] Find YoungeeTaskInfo error,err:%+v", err)
-//			return err1
-//		}
-//		//查询project_info
-//		projectInfo := gorm_model.ProjectInfo{}
-//		err1 = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo).Error
-//		if err1 != nil {
-//			logrus.WithContext(ctx).Errorf("[Task db] Find ProjectInfo error,err:%+v", err)
-//			return err1
-//		}
-//		// 查询data_info
-//		db = GetReadDB(ctx)
-//		dataInfo := gorm_model.YounggeeDataInfo{}
-//		err1 = db.Model(gorm_model.YounggeeDataInfo{}).Where("task_id = ? and is_ok = 1", v).Scan(&dataInfo).Error
-//		if err1 != nil {
-//			logrus.WithContext(ctx).Errorf("[Task db] Find YounggeeDataInfo error,err:%+v", err)
-//			return err1
-//		}
-//
-//		// 2. 创建任务收益
-//		var productStruct gorm_model.YounggeeProduct
-//		if err = json.Unmarshal([]byte(projectInfo.ProductSnap), &productStruct); err != nil {
-//			fmt.Println("Error:", err)
-//			return err
-//		}
-//		t := time.Now()
-//		income := gorm_model.YounggeeTalentIncome{
-//			TalentID:       taskInfo.TalentId,
-//			ProjectID:      taskInfo.ProjectId,
-//			SectaskID:      taskInfo.TaskId,
-//			BrandName:      productStruct.BrandName,
-//			TaskName:       projectInfo.ProjectName,
-//			Income:         strconv.FormatFloat(taskInfo.SettleAmount, 'f', 10, 32),
-//			IncomeType:     1,
-//			WithdrawStatus: 1,
-//			IncomeAt:       &t,
-//			WithdrawAt:     nil,
-//		}
-//		err = CreateIncome(ctx, income, nil)
-//		if err != nil {
-//			logrus.WithContext(ctx).Errorf("[projectPay service] call SpecialSettlePay error,err:%+v", err)
-//			return err
-//		}
-//
-//		// 更新招募策略
-//		db = GetReadDB(ctx)
-//		db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectId, taskInfo.StrategyId)
-//		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count"), ""))
-//		err = db.Updates(map[string]interface{}{
-//			"fan_number":     gorm.Expr("fan_number + ?", fansCount),
-//			"play_number":    gorm.Expr("play_number + ?", dataInfo.PlayNumber),
-//			"like_number":    gorm.Expr("like_number + ?", dataInfo.LikeNumber),
-//			"collect_number": gorm.Expr("collect_number + ?", dataInfo.CollectNumber),
-//			"comment_number": gorm.Expr("comment_number + ?", dataInfo.CommentNumber),
-//			"finish_number":  gorm.Expr("finish_number + 1"),
-//			"total_offer":    gorm.Expr("total_offer + ?", taskInfo.RealPayment)}).Error
-//		if err != nil {
-//			logrus.WithContext(ctx).Errorf("[Task db] Update YounggeeDataInfo error,err:%+v", err)
-//			return err
-//		}
-//	}
-//	return nil
-//}
-
 // SetTaskFinish 任务结案
 func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 	db := GetReadDB(ctx)
@@ -317,7 +172,7 @@ func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 		}
 		//查询project_info
 		projectInfo := gorm_model.ProjectInfo{}
-		err1 = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Scan(&projectInfo).Error
+		err1 = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectID).Scan(&projectInfo).Error
 		if err1 != nil {
 			logrus.WithContext(ctx).Errorf("[Task db] Find ProjectInfo error,err:%+v", err)
 			return err1
@@ -333,9 +188,9 @@ func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 
 		t := time.Now()
 		income := gorm_model.YounggeeTalentIncome{
-			TalentID:  taskInfo.TalentId,
-			ProjectID: taskInfo.ProjectId,
-			TaskID:    taskInfo.TaskId,
+			TalentID:  taskInfo.TalentID,
+			ProjectID: taskInfo.ProjectID,
+			TaskID:    taskInfo.TaskID,
 			Type:      1,
 			//BrandName:      productStruct.BrandName,
 			TaskName: projectInfo.ProjectName,
@@ -355,8 +210,8 @@ func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 		// 3. 修改招募策略表,更新粉丝量、播放量、点赞数、收藏数、评论数、总支付、结案数量
 		// 更新招募策略
 		db = GetReadDB(ctx)
-		db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectId, taskInfo.StrategyId)
-		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count"), ""))
+		db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.ProjectID, taskInfo.StrategyID)
+		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count")))
 		err = db.Updates(map[string]interface{}{
 			"fan_number":     gorm.Expr("fan_number + ?", fansCount),
 			"play_number":    gorm.Expr("play_number + ?", dataInfo.PlayNumber),
@@ -373,102 +228,6 @@ func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 	return nil
 }
 
-// SetTaskFinish 专项任务结案
-func SetSpecialTaskFinish(ctx context.Context, TaskIDs []string) error {
-	db := GetReadDB(ctx)
-	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// SetTaskFinish 专项任务结案
-func SetSpecialLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
-	db := GetReadDB(ctx)
-	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
-	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
-		return err
-	}
-	return nil
-}
-
-// SetSpecialTaskSettleNum 结案人数+1
-func SetSpecialLocalTaskSettleNum(ctx context.Context, TaskIDs []string) error {
-	db := GetReadDB(ctx)
-	//4.根据达人来源改变状态、阶段、数目
-	var tasks []gorm_model.YoungeeLocalTaskInfo
-	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id IN ? ", TaskIDs).Find(&tasks).Error
-	if err != nil {
-		return err
-	}
-	for _, taskInfo := range tasks {
-		if taskInfo.SupplierId != 0 && taskInfo.SupplierStatus == 2 {
-			//project招募数+1,预估成本+服务商价格
-			var projectinfo gorm_model.YounggeeLocalLifeInfo
-			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", taskInfo.LocalId).Find(&projectinfo).Error
-			if err != nil {
-				return err
-			}
-			projectinfo.SettleNum += 1
-			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ? ", taskInfo.LocalId).Updates(projectinfo).Error
-			if err != nil {
-				return err
-			}
-			//服务商s_project已招募人数+1
-			var sprojectinfo gorm_model.YounggeeSLocalLifeInfo
-			err = db.Model(gorm_model.YounggeeSLocalLifeInfo{}).Where(" s_local_life_id =?", taskInfo.SLocalLifeId).Find(&sprojectinfo).Error
-			if err != nil {
-				return err
-			}
-			sprojectinfo.RecruitNum += 1
-			fmt.Println("......", projectinfo.RecruitNum)
-			err = db.Model(gorm_model.YounggeeSLocalLifeInfo{}).Where(" s_local_life_id =?", taskInfo.SLocalLifeId).Updates(sprojectinfo).Error
-			if err != nil {
-				return err
-			}
-		}
-		if taskInfo.SupplierId == 0 && taskInfo.SupplierStatus == 0 {
-			//project招募数+1
-			var projectinfo gorm_model.YounggeeLocalLifeInfo
-			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", taskInfo.LocalId).Find(&projectinfo).Error
-			if err != nil {
-				return err
-			}
-			projectinfo.SettleNum += 1
-			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ? ", taskInfo.LocalId).Updates(projectinfo).Error
-			if err != nil {
-				return err
-			}
-		}
-	}
-	return nil
-}
-
-func SetTalentIncome(ctx context.Context, TaskIDs []string) error {
-	db := GetReadDB(ctx)
-	var TaskInfoList []gorm_model.YoungeeTaskInfo
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Scan(&TaskInfoList).Error
-	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
-		return err
-	}
-	for _, taskInfo := range TaskInfoList {
-		err := db.Model(gorm_model.YoungeeTalentInfo{}).Where("id = ?", taskInfo.TalentId).Updates(map[string]interface{}{
-			"income":      gorm.Expr("income + ?", taskInfo.SettleAmount),
-			"canwithdraw": gorm.Expr("canwithdraw + ?", taskInfo.SettleAmount)}).Error
-		if err != nil {
-			logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
-			return err
-		}
-	}
-	return nil
-}
-
 // SetTaskFinish 任务结案
 func SetLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
 	db := GetReadDB(ctx)
@@ -490,7 +249,7 @@ func SetLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
 		}
 		//查询project_info
 		projectInfo := gorm_model.YounggeeLocalLifeInfo{}
-		err1 = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("project_id = ?", taskInfo.LocalId).Scan(&projectInfo).Error
+		err1 = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", taskInfo.LocalId).Scan(&projectInfo).Error
 		if err1 != nil {
 			logrus.WithContext(ctx).Errorf("[Task db] Find ProjectInfo error,err:%+v", err)
 			return err1
@@ -504,24 +263,6 @@ func SetLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
 			return err1
 		}
 
-		// 2. 创建任务收益
-		//var productStruct gorm_model.YounggeeProduct
-		//if err = json.Unmarshal([]byte(projectInfo.ProductSnap), &productStruct); err != nil {
-		//	fmt.Println("Error:", err)
-		//	return err
-		//}
-		//var productPhotoStruct []gorm_model.YounggeeProductPhoto
-		//if err = json.Unmarshal([]byte(projectInfo.ProductPhotoSnap), &productPhotoStruct); err != nil {
-		//	fmt.Println("Error:", err)
-		//	return err
-		//}
-		//var mainPhoto = ""
-		//for _, w := range productPhotoStruct {
-		//	if w.Symbol == 1 {
-		//		mainPhoto = w.PhotoUrl
-		//	}
-		//}
-
 		t := time.Now()
 		income := gorm_model.YounggeeTalentIncome{
 			TalentID:  taskInfo.TalentId,
@@ -547,7 +288,7 @@ func SetLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
 		// 更新招募策略
 		db = GetReadDB(ctx)
 		db = db.Model(gorm_model.RecruitStrategy{}).Where("project_id = ? and strategy_id = ?", taskInfo.LocalId, taskInfo.StrategyId)
-		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count"), ""))
+		fansCount, _ := strconv.Atoi(conv.MustString(gjson.Get(taskInfo.TalentPlatformInfoSnap, "fans_count")))
 		err = db.Updates(map[string]interface{}{
 			"fan_number":     gorm.Expr("fan_number + ?", fansCount),
 			"play_number":    gorm.Expr("play_number + ?", dataInfo.PlayNumber),
@@ -564,78 +305,89 @@ func SetLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
 	return nil
 }
 
-func SetLocalTalentIncome(ctx context.Context, TaskIDs []string) error {
+// SetTaskFinish 专项任务结案
+func SetSpecialTaskFinish(ctx context.Context, TaskIDs []string) error {
 	db := GetReadDB(ctx)
-	var TaskInfoList []gorm_model.YoungeeLocalTaskInfo
-	fmt.Println("收入", TaskIDs)
-	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Scan(&TaskInfoList).Error
+	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
+		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
 		return err
 	}
-	for _, taskInfo := range TaskInfoList {
-		err := db.Model(gorm_model.YoungeeTalentInfo{}).Where("id = ?", taskInfo.TalentId).Updates(map[string]interface{}{
-			"income":      gorm.Expr("income + ?", taskInfo.SettleAmount),
-			"canwithdraw": gorm.Expr("canwithdraw + ?", taskInfo.SettleAmount)}).Error
-		if err != nil {
-			logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
-			return err
-		}
-	}
 	return nil
 }
-func GetUnfinishedTaskNumber(ctx context.Context, projectID string) (*int64, error) {
-	var unFinishedTaskNumber int64
+
+func SetProjectSettleFlag(ctx context.Context, projectid string) error {
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("project_id = ? and task_status = 2 and task_stage < 15", projectID).Count(&unFinishedTaskNumber).Error
+	var tasks []gorm_model.YoungeeTaskInfo
+	err := db.Where("project_id = ?", projectid).Find(&tasks).Error
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[Data db] Find YounggeeTaskInfo error,err:%+v", err)
-		return nil, err
+		return err
 	}
-	return &unFinishedTaskNumber, nil
+	settleflag := 1
+	for _, task := range tasks {
+		if task.TaskStage != 15 && task.TaskStage != 16 {
+			settleflag = 0
+		}
+	}
+	err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", projectid).Update("settle_flag", settleflag).Error
+	if err != nil {
+		return err
+	}
+	return nil
 }
 
-func UpdateTaskStageByTaskId(ctx context.Context, taskID string, taskStatus int64, taskStage int64) error {
+func SetSettleAmount(ctx context.Context, settleamount *string, TaskIDs []string) error {
 	db := GetReadDB(ctx)
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id=? and task_status = ?", taskID, taskStatus).Update("task_stage", taskStage).Error
+	// 2. 转换 *string → float64
+	amount, err := strconv.ParseFloat(*settleamount, 64)
+	if err != nil {
+		return fmt.Errorf("invalid settleamount: %v", err)
+	}
+
+	// 3. 查询任务列表
+	var tasks []gorm_model.YoungeeTaskInfo
+	err = db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id IN ?", TaskIDs).Find(&tasks).Error
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[UpdateTaskStageByTaskId]2 error query mysql total, err:%+v", err)
 		return err
 	}
+
+	// 4. 更新 SettleAmount
+	for _, taskInfo := range tasks {
+		taskInfo.SettleAmount = amount
+		if err := db.Save(&taskInfo).Error; err != nil {
+			logrus.WithContext(ctx).Errorf("failed to update task SettleAmount")
+			return fmt.Errorf("failed to update task %s: %v", taskInfo.TaskID, err)
+		}
+	}
+
 	return nil
 }
 
-// 获取任务ids
-func GetTaskIds(ctx context.Context, projectId string) ([]string, error) {
+func SetLocalSettleAmount(ctx context.Context, settleamount *string, TaskIDs []string) error {
 	db := GetReadDB(ctx)
-	var taskIds []string
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id = ? and task_status = 2", projectId).Find(&taskIds).Error
+	// 2. 转换 *string → float64
+	amount, err := strconv.ParseFloat(*settleamount, 64)
 	if err != nil {
-		logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
-		return nil, err
+		return fmt.Errorf("invalid settleamount: %v", err)
 	}
 
-	return taskIds, nil
-}
-
-func UpdateTask(ctx context.Context, updateData gorm_model.YoungeeTaskInfo, tx *gorm.DB) (bool, error) {
-	db := GetWriteDB(ctx)
-	whereCondition := gorm_model.YoungeeTaskInfo{
-		TaskId: updateData.TaskId,
+	// 3. 查询任务列表
+	var tasks []gorm_model.YoungeeLocalTaskInfo
+	err = db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id IN ?", TaskIDs).Find(&tasks).Error
+	if err != nil {
+		return err
 	}
-	if tx != nil {
-		err := tx.Where(whereCondition).Updates(&updateData).Error
-		if err != nil {
-			return false, err
-		}
-	} else {
-		err := db.Where(whereCondition).Updates(&updateData).Error
-		if err != nil {
-			return false, err
+
+	// 4. 更新 SettleAmount
+	for _, taskInfo := range tasks {
+		taskInfo.SettleAmount = amount
+		if err := db.Save(&taskInfo).Error; err != nil {
+			logrus.WithContext(ctx).Errorf("failed to update task SettleAmount")
+			return fmt.Errorf("failed to update task %s: %v", taskInfo.TaskId, err)
 		}
 	}
-
-	return true, nil
+	return nil
 }
 
 // SetSpecialTaskSettleNum 结案人数+1
@@ -649,39 +401,107 @@ func SetSpecialTaskSettleNum(ctx context.Context, TaskIDs []string) error {
 	}
 	for _, taskInfo := range tasks {
 		if taskInfo.SupplierId != 0 && taskInfo.SupplierStatus == 2 {
-			//project招募数+1,预估成本+服务商价格
-			var projectinfo gorm_model.ProjectInfo
-			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Find(&projectinfo).Error
+			// 在事务中更新
+			err = db.Transaction(func(tx *gorm.DB) error {
+				// 更新 ProjectInfo
+				if err := tx.Model(gorm_model.ProjectInfo{}).
+					Where("project_id = ?", taskInfo.ProjectID).
+					Update("settle_num", gorm.Expr("settle_num + ?", 1)).
+					Error; err != nil {
+					return err
+				}
+				// 更新 YounggeeSProjectInfo
+				if err := tx.Model(gorm_model.YounggeeSProjectInfo{}).
+					Where("project_id = ?", taskInfo.SprojectId).
+					Update("settle_num", gorm.Expr("settle_num + ?", 1)).
+					Error; err != nil {
+					return err
+				}
+				return nil
+			})
 			if err != nil {
-				return err
+				return fmt.Errorf("failed to update settle_num: %v", err)
 			}
-			projectinfo.SettleNum += 1
-			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ? ", taskInfo.ProjectId).Updates(projectinfo).Error
+		}
+		if taskInfo.SupplierId == 0 && taskInfo.SupplierStatus == 0 {
+			//project招募数+1
+			var projectinfo gorm_model.ProjectInfo
+			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectID).Find(&projectinfo).Error
 			if err != nil {
 				return err
 			}
-			//服务商s_project已招募人数+1
-			var sprojectinfo gorm_model.YounggeeSProjectInfo
-			err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SProjectId).Find(&sprojectinfo).Error
+			projectinfo.SettleNum += 1
+			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ? ", taskInfo.ProjectID).Updates(projectinfo).Error
 			if err != nil {
 				return err
 			}
-			sprojectinfo.RecruitNum += 1
-			fmt.Println("......", projectinfo.RecruitNum)
-			err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SProjectId).Updates(sprojectinfo).Error
+		}
+	}
+	return nil
+}
+func SetLocalLifeSettleFlag(ctx context.Context, localid string) error {
+	db := GetReadDB(ctx)
+	var tasks []gorm_model.YoungeeLocalTaskInfo
+	err := db.Where("local_id = ?", localid).Find(&tasks).Error
+	if err != nil {
+		return err
+	}
+	settleflag := 1
+	for _, taskInfo := range tasks {
+		if taskInfo.TaskStage != 15 && taskInfo.TaskStage != 16 {
+			settleflag = 0
+		}
+	}
+	err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", localid).Update("settle_flag", settleflag).Error
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// SetSpecialTaskSettleNum 结案人数+1
+func SetSpecialLocalTaskSettleNum(ctx context.Context, TaskIDs []string) error {
+	db := GetReadDB(ctx)
+	//4.根据达人来源改变状态、阶段、数目
+	var tasks []gorm_model.YoungeeLocalTaskInfo
+	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id IN ? ", TaskIDs).Find(&tasks).Error
+	if err != nil {
+		return err
+	}
+	for _, taskInfo := range tasks {
+		if taskInfo.SupplierId != 0 && taskInfo.SupplierStatus == 2 {
+			// 在事务中更新
+			err = db.Transaction(func(tx *gorm.DB) error {
+				// 更新 YounggeeLocalLifeInfo
+				if err := tx.Model(gorm_model.YounggeeLocalLifeInfo{}).
+					Where("local_id = ?", taskInfo.LocalId).
+					Update("settle_num", gorm.Expr("settle_num + ?", 1)).
+					Error; err != nil {
+					return err
+				}
+				// 更新 YounggeeSLocalLifeInfo
+				if err := tx.Model(gorm_model.YounggeeSLocalLifeInfo{}).
+					Where("s_local_life_id = ?", taskInfo.SLocalLifeId).
+					Update("settle_num", gorm.Expr("settle_num + ?", 1)).
+					Error; err != nil {
+					return err
+				}
+				return nil
+			})
 			if err != nil {
-				return err
+				return fmt.Errorf("failed to update settle_num: %v", err)
 			}
+
 		}
 		if taskInfo.SupplierId == 0 && taskInfo.SupplierStatus == 0 {
-			//project招募数+1
-			var projectinfo gorm_model.ProjectInfo
-			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ?", taskInfo.ProjectId).Find(&projectinfo).Error
+			//project结案人数+1
+			var projectinfo gorm_model.YounggeeLocalLifeInfo
+			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", taskInfo.LocalId).Find(&projectinfo).Error
 			if err != nil {
 				return err
 			}
 			projectinfo.SettleNum += 1
-			err = db.Model(gorm_model.ProjectInfo{}).Where("project_id = ? ", taskInfo.ProjectId).Updates(projectinfo).Error
+			err = db.Model(gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ? ", taskInfo.LocalId).Updates(projectinfo).Error
 			if err != nil {
 				return err
 			}
@@ -689,3 +509,172 @@ func SetSpecialTaskSettleNum(ctx context.Context, TaskIDs []string) error {
 	}
 	return nil
 }
+
+// SetTaskFinish 专项任务结案
+func SetSpecialLocalTaskFinish(ctx context.Context, TaskIDs []string) error {
+	db := GetReadDB(ctx)
+	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
+	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeLocalTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
+		return err
+	}
+	return nil
+}
+
+func GetSpecialTaskInviteList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.SpecialTaskInviteInfo, int64, error) {
+	db := GetReadDB(ctx)
+	// 查询task表信息
+	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{}).Where("task_stage != 3")
+	// 根据Project条件过滤
+	conditionType := reflect.TypeOf(conditions).Elem()
+	conditionValue := reflect.ValueOf(conditions).Elem()
+	var platformNickname string = ""
+	for i := 0; i < conditionType.NumField(); i++ {
+		field := conditionType.Field(i)
+		tag := field.Tag.Get("condition")
+		value := conditionValue.FieldByName(field.Name)
+		if tag == "task_status" {
+			fmt.Printf("link %+v", value.Interface() == int64(0))
+			if value.Interface() == int64(0) {
+				db = db.Where("task_status <> 2")
+			} else {
+				db = db.Where("task_status = 2")
+			}
+			continue
+		} else if !util.IsBlank(value) {
+			if tag == "platform_nickname" {
+				platformNickname = fmt.Sprintf("%v", value.Interface())
+				continue
+			} else if tag == "project_id" {
+				db = db.Where(fmt.Sprintf("%s = ?", tag), value.Interface())
+			}
+		}
+	}
+	var taskInfos []gorm_model.YoungeeTaskInfo
+	db = db.Model(gorm_model.YoungeeTaskInfo{})
+	// 查询总数
+	var totalTask int64
+	if err := db.Count(&totalTask).Error; err != nil {
+		logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+		return nil, 0, err
+	}
+	db.Order("task_id").Find(&taskInfos)
+
+	talentInfoTophoneMap := make(map[string]string)
+	for _, taskInfo := range taskInfos {
+		if _, ok := talentInfoTophoneMap[taskInfo.TalentID]; !ok {
+			phone := GetPhoneFromTalentId(ctx, taskInfo.TalentID)
+			talentInfoTophoneMap[taskInfo.TalentID] = phone
+		}
+	}
+
+	//// 查询该页数据
+	//limit := pageSize
+	//offset := pageSize * pageNum // assert pageNum start with 0
+	//err := db.Order("task_id").Limit(int(limit)).Offset(int(offset)).Error
+	//if err != nil {
+	//	logrus.WithContext(ctx).Errorf("[GetProjectTaskList] error query mysql total, err:%+v", err)
+	//	return nil, 0, err
+	//}
+
+	var taskDatas []*http_model.SpecialTaskInviteInfo
+	var newTaskDatas []*http_model.SpecialTaskInviteInfo
+
+	taskDatas = pack.YoungeeTaskInfoToSpecialTaskInviteInfo(taskInfos)
+
+	for _, v := range taskDatas {
+		if platformNickname == "" {
+			newTaskDatas = append(newTaskDatas, v)
+		} else if strings.Contains(v.PlatformNickname, platformNickname) {
+			newTaskDatas = append(newTaskDatas, v)
+		} else if strings.Contains(conv.MustString(v.TaskID), platformNickname) {
+			newTaskDatas = append(newTaskDatas, v)
+		} else {
+			totalTask--
+		}
+	}
+	return newTaskDatas, totalTask, nil
+}
+
+func GetPhoneFromTalentId(ctx context.Context, talentId string) string {
+	db := GetReadDB(ctx)
+	var Phone string
+	db.Model(&gorm_model.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", talentId).Find(&Phone)
+	return Phone
+}
+
+func SetTalentIncome(ctx context.Context, TaskIDs []string) error {
+	db := GetReadDB(ctx)
+	var TaskInfoList []gorm_model.YoungeeTaskInfo
+	fmt.Println("收入", TaskIDs)
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Scan(&TaskInfoList).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
+		return err
+	}
+	for _, taskInfo := range TaskInfoList {
+		err := db.Model(gorm_model.YoungeeTalentInfo{}).Where("id = ?", taskInfo.TalentID).Updates(map[string]interface{}{
+			"income":      gorm.Expr("income + ?", taskInfo.SettleAmount),
+			"canwithdraw": gorm.Expr("canwithdraw + ?", taskInfo.SettleAmount)}).Error
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
+			return err
+		}
+	}
+	return nil
+}
+
+func SetLocalTalentIncome(ctx context.Context, TaskIDs []string) error {
+	db := GetReadDB(ctx)
+	var TaskInfoList []gorm_model.YoungeeLocalTaskInfo
+	fmt.Println("收入", TaskIDs)
+	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id in ?", TaskIDs).Scan(&TaskInfoList).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
+		return err
+	}
+	for _, taskInfo := range TaskInfoList {
+		err := db.Model(gorm_model.YoungeeTalentInfo{}).Where("id = ?", taskInfo.TalentId).Updates(map[string]interface{}{
+			"income":      gorm.Expr("income + ?", taskInfo.SettleAmount),
+			"canwithdraw": gorm.Expr("canwithdraw + ?", taskInfo.SettleAmount)}).Error
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Task db] Update SetTalentIncome error,err:%+v", err)
+			return err
+		}
+	}
+	return nil
+}
+
+// 获取任务ids
+func GetTaskIds(ctx context.Context, projectId string) ([]string, error) {
+	db := GetReadDB(ctx)
+	var taskIds []string
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Select("task_id").Where("project_id = ? and task_status = 2", projectId).Find(&taskIds).Error
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
+		return nil, err
+	}
+
+	return taskIds, nil
+}
+
+func UpdateTask(ctx context.Context, updateData gorm_model.YoungeeTaskInfo, tx *gorm.DB) (bool, error) {
+	db := GetWriteDB(ctx)
+	whereCondition := gorm_model.YoungeeTaskInfo{
+		TaskID: updateData.TaskID,
+	}
+	if tx != nil {
+		err := tx.Where(whereCondition).Updates(&updateData).Error
+		if err != nil {
+			return false, err
+		}
+	} else {
+		err := db.Where(whereCondition).Updates(&updateData).Error
+		if err != nil {
+			return false, err
+		}
+	}
+
+	return true, nil
+}

+ 60 - 0
handler/getlocalrecruittime.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetLocalRecruitTimeHandler(ctx *gin.Context) {
+	handler := newGetLocalRecruitTimeHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetLocalRecruitTime struct {
+	ctx  *gin.Context
+	req  *http_model.GetLocalRecruitTimeRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetLocalRecruitTime) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetLocalRecruitTime) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetLocalRecruitTime) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetLocalRecruitTime) run() {
+	data := http_model.GetLocalRecruitTimeRequest{}
+	data = *c.req
+	res, err := service.LocalTask.GetLocalRecruitTime(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetLocalRecruitTime] call GetLocalRecruitTime err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetLocalRecruitTime fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询招募截止时间"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetLocalRecruitTime) checkParam() error {
+	return nil
+}
+
+func newGetLocalRecruitTimeHandler(ctx *gin.Context) *GetLocalRecruitTime {
+	return &GetLocalRecruitTime{
+		ctx:  ctx,
+		req:  http_model.NewGetLocalRecruitTimeRequest(),
+		resp: http_model.NewGetLocalRecruitTimeResponse(),
+	}
+}

+ 60 - 0
handler/getlocaltalentstatuscountnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetLocalTalentstatusCountHandler(ctx *gin.Context) {
+	handler := newGetLocalTalentstatusCountHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetLocalTalentstatusCount struct {
+	ctx  *gin.Context
+	req  *http_model.GetLocalTalentstatusCountRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetLocalTalentstatusCount) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetLocalTalentstatusCount) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetLocalTalentstatusCount) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetLocalTalentstatusCount) run() {
+	data := http_model.GetLocalTalentstatusCountRequest{}
+	data = *c.req
+	res, err := service.LocalTask.GetLocalTalentstatusCount(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetLocalTalentstatusCount] call GetLocalTalentstatusCount err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetLocalTalentstatusCount fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人状态数量"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetLocalTalentstatusCount) checkParam() error {
+	return nil
+}
+
+func newGetLocalTalentstatusCountHandler(ctx *gin.Context) *GetLocalTalentstatusCount {
+	return &GetLocalTalentstatusCount{
+		ctx:  ctx,
+		req:  http_model.NewGetLocalTalentstatusCountRequest(),
+		resp: http_model.NewGetLocalTalentstatusCountResponse(),
+	}
+}

+ 60 - 0
handler/getlocaltalentstatusnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetLocalTalentstatusNumHandler(ctx *gin.Context) {
+	handler := newGetLocalTalentstatusNumHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetLocalTalentstatusNum struct {
+	ctx  *gin.Context
+	req  *http_model.GetLocalTalentstatusNumRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetLocalTalentstatusNum) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetLocalTalentstatusNum) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetLocalTalentstatusNum) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetLocalTalentstatusNum) run() {
+	data := http_model.GetLocalTalentstatusNumRequest{}
+	data = *c.req
+	res, err := service.LocalTask.GetLocalTalentstatusNum(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetLocalTalentstatusNum] call GetLocalTalentstatusNum err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetLocalTalentstatusNum fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人状态数量"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetLocalTalentstatusNum) checkParam() error {
+	return nil
+}
+
+func newGetLocalTalentstatusNumHandler(ctx *gin.Context) *GetLocalTalentstatusNum {
+	return &GetLocalTalentstatusNum{
+		ctx:  ctx,
+		req:  http_model.NewGetLocalTalentstatusNumRequest(),
+		resp: http_model.NewGetLocalTalentstatusNumResponse(),
+	}
+}

+ 60 - 0
handler/getrecruittime.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetRecruitTimeHandler(ctx *gin.Context) {
+	handler := newGetRecruitTimeHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetRecruitTime struct {
+	ctx  *gin.Context
+	req  *http_model.GetRecruitTimeRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetRecruitTime) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetRecruitTime) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetRecruitTime) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetRecruitTime) run() {
+	data := http_model.GetRecruitTimeRequest{}
+	data = *c.req
+	res, err := service.Task.GetRecruitTime(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetRecruitTime] call GetRecruitTime err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetRecruitTime fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询招募截止时间"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetRecruitTime) checkParam() error {
+	return nil
+}
+
+func newGetRecruitTimeHandler(ctx *gin.Context) *GetRecruitTime {
+	return &GetRecruitTime{
+		ctx:  ctx,
+		req:  http_model.NewGetRecruitTimeRequest(),
+		resp: http_model.NewGetRecruitTimeResponse(),
+	}
+}

+ 60 - 0
handler/getsketchrecordlist.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	log "github.com/sirupsen/logrus"
+)
+
+// WrapGetSketchRecordListHandler
+
+func WrapGetSketchRecordListHandler(ctx *gin.Context) {
+	handler := newGetSketchRecordListHandler(ctx)
+	BaseRun(handler)
+}
+
+func newGetSketchRecordListHandler(ctx *gin.Context) *GetSketchRecordListHandler {
+	return &GetSketchRecordListHandler{
+		req:  http_model.NewGetSketchRecordListRequest(),
+		resp: http_model.NewGetSketchRecordListResponse(),
+		ctx:  ctx,
+	}
+}
+
+type GetSketchRecordListHandler struct {
+	req  *http_model.GetSketchRecordListRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func (h *GetSketchRecordListHandler) getRequest() interface{} {
+	return h.req
+}
+func (h *GetSketchRecordListHandler) getContext() *gin.Context {
+	return h.ctx
+}
+func (h *GetSketchRecordListHandler) getResponse() interface{} {
+	return h.resp
+}
+func (h *GetSketchRecordListHandler) run() {
+	data := *&http_model.GetSketchRecordListRequest{}
+	data = *h.req
+	res, err := service.Sketch.GetSketchRecordList(h.ctx, data)
+	if err != nil {
+		// 数据库查询失败,返回5001
+		logrus.Errorf("[GetSketchRecordListHandler] call GetByID err:%+v\n", err)
+		util.HandlerPackErrorResp(h.resp, consts.ErrorParamCheck, "")
+		log.Info("GetProduct fail,req:%+v", h.req)
+		return
+	}
+	h.resp.Data = res
+	h.resp.Status = consts.ErrorSuccess
+}
+func (h *GetSketchRecordListHandler) checkParam() error {
+	return nil
+}

+ 60 - 0
handler/gettalentstatuscountnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetTalentstatusCountHandler(ctx *gin.Context) {
+	handler := newGetTalentstatusCountHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetTalentstatusCount struct {
+	ctx  *gin.Context
+	req  *http_model.GetTalentstatusCountRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetTalentstatusCount) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetTalentstatusCount) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetTalentstatusCount) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetTalentstatusCount) run() {
+	data := http_model.GetTalentstatusCountRequest{}
+	data = *c.req
+	res, err := service.Task.GetTalentstatusCount(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetTalentstatusCount] call GetTalentstatusCount err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetTalentstatusCount fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人状态数量"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetTalentstatusCount) checkParam() error {
+	return nil
+}
+
+func newGetTalentstatusCountHandler(ctx *gin.Context) *GetTalentstatusCount {
+	return &GetTalentstatusCount{
+		ctx:  ctx,
+		req:  http_model.NewGetTalentstatusCountRequest(),
+		resp: http_model.NewGetTalentstatusCountResponse(),
+	}
+}

+ 60 - 0
handler/gettalentstatusnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapGetTalentstatusNumHandler(ctx *gin.Context) {
+	handler := newGetTalentstatusNumHandler(ctx)
+	BaseRun(handler)
+}
+
+type GetTalentstatusNum struct {
+	ctx  *gin.Context
+	req  *http_model.GetTalentstatusNumRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetTalentstatusNum) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetTalentstatusNum) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetTalentstatusNum) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetTalentstatusNum) run() {
+	data := http_model.GetTalentstatusNumRequest{}
+	data = *c.req
+	res, err := service.Task.GetTalentstatusNum(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetTalentstatusNum] call GetTalentstatusNum err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
+		logrus.Info("GetTalentstatusNum fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人状态数量"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetTalentstatusNum) checkParam() error {
+	return nil
+}
+
+func newGetTalentstatusNumHandler(ctx *gin.Context) *GetTalentstatusNum {
+	return &GetTalentstatusNum{
+		ctx:  ctx,
+		req:  http_model.NewGetTalentstatusNumRequest(),
+		resp: http_model.NewGetTalentStatusNumResponse(),
+	}
+}

+ 59 - 89
handler/link_opinion.go

@@ -1,89 +1,59 @@
-package handler
-
-import (
-	"github.com/gin-gonic/gin"
-	"github.com/sirupsen/logrus"
-	log "github.com/sirupsen/logrus"
-	"youngee_m_api/consts"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/service"
-	"youngee_m_api/util"
-)
-
-func WrapLinkOpinionHandler(ctx *gin.Context) {
-	handler := newLinkOpinionHandler(ctx)
-	BaseRun(handler)
-}
-
-func newLinkOpinionHandler(ctx *gin.Context) *LinkOpinionHandler {
-	return &LinkOpinionHandler{
-		req:  http_model.NewLinkOpinionRequest(),
-		resp: http_model.NewLinkOpinionResponse(),
-		ctx:  ctx,
-	}
-}
-
-type LinkOpinionHandler struct {
-	req  *http_model.LinkOpinionRequest
-	resp *http_model.CommonResponse
-	ctx  *gin.Context
-}
-
-func (h *LinkOpinionHandler) getRequest() interface{} {
-	return h.req
-}
-func (h *LinkOpinionHandler) getContext() *gin.Context {
-	return h.ctx
-}
-func (h *LinkOpinionHandler) getResponse() interface{} {
-	return h.resp
-}
-
-func (h *LinkOpinionHandler) run() {
-	data := http_model.LinkOpinionRequest{}
-	data = *h.req
-	res, err := service.Link.LinkOpinion(h.ctx, data)
-	if err != nil {
-		logrus.Errorf("[LinkOpinionHandler] call Create err:%+v\n", err)
-		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
-		log.Info("CreateProject fail,req:%+v", h.req)
-		return
-	}
-	h.resp.Message = "提交脚本修改意见成功"
-	h.resp.Data = res
-	h.resp.Data = data
-}
-
-/***
-func (h *LinkOpinionHandler) run() {
-	data := http_model.LinkOpinionRequest{}
-	data = *h.req
-	isRefuse := data.IsRefuse
-	if isRefuse== 0 {
-		fmt.Println("Create in")
-		res, err := service.Project.Create(h.ctx, data)
-		if err != nil {
-			logrus.Errorf("[LinkOpinionHandler] call Create err:%+v\n", err)
-			util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
-			log.Info("CreateProject fail,req:%+v", h.req)
-			return
-		}
-		h.resp.Message = "成功添加修改意见"
-		h.resp.Data = res
-	} else {
-		res, err := service.Logistics.Update(h.ctx, data)
-		if err != nil {
-			logrus.Errorf("[LinkOpinionHandler] call Create err:%+v\n", err)
-			util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
-			log.Info("CreateProject fail,req:%+v", h.req)
-			return
-		}
-		h.resp.Message = "成功修改物流信息"
-		h.resp.Data = res
-	}
-
-}
-***/
-func (h *LinkOpinionHandler) checkParam() error {
-	return nil
-}
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	log "github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+func WrapLinkOpinionHandler(ctx *gin.Context) {
+	handler := newLinkOpinionHandler(ctx)
+	BaseRun(handler)
+}
+
+func newLinkOpinionHandler(ctx *gin.Context) *LinkOpinionHandler {
+	return &LinkOpinionHandler{
+		req:  http_model.NewLinkOpinionRequest(),
+		resp: http_model.NewLinkOpinionResponse(),
+		ctx:  ctx,
+	}
+}
+
+type LinkOpinionHandler struct {
+	req  *http_model.LinkOpinionRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func (h *LinkOpinionHandler) getRequest() interface{} {
+	return h.req
+}
+func (h *LinkOpinionHandler) getContext() *gin.Context {
+	return h.ctx
+}
+func (h *LinkOpinionHandler) getResponse() interface{} {
+	return h.resp
+}
+
+func (h *LinkOpinionHandler) run() {
+	data := http_model.LinkOpinionRequest{}
+	data = *h.req
+	res, err := service.Link.LinkOpinion(h.ctx, data)
+	if err != nil {
+		logrus.Errorf("[LinkOpinionHandler] call Create err:%+v\n", err)
+		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
+		log.Info("CreateProject fail,req:%+v", h.req)
+		return
+	}
+	h.resp.Message = "提交脚本修改意见成功"
+	h.resp.Data = res
+	h.resp.Status = consts.ErrorSuccess
+}
+
+func (h *LinkOpinionHandler) checkParam() error {
+	return nil
+}

+ 1 - 1
handler/reject_sketch.go

@@ -45,7 +45,7 @@ func (h *RejectSketchHandler) run() {
 	res, err := service.Sketch.RejectSketch(h.ctx, data)
 	if err != nil {
 		logrus.Errorf("[ReviseOpinionHandler] call Create err:%+v\n", err)
-		util.HandlerPackErrorResp(h.resp, consts.ErrorParamCheck, "")
+		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
 		log.Info("CreateProject fail,req:%+v", h.req)
 		return
 	}

+ 59 - 58
handler/sketch_info.go

@@ -1,58 +1,59 @@
-package handler
-
-import (
-	"github.com/gin-gonic/gin"
-	"github.com/sirupsen/logrus"
-	log "github.com/sirupsen/logrus"
-	"youngee_m_api/consts"
-	"youngee_m_api/model/http_model"
-	"youngee_m_api/service"
-	"youngee_m_api/util"
-)
-
-// WrapGetSketchInfoHandler
-
-func WrapGetSketchInfoHandler(ctx *gin.Context) {
-	handler := newGetSketchInfoHandler(ctx)
-	BaseRun(handler)
-}
-
-func newGetSketchInfoHandler(ctx *gin.Context) *GetSketchInfoHandler {
-	return &GetSketchInfoHandler{
-		req:  http_model.NewGetSketchInfoRequest(),
-		resp: http_model.NewGetSketchInfoResponse(),
-		ctx:  ctx,
-	}
-}
-
-type GetSketchInfoHandler struct {
-	req  *http_model.GetSketchInfoRequest
-	resp *http_model.CommonResponse
-	ctx  *gin.Context
-}
-
-func (h *GetSketchInfoHandler) getRequest() interface{} {
-	return h.req
-}
-func (h *GetSketchInfoHandler) getContext() *gin.Context {
-	return h.ctx
-}
-func (h *GetSketchInfoHandler) getResponse() interface{} {
-	return h.resp
-}
-func (h *GetSketchInfoHandler) run() {
-	data := *&http_model.GetSketchInfoRequest{}
-	data = *h.req
-	res, err := service.Sketch.GetSketchInfo(h.ctx, data)
-	if err != nil {
-		// 数据库查询失败,返回5001
-		logrus.Errorf("[GetSketchInfoHandler] call GetByID err:%+v\n", err)
-		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
-		log.Info("GetProduct fail,req:%+v", h.req)
-		return
-	}
-	h.resp.Data = res
-}
-func (h *GetSketchInfoHandler) checkParam() error {
-	return nil
-}
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	log "github.com/sirupsen/logrus"
+	"youngee_m_api/consts"
+	"youngee_m_api/model/http_model"
+	"youngee_m_api/service"
+	"youngee_m_api/util"
+)
+
+// WrapGetSketchInfoHandler
+
+func WrapGetSketchInfoHandler(ctx *gin.Context) {
+	handler := newGetSketchInfoHandler(ctx)
+	BaseRun(handler)
+}
+
+func newGetSketchInfoHandler(ctx *gin.Context) *GetSketchInfoHandler {
+	return &GetSketchInfoHandler{
+		req:  http_model.NewGetSketchInfoRequest(),
+		resp: http_model.NewGetSketchInfoResponse(),
+		ctx:  ctx,
+	}
+}
+
+type GetSketchInfoHandler struct {
+	req  *http_model.GetSketchInfoRequest
+	resp *http_model.CommonResponse
+	ctx  *gin.Context
+}
+
+func (h *GetSketchInfoHandler) getRequest() interface{} {
+	return h.req
+}
+func (h *GetSketchInfoHandler) getContext() *gin.Context {
+	return h.ctx
+}
+func (h *GetSketchInfoHandler) getResponse() interface{} {
+	return h.resp
+}
+func (h *GetSketchInfoHandler) run() {
+	data := *&http_model.GetSketchInfoRequest{}
+	data = *h.req
+	res, err := service.Sketch.GetSketchInfo(h.ctx, data)
+	if err != nil {
+		// 数据库查询失败,返回5001
+		logrus.Errorf("[GetSketchInfoHandler] call GetByID err:%+v\n", err)
+		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
+		log.Info("GetProduct fail,req:%+v", h.req)
+		return
+	}
+	h.resp.Data = res
+	h.resp.Status = consts.ErrorSuccess
+}
+func (h *GetSketchInfoHandler) checkParam() error {
+	return nil
+}

+ 39 - 15
model/gorm_model/auto_task.go

@@ -3,21 +3,45 @@ package gorm_model
 // Code generated by sql2gorm. DO NOT EDIT.
 
 type InfoAutoTask struct {
-	AutoTaskID        int32 `gorm:"column:auto_task_id;primary_key;AUTO_INCREMENT"` // 自动处理规则id
-	SignInOffline     int32 `gorm:"column:sign_in_offline"`                         // 线下探店自动签收时间
-	SignInVirtual     int32 `gorm:"column:sign_in_virtual"`                         // 虚拟产品测评自动签收时间
-	ReviewInMv        int32 `gorm:"column:review_in_mv"`                            // 视频形式的审稿处理
-	ReviewUnlimited   int32 `gorm:"column:review_unlimited"`                        // 不限形式的审稿处理
-	Postreview        int32 `gorm:"column:postreview"`                              // 发布审核自动处理
-	CaseClose         int32 `gorm:"column:case_close"`                              // 结案自动处理
-	Invalid           int32 `gorm:"column:invalid"`                                 // 全流程项目失效自动处理
-	DraftDefaultInPic int32 `gorm:"column:draft_default_in_pic"`                    // 图片初稿违约自动处理
-	DraftDefaultInMv  int32 `gorm:"column:draft_default_in_mv"`                     // 视频初稿违约自动处理
-	ScriptDefault     int32 `gorm:"column:script_default"`                          // 脚本违约自动处理
-	LinkBreach        int32 `gorm:"column:link_breach"`                             // 链接违约自动处理
-	CaseCloseDefault  int32 `gorm:"column:case_close_default"`                      // 结案违约自动处理
-	SelectionInvalid  int32 `gorm:"column:selectioninvalid"`
-	DraftDefault      int   `gorm:"column:draft_default;NOT NULL"` // 选品项目失效自动处理
+	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             int32 `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         int32 `gorm:"column:invalid"`
+	SignInOffline   int32 `gorm:"column:sign_in_offline"`
+	SignInVirtual   int32 `gorm:"column:sign_in_virtual"`
+	ReviewInMv      int32 `gorm:"column:review_in_mv"`
+	ReviewUnlimited int32 `gorm:"column:review_unlimited"`
+	Postreview      int32 `gorm:"column:post_review"` // 注意列名映射
+	CaseClose       int32 `gorm:"column:case_close"`
+	//DraftDefaultInPic                   int    `gorm:"column:draft_default_in_pic"`                    // 需确认表中是否存在该列
+	//DraftDefaultInMv                    int    `gorm:"column:draft_default_in_mv"`                     // 需确认表中是否存在该列
+	ScriptDefault    int32 `gorm:"column:script_default"`
+	LinkBreach       int32 `gorm:"column:link_breach"`
+	CaseCloseDefault int32 `gorm:"column:case_close_default"`
+	DraftDefault     int32 `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 {

+ 10 - 2
model/gorm_model/local_task.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"`
@@ -56,12 +56,13 @@ type YoungeeLocalTaskInfo struct {
 	FansNum                int       `gorm:"column:fans_num;type:int(11);comment:粉丝数" json:"fans_num"`
 	VoteAvg                int       `gorm:"column:vote_avg;type:int(11);comment:平均点赞数" json:"vote_avg"`
 	CommitAvg              int       `gorm:"column:commit_avg;type:int(11);comment:平均评论数" json:"commit_avg"`
+	CollectNum             int       `gorm:"collect_num;type:int(11);comment:平均收藏数" json:"collect_num"`
 	BOperator              string    `gorm:"column:b_operator;type:varchar(255);comment:商家确定达人操作人ID" json:"b_operator"`
 	BOperatorType          int       `gorm:"column:b_operator_type;type:int(11);default:0;comment:商家操作人类型,1商家用户,2商家子账号,3管理后台" json:"b_operator_type"`
 	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"`
@@ -79,6 +80,13 @@ type YoungeeLocalTaskInfo struct {
 	CancelTime             time.Time `gorm:"column:cancel_time;type:datetime;comment:解约时间" json:"cancel_time"`
 	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"` //提报达人服务商名称
+	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 {

+ 4 - 2
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"`
@@ -34,7 +34,6 @@ type YounggeeLocalLifeInfo struct {
 	AutoFailAt          *time.Time `gorm:"column:auto_fail_at;type:timestamp;comment:失效自动处理时间" json:"auto_fail_at"`
 	AutoTaskId          int        `gorm:"column:auto_task_id;type:int(11);default:0;comment:定时任务id;NOT NULL" json:"auto_task_id"`
 	AutoDefaultId       int        `gorm:"column:auto_default_id;type:int(11);default:0;comment:违约状态id;NOT NULL" json:"auto_default_id"`
-	FailReason          int64      `gorm:"column:fail_reason"` // 失效原因,1、2分别表示逾期未支付、项目存在风险
 	PaymentAmount       float64    `gorm:"column:payment_amount;type:float;comment:支付金额" json:"payment_amount"`
 	PayAt               *time.Time `gorm:"column:pay_at;type:timestamp;comment:支付时间" json:"pay_at"`
 	SubmitAt            *time.Time `gorm:"column:submit_at;type:timestamp;comment:提交审核时间" json:"submit_at"`
@@ -48,6 +47,9 @@ type YounggeeLocalLifeInfo struct {
 	NeedQuality         int        `gorm:"column:need_quality;type:int(11);default:0;comment:待质检;NOT NULL" json:"need_quality"`
 	NeedCalculate       int        `gorm:"column:need_calculate;type:int(11);default:0;comment:待结算;NOT NULL" json:"need_calculate"`
 	InvoiceStatus       int        `gorm:"column:invoice_status;type:int(11);default:0;comment:开票状态(1开票中 2已开票);NOT NULL" json:"invoice_status"`
+	NeedPay             float64    `gorm:"column:need_pay"`
+	SettleFlag          int        `gorm:"column:settle_flag"`
+	FailReason          int64      `gorm:"column:fail_reason"` // 失效原因,1、2分别表示逾期未支付、项目存在风险
 }
 
 func (m *YounggeeLocalLifeInfo) TableName() string {

+ 45 - 50
model/gorm_model/project.go

@@ -1,4 +1,3 @@
-// Code generated by sql2gorm. DO NOT EDIT.
 package gorm_model
 
 import (
@@ -6,56 +5,52 @@ import (
 )
 
 type ProjectInfo struct {
-	ID                int64      `gorm:"column:id;primary_key;auto_increment"`           // 自增id
-	ProjectID         string     `gorm:"column:project_id;type:varchar(10);not null"`    // 项目id
-	ProjectName       string     `gorm:"column:project_name;type:varchar(100)"`          // 项目名称
-	ProjectStatus     int64      `gorm:"column:project_status;type:tinyint"`             // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、执行中、失效、已结案
-	ProjectType       int64      `gorm:"column:project_type;type:tinyint"`               // 项目类型,1代表公开,2代表定向
-	ProjectPlatform   int64      `gorm:"column:project_platform;type:tinyint"`           // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
-	ProjectForm       int64      `gorm:"column:project_form;type:tinyint"`               // 项目形式,1-3分别代表商品寄拍、素材分发、虚拟产品测评
-	TalentType        string     `gorm:"column:talent_type;type:text"`                   // 达人类型(,分隔)
-	RecruitDdl        *time.Time `gorm:"column:recruit_ddl;type:timestamp"`              // 招募截止时间
-	ContentType       int64      `gorm:"column:content_type;type:tinyint"`               // 内容形式,1代表图文,2代表视频
-	ProjectDetail     string     `gorm:"column:project_detail;type:varchar(1000)"`       // 项目详情
-	ApplyNum          int64      `gorm:"column:apply_num;type:int;default:0;not null"`   // 报名人数
-	RecruitNum        int64      `gorm:"column:recruit_num;type:int;default:0;not null"` // 已招募人数
+	ProjectID         string     `gorm:"column:project_id;primary_key;"`        // 项目id 项目ID生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
+	ProjectName       string     `gorm:"column:project_name"`                   // 项目名称
+	ProjectStatus     int64      `gorm:"column:project_status"`                 // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	ProjectType       int64      `gorm:"column:project_type"`                   // 项目类型,1代表全流程项目,2代表专项项目
+	ProjectPlatform   int64      `gorm:"column:project_platform"`               // 项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
+	ProjectForm       int64      `gorm:"column:project_form"`                   // 项目形式,1-4分别代表实体商品寄拍、虚拟产品测评、线下探店打卡、素材微原创
+	TalentType        string     `gorm:"column:talent_type"`                    // 达人类型
+	RecruitDdl        *time.Time `gorm:"column:recruit_ddl"`                    // 招募截止时间
+	ContentType       int64      `gorm:"column:content_type"`                   // 内容形式,1代表图文,2代表视频
+	ProjectDetail     string     `gorm:"column:project_detail"`                 // 项目详情
+	ApplyNum          int64      `gorm:"column:apply_num;default:0;NOT NULL"`   // 报名人数
+	RecruitNum        int64      `gorm:"column:recruit_num;default:0;NOT NULL"` // 已招募人数
 	SettleNum         int64      `gorm:"column:settle_num;type:int(11);default:0;comment:结案人数;NOT NULL" json:"settle_num"`
-	EnterpriseID      string     `gorm:"column:enterprise_id;type:varchar(10)"`                                                  // 所属企业id
-	SubAccountID      int64      `gorm:"column:sub_account_id;type:int;default:0;not null"`                                      // 子账号id
-	ProductID         int64      `gorm:"column:product_id;type:int"`                                                             // 关联商品id
-	ProductCategory   string     `gorm:"column:product_category;type:varchar(10);default:'0'"`                                   // 商品类目1--20
-	CreatedAt         *time.Time `gorm:"column:created_at;type:timestamp"`                                                       // 创建时间
-	UpdatedAt         *time.Time `gorm:"column:updated_at;type:timestamp;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"` // 修改时间
-	FeeForm           string     `gorm:"column:fee_form;type:varchar(20)"`                                                       // 稿费形式列表(3.0暂未用)
-	AutoFailAt        *time.Time `gorm:"column:auto_fail_at;type:timestamp"`                                                     // 失效自动处理时间
-	AutoTaskID        int64      `gorm:"column:auto_task_id;type:int;default:0;not null"`                                        // 定时任务id
-	AutoDefaultID     int64      `gorm:"column:auto_default_id;type:int;default:0;not null"`                                     // 违约状态id
-	PaymentAmount     float64    `gorm:"column:payment_amount;type:decimal(10,2)"`                                               // 支付金额
-	PayAt             *time.Time `gorm:"column:pay_at;type:timestamp"`                                                           // 支付时间
-	AutoScriptBreakAt *time.Time `gorm:"column:auto_script_break_at;type:timestamp"`                                             // 脚本违约自动处理时间
-	AutoSketchBreakAt *time.Time `gorm:"column:auto_sketch_break_at;type:timestamp"`                                             // 初稿违约自动处理时间
-	FailReason        int64      `gorm:"column:fail_reason;type:tinyint"`                                                        // 失效原因,1、2分别表示逾期未支付、项目存在风险
-	PassAt            *time.Time `gorm:"column:pass_at;type:timestamp"`                                                          // 审核通过时间
-	FinishAt          *time.Time `gorm:"column:finish_at;type:timestamp"`                                                        // 结案时间
-	EstimatedCost     float64    `gorm:"column:estimated_cost;type:decimal(10,2)"`                                               // 预估成本
-	IsRead            int64      `gorm:"column:is_read;type:int"`                                                                // 是否已读
-	SettlementAmount  float64    `gorm:"column:settlement_amount;type:decimal(10,2)"`                                            // 结算金额
-	ProductSnap       string     `gorm:"column:product_snap;type:json"`                                                          // 商品信息快照
-	ProductPhotoSnap  string     `gorm:"column:product_photo_snap;type:json"`                                                    // 商品图片快照
-	SubmitAt          *time.Time `gorm:"column:submit_at;type:timestamp"`                                                        // 提交审核时间
-	NeedReview        int64      `gorm:"column:need_review;type:int;default:0;not null"`                                         // 待审稿
-	NeedQuality       int64      `gorm:"column:need_quality;type:int;default:0;not null"`                                        // 待质检
-	NeedCalculate     int64      `gorm:"column:need_calculate;type:int;default:0;not null"`                                      // 待结算
-	ServiceChargeRate float64    `gorm:"column:service_charge_rate;type:decimal(10,2);default:0.00;not null"`                    // 公开服务费率
-	OperatorType      *int64     `gorm:"column:operator_type;type:int"`                                                          // 创建者类型,1商家主账号,2商家子账号
-	TotalRecruitNum   *int64     `gorm:"column:total_recruit_num;type:int"`                                                      // 此任务各策略招募人数总和
-	ViewNum           int64      `gorm:"column:view_num;type:int;default:0"`                                                     // 浏览量
-	Tools             string     `gorm:"column:tools;type:varchar(255);default:'';not null"`                                     // 工具选择,1邀约招募 2样品物流 3审稿工具 4作品审查 5数据巡检 6结算账单(,分隔)
-	InvoiceStatus     int64      `gorm:"column:invoice_status;type:int;default:0;not null"`                                      // 开票状态(1开票中 2已开票)
-	CreateTime        *time.Time `gorm:"column:create_time;type:datetime"`                                                       // 创建时间
-	BeforeDeliveryNum int64      `gorm:"column:before_delivery_num;type:int;default:0;not null"`                                 // 待发货数量
-	DeliveryNum       int64      `gorm:"column:delivery_num;type:int;default:0;not null"`                                        // 已发货数量
-	AfterDeliveryNum  int64      `gorm:"column:after_delivery_num;type:int;default:0;not null"`                                  // 已签收数量
+	EnterpriseID      string     `gorm:"column:enterprise_id"`            // 所属企业id
+	ProductID         int64      `gorm:"column:product_id"`               // 关联商品id
+	CreatedAt         *time.Time `gorm:"column:created_at"`               // 创建时间
+	UpdatedAt         *time.Time `gorm:"column:updated_at"`               // 修改时间
+	FeeForm           string     `gorm:"column:fee_form"`                 // 稿费形式列表
+	AutoFailAt        *time.Time `gorm:"column:auto_fail_at"`             // 失效自动处理时间
+	AutoTaskID        int64      `gorm:"column:auto_task_id;NOT NULL"`    // 定时任务id
+	AutoDefaultID     int64      `gorm:"column:auto_default_id;NOT NULL"` // 违约状态id
+	PaymentAmount     float64    `gorm:"column:payment_amount"`           // 支付金额
+	PayAt             *time.Time `gorm:"column:pay_at"`                   // 支付时间
+	AutoScriptBreakAt *time.Time `gorm:"column:auto_script_break_at"`     // 脚本违约自动处理时间
+	AutoSketchBreakAt *time.Time `gorm:"column:auto_sketch_break_at"`     // 初稿违约自动处理时间
+	FailReason        int64      `gorm:"column:fail_reason"`              // 失效原因,1、2分别表示逾期未支付、项目存在风险
+	PassAt            *time.Time `gorm:"column:pass_at"`                  // 审核通过时间
+	FinishAt          *time.Time `gorm:"column:finish_at"`                // 结案时间
+	SubmitAt          *time.Time `gorm:"column:submit_at"`                // 结案时间
+	EstimatedCost     float64    `gorm:"column:estimated_cost"`           // 预估成本
+	IsRead            int64      `gorm:"column:is_read"`                  // 是否已读
+	SettlementAmount  float64    `gorm:"column:settlement_amount"`        // 结算金额
+	ProductSnap       string     `gorm:"column:product_snap"`             // 商品信息快照
+	ProductPhotoSnap  string     `gorm:"column:product_photo_snap"`       // 商品图片快照
+	NeedReview        int64      `gorm:"column:need_review"`              // 待审稿
+	NeedQuality       int64      `gorm:"column:need_quality"`             // 待质检
+	NeedCalculate     int64      `gorm:"column:need_calculate"`           // 待结算
+	ServiceChargeRate float64    `gorm:"column:service_charge_rate"`      // 公开服务费率
+	OperatorType      *int64     `gorm:"column:operator_type"`            // 创建者类型,1商家主账号,2商家子账号
+	TotalRecruitNum   *int64     `gorm:"column:total_recruit_num"`        // 此任务各策略招募人数总和
+	ViewNum           int64      `gorm:"column:view_num"`                 // 浏览量
+	Tools             string     `gorm:"column:tools"`                    // 工具选择,1邀约招募 2结算账单 3样品物流 4审稿工具 5作品审查 6数据巡检(,分隔)
+	InvoiceStatus     int64      `gorm:"column:invoice_status"`           // 开票状态(1开票中 2已开票)
+	NeedPay           float64    `gorm:"column:need_pay"`
+	SettleFlag        int        `gorm:"column:settle_flag"`
+	SubAccountID      int        `gorm:"column:sub_account_id"`
 }
 
 func (m *ProjectInfo) TableName() string {

+ 45 - 48
model/gorm_model/project_task.go

@@ -1,4 +1,3 @@
-// Code generated by sql2gorm. DO NOT EDIT.
 package gorm_model
 
 import (
@@ -6,14 +5,14 @@ import (
 )
 
 type YoungeeTaskInfo struct {
-	TaskId                 string    `gorm:"column:task_id;primary_key;AUTO_INCREMENT"`   // 任务id
-	ProjectId              string    `gorm:"column:project_id;NOT NULL"`                  // 项目id
-	TalentId               string    `gorm:"column:talent_id;NOT NULL"`                   // 达人id
-	AccountId              int       `gorm:"column:account_id;NOT NULL"`                  // 账号id
+	TaskID                 string    `gorm:"column:task_id;primary_key;AUTO_INCREMENT"`   // 任务id
+	ProjectID              string    `gorm:"column:project_id;NOT NULL"`                  // 项目id
+	TalentID               string    `gorm:"column:talent_id;NOT NULL"`                   // 达人id
+	AccountID              int       `gorm:"column:account_id;NOT NULL"`                  // 账号id
 	TalentPlatformInfoSnap string    `gorm:"column:talent_platform_info_snap;NOT NULL"`   // 达人平台信息快照
 	TalentPersonalInfoSnap string    `gorm:"column:talent_personal_info_snap;NOT NULL"`   // 达人个人信息快照
 	TalentPostAddrSnap     string    `gorm:"column:talent_post_addr_snap;NOT NULL"`       // 收货地址快照
-	StrategyId             int       `gorm:"column:strategy_id"`                          // 报名选择的招募策略id
+	StrategyID             int       `gorm:"column:strategy_id"`                          // 报名选择的招募策略id
 	TaskReward             float64   `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬
 	SettleAmount           float64   `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(扣除违约扣款)
 	AllPayment             float64   `gorm:"column:all_payment;NOT NULL"`                 // 企业支付
@@ -23,48 +22,42 @@ type YoungeeTaskInfo struct {
 	SketchBreakRate        int       `gorm:"column:sketch_break_rate;default:0;NOT NULL"` // 初稿上传超时违约扣款比例,百分之
 	LinkBreakRate          int       `gorm:"column:link_break_rate;default:0;NOT NULL"`   // 链接上传超时违约扣款比例,百分之
 	DataBreakRate          int       `gorm:"column:data_break_rate;default:0;NOT NULL"`   // 数据上传超时违约扣款比例,百分之
-	FeeForm                int       `gorm:"column:fee_form;NOT NULL"`
-	RealServiceCharge      float64   `gorm:"column:real_service_charge;type:decimal(10,2);comment:服务商实际所得服务费(扣除违约)" json:"real_service_charge"` // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
-	ServiceCharge          float64   `gorm:"column:service_charge"`                                                                             // 服务费
-	ServiceRate            int       `gorm:"column:service_rate"`                                                                               // 服务费率,千分之
-	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`                                                             // 任务状态 1待选 2已选 3落选
-	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                                                                        // 任务阶段,详情见info_task_stage表
-	CreateDate             time.Time `gorm:"column:create_date;default:CURRENT_TIMESTAMP;NOT NULL"`                                             // 创建时间
-	SelectDate             time.Time `gorm:"column:select_date"`                                                                                // 反选时间
-	DeliveryDate           time.Time `gorm:"column:delivery_date"`                                                                              // 发货时间
-	CompleteStatus         int       `gorm:"column:complete_status;default:1;NOT NULL"`                                                         // 结束方式 1未结束 2正常结束 3反选失败 4被解约
-	CompleteDate           time.Time `gorm:"column:complete_date"`                                                                              // 结束时间
-	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`                                                                 // 发货状态 1 待发货 2已发货 3 已签收
-	ScriptStatus           uint      `gorm:"column:script_status;default:1"`                                                                    // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	SketchStatus           uint      `gorm:"column:sketch_status;default:1"`                                                                    // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	UpdateAt               time.Time `gorm:"column:update_at"`                                                                                  // 更新时间
-	LinkStatus             uint      `gorm:"column:link_status;default:1"`                                                                      // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	DataStatus             uint      `gorm:"column:data_status;default:1"`                                                                      // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	CurDefaultType         int       `gorm:"column:cur_default_type"`                                                                           // 任务当前处于的违约类型 0-8分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约
-	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`
-	WithdrawDate           time.Time `gorm:"column:withdraw_date;type:datetime;comment:提现时间" json:"withdraw_date"` // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
-	SettleStatus           int       `gorm:"column:settle_status;default:1"`
-	LeadTeamId             string    `gorm:"column:lead_team_id;type:char(10);comment:作为团长的young之团id,对应younggee_talent_team中的team_id字段" json:"lead_team_id"`
-	TeamId                 string    `gorm:"column:team_id;type:char(10);comment:作为团员的young之团id,对应younggee_talent_team中的team_id字段" json:"team_id"`
-	TeamIncome             float64   `gorm:"column:team_income;type:decimal(10,2);comment:young之团团长现金收益" json:"team_income"`
-	TeamPoint              int       `gorm:"column:team_point;type:int(11);comment:young之团团长积分收益" json:"team_point"`
+	FeeForm                int       `gorm:"column:fee_form;NOT NULL"`                    // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
+	ServiceCharge          float64   `gorm:"column:service_charge"`                       // 服务费
+	RealServiceCharge      float64   `gorm:"column:real_service_charge"`                  // 服务商实际所得服务费(扣除违约)
+	ServiceRate            int       `gorm:"column:service_rate"`                         // 服务费率,千分之
+	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`       // 任务状态 1待选 2已选 3落选
+	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                  // 任务阶段,详情见info_task_stage表
+	CreateDate             time.Time `gorm:"column:create_date;NOT NULL"`                 // 创建时间
+	SelectDate             time.Time `gorm:"column:select_date"`                          // 反选时间
+	DeliveryDate           time.Time `gorm:"column:delivery_date"`                        // 发货时间
+	CompleteStatus         int       `gorm:"column:complete_status;default:1;NOT NULL"`   // 结束方式 1未结束 2正常结束 3反选失败 4被解约
+	CompleteDate           time.Time `gorm:"column:complete_date"`                        // 结束时间
+	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`           // 发货状态 1 待发货 2已发货 3 已签收
+	ScriptStatus           uint      `gorm:"column:script_status;default:1"`              // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	SketchStatus           uint      `gorm:"column:sketch_status;default:1"`              // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               time.Time `gorm:"column:update_at"`                            // 更新时间
+	LinkStatus             uint      `gorm:"column:link_status;default:1"`                // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	DataStatus             uint      `gorm:"column:data_status;default:1"`                // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	CurDefaultType         int       `gorm:"column:cur_default_type"`                     // 任务当前处于的违约类型 0-8分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约
+	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`            // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	SettleStatus           int       `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
+	SupplierId             int       `gorm:"column:supplier_id;default:0"`                // 服务商ID
+	SupplierStatus         int       `gorm:"column:supplier_status;default:0"`            // 服务商任务状态 0表示达人来源非服务商 1待选 2已选 3落选
+	DraftFee               float64   `gorm:"column:draft_fee"`                            // 达人稿费
+	SignedTime             time.Time `gorm:"column:signed_time"`                          // 签收时间
+	FansNum                int       `gorm:"column:fans_num"`                             // 粉丝数
+	VoteAvg                int       `gorm:"column:vote_avg"`                             // 平均点赞数
+	CommitAvg              int       `gorm:"column:commit_avg"`                           // 平均评论数
+	CollectNum             int       `gorm:"column:collect_num"`
+	BOperator              string    `gorm:"column:b_operator"`      // 商家确定达人操作人ID
+	BOperatorType          int       `gorm:"column:b_operator_type"` // 商家操作人类型,1商家用户,2商家子账号,3管理后台
+	SOperator              int       `gorm:"column:s_operator"`      // 服务商提报达人操作人ID
+	SOperatorType          int       `gorm:"column:s_operator_type"` // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
+	OpenId                 string    `gorm:"column:open_id"`         // 达人报名的快手唯一标识
+	SupportFee             float64   `gorm:"column:support_fee"`     //提报价格
+	SprojectId             int       `gorm:"column:s_project_id"`    //服务商种草任务ID
 	CurBreakAt             time.Time `gorm:"column:cur_break_at;type:datetime;comment:当前阶段截止时间" json:"cur_break_at"`
-	SupplierId             int       `gorm:"column:supplier_id;type:int(11);default:0;comment:服务商ID" json:"supplier_id"`
-	SupplierStatus         int       `gorm:"column:supplier_status;type:int(11);default:0;comment:服务商任务状态 0表示达人来源非服务商 1待选 2已选 3落选" json:"supplier_status"`
-	DraftFee               float64   `gorm:"column:draft_fee;type:decimal(10,2);default:0.00;comment:达人稿费,达人所见的稿费金额" json:"draft_fee"`
-	SignedTime             time.Time `gorm:"column:signed_time;type:datetime;comment:签收时间" json:"signed_time"`
-	FansNum                int       `gorm:"column:fans_num;type:int(11);comment:粉丝数" json:"fans_num"`
-	VoteAvg                int       `gorm:"column:vote_avg;type:int(11);comment:总点赞数" json:"vote_avg"`
-	CommitAvg              int       `gorm:"column:commit_avg;type:int(11);comment:总评论数" json:"commit_avg"`
-	ViewNum                int       `gorm:"column:view_num;type:int(11);comment:作品总浏览量" json:"view_num"`
-	PlatformId             int       `gorm:"column:platform_id;type:int(11);comment:平台id;NOT NULL" json:"platform_id"`
-	BOperator              string    `gorm:"column:b_operator;type:varchar(255);comment:商家确定达人操作人ID" json:"b_operator"`
-	BOperatorType          int       `gorm:"column:b_operator_type;type:int(11);default:0;comment:商家操作人类型,1商家用户,2商家子账号,3管理后台" json:"b_operator_type"`
-	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"`
-	SProjectId             int       `gorm:"column:s_project_id;type:int(11);comment:服务商种草任务ID" json:"s_project_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"`
 	LinkMissingTime        time.Time `gorm:"column:link_missing_time;type:datetime;comment:未发作品违约时间" json:"link_missing_time"`
@@ -79,7 +72,11 @@ type YoungeeTaskInfo struct {
 	CancelOperator         string    `gorm:"column:cancel_operator;type:varchar(255);comment:解约操作人ID" json:"cancel_operator"`
 	CancelReason           string    `gorm:"column:cancel_reason;type:varchar(255);comment:解约原因" json:"cancel_reason"`
 	CancelTime             time.Time `gorm:"column:cancel_time;type:datetime;comment:解约时间" json:"cancel_time"`
-	City                   string    `gorm:"column:city;type:varchar(255);comment:报名达人的所在城市" json:"city"` // 结算状态,1、2分别表示待结算、已结算
+	City                   string    `gorm:"column:city"`                                                                     //报名达人的所在城市
+	SOperatename           string    `gorm:"column:s_operate_name;type:varchar(255);comment:提报达人服务商名称" json:"s_operate_name"` //提报达人服务商名称
+	TalentName             string    `gorm:"column:talent_name"`                                                              //达人昵称
+	CreateLogisticUserId   string    `gorm:"column:create_logistic_user_id"`                                                  //创建快递单ID
+	CreateLogisticUserType int       `gorm:"column:create_logistic_user_type"`                                                //创建快递单用户类型,1商家,2子账号,3管理后台
 }
 
 func (m *YoungeeTaskInfo) TableName() string {

+ 2 - 0
model/gorm_model/s_project.go

@@ -20,6 +20,8 @@ type YounggeeSProjectInfo struct {
 	ServiceCharge       float64 `gorm:"column:service_charge;type:decimal(10,2);default:0.00;comment:服务商预估可赚服务费" json:"service_charge"`
 	ServiceChargeActual float64 `gorm:"column:service_charge_actual;type:decimal(10,2);default:0.00;comment:服务商实际可赚服务费" json:"service_charge_actual"`
 	OperatorType        int     `gorm:"column:operator_type;type:int(11);default:0;comment:添加商单操作人类型,1为服务商主账号,2为服务商子账号" json:"operator_type"`
+	EstimateDraftFee    float64 `gorm:"column:estimate_draft_fee;type:decimal(10,2);comment:预估稿费" json:"estimate_draft_fee"`
+	EstimateSupportFee  float64 `gorm:"column:estimate_support_fee;type:decimal(10,2);comment:预估支持费" json:"estimate_support_fee"`
 }
 
 func (m *YounggeeSProjectInfo) TableName() string {

+ 2 - 2
model/gorm_model/supplier.go

@@ -1,6 +1,6 @@
 package gorm_model
 
-type YounggeeSupplier struct {
+type Supplier struct {
 	SupplierId      int    `gorm:"column:supplier_id;type:int(11);primary_key;AUTO_INCREMENT;comment:服务商ID" json:"supplier_id"`
 	SupplierName    string `gorm:"column:supplier_name;type:varchar(255);comment:服务商名称" json:"supplier_name"`
 	PhoneNumber     string `gorm:"column:phone_number;type:varchar(255);comment:手机号" json:"phone_number"`
@@ -18,6 +18,6 @@ type YounggeeSupplier struct {
 	Avater          string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avater"`
 }
 
-func (m *YounggeeSupplier) TableName() string {
+func (Supplier) TableName() string {
 	return "younggee_supplier"
 }

+ 9 - 8
model/http_model/LocalPrelinkList.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type LocalPreLinkListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	LinkStatus   string `json:"link_status"` // 链接状态,11待传链接
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page_num"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	LinkStatus   string   `json:"link_status"` // 链接状态,11待传链接
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetLocalPreLinkListData struct {
@@ -17,7 +18,7 @@ type GetLocalPreLinkListData struct {
 
 type LocalTasklinkinfo struct {
 	Task *LocaLTaskInfo `json:"task_info"`
-	DDl  time.Time      `json:"ddl"` // 提交时间
+	DDl  string         `json:"ddl"` // 提交时间
 }
 
 func NewLocalPreLinkListRequest() *LocalPreLinkListRequest {

+ 4 - 6
model/http_model/PassLocalTaskCoopRequest.go

@@ -1,12 +1,10 @@
 package http_model
 
 type PasslocalTaskCoopRequest 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"`
+	IsSpecial  int      `json:"is_special"`
 }
 
 type PasslocalTaskCoopData struct {

+ 4 - 6
model/http_model/PassproTaskCoopRequest.go

@@ -1,12 +1,10 @@
 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"`
+	IsSpecial  int      `json:"is_special"`
 }
 
 type PassproTaskCoopData struct {

+ 9 - 8
model/http_model/PreLinkList.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type PreLinkListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	LinkStatus   string `json:"link_status"` // 链接状态,11待传链接
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	LinkStatus   string   `json:"link_status"` // 链接状态,11待传链接
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetprelinkListData struct {
@@ -17,7 +18,7 @@ type GetprelinkListData struct {
 
 type Tasklinkinfo struct {
 	Task *TaskInfo `json:"task_info"`
-	DDl  time.Time `json:"ddl"` // 提交时间
+	DDl  string    `json:"ddl"` // 提交时间
 }
 
 func NewPreLinkListRequest() *PreLinkListRequest {

+ 2 - 3
model/http_model/RefuseproTaskCoopRequest.go

@@ -1,9 +1,8 @@
 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"`
 }
 
 type RefuseproTaskCoopData struct {

+ 6 - 5
model/http_model/data_accept.go

@@ -1,11 +1,12 @@
 package http_model
 
 type AcceptDataRequest struct {
-	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"`
+	//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"`
+	SettleAmount *string `json:"settle_amount"`
 }
 
 type AcceptDataData struct {

+ 5 - 5
model/http_model/data_localaccept.go

@@ -2,11 +2,11 @@ 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"`
+	SettleAmount *string `json:"settle_amount"`
 }
 
 type LocalAcceptDataData struct {

+ 0 - 1
model/http_model/data_opinion.go

@@ -4,7 +4,6 @@ type DataOpinionRequest struct {
 	TaskID      string `json:"task_id"`      //任务-id
 	DataOpinion string `json:"Data_opinion"` //数据审核意见
 	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
 	ProjectId   string `json:"project_id"`
 }
 

+ 19 - 0
model/http_model/getlocalrecruittimerequest.go

@@ -0,0 +1,19 @@
+package http_model
+
+type GetLocalRecruitTimeRequest struct {
+	ProjectId string `json:"project_id"`
+}
+
+type GetLocalRecruitTimeResponse struct {
+	RecruitTime string `json:"recruit_time"`
+}
+
+func NewGetLocalRecruitTimeRequest() *GetLocalRecruitTimeRequest {
+	return new(GetLocalRecruitTimeRequest)
+}
+
+func NewGetLocalRecruitTimeResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetLocalRecruitTimeResponse)
+	return resp
+}

+ 22 - 0
model/http_model/getlocaltalentstatuscountrequest.go

@@ -0,0 +1,22 @@
+package http_model
+
+type GetLocalTalentstatusCountRequest struct {
+	ProjectId string `json:"project_id"`
+	TaskStage int    `json:"task_stage"`
+}
+
+type GetLocalTalentstatusCountResponse struct {
+	UnoperateTalentnum int64 `json:"unoperate_talentnum"`
+	AgreeTalentnum     int64 `json:"agree_talentnum"`
+	RefuseTalentnum    int64 `json:"refuse_talentnum"`
+}
+
+func NewGetLocalTalentstatusCountRequest() *GetLocalTalentstatusCountRequest {
+	return new(GetLocalTalentstatusCountRequest)
+}
+
+func NewGetLocalTalentstatusCountResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetLocalTalentstatusCountResponse)
+	return resp
+}

+ 21 - 0
model/http_model/getlocaltalentstatusnumrequest.go

@@ -0,0 +1,21 @@
+package http_model
+
+type GetLocalTalentstatusNumRequest struct {
+	ProjectId string `json:"project_id"`
+}
+
+type GetLocalTalentstatusNumResponse struct {
+	UnoperateTalentnum int64 `json:"unoperate_talentnum"`
+	AgreeTalentnum     int64 `json:"agree_talentnum"`
+	RefuseTalentnum    int64 `json:"refuse_talentnum"`
+}
+
+func NewGetLocalTalentstatusNumRequest() *GetLocalTalentstatusNumRequest {
+	return new(GetLocalTalentstatusNumRequest)
+}
+
+func NewGetLocalTalentstatusNumResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetLocalTalentstatusNumResponse)
+	return resp
+}

+ 22 - 16
model/http_model/getlocaltasklist.go

@@ -1,16 +1,17 @@
 package http_model
 
-import "time"
-
 type GetLocalTaskListRequest struct {
-	PageSize       int    `json:"page_size"`
-	PageNum        int    `json:"page_num"`
-	TalentFromList string `json:"talent_from_list"`
-	FeeFrom        *int   `json:"fee_from,omitempty"`
-	Type           *int   `json:"type,omitempty"` // 查询类型,1、2分别表示达人来源于公海(商家端),服务商
-	ProjectId      string `json:"project_id"`
-	CoopType       int    `json:"coop_type"` //1未处理,2同意,3拒绝
-	EnterPriseId   string `json:"enterprise_id"`
+	PageSize       int      `json:"page_size"`
+	PageNum        int      `json:"page"`
+	TalentFromList string   `json:"talent_from_list"`
+	FeeFrom        *int     `json:"fee_from,omitempty"`
+	Type           *int     `json:"type,omitempty"` // 查询类型,1、2分别表示达人来源于公海(商家端),服务商
+	ProjectId      string   `json:"project_id"`
+	CoopType       int      `json:"coop_type"` //1未处理,2同意,3拒绝
+	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 {
@@ -28,17 +29,22 @@ type LocaLTaskInfo struct {
 	TaskStage          int     `json:"task_stage"`
 	Voteavg            int     `json:"vote_avg"`
 	Commentavg         int     `json:"commit_avg"`
+	CollectNum         int     `json:"collect_num"`
 	CurrentDefaultType int     `json:"current_default_type"`
 	From               int     `json:"from"`   //1公海,2服务商
 	SType              int     `json:"s_type"` //1个人,2机构
+	SName              string  `json:"sname"`
 	Boperator          string  `json:"b_operator"`
 	//SettleAmount       float64   `json:"settle_amount"`
-	CreateAt   time.Time `json:"create_time"`
-	ISCoop     int       `json:"is_coop"`
-	NickName   string    `json:"nick_name"`
-	HeadUrl    string    `json:"head_url"`
-	Sprojectid int       `json:"sprojectid"`
-	City       string    `json:"city"`
+	CreateAt   string `json:"create_time"`
+	ISCoop     int    `json:"is_coop"`
+	Gender     string `json:"gender"`
+	NickName   string `json:"nick_name"`
+	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 {

+ 19 - 0
model/http_model/getrecruittimerequest.go

@@ -0,0 +1,19 @@
+package http_model
+
+type GetRecruitTimeRequest struct {
+	ProjectId string `json:"project_id"`
+}
+
+type GetRecruitTimeResponse struct {
+	RecruitTime string `json:"recruit_time"`
+}
+
+func NewGetRecruitTimeRequest() *GetRecruitTimeRequest {
+	return new(GetRecruitTimeRequest)
+}
+
+func NewGetRecruitTimeResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetRecruitTimeResponse)
+	return resp
+}

+ 18 - 0
model/http_model/getsketchrecordlistrequest.go

@@ -0,0 +1,18 @@
+package http_model
+
+type GetSketchRecordListRequest struct {
+	TaskID string `json:"task_id"`
+}
+
+type GetSketchRecordListResponse struct {
+	SketchData []GetSketchInfoData `json:"sketch_data"`
+}
+
+func NewGetSketchRecordListRequest() *GetSketchRecordListRequest {
+	return new(GetSketchRecordListRequest)
+}
+func NewGetSketchRecordListResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetSketchRecordListResponse)
+	return resp
+}

+ 22 - 0
model/http_model/gettalentstatuscountnum.go

@@ -0,0 +1,22 @@
+package http_model
+
+type GetTalentstatusCountRequest struct {
+	ProjectId string `json:"project_id"`
+	TaskStage int    `json:"task_stage"`
+}
+
+type GetTalentstatusCountResponse struct {
+	UnoperateTalentnum int64 `json:"unoperate_talentnum"`
+	AgreeTalentnum     int64 `json:"agree_talentnum"`
+	RefuseTalentnum    int64 `json:"refuse_talentnum"`
+}
+
+func NewGetTalentstatusCountRequest() *GetTalentstatusCountRequest {
+	return new(GetTalentstatusCountRequest)
+}
+
+func NewGetTalentstatusCountResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetTalentstatusCountResponse)
+	return resp
+}

+ 23 - 0
model/http_model/gettalentstatusnumrequest.go

@@ -0,0 +1,23 @@
+package http_model
+
+type GetTalentstatusNumRequest struct {
+	ProjectId string `json:"project_id"`
+	//FeeFrom   *int   `json:"fee_from,omitempty"`
+	//Type      *int   `json:"type,omitempty"` // 查询类型,1、2分别表示达人来源于公海(商家端),服务商
+}
+
+type GetTalentStatusNumResponse struct {
+	UnoperateTalentnum int64 `json:"unoperate_talentnum"`
+	AgreeTalentnum     int64 `json:"agree_talentnum"`
+	RefuseTalentnum    int64 `json:"refuse_talentnum"`
+}
+
+func NewGetTalentstatusNumRequest() *GetTalentstatusNumRequest {
+	return new(GetTalentstatusNumRequest)
+}
+
+func NewGetTalentStatusNumResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetTalentStatusNumResponse)
+	return resp
+}

+ 21 - 15
model/http_model/gettasklist.go

@@ -1,15 +1,16 @@
 package http_model
 
-import "time"
-
 type GetTaskListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	FeeFrom      *int   `json:"fee_from,omitempty"`
-	Type         *int   `json:"type,omitempty"` // 查询类型,1、2分别表示达人来源于公海(商家端),服务商
-	ProjectId    string `json:"project_id"`
-	CoopType     int    `json:"coop_type"` //1未处理,2同意,3拒绝
-	EnterPriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	FeeFrom      *int     `json:"fee_from,omitempty"`
+	Type         *int     `json:"type,omitempty"` // 查询类型,1、2分别表示达人来源于公海(商家端),服务商
+	ProjectId    string   `json:"project_id"`
+	CoopType     int      `json:"coop_type"` //1未处理,2同意,3拒绝
+	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 {
@@ -27,17 +28,22 @@ type TaskInfo struct {
 	TaskStage          int     `json:"task_stage"`
 	Voteavg            int     `json:"vote_avg"`
 	Commentavg         int     `json:"commit_avg"`
+	CollectNum         int     `json:"collect_num"`
 	CurrentDefaultType int     `json:"current_default_type"`
 	From               int     `json:"from"`   //1公海,2服务商
 	SType              int     `json:"s_type"` //1个人,2机构
+	SName              string  `json:"sname"`
 	Boperator          string  `json:"b_operator"`
 	//SettleAmount       float64   `json:"settle_amount"`
-	CreateAt   time.Time `json:"create_time"`
-	ISCoop     int       `json:"is_coop"`
-	NickName   string    `json:"nick_name"`
-	HeadUrl    string    `json:"head_url"`
-	City       string    `json:"city"`
-	Sprojectid int       `json:"sprojectid"`
+	CreateAt   string `json:"create_time"`
+	ISCoop     int    `json:"is_coop"`
+	NickName   string `json:"nick_name"`
+	Gender     string `json:"gender"`
+	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 {

+ 4 - 5
model/http_model/link_accept.go

@@ -1,11 +1,10 @@
 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"`
+	Isspecial  int    `json:"is_special"`
 }
 
 type AcceptLinkData struct {

+ 4 - 5
model/http_model/link_localaccept.go

@@ -1,11 +1,10 @@
 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"`
+	Isspecial  int    `json:"is_special"`
 }
 
 type LocalAcceptLinkData struct {

+ 0 - 1
model/http_model/link_opinion.go

@@ -5,7 +5,6 @@ type LinkOpinionRequest struct {
 	ProjectId   string `json:"project_id"`
 	LinkOpinion string `json:"Link_opinion"` //链接审核意见
 	OperatorId  string `json:"operator_id"`
-	OperateType int    `json:"operate_type"`
 }
 
 type LinkOpinionData struct {

+ 0 - 1
model/http_model/localdata_opinion.go

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

+ 0 - 1
model/http_model/locallink_opinion.go

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

+ 9 - 8
model/http_model/localpredatalist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type LocalPreDataListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	DataStatus   string `json:"data_status"` // 数据状态,13待传数据
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	DataStatus   string   `json:"data_status"` // 数据状态,13待传数据
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetLocalPreDataListData struct {
@@ -17,7 +18,7 @@ type GetLocalPreDataListData struct {
 
 type LocalTaskdatainfo struct {
 	Task *LocaLTaskInfo `json:"task_info"`
-	DDl  time.Time      `json:"ddl"` // 截止时间
+	DDl  string         `json:"ddl"` // 截止时间
 }
 
 func NewLocalPreDataListRequest() *LocalPreDataListRequest {

+ 9 - 8
model/http_model/localpresketchlistrequest.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type LocalPreSketchListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`    // 项目ID
-	ScriptStatus int    `json:"script_status"` // 稿件状态,10初稿待审
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page_num"`
+	ProjectId    string   `json:"project_id"`    // 项目ID
+	ScriptStatus int      `json:"script_status"` // 稿件状态,10初稿待审
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetLocalSketchTaskListData struct {
@@ -17,7 +18,7 @@ type GetLocalSketchTaskListData struct {
 
 type LocalTasksketchInfo struct {
 	Task *LocaLTaskInfo `json:"task_info"`
-	DDl  time.Time      `json:"ddl"`
+	DDl  string         `json:"ddl"`
 }
 
 func NewLocalPreSketchListRequest() *LocalPreSketchListRequest {

+ 3 - 4
model/http_model/localreject_data.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type LocalRejectDataData struct {

+ 3 - 4
model/http_model/localreject_link.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type LocalRejectLinkData struct {

+ 0 - 1
model/http_model/localsketch_opinion.go

@@ -5,7 +5,6 @@ type LocalSketchOpinionRequest struct {
 	ProjectId          string `json:"project_id"`
 	LocalSketchOpinion string `json:"sketch_opinion"` //初稿意见
 	OperatorId         string `json:"operator_id"`
-	OperateType        int    `json:"operate_type"`
 }
 
 type LocalSketchOpinionData struct {

+ 10 - 9
model/http_model/localtaskdatalist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type LocalTaskDatalistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	DataStatus   string `json:"data_status"` // 链接状态,14
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	DataStatus   string   `json:"data_status"` // 链接状态,14
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetLocalTaskDatalistData struct {
@@ -17,8 +18,8 @@ type GetLocalTaskDatalistData struct {
 
 type LocalTaskDatainfo struct {
 	Task          *LocaLTaskInfo `json:"task_info"`
-	SubmitAt      time.Time      `json:"submit_at"` // 提交时间
-	AgreeAt       time.Time      `json:"agree_at"`
+	SubmitAt      string         `json:"submit_at"` // 提交时间
+	AgreeAt       string         `json:"agree_at"`
 	DataId        int            `json:"data_id"` //初稿ID
 	PhotoUrl      string         `json:"photo_url"`
 	PlayNumber    int            `json:"play_number"`

+ 10 - 9
model/http_model/localtasklinklist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type LocalTaskLinklistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	LinkStatus   string `json:"link_status"` // 链接状态,12待审
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	LinkStatus   string   `json:"link_status"` // 链接状态,12待审
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetLocalTaskLinkListData struct {
@@ -17,8 +18,8 @@ type GetLocalTaskLinkListData struct {
 
 type LocalTaskLinkinfo struct {
 	Task     *LocaLTaskInfo `json:"task_info"`
-	SubmitAt time.Time      `json:"submit_at"` // 提交时间
-	AgreeAt  time.Time      `json:"agree_at"`
+	SubmitAt string         `json:"submit_at"` // 提交时间
+	AgreeAt  string         `json:"agree_at"`
 	LinkId   int            `json:"link_id"` //初稿ID
 	LinkUrl  string         `json:"link_url"`
 	PhotoUrl string         `json:"photo_url"`

+ 13 - 11
model/http_model/localtasksketchlist.go

@@ -1,12 +1,13 @@
 package http_model
 
-import "time"
-
 type LocalTasksketchlistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`    // 项目ID
-	ScriptStatus int    `json:"script_status"` // 稿件状态
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`    // 项目ID
+	ScriptStatus int      `json:"script_status"` // 稿件状态
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetsketchlocaltaskListData struct {
@@ -15,11 +16,12 @@ type GetsketchlocaltaskListData struct {
 }
 
 type LocalTasksketchinfo struct {
-	Task     *LocaLTaskInfo `json:"task_info"`
-	SubmitAt time.Time      `json:"submit_at"` // 提交时间
-	AgreeAt  time.Time      `json:"agree_at"`
-	Operator string         `json:"operator"`
-	SketchId int            `json:"sketch_id"` //初稿ID
+	Task       *LocaLTaskInfo `json:"task_info"`
+	SubmitAt   string         `json:"submit_at"` // 提交时间
+	AgreeAt    string         `json:"agree_at"`
+	Operator   string         `json:"operator"`
+	SketchId   int            `json:"sketch_id"` //初稿ID
+	SketchType int            `json:"sketch_type"`
 }
 
 func NewLocalTasksketchlistRequest() *LocalTasksketchlistRequest {

+ 9 - 8
model/http_model/predatalist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type PreDataListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	DataStatus   string `json:"data_status"` // 数据状态,13待传数据
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	DataStatus   string   `json:"data_status"` // 数据状态,13待传数据
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetPreDataListData struct {
@@ -17,7 +18,7 @@ type GetPreDataListData struct {
 
 type Taskdatainfo struct {
 	Task *TaskInfo `json:"task_info"`
-	DDl  time.Time `json:"ddl"` // 截止时间
+	DDl  string    `json:"ddl"` // 截止时间
 }
 
 func NewPreDataListRequest() *PreDataListRequest {

+ 9 - 8
model/http_model/presketchlist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type PreSketchListRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`    // 项目ID
-	ScriptStatus int    `json:"script_status"` // 稿件状态,10初稿待审
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`    // 项目ID
+	ScriptStatus int      `json:"script_status"` // 稿件状态,10初稿待审
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetSketchTaskListData struct {
@@ -17,7 +18,7 @@ type GetSketchTaskListData struct {
 
 type TasksketchInfo struct {
 	Task *TaskInfo `json:"task_info"`
-	DDl  time.Time `json:"ddl"`
+	DDl  string    `json:"ddl"`
 }
 
 func NewPreSketchListRequest() *PreSketchListRequest {

+ 2 - 3
model/http_model/refuselocaltaskcooprequest.go

@@ -1,9 +1,8 @@
 package http_model
 
 type RefuselocalTaskCoopRequest 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"`
 }
 
 type RefuselocalTaskCoopData struct {

+ 3 - 4
model/http_model/reject_data.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type RejectDataData struct {

+ 3 - 4
model/http_model/reject_link.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type RejectLinkData struct {

+ 4 - 5
model/http_model/sketch_accept.go

@@ -1,11 +1,10 @@
 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"`
+	IsSpecial  int    `json:"is_special"`
 }
 
 type AcceptSketchData struct {

+ 4 - 5
model/http_model/sketch_loaclaccept.go

@@ -1,11 +1,10 @@
 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"`
+	OperatorId string `json:"operator_id"`
+	IsSpecial  int    `json:"is_special"`
 }
 
 type LocalAcceptSketchData struct {

+ 3 - 4
model/http_model/sketch_localreject.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type LocalRejectSketchData struct {

+ 0 - 1
model/http_model/sketch_opinion.go

@@ -5,7 +5,6 @@ type SketchOpinionRequest struct {
 	ProjectId     string `json:"project_id"`
 	SketchOpinion string `json:"sketch_opinion"` //初稿意见
 	OperatorId    string `json:"operator_id"`
-	OperateType   int    `json:"operate_type"`
 }
 
 type SketchOpinionData struct {

+ 3 - 4
model/http_model/sketch_reject.go

@@ -1,10 +1,9 @@
 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"`
 }
 
 type RejectSketchData struct {

+ 2 - 4
model/http_model/sktech_info.go

@@ -1,7 +1,5 @@
 package http_model
 
-import "time"
-
 type GetSketchInfoRequest struct {
 	TaskID string `json:"task_id"`
 }
@@ -16,8 +14,8 @@ type GetSketchInfoData struct {
 	SketchPhotos   []SketchPhotoInfo `json:"sketch_photos"` //初稿图片以及视频
 	Title          string            `json:"title"`
 	Content        string            `json:"content"`
-	Agreeat        time.Time         `json:"agree_at"`
-	Submitat       time.Time         `json:"submit_at"`
+	Agreeat        string            `json:"agree_at"`
+	Submitat       string            `json:"submit_at"`
 	ReverseOpinion string            `json:"reverse_opinion"`
 }
 

+ 10 - 9
model/http_model/taskdatalist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type TaskDatalistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	DataStatus   string `json:"data_status"` // 链接状态,14
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	DataStatus   string   `json:"data_status"` // 链接状态,14
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetTaskDatalistData struct {
@@ -17,8 +18,8 @@ type GetTaskDatalistData struct {
 
 type TaskDatainfo struct {
 	Task          *TaskInfo `json:"task_info"`
-	SubmitAt      time.Time `json:"submit_at"` // 提交时间
-	AgreeAt       time.Time `json:"agree_at"`
+	SubmitAt      string    `json:"submit_at"` // 提交时间
+	AgreeAt       string    `json:"agree_at"`
 	DataId        int       `json:"data_id"` //初稿ID
 	PhotoUrl      string    `json:"photo_url"`
 	PlayNumber    int       `json:"play_number"`

+ 10 - 9
model/http_model/tasklinklist.go

@@ -1,13 +1,14 @@
 package http_model
 
-import "time"
-
 type TaskLinklistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`  // 项目ID
-	LinkStatus   string `json:"link_status"` // 链接状态,12待审
-	EnterpriseId string `json:"enterprise_id"`
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`  // 项目ID
+	LinkStatus   string   `json:"link_status"` // 链接状态,12待审
+	EnterpriseId string   `json:"enterprise_id"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GettasklinkListData struct {
@@ -17,8 +18,8 @@ type GettasklinkListData struct {
 
 type TaskLinkinfo struct {
 	Task     *TaskInfo `json:"task_info"`
-	SubmitAt time.Time `json:"submit_at"` // 提交时间
-	AgreeAt  time.Time `json:"agree_at"`
+	SubmitAt string    `json:"submit_at"` // 提交时间
+	AgreeAt  string    `json:"agree_at"`
 	LinkId   int       `json:"link_id"` //初稿ID
 	LinkUrl  string    `json:"link_url"`
 	PhotoUrl string    `json:"photo_url"`

+ 13 - 11
model/http_model/tasksketchlist.go

@@ -1,12 +1,13 @@
 package http_model
 
-import "time"
-
 type TasksketchlistRequest struct {
-	PageSize     int    `json:"page_size"`
-	PageNum      int    `json:"page_num"`
-	ProjectId    string `json:"project_id"`    // 项目ID
-	ScriptStatus int    `json:"script_status"` // 稿件状态
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page"`
+	ProjectId    string   `json:"project_id"`    // 项目ID
+	ScriptStatus int      `json:"script_status"` // 稿件状态
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
+	Others       string   `json:"others,omitempty"`
 }
 
 type GetsketchtaskListData struct {
@@ -15,11 +16,12 @@ type GetsketchtaskListData struct {
 }
 
 type Tasksketchinfo struct {
-	Task     *TaskInfo `json:"task_info"`
-	SubmitAt time.Time `json:"submit_at"` // 提交时间
-	AgreeAt  time.Time `json:"agree_at"`
-	Operator string    `json:"operator"`
-	SketchId int       `json:"sketch_id"` //初稿ID
+	Task       *TaskInfo `json:"task_info"`
+	SubmitAt   string    `json:"submit_at"` // 提交时间
+	AgreeAt    string    `json:"agree_at"`
+	Operator   string    `json:"operator"`
+	SketchId   int       `json:"sketch_id"` //初稿ID
+	SketchType int       `json:"sketch_type"`
 }
 
 func NewTasksketchlistRequest() *TasksketchlistRequest {

+ 60 - 60
pack/project_task_list.go

@@ -1,60 +1,60 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormProjectTaskToHttpProjectTaskPreview(gormProjectTaskInfos []*http_model.ProjectTaskInfo) []*http_model.ProjectTaskPreview {
-	var httpProjectPreviews []*http_model.ProjectTaskPreview
-	for _, gormProjectTaskInfo := range gormProjectTaskInfos {
-		httpProjectTaskPreview := GormFullProjectToHttpProjectTaskPreview(gormProjectTaskInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpProjectTaskPreview)
-	}
-	return httpProjectPreviews
-}
-
-func GormFullProjectToHttpProjectTaskPreview(projectTaskInfo *http_model.ProjectTaskInfo) *http_model.ProjectTaskPreview {
-	createDate := conv.MustString(projectTaskInfo.CreateDate, "")
-	createDate = createDate[0:19]
-	return &http_model.ProjectTaskPreview{
-		TaskId:             conv.MustString(projectTaskInfo.TaskID, ""),
-		PlatformNickname:   conv.MustString(projectTaskInfo.PlatformNickname, ""),
-		FansCount:          conv.MustString(projectTaskInfo.FansCount, ""),
-		HomePageCaptureUrl: conv.MustString(projectTaskInfo.HomePageCaptureUrl, ""),
-		StrategyId:         conv.MustString(projectTaskInfo.StrategyID, ""),
-		TaskReward:         conv.MustString(projectTaskInfo.TaskReward, ""),
-		AllPayment:         conv.MustString(projectTaskInfo.AllPayment, ""),
-		HomePageUrl:        conv.MustString(projectTaskInfo.HomePageUrl, ""),
-		TaskStatus:         conv.MustString(projectTaskInfo.TaskStatus, ""),
-		CreateDate:         createDate,
-	}
-}
-
-func TaskAccountToTaskInfo(taskAccounts []gorm_model.YoungeeTaskInfo) []*http_model.ProjectTaskInfo {
-	var projectTasks []*http_model.ProjectTaskInfo
-	for _, taskAccount := range taskAccounts {
-		projectTask := GetTaskInfoStruct(taskAccount)
-		projectTasks = append(projectTasks, projectTask)
-	}
-	return projectTasks
-}
-
-func GetTaskInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *http_model.ProjectTaskInfo {
-	TalentPlatformInfoSnap := taskAccount.TalentPlatformInfoSnap
-	//fmt.Printf("任务-账户关联 %+v", taskAccount)
-	return &http_model.ProjectTaskInfo{
-		TaskID:             taskAccount.TaskId,
-		TaskReward:         taskAccount.TaskReward,
-		AllPayment:         taskAccount.AllPayment,
-		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		CreateDate:         taskAccount.CreateDate,
-		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
-		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
-		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		TaskStatus:         string(rune(taskAccount.TaskStatus)),
-		StrategyID:         taskAccount.StrategyId,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormProjectTaskToHttpProjectTaskPreview(gormProjectTaskInfos []*http_model.ProjectTaskInfo) []*http_model.ProjectTaskPreview {
+	var httpProjectPreviews []*http_model.ProjectTaskPreview
+	for _, gormProjectTaskInfo := range gormProjectTaskInfos {
+		httpProjectTaskPreview := GormFullProjectToHttpProjectTaskPreview(gormProjectTaskInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpProjectTaskPreview)
+	}
+	return httpProjectPreviews
+}
+
+func GormFullProjectToHttpProjectTaskPreview(projectTaskInfo *http_model.ProjectTaskInfo) *http_model.ProjectTaskPreview {
+	createDate := conv.MustString(projectTaskInfo.CreateDate, "")
+	createDate = createDate[0:19]
+	return &http_model.ProjectTaskPreview{
+		TaskId:             conv.MustString(projectTaskInfo.TaskID, ""),
+		PlatformNickname:   conv.MustString(projectTaskInfo.PlatformNickname, ""),
+		FansCount:          conv.MustString(projectTaskInfo.FansCount, ""),
+		HomePageCaptureUrl: conv.MustString(projectTaskInfo.HomePageCaptureUrl, ""),
+		StrategyId:         conv.MustString(projectTaskInfo.StrategyID, ""),
+		TaskReward:         conv.MustString(projectTaskInfo.TaskReward, ""),
+		AllPayment:         conv.MustString(projectTaskInfo.AllPayment, ""),
+		HomePageUrl:        conv.MustString(projectTaskInfo.HomePageUrl, ""),
+		TaskStatus:         conv.MustString(projectTaskInfo.TaskStatus, ""),
+		CreateDate:         createDate,
+	}
+}
+
+func TaskAccountToTaskInfo(taskAccounts []gorm_model.YoungeeTaskInfo) []*http_model.ProjectTaskInfo {
+	var projectTasks []*http_model.ProjectTaskInfo
+	for _, taskAccount := range taskAccounts {
+		projectTask := GetTaskInfoStruct(taskAccount)
+		projectTasks = append(projectTasks, projectTask)
+	}
+	return projectTasks
+}
+
+func GetTaskInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *http_model.ProjectTaskInfo {
+	TalentPlatformInfoSnap := taskAccount.TalentPlatformInfoSnap
+	//fmt.Printf("任务-账户关联 %+v", taskAccount)
+	return &http_model.ProjectTaskInfo{
+		TaskID:             taskAccount.TaskID,
+		TaskReward:         taskAccount.TaskReward,
+		AllPayment:         taskAccount.AllPayment,
+		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		CreateDate:         taskAccount.CreateDate,
+		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
+		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
+		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		TaskStatus:         string(rune(taskAccount.TaskStatus)),
+		StrategyID:         taskAccount.StrategyID,
+	}
+}

+ 71 - 71
pack/special_task_data_list.go

@@ -1,71 +1,71 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskDataInfoListToHttpSpecialTaskDataPreviewList(gormSpecialTaskDataInfos []*http_model.SpecialTaskDataInfo) []*http_model.SpecialTaskDataPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskDataPreview
-	for _, gormSpecialTaskDataInfo := range gormSpecialTaskDataInfos {
-		httpSpecialTaskDataPreview := MGormSpecialTaskDataInfoToHttpSpecialTaskDataPreview(gormSpecialTaskDataInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskDataPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskDataInfoToHttpSpecialTaskDataPreview(SpecialTaskDataInfo *http_model.SpecialTaskDataInfo) *http_model.SpecialTaskDataPreview {
-	return &http_model.SpecialTaskDataPreview{
-		TaskID:           conv.MustString(SpecialTaskDataInfo.TaskID, ""),
-		PlatformNickname: conv.MustString(SpecialTaskDataInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskDataInfo.FansCount, ""),
-		PlayNumber:       SpecialTaskDataInfo.PlayNumber,
-		LikeNumber:       SpecialTaskDataInfo.LikeNumber,
-		CommentNumber:    SpecialTaskDataInfo.CommentNumber,
-		CollectNumber:    SpecialTaskDataInfo.CollectNumber,
-		LinkUrl:          SpecialTaskDataInfo.LinkUrl,
-		PhotoUrl:         SpecialTaskDataInfo.PhotoUrl,
-		AllPayment:       SpecialTaskDataInfo.AllPayment,
-		RealPayment:      SpecialTaskDataInfo.RealPayment,
-		ReviseOpinion:    SpecialTaskDataInfo.ReviseOpinion,
-		Phone:            SpecialTaskDataInfo.Phone,
-		SubmitAt:         conv.MustString(SpecialTaskDataInfo.SubmitAt, "")[0:19],
-		AgreeAt:          conv.MustString(SpecialTaskDataInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func SpecialTaskDataToTaskInfo(SpecialTaskDatas []*http_model.SpecialTaskData) []*http_model.SpecialTaskDataInfo {
-	var SpecialTaskDataInfos []*http_model.SpecialTaskDataInfo
-	for _, SpecialTaskData := range SpecialTaskDatas {
-		SpecialTaskData := GetSpecialTaskDataInfoStruct(SpecialTaskData)
-		SpecialTaskDataInfos = append(SpecialTaskDataInfos, SpecialTaskData)
-	}
-	return SpecialTaskDataInfos
-}
-
-func GetSpecialTaskDataInfoStruct(SpecialTaskData *http_model.SpecialTaskData) *http_model.SpecialTaskDataInfo {
-	TalentPlatformInfoSnap := SpecialTaskData.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskData.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskDataInfo{
-		TaskID:           SpecialTaskData.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		DataId:           SpecialTaskData.Data.DataID,
-		PlayNumber:       SpecialTaskData.Data.PlayNumber,
-		LikeNumber:       SpecialTaskData.Data.LikeNumber,
-		CommentNumber:    SpecialTaskData.Data.CommentNumber,
-		CollectNumber:    SpecialTaskData.Data.CollectNumber,
-		LinkUrl:          SpecialTaskData.Link.LinkUrl,
-		PhotoUrl:         SpecialTaskData.Data.PhotoUrl,
-		AllPayment:       SpecialTaskData.Talent.AllPayment,
-		RealPayment:      SpecialTaskData.Talent.RealPayment,
-		ReviseOpinion:    SpecialTaskData.Data.ReviseOpinion,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		CreateAt:         SpecialTaskData.Data.CreateAt,
-		SubmitAt:         SpecialTaskData.Data.SubmitAt,
-		AgreeAt:          SpecialTaskData.Data.AgreeAt,
-		RejectAt:         SpecialTaskData.Data.RejectAt,
-		IsReview:         SpecialTaskData.Data.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskDataInfoListToHttpSpecialTaskDataPreviewList(gormSpecialTaskDataInfos []*http_model.SpecialTaskDataInfo) []*http_model.SpecialTaskDataPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskDataPreview
+	for _, gormSpecialTaskDataInfo := range gormSpecialTaskDataInfos {
+		httpSpecialTaskDataPreview := MGormSpecialTaskDataInfoToHttpSpecialTaskDataPreview(gormSpecialTaskDataInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskDataPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskDataInfoToHttpSpecialTaskDataPreview(SpecialTaskDataInfo *http_model.SpecialTaskDataInfo) *http_model.SpecialTaskDataPreview {
+	return &http_model.SpecialTaskDataPreview{
+		TaskID:           conv.MustString(SpecialTaskDataInfo.TaskID, ""),
+		PlatformNickname: conv.MustString(SpecialTaskDataInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskDataInfo.FansCount, ""),
+		PlayNumber:       SpecialTaskDataInfo.PlayNumber,
+		LikeNumber:       SpecialTaskDataInfo.LikeNumber,
+		CommentNumber:    SpecialTaskDataInfo.CommentNumber,
+		CollectNumber:    SpecialTaskDataInfo.CollectNumber,
+		LinkUrl:          SpecialTaskDataInfo.LinkUrl,
+		PhotoUrl:         SpecialTaskDataInfo.PhotoUrl,
+		AllPayment:       SpecialTaskDataInfo.AllPayment,
+		RealPayment:      SpecialTaskDataInfo.RealPayment,
+		ReviseOpinion:    SpecialTaskDataInfo.ReviseOpinion,
+		Phone:            SpecialTaskDataInfo.Phone,
+		SubmitAt:         conv.MustString(SpecialTaskDataInfo.SubmitAt, "")[0:19],
+		AgreeAt:          conv.MustString(SpecialTaskDataInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func SpecialTaskDataToTaskInfo(SpecialTaskDatas []*http_model.SpecialTaskData) []*http_model.SpecialTaskDataInfo {
+	var SpecialTaskDataInfos []*http_model.SpecialTaskDataInfo
+	for _, SpecialTaskData := range SpecialTaskDatas {
+		SpecialTaskData := GetSpecialTaskDataInfoStruct(SpecialTaskData)
+		SpecialTaskDataInfos = append(SpecialTaskDataInfos, SpecialTaskData)
+	}
+	return SpecialTaskDataInfos
+}
+
+func GetSpecialTaskDataInfoStruct(SpecialTaskData *http_model.SpecialTaskData) *http_model.SpecialTaskDataInfo {
+	TalentPlatformInfoSnap := SpecialTaskData.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskData.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskDataInfo{
+		TaskID:           SpecialTaskData.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		DataId:           SpecialTaskData.Data.DataID,
+		PlayNumber:       SpecialTaskData.Data.PlayNumber,
+		LikeNumber:       SpecialTaskData.Data.LikeNumber,
+		CommentNumber:    SpecialTaskData.Data.CommentNumber,
+		CollectNumber:    SpecialTaskData.Data.CollectNumber,
+		LinkUrl:          SpecialTaskData.Link.LinkUrl,
+		PhotoUrl:         SpecialTaskData.Data.PhotoUrl,
+		AllPayment:       SpecialTaskData.Talent.AllPayment,
+		RealPayment:      SpecialTaskData.Talent.RealPayment,
+		ReviseOpinion:    SpecialTaskData.Data.ReviseOpinion,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		CreateAt:         SpecialTaskData.Data.CreateAt,
+		SubmitAt:         SpecialTaskData.Data.SubmitAt,
+		AgreeAt:          SpecialTaskData.Data.AgreeAt,
+		RejectAt:         SpecialTaskData.Data.RejectAt,
+		IsReview:         SpecialTaskData.Data.IsReview,
+	}
+}

+ 61 - 61
pack/special_task_finishdata_list.go

@@ -1,61 +1,61 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskFinishDataInfoListToHttpSpecialTaskFinishDataPreviewList(gormSpecialTaskFinishDataInfos []*http_model.SpecialTaskFinishDataInfo) []*http_model.SpecialTaskFinishDataPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskFinishDataPreview
-	for _, gormSpecialTaskFinishDataInfo := range gormSpecialTaskFinishDataInfos {
-		httpSpecialTaskFinishDataPreview := MGormSpecialTaskFinishDataInfoToHttpSpecialTaskFinishDataPreview(gormSpecialTaskFinishDataInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskFinishDataPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskFinishDataInfoToHttpSpecialTaskFinishDataPreview(SpecialTaskFinishDataInfo *http_model.SpecialTaskFinishDataInfo) *http_model.SpecialTaskFinishDataPreview {
-	return &http_model.SpecialTaskFinishDataPreview{
-		TaskID:           conv.MustString(SpecialTaskFinishDataInfo.TaskID, ""),
-		PlatformNickname: conv.MustString(SpecialTaskFinishDataInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskFinishDataInfo.FansCount, ""),
-		PlayNumber:       SpecialTaskFinishDataInfo.PlayNumber,
-		LikeNumber:       SpecialTaskFinishDataInfo.LikeNumber,
-		CommentNumber:    SpecialTaskFinishDataInfo.CommentNumber,
-		CollectNumber:    SpecialTaskFinishDataInfo.CollectNumber,
-		RealPayment:      SpecialTaskFinishDataInfo.RealPayment,
-		PhotoUrl:         SpecialTaskFinishDataInfo.PhotoUrl,
-		LinkUrl:          SpecialTaskFinishDataInfo.LinkUrl,
-		Phone:            SpecialTaskFinishDataInfo.Phone,
-		SubmitAt:         conv.MustString(SpecialTaskFinishDataInfo.SubmitAt, "")[0:19],
-	}
-}
-
-func SpecialTaskFinishDataToTaskInfo(SpecialTaskFinishDatas []*http_model.SpecialTaskFinishData) []*http_model.SpecialTaskFinishDataInfo {
-	var SpecialTaskFinishDataInfos []*http_model.SpecialTaskFinishDataInfo
-	for _, SpecialTaskFinishData := range SpecialTaskFinishDatas {
-		SpecialTaskFinishData := GetSpecialTaskFinishDataInfoStruct(SpecialTaskFinishData)
-		SpecialTaskFinishDataInfos = append(SpecialTaskFinishDataInfos, SpecialTaskFinishData)
-	}
-	return SpecialTaskFinishDataInfos
-}
-
-func GetSpecialTaskFinishDataInfoStruct(SpecialTaskFinishData *http_model.SpecialTaskFinishData) *http_model.SpecialTaskFinishDataInfo {
-	TalentPlatformInfoSnap := SpecialTaskFinishData.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskFinishData.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskFinishDataInfo{
-		TaskID:           SpecialTaskFinishData.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		PlayNumber:       SpecialTaskFinishData.Data.PlayNumber,
-		LikeNumber:       SpecialTaskFinishData.Data.LikeNumber,
-		CommentNumber:    SpecialTaskFinishData.Data.CommentNumber,
-		CollectNumber:    SpecialTaskFinishData.Data.CollectNumber,
-		RealPayment:      SpecialTaskFinishData.Talent.RealPayment,
-		PhotoUrl:         SpecialTaskFinishData.Data.PhotoUrl,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		LinkUrl:          SpecialTaskFinishData.Link.LinkUrl,
-		SubmitAt:         SpecialTaskFinishData.Data.SubmitAt,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskFinishDataInfoListToHttpSpecialTaskFinishDataPreviewList(gormSpecialTaskFinishDataInfos []*http_model.SpecialTaskFinishDataInfo) []*http_model.SpecialTaskFinishDataPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskFinishDataPreview
+	for _, gormSpecialTaskFinishDataInfo := range gormSpecialTaskFinishDataInfos {
+		httpSpecialTaskFinishDataPreview := MGormSpecialTaskFinishDataInfoToHttpSpecialTaskFinishDataPreview(gormSpecialTaskFinishDataInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskFinishDataPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskFinishDataInfoToHttpSpecialTaskFinishDataPreview(SpecialTaskFinishDataInfo *http_model.SpecialTaskFinishDataInfo) *http_model.SpecialTaskFinishDataPreview {
+	return &http_model.SpecialTaskFinishDataPreview{
+		TaskID:           conv.MustString(SpecialTaskFinishDataInfo.TaskID, ""),
+		PlatformNickname: conv.MustString(SpecialTaskFinishDataInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskFinishDataInfo.FansCount, ""),
+		PlayNumber:       SpecialTaskFinishDataInfo.PlayNumber,
+		LikeNumber:       SpecialTaskFinishDataInfo.LikeNumber,
+		CommentNumber:    SpecialTaskFinishDataInfo.CommentNumber,
+		CollectNumber:    SpecialTaskFinishDataInfo.CollectNumber,
+		RealPayment:      SpecialTaskFinishDataInfo.RealPayment,
+		PhotoUrl:         SpecialTaskFinishDataInfo.PhotoUrl,
+		LinkUrl:          SpecialTaskFinishDataInfo.LinkUrl,
+		Phone:            SpecialTaskFinishDataInfo.Phone,
+		SubmitAt:         conv.MustString(SpecialTaskFinishDataInfo.SubmitAt, "")[0:19],
+	}
+}
+
+func SpecialTaskFinishDataToTaskInfo(SpecialTaskFinishDatas []*http_model.SpecialTaskFinishData) []*http_model.SpecialTaskFinishDataInfo {
+	var SpecialTaskFinishDataInfos []*http_model.SpecialTaskFinishDataInfo
+	for _, SpecialTaskFinishData := range SpecialTaskFinishDatas {
+		SpecialTaskFinishData := GetSpecialTaskFinishDataInfoStruct(SpecialTaskFinishData)
+		SpecialTaskFinishDataInfos = append(SpecialTaskFinishDataInfos, SpecialTaskFinishData)
+	}
+	return SpecialTaskFinishDataInfos
+}
+
+func GetSpecialTaskFinishDataInfoStruct(SpecialTaskFinishData *http_model.SpecialTaskFinishData) *http_model.SpecialTaskFinishDataInfo {
+	TalentPlatformInfoSnap := SpecialTaskFinishData.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskFinishData.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskFinishDataInfo{
+		TaskID:           SpecialTaskFinishData.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		PlayNumber:       SpecialTaskFinishData.Data.PlayNumber,
+		LikeNumber:       SpecialTaskFinishData.Data.LikeNumber,
+		CommentNumber:    SpecialTaskFinishData.Data.CommentNumber,
+		CollectNumber:    SpecialTaskFinishData.Data.CollectNumber,
+		RealPayment:      SpecialTaskFinishData.Talent.RealPayment,
+		PhotoUrl:         SpecialTaskFinishData.Data.PhotoUrl,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		LinkUrl:          SpecialTaskFinishData.Link.LinkUrl,
+		SubmitAt:         SpecialTaskFinishData.Data.SubmitAt,
+	}
+}

+ 61 - 61
pack/special_task_invite_list.go

@@ -1,61 +1,61 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/gorm_model"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskInviteInfoListToHttpSpecialTaskInvitePreviewList(gormSpecialTaskInviteInfos []*http_model.SpecialTaskInviteInfo) []*http_model.SpecialTaskInvitePreview {
-	var httpProjectPreviews []*http_model.SpecialTaskInvitePreview
-	for _, gormSpecialTaskInviteInfo := range gormSpecialTaskInviteInfos {
-		httpSpecialTaskInvitePreview := GormFullProjectToHttpSpecialTaskInvitePreview(gormSpecialTaskInviteInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskInvitePreview)
-	}
-	return httpProjectPreviews
-}
-
-func GormFullProjectToHttpSpecialTaskInvitePreview(projectTaskInfo *http_model.SpecialTaskInviteInfo) *http_model.SpecialTaskInvitePreview {
-	createDate := conv.MustString(projectTaskInfo.CreateDate, "")
-	createDate = createDate[0:19]
-	return &http_model.SpecialTaskInvitePreview{
-		TaskId:             conv.MustString(projectTaskInfo.TaskID, ""),
-		PlatformNickname:   conv.MustString(projectTaskInfo.PlatformNickname, ""),
-		FansCount:          conv.MustString(projectTaskInfo.FansCount, ""),
-		HomePageCaptureUrl: conv.MustString(projectTaskInfo.HomePageCaptureUrl, ""),
-		AllPayment:         conv.MustString(projectTaskInfo.AllPayment, ""),
-		TaskReward:         conv.MustString(projectTaskInfo.TaskReward, ""),
-		HomePageUrl:        conv.MustString(projectTaskInfo.HomePageUrl, ""),
-		TaskStatus:         conv.MustString(projectTaskInfo.TaskStatus, ""),
-		CreateDate:         createDate,
-		Phone:              projectTaskInfo.Phone,
-	}
-}
-
-func YoungeeTaskInfoToSpecialTaskInviteInfo(taskAccounts []gorm_model.YoungeeTaskInfo) []*http_model.SpecialTaskInviteInfo {
-	var projectTasks []*http_model.SpecialTaskInviteInfo
-	for _, taskAccount := range taskAccounts {
-		projectTask := GetSpecialTaskInviteInfoStruct(taskAccount)
-		projectTasks = append(projectTasks, projectTask)
-	}
-	return projectTasks
-}
-
-func GetSpecialTaskInviteInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *http_model.SpecialTaskInviteInfo {
-	TalentPlatformInfoSnap := taskAccount.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := taskAccount.TalentPersonalInfoSnap
-	//fmt.Printf("任务-账户关联 %+v", taskAccount)
-	return &http_model.SpecialTaskInviteInfo{
-		TaskID:             taskAccount.TaskId,
-		TaskReward:         taskAccount.TaskReward,
-		AllPayment:         taskAccount.AllPayment,
-		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		CreateDate:         taskAccount.CreateDate,
-		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
-		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
-		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		TaskStatus:         string(rune(taskAccount.TaskStatus)),
-		Phone:              conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/gorm_model"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskInviteInfoListToHttpSpecialTaskInvitePreviewList(gormSpecialTaskInviteInfos []*http_model.SpecialTaskInviteInfo) []*http_model.SpecialTaskInvitePreview {
+	var httpProjectPreviews []*http_model.SpecialTaskInvitePreview
+	for _, gormSpecialTaskInviteInfo := range gormSpecialTaskInviteInfos {
+		httpSpecialTaskInvitePreview := GormFullProjectToHttpSpecialTaskInvitePreview(gormSpecialTaskInviteInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskInvitePreview)
+	}
+	return httpProjectPreviews
+}
+
+func GormFullProjectToHttpSpecialTaskInvitePreview(projectTaskInfo *http_model.SpecialTaskInviteInfo) *http_model.SpecialTaskInvitePreview {
+	createDate := conv.MustString(projectTaskInfo.CreateDate, "")
+	createDate = createDate[0:19]
+	return &http_model.SpecialTaskInvitePreview{
+		TaskId:             conv.MustString(projectTaskInfo.TaskID, ""),
+		PlatformNickname:   conv.MustString(projectTaskInfo.PlatformNickname, ""),
+		FansCount:          conv.MustString(projectTaskInfo.FansCount, ""),
+		HomePageCaptureUrl: conv.MustString(projectTaskInfo.HomePageCaptureUrl, ""),
+		AllPayment:         conv.MustString(projectTaskInfo.AllPayment, ""),
+		TaskReward:         conv.MustString(projectTaskInfo.TaskReward, ""),
+		HomePageUrl:        conv.MustString(projectTaskInfo.HomePageUrl, ""),
+		TaskStatus:         conv.MustString(projectTaskInfo.TaskStatus, ""),
+		CreateDate:         createDate,
+		Phone:              projectTaskInfo.Phone,
+	}
+}
+
+func YoungeeTaskInfoToSpecialTaskInviteInfo(taskAccounts []gorm_model.YoungeeTaskInfo) []*http_model.SpecialTaskInviteInfo {
+	var projectTasks []*http_model.SpecialTaskInviteInfo
+	for _, taskAccount := range taskAccounts {
+		projectTask := GetSpecialTaskInviteInfoStruct(taskAccount)
+		projectTasks = append(projectTasks, projectTask)
+	}
+	return projectTasks
+}
+
+func GetSpecialTaskInviteInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *http_model.SpecialTaskInviteInfo {
+	TalentPlatformInfoSnap := taskAccount.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := taskAccount.TalentPersonalInfoSnap
+	//fmt.Printf("任务-账户关联 %+v", taskAccount)
+	return &http_model.SpecialTaskInviteInfo{
+		TaskID:             taskAccount.TaskID,
+		TaskReward:         taskAccount.TaskReward,
+		AllPayment:         taskAccount.AllPayment,
+		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		CreateDate:         taskAccount.CreateDate,
+		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
+		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
+		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		TaskStatus:         string(rune(taskAccount.TaskStatus)),
+		Phone:              conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+	}
+}

+ 59 - 59
pack/special_task_link_list.go

@@ -1,59 +1,59 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskLinkInfoListToHttpSpecialTaskLinkPreviewList(gormSpecialTaskLinkInfos []*http_model.SpecialTaskLinkInfo) []*http_model.SpecialTaskLinkPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskLinkPreview
-	for _, gormSpecialTaskLinkInfo := range gormSpecialTaskLinkInfos {
-		httpSpecialTaskLinkPreview := MGormSpecialTaskLinkInfoToHttpSpecialTaskLinkPreview(gormSpecialTaskLinkInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskLinkPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskLinkInfoToHttpSpecialTaskLinkPreview(SpecialTaskLinkInfo *http_model.SpecialTaskLinkInfo) *http_model.SpecialTaskLinkPreview {
-	return &http_model.SpecialTaskLinkPreview{
-		TaskID:           conv.MustString(SpecialTaskLinkInfo.TaskID, ""),
-		PlatformNickname: conv.MustString(SpecialTaskLinkInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskLinkInfo.FansCount, ""),
-		PhotoUrl:         SpecialTaskLinkInfo.PhotoUrl,
-		LinkUrl:          SpecialTaskLinkInfo.LinkUrl,
-		Phone:            SpecialTaskLinkInfo.Phone,
-		ReviseOpinion:    SpecialTaskLinkInfo.ReviseOpinion,
-		Submit:           conv.MustString(SpecialTaskLinkInfo.SubmitAt, "")[0:19],
-		AgreeAt:          conv.MustString(SpecialTaskLinkInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func SpecialTaskLinkToTaskInfo(SpecialTaskLinks []*http_model.SpecialTaskLink) []*http_model.SpecialTaskLinkInfo {
-	var SpecialTaskLinkInfos []*http_model.SpecialTaskLinkInfo
-	for _, SpecialTaskLink := range SpecialTaskLinks {
-		SpecialTaskLink := GetSpecialTaskLinkInfoStruct(SpecialTaskLink)
-		SpecialTaskLinkInfos = append(SpecialTaskLinkInfos, SpecialTaskLink)
-	}
-	return SpecialTaskLinkInfos
-}
-
-func GetSpecialTaskLinkInfoStruct(SpecialTaskLink *http_model.SpecialTaskLink) *http_model.SpecialTaskLinkInfo {
-	TalentPlatformInfoSnap := SpecialTaskLink.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskLink.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskLinkInfo{
-		TaskID:           SpecialTaskLink.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		LinkId:           SpecialTaskLink.Link.LinkID,
-		PhotoUrl:         SpecialTaskLink.Link.PhotoUrl,
-		LinkUrl:          SpecialTaskLink.Link.LinkUrl,
-		ReviseOpinion:    SpecialTaskLink.Link.ReviseOpinion,
-		CreateAt:         SpecialTaskLink.Link.CreateAt,
-		SubmitAt:         SpecialTaskLink.Link.SubmitAt,
-		AgreeAt:          SpecialTaskLink.Link.AgreeAt,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		RejectAt:         SpecialTaskLink.Link.RejectAt,
-		IsReview:         SpecialTaskLink.Link.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskLinkInfoListToHttpSpecialTaskLinkPreviewList(gormSpecialTaskLinkInfos []*http_model.SpecialTaskLinkInfo) []*http_model.SpecialTaskLinkPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskLinkPreview
+	for _, gormSpecialTaskLinkInfo := range gormSpecialTaskLinkInfos {
+		httpSpecialTaskLinkPreview := MGormSpecialTaskLinkInfoToHttpSpecialTaskLinkPreview(gormSpecialTaskLinkInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskLinkPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskLinkInfoToHttpSpecialTaskLinkPreview(SpecialTaskLinkInfo *http_model.SpecialTaskLinkInfo) *http_model.SpecialTaskLinkPreview {
+	return &http_model.SpecialTaskLinkPreview{
+		TaskID:           conv.MustString(SpecialTaskLinkInfo.TaskID, ""),
+		PlatformNickname: conv.MustString(SpecialTaskLinkInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskLinkInfo.FansCount, ""),
+		PhotoUrl:         SpecialTaskLinkInfo.PhotoUrl,
+		LinkUrl:          SpecialTaskLinkInfo.LinkUrl,
+		Phone:            SpecialTaskLinkInfo.Phone,
+		ReviseOpinion:    SpecialTaskLinkInfo.ReviseOpinion,
+		Submit:           conv.MustString(SpecialTaskLinkInfo.SubmitAt, "")[0:19],
+		AgreeAt:          conv.MustString(SpecialTaskLinkInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func SpecialTaskLinkToTaskInfo(SpecialTaskLinks []*http_model.SpecialTaskLink) []*http_model.SpecialTaskLinkInfo {
+	var SpecialTaskLinkInfos []*http_model.SpecialTaskLinkInfo
+	for _, SpecialTaskLink := range SpecialTaskLinks {
+		SpecialTaskLink := GetSpecialTaskLinkInfoStruct(SpecialTaskLink)
+		SpecialTaskLinkInfos = append(SpecialTaskLinkInfos, SpecialTaskLink)
+	}
+	return SpecialTaskLinkInfos
+}
+
+func GetSpecialTaskLinkInfoStruct(SpecialTaskLink *http_model.SpecialTaskLink) *http_model.SpecialTaskLinkInfo {
+	TalentPlatformInfoSnap := SpecialTaskLink.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskLink.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskLinkInfo{
+		TaskID:           SpecialTaskLink.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		LinkId:           SpecialTaskLink.Link.LinkID,
+		PhotoUrl:         SpecialTaskLink.Link.PhotoUrl,
+		LinkUrl:          SpecialTaskLink.Link.LinkUrl,
+		ReviseOpinion:    SpecialTaskLink.Link.ReviseOpinion,
+		CreateAt:         SpecialTaskLink.Link.CreateAt,
+		SubmitAt:         SpecialTaskLink.Link.SubmitAt,
+		AgreeAt:          SpecialTaskLink.Link.AgreeAt,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		RejectAt:         SpecialTaskLink.Link.RejectAt,
+		IsReview:         SpecialTaskLink.Link.IsReview,
+	}
+}

+ 59 - 59
pack/special_task_script_list.go

@@ -1,59 +1,59 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskScriptInfoListToHttpSpecialTaskScriptPreviewList(gormSpecialTaskScriptInfos []*http_model.SpecialTaskScriptInfo) []*http_model.SpecialTaskScriptPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskScriptPreview
-	for _, gormSpecialTaskScriptInfo := range gormSpecialTaskScriptInfos {
-		httpSpecialTaskScriptPreview := MGormSpecialTaskScriptInfoToHttpSpecialTaskScriptPreview(gormSpecialTaskScriptInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskScriptPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskScriptInfoToHttpSpecialTaskScriptPreview(SpecialTaskScriptInfo *http_model.SpecialTaskScriptInfo) *http_model.SpecialTaskScriptPreview {
-	return &http_model.SpecialTaskScriptPreview{
-		TaskID:           conv.MustString(SpecialTaskScriptInfo.TaskID, ""),
-		PlatformNickname: conv.MustString(SpecialTaskScriptInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskScriptInfo.FansCount, ""),
-		Title:            SpecialTaskScriptInfo.Title,
-		Content:          SpecialTaskScriptInfo.Content,
-		ReviseOpinion:    SpecialTaskScriptInfo.ReviseOpinion,
-		Phone:            SpecialTaskScriptInfo.Phone,
-		Submit:           conv.MustString(SpecialTaskScriptInfo.SubmitAt, "")[0:19],
-		AgreeAt:          conv.MustString(SpecialTaskScriptInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func SpecialTaskScriptToTaskInfo(SpecialTaskScripts []*http_model.SpecialTaskScript) []*http_model.SpecialTaskScriptInfo {
-	var SpecialTaskScriptInfos []*http_model.SpecialTaskScriptInfo
-	for _, SpecialTaskScript := range SpecialTaskScripts {
-		SpecialTaskScript := GetSpecialTaskScriptInfoStruct(SpecialTaskScript)
-		SpecialTaskScriptInfos = append(SpecialTaskScriptInfos, SpecialTaskScript)
-	}
-	return SpecialTaskScriptInfos
-}
-
-func GetSpecialTaskScriptInfoStruct(SpecialTaskScript *http_model.SpecialTaskScript) *http_model.SpecialTaskScriptInfo {
-	TalentPlatformInfoSnap := SpecialTaskScript.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskScript.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskScriptInfo{
-		TaskID:           SpecialTaskScript.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		ScriptId:         SpecialTaskScript.Script.ScriptID,
-		Title:            SpecialTaskScript.Script.Title,
-		Content:          SpecialTaskScript.Script.Content,
-		ReviseOpinion:    SpecialTaskScript.Script.ReviseOpinion,
-		CreateAt:         SpecialTaskScript.Script.CreateAt,
-		SubmitAt:         SpecialTaskScript.Script.SubmitAt,
-		AgreeAt:          SpecialTaskScript.Script.AgreeAt,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		RejectAt:         SpecialTaskScript.Script.RejectAt,
-		IsReview:         SpecialTaskScript.Script.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskScriptInfoListToHttpSpecialTaskScriptPreviewList(gormSpecialTaskScriptInfos []*http_model.SpecialTaskScriptInfo) []*http_model.SpecialTaskScriptPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskScriptPreview
+	for _, gormSpecialTaskScriptInfo := range gormSpecialTaskScriptInfos {
+		httpSpecialTaskScriptPreview := MGormSpecialTaskScriptInfoToHttpSpecialTaskScriptPreview(gormSpecialTaskScriptInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskScriptPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskScriptInfoToHttpSpecialTaskScriptPreview(SpecialTaskScriptInfo *http_model.SpecialTaskScriptInfo) *http_model.SpecialTaskScriptPreview {
+	return &http_model.SpecialTaskScriptPreview{
+		TaskID:           conv.MustString(SpecialTaskScriptInfo.TaskID, ""),
+		PlatformNickname: conv.MustString(SpecialTaskScriptInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskScriptInfo.FansCount, ""),
+		Title:            SpecialTaskScriptInfo.Title,
+		Content:          SpecialTaskScriptInfo.Content,
+		ReviseOpinion:    SpecialTaskScriptInfo.ReviseOpinion,
+		Phone:            SpecialTaskScriptInfo.Phone,
+		Submit:           conv.MustString(SpecialTaskScriptInfo.SubmitAt, "")[0:19],
+		AgreeAt:          conv.MustString(SpecialTaskScriptInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func SpecialTaskScriptToTaskInfo(SpecialTaskScripts []*http_model.SpecialTaskScript) []*http_model.SpecialTaskScriptInfo {
+	var SpecialTaskScriptInfos []*http_model.SpecialTaskScriptInfo
+	for _, SpecialTaskScript := range SpecialTaskScripts {
+		SpecialTaskScript := GetSpecialTaskScriptInfoStruct(SpecialTaskScript)
+		SpecialTaskScriptInfos = append(SpecialTaskScriptInfos, SpecialTaskScript)
+	}
+	return SpecialTaskScriptInfos
+}
+
+func GetSpecialTaskScriptInfoStruct(SpecialTaskScript *http_model.SpecialTaskScript) *http_model.SpecialTaskScriptInfo {
+	TalentPlatformInfoSnap := SpecialTaskScript.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskScript.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskScriptInfo{
+		TaskID:           SpecialTaskScript.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		ScriptId:         SpecialTaskScript.Script.ScriptID,
+		Title:            SpecialTaskScript.Script.Title,
+		Content:          SpecialTaskScript.Script.Content,
+		ReviseOpinion:    SpecialTaskScript.Script.ReviseOpinion,
+		CreateAt:         SpecialTaskScript.Script.CreateAt,
+		SubmitAt:         SpecialTaskScript.Script.SubmitAt,
+		AgreeAt:          SpecialTaskScript.Script.AgreeAt,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		RejectAt:         SpecialTaskScript.Script.RejectAt,
+		IsReview:         SpecialTaskScript.Script.IsReview,
+	}
+}

+ 74 - 74
pack/special_task_settle_list.go

@@ -1,74 +1,74 @@
-package pack
-
-import (
-	"youngee_m_api/model/http_model"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-)
-
-func MGormSpecialTaskSettleInfoListToHttpSpecialTaskSettlePreviewList(gormSpecialTaskSettleInfos []*http_model.SpecialTaskSettleInfo) []*http_model.SpecialTaskSettlePreview {
-	var httpProjectPreviews []*http_model.SpecialTaskSettlePreview
-	for _, gormSpecialTaskSettleInfo := range gormSpecialTaskSettleInfos {
-		httpSpecialTaskSettlePreview := MGormSpecialTaskSettleInfoToHttpSpecialTaskSettlePreview(gormSpecialTaskSettleInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskSettlePreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskSettleInfoToHttpSpecialTaskSettlePreview(SpecialTaskSettleInfo *http_model.SpecialTaskSettleInfo) *http_model.SpecialTaskSettlePreview {
-	return &http_model.SpecialTaskSettlePreview{
-		TaskID:           conv.MustString(SpecialTaskSettleInfo.TaskID, ""),
-		PlatformNickname: conv.MustString(SpecialTaskSettleInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskSettleInfo.FansCount, ""),
-		PlayNumber:       SpecialTaskSettleInfo.PlayNumber,
-		LikeNumber:       SpecialTaskSettleInfo.LikeNumber,
-		CommentNumber:    SpecialTaskSettleInfo.CommentNumber,
-		CollectNumber:    SpecialTaskSettleInfo.CollectNumber,
-		LinkUrl:          SpecialTaskSettleInfo.LinkUrl,
-		PhotoUrl:         SpecialTaskSettleInfo.PhotoUrl,
-		AllPayment:       SpecialTaskSettleInfo.AllPayment,
-		RealPayment:      SpecialTaskSettleInfo.RealPayment,
-		ReviseOpinion:    SpecialTaskSettleInfo.ReviseOpinion,
-		Phone:            SpecialTaskSettleInfo.Phone,
-		SubmitAt:         conv.MustString(SpecialTaskSettleInfo.SubmitAt, "")[0:19],
-		AgreeAt:          conv.MustString(SpecialTaskSettleInfo.AgreeAt, "")[0:19],
-		UpdateAt:         conv.MustString(SpecialTaskSettleInfo.UpdateAt, "")[0:19],
-	}
-}
-
-func SpecialTaskSettleToTaskInfo(SpecialTaskSettles []*http_model.SpecialTaskSettle) []*http_model.SpecialTaskSettleInfo {
-	var SpecialTaskSettleInfos []*http_model.SpecialTaskSettleInfo
-	for _, SpecialTaskSettle := range SpecialTaskSettles {
-		SpecialTaskSettle := GetSpecialTaskSettleInfoStruct(SpecialTaskSettle)
-		SpecialTaskSettleInfos = append(SpecialTaskSettleInfos, SpecialTaskSettle)
-	}
-	return SpecialTaskSettleInfos
-}
-
-func GetSpecialTaskSettleInfoStruct(SpecialTaskSettle *http_model.SpecialTaskSettle) *http_model.SpecialTaskSettleInfo {
-	TalentPlatformInfoSnap := SpecialTaskSettle.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskSettle.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskSettleInfo{
-		TaskID:           SpecialTaskSettle.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		DataId:           SpecialTaskSettle.Data.DataID,
-		PlayNumber:       SpecialTaskSettle.Data.PlayNumber,
-		LikeNumber:       SpecialTaskSettle.Data.LikeNumber,
-		CommentNumber:    SpecialTaskSettle.Data.CommentNumber,
-		CollectNumber:    SpecialTaskSettle.Data.CollectNumber,
-		LinkUrl:          SpecialTaskSettle.Link.LinkUrl,
-		PhotoUrl:         SpecialTaskSettle.Data.PhotoUrl,
-		AllPayment:       SpecialTaskSettle.Talent.AllPayment,
-		RealPayment:      SpecialTaskSettle.Talent.RealPayment,
-		ReviseOpinion:    SpecialTaskSettle.Data.ReviseOpinion,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		CreateAt:         SpecialTaskSettle.Data.CreateAt,
-		SubmitAt:         SpecialTaskSettle.Data.SubmitAt,
-		AgreeAt:          SpecialTaskSettle.Data.AgreeAt,
-		UpdateAt:         SpecialTaskSettle.Talent.UpdateAt,
-		RejectAt:         SpecialTaskSettle.Data.RejectAt,
-		IsReview:         SpecialTaskSettle.Data.IsReview,
-	}
-}
+package pack
+
+import (
+	"youngee_m_api/model/http_model"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+)
+
+func MGormSpecialTaskSettleInfoListToHttpSpecialTaskSettlePreviewList(gormSpecialTaskSettleInfos []*http_model.SpecialTaskSettleInfo) []*http_model.SpecialTaskSettlePreview {
+	var httpProjectPreviews []*http_model.SpecialTaskSettlePreview
+	for _, gormSpecialTaskSettleInfo := range gormSpecialTaskSettleInfos {
+		httpSpecialTaskSettlePreview := MGormSpecialTaskSettleInfoToHttpSpecialTaskSettlePreview(gormSpecialTaskSettleInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskSettlePreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskSettleInfoToHttpSpecialTaskSettlePreview(SpecialTaskSettleInfo *http_model.SpecialTaskSettleInfo) *http_model.SpecialTaskSettlePreview {
+	return &http_model.SpecialTaskSettlePreview{
+		TaskID:           conv.MustString(SpecialTaskSettleInfo.TaskID, ""),
+		PlatformNickname: conv.MustString(SpecialTaskSettleInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskSettleInfo.FansCount, ""),
+		PlayNumber:       SpecialTaskSettleInfo.PlayNumber,
+		LikeNumber:       SpecialTaskSettleInfo.LikeNumber,
+		CommentNumber:    SpecialTaskSettleInfo.CommentNumber,
+		CollectNumber:    SpecialTaskSettleInfo.CollectNumber,
+		LinkUrl:          SpecialTaskSettleInfo.LinkUrl,
+		PhotoUrl:         SpecialTaskSettleInfo.PhotoUrl,
+		AllPayment:       SpecialTaskSettleInfo.AllPayment,
+		RealPayment:      SpecialTaskSettleInfo.RealPayment,
+		ReviseOpinion:    SpecialTaskSettleInfo.ReviseOpinion,
+		Phone:            SpecialTaskSettleInfo.Phone,
+		SubmitAt:         conv.MustString(SpecialTaskSettleInfo.SubmitAt, "")[0:19],
+		AgreeAt:          conv.MustString(SpecialTaskSettleInfo.AgreeAt, "")[0:19],
+		UpdateAt:         conv.MustString(SpecialTaskSettleInfo.UpdateAt, "")[0:19],
+	}
+}
+
+func SpecialTaskSettleToTaskInfo(SpecialTaskSettles []*http_model.SpecialTaskSettle) []*http_model.SpecialTaskSettleInfo {
+	var SpecialTaskSettleInfos []*http_model.SpecialTaskSettleInfo
+	for _, SpecialTaskSettle := range SpecialTaskSettles {
+		SpecialTaskSettle := GetSpecialTaskSettleInfoStruct(SpecialTaskSettle)
+		SpecialTaskSettleInfos = append(SpecialTaskSettleInfos, SpecialTaskSettle)
+	}
+	return SpecialTaskSettleInfos
+}
+
+func GetSpecialTaskSettleInfoStruct(SpecialTaskSettle *http_model.SpecialTaskSettle) *http_model.SpecialTaskSettleInfo {
+	TalentPlatformInfoSnap := SpecialTaskSettle.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskSettle.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskSettleInfo{
+		TaskID:           SpecialTaskSettle.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		DataId:           SpecialTaskSettle.Data.DataID,
+		PlayNumber:       SpecialTaskSettle.Data.PlayNumber,
+		LikeNumber:       SpecialTaskSettle.Data.LikeNumber,
+		CommentNumber:    SpecialTaskSettle.Data.CommentNumber,
+		CollectNumber:    SpecialTaskSettle.Data.CollectNumber,
+		LinkUrl:          SpecialTaskSettle.Link.LinkUrl,
+		PhotoUrl:         SpecialTaskSettle.Data.PhotoUrl,
+		AllPayment:       SpecialTaskSettle.Talent.AllPayment,
+		RealPayment:      SpecialTaskSettle.Talent.RealPayment,
+		ReviseOpinion:    SpecialTaskSettle.Data.ReviseOpinion,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		CreateAt:         SpecialTaskSettle.Data.CreateAt,
+		SubmitAt:         SpecialTaskSettle.Data.SubmitAt,
+		AgreeAt:          SpecialTaskSettle.Data.AgreeAt,
+		UpdateAt:         SpecialTaskSettle.Talent.UpdateAt,
+		RejectAt:         SpecialTaskSettle.Data.RejectAt,
+		IsReview:         SpecialTaskSettle.Data.IsReview,
+	}
+}

+ 60 - 60
pack/special_task_sketch_list.go

@@ -1,60 +1,60 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormSpecialTaskSketchInfoListToHttpSpecialTaskSketchPreviewList(gormSpecialTaskSketchInfos []*http_model.SpecialTaskSketchInfo) []*http_model.SpecialTaskSketchPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskSketchPreview
-	for _, gormSpecialTaskSketchInfo := range gormSpecialTaskSketchInfos {
-		httpSpecialTaskSketchPreview := MGormSpecialTaskSketchInfoToHttpSpecialTaskSketchPreview(gormSpecialTaskSketchInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskSketchPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskSketchInfoToHttpSpecialTaskSketchPreview(SpecialTaskSketchInfo *http_model.SpecialTaskSketchInfo) *http_model.SpecialTaskSketchPreview {
-	return &http_model.SpecialTaskSketchPreview{
-		TaskID:           conv.MustString(SpecialTaskSketchInfo.TaskID, ""),
-		SketchID:         conv.MustString(SpecialTaskSketchInfo.SketchId, ""),
-		PlatformNickname: conv.MustString(SpecialTaskSketchInfo.PlatformNickname, ""),
-		FansCount:        conv.MustString(SpecialTaskSketchInfo.FansCount, ""),
-		Title:            SpecialTaskSketchInfo.Title,
-		Content:          SpecialTaskSketchInfo.Content,
-		ReviseOpinion:    SpecialTaskSketchInfo.ReviseOpinion,
-		Phone:            SpecialTaskSketchInfo.Phone,
-		Submit:           conv.MustString(SpecialTaskSketchInfo.SubmitAt, "")[0:19],
-		AgreeAt:          conv.MustString(SpecialTaskSketchInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func SpecialTaskSketchToTaskInfo(SpecialTaskSketchs []*http_model.SpecialTaskSketch) []*http_model.SpecialTaskSketchInfo {
-	var SpecialTaskSketchInfos []*http_model.SpecialTaskSketchInfo
-	for _, SpecialTaskSketch := range SpecialTaskSketchs {
-		SpecialTaskSketch := GetSpecialTaskSketchInfoStruct(SpecialTaskSketch)
-		SpecialTaskSketchInfos = append(SpecialTaskSketchInfos, SpecialTaskSketch)
-	}
-	return SpecialTaskSketchInfos
-}
-
-func GetSpecialTaskSketchInfoStruct(SpecialTaskSketch *http_model.SpecialTaskSketch) *http_model.SpecialTaskSketchInfo {
-	TalentPlatformInfoSnap := SpecialTaskSketch.Talent.TalentPlatformInfoSnap
-	TalentPersonalInfoSnap := SpecialTaskSketch.Talent.TalentPersonalInfoSnap
-	return &http_model.SpecialTaskSketchInfo{
-		TaskID:           SpecialTaskSketch.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		SketchId:         SpecialTaskSketch.Sketch.SketchID,
-		Title:            SpecialTaskSketch.Sketch.Title,
-		Content:          SpecialTaskSketch.Sketch.Content,
-		ReviseOpinion:    SpecialTaskSketch.Sketch.ReviseOpinion,
-		CreateAt:         SpecialTaskSketch.Sketch.CreateAt,
-		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
-		SubmitAt:         SpecialTaskSketch.Sketch.SubmitAt,
-		AgreeAt:          SpecialTaskSketch.Sketch.AgreeAt,
-		RejectAt:         SpecialTaskSketch.Sketch.RejectAt,
-		IsReview:         SpecialTaskSketch.Sketch.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormSpecialTaskSketchInfoListToHttpSpecialTaskSketchPreviewList(gormSpecialTaskSketchInfos []*http_model.SpecialTaskSketchInfo) []*http_model.SpecialTaskSketchPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskSketchPreview
+	for _, gormSpecialTaskSketchInfo := range gormSpecialTaskSketchInfos {
+		httpSpecialTaskSketchPreview := MGormSpecialTaskSketchInfoToHttpSpecialTaskSketchPreview(gormSpecialTaskSketchInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpSpecialTaskSketchPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskSketchInfoToHttpSpecialTaskSketchPreview(SpecialTaskSketchInfo *http_model.SpecialTaskSketchInfo) *http_model.SpecialTaskSketchPreview {
+	return &http_model.SpecialTaskSketchPreview{
+		TaskID:           conv.MustString(SpecialTaskSketchInfo.TaskID, ""),
+		SketchID:         conv.MustString(SpecialTaskSketchInfo.SketchId, ""),
+		PlatformNickname: conv.MustString(SpecialTaskSketchInfo.PlatformNickname, ""),
+		FansCount:        conv.MustString(SpecialTaskSketchInfo.FansCount, ""),
+		Title:            SpecialTaskSketchInfo.Title,
+		Content:          SpecialTaskSketchInfo.Content,
+		ReviseOpinion:    SpecialTaskSketchInfo.ReviseOpinion,
+		Phone:            SpecialTaskSketchInfo.Phone,
+		Submit:           conv.MustString(SpecialTaskSketchInfo.SubmitAt, "")[0:19],
+		AgreeAt:          conv.MustString(SpecialTaskSketchInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func SpecialTaskSketchToTaskInfo(SpecialTaskSketchs []*http_model.SpecialTaskSketch) []*http_model.SpecialTaskSketchInfo {
+	var SpecialTaskSketchInfos []*http_model.SpecialTaskSketchInfo
+	for _, SpecialTaskSketch := range SpecialTaskSketchs {
+		SpecialTaskSketch := GetSpecialTaskSketchInfoStruct(SpecialTaskSketch)
+		SpecialTaskSketchInfos = append(SpecialTaskSketchInfos, SpecialTaskSketch)
+	}
+	return SpecialTaskSketchInfos
+}
+
+func GetSpecialTaskSketchInfoStruct(SpecialTaskSketch *http_model.SpecialTaskSketch) *http_model.SpecialTaskSketchInfo {
+	TalentPlatformInfoSnap := SpecialTaskSketch.Talent.TalentPlatformInfoSnap
+	TalentPersonalInfoSnap := SpecialTaskSketch.Talent.TalentPersonalInfoSnap
+	return &http_model.SpecialTaskSketchInfo{
+		TaskID:           SpecialTaskSketch.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		SketchId:         SpecialTaskSketch.Sketch.SketchID,
+		Title:            SpecialTaskSketch.Sketch.Title,
+		Content:          SpecialTaskSketch.Sketch.Content,
+		ReviseOpinion:    SpecialTaskSketch.Sketch.ReviseOpinion,
+		CreateAt:         SpecialTaskSketch.Sketch.CreateAt,
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number"), ""),
+		SubmitAt:         SpecialTaskSketch.Sketch.SubmitAt,
+		AgreeAt:          SpecialTaskSketch.Sketch.AgreeAt,
+		RejectAt:         SpecialTaskSketch.Sketch.RejectAt,
+		IsReview:         SpecialTaskSketch.Sketch.IsReview,
+	}
+}

+ 71 - 71
pack/task_data_list.go

@@ -1,71 +1,71 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskDataInfoListToHttpTaskDataPreviewList(gormTaskDataInfos []*http_model.TaskDataInfo) []*http_model.TaskDataPreview {
-	var httpProjectPreviews []*http_model.TaskDataPreview
-	for _, gormTaskDataInfo := range gormTaskDataInfos {
-		httpTaskDataPreview := MGormTaskDataInfoToHttpTaskDataPreview(gormTaskDataInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskDataPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskDataInfoToHttpTaskDataPreview(TaskDataInfo *http_model.TaskDataInfo) *http_model.TaskDataPreview {
-	//deliveryTime := conv.MustString(TaskDataInfo.DeliveryTime)
-	//deliveryTime = deliveryTime[0:19]
-	return &http_model.TaskDataPreview{
-		TaskID:            conv.MustString(TaskDataInfo.TaskID, ""),
-		PlatformNickname:  conv.MustString(TaskDataInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskDataInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskDataInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskDataInfo.StrategyID, ""),
-		PlayNumber:        TaskDataInfo.PlayNumber,
-		LikeNumber:        TaskDataInfo.LikeNumber,
-		CommentNumber:     TaskDataInfo.CommentNumber,
-		CollectNumber:     TaskDataInfo.CollectNumber,
-		PhotoUrl:          TaskDataInfo.PhotoUrl,
-		AllPayment:        TaskDataInfo.AllPayment,
-		RealPayment:       TaskDataInfo.RealPayment,
-		ReviseOpinion:     TaskDataInfo.ReviseOpinion,
-		Submit:            conv.MustString(TaskDataInfo.SubmitAt, "")[0:19],
-		AgreeAt:           conv.MustString(TaskDataInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func TaskDataToTaskInfo(TaskDatas []*http_model.TaskData) []*http_model.TaskDataInfo {
-	var TaskDataInfos []*http_model.TaskDataInfo
-	for _, TaskData := range TaskDatas {
-		TaskData := GetDataInfoStruct(TaskData)
-		TaskDataInfos = append(TaskDataInfos, TaskData)
-	}
-	return TaskDataInfos
-}
-
-func GetDataInfoStruct(TaskData *http_model.TaskData) *http_model.TaskDataInfo {
-	TalentPlatformInfoSnap := TaskData.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskDataInfo{
-		TaskID:           TaskData.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskData.Talent.StrategyId,
-		DataId:           TaskData.Data.DataID,
-		PlayNumber:       TaskData.Data.PlayNumber,
-		LikeNumber:       TaskData.Data.LikeNumber,
-		CommentNumber:    TaskData.Data.CommentNumber,
-		CollectNumber:    TaskData.Data.CollectNumber,
-		PhotoUrl:         TaskData.Data.PhotoUrl,
-		AllPayment:       TaskData.Talent.AllPayment,
-		RealPayment:      TaskData.Talent.RealPayment,
-		ReviseOpinion:    TaskData.Data.ReviseOpinion,
-		CreateAt:         TaskData.Data.CreateAt,
-		SubmitAt:         TaskData.Data.SubmitAt,
-		AgreeAt:          TaskData.Data.AgreeAt,
-		RejectAt:         TaskData.Data.RejectAt,
-		IsReview:         TaskData.Data.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskDataInfoListToHttpTaskDataPreviewList(gormTaskDataInfos []*http_model.TaskDataInfo) []*http_model.TaskDataPreview {
+	var httpProjectPreviews []*http_model.TaskDataPreview
+	for _, gormTaskDataInfo := range gormTaskDataInfos {
+		httpTaskDataPreview := MGormTaskDataInfoToHttpTaskDataPreview(gormTaskDataInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskDataPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskDataInfoToHttpTaskDataPreview(TaskDataInfo *http_model.TaskDataInfo) *http_model.TaskDataPreview {
+	//deliveryTime := conv.MustString(TaskDataInfo.DeliveryTime)
+	//deliveryTime = deliveryTime[0:19]
+	return &http_model.TaskDataPreview{
+		TaskID:            conv.MustString(TaskDataInfo.TaskID, ""),
+		PlatformNickname:  conv.MustString(TaskDataInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskDataInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskDataInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskDataInfo.StrategyID, ""),
+		PlayNumber:        TaskDataInfo.PlayNumber,
+		LikeNumber:        TaskDataInfo.LikeNumber,
+		CommentNumber:     TaskDataInfo.CommentNumber,
+		CollectNumber:     TaskDataInfo.CollectNumber,
+		PhotoUrl:          TaskDataInfo.PhotoUrl,
+		AllPayment:        TaskDataInfo.AllPayment,
+		RealPayment:       TaskDataInfo.RealPayment,
+		ReviseOpinion:     TaskDataInfo.ReviseOpinion,
+		Submit:            conv.MustString(TaskDataInfo.SubmitAt, "")[0:19],
+		AgreeAt:           conv.MustString(TaskDataInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func TaskDataToTaskInfo(TaskDatas []*http_model.TaskData) []*http_model.TaskDataInfo {
+	var TaskDataInfos []*http_model.TaskDataInfo
+	for _, TaskData := range TaskDatas {
+		TaskData := GetDataInfoStruct(TaskData)
+		TaskDataInfos = append(TaskDataInfos, TaskData)
+	}
+	return TaskDataInfos
+}
+
+func GetDataInfoStruct(TaskData *http_model.TaskData) *http_model.TaskDataInfo {
+	TalentPlatformInfoSnap := TaskData.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskDataInfo{
+		TaskID:           TaskData.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskData.Talent.StrategyID,
+		DataId:           TaskData.Data.DataID,
+		PlayNumber:       TaskData.Data.PlayNumber,
+		LikeNumber:       TaskData.Data.LikeNumber,
+		CommentNumber:    TaskData.Data.CommentNumber,
+		CollectNumber:    TaskData.Data.CollectNumber,
+		PhotoUrl:         TaskData.Data.PhotoUrl,
+		AllPayment:       TaskData.Talent.AllPayment,
+		RealPayment:      TaskData.Talent.RealPayment,
+		ReviseOpinion:    TaskData.Data.ReviseOpinion,
+		CreateAt:         TaskData.Data.CreateAt,
+		SubmitAt:         TaskData.Data.SubmitAt,
+		AgreeAt:          TaskData.Data.AgreeAt,
+		RejectAt:         TaskData.Data.RejectAt,
+		IsReview:         TaskData.Data.IsReview,
+	}
+}

+ 55 - 55
pack/task_default_list.go

@@ -1,55 +1,55 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskDefaultDataInfoListToHttpTaskDefaultDataPreviewList(gormTaskDefaultDataInfos []*http_model.TaskDefaultDataInfo) []*http_model.TaskDefaultDataPreview {
-	var httpProjectPreviews []*http_model.TaskDefaultDataPreview
-	for _, gormTaskDefaultDataInfo := range gormTaskDefaultDataInfos {
-		httpTaskDefaultDataPreview := MGormTaskDefaultDataInfoToHttpTaskDefaultDataPreview(gormTaskDefaultDataInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskDefaultDataPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskDefaultDataInfoToHttpTaskDefaultDataPreview(TaskDefaultDataInfo *http_model.TaskDefaultDataInfo) *http_model.TaskDefaultDataPreview {
-	return &http_model.TaskDefaultDataPreview{
-		TaskID:            conv.MustString(TaskDefaultDataInfo.TaskID, ""),
-		ProjectID:         conv.MustString(TaskDefaultDataInfo.ProjectID, ""),
-		PlatformNickname:  conv.MustString(TaskDefaultDataInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskDefaultDataInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskDefaultDataInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskDefaultDataInfo.StrategyID, ""),
-		AllPayment:        TaskDefaultDataInfo.AllPayment,
-		RealPayment:       TaskDefaultDataInfo.RealPayment,
-		BreakAt:           conv.MustString(TaskDefaultDataInfo.BreakAt, "")[0:19],
-		LinkUrl:           TaskDefaultDataInfo.LinkUrl,
-	}
-}
-
-func TaskDefaultDataToTaskInfo(TaskDefaultDatas []*http_model.TaskDefaultData) []*http_model.TaskDefaultDataInfo {
-	var TaskDefaultDataInfos []*http_model.TaskDefaultDataInfo
-	for _, TaskDefaultData := range TaskDefaultDatas {
-		TaskDefaultData := GetDefaultDataInfoStruct(TaskDefaultData)
-		TaskDefaultDataInfos = append(TaskDefaultDataInfos, TaskDefaultData)
-	}
-	return TaskDefaultDataInfos
-}
-
-func GetDefaultDataInfoStruct(TaskDefaultData *http_model.TaskDefaultData) *http_model.TaskDefaultDataInfo {
-	TalentPlatformInfoSnap := TaskDefaultData.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskDefaultDataInfo{
-		TaskID:           TaskDefaultData.Talent.TaskId,
-		ProjectID:        TaskDefaultData.Talent.ProjectId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskDefaultData.Talent.StrategyId,
-		AllPayment:       TaskDefaultData.Talent.AllPayment,
-		RealPayment:      TaskDefaultData.Talent.RealPayment,
-		BreakAt:          TaskDefaultData.Default.BreakAt,
-		LinkUrl:          TaskDefaultData.Link.LinkUrl,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskDefaultDataInfoListToHttpTaskDefaultDataPreviewList(gormTaskDefaultDataInfos []*http_model.TaskDefaultDataInfo) []*http_model.TaskDefaultDataPreview {
+	var httpProjectPreviews []*http_model.TaskDefaultDataPreview
+	for _, gormTaskDefaultDataInfo := range gormTaskDefaultDataInfos {
+		httpTaskDefaultDataPreview := MGormTaskDefaultDataInfoToHttpTaskDefaultDataPreview(gormTaskDefaultDataInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskDefaultDataPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskDefaultDataInfoToHttpTaskDefaultDataPreview(TaskDefaultDataInfo *http_model.TaskDefaultDataInfo) *http_model.TaskDefaultDataPreview {
+	return &http_model.TaskDefaultDataPreview{
+		TaskID:            conv.MustString(TaskDefaultDataInfo.TaskID, ""),
+		ProjectID:         conv.MustString(TaskDefaultDataInfo.ProjectID, ""),
+		PlatformNickname:  conv.MustString(TaskDefaultDataInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskDefaultDataInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskDefaultDataInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskDefaultDataInfo.StrategyID, ""),
+		AllPayment:        TaskDefaultDataInfo.AllPayment,
+		RealPayment:       TaskDefaultDataInfo.RealPayment,
+		BreakAt:           conv.MustString(TaskDefaultDataInfo.BreakAt, "")[0:19],
+		LinkUrl:           TaskDefaultDataInfo.LinkUrl,
+	}
+}
+
+func TaskDefaultDataToTaskInfo(TaskDefaultDatas []*http_model.TaskDefaultData) []*http_model.TaskDefaultDataInfo {
+	var TaskDefaultDataInfos []*http_model.TaskDefaultDataInfo
+	for _, TaskDefaultData := range TaskDefaultDatas {
+		TaskDefaultData := GetDefaultDataInfoStruct(TaskDefaultData)
+		TaskDefaultDataInfos = append(TaskDefaultDataInfos, TaskDefaultData)
+	}
+	return TaskDefaultDataInfos
+}
+
+func GetDefaultDataInfoStruct(TaskDefaultData *http_model.TaskDefaultData) *http_model.TaskDefaultDataInfo {
+	TalentPlatformInfoSnap := TaskDefaultData.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskDefaultDataInfo{
+		TaskID:           TaskDefaultData.Talent.TaskID,
+		ProjectID:        TaskDefaultData.Talent.ProjectID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskDefaultData.Talent.StrategyID,
+		AllPayment:       TaskDefaultData.Talent.AllPayment,
+		RealPayment:      TaskDefaultData.Talent.RealPayment,
+		BreakAt:          TaskDefaultData.Default.BreakAt,
+		LinkUrl:          TaskDefaultData.Link.LinkUrl,
+	}
+}

+ 53 - 53
pack/task_default_review_list.go

@@ -1,53 +1,53 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskDefaultReviewInfoListToHttpTaskDefaultReviewPreviewList(gormTaskDefaultReviewInfos []*http_model.TaskDefaultReviewInfo) []*http_model.TaskDefaultReviewPreview {
-	var httpProjectPreviews []*http_model.TaskDefaultReviewPreview
-	for _, gormTaskDefaultReviewInfo := range gormTaskDefaultReviewInfos {
-		httpTaskDefaultReviewPreview := MGormTaskDefaultReviewInfoToHttpTaskDefaultReviewPreview(gormTaskDefaultReviewInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskDefaultReviewPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskDefaultReviewInfoToHttpTaskDefaultReviewPreview(TaskDefaultReviewInfo *http_model.TaskDefaultReviewInfo) *http_model.TaskDefaultReviewPreview {
-	return &http_model.TaskDefaultReviewPreview{
-		TaskID:            conv.MustString(TaskDefaultReviewInfo.TaskID, ""),
-		ProjectID:         conv.MustString(TaskDefaultReviewInfo.ProjectID, ""),
-		PlatformNickname:  conv.MustString(TaskDefaultReviewInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskDefaultReviewInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskDefaultReviewInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskDefaultReviewInfo.StrategyID, ""),
-		AllPayment:        TaskDefaultReviewInfo.AllPayment,
-		RealPayment:       TaskDefaultReviewInfo.RealPayment,
-		BreakAt:           conv.MustString(TaskDefaultReviewInfo.BreakAt, "")[0:19],
-	}
-}
-
-func TaskDefaultReviewToTaskInfo(TaskDefaultReviews []*http_model.TaskDefaultReview) []*http_model.TaskDefaultReviewInfo {
-	var TaskDefaultReviewInfos []*http_model.TaskDefaultReviewInfo
-	for _, TaskDefaultReview := range TaskDefaultReviews {
-		TaskDefaultReview := GetDefaultReviewInfoStruct(TaskDefaultReview)
-		TaskDefaultReviewInfos = append(TaskDefaultReviewInfos, TaskDefaultReview)
-	}
-	return TaskDefaultReviewInfos
-}
-
-func GetDefaultReviewInfoStruct(TaskDefaultReview *http_model.TaskDefaultReview) *http_model.TaskDefaultReviewInfo {
-	TalentPlatformInfoSnap := TaskDefaultReview.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskDefaultReviewInfo{
-		TaskID:           TaskDefaultReview.Talent.TaskId,
-		ProjectID:        TaskDefaultReview.Talent.ProjectId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskDefaultReview.Talent.StrategyId,
-		AllPayment:       TaskDefaultReview.Talent.AllPayment,
-		RealPayment:      TaskDefaultReview.Talent.RealPayment,
-		BreakAt:          TaskDefaultReview.Default.BreakAt,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskDefaultReviewInfoListToHttpTaskDefaultReviewPreviewList(gormTaskDefaultReviewInfos []*http_model.TaskDefaultReviewInfo) []*http_model.TaskDefaultReviewPreview {
+	var httpProjectPreviews []*http_model.TaskDefaultReviewPreview
+	for _, gormTaskDefaultReviewInfo := range gormTaskDefaultReviewInfos {
+		httpTaskDefaultReviewPreview := MGormTaskDefaultReviewInfoToHttpTaskDefaultReviewPreview(gormTaskDefaultReviewInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskDefaultReviewPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskDefaultReviewInfoToHttpTaskDefaultReviewPreview(TaskDefaultReviewInfo *http_model.TaskDefaultReviewInfo) *http_model.TaskDefaultReviewPreview {
+	return &http_model.TaskDefaultReviewPreview{
+		TaskID:            conv.MustString(TaskDefaultReviewInfo.TaskID, ""),
+		ProjectID:         conv.MustString(TaskDefaultReviewInfo.ProjectID, ""),
+		PlatformNickname:  conv.MustString(TaskDefaultReviewInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskDefaultReviewInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskDefaultReviewInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskDefaultReviewInfo.StrategyID, ""),
+		AllPayment:        TaskDefaultReviewInfo.AllPayment,
+		RealPayment:       TaskDefaultReviewInfo.RealPayment,
+		BreakAt:           conv.MustString(TaskDefaultReviewInfo.BreakAt, "")[0:19],
+	}
+}
+
+func TaskDefaultReviewToTaskInfo(TaskDefaultReviews []*http_model.TaskDefaultReview) []*http_model.TaskDefaultReviewInfo {
+	var TaskDefaultReviewInfos []*http_model.TaskDefaultReviewInfo
+	for _, TaskDefaultReview := range TaskDefaultReviews {
+		TaskDefaultReview := GetDefaultReviewInfoStruct(TaskDefaultReview)
+		TaskDefaultReviewInfos = append(TaskDefaultReviewInfos, TaskDefaultReview)
+	}
+	return TaskDefaultReviewInfos
+}
+
+func GetDefaultReviewInfoStruct(TaskDefaultReview *http_model.TaskDefaultReview) *http_model.TaskDefaultReviewInfo {
+	TalentPlatformInfoSnap := TaskDefaultReview.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskDefaultReviewInfo{
+		TaskID:           TaskDefaultReview.Talent.TaskID,
+		ProjectID:        TaskDefaultReview.Talent.ProjectID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskDefaultReview.Talent.StrategyID,
+		AllPayment:       TaskDefaultReview.Talent.AllPayment,
+		RealPayment:      TaskDefaultReview.Talent.RealPayment,
+		BreakAt:          TaskDefaultReview.Default.BreakAt,
+	}
+}

+ 61 - 61
pack/task_finish_list.go

@@ -1,61 +1,61 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskFinishInfoListToHttpTaskFinishPreviewList(gormTaskFinishInfos []*http_model.TaskFinishInfo) []*http_model.TaskFinishPreview {
-	var httpProjectPreviews []*http_model.TaskFinishPreview
-	for _, gormTaskFinishInfo := range gormTaskFinishInfos {
-		httpTaskFinishPreview := MGormTaskFinishInfoToHttpTaskFinishPreview(gormTaskFinishInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskFinishPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskFinishInfoToHttpTaskFinishPreview(TaskFinishInfo *http_model.TaskFinishInfo) *http_model.TaskFinishPreview {
-	return &http_model.TaskFinishPreview{
-		TaskID:            conv.MustString(TaskFinishInfo.TaskID, ""),
-		PlatformNickname:  conv.MustString(TaskFinishInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskFinishInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskFinishInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskFinishInfo.StrategyID, ""),
-		PlayNumber:        TaskFinishInfo.PlayNumber,
-		LikeNumber:        TaskFinishInfo.LikeNumber,
-		CommentNumber:     TaskFinishInfo.CommentNumber,
-		CollectNumber:     TaskFinishInfo.CollectNumber,
-		RealPayment:       TaskFinishInfo.RealPayment,
-		PhotoUrl:          TaskFinishInfo.PhotoUrl,
-		LinkUrl:           TaskFinishInfo.LinkUrl,
-		SubmitAt:          conv.MustString(TaskFinishInfo.SubmitAt, "")[0:19],
-	}
-}
-
-func TaskFinishToTaskInfo(TaskFinishs []*http_model.TaskFinish) []*http_model.TaskFinishInfo {
-	var TaskFinishInfos []*http_model.TaskFinishInfo
-	for _, TaskFinish := range TaskFinishs {
-		TaskFinish := GetFinishInfoStruct(TaskFinish)
-		TaskFinishInfos = append(TaskFinishInfos, TaskFinish)
-	}
-	return TaskFinishInfos
-}
-
-func GetFinishInfoStruct(TaskFinish *http_model.TaskFinish) *http_model.TaskFinishInfo {
-	TalentPlatformInfoSnap := TaskFinish.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskFinishInfo{
-		TaskID:           TaskFinish.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskFinish.Talent.StrategyId,
-		PlayNumber:       TaskFinish.Data.PlayNumber,
-		LikeNumber:       TaskFinish.Data.LikeNumber,
-		CommentNumber:    TaskFinish.Data.CommentNumber,
-		CollectNumber:    TaskFinish.Data.CollectNumber,
-		RealPayment:      TaskFinish.Talent.RealPayment,
-		PhotoUrl:         TaskFinish.Data.PhotoUrl,
-		LinkUrl:          TaskFinish.Link.LinkUrl,
-		SubmitAt:         TaskFinish.Data.SubmitAt,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskFinishInfoListToHttpTaskFinishPreviewList(gormTaskFinishInfos []*http_model.TaskFinishInfo) []*http_model.TaskFinishPreview {
+	var httpProjectPreviews []*http_model.TaskFinishPreview
+	for _, gormTaskFinishInfo := range gormTaskFinishInfos {
+		httpTaskFinishPreview := MGormTaskFinishInfoToHttpTaskFinishPreview(gormTaskFinishInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskFinishPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskFinishInfoToHttpTaskFinishPreview(TaskFinishInfo *http_model.TaskFinishInfo) *http_model.TaskFinishPreview {
+	return &http_model.TaskFinishPreview{
+		TaskID:            conv.MustString(TaskFinishInfo.TaskID, ""),
+		PlatformNickname:  conv.MustString(TaskFinishInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskFinishInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskFinishInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskFinishInfo.StrategyID, ""),
+		PlayNumber:        TaskFinishInfo.PlayNumber,
+		LikeNumber:        TaskFinishInfo.LikeNumber,
+		CommentNumber:     TaskFinishInfo.CommentNumber,
+		CollectNumber:     TaskFinishInfo.CollectNumber,
+		RealPayment:       TaskFinishInfo.RealPayment,
+		PhotoUrl:          TaskFinishInfo.PhotoUrl,
+		LinkUrl:           TaskFinishInfo.LinkUrl,
+		SubmitAt:          conv.MustString(TaskFinishInfo.SubmitAt, "")[0:19],
+	}
+}
+
+func TaskFinishToTaskInfo(TaskFinishs []*http_model.TaskFinish) []*http_model.TaskFinishInfo {
+	var TaskFinishInfos []*http_model.TaskFinishInfo
+	for _, TaskFinish := range TaskFinishs {
+		TaskFinish := GetFinishInfoStruct(TaskFinish)
+		TaskFinishInfos = append(TaskFinishInfos, TaskFinish)
+	}
+	return TaskFinishInfos
+}
+
+func GetFinishInfoStruct(TaskFinish *http_model.TaskFinish) *http_model.TaskFinishInfo {
+	TalentPlatformInfoSnap := TaskFinish.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskFinishInfo{
+		TaskID:           TaskFinish.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskFinish.Talent.StrategyID,
+		PlayNumber:       TaskFinish.Data.PlayNumber,
+		LikeNumber:       TaskFinish.Data.LikeNumber,
+		CommentNumber:    TaskFinish.Data.CommentNumber,
+		CollectNumber:    TaskFinish.Data.CollectNumber,
+		RealPayment:      TaskFinish.Talent.RealPayment,
+		PhotoUrl:         TaskFinish.Data.PhotoUrl,
+		LinkUrl:          TaskFinish.Link.LinkUrl,
+		SubmitAt:         TaskFinish.Data.SubmitAt,
+	}
+}

+ 59 - 59
pack/task_link_list.go

@@ -1,59 +1,59 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskLinkInfoListToHttpTaskLinkPreviewList(gormTaskLinkInfos []*http_model.TaskLinkInfo) []*http_model.TaskLinkPreview {
-	var httpProjectPreviews []*http_model.TaskLinkPreview
-	for _, gormTaskLinkInfo := range gormTaskLinkInfos {
-		httpTaskLinkPreview := MGormTaskLinkInfoToHttpTaskLinkPreview(gormTaskLinkInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskLinkPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskLinkInfoToHttpTaskLinkPreview(TaskLinkInfo *http_model.TaskLinkInfo) *http_model.TaskLinkPreview {
-	return &http_model.TaskLinkPreview{
-		TaskID:            conv.MustString(TaskLinkInfo.TaskID, ""),
-		PlatformNickname:  conv.MustString(TaskLinkInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskLinkInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskLinkInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskLinkInfo.StrategyID, ""),
-		PhotoUrl:          TaskLinkInfo.PhotoUrl,
-		LinkUrl:           TaskLinkInfo.LinkUrl,
-		ReviseOpinion:     TaskLinkInfo.ReviseOpinion,
-		Submit:            conv.MustString(TaskLinkInfo.SubmitAt, "")[0:19],
-		AgreeAt:           conv.MustString(TaskLinkInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func TaskLinkToTaskInfo(TaskLinks []*http_model.TaskLink) []*http_model.TaskLinkInfo {
-	var TaskLinkInfos []*http_model.TaskLinkInfo
-	for _, TaskLink := range TaskLinks {
-		TaskLink := GetLinkInfoStruct(TaskLink)
-		TaskLinkInfos = append(TaskLinkInfos, TaskLink)
-	}
-	return TaskLinkInfos
-}
-
-func GetLinkInfoStruct(TaskLink *http_model.TaskLink) *http_model.TaskLinkInfo {
-	TalentPlatformInfoSnap := TaskLink.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskLinkInfo{
-		TaskID:           TaskLink.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskLink.Talent.StrategyId,
-		LinkId:           TaskLink.Link.LinkID,
-		PhotoUrl:         TaskLink.Link.PhotoUrl,
-		LinkUrl:          TaskLink.Link.LinkUrl,
-		ReviseOpinion:    TaskLink.Link.ReviseOpinion,
-		CreateAt:         TaskLink.Link.CreateAt,
-		SubmitAt:         TaskLink.Link.SubmitAt,
-		AgreeAt:          TaskLink.Link.AgreeAt,
-		RejectAt:         TaskLink.Link.RejectAt,
-		IsReview:         TaskLink.Link.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskLinkInfoListToHttpTaskLinkPreviewList(gormTaskLinkInfos []*http_model.TaskLinkInfo) []*http_model.TaskLinkPreview {
+	var httpProjectPreviews []*http_model.TaskLinkPreview
+	for _, gormTaskLinkInfo := range gormTaskLinkInfos {
+		httpTaskLinkPreview := MGormTaskLinkInfoToHttpTaskLinkPreview(gormTaskLinkInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskLinkPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskLinkInfoToHttpTaskLinkPreview(TaskLinkInfo *http_model.TaskLinkInfo) *http_model.TaskLinkPreview {
+	return &http_model.TaskLinkPreview{
+		TaskID:            conv.MustString(TaskLinkInfo.TaskID, ""),
+		PlatformNickname:  conv.MustString(TaskLinkInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskLinkInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskLinkInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskLinkInfo.StrategyID, ""),
+		PhotoUrl:          TaskLinkInfo.PhotoUrl,
+		LinkUrl:           TaskLinkInfo.LinkUrl,
+		ReviseOpinion:     TaskLinkInfo.ReviseOpinion,
+		Submit:            conv.MustString(TaskLinkInfo.SubmitAt, "")[0:19],
+		AgreeAt:           conv.MustString(TaskLinkInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func TaskLinkToTaskInfo(TaskLinks []*http_model.TaskLink) []*http_model.TaskLinkInfo {
+	var TaskLinkInfos []*http_model.TaskLinkInfo
+	for _, TaskLink := range TaskLinks {
+		TaskLink := GetLinkInfoStruct(TaskLink)
+		TaskLinkInfos = append(TaskLinkInfos, TaskLink)
+	}
+	return TaskLinkInfos
+}
+
+func GetLinkInfoStruct(TaskLink *http_model.TaskLink) *http_model.TaskLinkInfo {
+	TalentPlatformInfoSnap := TaskLink.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskLinkInfo{
+		TaskID:           TaskLink.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskLink.Talent.StrategyID,
+		LinkId:           TaskLink.Link.LinkID,
+		PhotoUrl:         TaskLink.Link.PhotoUrl,
+		LinkUrl:          TaskLink.Link.LinkUrl,
+		ReviseOpinion:    TaskLink.Link.ReviseOpinion,
+		CreateAt:         TaskLink.Link.CreateAt,
+		SubmitAt:         TaskLink.Link.SubmitAt,
+		AgreeAt:          TaskLink.Link.AgreeAt,
+		RejectAt:         TaskLink.Link.RejectAt,
+		IsReview:         TaskLink.Link.IsReview,
+	}
+}

+ 147 - 147
pack/task_logistics_list.go

@@ -1,147 +1,147 @@
-package pack
-
-import (
-	"youngee_m_api/model/http_model"
-
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-)
-
-func MGormTaskLogisticsInfoListToHttpTaskLogisticsPreviewList(gormTaskLogisticsInfos []*http_model.TaskLogisticsInfo) []*http_model.TaskLogisticsPreview {
-	var httpProjectPreviews []*http_model.TaskLogisticsPreview
-	for _, gormTaskLogisticsInfo := range gormTaskLogisticsInfos {
-		httpTaskLogisticsPreview := MGormTaskLogisticsInfoToHttpTaskLogisticsPreview(gormTaskLogisticsInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskLogisticsPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskLogisticsInfoToHttpTaskLogisticsPreview(TaskLogisticsInfo *http_model.TaskLogisticsInfo) *http_model.TaskLogisticsPreview {
-	deliveryTime := conv.MustString(TaskLogisticsInfo.DeliveryTime, "")
-	deliveryTime = deliveryTime[0:19]
-	SignedTime := ""
-	if TaskLogisticsInfo.SignedTime == "" {
-		SignedTime = ""
-	} else {
-		SignedTime = TaskLogisticsInfo.SignedTime[:19]
-	}
-	return &http_model.TaskLogisticsPreview{
-		TaskID:                conv.MustString(TaskLogisticsInfo.TaskID, ""),
-		PlatformNickname:      conv.MustString(TaskLogisticsInfo.PlatformNickname, ""),
-		FansCount:             conv.MustString(TaskLogisticsInfo.FansCount, ""),
-		RecruitStrategyID:     conv.MustString(TaskLogisticsInfo.RecruitStrategyID, ""),
-		StrategyID:            conv.MustString(TaskLogisticsInfo.StrategyID, ""),
-		DetailAddr:            conv.MustString(TaskLogisticsInfo.DetailAddr, ""),
-		CompanyName:           conv.MustString(TaskLogisticsInfo.CompanyName, ""),
-		LogisticsNumber:       conv.MustString(TaskLogisticsInfo.LogisticsNumber, ""),
-		DeliveryTime:          deliveryTime,
-		ExplorestoreStarttime: TaskLogisticsInfo.ExplorestoreStarttime,
-		ExplorestoreEndtime:   TaskLogisticsInfo.ExplorestoreEndtime,
-		ExplorestorePeriod:    conv.MustString(TaskLogisticsInfo.ExplorestorePeriod, ""),
-		CouponCode:            conv.MustString(TaskLogisticsInfo.CouponCode, ""),
-		SignedTime:            SignedTime,
-	}
-}
-
-func TaskLogisticsToTaskInfo(TaskLogisticss []*http_model.TaskLogistics) []*http_model.TaskLogisticsInfo {
-	var TaskLogisticsInfos []*http_model.TaskLogisticsInfo
-	for _, TaskLogistics := range TaskLogisticss {
-		TaskLogistics := GetTalentInfoStruct(TaskLogistics)
-		TaskLogisticsInfos = append(TaskLogisticsInfos, TaskLogistics)
-	}
-	return TaskLogisticsInfos
-}
-
-func GetTalentInfoStruct(TaskLogistics *http_model.TaskLogistics) *http_model.TaskLogisticsInfo {
-	TalentPlatformInfoSnap := TaskLogistics.Talent.TalentPlatformInfoSnap
-	TalentPostAddrSnap := TaskLogistics.Talent.TalentPostAddrSnap
-	SignedTime := ""
-	if TaskLogistics.Logistics.SignedTime == nil {
-		SignedTime = ""
-	} else {
-		SignedTime = conv.MustString(TaskLogistics.Logistics.SignedTime, "")
-	}
-	return &http_model.TaskLogisticsInfo{
-		TaskID:                TaskLogistics.Talent.TaskId,
-		PlatformNickname:      conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:             conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:            TaskLogistics.Talent.StrategyId,
-		DetailAddr:            conv.MustString(gjson.Get(TalentPostAddrSnap, "detail_addr"), "") + TaskLogistics.Region,
-		CompanyName:           TaskLogistics.Logistics.CompanyName,
-		LogisticsNumber:       TaskLogistics.Logistics.LogisticsNumber,
-		DeliveryTime:          conv.MustString(TaskLogistics.Logistics.DeliveryTime, ""),
-		ExplorestoreStarttime: TaskLogistics.Logistics.ExplorestoreStarttime,
-		ExplorestoreEndtime:   TaskLogistics.Logistics.ExplorestoreEndtime,
-		ExplorestorePeriod:    TaskLogistics.Logistics.ExplorestorePeriod,
-		CouponCode:            TaskLogistics.Logistics.CouponCodeInformation,
-		SignedTime:            SignedTime,
-	}
-}
-
-func MGormSpecialTaskLogisticsInfoListToHttpTaskLogisticsPreviewList(gormTaskLogisticsInfos []*http_model.SpecialTaskLogisticsInfo) []*http_model.SpecialTaskLogisticsPreview {
-	var httpProjectPreviews []*http_model.SpecialTaskLogisticsPreview
-	for _, gormTaskLogisticsInfo := range gormTaskLogisticsInfos {
-		httpTaskLogisticsPreview := MGormSpecialTaskLogisticsInfoToHttpTaskLogisticsPreview(gormTaskLogisticsInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskLogisticsPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormSpecialTaskLogisticsInfoToHttpTaskLogisticsPreview(TaskLogisticsInfo *http_model.SpecialTaskLogisticsInfo) *http_model.SpecialTaskLogisticsPreview {
-	deliveryTime := conv.MustString(TaskLogisticsInfo.DeliveryTime, "")
-	deliveryTime = deliveryTime[0:19]
-	SignedTime := ""
-	if TaskLogisticsInfo.SignedTime == "" {
-		SignedTime = ""
-	} else {
-		SignedTime = TaskLogisticsInfo.SignedTime[:19]
-	}
-	return &http_model.SpecialTaskLogisticsPreview{
-		TaskID:                conv.MustString(TaskLogisticsInfo.TaskID, ""),
-		PlatformNickname:      conv.MustString(TaskLogisticsInfo.PlatformNickname, ""),
-		FansCount:             conv.MustString(TaskLogisticsInfo.FansCount, ""),
-		DetailAddr:            conv.MustString(TaskLogisticsInfo.DetailAddr, ""),
-		CompanyName:           conv.MustString(TaskLogisticsInfo.CompanyName, ""),
-		LogisticsNumber:       conv.MustString(TaskLogisticsInfo.LogisticsNumber, ""),
-		DeliveryTime:          deliveryTime,
-		ExplorestoreStarttime: TaskLogisticsInfo.ExplorestoreStarttime,
-		ExplorestoreEndtime:   TaskLogisticsInfo.ExplorestoreEndtime,
-		ExplorestorePeriod:    conv.MustString(TaskLogisticsInfo.ExplorestorePeriod, ""),
-		CouponCode:            conv.MustString(TaskLogisticsInfo.CouponCode, ""),
-		SignedTime:            SignedTime,
-	}
-}
-
-func SpecialTaskLogisticsToTaskInfo(TaskLogisticss []*http_model.SpecialTaskLogistics) []*http_model.SpecialTaskLogisticsInfo {
-	var TaskLogisticsInfos []*http_model.SpecialTaskLogisticsInfo
-	for _, TaskLogistics := range TaskLogisticss {
-		TaskLogistics := GetSpecialTalentInfoStruct(TaskLogistics)
-		TaskLogisticsInfos = append(TaskLogisticsInfos, TaskLogistics)
-	}
-	return TaskLogisticsInfos
-}
-
-func GetSpecialTalentInfoStruct(TaskLogistics *http_model.SpecialTaskLogistics) *http_model.SpecialTaskLogisticsInfo {
-	TalentPlatformInfoSnap := TaskLogistics.Talent.TalentPlatformInfoSnap
-	TalentPostAddrSnap := TaskLogistics.Talent.TalentPostAddrSnap
-	SignedTime := ""
-	if TaskLogistics.Logistics.SignedTime == nil {
-		SignedTime = ""
-	} else {
-		SignedTime = conv.MustString(TaskLogistics.Logistics.SignedTime, "")
-	}
-	return &http_model.SpecialTaskLogisticsInfo{
-		TaskID:                TaskLogistics.Talent.TaskId,
-		PlatformNickname:      conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:             conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		DetailAddr:            conv.MustString(gjson.Get(TalentPostAddrSnap, "detail_addr"), "") + TaskLogistics.Region,
-		CompanyName:           TaskLogistics.Logistics.CompanyName,
-		LogisticsNumber:       TaskLogistics.Logistics.LogisticsNumber,
-		DeliveryTime:          conv.MustString(TaskLogistics.Logistics.DeliveryTime, ""),
-		ExplorestoreStarttime: TaskLogistics.Logistics.ExplorestoreStarttime,
-		ExplorestoreEndtime:   TaskLogistics.Logistics.ExplorestoreEndtime,
-		ExplorestorePeriod:    TaskLogistics.Logistics.ExplorestorePeriod,
-		CouponCode:            TaskLogistics.Logistics.CouponCodeInformation,
-		SignedTime:            SignedTime,
-	}
-}
+package pack
+
+import (
+	"youngee_m_api/model/http_model"
+
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+)
+
+func MGormTaskLogisticsInfoListToHttpTaskLogisticsPreviewList(gormTaskLogisticsInfos []*http_model.TaskLogisticsInfo) []*http_model.TaskLogisticsPreview {
+	var httpProjectPreviews []*http_model.TaskLogisticsPreview
+	for _, gormTaskLogisticsInfo := range gormTaskLogisticsInfos {
+		httpTaskLogisticsPreview := MGormTaskLogisticsInfoToHttpTaskLogisticsPreview(gormTaskLogisticsInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskLogisticsPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskLogisticsInfoToHttpTaskLogisticsPreview(TaskLogisticsInfo *http_model.TaskLogisticsInfo) *http_model.TaskLogisticsPreview {
+	deliveryTime := conv.MustString(TaskLogisticsInfo.DeliveryTime, "")
+	deliveryTime = deliveryTime[0:19]
+	SignedTime := ""
+	if TaskLogisticsInfo.SignedTime == "" {
+		SignedTime = ""
+	} else {
+		SignedTime = TaskLogisticsInfo.SignedTime[:19]
+	}
+	return &http_model.TaskLogisticsPreview{
+		TaskID:                conv.MustString(TaskLogisticsInfo.TaskID, ""),
+		PlatformNickname:      conv.MustString(TaskLogisticsInfo.PlatformNickname, ""),
+		FansCount:             conv.MustString(TaskLogisticsInfo.FansCount, ""),
+		RecruitStrategyID:     conv.MustString(TaskLogisticsInfo.RecruitStrategyID, ""),
+		StrategyID:            conv.MustString(TaskLogisticsInfo.StrategyID, ""),
+		DetailAddr:            conv.MustString(TaskLogisticsInfo.DetailAddr, ""),
+		CompanyName:           conv.MustString(TaskLogisticsInfo.CompanyName, ""),
+		LogisticsNumber:       conv.MustString(TaskLogisticsInfo.LogisticsNumber, ""),
+		DeliveryTime:          deliveryTime,
+		ExplorestoreStarttime: TaskLogisticsInfo.ExplorestoreStarttime,
+		ExplorestoreEndtime:   TaskLogisticsInfo.ExplorestoreEndtime,
+		ExplorestorePeriod:    conv.MustString(TaskLogisticsInfo.ExplorestorePeriod, ""),
+		CouponCode:            conv.MustString(TaskLogisticsInfo.CouponCode, ""),
+		SignedTime:            SignedTime,
+	}
+}
+
+func TaskLogisticsToTaskInfo(TaskLogisticss []*http_model.TaskLogistics) []*http_model.TaskLogisticsInfo {
+	var TaskLogisticsInfos []*http_model.TaskLogisticsInfo
+	for _, TaskLogistics := range TaskLogisticss {
+		TaskLogistics := GetTalentInfoStruct(TaskLogistics)
+		TaskLogisticsInfos = append(TaskLogisticsInfos, TaskLogistics)
+	}
+	return TaskLogisticsInfos
+}
+
+func GetTalentInfoStruct(TaskLogistics *http_model.TaskLogistics) *http_model.TaskLogisticsInfo {
+	TalentPlatformInfoSnap := TaskLogistics.Talent.TalentPlatformInfoSnap
+	TalentPostAddrSnap := TaskLogistics.Talent.TalentPostAddrSnap
+	SignedTime := ""
+	if TaskLogistics.Logistics.SignedTime == nil {
+		SignedTime = ""
+	} else {
+		SignedTime = conv.MustString(TaskLogistics.Logistics.SignedTime, "")
+	}
+	return &http_model.TaskLogisticsInfo{
+		TaskID:                TaskLogistics.Talent.TaskID,
+		PlatformNickname:      conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:             conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:            TaskLogistics.Talent.StrategyID,
+		DetailAddr:            conv.MustString(gjson.Get(TalentPostAddrSnap, "detail_addr"), "") + TaskLogistics.Region,
+		CompanyName:           TaskLogistics.Logistics.CompanyName,
+		LogisticsNumber:       TaskLogistics.Logistics.LogisticsNumber,
+		DeliveryTime:          conv.MustString(TaskLogistics.Logistics.DeliveryTime, ""),
+		ExplorestoreStarttime: TaskLogistics.Logistics.ExplorestoreStarttime,
+		ExplorestoreEndtime:   TaskLogistics.Logistics.ExplorestoreEndtime,
+		ExplorestorePeriod:    TaskLogistics.Logistics.ExplorestorePeriod,
+		CouponCode:            TaskLogistics.Logistics.CouponCodeInformation,
+		SignedTime:            SignedTime,
+	}
+}
+
+func MGormSpecialTaskLogisticsInfoListToHttpTaskLogisticsPreviewList(gormTaskLogisticsInfos []*http_model.SpecialTaskLogisticsInfo) []*http_model.SpecialTaskLogisticsPreview {
+	var httpProjectPreviews []*http_model.SpecialTaskLogisticsPreview
+	for _, gormTaskLogisticsInfo := range gormTaskLogisticsInfos {
+		httpTaskLogisticsPreview := MGormSpecialTaskLogisticsInfoToHttpTaskLogisticsPreview(gormTaskLogisticsInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskLogisticsPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormSpecialTaskLogisticsInfoToHttpTaskLogisticsPreview(TaskLogisticsInfo *http_model.SpecialTaskLogisticsInfo) *http_model.SpecialTaskLogisticsPreview {
+	deliveryTime := conv.MustString(TaskLogisticsInfo.DeliveryTime, "")
+	deliveryTime = deliveryTime[0:19]
+	SignedTime := ""
+	if TaskLogisticsInfo.SignedTime == "" {
+		SignedTime = ""
+	} else {
+		SignedTime = TaskLogisticsInfo.SignedTime[:19]
+	}
+	return &http_model.SpecialTaskLogisticsPreview{
+		TaskID:                conv.MustString(TaskLogisticsInfo.TaskID, ""),
+		PlatformNickname:      conv.MustString(TaskLogisticsInfo.PlatformNickname, ""),
+		FansCount:             conv.MustString(TaskLogisticsInfo.FansCount, ""),
+		DetailAddr:            conv.MustString(TaskLogisticsInfo.DetailAddr, ""),
+		CompanyName:           conv.MustString(TaskLogisticsInfo.CompanyName, ""),
+		LogisticsNumber:       conv.MustString(TaskLogisticsInfo.LogisticsNumber, ""),
+		DeliveryTime:          deliveryTime,
+		ExplorestoreStarttime: TaskLogisticsInfo.ExplorestoreStarttime,
+		ExplorestoreEndtime:   TaskLogisticsInfo.ExplorestoreEndtime,
+		ExplorestorePeriod:    conv.MustString(TaskLogisticsInfo.ExplorestorePeriod, ""),
+		CouponCode:            conv.MustString(TaskLogisticsInfo.CouponCode, ""),
+		SignedTime:            SignedTime,
+	}
+}
+
+func SpecialTaskLogisticsToTaskInfo(TaskLogisticss []*http_model.SpecialTaskLogistics) []*http_model.SpecialTaskLogisticsInfo {
+	var TaskLogisticsInfos []*http_model.SpecialTaskLogisticsInfo
+	for _, TaskLogistics := range TaskLogisticss {
+		TaskLogistics := GetSpecialTalentInfoStruct(TaskLogistics)
+		TaskLogisticsInfos = append(TaskLogisticsInfos, TaskLogistics)
+	}
+	return TaskLogisticsInfos
+}
+
+func GetSpecialTalentInfoStruct(TaskLogistics *http_model.SpecialTaskLogistics) *http_model.SpecialTaskLogisticsInfo {
+	TalentPlatformInfoSnap := TaskLogistics.Talent.TalentPlatformInfoSnap
+	TalentPostAddrSnap := TaskLogistics.Talent.TalentPostAddrSnap
+	SignedTime := ""
+	if TaskLogistics.Logistics.SignedTime == nil {
+		SignedTime = ""
+	} else {
+		SignedTime = conv.MustString(TaskLogistics.Logistics.SignedTime, "")
+	}
+	return &http_model.SpecialTaskLogisticsInfo{
+		TaskID:                TaskLogistics.Talent.TaskID,
+		PlatformNickname:      conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:             conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		DetailAddr:            conv.MustString(gjson.Get(TalentPostAddrSnap, "detail_addr"), "") + TaskLogistics.Region,
+		CompanyName:           TaskLogistics.Logistics.CompanyName,
+		LogisticsNumber:       TaskLogistics.Logistics.LogisticsNumber,
+		DeliveryTime:          conv.MustString(TaskLogistics.Logistics.DeliveryTime, ""),
+		ExplorestoreStarttime: TaskLogistics.Logistics.ExplorestoreStarttime,
+		ExplorestoreEndtime:   TaskLogistics.Logistics.ExplorestoreEndtime,
+		ExplorestorePeriod:    TaskLogistics.Logistics.ExplorestorePeriod,
+		CouponCode:            TaskLogistics.Logistics.CouponCodeInformation,
+		SignedTime:            SignedTime,
+	}
+}

+ 61 - 61
pack/task_script_list.go

@@ -1,61 +1,61 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskScriptInfoListToHttpTaskScriptPreviewList(gormTaskScriptInfos []*http_model.TaskScriptInfo) []*http_model.TaskScriptPreview {
-	var httpProjectPreviews []*http_model.TaskScriptPreview
-	for _, gormTaskScriptInfo := range gormTaskScriptInfos {
-		httpTaskScriptPreview := MGormTaskScriptInfoToHttpTaskScriptPreview(gormTaskScriptInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskScriptPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskScriptInfoToHttpTaskScriptPreview(TaskScriptInfo *http_model.TaskScriptInfo) *http_model.TaskScriptPreview {
-	//deliveryTime := conv.MustString(TaskScriptInfo.DeliveryTime)
-	//deliveryTime = deliveryTime[0:19]
-	return &http_model.TaskScriptPreview{
-		TaskID:            conv.MustString(TaskScriptInfo.TaskID, ""),
-		PlatformNickname:  conv.MustString(TaskScriptInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskScriptInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskScriptInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskScriptInfo.StrategyID, ""),
-		Title:             TaskScriptInfo.Title,
-		Content:           TaskScriptInfo.Content,
-		ReviseOpinion:     TaskScriptInfo.ReviseOpinion,
-		Submit:            conv.MustString(TaskScriptInfo.SubmitAt, "")[0:19],
-		AgreeAt:           conv.MustString(TaskScriptInfo.AgreeAt, "")[0:19],
-	}
-}
-
-func TaskScriptToTaskInfo(TaskScripts []*http_model.TaskScript) []*http_model.TaskScriptInfo {
-	var TaskScriptInfos []*http_model.TaskScriptInfo
-	for _, TaskScript := range TaskScripts {
-		TaskScript := GetScriptInfoStruct(TaskScript)
-		TaskScriptInfos = append(TaskScriptInfos, TaskScript)
-	}
-	return TaskScriptInfos
-}
-
-func GetScriptInfoStruct(TaskScript *http_model.TaskScript) *http_model.TaskScriptInfo {
-	TalentPlatformInfoSnap := TaskScript.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskScriptInfo{
-		TaskID:           TaskScript.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskScript.Talent.StrategyId,
-		ScriptId:         TaskScript.Script.ScriptID,
-		Title:            TaskScript.Script.Title,
-		Content:          TaskScript.Script.Content,
-		ReviseOpinion:    TaskScript.Script.ReviseOpinion,
-		CreateAt:         TaskScript.Script.CreateAt,
-		SubmitAt:         TaskScript.Script.SubmitAt,
-		AgreeAt:          TaskScript.Script.AgreeAt,
-		RejectAt:         TaskScript.Script.RejectAt,
-		IsReview:         TaskScript.Script.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskScriptInfoListToHttpTaskScriptPreviewList(gormTaskScriptInfos []*http_model.TaskScriptInfo) []*http_model.TaskScriptPreview {
+	var httpProjectPreviews []*http_model.TaskScriptPreview
+	for _, gormTaskScriptInfo := range gormTaskScriptInfos {
+		httpTaskScriptPreview := MGormTaskScriptInfoToHttpTaskScriptPreview(gormTaskScriptInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskScriptPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskScriptInfoToHttpTaskScriptPreview(TaskScriptInfo *http_model.TaskScriptInfo) *http_model.TaskScriptPreview {
+	//deliveryTime := conv.MustString(TaskScriptInfo.DeliveryTime)
+	//deliveryTime = deliveryTime[0:19]
+	return &http_model.TaskScriptPreview{
+		TaskID:            conv.MustString(TaskScriptInfo.TaskID, ""),
+		PlatformNickname:  conv.MustString(TaskScriptInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskScriptInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskScriptInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskScriptInfo.StrategyID, ""),
+		Title:             TaskScriptInfo.Title,
+		Content:           TaskScriptInfo.Content,
+		ReviseOpinion:     TaskScriptInfo.ReviseOpinion,
+		Submit:            conv.MustString(TaskScriptInfo.SubmitAt, "")[0:19],
+		AgreeAt:           conv.MustString(TaskScriptInfo.AgreeAt, "")[0:19],
+	}
+}
+
+func TaskScriptToTaskInfo(TaskScripts []*http_model.TaskScript) []*http_model.TaskScriptInfo {
+	var TaskScriptInfos []*http_model.TaskScriptInfo
+	for _, TaskScript := range TaskScripts {
+		TaskScript := GetScriptInfoStruct(TaskScript)
+		TaskScriptInfos = append(TaskScriptInfos, TaskScript)
+	}
+	return TaskScriptInfos
+}
+
+func GetScriptInfoStruct(TaskScript *http_model.TaskScript) *http_model.TaskScriptInfo {
+	TalentPlatformInfoSnap := TaskScript.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskScriptInfo{
+		TaskID:           TaskScript.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskScript.Talent.StrategyID,
+		ScriptId:         TaskScript.Script.ScriptID,
+		Title:            TaskScript.Script.Title,
+		Content:          TaskScript.Script.Content,
+		ReviseOpinion:    TaskScript.Script.ReviseOpinion,
+		CreateAt:         TaskScript.Script.CreateAt,
+		SubmitAt:         TaskScript.Script.SubmitAt,
+		AgreeAt:          TaskScript.Script.AgreeAt,
+		RejectAt:         TaskScript.Script.RejectAt,
+		IsReview:         TaskScript.Script.IsReview,
+	}
+}

+ 63 - 63
pack/task_sketch_list.go

@@ -1,63 +1,63 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskSketchInfoListToHttpTaskSketchPreviewList(gormTaskSketchInfos []*http_model.TaskSketchInfo) []*http_model.TaskSketchPreview {
-	var httpProjectPreviews []*http_model.TaskSketchPreview
-	for _, gormTaskSketchInfo := range gormTaskSketchInfos {
-		httpTaskSketchPreview := MGormTaskSketchInfoToHttpTaskSketchPreview(gormTaskSketchInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskSketchPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskSketchInfoToHttpTaskSketchPreview(TaskSketchInfo *http_model.TaskSketchInfo) *http_model.TaskSketchPreview {
-	//deliveryTime := conv.MustString(TaskSketchInfo.DeliveryTime)
-	//deliveryTime = deliveryTime[0:19]
-	return &http_model.TaskSketchPreview{
-		TaskID:            conv.MustString(TaskSketchInfo.TaskID, ""),
-		SketchID:          conv.MustString(TaskSketchInfo.SketchId, ""),
-		PlatformNickname:  conv.MustString(TaskSketchInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskSketchInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskSketchInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskSketchInfo.StrategyID, ""),
-		Title:             TaskSketchInfo.Title,
-		Content:           TaskSketchInfo.Content,
-		ReviseOpinion:     TaskSketchInfo.ReviseOpinion,
-		Submit:            conv.MustString(TaskSketchInfo.SubmitAt, "")[0:19],
-		AgreeAt:           conv.MustString(TaskSketchInfo.AgreeAt, "")[0:19],
-		//SketchPhotos:      TaskSketchInfo.SketchPhotos,
-	}
-}
-
-func TaskSketchToTaskInfo(TaskSketchs []*http_model.TaskSketch) []*http_model.TaskSketchInfo {
-	var TaskSketchInfos []*http_model.TaskSketchInfo
-	for _, TaskSketch := range TaskSketchs {
-		TaskSketch := GetSketchInfoStruct(TaskSketch)
-		TaskSketchInfos = append(TaskSketchInfos, TaskSketch)
-	}
-	return TaskSketchInfos
-}
-
-func GetSketchInfoStruct(TaskSketch *http_model.TaskSketch) *http_model.TaskSketchInfo {
-	TalentPlatformInfoSnap := TaskSketch.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskSketchInfo{
-		TaskID:           TaskSketch.Talent.TaskId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskSketch.Talent.StrategyId,
-		SketchId:         TaskSketch.Sketch.SketchID,
-		Title:            TaskSketch.Sketch.Title,
-		Content:          TaskSketch.Sketch.Content,
-		ReviseOpinion:    TaskSketch.Sketch.ReviseOpinion,
-		CreateAt:         TaskSketch.Sketch.CreateAt,
-		SubmitAt:         TaskSketch.Sketch.SubmitAt,
-		AgreeAt:          TaskSketch.Sketch.AgreeAt,
-		RejectAt:         TaskSketch.Sketch.RejectAt,
-		IsReview:         TaskSketch.Sketch.IsReview,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskSketchInfoListToHttpTaskSketchPreviewList(gormTaskSketchInfos []*http_model.TaskSketchInfo) []*http_model.TaskSketchPreview {
+	var httpProjectPreviews []*http_model.TaskSketchPreview
+	for _, gormTaskSketchInfo := range gormTaskSketchInfos {
+		httpTaskSketchPreview := MGormTaskSketchInfoToHttpTaskSketchPreview(gormTaskSketchInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskSketchPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskSketchInfoToHttpTaskSketchPreview(TaskSketchInfo *http_model.TaskSketchInfo) *http_model.TaskSketchPreview {
+	//deliveryTime := conv.MustString(TaskSketchInfo.DeliveryTime)
+	//deliveryTime = deliveryTime[0:19]
+	return &http_model.TaskSketchPreview{
+		TaskID:            conv.MustString(TaskSketchInfo.TaskID, ""),
+		SketchID:          conv.MustString(TaskSketchInfo.SketchId, ""),
+		PlatformNickname:  conv.MustString(TaskSketchInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskSketchInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskSketchInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskSketchInfo.StrategyID, ""),
+		Title:             TaskSketchInfo.Title,
+		Content:           TaskSketchInfo.Content,
+		ReviseOpinion:     TaskSketchInfo.ReviseOpinion,
+		Submit:            conv.MustString(TaskSketchInfo.SubmitAt, "")[0:19],
+		AgreeAt:           conv.MustString(TaskSketchInfo.AgreeAt, "")[0:19],
+		//SketchPhotos:      TaskSketchInfo.SketchPhotos,
+	}
+}
+
+func TaskSketchToTaskInfo(TaskSketchs []*http_model.TaskSketch) []*http_model.TaskSketchInfo {
+	var TaskSketchInfos []*http_model.TaskSketchInfo
+	for _, TaskSketch := range TaskSketchs {
+		TaskSketch := GetSketchInfoStruct(TaskSketch)
+		TaskSketchInfos = append(TaskSketchInfos, TaskSketch)
+	}
+	return TaskSketchInfos
+}
+
+func GetSketchInfoStruct(TaskSketch *http_model.TaskSketch) *http_model.TaskSketchInfo {
+	TalentPlatformInfoSnap := TaskSketch.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskSketchInfo{
+		TaskID:           TaskSketch.Talent.TaskID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskSketch.Talent.StrategyID,
+		SketchId:         TaskSketch.Sketch.SketchID,
+		Title:            TaskSketch.Sketch.Title,
+		Content:          TaskSketch.Sketch.Content,
+		ReviseOpinion:    TaskSketch.Sketch.ReviseOpinion,
+		CreateAt:         TaskSketch.Sketch.CreateAt,
+		SubmitAt:         TaskSketch.Sketch.SubmitAt,
+		AgreeAt:          TaskSketch.Sketch.AgreeAt,
+		RejectAt:         TaskSketch.Sketch.RejectAt,
+		IsReview:         TaskSketch.Sketch.IsReview,
+	}
+}

+ 55 - 55
pack/task_terminated_list.go

@@ -1,55 +1,55 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskTerminatedInfoListToHttpTaskTerminatedPreviewList(gormTaskTerminatedInfos []*http_model.TaskTerminatedInfo) []*http_model.TaskTerminatedPreview {
-	var httpProjectPreviews []*http_model.TaskTerminatedPreview
-	for _, gormTaskTerminatedInfo := range gormTaskTerminatedInfos {
-		httpTaskTerminatedPreview := MGormTaskTerminatedInfoToHttpTaskTerminatedPreview(gormTaskTerminatedInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskTerminatedPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskTerminatedInfoToHttpTaskTerminatedPreview(TaskTerminatedInfo *http_model.TaskTerminatedInfo) *http_model.TaskTerminatedPreview {
-	return &http_model.TaskTerminatedPreview{
-		TaskID:            conv.MustString(TaskTerminatedInfo.TaskID, ""),
-		ProjectID:         conv.MustString(TaskTerminatedInfo.ProjectID, ""),
-		PlatformNickname:  conv.MustString(TaskTerminatedInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskTerminatedInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskTerminatedInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskTerminatedInfo.StrategyID, ""),
-		AllPayment:        TaskTerminatedInfo.AllPayment,
-		RealPayment:       TaskTerminatedInfo.RealPayment,
-		HandleAt:          conv.MustString(TaskTerminatedInfo.HandleAt, ""),
-		BreakType:         conv.MustString(TaskTerminatedInfo.BreakType, ""),
-	}
-}
-
-func TaskTerminatedToTaskInfo(TaskTerminateds []*http_model.TaskTerminated) []*http_model.TaskTerminatedInfo {
-	var TaskTerminatedInfos []*http_model.TaskTerminatedInfo
-	for _, TaskTerminated := range TaskTerminateds {
-		TaskTerminated1 := GetTerminatedInfoStruct(TaskTerminated)
-		TaskTerminatedInfos = append(TaskTerminatedInfos, TaskTerminated1)
-	}
-	return TaskTerminatedInfos
-}
-
-func GetTerminatedInfoStruct(TaskTerminated *http_model.TaskTerminated) *http_model.TaskTerminatedInfo {
-	TalentPlatformInfoSnap := TaskTerminated.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskTerminatedInfo{
-		TaskID:           TaskTerminated.Talent.TaskId,
-		ProjectID:        TaskTerminated.Talent.ProjectId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskTerminated.Talent.StrategyId,
-		AllPayment:       TaskTerminated.Talent.AllPayment,
-		RealPayment:      TaskTerminated.Talent.RealPayment,
-		BreakType:        TaskTerminated.Default.BreakType,
-		HandleAt:         conv.MustString(TaskTerminated.Default.HandleAt, "")[:19],
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskTerminatedInfoListToHttpTaskTerminatedPreviewList(gormTaskTerminatedInfos []*http_model.TaskTerminatedInfo) []*http_model.TaskTerminatedPreview {
+	var httpProjectPreviews []*http_model.TaskTerminatedPreview
+	for _, gormTaskTerminatedInfo := range gormTaskTerminatedInfos {
+		httpTaskTerminatedPreview := MGormTaskTerminatedInfoToHttpTaskTerminatedPreview(gormTaskTerminatedInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskTerminatedPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskTerminatedInfoToHttpTaskTerminatedPreview(TaskTerminatedInfo *http_model.TaskTerminatedInfo) *http_model.TaskTerminatedPreview {
+	return &http_model.TaskTerminatedPreview{
+		TaskID:            conv.MustString(TaskTerminatedInfo.TaskID, ""),
+		ProjectID:         conv.MustString(TaskTerminatedInfo.ProjectID, ""),
+		PlatformNickname:  conv.MustString(TaskTerminatedInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskTerminatedInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskTerminatedInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskTerminatedInfo.StrategyID, ""),
+		AllPayment:        TaskTerminatedInfo.AllPayment,
+		RealPayment:       TaskTerminatedInfo.RealPayment,
+		HandleAt:          conv.MustString(TaskTerminatedInfo.HandleAt, ""),
+		BreakType:         conv.MustString(TaskTerminatedInfo.BreakType, ""),
+	}
+}
+
+func TaskTerminatedToTaskInfo(TaskTerminateds []*http_model.TaskTerminated) []*http_model.TaskTerminatedInfo {
+	var TaskTerminatedInfos []*http_model.TaskTerminatedInfo
+	for _, TaskTerminated := range TaskTerminateds {
+		TaskTerminated1 := GetTerminatedInfoStruct(TaskTerminated)
+		TaskTerminatedInfos = append(TaskTerminatedInfos, TaskTerminated1)
+	}
+	return TaskTerminatedInfos
+}
+
+func GetTerminatedInfoStruct(TaskTerminated *http_model.TaskTerminated) *http_model.TaskTerminatedInfo {
+	TalentPlatformInfoSnap := TaskTerminated.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskTerminatedInfo{
+		TaskID:           TaskTerminated.Talent.TaskID,
+		ProjectID:        TaskTerminated.Talent.ProjectID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskTerminated.Talent.StrategyID,
+		AllPayment:       TaskTerminated.Talent.AllPayment,
+		RealPayment:      TaskTerminated.Talent.RealPayment,
+		BreakType:        TaskTerminated.Default.BreakType,
+		HandleAt:         conv.MustString(TaskTerminated.Default.HandleAt, "")[:19],
+	}
+}

+ 55 - 55
pack/task_terminating_list.go

@@ -1,55 +1,55 @@
-package pack
-
-import (
-	"github.com/caixw/lib.go/conv"
-	"github.com/tidwall/gjson"
-	"youngee_m_api/model/http_model"
-)
-
-func MGormTaskTerminatingInfoListToHttpTaskTerminatingPreviewList(gormTaskTerminatingInfos []*http_model.TaskTerminatingInfo) []*http_model.TaskTerminatingPreview {
-	var httpProjectPreviews []*http_model.TaskTerminatingPreview
-	for _, gormTaskTerminatingInfo := range gormTaskTerminatingInfos {
-		httpTaskTerminatingPreview := MGormTaskTerminatingInfoToHttpTaskTerminatingPreview(gormTaskTerminatingInfo)
-		httpProjectPreviews = append(httpProjectPreviews, httpTaskTerminatingPreview)
-	}
-	return httpProjectPreviews
-}
-
-func MGormTaskTerminatingInfoToHttpTaskTerminatingPreview(TaskTerminatingInfo *http_model.TaskTerminatingInfo) *http_model.TaskTerminatingPreview {
-	return &http_model.TaskTerminatingPreview{
-		TaskID:            conv.MustString(TaskTerminatingInfo.TaskID, ""),
-		ProjectID:         conv.MustString(TaskTerminatingInfo.ProjectID, ""),
-		PlatformNickname:  conv.MustString(TaskTerminatingInfo.PlatformNickname, ""),
-		FansCount:         conv.MustString(TaskTerminatingInfo.FansCount, ""),
-		RecruitStrategyID: conv.MustString(TaskTerminatingInfo.RecruitStrategyID, ""),
-		StrategyID:        conv.MustString(TaskTerminatingInfo.StrategyID, ""),
-		AllPayment:        TaskTerminatingInfo.AllPayment,
-		RealPayment:       TaskTerminatingInfo.RealPayment,
-		TerminateAt:       conv.MustString(TaskTerminatingInfo.TerminateAt, "")[0:19],
-		BreakType:         conv.MustString(TaskTerminatingInfo.BreakType, ""),
-	}
-}
-
-func TaskTerminatingToTaskInfo(TaskTerminatings []*http_model.TaskTerminating) []*http_model.TaskTerminatingInfo {
-	var TaskTerminatingInfos []*http_model.TaskTerminatingInfo
-	for _, TaskTerminating := range TaskTerminatings {
-		TaskTerminating := GetTerminatingInfoStruct(TaskTerminating)
-		TaskTerminatingInfos = append(TaskTerminatingInfos, TaskTerminating)
-	}
-	return TaskTerminatingInfos
-}
-
-func GetTerminatingInfoStruct(TaskTerminating *http_model.TaskTerminating) *http_model.TaskTerminatingInfo {
-	TalentPlatformInfoSnap := TaskTerminating.Talent.TalentPlatformInfoSnap
-	return &http_model.TaskTerminatingInfo{
-		TaskID:           TaskTerminating.Talent.TaskId,
-		ProjectID:        TaskTerminating.Talent.ProjectId,
-		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		StrategyID:       TaskTerminating.Talent.StrategyId,
-		AllPayment:       TaskTerminating.Talent.AllPayment,
-		RealPayment:      TaskTerminating.Talent.RealPayment,
-		TerminateAt:      TaskTerminating.Default.TerminateAt,
-		BreakType:        TaskTerminating.Default.BreakType,
-	}
-}
+package pack
+
+import (
+	"github.com/caixw/lib.go/conv"
+	"github.com/tidwall/gjson"
+	"youngee_m_api/model/http_model"
+)
+
+func MGormTaskTerminatingInfoListToHttpTaskTerminatingPreviewList(gormTaskTerminatingInfos []*http_model.TaskTerminatingInfo) []*http_model.TaskTerminatingPreview {
+	var httpProjectPreviews []*http_model.TaskTerminatingPreview
+	for _, gormTaskTerminatingInfo := range gormTaskTerminatingInfos {
+		httpTaskTerminatingPreview := MGormTaskTerminatingInfoToHttpTaskTerminatingPreview(gormTaskTerminatingInfo)
+		httpProjectPreviews = append(httpProjectPreviews, httpTaskTerminatingPreview)
+	}
+	return httpProjectPreviews
+}
+
+func MGormTaskTerminatingInfoToHttpTaskTerminatingPreview(TaskTerminatingInfo *http_model.TaskTerminatingInfo) *http_model.TaskTerminatingPreview {
+	return &http_model.TaskTerminatingPreview{
+		TaskID:            conv.MustString(TaskTerminatingInfo.TaskID, ""),
+		ProjectID:         conv.MustString(TaskTerminatingInfo.ProjectID, ""),
+		PlatformNickname:  conv.MustString(TaskTerminatingInfo.PlatformNickname, ""),
+		FansCount:         conv.MustString(TaskTerminatingInfo.FansCount, ""),
+		RecruitStrategyID: conv.MustString(TaskTerminatingInfo.RecruitStrategyID, ""),
+		StrategyID:        conv.MustString(TaskTerminatingInfo.StrategyID, ""),
+		AllPayment:        TaskTerminatingInfo.AllPayment,
+		RealPayment:       TaskTerminatingInfo.RealPayment,
+		TerminateAt:       conv.MustString(TaskTerminatingInfo.TerminateAt, "")[0:19],
+		BreakType:         conv.MustString(TaskTerminatingInfo.BreakType, ""),
+	}
+}
+
+func TaskTerminatingToTaskInfo(TaskTerminatings []*http_model.TaskTerminating) []*http_model.TaskTerminatingInfo {
+	var TaskTerminatingInfos []*http_model.TaskTerminatingInfo
+	for _, TaskTerminating := range TaskTerminatings {
+		TaskTerminating := GetTerminatingInfoStruct(TaskTerminating)
+		TaskTerminatingInfos = append(TaskTerminatingInfos, TaskTerminating)
+	}
+	return TaskTerminatingInfos
+}
+
+func GetTerminatingInfoStruct(TaskTerminating *http_model.TaskTerminating) *http_model.TaskTerminatingInfo {
+	TalentPlatformInfoSnap := TaskTerminating.Talent.TalentPlatformInfoSnap
+	return &http_model.TaskTerminatingInfo{
+		TaskID:           TaskTerminating.Talent.TaskID,
+		ProjectID:        TaskTerminating.Talent.ProjectID,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		StrategyID:       TaskTerminating.Talent.StrategyID,
+		AllPayment:       TaskTerminating.Talent.AllPayment,
+		RealPayment:      TaskTerminating.Talent.RealPayment,
+		TerminateAt:      TaskTerminating.Default.TerminateAt,
+		BreakType:        TaskTerminating.Default.BreakType,
+	}
+}

+ 28 - 19
route/init.go

@@ -250,20 +250,25 @@ func InitRoute(r *gin.Engine) {
 		s.POST("/project/detail", controller.TaskController{}.GetProjectDetail)           // 品牌种草任务预览
 		s.POST("/project/task/list", controller.TaskController{}.ProjectTaskList)         // 种草任务列表
 		s.POST("/project/del", controller.TaskController{}.ProjectDel)                    // 删除种草任务
-		s.POST("/project/review", handler.WrapReviewProjectHandler)                       // 种草任务审核
-		s.POST("/project/getTasklist", handler.WrapGetTaskListHandler)                    //种草招募中选达人列表/查名单
-		s.POST("/project/task/coop/pass", handler.WrapPassproTaskCoopHandler)             // 种草同意任务合作
-		s.POST("/project/task/coop/refuse", handler.WrapRefuseproTaskCoopHandler)         // 种草拒绝任务合作
+
+		s.POST("/project/review", handler.WrapReviewProjectHandler)                  // 种草任务审核
+		s.POST("/project/getrecuritddl", handler.WrapGetRecruitTimeHandler)          //种草招募截止时间
+		s.POST("/project/gettalentstatusnum", handler.WrapGetTalentstatusNumHandler) //达人状态数量
+		s.POST("/project/getTasklist", handler.WrapGetTaskListHandler)               //种草招募中选达人列表/查名单
+		s.POST("/project/task/coop/pass", handler.WrapPassproTaskCoopHandler)        // 种草同意任务合作
+		s.POST("/project/task/coop/refuse", handler.WrapRefuseproTaskCoopHandler)    // 种草拒绝任务合作
 
 		//s.POST("/project/endtask", handler.WrapEndTaskHandler) //种草暂时终止
 
-		s.POST("/project/presketchlist", handler.WrapPreSketchListHandler)     //种草初稿待传列表
-		s.POST("/project/tasksketchlist", handler.WrapTasksketchlistHandler)   //种草初稿待审列表.审核通过
-		s.POST("/project/sketchopinion", handler.WrapSketchOpinionHandler)     //种草初稿审核意见提交
-		s.POST("/project/acceptsketch", handler.WrapAcceptSketchHandler)       //种草同意初稿
-		s.POST("/project/rejectsketch", handler.WrapRejectSketchHandler)       //种草拒绝初稿
-		s.POST("/project/findsketchphoto", handler.WrapFindSketchPhotoHandler) //种草查询脚本配图和视频demo
-		s.POST("/project/getsketchinfo", handler.WrapGetSketchInfoHandler)     //种草获取初稿
+		s.POST("/project/gettalentstatuscount", handler.WrapGetTalentstatusCountHandler) //达人状态统计
+		s.POST("/project/presketchlist", handler.WrapPreSketchListHandler)               //种草初稿待传列表
+		s.POST("/project/tasksketchlist", handler.WrapTasksketchlistHandler)             //种草初稿待审列表.审核通过
+		s.POST("/project/sketchopinion", handler.WrapSketchOpinionHandler)               //种草初稿审核意见提交
+		s.POST("/project/acceptsketch", handler.WrapAcceptSketchHandler)                 //种草同意初稿
+		s.POST("/project/rejectsketch", handler.WrapRejectSketchHandler)                 //种草拒绝初稿
+		s.POST("/project/findsketchphoto", handler.WrapFindSketchPhotoHandler)           //种草查询脚本配图和视频demo
+		s.POST("/project/getsketchinfo", handler.WrapGetSketchInfoHandler)               //种草获取初稿
+		s.POST("/project/getsketchrecordlist", handler.WrapGetSketchRecordListHandler)   //初稿审核记录
 
 		s.POST("/project/prelinklist", handler.WrapPreLinkListHandler)   //种草待传链接列表
 		s.POST("/project/tasklinklist", handler.WrapTaskLinklistHandler) //种草链接待审列表,通过
@@ -284,14 +289,18 @@ func InitRoute(r *gin.Engine) {
 		s.POST("/localLife/del", controller.TaskController{}.LocalLifeDel)                    // 删除本地生活
 		s.POST("/locallife/review", handler.WrapReviewLocallifeHandler)                       // 本地生活任务审核
 
-		s.POST("/locallife/getTasklist", handler.WrapGetLocalTaskListHandler)         //本地生活招募中选大人列表/查名单
-		s.POST("/locallife/task/coop/pass", handler.WrapPasslocalTaskCoopHandler)     // 本地生活同意任务合作
-		s.POST("/locallife/task/coop/refuse", handler.WrapRefuselocalTaskCoopHandler) // 本地生活拒绝任务合作
-		s.POST("/locallife/presketchlist", handler.WrapLocalPreSketchListHandler)     //本地生活初稿待传列表
-		s.POST("/locallife/tasksketchlist", handler.WrapLocalTasksketchlistHandler)   //本地生活初稿待审列表.审核通过
-		s.POST("/locallife/sketchopinion", handler.WrapLocalSketchOpinionHandler)     //本地生活初稿审核意见提交
-		s.POST("/locallife/acceptsketch", handler.WrapLocalAcceptSketchHandler)       //本地生活同意初稿
-		s.POST("/locallife/rejectsketch", handler.WrapLocalRejectSketchHandler)       //本地生活拒绝初稿
+		s.POST("/locallife/getrecuritddl", handler.WrapGetLocalRecruitTimeHandler)          //本地生活招募截止时间
+		s.POST("/locallife/gettalentstatusnum", handler.WrapGetLocalTalentstatusNumHandler) //达人状态数量
+		s.POST("/locallife/getTasklist", handler.WrapGetLocalTaskListHandler)               //本地生活招募中选大人列表/查名单
+		s.POST("/locallife/task/coop/pass", handler.WrapPasslocalTaskCoopHandler)           // 本地生活同意任务合作
+		s.POST("/locallife/task/coop/refuse", handler.WrapRefuselocalTaskCoopHandler)       // 本地生活拒绝任务合作
+
+		s.POST("/locallife/getlocaltalentstatuscount", handler.WrapGetLocalTalentstatusCountHandler) //达人状态统计
+		s.POST("/locallife/presketchlist", handler.WrapLocalPreSketchListHandler)                    //本地生活初稿待传列表
+		s.POST("/locallife/tasksketchlist", handler.WrapLocalTasksketchlistHandler)                  //本地生活初稿待审列表.审核通过
+		s.POST("/locallife/sketchopinion", handler.WrapLocalSketchOpinionHandler)                    //本地生活初稿审核意见提交
+		s.POST("/locallife/acceptsketch", handler.WrapLocalAcceptSketchHandler)                      //本地生活同意初稿
+		s.POST("/locallife/rejectsketch", handler.WrapLocalRejectSketchHandler)                      //本地生活拒绝初稿
 
 		s.POST("/locallife/prelinklist", handler.WrapLocalPreLinkListHandler)   //本地生活待传链接列表
 		s.POST("/locallife/tasklinklist", handler.WrapLocalTaskLinklistHandler) //本地生活链接待审列表,通过

+ 36 - 0
service/Localtask.go

@@ -14,6 +14,33 @@ var LocalTask *localtask
 type localtask struct {
 }
 
+func (*localtask) GetLocalRecruitTime(ctx context.Context, request http_model.GetLocalRecruitTimeRequest) (*http_model.GetLocalRecruitTimeResponse, error) {
+	recruit, err := db.GetLocalRecruittime(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[localtask service] call GetLocalRecruitTime error,err:%+v", err)
+		return nil, err
+	}
+	return recruit, nil
+}
+
+func (*localtask) GetLocalTalentstatusNum(ctx context.Context, request http_model.GetLocalTalentstatusNumRequest) (*http_model.GetLocalTalentstatusNumResponse, error) {
+	statusnum, err := db.GetLocalTalentstatusNumCount(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[localtask service] call GetLocalTalentstatusNum error,err:%+v", err)
+		return nil, err
+	}
+	return statusnum, nil
+}
+
+func (*localtask) GetLocalTalentstatusCount(ctx context.Context, request http_model.GetLocalTalentstatusCountRequest) (*http_model.GetLocalTalentstatusCountResponse, error) {
+	statusnum, err := db.GetLocalTalentstatusCountNum(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[localtask service] call GetTalentstatusNum error,err:%+v", err)
+		return nil, err
+	}
+	return statusnum, nil
+}
+
 func (*localtask) GetLocalList(ctx context.Context, request http_model.GetLocalTaskListRequest) (*http_model.GetLocalTaskListData, error) {
 	localTaskList, err := db.GetLocallifetaskList(ctx, request)
 	if err != nil {
@@ -48,6 +75,15 @@ func (*localtask) RefuseCoop(ctx context.Context, request http_model.Refuselocal
 	return &projectListData, nil
 }
 
+//func (*localtask) Data(ctx context.Context, Project http_model.LocallifeDataRequest) (*http_model.LocallifeDataResponse, error) {
+//	projectdata, err := db.GetLocallifeData(ctx, Project)
+//	if err != nil {
+//		logrus.WithContext(ctx).Errorf("[localtask service] call Data error,err:%+v", err)
+//		return nil, err
+//	}
+//	return &projectdata, nil
+//}
+
 func (*localtask) GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketchListRequest) (*http_model.GetLocalSketchTaskListData, error) {
 	secTaskList, err := db.GetLocalPreSketchList(ctx, request)
 	if err != nil {

+ 29 - 2
service/Task.go

@@ -12,6 +12,24 @@ var Task *task
 type task struct {
 }
 
+func (*task) GetRecruitTime(ctx context.Context, request http_model.GetRecruitTimeRequest) (*http_model.GetRecruitTimeResponse, error) {
+	recruit, err := db.GetRecruittime(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[localtask service] call GetRecruitTime error,err:%+v", err)
+		return nil, err
+	}
+	return recruit, nil
+}
+
+func (*task) GetTalentstatusNum(ctx context.Context, request http_model.GetTalentstatusNumRequest) (*http_model.GetTalentStatusNumResponse, error) {
+	statusnum, err := db.GetTalentstatusNumCount(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[sectask_service service] call GetTalentstatusNum error,err:%+v", err)
+		return nil, err
+	}
+	return statusnum, nil
+}
+
 func (*task) GetList(ctx context.Context, request http_model.GetTaskListRequest) (*http_model.GetTaskListData, error) {
 	secTaskList, err := db.GetProjecttaskList(ctx, request)
 	if err != nil {
@@ -22,7 +40,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.IsSpecial)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[sectask_service service] call PassCoop error,err:%+v", err)
 		return nil, err
@@ -35,7 +53,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)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[sectask_service service] call RefuseCoop error,err:%+v", err)
 		return nil, err
@@ -46,6 +64,15 @@ func (*task) RefuseCoop(ctx context.Context, request http_model.RefuseproTaskCoo
 	return &projectListData, nil
 }
 
+func (*task) GetTalentstatusCount(ctx context.Context, request http_model.GetTalentstatusCountRequest) (*http_model.GetTalentstatusCountResponse, error) {
+	statusnum, err := db.GetTalentstatusCountNum(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[sectask_service service] call GetTalentstatusNum error,err:%+v", err)
+		return nil, err
+	}
+	return statusnum, nil
+}
+
 func (*task) GetPreSketchList(ctx context.Context, request http_model.PreSketchListRequest) (*http_model.GetSketchTaskListData, error) {
 	secTaskList, err := db.GetPreSketchList(ctx, request)
 	if err != nil {

+ 43 - 38
service/data.go

@@ -2,6 +2,7 @@ package service
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"strings"
 	"youngee_m_api/db"
@@ -22,7 +23,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call CreateData error,err:%+v", err)
 		return nil, err
@@ -51,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call CreateData error,err:%+v", err)
 		return nil, err
@@ -85,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)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call AcceptData error,err:%+v", err)
 		return nil, err
@@ -123,10 +124,23 @@ func (*data) AcceptData(ctx context.Context, request http_model.AcceptDataReques
 			logrus.WithContext(ctx).Errorf("[Data service] call SetSpecialTaskSettleNum error,err:%+v", err)
 			return nil, err
 		}
+		if request.SettleAmount == nil {
+			return nil, errors.New("SettleAmount is nil")
+		}
+		err = db.SetSettleAmount(ctx, request.SettleAmount, TaskIDList)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetSettleAmount error,err:%+v", err)
+			return nil, err
+		}
+		err = db.SetProjectSettleFlag(ctx, request.ProjectId)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetProjectSettleFlag error,err:%+v", err)
+			return nil, err
+		}
 
 	} else {
 		// 2. 更新YoungeeTaskInfo表,将任务结案
-		fmt.Printf("acc request %+v", TaskIDList)
+		//fmt.Printf("acc request %+v", TaskIDList)
 		err = db.SetTaskFinish(ctx, TaskIDList)
 		if err != nil {
 			logrus.WithContext(ctx).Errorf("[Data service] call SetTaskFinish error,err:%+v", err)
@@ -142,6 +156,11 @@ func (*data) AcceptData(ctx context.Context, request http_model.AcceptDataReques
 			logrus.WithContext(ctx).Errorf("[Data service] call SetSpecialTaskSettleNum error,err:%+v", err)
 			return nil, err
 		}
+		err = db.SetProjectSettleFlag(ctx, request.ProjectId)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetProjectSettleFlag error,err:%+v", err)
+			return nil, err
+		}
 	}
 	return res, nil
 }
@@ -154,7 +173,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -188,8 +207,8 @@ 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)
+	fmt.Printf("acc request %+v", TaskIDList)
+	err := db.AcceptData(ctx, TaskIDList, request.OperatorId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Data service] call AcceptData error,err:%+v", err)
 		return nil, err
@@ -226,21 +245,17 @@ func (*data) LocalAcceptData(ctx context.Context, request http_model.LocalAccept
 			logrus.WithContext(ctx).Errorf("[Data service] call SetSpecialTaskSettleNum error,err:%+v", err)
 			return nil, err
 		}
-		//// 3. 判断是否全部任务已结案,若已全部结案则触发项目结案
-		//// 查询task_stage<15的任务数量
-		//unFinishedTaskNumber, err1 := db.GetUnfinishedTaskNumber(ctx, request.ProjectId)
-		//if err1 != nil {
-		//	logrus.WithContext(ctx).Errorf("[Data service] call GetUnfinishedTaskNumber error,err:%+v", err)
-		//	return nil, err
-		//}
-		//if *unFinishedTaskNumber == 0 { // 若为0则触发项目结案
-		//	err := db.SetSpecialProjectFinish(ctx, request.ProjectId)
-		//	if err1 != nil {
-		//		logrus.WithContext(ctx).Errorf("[Data service] call SetProjectFinish error,err:%+v", err)
-		//		return nil, err
-		//	}
-		//	res.IsEnd = 1
-		//}
+		err = db.SetLocalSettleAmount(ctx, request.SettleAmount, TaskIDList)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetSettleAmount error,err:%+v", err)
+			return nil, err
+		}
+		err = db.SetLocalLifeSettleFlag(ctx, request.ProjectId)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetLocalLifeSettleFlag error,err:%+v", err)
+			return nil, err
+		}
+
 	} else {
 		// 2. 更新YoungeeTaskInfo表,将任务结案
 		fmt.Printf("acc request %+v", TaskIDList)
@@ -259,21 +274,11 @@ func (*data) LocalAcceptData(ctx context.Context, request http_model.LocalAccept
 			logrus.WithContext(ctx).Errorf("[Data service] call SetSpecialTaskSettleNum error,err:%+v", err)
 			return nil, err
 		}
-		//// 3. 判断是否全部任务已结案,若已全部结案则触发项目结案
-		//// 查询task_stage<15的任务数量
-		//unFinishedTaskNumber, err1 := db.GetUnfinishedTaskNumber(ctx, request.ProjectId)
-		//if err1 != nil {
-		//	logrus.WithContext(ctx).Errorf("[Data service] call GetUnfinishedTaskNumber error,err:%+v", err)
-		//	return nil, err
-		//}
-		//if *unFinishedTaskNumber == 0 { // 若为0则触发项目结案
-		//	err := db.SetProjectFinish(ctx, request.ProjectId)
-		//	if err1 != nil {
-		//		logrus.WithContext(ctx).Errorf("[Data service] call SetProjectFinish error,err:%+v", err)
-		//		return nil, err
-		//	}
-		//	res.IsEnd = 1
-		//}
+		err = db.SetLocalLifeSettleFlag(ctx, request.ProjectId)
+		if err != nil {
+			logrus.WithContext(ctx).Errorf("[Data service] call SetLocalLifeSettleFlag error,err:%+v", err)
+			return nil, err
+		}
 	}
 	return res, nil
 }
@@ -286,7 +291,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.ProjectId)
 	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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -51,7 +51,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -83,7 +83,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.ProjectId, request.Isspecial)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -116,7 +116,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.ProjectId, request.Isspecial)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -149,7 +149,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err
@@ -182,7 +182,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.ProjectId)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Link service] call CreateLink error,err:%+v", err)
 		return nil, err

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini