Kaynağa Gözat

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

Ethan 6 ay önce
ebeveyn
işleme
2541bb2405

+ 157 - 1
app/controller/task_controller.go

@@ -115,6 +115,26 @@ func (t TaskController) GetSelectionDetail(c *gin.Context) {
 	returnSuccess(c, 20000, res)
 }
 
+// 电商带货提交审核
+func (t TaskController) SelectionToReview(c *gin.Context) {
+	data := &vo.SelectionInfoUpdateParam{}
+	err := c.BindJSON(data)
+	if err != nil || data.SelectionID == "" {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	selectionId, err := service.SelectionInfoService{}.SelectionToReview(data)
+	if err != nil {
+		logrus.Errorf("[SelectionToReview] call SelectionToReview err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string]string)
+	resultMap["selectionId"] = *selectionId
+	returnSuccess(c, 20000, resultMap)
+}
+
 // 电商带货任务列表
 func (t TaskController) SelectionTaskList(c *gin.Context) {
 	param := &vo.SelectionSearchParam{}
@@ -292,6 +312,26 @@ func (t TaskController) GetProjectDetail(c *gin.Context) {
 	returnSuccess(c, 20000, res)
 }
 
+// 种草提交审核
+func (t TaskController) ProjectToReview(c *gin.Context) {
+	data := &vo.ProjectUpdateParam{}
+	err := c.BindJSON(data)
+	if err != nil || data.ProjectID == "" {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	projectId, err := service.ProjectService{}.ProjectToReview(data)
+	if err != nil {
+		logrus.Errorf("[ProjectToReview] call ProjectToReview err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string]string)
+	resultMap["projectId"] = *projectId
+	returnSuccess(c, 20000, resultMap)
+}
+
 // 公开种草任务列表
 func (t TaskController) ProjectTaskList(c *gin.Context) {
 	param := &vo.ProjectSearchParam{}
@@ -350,7 +390,7 @@ func (t TaskController) GetSelectionDraftList(c *gin.Context) {
 	returnSuccess(c, 20000, res)
 }
 
-// 草稿箱——电商带货
+// 草稿箱——品牌种草
 func (t TaskController) GetProjectDraftList(c *gin.Context) {
 	param := &vo.ProjectDraftParam{}
 	err := c.BindJSON(param)
@@ -368,3 +408,119 @@ func (t TaskController) GetProjectDraftList(c *gin.Context) {
 
 	returnSuccess(c, 20000, res)
 }
+
+// 违约管理——违约公开任务列表
+func (t TaskController) GetPublicDefaultList(c *gin.Context) {
+	param := &vo.DefaultSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.DefaultService{}.GetPublicDefaultList(param)
+	if err != nil {
+		logrus.Errorf("[GetPublicDefaultList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 违约管理——违约定向任务列表
+func (t TaskController) GetTargetDefaultList(c *gin.Context) {
+	param := &vo.DefaultSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.DefaultService{}.GetTargetDefaultList(param)
+	if err != nil {
+		logrus.Errorf("[GetTargetDefaultList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 违约管理——公开任务-违约达人列表
+func (t TaskController) GetPublicDefaultTalentList(c *gin.Context) {
+	param := &vo.DefaultSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.DefaultService{}.GetPublicDefaultTalentList(param)
+	if err != nil {
+		logrus.Errorf("[GetPublicDefaultTalentList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 违约管理——定向任务-违约达人列表
+func (t TaskController) GetTargetDefaultTalentList(c *gin.Context) {
+	param := &vo.DefaultSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.DefaultService{}.GetTargetDefaultTalentList(param)
+	if err != nil {
+		logrus.Errorf("[GetTargetDefaultTalentList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 违约管理——达人解约
+func (t TaskController) CancelTalent(c *gin.Context) {
+	param := &vo.TalentCancelParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	err = service.DefaultService{}.CancelTalent(param)
+	if err != nil {
+		logrus.Errorf("[CancelTalent] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string]string)
+	resultMap["taskId"] = param.TaskId
+	returnSuccess(c, 20000, resultMap)
+}
+
+// 违约管理——达人批量解约
+func (t TaskController) CancelTalentList(c *gin.Context) {
+	param := &vo.TalentCancelParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	err = service.DefaultService{}.CancelTalentList(param)
+	if err != nil {
+		logrus.Errorf("[CancelTalentList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string][]string)
+	resultMap["taskIds"] = param.TaskIds
+	returnSuccess(c, 20000, resultMap)
+}

+ 4 - 4
app/dao/info_auto_default.go → app/dao/info_auto_default_dao.go

@@ -14,8 +14,8 @@ func (d InfoAutoDefaultDao) GetAutoDefaultLast(enterpriseId string) entity.InfoA
 }
 
 // 获取指定 auto_default_id 的指定字段值
-func (d InfoAutoDefaultDao) GetValueByIdFieldName(autoDefaultId int64, fieldName string) entity.InfoAutoDefault {
-	autoDefaultInfo := entity.InfoAutoDefault{}
-	Db.Model(&entity.InfoAutoDefault{}).Select(fieldName).Where("auto_default_id = ?", autoDefaultId).First(&autoDefaultInfo)
-	return autoDefaultInfo
+func (d InfoAutoDefaultDao) GetValueByIdFieldName(autoDefaultId int64, fieldName string) int64 {
+	var value int64
+	Db.Model(&entity.InfoAutoDefault{}).Select(fieldName).Where("auto_default_id = ?", autoDefaultId).Find(&value)
+	return value
 }

+ 0 - 0
app/dao/info_auto_task.go → app/dao/info_auto_task_dao.go


+ 18 - 0
app/dao/platform_kuaishou_user_info_dao.go

@@ -0,0 +1,18 @@
+package dao
+
+import (
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/app/entity"
+)
+
+type PlatformKuaishouUserInfoDao struct{}
+
+func (d PlatformKuaishouUserInfoDao) SelectUserInfo(talentId string) (*entity.PlatformKuaishouUserInfo, error) {
+	var userInfo *entity.PlatformKuaishouUserInfo
+	err := Db.Model(entity.PlatformKuaishouUserInfo{}).Select("open_id, nick_name, head_uri").Where("talent_id = ?", talentId).Find(&userInfo).Error
+	if err != nil {
+		logrus.Errorf("[SelectUserInfo] error query, err:%+v", err)
+		return nil, err
+	}
+	return userInfo, nil
+}

+ 99 - 1
app/dao/project_dao.go

@@ -25,6 +25,16 @@ func (d ProjectDAO) GetProjectById(projectId string) (*entity.Project, error) {
 	return &Project, err
 }
 
+// 根据projectId获取违约状态id
+func (d ProjectDAO) GetAutoDefaultId(projectId string) (*int64, error) {
+	var autoDefaultId int64
+	err := Db.Model(&entity.Project{}).Where("project_id = ?", projectId).Select("auto_default_id").Find(&autoDefaultId).Error
+	if err != nil {
+		return nil, nil
+	}
+	return &autoDefaultId, nil
+}
+
 // 根据enterpriseId查询指定某天的所有带货数据
 func (d ProjectDAO) GetProjectListOfDay(enterpriseId string, date time.Time) ([]entity.Project, error) {
 	var Projects []entity.Project
@@ -160,7 +170,7 @@ func (d ProjectDAO) GetProjectDraftList(param *vo.ProjectDraftParam) ([]vo.RePro
 			ProjectId:       project.ProjectId,
 			ProjectPlatform: project.ProjectPlatform,
 			ProjectType:     project.ProjectType,
-			CreatedAt:       project.CreatedAt,
+			CreatedAt:       project.CreatedAt.Format("2006-01-02 15:04:05"),
 			ProductId:       project.ProductID,
 		}
 		reProjectTaskPreviews = append(reProjectTaskPreviews, reProjectTaskPreview)
@@ -178,3 +188,91 @@ func (d ProjectDAO) GetProjectList(value int64, fieldName string) ([]*entity.Pro
 	}
 	return projectInfos, nil
 }
+
+// 违约管理——违约公开种草任务列表
+func (d ProjectDAO) GetProjectPublicList(param *vo.DefaultSearchParam) ([]vo.ReTaskDefaultPublic, int64, error) {
+	var reTaskDefaultPublics []vo.ReTaskDefaultPublic
+	var projects []entity.Project
+	var total int64
+	query := Db.Model(&entity.Project{}).Where("project_type = ?", 1)
+	// 动态添加查询条件
+	if param.SubAccountId == 0 {
+		if param.EnterpriseId == "" {
+			return reTaskDefaultPublics, 0, errors.New("enterpriseId is empty")
+		}
+		query = query.Where("enterprise_id = ?", param.EnterpriseId)
+	} else {
+		query = query.Where("sub_account_id = ?", param.SubAccountId)
+	}
+	if param.Platform != 0 {
+		query = query.Where("project_platform = ?", param.Platform)
+	}
+	if param.TaskId != "" {
+		query = query.Where("project_id = ?", param.TaskId)
+	}
+	query.Count(&total)
+	query = query.Select("enterprise_id, sub_account_id, project_id, project_platform, project_form, content_type, product_id")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&projects).Error; err != nil {
+		return nil, 0, err
+	}
+	for _, project := range projects {
+		reTaskDefaultPublic := vo.ReTaskDefaultPublic{
+			EnterpriseId: project.EnterpriseID,
+			SubAccountId: project.SubAccountId,
+			TaskId:       project.ProjectId,
+			Platform:     project.ProjectPlatform,
+			TaskForm:     project.ProjectForm,
+			ContentType:  project.ContentType,
+			TaskType:     1,
+			ProductId:    project.ProductID,
+		}
+		reTaskDefaultPublics = append(reTaskDefaultPublics, reTaskDefaultPublic)
+	}
+
+	return reTaskDefaultPublics, total, nil
+}
+
+// 违约管理——违约定向种草任务列表
+func (d ProjectDAO) GetProjectTargetList(param *vo.DefaultSearchParam) ([]vo.ReTaskDefaultTarget, int64, error) {
+	var reTaskDefaultTargets []vo.ReTaskDefaultTarget
+	var projects []entity.Project
+	var total int64
+	query := Db.Model(&entity.Project{}).Where("project_type = ?", 2)
+	// 动态添加查询条件
+	if param.SubAccountId == 0 {
+		if param.EnterpriseId == "" {
+			return reTaskDefaultTargets, 0, errors.New("enterpriseId is empty")
+		}
+		query = query.Where("enterprise_id = ?", param.EnterpriseId)
+	} else {
+		query = query.Where("sub_account_id = ?", param.SubAccountId)
+	}
+	if param.Platform != 0 {
+		query = query.Where("project_platform = ?", param.Platform)
+	}
+	if param.TaskId != "" {
+		query = query.Where("project_id = ?", param.TaskId)
+	}
+	query.Count(&total)
+	query = query.Select("enterprise_id, sub_account_id, project_id, project_platform, tools, content_type, product_id")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&projects).Error; err != nil {
+		return nil, 0, err
+	}
+	for _, project := range projects {
+		reTaskDefaultPublic := vo.ReTaskDefaultTarget{
+			EnterpriseId: project.EnterpriseID,
+			SubAccountId: project.SubAccountId,
+			TaskId:       project.ProjectId,
+			Platform:     project.ProjectPlatform,
+			Tools:        project.Tools,
+			ContentType:  project.ContentType,
+			TaskType:     1,
+			ProductId:    project.ProductID,
+		}
+		reTaskDefaultTargets = append(reTaskDefaultTargets, reTaskDefaultPublic)
+	}
+
+	return reTaskDefaultTargets, total, nil
+}

+ 110 - 0
app/dao/project_task_info_dao.go

@@ -0,0 +1,110 @@
+package dao
+
+import (
+	"youngee_b_api/app/entity"
+	"youngee_b_api/app/vo"
+)
+
+type ProjectTaskInfoDao struct{}
+
+// 获取指定违约类型的种草子任务数量
+func (d ProjectTaskInfoDao) CountByDefaultType(projectId string, defaultType int64) int64 {
+	var total int64
+	Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", projectId, defaultType).Count(&total)
+	return total
+}
+
+// 获取指定任务阶段的种草子任务数量
+func (d ProjectTaskInfoDao) CountByTaskStage(projectId string, taskStage int64) int64 {
+	var total int64
+	Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND task_stage = ?", projectId, taskStage).Count(&total)
+	return total
+}
+
+// 获取未传初稿的种草子任务数据
+func (d ProjectTaskInfoDao) GetListBySketchDefault(param *vo.DefaultSearchParam) ([]entity.ProjectTaskInfo, int64, error) {
+	projectTaskInfos := []entity.ProjectTaskInfo{}
+	var total int64
+	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 4)
+	query.Count(&total)
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, sketch_missing_time")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("sketch_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	return projectTaskInfos, total, nil
+}
+
+// 获取未发作品的种草子任务数据
+func (d ProjectTaskInfoDao) GetListByLinkDefault(param *vo.DefaultSearchParam) ([]entity.ProjectTaskInfo, int64, error) {
+	projectTaskInfos := []entity.ProjectTaskInfo{}
+	var total int64
+	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 6)
+	query.Count(&total)
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, link_missing_time")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("link_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	return projectTaskInfos, total, nil
+}
+
+// 获取未传数据的种草子任务数据
+func (d ProjectTaskInfoDao) GetListByDataDefault(param *vo.DefaultSearchParam) ([]entity.ProjectTaskInfo, int64, error) {
+	projectTaskInfos := []entity.ProjectTaskInfo{}
+	var total int64
+	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND cur_default_type = ?", param.TaskId, 8)
+	query.Count(&total)
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, data_missing_time")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("data_missing_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	return projectTaskInfos, total, nil
+}
+
+// 获取终止合作的种草子任务数据
+func (d ProjectTaskInfoDao) GetListByTerminateDefault(param *vo.DefaultSearchParam) ([]entity.ProjectTaskInfo, int64, error) {
+	projectTaskInfos := []entity.ProjectTaskInfo{}
+	var total int64
+	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND task_stage = ?", param.TaskId, 17)
+	query.Count(&total)
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, terminate_time, terminate_reason, terminate_operator_type, terminate_operator")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("terminate_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	return projectTaskInfos, total, nil
+}
+
+// 获取已解约的种草子任务数据
+func (d ProjectTaskInfoDao) GetListByCancelDefault(param *vo.DefaultSearchParam) ([]entity.ProjectTaskInfo, int64, error) {
+	projectTaskInfos := []entity.ProjectTaskInfo{}
+	var total int64
+	query := Db.Model(&entity.ProjectTaskInfo{}).Where("project_id = ? AND task_stage = ?", param.TaskId, 16)
+	query.Count(&total)
+	query = query.Select("task_id, talent_id, settle_amount, draft_fee, cancel_time, cancel_reason, cancel_operator_type, cancel_operator")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("cancel_time desc").Offset(offset).Limit(param.PageSize).Find(&projectTaskInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	return projectTaskInfos, total, nil
+}
+
+// 更新字段
+func (d ProjectTaskInfoDao) UpdateField(taskId string, updateData map[string]interface{}) error {
+	err := Db.Model(&entity.ProjectTaskInfo{}).Where("task_id = ?", taskId).Updates(updateData).Error
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// 批量更新字段
+func (d ProjectTaskInfoDao) UpdateFieldBatch(taskIds []string, updateData map[string]interface{}) error {
+	err := Db.Model(&entity.ProjectTaskInfo{}).Where("task_id IN ?", taskIds).Updates(updateData).Error
+	if err != nil {
+		return err
+	}
+	return nil
+}

+ 4 - 3
app/dao/selection_info_dao.go

@@ -102,8 +102,8 @@ func (d SelectionInfoDAO) GetSelectionPreviews(param *vo.SelectionSearchParam) (
 			SelectionId:       selectionInfo.SelectionID,
 			SelectionPlatform: selectionInfo.Platform,
 			SelectionStatus:   selectionInfo.SelectionStatus,
-			CreatedAt:         selectionInfo.CreatedAt,
-			TaskDdl:           selectionInfo.TaskDdl,
+			CreatedAt:         selectionInfo.CreatedAt.Format("2006-01-02 15:04:05"),
+			TaskDdl:           selectionInfo.TaskDdl.Format("2006-01-02 15:04:05"),
 			SampleNum:         selectionInfo.SampleNum,
 			EnrollNum:         selectionInfo.EnrollNum,
 			ChooseNum:         selectionInfo.ChooseNum,
@@ -157,7 +157,7 @@ func (d SelectionInfoDAO) GetSelectionDraftList(param *vo.SelectionDraftParam) (
 			SubAccountId:      selectionInfo.SubAccountId,
 			SelectionId:       selectionInfo.SelectionID,
 			SelectionPlatform: selectionInfo.Platform,
-			CreatedAt:         selectionInfo.CreatedAt,
+			CreatedAt:         selectionInfo.CreatedAt.Format("2006-01-02 15:04:05"),
 			ProductId:         selectionInfo.ProductID,
 		}
 		reSelectionTaskPreviews = append(reSelectionTaskPreviews, reSelectionTaskPreview)
@@ -168,6 +168,7 @@ func (d SelectionInfoDAO) GetSelectionDraftList(param *vo.SelectionDraftParam) (
 
 // 获取电商带货悬赏任务中全部指定状态值的项目
 func (d SelectionInfoDAO) GetSelectionInfoList(value int64, fieldName string) ([]*entity.SelectionInfo, error) {
+	fmt.Println("Db", Db)
 	var selectionInfos []*entity.SelectionInfo
 	err := Db.Model(entity.SelectionInfo{}).Where(fmt.Sprintf("task_mode = ? AND %s = ? ", fieldName), 1, value).Find(&selectionInfos).Error
 	if err != nil {

+ 18 - 0
app/dao/talent_info_dao.go

@@ -0,0 +1,18 @@
+package dao
+
+import (
+	"github.com/sirupsen/logrus"
+	"youngee_b_api/app/entity"
+)
+
+type TalentInfoDao struct{}
+
+func (d TalentInfoDao) SelectTalentPhone(talentId string) (*string, error) {
+	var talentInfo *entity.YoungeeTalentInfo
+	err := Db.Model(entity.YoungeeTalentInfo{}).Select("talent_phone_number").Where("id = ?", talentId).Find(&talentInfo).Error
+	if err != nil {
+		logrus.Errorf("[SelectTalentInfo] error query, err:%+v", err)
+		return nil, err
+	}
+	return &talentInfo.TalentPhoneNumber, nil
+}

+ 9 - 0
app/dao/user_dao.go

@@ -12,3 +12,12 @@ func (d UserDao) GetPhoneByUserId(userId int64) (string, error) {
 	}
 	return user.Phone, nil
 }
+
+func (d UserDao) GetNameByUserId(userId int64) (string, error) {
+	var user entity.User
+	err := Db.Model(&entity.User{}).Where("id = ?", userId).Select("username").First(&user).Error
+	if err != nil {
+		return "", err
+	}
+	return user.Username, nil
+}

+ 31 - 0
app/entity/platform_kuaishou_user_info.go

@@ -0,0 +1,31 @@
+// Code generated by sql2gorm. DO NOT EDIT.
+package entity
+
+import (
+	"time"
+)
+
+type PlatformKuaishouUserInfo struct {
+	ID           int64     `gorm:"column:id;primary_key"` // id
+	OpenId       string    `gorm:"column:open_id;NOT NULL"`
+	PlatformId   int64     `gorm:"column:platform_id;NOT NULL"`
+	TalentId     string    `gorm:"column:talent_id;NOT NULL"`
+	Code         string    `gorm:"column:code;NOT NULL"`
+	AccessToken  string    `gorm:"column:access_token;NOT NULL"`
+	RefreshToken string    `gorm:"column:refresh_token;NOT NULL"`
+	NickName     string    `gorm:"column:nick_name;NOT NULL"`
+	HeadUri      string    `gorm:"column:head_uri;NOT NULL"`
+	Fan          string    `gorm:"column:fan;NOT NULL"`
+	Expired      int64     `gorm:"column:expired"`
+	SaleNumTotal int64     `gorm:"column:sale_num_total;NOT NULL"`
+	SaleNum30day int64     `gorm:"column:sale_num_30day;NOT NULL"`
+	CreateTime   time.Time `gorm:"column:create_time;NOT NULL"`
+	UpdateTime   time.Time `gorm:"column:update_time;NOT NULL"`
+	IsDelete     int64     `gorm:"column:is_delete;NOT NULL"`
+	LikeNum      int64     `gorm:"column:like_num;NOT NULL"`
+	VideoNum     int64     `gorm:"column:video_num;NOT NULL"`
+}
+
+func (m *PlatformKuaishouUserInfo) TableName() string {
+	return "platform_kuaishou_user_info"
+}

+ 12 - 0
app/entity/project_task_info.go

@@ -41,6 +41,18 @@ type ProjectTaskInfo struct {
 	CurDefaultType         int       `gorm:"column:cur_default_type"`                     // 任务当前处于的违约类型 0-8分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约
 	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`            // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
 	SettleStatus           int       `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
+	DraftFee               float64   `gorm:"column:draft_fee;NOT NULL"`                   // 达人稿费,达人所见的稿费金额
+	TerminateTime          time.Time `gorm:"column:terminate_time"`
+	TerminateReason        string    `gorm:"column:terminate_reason"`
+	CancelTime             time.Time `gorm:"column:cancel_time"`
+	CancelReason           string    `gorm:"column:cancel_reason"`
+	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time"`
+	LinkMissingTime        time.Time `gorm:"column:link_missing_time"`
+	DataMissingTime        time.Time `gorm:"column:data_missing_time"`
+	TerminateOperatorType  int       `gorm:"column:terminate_operator_type;default:0;NOT NULL"`
+	TerminateOperator      string    `gorm:"column:terminate_operator"`
+	CancelOperatorType     int       `gorm:"column:cancel_operator_type;default:0;NOT NULL"`
+	CancelOperator         string    `gorm:"column:cancel_operator"`
 }
 
 func (m *ProjectTaskInfo) TableName() string {

+ 39 - 0
app/entity/talent_info.go

@@ -0,0 +1,39 @@
+// Code generated by sql2gorm. DO NOT EDIT.
+package entity
+
+import (
+	"time"
+)
+
+type YoungeeTalentInfo struct {
+	ID                string    `gorm:"column:id;primary_key"`               // 达人id
+	TalentWxOpenid    string    `gorm:"column:talent_wx_openid;NOT NULL"`    // 达人的微信openid
+	TalentWxNickname  string    `gorm:"column:talent_wx_nickname"`           // 达人的微信昵称
+	TalentWxNumber    string    `gorm:"column:talent_wx_number"`             // 达人微信号
+	Income            int64     `gorm:"column:income;default:0"`             // 收益总数
+	Withdrawing       int64     `gorm:"column:withdrawing;default:0"`        // 提现中金额
+	Canwithdraw       int64     `gorm:"column:canwithdraw;default:0"`        // 可提现金额
+	Withdrawed        int64     `gorm:"column:withdrawed;default:0"`         // 已提现金额
+	TalentGender      int64     `gorm:"column:talent_gender"`                // 性别,0未知 1男 2女
+	TalentPhoneNumber string    `gorm:"column:talent_phone_number"`          // 电话号码
+	TalentAgeBracket  int64     `gorm:"column:talent_age_bracket"`           // 年龄段,取tallent_age_bracket表id
+	TalentNationality int64     `gorm:"column:talent_nationality"`           // 国籍,取tallent_nationality表id
+	VisitStoreRegion  int64     `gorm:"column:visit_store_region"`           // 探店区域,取region_info表中的self_code
+	IsBindInfo        uint      `gorm:"column:is_bind_info;default:0"`       // 是否填写个人资料
+	IsBindLocation    uint      `gorm:"column:is_bind_location;default:0"`   // 是否绑定收货地址
+	IsBindBank        uint      `gorm:"column:is_bind_bank;default:0"`       // 是否绑定银行账户信息
+	InBlacklist       uint      `gorm:"column:in_blacklist;default:0"`       // 是否加入黑名单 0否 1是
+	TaskAll           int64     `gorm:"column:task_all;default:0"`           // 任务总数
+	TaskApply         int64     `gorm:"column:task_apply;default:0"`         // 报名任务数量
+	TaskExecute       int64     `gorm:"column:task_execute;default:0"`       // 执行中任务数量
+	TaskEnd           int64     `gorm:"column:task_end;default:0"`           // 结束任务数量
+	CreateDate        time.Time `gorm:"column:create_date;NOT NULL"`         // 创建时间
+	LastLoginDate     time.Time `gorm:"column:last_login_date;NOT NULL"`     // 最后登录时间
+	ApplyNum          int64     `gorm:"column:apply_num;default:5;NOT NULL"` // 剩余申请次数(每天更新)
+	UserType          int64     `gorm:"column:user_type"`
+	Sex               int64     `gorm:"column:sex"`
+}
+
+func (m *YoungeeTalentInfo) TableName() string {
+	return "youngee_talent_info"
+}

+ 5 - 5
app/schedule/auto_task.go

@@ -13,7 +13,7 @@ import (
 func AutoTask() error {
 	// 新建一个定时任务对象
 	crontab := cron.New(cron.WithSeconds()) // 精确到秒
-	spec := "0 */1 * * * ?"                 //cron表达式,每10h一次
+	spec := "0 0 */5 * * ?"                 //cron表达式,每10h一次
 	// "0 0 12 * * ?" 每天中午12点执行
 
 	// 添加定时任务
@@ -53,14 +53,14 @@ func AutoInvalidTask() {
 		}
 		projectNeedMod := entity.Project{}
 		dao.Db.Where("project_id = ?", projectId).First(&projectNeedMod)
-		fmt.Println("品牌种草项目失效自动处理时间为:", projectNeedMod.AutoFailAt)
+		fmt.Println(fmt.Sprintf("品牌种草项目 %s 失效自动处理时间为:%s", projectId, projectNeedMod.AutoFailAt))
 		// 如果失效自动处理的时间不为空
 		if !projectNeedMod.AutoFailAt.IsZero() {
 			timeNow := time.Now()
 			// 如果 未失效 && 已经过了失效自动处理的时间
 			if projectNeedMod.ProjectStatus < 8 && projectNeedMod.AutoFailAt.Sub(time.Now()) <= 0 {
 				dao.Db.Model(entity.Project{}).Where("project_id = ?", projectId).Updates(&entity.Project{ProjectStatus: 8, FinishAt: timeInvalid, FailReason: 1})
-				fmt.Println("已更新品牌种草项目状态为超时未支付的失效状态")
+				fmt.Println(fmt.Sprintf("已更新品牌种草项目 %s 状态为超时未支付的失效状态", projectId))
 				dao.Db.Model(entity.ProjectTaskInfo{}).Where("project_id = ?", projectId).Updates(entity.ProjectTaskInfo{TaskStage: 3, CompleteStatus: 3, CompleteDate: timeNow})
 			}
 		}
@@ -86,14 +86,14 @@ func AutoSelectionInvalidTask() {
 		}
 		selectionInfoNeedMod := entity.SelectionInfo{}
 		dao.Db.Where("selection_id = ?", selectionId).First(&selectionInfoNeedMod)
-		fmt.Println("电商带货项目失效自动处理时间为:", selectionInfoNeedMod.AutoFailAt)
+		fmt.Println(fmt.Sprintf("电商带货项目 %s 失效自动处理时间为:%s", selectionId, selectionInfoNeedMod.AutoFailAt))
 		// 如果失效自动处理的时间不为空
 		if !selectionInfoNeedMod.AutoFailAt.IsZero() {
 			timeNow := time.Now()
 			// 如果 未失效 && 已经过了失效自动处理的时间
 			if selectionInfoNeedMod.SelectionStatus < 5 && selectionInfoNeedMod.AutoFailAt.Sub(time.Now()) <= 0 {
 				dao.Db.Model(entity.SelectionInfo{}).Where("selection_id = ?", selectionId).Updates(&entity.SelectionInfo{SelectionStatus: 7, FinishAt: timeInvalid, FailReason: 1})
-				fmt.Println("已更新电商带货项目状态为超时未支付的失效状态")
+				fmt.Println(fmt.Sprintf("已更新电商带货项目 %s 状态为超时未支付的失效状态", selectionId))
 				dao.Db.Model(entity.SelectionInfo{}).Where("selection_id = ?", selectionId).Updates(entity.SelectionTaskInfo{TaskStage: 3, CompleteStatus: 3, CompleteDate: timeNow})
 			}
 		}

+ 346 - 0
app/service/default_service.go

@@ -0,0 +1,346 @@
+package service
+
+import (
+	"strconv"
+	"time"
+	"youngee_b_api/app/dao"
+	"youngee_b_api/app/entity"
+	"youngee_b_api/app/vo"
+)
+
+type DefaultService struct{}
+
+// 违约管理——违约公开任务列表
+func (s DefaultService) GetPublicDefaultList(param *vo.DefaultSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
+	var result vo.ResultVO
+	// 以下代码只考虑了种草
+	reTaskDefaultPublics, total, err := (&dao.ProjectDAO{}).GetProjectPublicList(param)
+	if err != nil {
+		return result, err
+	}
+	for i := range reTaskDefaultPublics {
+		// 获取商品详情字段
+		var creatorName string
+		var productName string
+		var productPrice float64
+		var mainImage string
+		if reTaskDefaultPublics[i].SubAccountId == 0 {
+			enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reTaskDefaultPublics[i].EnterpriseId)
+			if err == nil && enterprise != nil {
+				creatorName = enterprise.BusinessName
+			}
+		} else {
+			subAccount, err := dao.SubAccountDao{}.GetSubAccount(reTaskDefaultPublics[i].SubAccountId)
+			if err == nil && subAccount != nil {
+				creatorName = subAccount.SubAccountName
+			}
+		}
+		product, err := dao.ProductDAO{}.GetProductByID(reTaskDefaultPublics[i].ProductId)
+		if err == nil && product != nil {
+			productName = product.ProductName
+			productPrice = product.ProductPrice
+		}
+		mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reTaskDefaultPublics[i].ProductId)
+		reTaskDefaultPublics[i].CreatorName = creatorName
+		reTaskDefaultPublics[i].ProductName = productName
+		reTaskDefaultPublics[i].ProductPrice = productPrice
+		reTaskDefaultPublics[i].MainImage = mainImage
+		// 获取未传数量字段	0-10分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约、解约待处理、解约
+		projectId := reTaskDefaultPublics[i].TaskId
+		noSketchNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 4)
+		noLinkNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 6)
+		noDataNum := dao.ProjectTaskInfoDao{}.CountByDefaultType(projectId, 8)
+		// 终止合作还是解约字段待确认
+		endCooperationNum := dao.ProjectTaskInfoDao{}.CountByTaskStage(projectId, 17)
+		reTaskDefaultPublics[i].NoSketchNum = noSketchNum
+		reTaskDefaultPublics[i].NoLinkNum = noLinkNum
+		reTaskDefaultPublics[i].NoDataNum = noDataNum
+		reTaskDefaultPublics[i].EndCooperationNum = endCooperationNum
+	}
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     reTaskDefaultPublics,
+	}
+	return result, nil
+}
+
+// 违约管理——违约定向任务列表
+func (s DefaultService) GetTargetDefaultList(param *vo.DefaultSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
+	var result vo.ResultVO
+	// 以下代码只考虑了种草
+	reTaskDefaultTargets, total, err := (&dao.ProjectDAO{}).GetProjectTargetList(param)
+	if err != nil {
+		return result, err
+	}
+	for i := range reTaskDefaultTargets {
+		// 获取商品详情字段
+		var creatorName string
+		var productName string
+		var productPrice float64
+		var mainImage string
+		if reTaskDefaultTargets[i].SubAccountId == 0 {
+			enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reTaskDefaultTargets[i].EnterpriseId)
+			if err == nil && enterprise != nil {
+				creatorName = enterprise.BusinessName
+			}
+		} else {
+			subAccount, err := dao.SubAccountDao{}.GetSubAccount(reTaskDefaultTargets[i].SubAccountId)
+			if err == nil && subAccount != nil {
+				creatorName = subAccount.SubAccountName
+			}
+		}
+		product, err := dao.ProductDAO{}.GetProductByID(reTaskDefaultTargets[i].ProductId)
+		if err == nil && product != nil {
+			productName = product.ProductName
+			productPrice = product.ProductPrice
+		}
+		mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reTaskDefaultTargets[i].ProductId)
+		reTaskDefaultTargets[i].CreatorName = creatorName
+		reTaskDefaultTargets[i].ProductName = productName
+		reTaskDefaultTargets[i].ProductPrice = productPrice
+		reTaskDefaultTargets[i].MainImage = mainImage
+		// 终止合作还是解约字段待确认
+		endCooperationNum := dao.ProjectTaskInfoDao{}.CountByTaskStage(reTaskDefaultTargets[i].TaskId, 17)
+		reTaskDefaultTargets[i].EndCooperationNum = endCooperationNum
+	}
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     reTaskDefaultTargets,
+	}
+	return result, nil
+}
+
+// 违约管理——公开任务-违约达人列表
+func (s DefaultService) GetPublicDefaultTalentList(param *vo.DefaultSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
+	var result vo.ResultVO
+	var reTalentDefaults []*vo.ReTalentDefault
+	// 以下代码只考虑了种草
+	var projectTaskInfos []entity.ProjectTaskInfo
+	var total int64
+	var err error
+	var cutRate int64
+	defaultType := param.DefaultType
+	if defaultType == 1 { // 未传初稿
+		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListBySketchDefault(param)
+		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "sketch_replace_not_upload")
+	} else if defaultType == 2 { // 未发作品
+		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByLinkDefault(param)
+		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "link_replace_not_upload")
+	} else if defaultType == 3 { // 未传数据
+		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByDataDefault(param)
+		autoDefaultId, _ := dao.ProjectDAO{}.GetAutoDefaultId(param.TaskId)
+		cutRate = dao.InfoAutoDefaultDao{}.GetValueByIdFieldName(*autoDefaultId, "data_replace_not_upload")
+	} else if defaultType == 4 { // 终止合作
+		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByTerminateDefault(param)
+	} else if defaultType == 5 { // 已解约
+		projectTaskInfos, total, err = dao.ProjectTaskInfoDao{}.GetListByCancelDefault(param)
+	}
+	if err != nil {
+		return result, err
+	}
+	for _, projectTaskInfo := range projectTaskInfos {
+		talentId := projectTaskInfo.TalentID
+		talentPhone, _ := dao.TalentInfoDao{}.SelectTalentPhone(talentId)
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+		reTalentDefault := &vo.ReTalentDefault{
+			TalentId:    talentId,
+			TalentPhone: *talentPhone,
+			TaskId:      projectTaskInfo.TaskID,
+			DraftFee:    projectTaskInfo.DraftFee,
+			OpenId:      platformKuaishouUserInfo.OpenId,
+			NickName:    platformKuaishouUserInfo.NickName,
+			HeadUri:     platformKuaishouUserInfo.HeadUri,
+			City:        "-",
+		}
+		if defaultType == 1 {
+			reTalentDefault.DefaultTime = projectTaskInfo.SketchMissingTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+		} else if defaultType == 2 {
+			reTalentDefault.DefaultTime = projectTaskInfo.LinkMissingTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+		} else if defaultType == 3 {
+			reTalentDefault.DefaultTime = projectTaskInfo.DataMissingTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+		} else if defaultType == 4 {
+			reTalentDefault.DefaultTime = projectTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.Reason = projectTaskInfo.TerminateReason
+			terminateOperatorType := projectTaskInfo.TerminateOperatorType
+			if terminateOperatorType == 1 {
+				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.TerminateOperator)
+				reTalentDefault.OperatorName = enterprise.BusinessName
+			} else if terminateOperatorType == 2 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+				reTalentDefault.OperatorName = subAccount.SubAccountName
+			} else if terminateOperatorType == 3 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+				reTalentDefault.OperatorName = userName
+			}
+		} else if defaultType == 5 {
+			reTalentDefault.DefaultTime = projectTaskInfo.CancelTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+			reTalentDefault.Reason = projectTaskInfo.CancelReason
+			cancelOperatorType := projectTaskInfo.CancelOperatorType
+			if cancelOperatorType == 1 {
+				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.CancelOperator)
+				reTalentDefault.OperatorName = enterprise.BusinessName
+			} else if cancelOperatorType == 2 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+				reTalentDefault.OperatorName = subAccount.SubAccountName
+			} else if cancelOperatorType == 3 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+				reTalentDefault.OperatorName = userName
+			}
+		}
+		reTalentDefaults = append(reTalentDefaults, reTalentDefault)
+	}
+	resultMap := make(map[string]interface{})
+	resultMap["cutRate"] = cutRate
+	resultMap["reTalentDefaults"] = reTalentDefaults
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     resultMap,
+	}
+	return result, nil
+}
+
+// 违约管理——定向任务-违约达人列表
+func (s DefaultService) GetTargetDefaultTalentList(param *vo.DefaultSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
+	var result vo.ResultVO
+	var reTalentDefaults []*vo.ReTalentDefault
+	// 以下代码只考虑了种草
+	var projectTaskInfos []entity.ProjectTaskInfo
+	var total int64
+	var err error
+	defaultType := param.DefaultType
+	if defaultType == 4 { // 终止合作
+		projectTaskInfos, total, err = (&dao.ProjectTaskInfoDao{}).GetListByTerminateDefault(param)
+	} else if defaultType == 5 { // 已解约
+		projectTaskInfos, total, err = (&dao.ProjectTaskInfoDao{}).GetListByCancelDefault(param)
+	}
+	if err != nil {
+		return result, err
+	}
+	for _, projectTaskInfo := range projectTaskInfos {
+		talentId := projectTaskInfo.TalentID
+		talentPhone, _ := dao.TalentInfoDao{}.SelectTalentPhone(talentId)
+		platformKuaishouUserInfo, _ := dao.PlatformKuaishouUserInfoDao{}.SelectUserInfo(talentId)
+		reTalentDefault := &vo.ReTalentDefault{
+			TalentId:    talentId,
+			TalentPhone: *talentPhone,
+			DraftFee:    projectTaskInfo.DraftFee,
+			OpenId:      platformKuaishouUserInfo.OpenId,
+			NickName:    platformKuaishouUserInfo.NickName,
+			HeadUri:     platformKuaishouUserInfo.HeadUri,
+			City:        "-",
+		}
+		if defaultType == 4 {
+			reTalentDefault.DefaultTime = projectTaskInfo.TerminateTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.Reason = projectTaskInfo.TerminateReason
+			terminateOperatorType := projectTaskInfo.TerminateOperatorType
+			if terminateOperatorType == 1 {
+				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.TerminateOperator)
+				reTalentDefault.OperatorName = enterprise.BusinessName
+			} else if terminateOperatorType == 2 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+				reTalentDefault.OperatorName = subAccount.SubAccountName
+			} else if terminateOperatorType == 3 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.TerminateOperator, 10, 64)
+				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+				reTalentDefault.OperatorName = userName
+			}
+		} else if defaultType == 5 {
+			reTalentDefault.DefaultTime = projectTaskInfo.CancelTime.Format("2006-01-02 15:04:05")
+			reTalentDefault.SettleAmount = projectTaskInfo.SettleAmount
+			cancelOperatorType := projectTaskInfo.CancelOperatorType
+			if cancelOperatorType == 1 {
+				enterprise, _ := dao.EnterpriseDao{}.GetEnterprise(projectTaskInfo.CancelOperator)
+				reTalentDefault.OperatorName = enterprise.BusinessName
+			} else if cancelOperatorType == 2 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+				subAccount, _ := dao.SubAccountDao{}.GetSubAccount(operatorId)
+				reTalentDefault.OperatorName = subAccount.SubAccountName
+			} else if cancelOperatorType == 3 {
+				operatorId, _ := strconv.ParseInt(projectTaskInfo.CancelOperator, 10, 64)
+				userName, _ := dao.UserDao{}.GetNameByUserId(operatorId)
+				reTalentDefault.OperatorName = userName
+			}
+		}
+		reTalentDefaults = append(reTalentDefaults, reTalentDefault)
+	}
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     reTalentDefaults,
+	}
+	return result, nil
+}
+
+// 违约管理——达人解约
+func (s DefaultService) CancelTalent(param *vo.TalentCancelParam) error {
+	updateData := map[string]interface{}{
+		"task_stage":    16,
+		"settle_amount": param.RealPayment,
+		"real_payment":  param.RealPayment,
+		"cancel_reason": param.CancelReason,
+		"cancel_time":   time.Now(),
+	}
+	err := dao.ProjectTaskInfoDao{}.UpdateField(param.TaskId, updateData)
+	if err != nil {
+		return err
+	}
+	return nil
+}
+
+// 违约管理——达人批量解约
+func (s DefaultService) CancelTalentList(param *vo.TalentCancelParam) error {
+	updateData := map[string]interface{}{
+		"task_stage":    16,
+		"settle_amount": param.RealPayment,
+		"real_payment":  param.RealPayment,
+		"cancel_reason": param.CancelReason,
+		"cancel_time":   time.Now(),
+	}
+	err := dao.ProjectTaskInfoDao{}.UpdateFieldBatch(param.TaskIds, updateData)
+	if err != nil {
+		return err
+	}
+	return nil
+}

+ 1 - 1
app/service/product_service.go

@@ -47,7 +47,7 @@ func (p ProductService) GetTaskProductsByUserId(param vo.GetAllProductParam) (vo
 			ProductCategory: product.ProductCategory,
 			ProductPrice:    product.ProductPrice,
 			ProductDetail:   product.ProductDetail,
-			CreatedAt:       product.CreatedAt,
+			CreatedAt:       product.CreatedAt.Format("2006-01-02 15:04:05"),
 			PhotoUrl:        photoUrl,
 		}
 		reProducts = append(reProducts, reProduct)

+ 19 - 3
app/service/project_service.go

@@ -386,7 +386,7 @@ func (s ProjectService) GetProjectDetail(projectId string) (*vo.ReProjectDetail,
 	reProjectDetail.ProjectId = projectId
 	reProjectDetail.ProjectStatus = project.ProjectStatus
 	reProjectDetail.ProjectPlatform = project.ProjectPlatform
-	reProjectDetail.CreatedAt = project.CreatedAt
+	reProjectDetail.CreatedAt = project.CreatedAt.Format("2006-01-02 15:04:05")
 	reProjectDetail.EstimatedCost = project.EstimatedCost
 	reProjectDetail.ServiceChargeRate = project.ServiceChargeRate
 	var creatorName, phone string
@@ -420,14 +420,14 @@ func (s ProjectService) GetProjectDetail(projectId string) (*vo.ReProjectDetail,
 			ProductCategory: product.ProductCategory,
 			ProductPrice:    product.ProductPrice,
 			ProductDetail:   product.ProductDetail,
-			CreatedAt:       product.CreatedAt,
+			CreatedAt:       product.CreatedAt.Format("2006-01-02 15:04:05"),
 			PhotoUrl:        photoUrl,
 		}
 	}
 	reProjectDetail.ProductInfo = &reProduct
 	// 招募要求
 	reProjectDetail.TalentType = project.TalentType
-	reProjectDetail.RecruitDdl = project.RecruitDdl
+	reProjectDetail.RecruitDdl = project.RecruitDdl.Format("2006-01-02 15:04:05")
 	reProjectDetail.ProjectForm = project.ProjectForm
 	reProjectDetail.ContentType = project.ContentType
 	reProjectDetail.ProjectDetail = project.ProjectDetail
@@ -471,6 +471,22 @@ func (s ProjectService) GetProjectDetail(projectId string) (*vo.ReProjectDetail,
 	return &reProjectDetail, nil
 }
 
+// 种草提交审核
+func (s ProjectService) ProjectToReview(projectUpdateParam *vo.ProjectUpdateParam) (*string, error) {
+	projectId := projectUpdateParam.ProjectID
+	t := time.Now()
+	updateProject := entity.Project{
+		ProjectId:     projectId,
+		ProjectStatus: 2,
+		UpdatedAt:     t,
+	}
+	err := dao.ProjectDAO{}.UpdateProject(updateProject)
+	if err != nil {
+		return nil, err
+	}
+	return &projectId, nil
+}
+
 // 公开种草任务列表
 func (s ProjectService) GetProjectTaskList(param *vo.ProjectSearchParam) (vo.ResultVO, error) {
 	if param.Page == 0 {

+ 20 - 4
app/service/selection_info_service.go

@@ -303,8 +303,8 @@ func (s SelectionInfoService) GetSelectionDetail(selectionId string) (*vo.ReSele
 	reSelectionDetail.SelectionId = selectionId
 	reSelectionDetail.SelectionStatus = selection.SelectionStatus
 	reSelectionDetail.SelectionPlatform = selection.Platform
-	reSelectionDetail.CreatedAt = selection.CreatedAt
-	reSelectionDetail.SubmitAt = selection.SubmitAt
+	reSelectionDetail.CreatedAt = selection.CreatedAt.Format("2006-01-02 15:04:05")
+	reSelectionDetail.SubmitAt = selection.SubmitAt.Format("2006-01-02 15:04:05")
 	var creatorName, phone string
 	var rewardSum float64
 	if selection.SubAccountId == 0 {
@@ -337,13 +337,13 @@ func (s SelectionInfoService) GetSelectionDetail(selectionId string) (*vo.ReSele
 			ProductCategory: product.ProductCategory,
 			ProductPrice:    product.ProductPrice,
 			ProductDetail:   product.ProductDetail,
-			CreatedAt:       product.CreatedAt,
+			CreatedAt:       product.CreatedAt.Format("2006-01-02 15:04:05"),
 			PhotoUrl:        photoUrl,
 		}
 	}
 	reSelectionDetail.ProductInfo = &reProduct
 	// 样品奖励
-	reSelectionDetail.TaskDdl = selection.TaskDdl
+	reSelectionDetail.TaskDdl = selection.TaskDdl.Format("2006-01-02 15:04:05")
 	reSelectionDetail.SampleNum = selection.SampleNum
 	var freeStrategyPreviews []*vo.FreeStrategyPreview // 领样策略
 	freeStrategys, err := dao.FreeStrategyDao{}.GetFreeStrategyBySelectionId(selectionId)
@@ -399,6 +399,22 @@ func (s SelectionInfoService) GetSelectionDetail(selectionId string) (*vo.ReSele
 	return &reSelectionDetail, nil
 }
 
+// 电商带货提交审核
+func (s SelectionInfoService) SelectionToReview(selectionUpdateParam *vo.SelectionInfoUpdateParam) (*string, error) {
+	selectionId := selectionUpdateParam.SelectionID
+	t := time.Now()
+	updateSelection := entity.SelectionInfo{
+		SelectionID:     selectionId,
+		SelectionStatus: 2,
+		UpdatedAt:       t,
+	}
+	err := dao.SelectionInfoDAO{}.UpdateSelectionInfo(updateSelection)
+	if err != nil {
+		return nil, err
+	}
+	return &selectionId, nil
+}
+
 // 电商带货任务列表
 func (s SelectionInfoService) GetSelectionTaskList(param *vo.SelectionSearchParam) (vo.ResultVO, error) {
 	if param.Page == 0 {

+ 8 - 0
app/vo/TalentCancelParam.go

@@ -0,0 +1,8 @@
+package vo
+
+type TalentCancelParam struct {
+	TaskId       string   `json:"task_id"`
+	TaskIds      []string `json:"task_ids"`
+	RealPayment  float64  `json:"real_payment"`
+	CancelReason string   `json:"cancel_reason"`
+}

+ 15 - 0
app/vo/default_search_param.go

@@ -0,0 +1,15 @@
+package vo
+
+type DefaultSearchParam struct {
+	EnterpriseId string `json:"enterprise_id"`
+	SubAccountId int64  `json:"sub_account_id"`
+	Page         int    `json:"page"`
+	PageSize     int    `json:"page_size"`
+	Platform     int64  `json:"platform"`
+	ProjectType  int64  `json:"project_type"` // 任务类型,0全部 1品牌种草,2本地生活
+	DefaultType  int64  `json:"default_type"` // 违约类型 1未传初稿 2未发作品 3未传数据 4终止合作 5已解约
+
+	TaskId string `json:"task_id"` // 任务ID
+	//ProjectName string `json:"project_name"` // 任务标题
+	//CreatorName string `json:"creator_name"` // 创建者
+}

+ 9 - 10
app/vo/re_project_detail.go

@@ -1,26 +1,25 @@
 package vo
 
 import (
-	"time"
 	"youngee_b_api/app/entity"
 )
 
 type ReProjectDetail struct {
 	// 系统信息
-	ProjectId         string    `json:"projectId"`           // 项目id 生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
-	ProjectStatus     int64     `json:"projectStatus"`       // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
-	ProjectPlatform   int64     `json:"projectPlatform"`     //  项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
-	CreatedAt         time.Time `json:"createdAt"`           // 创建时间
-	CreatorName       string    `json:"creatorName"`         // 创建者
-	Phone             string    `json:"phone"`               // 联系方式
-	EstimatedCost     float64   `json:"estimatedCost"`       // 成本预估
-	ServiceChargeRate float64   `json:"service_charge_rate"` // 公开服务费率
+	ProjectId         string  `json:"projectId"`           // 项目id 生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
+	ProjectStatus     int64   `json:"projectStatus"`       // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	ProjectPlatform   int64   `json:"projectPlatform"`     //  项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
+	CreatedAt         string  `json:"createdAt"`           // 创建时间
+	CreatorName       string  `json:"creatorName"`         // 创建者
+	Phone             string  `json:"phone"`               // 联系方式
+	EstimatedCost     float64 `json:"estimatedCost"`       // 成本预估
+	ServiceChargeRate float64 `json:"service_charge_rate"` // 公开服务费率
 	// 支付方式参数待定
 	// 关联商品
 	ProductInfo *ReTaskProduct `json:"productInfo"`
 	// 招募要求
 	TalentType       string                    `json:"talentType"`
-	RecruitDdl       time.Time                 `json:"recruitDdl"`
+	RecruitDdl       string                    `json:"recruitDdl"`
 	ProjectForm      int64                     `json:"projectForm"`
 	ContentType      int64                     `json:"contentType"`
 	ProjectDetail    string                    `json:"projectDetail"`

+ 14 - 16
app/vo/re_project_task_preview.go

@@ -1,25 +1,23 @@
 package vo
 
-import "time"
-
 type ReProjectTaskPreview struct {
 	ProductId    int64   `json:"productId"`
 	MainImage    string  `json:"mainImage"`
 	ProductName  string  `json:"productName"`
 	ProductPrice float64 `json:"productPrice"`
 
-	EnterpriseId    string    `json:"enterpriseId"`
-	SubAccountId    int64     `json:"subAccountId"`
-	ProjectId       string    `json:"projectId"`
-	ProjectPlatform int64     `json:"projectPlatform"`
-	ProjectStatus   int64     `json:"projectStatus"`
-	EstimatedCost   float64   `json:"estimatedCost"`
-	ProjectForm     int64     `json:"projectForm"`
-	ContentType     int64     `json:"contentType"`
-	NeedReview      int64     `json:"needReview"`
-	NeedQuality     int64     `json:"needQuality"`
-	NeedCalculate   int64     `json:"needCalculate"`
-	CreatorName     string    `json:"creatorName"`
-	ProjectType     int64     `json:"projectType"`
-	CreatedAt       time.Time `json:"createdAt"`
+	EnterpriseId    string  `json:"enterpriseId"`
+	SubAccountId    int64   `json:"subAccountId"`
+	ProjectId       string  `json:"projectId"`
+	ProjectPlatform int64   `json:"projectPlatform"`
+	ProjectStatus   int64   `json:"projectStatus"`
+	EstimatedCost   float64 `json:"estimatedCost"`
+	ProjectForm     int64   `json:"projectForm"`
+	ContentType     int64   `json:"contentType"`
+	NeedReview      int64   `json:"needReview"`
+	NeedQuality     int64   `json:"needQuality"`
+	NeedCalculate   int64   `json:"needCalculate"`
+	CreatorName     string  `json:"creatorName"`
+	ProjectType     int64   `json:"projectType"`
+	CreatedAt       string  `json:"createdAt"`
 }

+ 9 - 10
app/vo/re_selection_detail.go

@@ -1,25 +1,24 @@
 package vo
 
 import (
-	"time"
 	"youngee_b_api/app/entity"
 )
 
 type ReSelectionDetail struct {
 	// 系统信息
-	SelectionId       string    `json:"selectionId"`       // 项目id 生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
-	SelectionStatus   int64     `json:"selectionStatus"`   // 项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
-	SelectionPlatform int64     `json:"selectionPlatform"` //  项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
-	CreatedAt         time.Time `json:"createdAt"`         // 创建时间
-	CreatorName       string    `json:"creatorName"`       // 创建者
-	Phone             string    `json:"phone"`             // 联系方式
-	RewardSum         float64   `json:"rewardSum"`         // 悬赏池总金额
-	SubmitAt          time.Time `json:"submitAt"`          // 提交审核时间
+	SelectionId       string  `json:"selectionId"`       // 项目id 生成规则:年(2位)+一年中的第几天(3位)+5位数随机数,雪花算法也可,生成10位订单号
+	SelectionStatus   int64   `json:"selectionStatus"`   // 项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
+	SelectionPlatform int64   `json:"selectionPlatform"` //  项目平台,1-7分别代表红book、抖音、微博、快手、b站、大众点评、知乎
+	CreatedAt         string  `json:"createdAt"`         // 创建时间
+	CreatorName       string  `json:"creatorName"`       // 创建者
+	Phone             string  `json:"phone"`             // 联系方式
+	RewardSum         float64 `json:"rewardSum"`         // 悬赏池总金额
+	SubmitAt          string  `json:"submitAt"`          // 提交审核时间
 	// 支付方式参数待定
 	// 关联商品
 	ProductInfo *ReTaskProduct `json:"productInfo"`
 	// 样品奖励
-	TaskDdl         time.Time                `json:"taskDdl"`
+	TaskDdl         string                   `json:"taskDdl"`
 	SampleNum       int64                    `json:"sampleNum"` // 样品数量
 	FreeStrategys   []*FreeStrategyPreview   // 领样策略
 	RewardStrategys []*RewardStrategyPreview // 悬赏策略

+ 12 - 14
app/vo/re_selection_task_preview.go

@@ -1,23 +1,21 @@
 package vo
 
-import "time"
-
 type ReSelectionTaskPreview struct {
 	ProductId    int64   `json:"productId"`
 	MainImage    string  `json:"mainImage"`
 	ProductName  string  `json:"productName"`
 	ProductPrice float64 `json:"productPrice"`
 
-	EnterpriseId      string    `json:"enterpriseId"`
-	SubAccountId      int64     `json:"subAccountId"`
-	SelectionId       string    `json:"selectionId"`
-	SelectionPlatform int64     `json:"selectionPlatform"`
-	SelectionStatus   int64     `json:"selectionStatus"`
-	CreatedAt         time.Time `json:"createdAt"`
-	TaskDdl           time.Time `json:"taskDdl"`
-	SampleNum         int64     `json:"sampleNum"` // 样品数量
-	Reward            float64   `json:"reward"`    // 悬赏池总金额
-	EnrollNum         int64     `json:"enrollNum"` // 报名数量
-	ChooseNum         int64     `json:"chooseNum"` // 已选数量
-	CreatorName       string    `json:"creatorName"`
+	EnterpriseId      string  `json:"enterpriseId"`
+	SubAccountId      int64   `json:"subAccountId"`
+	SelectionId       string  `json:"selectionId"`
+	SelectionPlatform int64   `json:"selectionPlatform"`
+	SelectionStatus   int64   `json:"selectionStatus"`
+	CreatedAt         string  `json:"createdAt"`
+	TaskDdl           string  `json:"taskDdl"`
+	SampleNum         int64   `json:"sampleNum"` // 样品数量
+	Reward            float64 `json:"reward"`    // 悬赏池总金额
+	EnrollNum         int64   `json:"enrollNum"` // 报名数量
+	ChooseNum         int64   `json:"chooseNum"` // 已选数量
+	CreatorName       string  `json:"creatorName"`
 }

+ 16 - 0
app/vo/re_talent_default.go

@@ -0,0 +1,16 @@
+package vo
+
+type ReTalentDefault struct {
+	TalentId     string  `json:"talentId"`
+	OpenId       string  `json:"openId"` // 表platform_kuaishou_user_info
+	NickName     string  `json:"nickName"`
+	HeadUri      string  `json:"headUri"`
+	City         string  `json:"city"`
+	TalentPhone  string  `json:"talentPhone"`  // 表youngee_talent_info
+	TaskId       string  `json:"taskId"`       // 任务id
+	DraftFee     float64 `json:"draftFee"`     // 稿费价格
+	SettleAmount float64 `json:"settleAmount"` // 结算金额
+	DefaultTime  string  `json:"defaultTime"`  // 违约时间
+	Reason       string  `json:"reason"`       // 终止理由或解约原因
+	OperatorName string  `json:"operatorName"` // 操作人
+}

+ 12 - 12
app/vo/re_task_default_public.go

@@ -6,17 +6,17 @@ type ReTaskDefaultPublic struct {
 	ProductName  string  `json:"productName"`
 	ProductPrice float64 `json:"productPrice"`
 
-	EnterpriseId     string `json:"enterpriseId"`
-	SubAccountId     int64  `json:"subAccountId"`
-	TaskId           string `json:"taskId"`
-	TaskType         string `json:"taskType"` // 任务类型
-	Platform         int64  `json:"platform"`
-	TaskForm         int64  `json:"taskForm"`    // 任务形式
-	ContentType      int64  `json:"contentType"` // 内容形式
-	CreatorName      string `json:"creatorName"`
-	NoSketchNum      int64  `json:"sampleNum"` // 未传初稿
-	NoLinkNum        int64  `json:"reward"`    // 未发作品
-	NoDataNum        int64  `json:"enrollNum"` // 未传数据
-	NoCooperationNum int64  `json:"chooseNum"` // 终止合作
+	EnterpriseId      string `json:"enterpriseId"`
+	SubAccountId      int64  `json:"subAccountId"`
+	TaskId            string `json:"taskId"`
+	TaskType          int64  `json:"taskType"` // 任务类型 1品牌种草 2本地生活
+	Platform          int64  `json:"platform"`
+	TaskForm          int64  `json:"taskForm"`    // 任务形式
+	ContentType       int64  `json:"contentType"` // 内容形式
+	CreatorName       string `json:"creatorName"`
+	NoSketchNum       int64  `json:"sampleNum"` // 未传初稿
+	NoLinkNum         int64  `json:"reward"`    // 未发作品
+	NoDataNum         int64  `json:"enrollNum"` // 未传数据
+	EndCooperationNum int64  `json:"chooseNum"` // 终止合作
 
 }

+ 10 - 10
app/vo/re_task_default_target.go

@@ -6,15 +6,15 @@ type ReTaskDefaultTarget struct {
 	ProductName  string  `json:"productName"`
 	ProductPrice float64 `json:"productPrice"`
 
-	EnterpriseId     string `json:"enterpriseId"`
-	SubAccountId     int64  `json:"subAccountId"`
-	TaskId           string `json:"taskId"`
-	TaskType         string `json:"taskType"` // 任务类型
-	Platform         int64  `json:"platform"`
-	TaskForm         int64  `json:"taskForm"`    // 任务形式
-	ContentType      int64  `json:"contentType"` // 内容形式
-	CreatorName      string `json:"creatorName"`
-	Tools            string `json:"tools"`     // 工具选择
-	NoCooperationNum int64  `json:"chooseNum"` // 终止合作
+	EnterpriseId      string `json:"enterpriseId"`
+	SubAccountId      int64  `json:"subAccountId"`
+	TaskId            string `json:"taskId"`
+	TaskType          int64  `json:"taskType"` // 任务类型 1品牌种草 2本地生活
+	Platform          int64  `json:"platform"`
+	TaskForm          int64  `json:"taskForm"`    // 任务形式
+	ContentType       int64  `json:"contentType"` // 内容形式
+	CreatorName       string `json:"creatorName"`
+	Tools             string `json:"tools"`     // 工具选择
+	EndCooperationNum int64  `json:"chooseNum"` // 终止合作
 
 }

+ 8 - 10
app/vo/re_task_product.go

@@ -1,14 +1,12 @@
 package vo
 
-import "time"
-
 type ReTaskProduct struct {
-	ProductID       int64     `json:"productId"`
-	ProductName     string    `json:"productName"`
-	ProductType     int64     `json:"productType"`
-	ProductCategory string    `json:"productCategory"`
-	ProductPrice    float64   `json:"productPrice"`
-	ProductDetail   string    `json:"productDetail"`
-	CreatedAt       time.Time `json:"createdAt"`
-	PhotoUrl        string    `json:"photoUrl"`
+	ProductID       int64   `json:"productId"`
+	ProductName     string  `json:"productName"`
+	ProductType     int64   `json:"productType"`
+	ProductCategory string  `json:"productCategory"`
+	ProductPrice    float64 `json:"productPrice"`
+	ProductDetail   string  `json:"productDetail"`
+	CreatedAt       string  `json:"createdAt"`
+	PhotoUrl        string  `json:"photoUrl"`
 }

+ 10 - 0
route/init.go

@@ -169,12 +169,14 @@ func InitRoute(r *gin.Engine) {
 	task := r.Group("/youngee/b/task")
 	{
 		task.Use(middleware.LoginAuthMiddleware)
+
 		task.POST("/product/findAll", controller.TaskController{}.GetAllProduct) // 关联商品-已有商品展示
 		task.POST("/product/create", controller.TaskController{}.CreateProduct)  // 关联商品-新建商品
 
 		task.POST("/selection/create", controller.TaskController{}.CreateSelection)      // 创建带货任务
 		task.POST("/selection/update", controller.TaskController{}.UpdateSelection)      // 更新带货任务(样品奖励、补充信息)
 		task.POST("/selection/detail", controller.TaskController{}.GetSelectionDetail)   // 电商带货任务预览
+		task.POST("/selection/toReview", controller.TaskController{}.SelectionToReview)  // 电商带货提交审核
 		task.POST("/selection/task/list", controller.TaskController{}.SelectionTaskList) // 电商带货任务列表
 		task.POST("/selection/del", controller.TaskController{}.SelectionDel)            // 删除带货任务
 		task.POST("/selection/check", controller.TaskController{}.CheckSelectionInfo)    // 电商带货任务审核
@@ -183,11 +185,19 @@ func InitRoute(r *gin.Engine) {
 		task.POST("/project/update", controller.TaskController{}.UpdateProject)              // 更新种草任务
 		task.POST("/project/target/update", controller.TaskController{}.UpdateProjectTarget) // 更新定向种草任务
 		task.POST("/project/detail", controller.TaskController{}.GetProjectDetail)           // 品牌种草任务预览
+		task.POST("/project/toReview", controller.TaskController{}.ProjectToReview)          // 种草提交审核
 		task.POST("/project/task/list", controller.TaskController{}.ProjectTaskList)         // 公开种草任务列表
 		task.POST("/project/del", controller.TaskController{}.ProjectDel)                    // 删除种草任务
 
 		task.POST("/draft/selection/list", controller.TaskController{}.GetSelectionDraftList) // 草稿箱——电商带货列表
 		task.POST("/draft/project/list", controller.TaskController{}.GetProjectDraftList)     // 草稿箱——品牌种草列表
 
+		task.POST("/default/public/list", controller.TaskController{}.GetPublicDefaultList)              // 违约管理——公开任务列表
+		task.POST("/default/public/talent/list", controller.TaskController{}.GetPublicDefaultTalentList) // 违约管理——公开任务-违约达人列表
+		task.POST("/default/target/list", controller.TaskController{}.GetTargetDefaultList)              // 违约管理——定向任务列表
+		task.POST("/default/target/talent/list", controller.TaskController{}.GetTargetDefaultTalentList) // 违约管理——定向任务-违约达人列表
+		task.POST("/default/talent/cancel", controller.TaskController{}.CancelTalent)                    // 违约管理——达人解约
+		task.POST("/default/talent/cancel/list", controller.TaskController{}.CancelTalentList)           // 违约管理——达人批量解约
+
 	}
 }