소스 검색

Merge branch 'refs/heads/develop' into develop-zhou

Ethan 4 주 전
부모
커밋
2180476b56
53개의 변경된 파일2475개의 추가작업 그리고 268개의 파일을 삭제
  1. 417 44
      db/locallife_task.go
  2. 35 0
      db/platform_kuaishou_user.go
  3. 420 55
      db/project_task.go
  4. 2 2
      db/sub_account.go
  5. 345 0
      db/talent.go
  6. 60 0
      handler/gatlocaltalentstatuscountnum.go
  7. 60 0
      handler/getgoodstalent.go
  8. 60 0
      handler/getlocallife.go
  9. 60 0
      handler/getlocalrecruittime.go
  10. 60 0
      handler/getlocaltalentstatusnum.go
  11. 60 0
      handler/getprojecttalent.go
  12. 60 0
      handler/getprovince.go
  13. 60 0
      handler/getrecruittime.go
  14. 60 0
      handler/gettalentnum.go
  15. 60 0
      handler/gettalentstatuscountnum.go
  16. 60 0
      handler/gettalentstatusnum.go
  17. 16 7
      model/gorm_model/enterprise_talent_cooperate.go
  18. 2 0
      model/gorm_model/locallife_task_info.go
  19. 3 1
      model/gorm_model/project_task.go
  20. 9 8
      model/http_model/LocalPrelinkList.go
  21. 9 8
      model/http_model/PreLinkList.go
  22. 6 1
      model/http_model/find_all_sub_account.go
  23. 41 0
      model/http_model/getgoodstalentrequest.go
  24. 39 0
      model/http_model/getlocallifetalentrequest.go
  25. 22 0
      model/http_model/getlocaltalentstatuscountrequest.go
  26. 21 0
      model/http_model/getlocaltalentstatusnumrequest.go
  27. 19 16
      model/http_model/getlocaltasklist.go
  28. 39 0
      model/http_model/getprojecttalentrequest.go
  29. 18 0
      model/http_model/getprovincerequest.go
  30. 19 0
      model/http_model/getrecruittimerequest.go
  31. 19 0
      model/http_model/getrlocalrecruittimerequest.go
  32. 21 0
      model/http_model/gettalentnumrequest.go
  33. 22 0
      model/http_model/gettalentstatuscountrequset.go
  34. 23 0
      model/http_model/gettalentstatusnumrequest.go
  35. 18 15
      model/http_model/gettasklist.go
  36. 9 8
      model/http_model/localpredatalist.go
  37. 9 8
      model/http_model/localpresketchlistrequest.go
  38. 10 9
      model/http_model/localtaskdatalist.go
  39. 10 9
      model/http_model/localtasklinklist.go
  40. 9 8
      model/http_model/localtasksketchlist.go
  41. 9 8
      model/http_model/predatalist.go
  42. 9 8
      model/http_model/presketchlist.go
  43. 2 4
      model/http_model/sktech_info.go
  44. 10 9
      model/http_model/taskdatalist.go
  45. 10 9
      model/http_model/tasklinklist.go
  46. 9 8
      model/http_model/tasksketchlist.go
  47. 35 18
      route/init.go
  48. 27 0
      service/Localtask.go
  49. 26 0
      service/Task.go
  50. 2 2
      service/job.go
  51. 2 2
      service/sketch.go
  52. 2 1
      service/sub_account.go
  53. 40 0
      service/talent.go

+ 417 - 44
db/locallife_task.go

@@ -14,11 +14,71 @@ import (
 	"youngee_b_api/model/http_model"
 )
 
+func GetLocalRecruittime(ctx context.Context, request http_model.GetLocalRecruitTimeRequest) (*http_model.GetLocalRecruitTimeResponse, error) {
+	db := GetReadDB(ctx)
+	var localinfo gorm_model.YounggeeLocalLifeInfo
+	err := db.Model(&gorm_model.YounggeeLocalLifeInfo{}).Where("local_id = ?", request.ProjectId).Find(&localinfo).Error
+	var result http_model.GetLocalRecruitTimeResponse
+	if err != nil {
+		return &result, err
+	}
+	result.RecruitTime = localinfo.RecruitDdl.Format("2006-01-02 15:04:05")
+	return &result, nil
+}
+
+func GetLocalTalentstatusCount(db *gorm.DB, request http_model.GetLocalTalentstatusNumRequest, status int) (int64, error) {
+	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("project_id = ? AND task_status = ?", request.ProjectId, status)
+
+	// 计算总数
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+}
+
+func GetLocalTalentstatusNumCount(ctx context.Context, request http_model.GetLocalTalentstatusNumRequest) (*http_model.GetLocalTalentstatusNumResponse, error) {
+	db := GetReadDB(ctx)
+	var unoperatenum, agreetalentnum, refusetalentnum int64
+	unoperatenum, _ = GetLocalTalentstatusCount(db, request, 1)
+	agreetalentnum, _ = GetLocalTalentstatusCount(db, request, 2)
+	refusetalentnum, _ = GetLocalTalentstatusCount(db, request, 3)
+	count := &http_model.GetLocalTalentstatusNumResponse{
+		UnoperateTalentnum: unoperatenum,
+		AgreeTalentnum:     agreetalentnum,
+		RefuseTalentnum:    refusetalentnum,
+	}
+	return count, nil
+}
+
+func GetLocalTalentstatusNum(db *gorm.DB, request http_model.GetLocalTalentstatusCountRequest, status int) (int64, error) {
+	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, status)
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+}
+
+func GetLocalTalentstatusCountNum(ctx context.Context, request http_model.GetLocalTalentstatusCountRequest) (*http_model.GetLocalTalentstatusCountResponse, error) {
+	db := GetReadDB(ctx)
+	var unoperatenum, agreetalentnum, refusetalentnum int64
+	unoperatenum, _ = GetLocalTalentstatusNum(db, request, request.TaskStage)
+	agreetalentnum, _ = GetLocalTalentstatusNum(db, request, request.TaskStage+1)
+	refusetalentnum, _ = GetLocalTalentstatusNum(db, request, request.TaskStage+2)
+	count := &http_model.GetLocalTalentstatusCountResponse{
+		UnoperateTalentnum: unoperatenum,
+		AgreeTalentnum:     agreetalentnum,
+		RefuseTalentnum:    refusetalentnum,
+	}
+	return count, nil
+}
+
 func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskListRequest) (*http_model.GetLocalTaskListData, error) {
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_status = ?", request.ProjectId, request.CoopType)
-	fmt.Println(query)
+
 	// 构建查询条件
 	if request.FeeFrom != nil {
 		query = query.Where("fee_form = ?", request.FeeFrom)
@@ -32,8 +92,8 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 		}
 	}
 	if request.TalentFromList != "" {
-		citylist := strings.Split(request.TalentFromList, ",")
-		query = query.Where("city in ?", citylist)
+		provinceList := strings.Split(request.TalentFromList, ",")                // 解析传入的省份列表
+		query = query.Where("SUBSTRING_INDEX(city, ' ', 1) IN (?)", provinceList) // 提取城市字段中的省份并进行匹配
 	}
 	// 计算总数
 	var total int64
@@ -51,7 +111,42 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 		pageNum = 1
 	}
 	offset := (pageNum - 1) * pageSize
-
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	// 执行分页查询
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
@@ -68,25 +163,30 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 			Time = task.CompleteDate
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterPriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		response := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			Boperator:          boperator,
-			CreateAt:           Time,
+			CreateAt:           Time.Format("2006-01-02 15:04:05"),
 			NickName:           nickname,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
+			Gender:             gender,
 			Sprojectid:         task.SLocalLifeId,
 			City:               task.City,
 		}
@@ -102,10 +202,9 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
 func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequest) (bool, error) {
 	db := GetReadDB(ctx)
 	var count int64
-	fmt.Println("task_ids: ", req.TaskIds)
+
 	err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_id IN ? AND task_stage = 1", req.TaskIds).Count(&count).Error
 
-	fmt.Println("count: ", count)
 	if err != nil {
 		return false, err
 	}
@@ -442,6 +541,9 @@ func GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketc
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -459,34 +561,77 @@ func GetLocalPreSketchList(ctx context.Context, request http_model.LocalPreSketc
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
+
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTasksketchInfo, 0, len(projecrtaskinfo))
 
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
 			HeadUrl:            headurl,
+			Gender:             gender,
+			CollectNum:         0,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.LocalTasksketchInfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -501,6 +646,11 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -518,25 +668,66 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTasksketchinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
+			SType:              s_type,
+			SName:              s_name,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			City:               task.City,
 		}
