|
@@ -295,7 +295,7 @@ func (*sProject) GetSPorjectDetail(ctx context.Context, sProjectId int) (*http_m
|
|
|
}
|
|
|
|
|
|
// GetSpecialProjectList 查找服务商加入商单前的定向种草任务列表
|
|
|
-func (*sProject) GetSpecialProjectList(ctx context.Context, supplierId int, pageSize, pageNum int32, condition *common_model.SSpecialProjectCondition) (*http_model.SpecialProjectListData, error) {
|
|
|
+func (*sProject) GetSpecialProjectList(ctx context.Context, supplierId int, pageSize, pageNum int32, condition *common_model.SpecialSProjectCondition) (*http_model.SpecialProjectListData, error) {
|
|
|
var specialProjectListData *http_model.SpecialProjectListData
|
|
|
specialProjectListData = &http_model.SpecialProjectListData{}
|
|
|
|
|
@@ -375,7 +375,7 @@ func (*sProject) GetSpecialProjectList(ctx context.Context, supplierId int, page
|
|
|
}
|
|
|
|
|
|
// GetSpecialSProjectList 查找服务商加入商单后的定向种草任务列表
|
|
|
-func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pageSize, pageNum int32, condition *common_model.SSpecialProjectCondition) (*http_model.SpecialSProjectListData, error) {
|
|
|
+func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pageSize, pageNum int32, condition *common_model.SpecialSProjectCondition) (*http_model.SpecialSProjectListData, error) {
|
|
|
var specialProjectListData *http_model.SpecialSProjectListData
|
|
|
specialProjectListData = &http_model.SpecialSProjectListData{}
|
|
|
specialProjects, total, err := db.GetSpecialProjectList(ctx, supplierId, pageSize, pageNum, condition)
|
|
@@ -386,13 +386,17 @@ func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pag
|
|
|
specialProjectListData.Total = total
|
|
|
// 1. 定向种草任务基本信息填入
|
|
|
for _, specialProject := range specialProjects {
|
|
|
- var currSpecialProject *http_model.SpecialProjectResponse
|
|
|
- currSpecialProject = &http_model.SpecialProjectResponse{}
|
|
|
+ var currSpecialProject *http_model.SpecialSProjectResponse
|
|
|
+ currSpecialProject = &http_model.SpecialSProjectResponse{}
|
|
|
currSpecialProject.SProjectId = specialProject.SProjectId
|
|
|
currSpecialProject.ProjectPlatform = specialProject.ProjectPlatform
|
|
|
currSpecialProject.ProjectForm = specialProject.ProjectForm
|
|
|
currSpecialProject.ContentType = specialProject.ContentType
|
|
|
currSpecialProject.SProjectStatus = specialProject.SProjectStatus
|
|
|
+ currSpecialProject.StrategyStatus = specialProject.StrategyStatus
|
|
|
+ currSpecialProject.ApplyNum = specialProject.ApplyNum
|
|
|
+ currSpecialProject.RecruitNum = specialProject.RecruitNum
|
|
|
+ currSpecialProject.SettleNum = specialProject.SettleNum
|
|
|
|
|
|
// 2. 定向种草任务商品信息填入
|
|
|
// 2.1. 商品信息
|
|
@@ -422,20 +426,20 @@ func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pag
|
|
|
}
|
|
|
|
|
|
// 3. 招募策略信息
|
|
|
- recruitStrategy, recruitErr := db.GetRecruitStrategyByProjectId(ctx, specialProject.ProjectId)
|
|
|
- if recruitErr != nil {
|
|
|
- return nil, recruitErr
|
|
|
- }
|
|
|
- if recruitStrategy != nil {
|
|
|
- for _, strategy := range recruitStrategy {
|
|
|
- showStrategy := http_model.EasyRecruitStrategy{
|
|
|
- FeeForm: strategy.FeeForm,
|
|
|
- RecruitNumber: strategy.RecruitNumber,
|
|
|
- StrategyId: strategy.StrategyID,
|
|
|
- }
|
|
|
- currSpecialProject.RecruitStrategy = append(currSpecialProject.RecruitStrategy, showStrategy)
|
|
|
- }
|
|
|
- }
|
|
|
+ // recruitStrategy, recruitErr := db.GetRecruitStrategyByProjectId(ctx, specialProject.ProjectId)
|
|
|
+ // if recruitErr != nil {
|
|
|
+ // return nil, recruitErr
|
|
|
+ // }
|
|
|
+ // if recruitStrategy != nil {
|
|
|
+ // for _, strategy := range recruitStrategy {
|
|
|
+ // showStrategy := http_model.EasyRecruitStrategy{
|
|
|
+ // FeeForm: strategy.FeeForm,
|
|
|
+ // RecruitNumber: strategy.RecruitNumber,
|
|
|
+ // StrategyId: strategy.StrategyID,
|
|
|
+ // }
|
|
|
+ // currSpecialProject.RecruitStrategy = append(currSpecialProject.RecruitStrategy, showStrategy)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
// 4. 原种草任务信息
|
|
|
projectInfo, projectErr := db.GetProjectDetail(ctx, specialProject.ProjectId)
|