Parcourir la source

任务管理-电商带货&公开品牌种草

Ethan il y a 7 mois
Parent
commit
596f1c1fff

+ 79 - 1
app/controller/task_controller.go

@@ -115,6 +115,45 @@ func (t TaskController) GetSelectionDetail(c *gin.Context) {
 	returnSuccess(c, 20000, res)
 }
 
+// 电商带货任务列表
+func (t TaskController) SelectionTaskList(c *gin.Context) {
+	param := &vo.SelectionSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.SelectionInfoService{}.GetSelectionTaskList(param)
+	if err != nil {
+		logrus.Errorf("[SelectionTaskList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 删除带货任务
+func (t TaskController) SelectionDel(c *gin.Context) {
+	param := &vo.SelectionSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	selectionId, err := service.SelectionInfoService{}.DeleteSelection(param.SelectionId)
+	if err != nil {
+		logrus.Errorf("[SelectionDel] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string]string)
+	resultMap["selectionId"] = *selectionId
+	returnSuccess(c, 20000, resultMap)
+}
+
 // 电商带货任务审核
 func (t TaskController) CheckSelectionInfo(c *gin.Context) {
 	//data := &vo.ContentCheckParam{}
@@ -245,10 +284,49 @@ func (t TaskController) GetProjectDetail(c *gin.Context) {
 	}
 	res, err := service.ProjectService{}.GetProjectDetail(data.ProjectId)
 	if err != nil {
-		logrus.Errorf("[GetSelectionDetail] call Show err:%+v\n", err)
+		logrus.Errorf("[GetProjectDetail] call Show err:%+v\n", err)
 		returnError(c, 40000, "error")
 		return
 	}
 
 	returnSuccess(c, 20000, res)
 }
+
+// 公开种草任务列表
+func (t TaskController) ProjectTaskList(c *gin.Context) {
+	param := &vo.ProjectSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	res, err := service.ProjectService{}.GetProjectTaskList(param)
+	if err != nil {
+		logrus.Errorf("[ProjectTaskList] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+
+	returnSuccess(c, 20000, res)
+}
+
+// 删除种草任务
+func (t TaskController) ProjectDel(c *gin.Context) {
+	param := &vo.ProjectSearchParam{}
+	err := c.BindJSON(param)
+	if err != nil {
+		logrus.Errorf("Request bind err:%+v\n", err)
+		returnError(c, 40000, "参数错误")
+		return
+	}
+	projectId, err := service.ProjectService{}.DeleteProject(param.ProjectId)
+	if err != nil {
+		logrus.Errorf("[ProjectDel] call Show err:%+v\n", err)
+		returnError(c, 40000, "error")
+		return
+	}
+	resultMap := make(map[string]string)
+	resultMap["projectId"] = *projectId
+	returnSuccess(c, 20000, resultMap)
+}

+ 11 - 0
app/dao/enterprise_dao.go

@@ -1,3 +1,14 @@
 package dao
 
+import "youngee_b_api/app/entity"
+
 type EnterpriseDao struct{}
+
+func (d EnterpriseDao) GetEnterprise(enterpriseId string) (*entity.Enterprise, error) {
+	var enterprise entity.Enterprise
+	err := Db.Model(&entity.Enterprise{}).Where("enterprise_id = ?", enterpriseId).Select("business_name, user_id").First(&enterprise).Error
+	if err != nil {
+		return nil, err
+	}
+	return &enterprise, nil
+}

+ 1 - 1
app/dao/project_brief_dao.go

@@ -25,7 +25,7 @@ func (p ProjectBriefDao) CreateProjectBrief(briefInfo entity.ProjectBrief) error
 
 func (p ProjectBriefDao) GetProjectBriefInfo(projectId string) ([]*entity.ProjectBrief, error) {
 	var projectBriefInfos []*entity.ProjectBrief
-	err := Db.Model(entity.ProjectBrief{}).Where("project_id = ?", projectId).Find(&projectBriefInfos).Error
+	err := Db.Model(entity.ProjectBrief{}).Where("project_id = ?", projectId).Order("created_at asc").Find(&projectBriefInfos).Error
 	if err != nil {
 		logrus.Errorf("[GetProjectBriefInfo] error query mysql, err:%+v", err)
 		return nil, err

+ 72 - 0
app/dao/project_dao.go

@@ -5,6 +5,7 @@ import (
 	"gorm.io/gorm"
 	"time"
 	"youngee_b_api/app/entity"
+	"youngee_b_api/app/vo"
 )
 
 type ProjectDAO struct{}
@@ -36,6 +37,7 @@ func (d ProjectDAO) GetProjectListOfDay(enterpriseId string, date time.Time) ([]
 	return Projects, err
 }
 
+// 创建种草任务
 func (d ProjectDAO) CreateProject(project entity.Project) error {
 	err := Db.Omit("recruit_ddl", "auto_fail_at", "auto_script_break_at", "auto_sketch_break_at", "pay_at", "pass_at", "finish_at", "submit_at").Create(&project).Error
 	if err != nil {
@@ -44,6 +46,7 @@ func (d ProjectDAO) CreateProject(project entity.Project) error {
 	return nil
 }
 
+// 更新种草任务
 func (d ProjectDAO) UpdateProject(project entity.Project) error {
 	err := Db.Model(&entity.Project{}).Where("project_id = ?", project.ProjectId).Updates(project).Error
 	if err != nil {
@@ -51,3 +54,72 @@ func (d ProjectDAO) UpdateProject(project entity.Project) error {
 	}
 	return nil
 }
+
+// 获取种草任务列表
+func (d ProjectDAO) GetProjectPreviews(param *vo.ProjectSearchParam) ([]vo.ReProjectTaskPreview, int64, error) {
+	var reProjectTaskPreviews []vo.ReProjectTaskPreview
+	var projects []entity.Project
+	var total int64
+	query := Db.Model(&entity.Project{})
+	// 动态添加查询条件
+	if param.SubAccountId == 0 {
+		if param.EnterpriseId == "" {
+			return reProjectTaskPreviews, 0, errors.New("enterpriseId is empty")
+		}
+		query = query.Where("enterprise_id = ?", param.EnterpriseId)
+	} else {
+		query = query.Where("sub_account_id = ?", param.SubAccountId)
+	}
+	if param.ProjectType != 0 {
+		query = query.Where("project_type = ?", param.ProjectType)
+	}
+	if param.ProjectPlatform != 0 {
+		query = query.Where("project_platform = ?", param.ProjectPlatform)
+	}
+	if param.ProjectStatus != 0 {
+		query = query.Where("project_status = ?", param.ProjectStatus)
+	}
+	if param.ProjectForm != 0 {
+		query = query.Where("project_form = ?", param.ProjectForm)
+	}
+	if param.ContentType != 0 {
+		query = query.Where("content_type = ?", param.ContentType)
+	}
+	query.Count(&total)
+	query = query.Select("enterprise_id, sub_account_id, project_id, project_platform, project_status, estimated_cost, project_form, content_type, need_review, need_quality, need_calculate, 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 {
+		reProjectTaskPreview := vo.ReProjectTaskPreview{
+			EnterpriseId:    project.EnterpriseID,
+			SubAccountId:    project.SubAccountId,
+			ProjectId:       project.ProjectId,
+			ProjectPlatform: project.ProjectPlatform,
+			ProjectStatus:   project.ProjectStatus,
+			EstimatedCost:   project.EstimatedCost,
+			ProjectForm:     project.ProjectForm,
+			ContentType:     project.ContentType,
+			NeedReview:      project.NeedReview,
+			NeedQuality:     project.NeedQuality,
+			NeedCalculate:   project.NeedCalculate,
+			ProductId:       project.ProductID,
+		}
+		reProjectTaskPreviews = append(reProjectTaskPreviews, reProjectTaskPreview)
+	}
+
+	return reProjectTaskPreviews, total, nil
+}
+
+// 删除种草任务
+func (d ProjectDAO) DeleteProject(projectId string) (*string, error) {
+	if projectId == "" {
+		return &projectId, nil
+	}
+	err := Db.Where("project_id = ?", projectId).Delete(&entity.Project{}).Error
+	if err != nil {
+		return nil, err
+	}
+	return &projectId, nil
+}

+ 1 - 1
app/dao/project_material_dao.go

@@ -25,7 +25,7 @@ func (d ProjectMaterialDao) CreateProjectMaterial(projectMaterial entity.Project
 
 func (d ProjectMaterialDao) GetProjectMaterialInfo(projectId string) ([]*entity.ProjectMaterial, error) {
 	var projectMaterialInfos []*entity.ProjectMaterial
-	err := Db.Model(entity.ProjectMaterial{}).Where("project_id = ?", projectId).Find(&projectMaterialInfos).Error
+	err := Db.Model(entity.ProjectMaterial{}).Where("project_id = ?", projectId).Order("created_at asc").Find(&projectMaterialInfos).Error
 	if err != nil {
 		logrus.Errorf("[GetProjectMaterialInfo] error query, err:%+v", err)
 		return nil, err

+ 1 - 1
app/dao/recruit_strategy_dao.go

@@ -25,7 +25,7 @@ func (d RecruitStrategyDao) CreateRecruitStrategy(recruitStrategys []entity.Recr
 
 func (d RecruitStrategyDao) GetRecruitStrategyByProjectId(projectId string) ([]*entity.RecruitStrategy, error) {
 	var recruitStrategys []*entity.RecruitStrategy
-	err := Db.Model(entity.RecruitStrategy{}).Where("project_id = ?", projectId).Find(&recruitStrategys).Error
+	err := Db.Model(entity.RecruitStrategy{}).Where("project_id = ?", projectId).Order("strategy_id asc").Find(&recruitStrategys).Error
 	if err != nil {
 		logrus.Errorf("[GetRecruitStrategyByProjectId] error query, err:%+v", err)
 		return nil, err

+ 74 - 0
app/dao/selection_info_dao.go

@@ -5,6 +5,7 @@ import (
 	"gorm.io/gorm"
 	"time"
 	"youngee_b_api/app/entity"
+	"youngee_b_api/app/vo"
 )
 
 type SelectionInfoDAO struct{}
@@ -36,6 +37,7 @@ func (d SelectionInfoDAO) GetSelectionInfoListOfDay(enterpriseId string, date ti
 	return selectionInfos, err
 }
 
+// 创建带货任务
 func (d SelectionInfoDAO) CreateSelectionInfo(selectionInfo entity.SelectionInfo) error {
 	err := Db.Omit("task_ddl", "submit_at", "pass_at", "pay_at", "finish_at", "auto_fail_at").Create(&selectionInfo).Error
 	if err != nil {
@@ -44,6 +46,7 @@ func (d SelectionInfoDAO) CreateSelectionInfo(selectionInfo entity.SelectionInfo
 	return nil
 }
 
+// 更新带货任务
 func (d SelectionInfoDAO) UpdateSelectionInfo(selectionInfo entity.SelectionInfo) error {
 	err := Db.Model(&entity.SelectionInfo{}).Where("selection_id = ?", selectionInfo.SelectionID).Updates(selectionInfo).Error
 	if err != nil {
@@ -51,3 +54,74 @@ func (d SelectionInfoDAO) UpdateSelectionInfo(selectionInfo entity.SelectionInfo
 	}
 	return nil
 }
+
+// 获取带货任务列表
+func (d ProjectDAO) GetSelectionPreviews(param *vo.SelectionSearchParam) ([]vo.ReSelectionTaskPreview, int64, error) {
+	var reSelectionTaskPreviews []vo.ReSelectionTaskPreview
+	var selectionInfos []entity.SelectionInfo
+	var total int64
+	query := Db.Model(&entity.SelectionInfo{})
+	// 动态添加查询条件
+	if param.SubAccountId == 0 {
+		if param.EnterpriseId == "" {
+			return reSelectionTaskPreviews, 0, errors.New("enterpriseId is empty")
+		}
+		query = query.Where("enterprise_id = ?", param.EnterpriseId)
+	} else {
+		query = query.Where("sub_account_id = ?", param.SubAccountId)
+	}
+	if param.SelectionPlatform != 0 {
+		query = query.Where("platform = ?", param.SelectionPlatform)
+	}
+	if param.SelectionStatus != 0 {
+		query = query.Where("selection_status = ?", param.SelectionStatus)
+	}
+	// sample_mode 1、2、3分别表示免费领样(有领样策略)、垫付领样(3.0不用)、不提供样品(无领样策略)
+	if param.FreeFlag == 1 {
+		query = query.Where("sample_mode = ?", 1)
+	} else if param.FreeFlag == 2 {
+		query = query.Where("sample_mode = ?", 3)
+	}
+	// task_mode  1、2分别表示悬赏任务(有悬赏策略)、纯佣带货(无悬赏策略)
+	if param.RewardFlag == 1 {
+		query = query.Where("task_mode = ?", 1)
+	} else if param.RewardFlag == 2 {
+		query = query.Where("task_mode = ?", 2)
+	}
+	query.Count(&total)
+	query = query.Select("enterprise_id, sub_account_id, selection_id, platform, selection_status, created_at, task_ddl, sample_num, enroll_num, choose_num, product_id")
+	offset := (param.Page - 1) * param.PageSize
+	if err := query.Order("created_at asc").Offset(offset).Limit(param.PageSize).Find(&selectionInfos).Error; err != nil {
+		return nil, 0, err
+	}
+	for _, selectionInfo := range selectionInfos {
+		reSelectionTaskPreview := vo.ReSelectionTaskPreview{
+			EnterpriseId:      selectionInfo.EnterpriseID,
+			SubAccountId:      selectionInfo.SubAccountId,
+			SelectionId:       selectionInfo.SelectionID,
+			SelectionPlatform: selectionInfo.Platform,
+			SelectionStatus:   selectionInfo.SelectionStatus,
+			CreatedAt:         selectionInfo.CreatedAt,
+			TaskDdl:           selectionInfo.TaskDdl,
+			SampleNum:         selectionInfo.SampleNum,
+			EnrollNum:         selectionInfo.EnrollNum,
+			ChooseNum:         selectionInfo.ChooseNum,
+			ProductId:         selectionInfo.ProductID,
+		}
+		reSelectionTaskPreviews = append(reSelectionTaskPreviews, reSelectionTaskPreview)
+	}
+
+	return reSelectionTaskPreviews, total, nil
+}
+
+// 删除带货任务
+func (d SelectionInfoDAO) DeleteSelection(selectionId string) (*string, error) {
+	if selectionId == "" {
+		return &selectionId, nil
+	}
+	err := Db.Where("selection_id = ?", selectionId).Delete(&entity.SelectionInfo{}).Error
+	if err != nil {
+		return nil, err
+	}
+	return &selectionId, nil
+}

+ 14 - 0
app/dao/sub_account_dao.go

@@ -0,0 +1,14 @@
+package dao
+
+import "youngee_b_api/app/entity"
+
+type SubAccountDao struct{}
+
+func (d SubAccountDao) GetSubAccount(subAccountId int64) (*entity.SubAccount, error) {
+	var subAccount entity.SubAccount
+	err := Db.Model(&entity.SubAccount{}).Where("sub_account_id = ?", subAccountId).Select("sub_account_name, user_id").First(&subAccount).Error
+	if err != nil {
+		return nil, err
+	}
+	return &subAccount, nil
+}

+ 14 - 0
app/dao/user_dao.go

@@ -0,0 +1,14 @@
+package dao
+
+import "youngee_b_api/app/entity"
+
+type UserDao struct{}
+
+func (d UserDao) GetPhoneByUserId(userId int64) (string, error) {
+	var user entity.User
+	err := Db.Model(&entity.User{}).Where("id = ?", userId).Select("phone").First(&user).Error
+	if err != nil {
+		return "", err
+	}
+	return user.Phone, nil
+}

+ 1 - 1
app/entity/enterprise.go

@@ -9,7 +9,7 @@ type Enterprise struct {
 	EnterpriseID     string    `gorm:"column:enterprise_id"`     // 企业id,用户ID的生成规则为:1(企业用户代码)+分秒数字+四位随机数字
 	Industry         int64     `gorm:"column:industry"`          // 行业,1-14分别代表能源、化工、材料、机械设备/军工、企业服务/造纸印刷、运输设备、旅游酒店、媒体/信息通信服务、批发/零售、消费品、卫生保健/医疗、金融、建材/建筑/房地产、公共事业
 	BusinessName     string    `gorm:"column:business_name"`     // 公司或组织名称
-	UserID           int64     `gorm:"column:user_id"`           // 对应用户id
+	UserId           int64     `gorm:"column:user_id"`           // 对应用户id
 	Balance          float64   `gorm:"column:balance"`           // 账户余额
 	FrozenBalance    float64   `gorm:"column:frozen_balance"`    // 冻结余额
 	AvailableBalance float64   `gorm:"column:available_balance"` // 可用余额

+ 4 - 0
app/entity/project.go

@@ -40,6 +40,10 @@ type Project struct {
 	SettlementAmount  float64   `gorm:"column:settlement_amount"`              // 结算金额
 	ProductSnap       string    `gorm:"column:product_snap"`                   // 商品信息快照
 	ProductPhotoSnap  string    `gorm:"column:product_photo_snap"`             // 商品图片快照
+	NeedReview        int64     `gorm:"column:need_review"`                    // 待审稿
+	NeedQuality       int64     `gorm:"column:need_quality"`                   // 待质检
+	NeedCalculate     int64     `gorm:"column:need_calculate"`                 // 待结算
+	ServiceChargeRate float64   `gorm:"column:service_charge_rate"`            // 公开服务费率
 }
 
 func (m *Project) TableName() string {

+ 6 - 4
app/entity/selection_info.go

@@ -12,13 +12,14 @@ type SelectionInfo struct {
 	EnterpriseID     string    `gorm:"column:enterprise_id"`            // 所属企业id
 	SubAccountId     int64     `gorm:"column:sub_account_id"`           // 子账号id
 	ProductID        int64     `gorm:"column:product_id"`               // 关联商品id
-	ContentType      int64     `gorm:"column:content_type"`             // 内容形式,1代表图文,2代表视频,3代表直播
 	SelectionStatus  int64     `gorm:"column:selection_status"`         // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
-	TaskMode         int64     `gorm:"column:task_mode"`                // 任务形式,1、2分别表示悬赏任务、纯佣带货
 	Platform         int64     `gorm:"column:platform"`                 // 项目平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SampleNum        int64     `gorm:"column:sample_num"`               // 样品数量
+	TaskDdl          time.Time `gorm:"column:task_ddl"`                 // 招募截止时间
+	ContentType      int64     `gorm:"column:content_type"`             // 内容形式,1代表图文,2代表视频,3代表直播
+	TaskMode         int64     `gorm:"column:task_mode"`                // 任务形式,1、2分别表示悬赏任务、纯佣带货
 	SampleMode       int64     `gorm:"column:sample_mode"`              // 领样形式,1、2分别表示免费领样、垫付领样
 	ProductUrl       string    `gorm:"column:product_url"`              // 带货链接
-	SampleNum        int64     `gorm:"column:sample_num"`               // 样品数量
 	RemainNum        int64     `gorm:"column:remain_num"`               // 剩余数量
 	CommissionRate   float64   `gorm:"column:commission_rate"`          // 佣金比例
 	EstimatedCost    float64   `gorm:"column:estimated_cost"`           // 预估成本
@@ -26,7 +27,6 @@ type SelectionInfo struct {
 	SampleCondition  string    `gorm:"column:sample_condition"`         // 领样条件
 	RewardCondition  string    `gorm:"column:reward_condition"`         // 返现悬赏条件
 	SettlementAmount float64   `gorm:"column:settlement_amount"`        // 结算金额
-	TaskDdl          time.Time `gorm:"column:task_ddl"`                 // 招募截止时间
 	Detail           string    `gorm:"column:detail"`                   // 卖点总结
 	ProductSnap      string    `gorm:"column:product_snap"`             // 商品信息快照
 	ProductPhotoSnap string    `gorm:"column:product_photo_snap"`       // 商品图片快照
@@ -41,6 +41,8 @@ type SelectionInfo struct {
 	AutoTaskID       int64     `gorm:"column:auto_task_id"`             // 定时任务id
 	AutoFailAt       time.Time `gorm:"column:auto_fail_at"`             // 失效自动处理时间
 	Status           int64     `gorm:"column:status"`                   // 选品是否删除 2代表删除
+	EnrollNum        int64     `gorm:"column:enroll_num"`               // 报名数量
+	ChooseNum        int64     `gorm:"column:choose_num"`               // 已选数量
 }
 
 func (m *SelectionInfo) TableName() string {

+ 19 - 0
app/entity/sub_account.go

@@ -0,0 +1,19 @@
+// Code generated by sql2gorm. DO NOT EDIT.
+package entity
+
+type SubAccount struct {
+	SubAccountId   int64  `gorm:"sub_account_id"`   // 子账号ID
+	PhoneNumber    string `gorm:"phone_number"`     // 手机号
+	SubAccountName string `gorm:"sub_account_name"` // 名称
+	JobId          int64  `gorm:"job_id"`           // 岗位ID
+	EnterpriseId   string `gorm:"enterprise_id"`    // 所属商家账号ID
+	AccountStatus  int64  `gorm:"account_status"`   // 账户状态,1为正常,2为已停用
+	SubAccountType int64  `gorm:"sub_account_type"` // 子账号类型,1为商家端子账号,2为管理后台子账号,3为服务商端子账号
+	SuperAdminId   int64  `gorm:"super_admin_id"`   // 管理后台子账号创建者ID
+	UserId         int64  `gorm:"user_id"`          // 用户表中ID
+	SupplierId     int64  `gorm:"supplier_id"`      // 所属服务商ID
+}
+
+func (m *SubAccount) TableName() string {
+	return "younggee_sub_account"
+}

+ 26 - 0
app/entity/user.go

@@ -0,0 +1,26 @@
+// Code generated by sql2gorm. DO NOT EDIT.
+package entity
+
+import (
+	"time"
+)
+
+type User struct {
+	ID            int64     `gorm:"column:id;primary_key;AUTO_INCREMENT"`  // 用户表id
+	User          string    `gorm:"column:user"`                           // 账号
+	Username      string    `gorm:"column:username"`                       // 后台用户名
+	Password      string    `gorm:"column:password"`                       // 用户密码
+	RealName      string    `gorm:"column:real_name"`                      // 真实姓名
+	Role          string    `gorm:"column:role"`                           // 角色 1,超级管理员; 2,管理员;3,企业用户
+	Phone         string    `gorm:"column:phone"`                          // 绑定手机
+	Email         string    `gorm:"column:email"`                          // 电子邮件
+	LastLoginTime time.Time `gorm:"column:last_login_time"`                // 最后一次登录时间
+	UserState     string    `gorm:"column:user_state;default:1;NOT NULL"`  // 0,禁用,1,正常
+	CreatedAt     time.Time `gorm:"column:created_at"`                     // 创建时间
+	UpdatedAt     time.Time `gorm:"column:updated_at"`                     // 更新时间
+	AuthStatus    int64     `gorm:"column:auth_status;default:1;NOT NULL"` // 商家认证状态,0未认证,1已认证
+}
+
+func (m *User) TableName() string {
+	return "younggee_user"
+}

+ 14 - 8
app/service/product_service.go

@@ -3,7 +3,6 @@ package service
 import (
 	"errors"
 	"time"
-	"youngee_b_api/app/consts"
 	"youngee_b_api/app/dao"
 	"youngee_b_api/app/entity"
 	"youngee_b_api/app/vo"
@@ -12,6 +11,12 @@ import (
 type ProductService struct{}
 
 func (p ProductService) GetTaskProductsByUserId(param vo.GetAllProductParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
 	var result vo.ResultVO
 	var products []entity.Product
 	var err error
@@ -36,13 +41,14 @@ func (p ProductService) GetTaskProductsByUserId(param vo.GetAllProductParam) (vo
 			photoUrl = ""
 		}
 		reProduct := vo.ReTaskProduct{
-			ProductID:     product.ProductID,
-			ProductName:   product.ProductName,
-			ProductType:   consts.GetProductType(product.ProductType),
-			ProductPrice:  product.ProductPrice,
-			ProductDetail: product.ProductDetail,
-			CreatedAt:     product.CreatedAt,
-			PhotoUrl:      photoUrl,
+			ProductID:       product.ProductID,
+			ProductName:     product.ProductName,
+			ProductType:     product.ProductType,
+			ProductCategory: product.ProductCategory,
+			ProductPrice:    product.ProductPrice,
+			ProductDetail:   product.ProductDetail,
+			CreatedAt:       product.CreatedAt,
+			PhotoUrl:        photoUrl,
 		}
 		reProducts = append(reProducts, reProduct)
 	}

+ 160 - 72
app/service/project_service.go

@@ -33,19 +33,17 @@ func (s ProjectService) CreateProject(param *vo.ProjectCreateParam) (*string, er
 	// d)创建种草任务
 	t := time.Now()
 	newProject := entity.Project{
-		ProjectStatus:    1,
-		ProjectType:      param.ProjectType,
-		ProjectId:        projectId,
-		ProductID:        param.ProductId,
-		EnterpriseID:     param.EnterpriseId,
-		SubAccountId:     param.SubAccountId,
-		ProjectPlatform:  param.Platform,
-		ProductSnap:      string(productInfoToJson),
-		ProductPhotoSnap: string(productPhotosToJson),
-		CreatedAt:        t,
-		UpdatedAt:        t,
-		EstimatedCost:    0,
-		SettlementAmount: 0,
+		ProjectStatus:     1,
+		ProjectType:       param.ProjectType,
+		ProjectId:         projectId,
+		ProductID:         param.ProductId,
+		EnterpriseID:      param.EnterpriseId,
+		SubAccountId:      param.SubAccountId,
+		ProjectPlatform:   param.Platform,
+		ServiceChargeRate: param.ServiceChargeRate,
+		ProductSnap:       string(productInfoToJson),
+		ProductPhotoSnap:  string(productPhotosToJson),
+		CreatedAt:         t,
 	}
 	err = dao.ProjectDAO{}.CreateProject(newProject)
 	if err != nil {
@@ -95,7 +93,6 @@ func (s ProjectService) UpdateProject(projectUpdateParam *vo.ProjectUpdateParam)
 		RecruitDdl:       recruitDdl,
 		ProductSnap:      string(productInfoToJson),
 		ProductPhotoSnap: string(productPhotosToJson),
-		CreatedAt:        project.CreatedAt,
 		UpdatedAt:        t,
 		ProjectForm:      projectUpdateParam.ProjectForm,
 		ContentType:      projectUpdateParam.ContentType,
@@ -183,27 +180,16 @@ func (s ProjectService) UpdateProject(projectUpdateParam *vo.ProjectUpdateParam)
 		if len(projectUpdateParam.RecruitStrategys) != 0 {
 			var recruits []entity.RecruitStrategy
 			for _, strategy := range projectUpdateParam.RecruitStrategys {
-				// 查询对应定价策略
-				pricingStrategy, err := dao.InfoPricingStrategylDao{}.GetPricingStrategy(strategy.FollowersLow, strategy.FollowersUp, strategy.FeeForm, project.ProjectPlatform)
-				if err != nil {
-					return nil, err
-				}
-				// 根据定价策略计算达人所见报价
-				if strategy.FeeForm == 2 {
-					strategy.TOffer = strategy.Offer * (1 - conv.MustFloat64(pricingStrategy.ServiceRate)/1000)
-				}
 				recruitStrategy := entity.RecruitStrategy{
-					FeeForm:       conv.MustInt64(strategy.FeeForm),
-					StrategyID:    conv.MustInt64(strategy.StrategyID),
-					FollowersLow:  conv.MustInt64(strategy.FollowersLow),
-					FollowersUp:   conv.MustInt64(strategy.FollowersUp),
-					RecruitNumber: conv.MustInt64(strategy.RecruitNumber),
-					ServiceCharge: strategy.ServiceCharge,
+					FeeForm:       strategy.FeeForm,
+					StrategyID:    strategy.StrategyID,
+					FollowersLow:  strategy.FollowersLow,
+					FollowersUp:   strategy.FollowersUp,
+					RecruitNumber: strategy.RecruitNumber,
 					Offer:         strategy.Offer,
-					TOffer:        strategy.TOffer,
+					ServiceCharge: strategy.ServiceCharge,
 					ProjectID:     project.ProjectId,
 				}
-				//fmt.Printf("Offer:\t %+v", Strategy.Offer)
 				recruits = append(recruits, recruitStrategy)
 			}
 			err = dao.RecruitStrategyDao{}.CreateRecruitStrategy(recruits)
@@ -309,7 +295,6 @@ func (s ProjectService) UpdateProjectTarget(projectUpdateParam *vo.ProjectUpdate
 			}
 		}
 	}
-
 	if projectUpdateParam.ProjectMaterial != nil {
 		// 删除已有示例
 		err = dao.ProjectMaterialDao{}.DeleteProjectMaterialByProjectId(project.ProjectId)
@@ -333,7 +318,7 @@ func (s ProjectService) UpdateProjectTarget(projectUpdateParam *vo.ProjectUpdate
 	}
 
 	println("更新种草任务的招募策略")
-	// 更新种草任务的招募策略
+	// 5. 更新种草任务的招募策略
 	if projectUpdateParam.RecruitStrategys != nil {
 		// 1. 删除已有的招募策略
 		err = dao.RecruitStrategyDao{}.DeleteRecruitStrategyByProjectID(projectUpdateParam.ProjectID)
@@ -344,26 +329,19 @@ func (s ProjectService) UpdateProjectTarget(projectUpdateParam *vo.ProjectUpdate
 		if len(projectUpdateParam.RecruitStrategys) != 0 {
 			var recruits []entity.RecruitStrategy
 			for _, strategy := range projectUpdateParam.RecruitStrategys {
-				//// 查询对应定价策略
-				//pricingStrategy, err := dao.InfoPricingStrategylDao{}.GetPricingStrategy(strategy.FollowersLow, strategy.FollowersUp, strategy.FeeForm, project.ProjectPlatform)
-				//if err != nil {
-				//	return nil, err
-				//}
-				//// 根据定价策略计算达人所见报价
-				//if strategy.FeeForm == 2 {
-				//	strategy.TOffer = strategy.Offer * (1 - conv.MustFloat64(pricingStrategy.ServiceRate)/1000)
-				//}
 				recruitStrategy := entity.RecruitStrategy{
-					FeeForm:      conv.MustInt64(strategy.FeeForm),
-					StrategyID:   conv.MustInt64(strategy.StrategyID),
-					FollowersLow: conv.MustInt64(strategy.FollowersLow),
-					FollowersUp:  conv.MustInt64(strategy.FollowersUp),
-					//ServiceCharge: strategy.ServiceCharge,
-					Offer: strategy.Offer,
-					//TOffer:    strategy.TOffer,
-					ProjectID: project.ProjectId,
+					FeeForm:       strategy.FeeForm,
+					StrategyID:    strategy.StrategyID,
+					FollowersLow:  strategy.FollowersLow,
+					FollowersUp:   strategy.FollowersUp,
+					RecruitNumber: strategy.RecruitNumber,
+					Offer:         strategy.Offer, // 报价
+					ProjectID:     project.ProjectId,
+				}
+				if strategy.FeeForm == 2 {
+					recruitStrategy.ServiceCharge = strategy.Offer * projectUpdateParam.ServiceChargeRate
+					recruitStrategy.TOffer = strategy.Offer * (1 - projectUpdateParam.ServiceChargeRate)
 				}
-				//fmt.Printf("Offer:\t %+v", Strategy.Offer)
 				recruits = append(recruits, recruitStrategy)
 			}
 			err = dao.RecruitStrategyDao{}.CreateRecruitStrategy(recruits)
@@ -378,12 +356,83 @@ func (s ProjectService) UpdateProjectTarget(projectUpdateParam *vo.ProjectUpdate
 
 // 种草任务预览
 func (s ProjectService) GetProjectDetail(projectId string) (*vo.ReProjectDetail, error) {
-	projectDetail := vo.ReProjectDetail{}
+	reProjectDetail := vo.ReProjectDetail{}
 	project, err := dao.ProjectDAO{}.GetProjectById(projectId)
 	if err != nil {
 		logrus.Errorf("[projectDB service] call GetProject error,err:%+v", err)
 		return nil, err
 	}
+	// 系统信息
+	reProjectDetail.ProjectId = projectId
+	reProjectDetail.ProjectStatus = project.ProjectStatus
+	reProjectDetail.ProjectPlatform = project.ProjectPlatform
+	reProjectDetail.CreatedAt = project.CreatedAt
+	reProjectDetail.EstimatedCost = project.EstimatedCost
+	reProjectDetail.ServiceChargeRate = project.ServiceChargeRate
+	var creatorName, phone string
+	if project.SubAccountId == 0 {
+		enterprise, err := dao.EnterpriseDao{}.GetEnterprise(project.EnterpriseID)
+		if err == nil && enterprise != nil {
+			creatorName = enterprise.BusinessName
+			phone, err = dao.UserDao{}.GetPhoneByUserId(enterprise.UserId)
+		}
+	} else {
+		subAccount, err := dao.SubAccountDao{}.GetSubAccount(project.SubAccountId)
+		if err == nil && subAccount != nil {
+			creatorName = subAccount.SubAccountName
+			phone, err = dao.UserDao{}.GetPhoneByUserId(subAccount.UserId)
+		}
+	}
+	reProjectDetail.CreatorName = creatorName
+	reProjectDetail.Phone = phone
+	// 关联商品
+	var reProduct vo.ReTaskProduct
+	product, err := dao.ProductDAO{}.GetProductByID(project.ProductID)
+	if err == nil {
+		photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByProductID(product.ProductID)
+		if e != nil {
+			photoUrl = ""
+		}
+		reProduct = vo.ReTaskProduct{
+			ProductID:       product.ProductID,
+			ProductName:     product.ProductName,
+			ProductType:     product.ProductType,
+			ProductCategory: product.ProductCategory,
+			ProductPrice:    product.ProductPrice,
+			ProductDetail:   product.ProductDetail,
+			CreatedAt:       product.CreatedAt,
+			PhotoUrl:        photoUrl,
+		}
+	}
+	reProjectDetail.ProductInfo = &reProduct
+	// 招募要求
+	reProjectDetail.TalentType = project.TalentType
+	reProjectDetail.RecruitDdl = project.RecruitDdl
+	reProjectDetail.ProjectForm = project.ProjectForm
+	reProjectDetail.ContentType = project.ContentType
+	reProjectDetail.ProjectDetail = project.ProjectDetail
+	var recruitStrategysPreviews []*vo.RecruitStrategyPreview
+	recruitStrategys, err := dao.RecruitStrategyDao{}.GetRecruitStrategyByProjectId(projectId)
+	if err != nil {
+		logrus.Errorf("[projectDB service] call GetRecruitStrategy error,err:%+v", err)
+		return nil, err
+	}
+	for _, recruitStrategy := range recruitStrategys {
+		recruitStrategysPreview := &vo.RecruitStrategyPreview{
+			StrategyId:     recruitStrategy.StrategyID,
+			FeeForm:        recruitStrategy.FeeForm,
+			FollowersLow:   recruitStrategy.FollowersLow,
+			FollowersUp:    recruitStrategy.FollowersUp,
+			RecruitNumber:  recruitStrategy.RecruitNumber,
+			Offer:          recruitStrategy.Offer,
+			TOffer:         recruitStrategy.TOffer,
+			ServiceCharge:  recruitStrategy.ServiceCharge,
+			SelectedNumber: recruitStrategy.SelectedNumber,
+		}
+		recruitStrategysPreviews = append(recruitStrategysPreviews, recruitStrategysPreview)
+	}
+	reProjectDetail.RecruitStrategys = recruitStrategysPreviews
+	// 执行要求
 	projectBriefInfos, err := dao.ProjectBriefDao{}.GetProjectBriefInfo(projectId)
 	if err != nil {
 		logrus.Errorf("[projectDB service] call GetProjectBriefInfo error,err:%+v", err)
@@ -394,28 +443,67 @@ func (s ProjectService) GetProjectDetail(projectId string) (*vo.ReProjectDetail,
 		logrus.Errorf("[projectDB service] call GetprojectMaterialInfo error,err:%+v", err)
 		return nil, err
 	}
-	productInfo, err := dao.ProductDAO{}.GetProductByProjectId(projectId)
-	if err != nil {
-		logrus.Errorf("[projectDB service] call GetProductInfo error,err:%+v", err)
-		return nil, err
+	reProjectDetail.ProjectBriefs = projectBriefInfos
+	reProjectDetail.ProjectMaterials = projectMaterials
+
+	return &reProjectDetail, nil
+}
+
+// 公开种草任务列表
+func (s ProjectService) GetProjectTaskList(param *vo.ProjectSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
 	}
-	productPhotos, err := dao.ProductPhotoDAO{}.GetProductPhotosByProjectId(projectId)
-	if err != nil {
-		logrus.Errorf("[projectDB service] call GetProductPhotoInfo error,err:%+v", err)
-		return nil, err
+	if param.PageSize == 0 {
+		param.PageSize = 10
 	}
-	// 查找招募策略
-	recruitStrategys, err := dao.RecruitStrategyDao{}.GetRecruitStrategyByProjectId(projectId)
+	var result vo.ResultVO
+	reProjectTaskPreviews, total, err := (&dao.ProjectDAO{}).GetProjectPreviews(param)
 	if err != nil {
-		logrus.Errorf("[projectDB service] call GetRecruitStrategy error,err:%+v", err)
-		return nil, err
-	}
-	projectDetail.ProjectBriefs = projectBriefInfos
-	projectDetail.Project = project
-	projectDetail.ProjectMaterials = projectMaterials
-	projectDetail.ProductInfo = productInfo
-	projectDetail.ProductPhotos = productPhotos
-	projectDetail.RecruitStrategys = recruitStrategys
-	return &projectDetail, nil
+		return result, err
+	}
+	for i := range reProjectTaskPreviews {
+		var creatorName string
+		var productName string
+		var productPrice float64
+		var mainImage string
+		if reProjectTaskPreviews[i].SubAccountId == 0 {
+			enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reProjectTaskPreviews[i].EnterpriseId)
+			if err == nil && enterprise != nil {
+				creatorName = enterprise.BusinessName
+			}
+		} else {
+			subAccount, err := dao.SubAccountDao{}.GetSubAccount(reProjectTaskPreviews[i].SubAccountId)
+			if err == nil && subAccount != nil {
+				creatorName = subAccount.SubAccountName
+			}
+		}
+		product, err := dao.ProductDAO{}.GetProductByID(reProjectTaskPreviews[i].ProductId)
+		if err == nil && product != nil {
+			productName = product.ProductName
+			productPrice = product.ProductPrice
+		}
+		mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reProjectTaskPreviews[i].ProductId)
+		reProjectTaskPreviews[i].CreatorName = creatorName
+		reProjectTaskPreviews[i].ProductName = productName
+		reProjectTaskPreviews[i].ProductPrice = productPrice
+		reProjectTaskPreviews[i].MainImage = mainImage
+	}
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     reProjectTaskPreviews,
+	}
+	return result, nil
+}
 
+// 删除种草任务
+func (s ProjectService) DeleteProject(projectId string) (*string, error) {
+	res, err := dao.ProjectDAO{}.DeleteProject(projectId)
+	if err != nil {
+		logrus.Errorf("[projectDB service] call DeleteProject error,err:%+v", err)
+		return res, err
+	}
+	return res, nil
 }

+ 171 - 39
app/service/selection_info_service.go

@@ -122,17 +122,27 @@ func (s SelectionInfoService) UpdateSelectionInfo(selectionUpdateParam *vo.Selec
 		selectionUpdateParam.SelectionStatus = 1
 	}
 	t := time.Now()
+	var sampleMode, taskMode int64
+	if len(selectionUpdateParam.FreeStrategys) > 0 {
+		sampleMode = 1
+	} else {
+		sampleMode = 3
+	}
+	if len(selectionUpdateParam.RewardStrategys) > 0 {
+		taskMode = 1
+	} else {
+		taskMode = 2
+	}
 	updateSelection := entity.SelectionInfo{
-		SelectionID:     selectionUpdateParam.SelectionID,
-		SelectionStatus: selectionUpdateParam.SelectionStatus,
-		SelectionName:   selectionUpdateParam.SelectionName,
-		EnterpriseID:    selectionUpdateParam.EnterpriseId,
-		SubAccountId:    selectionUpdateParam.SubAccountId,
-		ProductID:       selectionUpdateParam.ProductId,
-		//ContentType: selectionUpdateParam.ContentType,
-		TaskMode:         selectionUpdateParam.TaskMode,
-		SampleMode:       selectionUpdateParam.SampleMode,
+		SelectionID:      selectionUpdateParam.SelectionID,
+		SelectionStatus:  selectionUpdateParam.SelectionStatus,
+		SelectionName:    selectionUpdateParam.SelectionName,
+		EnterpriseID:     selectionUpdateParam.EnterpriseId,
+		SubAccountId:     selectionUpdateParam.SubAccountId,
+		ProductID:        selectionUpdateParam.ProductId,
 		ProductUrl:       selectionUpdateParam.ProductUrl,
+		TaskMode:         taskMode,
+		SampleMode:       sampleMode,
 		SampleNum:        selectionUpdateParam.SampleNum,
 		RemainNum:        selectionUpdateParam.SampleNum,
 		CommissionRate:   selectionUpdateParam.CommissionRate,
@@ -231,7 +241,7 @@ func (s SelectionInfoService) UpdateSelectionInfo(selectionUpdateParam *vo.Selec
 			return nil, err
 		}
 		// 2. 接收并创建新的免费领样策略
-		if selectionUpdateParam.SampleMode == 1 {
+		if sampleMode == 1 {
 			var frees []entity.FreeStrategy
 			for _, v := range selectionUpdateParam.FreeStrategys {
 				free := entity.FreeStrategy{
@@ -260,7 +270,7 @@ func (s SelectionInfoService) UpdateSelectionInfo(selectionUpdateParam *vo.Selec
 		if err != nil {
 			return nil, err
 		}
-		if selectionUpdateParam.TaskMode == 1 {
+		if taskMode == 1 {
 			var rewards []entity.RewardStrategy
 			for _, v := range selectionUpdateParam.RewardStrategys {
 				reward := entity.RewardStrategy{
@@ -284,51 +294,173 @@ func (s SelectionInfoService) UpdateSelectionInfo(selectionUpdateParam *vo.Selec
 
 // 电商带货任务预览
 func (s SelectionInfoService) GetSelectionDetail(selectionId string) (*vo.ReSelectionDetail, error) {
-	selectionDetail := vo.ReSelectionDetail{}
-	selectionInfo, err := dao.SelectionInfoDAO{}.GetSelectionInfoById(selectionId)
+	reSelectionDetail := vo.ReSelectionDetail{}
+	selection, err := dao.SelectionInfoDAO{}.GetSelectionInfoById(selectionId)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetSelectionInfo error,err:%+v", err)
+		logrus.Errorf("[selectionInfoDB service] call GetSelection error,err:%+v", err)
 		return nil, err
 	}
-	selectionBriefInfos, err := dao.SecBriefDao{}.GetSelectionBriefInfo(selectionId)
-	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetSelectionBriefInfo error,err:%+v", err)
-		return nil, err
+	// 系统信息
+	reSelectionDetail.SelectionId = selectionId
+	reSelectionDetail.SelectionStatus = selection.SelectionStatus
+	reSelectionDetail.SelectionPlatform = selection.Platform
+	reSelectionDetail.CreatedAt = selection.CreatedAt
+	reSelectionDetail.SubmitAt = selection.SubmitAt
+	var creatorName, phone string
+	var rewardSum float64
+	if selection.SubAccountId == 0 {
+		enterprise, err := dao.EnterpriseDao{}.GetEnterprise(selection.EnterpriseID)
+		if err == nil && enterprise != nil {
+			creatorName = enterprise.BusinessName
+			phone, err = dao.UserDao{}.GetPhoneByUserId(enterprise.UserId)
+		}
+	} else {
+		subAccount, err := dao.SubAccountDao{}.GetSubAccount(selection.SubAccountId)
+		if err == nil && subAccount != nil {
+			creatorName = subAccount.SubAccountName
+			phone, err = dao.UserDao{}.GetPhoneByUserId(subAccount.UserId)
+		}
 	}
-	selectionMaterials, err := dao.SecMaterialDao{}.GetSelectionMaterialInfo(selectionId)
+	reSelectionDetail.CreatorName = creatorName
+	reSelectionDetail.Phone = phone
+	// 关联商品
+	var reProduct vo.ReTaskProduct
+	product, err := dao.ProductDAO{}.GetProductByID(selection.ProductID)
+	if err == nil {
+		photoUrl, e := dao.ProductPhotoDAO{}.GetMainPhotoByProductID(product.ProductID)
+		if e != nil {
+			photoUrl = ""
+		}
+		reProduct = vo.ReTaskProduct{
+			ProductID:       product.ProductID,
+			ProductName:     product.ProductName,
+			ProductType:     product.ProductType,
+			ProductCategory: product.ProductCategory,
+			ProductPrice:    product.ProductPrice,
+			ProductDetail:   product.ProductDetail,
+			CreatedAt:       product.CreatedAt,
+			PhotoUrl:        photoUrl,
+		}
+	}
+	reSelectionDetail.ProductInfo = &reProduct
+	// 样品奖励
+	reSelectionDetail.TaskDdl = selection.TaskDdl
+	reSelectionDetail.SampleNum = selection.SampleNum
+	var freeStrategyPreviews []*vo.FreeStrategyPreview // 领样策略
+	freeStrategys, err := dao.FreeStrategyDao{}.GetFreeStrategyBySelectionId(selectionId)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetSelectionMaterialInfo error,err:%+v", err)
+		logrus.Errorf("[selectionInfoDB service] call GetFreeStrategy error,err:%+v", err)
 		return nil, err
 	}
-	productInfo, err := dao.ProductDAO{}.GetProductBySelectionId(selectionId)
+	for _, freeStrategy := range freeStrategys {
+		freeStrategyPreview := &vo.FreeStrategyPreview{
+			StrategyId:     freeStrategy.StrategyId,
+			FansNum:        freeStrategy.FansNum,
+			SaleNum:        freeStrategy.SaleNum,
+			StrategyStatus: freeStrategy.StrategyStatus,
+		}
+		freeStrategyPreviews = append(freeStrategyPreviews, freeStrategyPreview)
+	}
+	reSelectionDetail.FreeStrategys = freeStrategyPreviews
+	var rewardStrategyPreviews []*vo.RewardStrategyPreview // 悬赏策略
+	rewardStrategys, err := dao.RewardStrategyDao{}.GetRewardStrategyBySelectionId(selectionId)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetProductInfo error,err:%+v", err)
+		logrus.Errorf("[selectionInfoDB service] call GetRewardStrategy error,err:%+v", err)
 		return nil, err
 	}
-	productPhotos, err := dao.ProductPhotoDAO{}.GetProductPhotosBySelectionId(selectionId)
+	for _, rewardStrategy := range rewardStrategys {
+		rewardStrategyPreview := &vo.RewardStrategyPreview{
+			Reward:         rewardStrategy.Reward,
+			SaleActual:     rewardStrategy.SaleActual,
+			PerReward:      rewardStrategy.PerReward,
+			StrategyStatus: rewardStrategy.StrategyStatus,
+		}
+		rewardStrategyPreviews = append(rewardStrategyPreviews, rewardStrategyPreview)
+	}
+	reSelectionDetail.FreeStrategys = freeStrategyPreviews
+	reSelectionDetail.RewardStrategys = rewardStrategyPreviews
+	for _, rewardStrategy := range rewardStrategys {
+		rewardSum += rewardStrategy.Reward
+	}
+	reSelectionDetail.RewardSum = rewardSum
+	// 补充信息
+	selectionBriefInfos, err := dao.SecBriefDao{}.GetSelectionBriefInfo(selectionId)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetProductPhotoInfo error,err:%+v", err)
+		logrus.Errorf("[selectionInfoDB service] call GetSelectionBriefInfo error,err:%+v", err)
 		return nil, err
 	}
-	// 查找免费领样策略
-	freeStrategys, err := dao.FreeStrategyDao{}.GetFreeStrategyBySelectionId(selectionId)
+	selectionMaterials, err := dao.SecMaterialDao{}.GetSelectionMaterialInfo(selectionId)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetFreeStrategy error,err:%+v", err)
+		logrus.Errorf("[selectionInfoDB service] call GetSelectionMaterialInfo error,err:%+v", err)
 		return nil, err
 	}
-	// 查找悬赏策略
-	rewardStrategys, err := dao.RewardStrategyDao{}.GetRewardStrategyBySelectionId(selectionId)
+	reSelectionDetail.SelectionBriefs = selectionBriefInfos
+	reSelectionDetail.SelectionMaterials = selectionMaterials
+
+	return &reSelectionDetail, nil
+}
+
+// 电商带货任务列表
+func (s SelectionInfoService) GetSelectionTaskList(param *vo.SelectionSearchParam) (vo.ResultVO, error) {
+	if param.Page == 0 {
+		param.Page = 1
+	}
+	if param.PageSize == 0 {
+		param.PageSize = 10
+	}
+	var result vo.ResultVO
+	reSelectionTaskPreviews, total, err := (&dao.ProjectDAO{}).GetSelectionPreviews(param)
 	if err != nil {
-		logrus.Errorf("[selectionDB service] call GetRewardStrategy error,err:%+v", err)
-		return nil, err
+		return result, err
 	}
+	for i := range reSelectionTaskPreviews {
+		var creatorName string
+		var productName string
+		var productPrice float64
+		var mainImage string
+		var reward float64
+		if reSelectionTaskPreviews[i].SubAccountId == 0 {
+			enterprise, err := dao.EnterpriseDao{}.GetEnterprise(reSelectionTaskPreviews[i].EnterpriseId)
+			if err == nil && enterprise != nil {
+				creatorName = enterprise.BusinessName
+			}
+		} else {
+			subAccount, err := dao.SubAccountDao{}.GetSubAccount(reSelectionTaskPreviews[i].SubAccountId)
+			if err == nil && subAccount != nil {
+				creatorName = subAccount.SubAccountName
+			}
+		}
+		product, err := dao.ProductDAO{}.GetProductByID(reSelectionTaskPreviews[i].ProductId)
+		if err == nil && product != nil {
+			productName = product.ProductName
+			productPrice = product.ProductPrice
+		}
+		mainImage, err = dao.ProductPhotoDAO{}.GetMainPhotoByProductID(reSelectionTaskPreviews[i].ProductId)
+		rewardStrategys, err := dao.RewardStrategyDao{}.GetRewardStrategyBySelectionId(reSelectionTaskPreviews[i].SelectionId)
+		for _, rewardStrategy := range rewardStrategys {
+			reward += rewardStrategy.Reward
+		}
+		reSelectionTaskPreviews[i].CreatorName = creatorName
+		reSelectionTaskPreviews[i].ProductName = productName
+		reSelectionTaskPreviews[i].ProductPrice = productPrice
+		reSelectionTaskPreviews[i].MainImage = mainImage
+		reSelectionTaskPreviews[i].Reward = reward
+	}
+	result = vo.ResultVO{
+		Page:     param.Page,
+		PageSize: param.PageSize,
+		Total:    total,
+		Data:     reSelectionTaskPreviews,
+	}
+	return result, nil
+}
 
-	selectionDetail.SelectionBriefs = selectionBriefInfos
-	selectionDetail.SelectionInfo = selectionInfo
-	selectionDetail.SelectionMaterials = selectionMaterials
-	selectionDetail.ProductInfo = productInfo
-	selectionDetail.ProductPhotos = productPhotos
-	selectionDetail.FreeStrategys = freeStrategys
-	selectionDetail.RewardStrategys = rewardStrategys
-	return &selectionDetail, nil
+// 删除带货任务
+func (s SelectionInfoService) DeleteSelection(selectionId string) (*string, error) {
+	res, err := dao.SelectionInfoDAO{}.DeleteSelection(selectionId)
+	if err != nil {
+		logrus.Errorf("[projectDB service] call DeleteSelection error,err:%+v", err)
+		return res, err
+	}
+	return res, nil
 }

+ 6 - 5
app/vo/project_create_param.go

@@ -1,9 +1,10 @@
 package vo
 
 type ProjectCreateParam struct {
-	EnterpriseId string `json:"enterprise_id"`
-	SubAccountId int64  `json:"sub_account_id"`
-	Platform     int64  `json:"platform"`
-	ProductId    int64  `json:"product_id"`
-	ProjectType  int64  `json:"project_type"` // 项目类型,1代表全流程项目,2代表专项项目
+	EnterpriseId      string  `json:"enterprise_id"`
+	SubAccountId      int64   `json:"sub_account_id"`
+	Platform          int64   `json:"platform"`
+	ProductId         int64   `json:"product_id"`
+	ServiceChargeRate float64 `json:"service_charge_rate"`
+	ProjectType       int64   `json:"project_type"` // 项目类型,1代表全流程项目,2代表专项项目
 }

+ 17 - 0
app/vo/project_search_param.go

@@ -0,0 +1,17 @@
+package vo
+
+type ProjectSearchParam struct {
+	EnterpriseId    string `json:"enterprise_id"`
+	SubAccountId    int64  `json:"sub_account_id"`
+	Page            int    `json:"page"`
+	PageSize        int    `json:"page_size"`
+	ProjectType     int64  `json:"project_type"` // 项目类型,1全流程项目,2专项项目
+	ProjectPlatform int64  `json:"project_platform"`
+	ProjectStatus   int64  `json:"project_status"` // 任务状态,1-10代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	ProjectForm     int64  `json:"project_form"`   // 任务形式,1-5代表商品寄拍、素材分发、虚拟产品测评、线下探店打卡、素材微原创
+	ContentType     int64  `json:"content_type"`   // 内容形式, 1图文 2视频
+
+	ProjectId string `json:"project_id"` // 任务ID
+	//ProjectName string `json:"project_name"` // 任务标题
+	//CreatorName string `json:"creator_name"` // 创建者
+}

+ 12 - 12
app/vo/project_update_param.go

@@ -1,16 +1,17 @@
 package vo
 
 type ProjectUpdateParam struct {
-	EnterpriseId     string                  `json:"enterprise_id"`
-	SubAccountId     int64                   `json:"sub_account_id"`
-	ProjectID        string                  `json:"project_id"`
-	ProductId        int64                   `json:"product_id"`
-	ProjectType      int64                   `json:"project_type"`      // 项目类型,1代表全流程项目,2代表专项项目
-	ProjectStatus    int64                   `json:"project_status"`    // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
-	ProjectName      string                  `json:"task_name"`         // 项目名称(任务标题)
-	TalentType       string                  `json:"talent_type"`       // 达人类型
-	RecruitDdl       string                  `json:"recruit_ddl"`       // 招募截止时间
-	RecruitStrategys []CreateRecruitStrategy `json:"recruit_strategys"` // 招募策略
+	EnterpriseId      string                  `json:"enterprise_id"`
+	SubAccountId      int64                   `json:"sub_account_id"`
+	ProjectID         string                  `json:"project_id"`
+	ProductId         int64                   `json:"product_id"`
+	ServiceChargeRate float64                 `json:"service_charge_rate"`
+	ProjectType       int64                   `json:"project_type"`      // 项目类型,1代表全流程项目,2代表专项项目
+	ProjectStatus     int64                   `json:"project_status"`    // 项目状态,1-10分别代表创建中、待审核、审核通过、招募中、招募完毕、待支付、已支付、失效、执行中、已结案
+	ProjectName       string                  `json:"task_name"`         // 项目名称(任务标题)
+	TalentType        string                  `json:"talent_type"`       // 达人类型
+	RecruitDdl        string                  `json:"recruit_ddl"`       // 招募截止时间
+	RecruitStrategys  []CreateRecruitStrategy `json:"recruit_strategys"` // 招募策略
 
 	ProjectForm     int64                  `json:"project_form"`   // 项目形式,1-4分别代表实体商品寄拍、虚拟产品测评、线下探店打卡、素材微原创
 	ContentType     int64                  `json:"content_type"`   // 内容形式,1代表图文,2代表视频
@@ -34,11 +35,10 @@ type ProjectMaterialInfo struct {
 // 招募策略
 type CreateRecruitStrategy struct {
 	StrategyID    int64   `json:"strategy_id"`    // 策略id
-	FeeForm       int64   `json:"fee_form"`       // 稿费形式,1-3分别代表自报价、一口价、产品置换
+	FeeForm       int64   `json:"fee_form"`       // 稿费形式,1-3分别代表无费置换、一口价、自报价
 	FollowersLow  int64   `json:"followers_low"`  // 达人粉丝数下限
 	FollowersUp   int64   `json:"followers_up"`   // 达人粉丝数上限
 	RecruitNumber int64   `json:"recruit_number"` // 招募数量
 	Offer         float64 `json:"offer"`          // 报价
-	TOffer        float64 `json:"t_offer"`        // 达人所见报价
 	ServiceCharge float64 `json:"service_charge"` // 服务费
 }

+ 35 - 6
app/vo/re_project_detail.go

@@ -1,14 +1,43 @@
 package vo
 
 import (
+	"time"
 	"youngee_b_api/app/entity"
 )
 
 type ReProjectDetail struct {
-	Project          *entity.Project           // 选品详情
-	ProjectBriefs    []*entity.ProjectBrief    // 选品brief列表
-	ProjectMaterials []*entity.ProjectMaterial // 选品示例列表
-	ProductInfo      *entity.Product           // 商品详情
-	ProductPhotos    []*entity.ProductPhoto    // 商品图片列表
-	RecruitStrategys []*entity.RecruitStrategy // 招募策略
+	// 系统信息
+	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"` // 公开服务费率
+	// 支付方式参数待定
+	// 关联商品
+	ProductInfo *ReTaskProduct `json:"productInfo"`
+	// 招募要求
+	TalentType       string                    `json:"talentType"`
+	RecruitDdl       time.Time                 `json:"recruitDdl"`
+	ProjectForm      int64                     `json:"projectForm"`
+	ContentType      int64                     `json:"contentType"`
+	ProjectDetail    string                    `json:"projectDetail"`
+	RecruitStrategys []*RecruitStrategyPreview `json:"recruitStrategys"` // 招募策略
+	// 执行要求
+	ProjectBriefs    []*entity.ProjectBrief    `json:"projectBriefs"`    // 选品brief列表
+	ProjectMaterials []*entity.ProjectMaterial `json:"projectMaterials"` // 选品示例列表
+}
+
+type RecruitStrategyPreview struct {
+	StrategyId     int64   `json:"strategyId"`
+	FeeForm        int64   `json:"feeForm"`
+	FollowersLow   int64   `json:"followersLow"`
+	FollowersUp    int64   `json:"followersUp"`
+	RecruitNumber  int64   `json:"recruitNumber"`
+	Offer          float64 `json:"offer"`
+	TOffer         float64 `json:"tOffer"`
+	ServiceCharge  float64 `json:"serviceCharge"`
+	SelectedNumber int64   `json:"selectedNumber"` // 确认合作数量
 }

+ 21 - 0
app/vo/re_project_task_preview.go

@@ -0,0 +1,21 @@
+package vo
+
+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"`
+}

+ 35 - 7
app/vo/re_selection_detail.go

@@ -1,15 +1,43 @@
 package vo
 
 import (
+	"time"
 	"youngee_b_api/app/entity"
 )
 
 type ReSelectionDetail struct {
-	SelectionInfo      *entity.SelectionInfo    // 选品详情
-	SelectionBriefs    []*entity.SecBrief       // 选品brief列表
-	SelectionMaterials []*entity.SecMaterial    // 选品示例列表
-	ProductInfo        *entity.Product          // 商品详情
-	ProductPhotos      []*entity.ProductPhoto   // 商品图片列表
-	FreeStrategys      []*entity.FreeStrategy   // 免费领样策略
-	RewardStrategys    []*entity.RewardStrategy // 悬赏策略
+	// 系统信息
+	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"`          // 提交审核时间
+	// 支付方式参数待定
+	// 关联商品
+	ProductInfo *ReTaskProduct `json:"productInfo"`
+	// 样品奖励
+	TaskDdl         time.Time                `json:"taskDdl"`
+	SampleNum       int64                    `json:"sampleNum"` // 样品数量
+	FreeStrategys   []*FreeStrategyPreview   // 领样策略
+	RewardStrategys []*RewardStrategyPreview // 悬赏策略
+	// 补充信息
+	SelectionBriefs    []*entity.SecBrief    `json:"selectionBriefs"`    // 选品brief列表
+	SelectionMaterials []*entity.SecMaterial `json:"selectionMaterials"` // 选品示例列表
+}
+
+type FreeStrategyPreview struct {
+	StrategyId     int64 `json:"strategyId"`
+	FansNum        int64 `json:"fansNum"`
+	SaleNum        int64 `json:"saleNum"`
+	StrategyStatus int64 `json:"strategyStatus"` // 策略状态,1-2分别代表未删除、已删除
+}
+
+type RewardStrategyPreview struct {
+	Reward         float64 `json:"reward"`
+	SaleActual     int64   `json:"saleActual"`
+	PerReward      float64 `json:"perReward"`
+	StrategyStatus int64   `json:"strategyStatus"` // 策略状态,1-2分别代表未删除、已删除
 }

+ 23 - 0
app/vo/re_selection_task_preview.go

@@ -0,0 +1,23 @@
+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"`
+}

+ 8 - 8
app/vo/re_task_product.go

@@ -3,12 +3,12 @@ package vo
 import "time"
 
 type ReTaskProduct struct {
-	ProductID     int64     `json:"productId"`
-	ProductName   string    `json:"productName"`
-	ProductType   string    `json:"productType"`
-	ProductPrice  float64   `json:"productPrice"`
-	ProductDetail string    `json:"productDetail"`
-	CreatedAt     time.Time `json:"createdAt"`
-	BrandName     string    `json:"brandName"`
-	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       time.Time `json:"createdAt"`
+	PhotoUrl        string    `json:"photoUrl"`
 }

+ 8 - 11
app/vo/selection_info_update_param.go

@@ -1,12 +1,11 @@
 package vo
 
 type SelectionInfoUpdateParam struct {
-	EnterpriseId    string `json:"enterprise_id"`
-	SubAccountId    int64  `json:"sub_account_id"`
-	SelectionID     string `json:"selection_id"` // 选品id
-	ProductId       int64  `json:"product_id"`
-	SelectionStatus int64  `json:"selection_status"` // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
-	//ContentType      int64                   `json:"content_type"`	// 内容形式,1图文,2视频,3直播
+	EnterpriseId    string                  `json:"enterprise_id"`
+	SubAccountId    int64                   `json:"sub_account_id"`
+	SelectionID     string                  `json:"selection_id"` // 选品id
+	ProductId       int64                   `json:"product_id"`
+	SelectionStatus int64                   `json:"selection_status"` // 选品项目状态,1-8分别代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
 	SelectionName   string                  `json:"task_name"`        // 任务名称
 	TaskDdl         string                  `json:"task_ddl"`         // 招募截止时间
 	FreeStrategys   []UpdateFreeStrategys   `json:"free_strategys"`   // 免费领样策略
@@ -15,16 +14,14 @@ type SelectionInfoUpdateParam struct {
 	SecBrief        []*SecBriefInfo         `json:"sec_brief"`
 	SecMaterial     []*SecMaterialInfo      `json:"sec_material"`
 
-	TaskMode         int64   `json:"task_mode"`         // 任务形式,1悬赏任务 2纯佣带货
+	ProductUrl       string  `json:"product_url"`       // 带货链接
 	RemainNum        int64   `json:"remain_num"`        // 剩余数量
-	TaskReward       float64 `json:"task_reward"`       // 任务悬赏
-	SampleMode       int64   `json:"sample_mode"`       // 领样形式,1免费领样 2垫付领样 3提供样品
 	CommissionRate   float64 `json:"commission_rate"`   // 佣金比例
-	ProductUrl       string  `json:"product_url"`       // 带货链接
+	TaskReward       float64 `json:"task_reward"`       // 任务悬赏
 	SampleCondition  string  `json:"sample_condition"`  // 领样条件
 	RewardCondition  string  `json:"reward_condition"`  // 返现悬赏条件
-	Detail           string  `json:"detail"`            // 卖点总结
 	SettlementAmount float64 `json:"settlement_amount"` // 已结算金额
+	Detail           string  `json:"detail"`            // 卖点总结
 	Status           int64   `json:"status"`            // 是否删除
 }
 

+ 16 - 0
app/vo/selection_search_param.go

@@ -0,0 +1,16 @@
+package vo
+
+type SelectionSearchParam struct {
+	EnterpriseId      string `json:"enterprise_id"`
+	SubAccountId      int64  `json:"sub_account_id"`
+	Page              int    `json:"page"`
+	PageSize          int    `json:"page_size"`
+	SelectionPlatform int64  `json:"selection_platform"` // 平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	SelectionStatus   int64  `json:"selection_status"`   // 任务状态,1-8代表创建中、待审核、审核通过、待支付、已支付、执行中、失效、已结案
+	FreeFlag          int64  `json:"free_flag"`          // 领样策略  0全部 1有 2无
+	RewardFlag        int64  `json:"reward_flag"`        // 悬赏策略 0全部 1有 2无
+
+	SelectionId string `json:"selection_id"` // 任务ID
+	//SelectionName string `json:"selection_name"` // 任务标题
+	//CreatorName   string `json:"creator_name"`   // 创建者
+}

+ 10 - 5
route/init.go

@@ -173,15 +173,20 @@ func InitRoute(r *gin.Engine) {
 		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/check", controller.TaskController{}.CheckSelectionInfo)  // 电商带货任务审核
+		task.POST("/selection/create", controller.TaskController{}.CreateSelection)      // 创建带货任务
+		task.POST("/selection/update", controller.TaskController{}.UpdateSelection)      // 更新带货任务(样品奖励、补充信息)
+		task.POST("/selection/detail", controller.TaskController{}.GetSelectionDetail)   // 电商带货任务预览
+		task.POST("/selection/task/list", controller.TaskController{}.SelectionTaskList) // 电商带货任务列表
+		task.POST("/selection/del", controller.TaskController{}.SelectionDel)            // 删除带货任务
+		task.POST("/selection/check", controller.TaskController{}.CheckSelectionInfo)    // 电商带货任务审核
 
 		task.POST("/project/create", controller.TaskController{}.CreateProject)              // 创建种草任务
 		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/detail", controller.TaskController{}.GetProjectDetail)           // 品牌种草任务预览
+		task.POST("/project/task/list", controller.TaskController{}.ProjectTaskList)         // 公开种草任务列表
+		task.POST("/project/del", controller.TaskController{}.ProjectDel)                    // 删除种草任务
+
 	}
 
 }