@@ -549,8 +740,8 @@ func GetLocalSketchList(ctx context.Context, request http_model.LocalTasksketchl
 		response := &http_model.LocalTasksketchinfo{
 			Task:     taskinfo,
 			SketchId: sketchinfo.SketchID,
-			SubmitAt: sketchinfo.SubmitAt,
-			AgreeAt:  sketchinfo.AgreeAt,
+			SubmitAt: sketchinfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:  sketchinfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			Operator: boperator,
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
@@ -566,6 +757,11 @@ func GetLocalPreLinkList(ctx context.Context, request http_model.LocalPreLinkLis
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -583,33 +779,74 @@ func GetLocalPreLinkList(ctx context.Context, request http_model.LocalPreLinkLis
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTasklinkinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
 			HeadUrl:            headurl,
+			Gender:             gender,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.LocalTasklinkinfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -624,6 +861,11 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -641,27 +883,68 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTaskLinkinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
 			HeadUrl:            headurl,
+			Gender:             gender,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
@@ -674,8 +957,8 @@ func GetLocalLinkList(ctx context.Context, request http_model.LocalTaskLinklistR
 		response := &http_model.LocalTaskLinkinfo{
 			Task:     taskinfo,
 			LinkId:   linkinfo.LinkID,
-			SubmitAt: linkinfo.SubmitAt,
-			AgreeAt:  linkinfo.AgreeAt,
+			SubmitAt: linkinfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:  linkinfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			LinkUrl:  linkinfo.LinkUrl,
 			PhotoUrl: linkinfo.PhotoUrl,
 			Operator: boperator,
@@ -693,6 +976,9 @@ func GetLocalPreDataList(ctx context.Context, request http_model.LocalPreDataLis
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -710,33 +996,74 @@ func GetLocalPreDataList(ctx context.Context, request http_model.LocalPreDataLis
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTaskdatainfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
 			HeadUrl:            headurl,
+			Gender:             gender,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.LocalTaskdatainfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -751,6 +1078,11 @@ func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistR
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeLocalTaskInfo
 	query := db.Model(&gorm_model.YoungeeLocalTaskInfo{}).Where("local_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -768,27 +1100,68 @@ func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistR
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.LocalTaskDatainfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentId)
+		nickname, headurl, gender, fans, voteavg := getTalentinfo(db, task.TalentId)
 		Iscoop := getIscoop(db, task.TalentId, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.LocaLTaskInfo{
 			TaskId:             task.TaskId,
 			ProjectId:          task.LocalId,
 			TalentId:           task.TalentId,
-			FansNum:            task.FansNum,
+			FansNum:            fans,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
 			HeadUrl:            headurl,
+			Gender:             gender,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
@@ -801,8 +1174,8 @@ func GetLocalDataList(ctx context.Context, request http_model.LocalTaskDatalistR
 		response := &http_model.LocalTaskDatainfo{
 			Task:          taskinfo,
 			DataId:        datainfo.DataID,
-			SubmitAt:      datainfo.SubmitAt,
-			AgreeAt:       datainfo.AgreeAt,
+			SubmitAt:      datainfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:       datainfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			PhotoUrl:      datainfo.PhotoUrl,
 			PlayNumber:    datainfo.PlayNumber,
 			LikeNumber:    datainfo.LikeNumber,

+ 35 - 0
db/platform_kuaishou_user.go

@@ -2,7 +2,9 @@ package db
 
 import (
 	"context"
+	"strings"
 	"youngee_b_api/model/gorm_model"
+	"youngee_b_api/model/http_model"
 )
 
 func FindUserInfoByTalentId(ctx context.Context, talentId string) (*gorm_model.PlatformKuaishouUserInfo, error) {
@@ -25,3 +27,36 @@ func FindUserInfoByOpenId(ctx context.Context, openId string) (*gorm_model.Platf
 	}
 	return &userInfo, nil
 }
+
+func GetProvince(ctx context.Context, request http_model.GetProviceRequest) (*http_model.GetProviceResponse, error) {
+	db := GetReadDB(ctx)
+	var userInfo []gorm_model.PlatformKuaishouUserInfo
+	// 从数据库中获取所有 city 字段的数据
+	err := db.Model(&gorm_model.PlatformKuaishouUserInfo{}).Pluck("city", &userInfo).Error
+	if err != nil {
+		return nil, err
+	}
+
+	// 使用 map 来去重省份
+	provinceMap := make(map[string]struct{})
+	for _, user := range userInfo {
+		if user.City != "" {
+			// 按照空格分割 city 字段,取第一个部分作为省份
+			cityParts := strings.Split(user.City, " ")
+			if len(cityParts) > 0 {
+				provinceMap[cityParts[0]] = struct{}{} // 使用空结构体来去重
+			}
+		}
+	}
+
+	// 将 map 中的省份名称放入切片
+	var provinces []string
+	for province := range provinceMap {
+		provinces = append(provinces, province)
+	}
+
+	// 返回省份列表
+	return &http_model.GetProviceResponse{
+		Provices: provinces,
+	}, nil
+}

+ 420 - 55
db/project_task.go

@@ -13,6 +13,66 @@ import (
 	"youngee_b_api/model/http_model"
 )
 
+func GetRecruittime(ctx context.Context, request http_model.GetRecruitTimeRequest) (*http_model.GetRecruitTimeResponse, error) {
+	db := GetReadDB(ctx)
+	var info gorm_model.ProjectInfo
+	err := db.Model(&gorm_model.ProjectInfo{}).Where("project_id = ?", request.ProjectId).Find(&info).Error
+	var result http_model.GetRecruitTimeResponse
+	if err != nil {
+		return &result, err
+	}
+	result.RecruitTime = info.RecruitDdl.Format("2006-01-02 15:04:05")
+	return &result, nil
+}
+
+func GetTalentstatusCount(db *gorm.DB, request http_model.GetTalentstatusNumRequest, status int) (int64, error) {
+	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_status = ?", request.ProjectId, status)
+
+	// 计算总数
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+}
+
+func GetTalentstatusNum(db *gorm.DB, request http_model.GetTalentstatusCountRequest, status int) (int64, error) {
+	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, status)
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+}
+
+func GetTalentstatusCountNum(ctx context.Context, request http_model.GetTalentstatusCountRequest) (*http_model.GetTalentstatusCountResponse, error) {
+	db := GetReadDB(ctx)
+	var unoperatenum, agreetalentnum, refusetalentnum int64
+	unoperatenum, _ = GetTalentstatusNum(db, request, request.TaskStage)
+	agreetalentnum, _ = GetTalentstatusNum(db, request, request.TaskStage+1)
+	refusetalentnum, _ = GetTalentstatusNum(db, request, request.TaskStage+2)
+	count := &http_model.GetTalentstatusCountResponse{
+		UnoperateTalentnum: unoperatenum,
+		AgreeTalentnum:     agreetalentnum,
+		RefuseTalentnum:    refusetalentnum,
+	}
+	return count, nil
+}
+
+func GetTalentstatusNumCount(ctx context.Context, request http_model.GetTalentstatusNumRequest) (*http_model.GetTalentStatusNumResponse, error) {
+	db := GetReadDB(ctx)
+	var unoperatenum, agreetalentnum, refusetalentnum int64
+	unoperatenum, _ = GetTalentstatusCount(db, request, 1)
+	agreetalentnum, _ = GetTalentstatusCount(db, request, 2)
+	refusetalentnum, _ = GetTalentstatusCount(db, request, 3)
+	count := &http_model.GetTalentStatusNumResponse{
+		UnoperateTalentnum: unoperatenum,
+		AgreeTalentnum:     agreetalentnum,
+		RefuseTalentnum:    refusetalentnum,
+	}
+	return count, nil
+}
+
 func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListRequest) (*http_model.GetTaskListData, error) {
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
@@ -48,6 +108,42 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 	}
 	offset := (pageNum - 1) * pageSize
 
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	// 执行分页查询
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
@@ -65,24 +161,28 @@ func GetProjecttaskList(ctx context.Context, request http_model.GetTaskListReque
 			Time = task.CompleteDate
 		}
 		boperator := getBOperator(db, task.BOperator, task.BOperatorType)
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterPriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		response := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0, //暂时获取不到
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			Boperator:          boperator,
-			CreateAt:           Time,
+			CreateAt:           Time.Format("2006-01-02 15:04:05"),
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			Sprojectid:         task.SprojectId,
@@ -121,12 +221,13 @@ func getBOperator(db *gorm.DB, bOperatorID string, bOperatorType int) string {
 	return ""
 }
 
-func getTalentinfo(db *gorm.DB, talentID string) (string, string) {
+func getTalentinfo(db *gorm.DB, OpenId string) (string, string, string, int, int) {
 	var talentinfo gorm_model.PlatformKuaishouUserInfo
-	if err := db.Where(gorm_model.PlatformKuaishouUserInfo{TalentId: talentID}).First(&talentinfo).Error; err != nil {
-		return "", ""
+	if err := db.Where(gorm_model.PlatformKuaishouUserInfo{OpenId: OpenId}).First(&talentinfo).Error; err != nil {
+		return "", "", "", 0, 0
 	}
-	return talentinfo.NickName, talentinfo.HeadUri
+	fan, _ := conv.Int(talentinfo.Fan)
+	return talentinfo.NickName, talentinfo.HeadUri, talentinfo.Gender, fan, talentinfo.LikeNum
 }
 
 func getIscoop(db *gorm.DB, talentid string, enterpriseid string) int {
@@ -144,24 +245,22 @@ func determineFrom(supplierID, supplierStatus int) int {
 	return 1
 }
 
-func stype(db *gorm.DB, supplierID, supplierStatus int) int {
+func stype(db *gorm.DB, supplierID, supplierStatus int) (int, string) {
 	if supplierID != 0 && supplierStatus == 2 {
 		var supplierinfo gorm_model.Supplier
 		err := db.Model(gorm_model.Supplier{}).Where("supplier_id = ?", supplierID).First(&supplierinfo).Error
 		if err != nil {
-			return 0
+			return 0, "公海"
 		}
-		return supplierinfo.SupplierType
+		return supplierinfo.SupplierType, supplierinfo.SupplierName
 	}
-	return 0
+	return 0, "公海"
 }
 func PassProTaskCoop(ctx context.Context, projectId string, taskIds []string, operatorid string, operatetype int, Isspecial int, req http_model.PassproTaskCoopRequest) (bool, error) {
 	db := GetReadDB(ctx)
 	var count int64
-	fmt.Println("task_ids: ", taskIds)
 	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id IN ? AND task_stage = 1", taskIds).Count(&count).Error
 
-	fmt.Println("count: ", count)
 	if err != nil {
 		return false, err
 	}
@@ -380,6 +479,11 @@ func GetPreSketchList(ctx context.Context, request http_model.PreSketchListReque
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -397,35 +501,75 @@ func GetPreSketchList(ctx context.Context, request http_model.PreSketchListReque
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.TasksketchInfo, 0, len(projecrtaskinfo))
 
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.TasksketchInfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -440,6 +584,11 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.ScriptStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -457,26 +606,66 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.Tasksketchinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			City:               task.City,
 		}
@@ -489,8 +678,8 @@ func GetSketchList(ctx context.Context, request http_model.TasksketchlistRequest
 		response := &http_model.Tasksketchinfo{
 			Task:     taskinfo,
 			SketchId: sketchinfo.SketchID,
-			SubmitAt: sketchinfo.SubmitAt,
-			AgreeAt:  sketchinfo.AgreeAt,
+			SubmitAt: sketchinfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:  sketchinfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			Operator: boperator,
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
@@ -506,6 +695,11 @@ func GetPreLinkList(ctx context.Context, request http_model.PreLinkListRequest)
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -523,34 +717,74 @@ func GetPreLinkList(ctx context.Context, request http_model.PreLinkListRequest)
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.Tasklinkinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.Tasklinkinfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -565,6 +799,11 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.LinkStatus)
+
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
+
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -582,27 +821,67 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.TaskLinkinfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			City:               task.City,
@@ -616,8 +895,8 @@ func GetLinkList(ctx context.Context, request http_model.TaskLinklistRequest) (*
 		response := &http_model.TaskLinkinfo{
 			Task:     taskinfo,
 			LinkId:   linkinfo.LinkID,
-			SubmitAt: linkinfo.SubmitAt,
-			AgreeAt:  linkinfo.AgreeAt,
+			SubmitAt: linkinfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:  linkinfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			LinkUrl:  linkinfo.LinkUrl,
 			PhotoUrl: linkinfo.PhotoUrl,
 			Operator: boperator,
@@ -635,6 +914,9 @@ func GetPreDataList(ctx context.Context, request http_model.PreDataListRequest)
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -652,34 +934,74 @@ func GetPreDataList(ctx context.Context, request http_model.PreDataListRequest)
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.Taskdatainfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			City:               task.City,
 		}
 		response := &http_model.Taskdatainfo{
 			Task: taskinfo,
-			DDl:  task.CurBreakAt,
+			DDl:  task.CurBreakAt.Format("2006-01-02 15:04:05"),
 		}
 		taskInfoPointers = append(taskInfoPointers, response)
 
@@ -694,6 +1016,9 @@ func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*
 	db := GetReadDB(ctx)
 	var projecrtaskinfo []gorm_model.YoungeeTaskInfo
 	query := db.Model(&gorm_model.YoungeeTaskInfo{}).Where("project_id = ? AND task_stage = ?", request.ProjectId, request.DataStatus)
+	if request.Others != "" {
+		query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
+	}
 	// 计算总数
 	var total int64
 	if err := query.Count(&total).Error; err != nil {
@@ -711,27 +1036,67 @@ func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*
 	}
 	offset := (pageNum - 1) * pageSize
 	// 执行分页查询
+	// 处理多字段排序逻辑
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			field := request.SortField[i]
+			order := request.SortOrder[i]
+			switch field {
+			case "fansnum":
+				if order == "asc" {
+					query = query.Order("fans_num asc")
+				} else {
+					query = query.Order("fans_num desc")
+				}
+			case "voteavg":
+				if order == "asc" {
+					query = query.Order("vote_avg asc")
+				} else {
+					query = query.Order("vote_avg desc")
+				}
+			case "commentavg":
+				if order == "asc" {
+					query = query.Order("commit_avg asc")
+				} else {
+					query = query.Order("commit_avg desc")
+				}
+			case "collectnum":
+				if order == "asc" {
+					query = query.Order("view_num asc")
+				} else {
+					query = query.Order("view_num desc")
+				}
+			}
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("task_status asc").Order("task_stage asc")
+	}
 	if err := query.Offset(offset).Limit(pageSize).Find(&projecrtaskinfo).Error; err != nil {
 		return nil, err
 	}
 	taskInfoPointers := make([]*http_model.TaskDatainfo, 0, len(projecrtaskinfo))
 	for _, task := range projecrtaskinfo {
-		nickname, headurl := getTalentinfo(db, task.TalentID)
+		nickname, headurl, gender, fansnum, voteavg := getTalentinfo(db, task.OpenId)
 		Iscoop := getIscoop(db, task.TalentID, request.EnterpriseId)
+		s_type, s_name := stype(db, task.SupplierId, task.SupplierStatus)
 		taskinfo := &http_model.TaskInfo{
 			TaskId:             task.TaskID,
 			ProjectId:          task.ProjectID,
 			TalentId:           task.TalentID,
-			FansNum:            task.FansNum,
+			FansNum:            fansnum,
 			DraftFee:           task.DraftFee,
-			Voteavg:            task.VoteAvg,
+			Voteavg:            voteavg,
 			FeeFrom:            task.FeeForm,
 			TaskStage:          task.TaskStage,
-			Commentavg:         task.CommitAvg,
+			Commentavg:         0,
+			CollectNum:         0,
 			CurrentDefaultType: task.CurDefaultType,
 			From:               determineFrom(task.SupplierId, task.SupplierStatus),
-			SType:              stype(db, task.SupplierId, task.SupplierStatus),
+			SType:              s_type,
+			SName:              s_name,
 			NickName:           nickname,
+			Gender:             gender,
 			HeadUrl:            headurl,
 			ISCoop:             Iscoop,
 			City:               task.City,
@@ -745,8 +1110,8 @@ func GetDataList(ctx context.Context, request http_model.TaskDatalistRequest) (*
 		response := &http_model.TaskDatainfo{
 			Task:          taskinfo,
 			DataId:        datainfo.DataID,
-			SubmitAt:      datainfo.SubmitAt,
-			AgreeAt:       datainfo.AgreeAt,
+			SubmitAt:      datainfo.SubmitAt.Format("2006-01-02 15:04:05"),
+			AgreeAt:       datainfo.AgreeAt.Format("2006-01-02 15:04:05"),
 			PhotoUrl:      datainfo.PhotoUrl,
 			PlayNumber:    datainfo.PlayNumber,
 			LikeNumber:    datainfo.LikeNumber,

+ 2 - 2
db/sub_account.go

@@ -56,11 +56,11 @@ func FindSubAccountByPhone(ctx context.Context, phone string) (*gorm_model.Young
 }
 
 // FindSubAccountByEnterpriseId 根据商家ID查找包含的所有子账号信息
-func FindSubAccountByEnterpriseId(ctx context.Context, enterpriseId string) ([]*gorm_model.YounggeeSubAccount, int64, error) {
+func FindSubAccountByEnterpriseId(ctx context.Context, enterpriseId string, jobId int, accountStatus int) ([]*gorm_model.YounggeeSubAccount, int64, error) {
 	db := GetReadDB(ctx)
 	var total int64
 	var subAccount []*gorm_model.YounggeeSubAccount
-	whereCondition := gorm_model.YounggeeSubAccount{EnterpriseId: enterpriseId, SubAccountType: 1}
+	whereCondition := gorm_model.YounggeeSubAccount{EnterpriseId: enterpriseId, SubAccountType: 1, JobId: jobId, AccountStatus: accountStatus}
 	err := db.Model(gorm_model.YounggeeSubAccount{}).Where(whereCondition).Find(&subAccount).Count(&total).Error
 	if err != nil {
 		return nil, 0, err

+ 345 - 0
db/talent.go

@@ -0,0 +1,345 @@
+package db
+
+import (
+	"context"
+	"github.com/issue9/conv"
+	"gorm.io/gorm"
+	"youngee_b_api/model/gorm_model"
+	"youngee_b_api/model/http_model"
+)
+
+func GetGoodstalentList(ctx context.Context, request http_model.GetGoodsTalentRequest) (*http_model.GetGoodsTalentListData, error) {
+	db := GetReadDB(ctx)
+
+	// 存储达人信息
+	var etcoopinfo []gorm_model.EnterpriseTalentCooperate
+	query := db.Model(&gorm_model.EnterpriseTalentCooperate{}).Where("enterprise_id = ? AND cooperate_type = ?", request.EnterpriseId, 1)
+
+	// 根据平台筛选
+	if request.Platform != nil {
+		query.Where("platform = ?", request.Platform)
+	}
+
+	// 根据达人名称筛选
+	if request.TalentName != "" {
+		query = query.Where("talent_name LIKE ?", "%"+request.TalentName+"%")
+	}
+
+	if request.Productcategory != nil {
+		query = query.Where("FIND_IN_SET(?, product_category) > 0", request.Productcategory)
+	}
+	// 获取相关的销量信息,可以通过join连接platform_kuaishou_user_info表
+	query = query.Joins("JOIN platform_kuaishou_user_info pkui ON pkui.id = enterprise_talent_cooperate.platform_user_id")
+
+	// 根据30天销量区间筛选
+	if request.SalesRange != nil {
+		if *request.SalesRange == "0-30" {
+			query = query.Where("pkui.sale_num_30day BETWEEN ? AND ?", 0, 30)
+		} else if *request.SalesRange == "30-100" {
+			query = query.Where("pkui.sale_num_30day BETWEEN ? AND ?", 30, 100)
+		} else if *request.SalesRange == "100+" {
+			query = query.Where("pkui.sale_num_30day > ?", 100)
+		}
+	}
+
+	// 根据排序字段和排序顺序进行排序
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			sortField := request.SortField[i]
+			sortOrder := request.SortOrder[i]
+			switch sortField {
+			case "fan":
+				if sortOrder == "asc" {
+					query = query.Order("fan asc")
+				} else {
+					query = query.Order("fan desc")
+				}
+
+			case "sale_num_30day":
+				if sortOrder == "asc" {
+					query = query.Order("sale_num_30day asc")
+				} else {
+					query = query.Order("sale_num_30day desc")
+				}
+
+			case "sale_num_total":
+				if sortOrder == "asc" {
+					query = query.Order("sale_num_total asc")
+				} else {
+					query = query.Order("sale_num_total desc")
+				}
+
+			case "cooperate_num":
+				if sortOrder == "asc" {
+					query = query.Order("cooperate_num asc")
+				} else {
+					query = query.Order("cooperate_num desc")
+				}
+			}
+
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("create_at asc")
+	}
+
+	// 分页查询
+	offset := (request.PageNum - 1) * request.PageSize
+	query = query.Limit(request.PageSize).Offset(offset)
+
+	// 执行查询
+	if err := query.Find(&etcoopinfo).Error; err != nil {
+		return nil, err
+	}
+
+	// 生成返回的数据
+	result := &http_model.GetGoodsTalentListData{
+		Total:      conv.MustString(len(etcoopinfo), ""),
+		TalentList: make([]*http_model.GoodsTalentInfo, 0),
+	}
+
+	for _, item := range etcoopinfo {
+
+		var salesInfo gorm_model.PlatformKuaishouUserInfo
+		if err := db.Where("id = ?", item.PlatformUserID).First(&salesInfo).Error; err != nil {
+			return nil, err
+		}
+		fans, _ := conv.Int(salesInfo.Fan)
+		result.TalentList = append(result.TalentList, &http_model.GoodsTalentInfo{
+			TalentId:    item.TalentId,
+			Nickname:    item.TalentName,
+			City:        salesInfo.City,
+			HeadUrl:     salesInfo.HeadUri,
+			FansNum:     fans,
+			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
+			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
+			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
+			AccCoopTime: item.CooperateNum,
+			FirCoopFrom: "公海",
+		})
+	}
+
+	return result, nil
+}
+
+func GetProjecttalentList(ctx context.Context, request http_model.GetProjectTalentRequest) (*http_model.GetProjectTalentListData, error) {
+	db := GetReadDB(ctx)
+	// 存储达人信息
+	var etcoopinfo []gorm_model.EnterpriseTalentCooperate
+	query := db.Model(&gorm_model.EnterpriseTalentCooperate{}).Where("enterprise_id = ? AND cooperate_type = ?", request.EnterpriseId, 2)
+
+	// 根据平台筛选
+	if request.Platform != nil {
+		query.Where("platform = ?", request.Platform)
+	}
+
+	// 根据达人名称筛选
+	if request.TalentName != "" {
+		query = query.Where("talent_name LIKE ?", "%"+request.TalentName+"%")
+	}
+
+	// 获取相关的销量信息,可以通过join连接platform_kuaishou_user_info表
+	query = query.Joins("JOIN platform_kuaishou_user_info pkui ON pkui.id = enterprise_talent_cooperate.platform_user_id")
+
+	// 根据排序字段和排序顺序进行排序
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			sortField := request.SortField[i]
+			sortOrder := request.SortOrder[i]
+			switch sortField {
+			case "fan":
+				if sortOrder == "asc" {
+					query = query.Order("fan asc")
+				} else {
+					query = query.Order("fan desc")
+				}
+
+			case "like_num":
+				if sortOrder == "asc" {
+					query = query.Order("like_num asc")
+				} else {
+					query = query.Order("like_num desc")
+				}
+
+			case "sale_num_total":
+				if sortOrder == "asc" {
+					query = query.Order("sale_num_total asc")
+				} else {
+					query = query.Order("sale_num_total desc")
+				}
+
+			case "cooperate_num":
+				if sortOrder == "asc" {
+					query = query.Order("cooperate_num asc")
+				} else {
+					query = query.Order("cooperate_num desc")
+				}
+			}
+
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("create_at asc")
+	}
+
+	// 分页查询
+	offset := (request.PageNum - 1) * request.PageSize
+	query = query.Limit(request.PageSize).Offset(offset)
+
+	// 执行查询
+	if err := query.Find(&etcoopinfo).Error; err != nil {
+		return nil, err
+	}
+
+	// 生成返回的数据
+	result := &http_model.GetProjectTalentListData{
+		Total:      conv.MustString(len(etcoopinfo), ""),
+		TalentList: make([]*http_model.ProjectTalentInfo, 0),
+	}
+
+	for _, item := range etcoopinfo {
+
+		var salesInfo gorm_model.PlatformKuaishouUserInfo
+		if err := db.Where("id = ?", item.PlatformUserID).First(&salesInfo).Error; err != nil {
+			return nil, err
+		}
+		fans, _ := conv.Int(salesInfo.Fan)
+		result.TalentList = append(result.TalentList, &http_model.ProjectTalentInfo{
+			TalentId:    item.TalentId,
+			Nickname:    item.TalentName,
+			City:        salesInfo.City,
+			HeadUrl:     salesInfo.HeadUri,
+			FansNum:     fans,
+			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
+			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
+			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
+			AccCoopTime: item.CooperateNum,
+			FirCoopFrom: "公海",
+		})
+	}
+
+	return result, nil
+}
+
+func GetLocallifetalentList(ctx context.Context, request http_model.GetLocallifeTalentRequest) (*http_model.GetLocallifeTalentListData, error) {
+	db := GetReadDB(ctx)
+	// 存储达人信息
+	var etcoopinfo []gorm_model.EnterpriseTalentCooperate
+	query := db.Model(&gorm_model.EnterpriseTalentCooperate{}).Where("enterprise_id = ? AND cooperate_type = ?", request.EnterpriseId, 2)
+
+	// 根据平台筛选
+	if request.Platform != nil {
+		query.Where("platform = ?", request.Platform)
+	}
+
+	// 根据达人名称筛选
+	if request.TalentName != "" {
+		query = query.Where("talent_name LIKE ?", "%"+request.TalentName+"%")
+	}
+
+	// 获取相关的销量信息,可以通过join连接platform_kuaishou_user_info表
+	query = query.Joins("JOIN platform_kuaishou_user_info pkui ON pkui.id = enterprise_talent_cooperate.platform_user_id")
+
+	// 根据排序字段和排序顺序进行排序
+	if len(request.SortField) > 0 && len(request.SortOrder) > 0 && len(request.SortField) == len(request.SortOrder) {
+		for i := 0; i < len(request.SortField); i++ {
+			sortField := request.SortField[i]
+			sortOrder := request.SortOrder[i]
+			switch sortField {
+			case "fan":
+				if sortOrder == "asc" {
+					query = query.Order("fan asc")
+				} else {
+					query = query.Order("fan desc")
+				}
+
+			case "like_num":
+				if sortOrder == "asc" {
+					query = query.Order("like_num asc")
+				} else {
+					query = query.Order("like_num desc")
+				}
+
+			case "sale_num_total":
+				if sortOrder == "asc" {
+					query = query.Order("sale_num_total asc")
+				} else {
+					query = query.Order("sale_num_total desc")
+				}
+
+			case "cooperate_num":
+				if sortOrder == "asc" {
+					query = query.Order("cooperate_num asc")
+				} else {
+					query = query.Order("cooperate_num desc")
+				}
+			}
+
+		}
+	} else {
+		// Default sorting if no valid sort parameters
+		query = query.Order("create_at asc")
+	}
+
+	// 分页查询
+	offset := (request.PageNum - 1) * request.PageSize
+	query = query.Limit(request.PageSize).Offset(offset)
+
+	// 执行查询
+	if err := query.Find(&etcoopinfo).Error; err != nil {
+		return nil, err
+	}
+
+	// 生成返回的数据
+	result := &http_model.GetLocallifeTalentListData{
+		Total:      conv.MustString(len(etcoopinfo), ""),
+		TalentList: make([]*http_model.LocallifeTalentInfo, 0),
+	}
+
+	for _, item := range etcoopinfo {
+
+		var salesInfo gorm_model.PlatformKuaishouUserInfo
+		if err := db.Where("id = ?", item.PlatformUserID).First(&salesInfo).Error; err != nil {
+			return nil, err
+		}
+		fans, _ := conv.Int(salesInfo.Fan)
+		result.TalentList = append(result.TalentList, &http_model.LocallifeTalentInfo{
+			TalentId:    item.TalentId,
+			Nickname:    item.TalentName,
+			City:        salesInfo.City,
+			HeadUrl:     salesInfo.HeadUri,
+			FansNum:     fans,
+			ThirtySales: conv.MustString(salesInfo.SaleNum30Day, ""),
+			AccSales:    conv.MustString(salesInfo.SaleNum30Day, ""),
+			ActualSales: conv.MustString(salesInfo.SaleNumTotal, ""),
+			AccCoopTime: item.CooperateNum,
+			FirCoopFrom: "公海",
+		})
+	}
+
+	return result, nil
+}
+
+func GetTalentNum(ctx context.Context, request http_model.GetTalentNumRequest) (*http_model.GetTalentNumResponse, error) {
+	db := GetReadDB(ctx)
+	var sectalent, projtalent, localtalent int64
+	sectalent, _ = GetTalentnum(db, request, 1)
+	projtalent, _ = GetTalentnum(db, request, 2)
+	localtalent, _ = GetTalentnum(db, request, 3)
+	count := &http_model.GetTalentNumResponse{
+		SecTalentnum:     sectalent,
+		ProjectTalentnum: projtalent,
+		LocalTalentnum:   localtalent,
+	}
+	return count, nil
+}
+
+func GetTalentnum(db *gorm.DB, request http_model.GetTalentNumRequest, cooptype int) (int64, error) {
+	query := db.Model(&gorm_model.EnterpriseTalentCooperate{}).Where("enterprise_id = ? AND cooperate_type = ?", request.EnterpriseId, cooptype)
+	var total int64
+	if err := query.Count(&total).Error; err != nil {
+		return 0, err
+	}
+	return total, nil
+
+}

+ 60 - 0
handler/gatlocaltalentstatuscountnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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/getgoodstalent.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_api/util"
+)
+
+func WrapGetGoodsTalentHandler(ctx *gin.Context) {
+	handler := newGetGoodsTalentHandler(ctx)
+	baseRun(handler)
+}
+
+type GetGoodsTalent struct {
+	ctx  *gin.Context
+	req  *http_model.GetGoodsTalentRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetGoodsTalent) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetGoodsTalent) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetGoodsTalent) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetGoodsTalent) run() {
+	data := http_model.GetGoodsTalentRequest{}
+	data = *c.req
+	res, err := service.Talent.GetGoodsTalentList(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetGoodsTalentList] call GetGoodsTalentList err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorParamCheck, "")
+		logrus.Info("GetGoodsTalentList fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询带货达人"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetGoodsTalent) checkParam() error {
+	return nil
+}
+
+func newGetGoodsTalentHandler(ctx *gin.Context) *GetGoodsTalent {
+	return &GetGoodsTalent{
+		ctx:  ctx,
+		req:  http_model.NewGetGoodsTalentRequest(),
+		resp: http_model.NewGetGoodsTalentResponse(),
+	}
+}

+ 60 - 0
handler/getlocallife.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_api/util"
+)
+
+func WrapGetLocallifeTalentHandler(ctx *gin.Context) {
+	handler := newGetLocallifeTalentHandler(ctx)
+	baseRun(handler)
+}
+
+type GetLocallifeTalent struct {
+	ctx  *gin.Context
+	req  *http_model.GetLocallifeTalentRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetLocallifeTalent) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetLocallifeTalent) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetLocallifeTalent) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetLocallifeTalent) run() {
+	data := http_model.GetLocallifeTalentRequest{}
+	data = *c.req
+	res, err := service.Talent.GetLocallifeTalentList(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetLocallifeTalentList] call GetLocallifeTalentList err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorParamCheck, "")
+		logrus.Info("GetLocallifeTalentList fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询本地生活达人"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetLocallifeTalent) checkParam() error {
+	return nil
+}
+
+func newGetLocallifeTalentHandler(ctx *gin.Context) *GetLocallifeTalent {
+	return &GetLocallifeTalent{
+		ctx:  ctx,
+		req:  http_model.NewGetLocallifeTalentRequest(),
+		resp: http_model.NewGetLocallifeTalentResponse(),
+	}
+}

+ 60 - 0
handler/getlocalrecruittime.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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/getlocaltalentstatusnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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/getprojecttalent.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_api/util"
+)
+
+func WrapGetProjectTalentHandler(ctx *gin.Context) {
+	handler := newGetProjectTalentHandler(ctx)
+	baseRun(handler)
+}
+
+type GetProjectTalent struct {
+	ctx  *gin.Context
+	req  *http_model.GetProjectTalentRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetProjectTalent) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetProjectTalent) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetProjectTalent) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetProjectTalent) run() {
+	data := http_model.GetProjectTalentRequest{}
+	data = *c.req
+	res, err := service.Talent.GetProjectTalentList(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetProjectTalentList] call GetProjectTalentList err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorParamCheck, "")
+		logrus.Info("GetProjectTalentList fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询种草达人"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetProjectTalent) checkParam() error {
+	return nil
+}
+
+func newGetProjectTalentHandler(ctx *gin.Context) *GetProjectTalent {
+	return &GetProjectTalent{
+		ctx:  ctx,
+		req:  http_model.NewGetProjectTalentRequest(),
+		resp: http_model.NewGetProjectTalentResponse(),
+	}
+}

+ 60 - 0
handler/getprovince.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/db"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/util"
+)
+
+func WrapGetProviceHandler(ctx *gin.Context) {
+	handler := newGetProviceHandler(ctx)
+	baseRun(handler)
+}
+
+type GetProvice struct {
+	ctx  *gin.Context
+	req  *http_model.GetProviceRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetProvice) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetProvice) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetProvice) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetProvice) run() {
+	data := http_model.GetProviceRequest{}
+	data = *c.req
+	res, err := db.GetProvince(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetProvice] call GetProvice err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorParamCheck, "")
+		logrus.Info("GetProvice fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人省份"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetProvice) checkParam() error {
+	return nil
+}
+
+func newGetProviceHandler(ctx *gin.Context) *GetProvice {
+	return &GetProvice{
+		ctx:  ctx,
+		req:  http_model.NewGetProviceRequest(),
+		resp: http_model.NewGetProviceResponse(),
+	}
+}

+ 60 - 0
handler/getrecruittime.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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/gettalentnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/db"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/util"
+)
+
+func WrapGetTalentNumHandler(ctx *gin.Context) {
+	handler := newGetTalentNumHandler(ctx)
+	baseRun(handler)
+}
+
+type GetTalentNum struct {
+	ctx  *gin.Context
+	req  *http_model.GetTalentNumRequest
+	resp *http_model.CommonResponse
+}
+
+func (c GetTalentNum) getContext() *gin.Context {
+	return c.ctx
+}
+
+func (c GetTalentNum) getResponse() interface{} {
+	return c.resp
+}
+
+func (c GetTalentNum) getRequest() interface{} {
+	return c.req
+}
+
+func (c GetTalentNum) run() {
+	data := http_model.GetTalentNumRequest{}
+	data = *c.req
+	res, err := db.GetTalentNum(c.ctx, data)
+	if err != nil {
+		logrus.Errorf("[GetTalentNum] call GetTalentNum err:%+v\n", err)
+		util.HandlerPackErrorResp(c.resp, consts.ErrorParamCheck, "")
+		logrus.Info("GetTalentNum fail,req:%+v", c.req)
+		return
+	}
+	c.resp.Message = "成功查询达人数量"
+	c.resp.Data = res
+	c.resp.Status = consts.ErrorSuccess
+}
+
+func (c GetTalentNum) checkParam() error {
+	return nil
+}
+
+func newGetTalentNumHandler(ctx *gin.Context) *GetTalentNum {
+	return &GetTalentNum{
+		ctx:  ctx,
+		req:  http_model.NewGetTalentNumRequest(),
+		resp: http_model.NewGetTalentNumResponse(),
+	}
+}

+ 60 - 0
handler/gettalentstatuscountnum.go

@@ -0,0 +1,60 @@
+package handler
+
+import (
+	"github.com/gin-gonic/gin"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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_b_api/consts"
+	"youngee_b_api/model/http_model"
+	"youngee_b_api/service"
+	"youngee_b_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.ErrorParamCheck, "")
+		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(),
+	}
+}

+ 16 - 7
model/gorm_model/enterprise_talent_cooperate.go

@@ -1,13 +1,22 @@
 package gorm_model
 
+import "time"
+
 type EnterpriseTalentCooperate struct {
-	CooperateId   int    `gorm:"column:cooperate_id;type:int(11);primary_key;AUTO_INCREMENT;comment:主键ID" json:"cooperate_id"`
-	EnterpriseId  string `gorm:"column:enterprise_id;type:varchar(255);comment:商家ID" json:"enterprise_id"`
-	TalentId      string `gorm:"column:talent_id;type:varchar(255);comment:达人ID" json:"talent_id"`
-	SupplierId    int    `gorm:"column:supplier_id;type:int(11);comment:服务商ID" json:"supplier_id"`
-	TalentOrigin  int    `gorm:"column:talent_origin;type:int(11);comment:达人来源,1公海,2服务商" json:"talent_origin"`
-	CooperateType int    `gorm:"column:cooperate_type;type:int(11);comment:合作关系类型,1带货达人,2种草达人,3本地生活达人" json:"cooperate_type"`
-	CooperateNum  int    `gorm:"column:cooperate_num;type:int(11);comment:累计合作次数" json:"cooperate_num"`
+	CooperateId    int       `gorm:"column:cooperate_id;type:int(11);primary_key;AUTO_INCREMENT;comment:主键ID" json:"cooperate_id"`
+	EnterpriseId   string    `gorm:"column:enterprise_id;type:varchar(255);comment:商家ID" json:"enterprise_id"`
+	TalentId       string    `gorm:"column:talent_id;type:varchar(255);comment:达人ID" json:"talent_id"`
+	SupplierId     int       `gorm:"column:supplier_id;type:int(11);comment:服务商ID" json:"supplier_id"`
+	TalentOrigin   int       `gorm:"column:talent_origin;type:int(11);comment:达人来源,1公海,2服务商" json:"talent_origin"`
+	CooperateType  int       `gorm:"column:cooperate_type;type:int(11);comment:合作关系类型,1带货达人,2种草达人,3本地生活达人" json:"cooperate_type"`
+	CooperateNum   int       `gorm:"column:cooperate_num;type:int(11);comment:累计合作次数" json:"cooperate_num"`
+	SecTaskID      string    `gorm:"column:sec_task_id"`      // 带货子任务ID
+	ProjectTaskID  string    `gorm:"column:project_task_id"`  // 种草子任务ID
+	LocalTaskID    string    `gorm:"column:local_task_id"`    // 本地生活子任务ID
+	Platform       int       `gorm:"column:platform"`         // 平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	PlatformUserID int       `gorm:"column:platform_user_id"` // 第三方平台ID
+	CreateAt       time.Time `gorm:"column:create_at"`        // 创建时间
+	TalentName     string    `gorm:"column:talent_name"`
 }
 
 func (m *EnterpriseTalentCooperate) TableName() string {

+ 2 - 0
model/gorm_model/locallife_task_info.go

@@ -79,6 +79,8 @@ 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"` //提报达人服务商名称
+	TalentName             string    `gorm:"column:talent_name"`
 }
 
 func (m *YoungeeLocalTaskInfo) TableName() string {

+ 3 - 1
model/gorm_model/project_task.go

@@ -71,7 +71,9 @@ 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"` //报名达人的所在城市
+	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"`                                                              //达人昵称
 }
 
 func (m *YoungeeTaskInfo) TableName() string {

+ 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 {

+ 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_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 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 {

+ 6 - 1
model/http_model/find_all_sub_account.go

@@ -1,7 +1,11 @@
 package http_model
 
 type FindAllSubAccountRequest struct {
-	EnterpriseId string `json:"enterprise_id"` // 子账号属于的企业id
+	PageSize      int64  `json:"page_size"`
+	PageNum       int64  `json:"page_num"`
+	EnterpriseId  string `json:"enterprise_id"`  // 子账号属于的企业id
+	JobId         int    `json:"job_id"`         // 岗位ID
+	AccountStatus int    `json:"account_status"` // 账号状态,1为正常,2为停用
 }
 
 type FindAllSubAccountInfo struct {
@@ -11,6 +15,7 @@ type FindAllSubAccountInfo struct {
 	JobId          int    `json:"job_id"`           // 岗位ID
 	JobName        string `json:"job_name"`         // 岗位名称
 	EnterpriseId   string `json:"enterprise_id"`    // 所属商家账号ID
+	EnterpriseName string `json:"enterprise_name"`  // 创建人名称
 	AccountStatus  int    `json:"account_status"`   // 账号状态,1为正常,2为停用
 	UserId         int    `json:"user_id"`          // 用户表中ID
 }

+ 41 - 0
model/http_model/getgoodstalentrequest.go

@@ -0,0 +1,41 @@
+package http_model
+
+type GetGoodsTalentRequest struct {
+	PageSize        int      `json:"page_size"`
+	PageNum         int      `json:"page_num"`
+	SortField       []string `json:"sort_field,omitempty"`
+	SortOrder       []string `json:"sort_order,omitempty"` //粉丝数,实际带货销量,近30天销量,累计合作次数
+	SalesRange      *string  `json:"sales_range,omitempty"`
+	Platform        *int     `json:"platform,omitempty"`
+	Productcategory *string  `json:"productcategory,omitempty"`
+	TalentName      string   `json:"talent_name,omitempty"`
+	EnterpriseId    string   `json:"enterprise_id"`
+}
+
+type GetGoodsTalentListData struct {
+	TalentList []*GoodsTalentInfo `json:"talent_list"`
+	Total      string             `json:"total"`
+}
+
+type GoodsTalentInfo struct {
+	TalentId    string `json:"talent_id"`
+	Nickname    string `json:"nickname"`
+	City        string `json:"city"`
+	HeadUrl     string `json:"head_url"`
+	FansNum     int    `json:"fans_num"`
+	ThirtySales string `json:"thirty_sales"`
+	AccSales    string `json:"acc_sales"`
+	ActualSales string `json:"actual_sales"`
+	AccCoopTime int    `json:"acc_coop_time"`
+	FirCoopFrom string `json:"fir_coop_from"`
+}
+
+func NewGetGoodsTalentRequest() *GetGoodsTalentRequest {
+	return new(GetGoodsTalentRequest)
+}
+
+func NewGetGoodsTalentResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetGoodsTalentListData)
+	return resp
+}

+ 39 - 0
model/http_model/getlocallifetalentrequest.go

@@ -0,0 +1,39 @@
+package http_model
+
+type GetLocallifeTalentRequest struct {
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page_num"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"` //粉丝数,实际带货销量,近30天销量,累计合作次数
+	Platform     *string  `json:"platform,omitempty"`
+	TalentName   string   `json:"talent_name"`
+	EnterpriseId string   `json:"enterprise_id"`
+}
+
+type GetLocallifeTalentListData struct {
+	TalentList []*LocallifeTalentInfo `json:"talent_list"`
+	Total      string                 `json:"total"`
+}
+
+type LocallifeTalentInfo struct {
+	TalentId    string `json:"talent_id"`
+	Nickname    string `json:"nickname"`
+	City        string `json:"city"`
+	HeadUrl     string `json:"head_url"`
+	FansNum     int    `json:"fans_num"`
+	ThirtySales string `json:"thirty_sales"`
+	AccSales    string `json:"acc_sales"`
+	ActualSales string `json:"actual_sales"`
+	AccCoopTime int    `json:"acc_coop_time"`
+	FirCoopFrom string `json:"fir_coop_from"`
+}
+
+func NewGetLocallifeTalentRequest() *GetLocallifeTalentRequest {
+	return new(GetLocallifeTalentRequest)
+}
+
+func NewGetLocallifeTalentResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetLocallifeTalentListData)
+	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
+}

+ 19 - 16
model/http_model/getlocaltasklist.go

@@ -1,16 +1,16 @@
 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_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"`
+	SortField      []string `json:"sort_field,omitempty"`
+	SortOrder      []string `json:"sort_order,omitempty"`
 }
 
 type GetLocalTaskListData struct {
@@ -28,17 +28,20 @@ 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"`
 }
 
 func NewGetLocalTaskListRequest() *GetLocalTaskListRequest {

+ 39 - 0
model/http_model/getprojecttalentrequest.go

@@ -0,0 +1,39 @@
+package http_model
+
+type GetProjectTalentRequest struct {
+	PageSize     int      `json:"page_size"`
+	PageNum      int      `json:"page_num"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"` //粉丝数,实际带货销量,近30天销量,累计合作次数
+	Platform     *string  `json:"platform,omitempty"`
+	TalentName   string   `json:"talent_name"`
+	EnterpriseId string   `json:"enterprise_id"`
+}
+
+type GetProjectTalentListData struct {
+	TalentList []*ProjectTalentInfo `json:"talent_list"`
+	Total      string               `json:"total"`
+}
+
+type ProjectTalentInfo struct {
+	TalentId    string `json:"talent_id"`
+	Nickname    string `json:"nickname"`
+	City        string `json:"city"`
+	HeadUrl     string `json:"head_url"`
+	FansNum     int    `json:"fans_num"`
+	ThirtySales string `json:"thirty_sales"`
+	AccSales    string `json:"acc_sales"`
+	ActualSales string `json:"actual_sales"`
+	AccCoopTime int    `json:"acc_coop_time"`
+	FirCoopFrom string `json:"fir_coop_from"`
+}
+
+func NewGetProjectTalentRequest() *GetProjectTalentRequest {
+	return new(GetProjectTalentRequest)
+}
+
+func NewGetProjectTalentResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetProjectTalentListData)
+	return resp
+}

+ 18 - 0
model/http_model/getprovincerequest.go

@@ -0,0 +1,18 @@
+package http_model
+
+type GetProviceRequest struct {
+}
+
+type GetProviceResponse struct {
+	Provices []string `json:"provinces"`
+}
+
+func NewGetProviceRequest() *GetProviceRequest {
+	return new(GetProviceRequest)
+}
+
+func NewGetProviceResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetProviceResponse)
+	return resp
+}

+ 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
+}

+ 19 - 0
model/http_model/getrlocalrecruittimerequest.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
+}

+ 21 - 0
model/http_model/gettalentnumrequest.go

@@ -0,0 +1,21 @@
+package http_model
+
+type GetTalentNumRequest struct {
+	EnterpriseId string `json:"enterpriseId"`
+}
+
+type GetTalentNumResponse struct {
+	SecTalentnum     int64 `json:"Sec_talentnum"`
+	ProjectTalentnum int64 `json:"project_talentnum"`
+	LocalTalentnum   int64 `json:"local_talentnum"`
+}
+
+func NewGetTalentNumRequest() *GetTalentNumRequest {
+	return new(GetTalentNumRequest)
+}
+
+func NewGetTalentNumResponse() *CommonResponse {
+	resp := new(CommonResponse)
+	resp.Data = new(GetTalentNumResponse)
+	return resp
+}

+ 22 - 0
model/http_model/gettalentstatuscountrequset.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
+}

+ 18 - 15
model/http_model/gettasklist.go

@@ -1,15 +1,15 @@
 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_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"`
+	SortField    []string `json:"sort_field,omitempty"`
+	SortOrder    []string `json:"sort_order,omitempty"`
 }
 
 type GetTaskListData struct {
@@ -27,17 +27,20 @@ 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"`
 }
 
 func NewGetTaskListRequest() *GetTaskListRequest {

+ 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_num"`
+	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 {

+ 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_num"`
+	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_num"`
+	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"`

+ 9 - 8
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_num"`
+	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 {
@@ -16,8 +17,8 @@ type GetsketchlocaltaskListData struct {
 
 type LocalTasksketchinfo 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"`
 	Operator string         `json:"operator"`
 	SketchId int            `json:"sketch_id"` //初稿ID
 }

+ 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_num"`
+	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_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 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 - 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_num"`
+	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_num"`
+	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"`

+ 9 - 8
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_num"`
+	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 {
@@ -16,8 +17,8 @@ type GetsketchtaskListData struct {
 
 type Tasksketchinfo 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"`
 	Operator string    `json:"operator"`
 	SketchId int       `json:"sketch_id"` //初稿ID
 }

+ 35 - 18
route/init.go

@@ -232,20 +232,23 @@ func InitRoute(r *gin.Engine) {
 		task.POST("/localLife/close", controller.TaskController{}.LocalLifeClose)                // 结束本地生活
 
 		// 招募中、执行中
-		task.POST("/project/getTasklist", handler.WrapGetTaskListHandler)            //种草招募中选达人列表/查名单
-		task.POST("/project/task/coop/pass", handler.WrapPassproTaskCoopHandler)     // 种草同意任务合作
-		task.POST("/project/task/coop/refuse", handler.WrapRefuseproTaskCoopHandler) // 种草拒绝任务合作
+		task.POST("/project/getrecuritddl", handler.WrapGetRecruitTimeHandler)          //本地生活招募截止时间
+		task.POST("/project/gettalentstatusnum", handler.WrapGetTalentstatusNumHandler) //达人状态数量
+		task.POST("/project/getTasklist", handler.WrapGetTaskListHandler)               //种草招募中选达人列表/查名单
+		task.POST("/project/task/coop/pass", handler.WrapPassproTaskCoopHandler)        // 种草同意任务合作
+		task.POST("/project/task/coop/refuse", handler.WrapRefuseproTaskCoopHandler)    // 种草拒绝任务合作
 
 		task.POST("/project/projectdata", handler.WrapProjectDataHandler) //种草看数据
 		task.POST("/project/endtask", handler.WrapEndTaskHandler)         //种草暂时终止
 
-		task.POST("/project/presketchlist", handler.WrapPreSketchListHandler)     //种草初稿待传列表
-		task.POST("/project/tasksketchlist", handler.WrapTasksketchlistHandler)   //种草初稿待审列表.审核通过
-		task.POST("/project/sketchopinion", handler.WrapSketchOpinionHandler)     //种草初稿审核意见提交
-		task.POST("/project/acceptsketch", handler.WrapAcceptSketchHandler)       //种草同意初稿
-		task.POST("/project/rejectsketch", handler.WrapRejectSketchHandler)       //种草拒绝初稿
-		task.POST("/project/findsketchphoto", handler.WrapFindSketchPhotoHandler) //种草查询脚本配图和视频demo
-		task.POST("/project/getsketchinfo", handler.WrapGetSketchInfoHandler)     //种草获取初稿
+		task.POST("/project/gettalentstatuscount", handler.WrapGetTalentstatusCountHandler) //达人状态统计
+		task.POST("/project/presketchlist", handler.WrapPreSketchListHandler)               //种草初稿待传列表
+		task.POST("/project/tasksketchlist", handler.WrapTasksketchlistHandler)             //种草初稿待审列表.审核通过
+		task.POST("/project/sketchopinion", handler.WrapSketchOpinionHandler)               //种草初稿审核意见提交
+		task.POST("/project/acceptsketch", handler.WrapAcceptSketchHandler)                 //种草同意初稿
+		task.POST("/project/rejectsketch", handler.WrapRejectSketchHandler)                 //种草拒绝初稿
+		task.POST("/project/findsketchphoto", handler.WrapFindSketchPhotoHandler)           //种草查询脚本配图和视频demo
+		task.POST("/project/getsketchinfo", handler.WrapGetSketchInfoHandler)               //种草获取初稿
 
 		task.POST("/project/prelinklist", handler.WrapPreLinkListHandler)   //种草待传链接列表
 		task.POST("/project/tasklinklist", handler.WrapTaskLinklistHandler) //种草链接待审列表,通过
@@ -262,17 +265,20 @@ func InitRoute(r *gin.Engine) {
 		task.POST("/project/executedata", handler.WrapExecuteDataHandler) //看数据
 		task.POST("/project/data", handler.WrapDataHandler)               //暂未
 
-		task.POST("/locallife/getTasklist", handler.WrapGetLocalTaskListHandler)         //本地生活招募中选大人列表/查名单
-		task.POST("/locallife/task/coop/pass", handler.WrapPasslocalTaskCoopHandler)     // 本地生活同意任务合作
-		task.POST("/locallife/task/coop/refuse", handler.WrapRefuselocalTaskCoopHandler) // 本地生活拒绝任务合作
+		task.POST("/locallife/getrecuritddl", handler.WrapGetLocalRecruitTimeHandler)          //本地生活招募截止时间
+		task.POST("/locallife/gettalentstatusnum", handler.WrapGetLocalTalentstatusNumHandler) //达人状态数量
+		task.POST("/locallife/getTasklist", handler.WrapGetLocalTaskListHandler)               //本地生活招募中选大人列表/查名单
+		task.POST("/locallife/task/coop/pass", handler.WrapPasslocalTaskCoopHandler)           // 本地生活同意任务合作
+		task.POST("/locallife/task/coop/refuse", handler.WrapRefuselocalTaskCoopHandler)       // 本地生活拒绝任务合作
 
 		task.POST("/locallife/locallifedata", handler.WrapLocallifeDataHandler) //本地看数据
 
-		task.POST("/locallife/presketchlist", handler.WrapLocalPreSketchListHandler)   //本地生活初稿待传列表
-		task.POST("/locallife/tasksketchlist", handler.WrapLocalTasksketchlistHandler) //本地生活初稿待审列表.审核通过
-		task.POST("/locallife/sketchopinion", handler.WrapLocalSketchOpinionHandler)   //本地生活初稿审核意见提交
-		task.POST("/locallife/acceptsketch", handler.WrapLocalAcceptSketchHandler)     //本地生活同意初稿
-		task.POST("/locallife/rejectsketch", handler.WrapLocalRejectSketchHandler)     //本地生活拒绝初稿
+		task.POST("/locallife/getlocaltalentstatuscount", handler.WrapGetLocalTalentstatusCountHandler) //达人状态统计
+		task.POST("/locallife/presketchlist", handler.WrapLocalPreSketchListHandler)                    //本地生活初稿待传列表
+		task.POST("/locallife/tasksketchlist", handler.WrapLocalTasksketchlistHandler)                  //本地生活初稿待审列表.审核通过
+		task.POST("/locallife/sketchopinion", handler.WrapLocalSketchOpinionHandler)                    //本地生活初稿审核意见提交
+		task.POST("/locallife/acceptsketch", handler.WrapLocalAcceptSketchHandler)                      //本地生活同意初稿
+		task.POST("/locallife/rejectsketch", handler.WrapLocalRejectSketchHandler)                      //本地生活拒绝初稿
 
 		task.POST("/locallife/prelinklist", handler.WrapLocalPreLinkListHandler)   //本地生活待传链接列表
 		task.POST("/locallife/tasklinklist", handler.WrapLocalTaskLinklistHandler) //本地生活链接待审列表,通过
@@ -373,6 +379,16 @@ func InitRoute(r *gin.Engine) {
 		store.POST("/teamBuying/update", controller.CooperationController{}.UpdateTeamBuying)    // 更新团购
 		store.POST("/teamBuying/del", controller.CooperationController{}.DeleteTeamBuying)       // 删除团购
 	}
+	//推广合作-达人管理
+	talent := r.Group("/youngee/b/cooperation/talent")
+	{
+		talent.Use(middleware.LoginAuthMiddleware)
+		talent.POST("/talentnum", handler.WrapGetTalentNumHandler)             //达人数统计
+		talent.POST("/goodstalent", handler.WrapGetGoodsTalentHandler)         //带货达人列表
+		talent.POST("/projecttalent", handler.WrapGetProjectTalentHandler)     //种草达人
+		talent.POST("/locallifetalent", handler.WrapGetLocallifeTalentHandler) //本地生活达人
+
+	}
 	// 账号管理
 	account := r.Group("/youngee/b/account")
 	{
@@ -388,5 +404,6 @@ func InitRoute(r *gin.Engine) {
 	{
 		common.POST("/platform", controller.CommonController{}.CooperationPlatform)     // 获取合作平台icon
 		common.POST("/product/category", controller.CommonController{}.ProductCategory) // 获取商品类目
+		common.POST("/talent/province", handler.WrapGetProviceHandler)                  //获取达人省份
 	}
 }

+ 27 - 0
service/Localtask.go

@@ -12,6 +12,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 {

+ 26 - 0
service/Task.go

@@ -12,6 +12,23 @@ 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 {
@@ -46,6 +63,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 {

+ 2 - 2
service/job.go

@@ -70,8 +70,8 @@ func (*job) FindJobByEnterpriseId(ctx context.Context, request http_model.FindAl
 		return nil, jobErr
 	}
 	if jobInfo != nil {
-		for _, job := range jobInfo {
-			jobNameData.JobInfo = append(jobNameData.JobInfo, job)
+		for _, jobData := range jobInfo {
+			jobNameData.JobInfo = append(jobNameData.JobInfo, jobData)
 		}
 		jobNameData.Total = total
 	} else {

+ 2 - 2
service/sketch.go

@@ -190,8 +190,8 @@ func (*sketch) GetSketchInfo(ctx context.Context, request http_model.GetSketchIn
 		Title:          SketchInfo.Title,
 		Content:        SketchInfo.Content,
 		SketchPhotos:   SketchPhotos,
-		Agreeat:        SketchInfo.AgreeAt,
-		Submitat:       SketchInfo.SubmitAt,
+		Agreeat:        SketchInfo.AgreeAt.Format("2006-01-02 15:04:05"),
+		Submitat:       SketchInfo.SubmitAt.Format("2006-01-02 15:04:05"),
 		ReverseOpinion: SketchInfo.ReviseOpinion,
 	}
 	return &SketchInfoData, nil

+ 2 - 1
service/sub_account.go

@@ -79,7 +79,7 @@ func (*subaccount) FindSubAccountByEnterpriseId(ctx context.Context, request htt
 	subAccountResp = &http_model.FindAllSubAccountData{}
 
 	// 1. 取出子账号基本信息
-	newSubAccount, total, subaccountErr := db.FindSubAccountByEnterpriseId(ctx, request.EnterpriseId)
+	newSubAccount, total, subaccountErr := db.FindSubAccountByEnterpriseId(ctx, request.EnterpriseId, request.JobId, request.AccountStatus)
 	if subaccountErr != nil {
 		return nil, subaccountErr
 	}
@@ -94,6 +94,7 @@ func (*subaccount) FindSubAccountByEnterpriseId(ctx context.Context, request htt
 			subAccountInfo.UserId = s.UserId
 			subAccountInfo.PhoneNumber = s.PhoneNumber
 			subAccountInfo.EnterpriseId = s.EnterpriseId
+			subAccountInfo.EnterpriseName = s.EnterpriseId
 			subAccountInfo.AccountStatus = s.AccountStatus
 
 			// 2. 岗位信息

+ 40 - 0
service/talent.go

@@ -0,0 +1,40 @@
+package service
+
+import (
+	"context"
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/db"
+	"youngee_b_api/model/http_model"
+)
+
+var Talent *talent
+
+type talent struct {
+}
+
+func (*talent) GetGoodsTalentList(ctx context.Context, request http_model.GetGoodsTalentRequest) (*http_model.GetGoodsTalentListData, error) {
+	res, err := db.GetGoodstalentList(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[talent service] call GetGoodsTalentList error,err:%+v", err)
+		return nil, err
+	}
+	return res, nil
+}
+
+func (*talent) GetProjectTalentList(ctx context.Context, request http_model.GetProjectTalentRequest) (*http_model.GetProjectTalentListData, error) {
+	res, err := db.GetProjecttalentList(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[talent service] call GetProjectTalentList error,err:%+v", err)
+		return nil, err
+	}
+	return res, nil
+}
+
+func (*talent) GetLocallifeTalentList(ctx context.Context, request http_model.GetLocallifeTalentRequest) (*http_model.GetLocallifeTalentListData, error) {
+	res, err := db.GetLocallifetalentList(ctx, request)
+	if err != nil {
+		logrus.WithContext(ctx).Errorf("[talent service] call GetLocallifeTalentList error,err:%+v", err)
+		return nil, err
+	}
+	return res, nil
+}