Xingyu Xian 2 周之前
父節點
當前提交
bfddabbba8

+ 4 - 4
db/local_life_task.go

@@ -195,25 +195,25 @@ func CountLocalTaskNumByTaskStage(ctx context.Context, taskStage int, supplierSt
 	db := GetReadDB(ctx)
 	var taskNum int64
 	if taskStage == 0 && supplierStatus == 0 {
-		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("s_project_id = ?", sLocalId).Count(&taskNum).Error
+		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("s_local_id = ?", sLocalId).Count(&taskNum).Error
 		if err != nil {
 			logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
 			return 0, err
 		}
 	} else if taskStage == 0 {
-		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("supplier_status = ? and s_project_id = ?", supplierStatus, sLocalId).Count(&taskNum).Error
+		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("supplier_status = ? and s_local_id = ?", supplierStatus, sLocalId).Count(&taskNum).Error
 		if err != nil {
 			logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
 			return 0, err
 		}
 	} else if supplierStatus == 0 {
-		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_status = ? and s_project_id = ?", taskStage, sLocalId).Count(&taskNum).Error
+		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_status = ? and s_local_id = ?", taskStage, sLocalId).Count(&taskNum).Error
 		if err != nil {
 			logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
 			return 0, err
 		}
 	} else {
-		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_status = ? and supplier_status = ? and s_project_id = ?", taskStage, supplierStatus, sLocalId).Count(&taskNum).Error
+		err := db.Model(gorm_model.YoungeeLocalTaskInfo{}).Where("task_status = ? and supplier_status = ? and s_local_id = ?", taskStage, supplierStatus, sLocalId).Count(&taskNum).Error
 		if err != nil {
 			logrus.WithContext(ctx).Errorf("[CreateMessageByTask] error read mysql, err:%+v", err)
 			return 0, err

+ 3 - 3
db/s_local_life.go

@@ -128,11 +128,11 @@ func FindSLocalByLocalIdAndSupplierId(ctx context.Context, localId string, suppl
 }
 
 // GetFullSLocalLifeList 商单管理-公开本地生活列表
-func GetFullSLocalLifeList(ctx context.Context, pageSize, pageNum int32, condition *common_model.SLocalLifeCondition) ([]*gorm_model.YounggeeSLocalLifeInfo, int64, error) {
+func GetFullSLocalLifeList(ctx context.Context, pageSize, pageNum int32, supplierId int, condition *common_model.SLocalLifeCondition) ([]*gorm_model.YounggeeSLocalLifeInfo, int64, error) {
 	db := GetReadDB(ctx)
 
 	// 根据带货任务状态过滤
-	db = db.Debug().Model(gorm_model.YounggeeSLocalLifeInfo{}).Where("task_status = 4 and local_type = 1")
+	db = db.Debug().Model(gorm_model.YounggeeSLocalLifeInfo{}).Where("task_status = 4 and local_type = 1 and supplier_id = ?", supplierId)
 
 	// 根据条件过滤
 	conditionType := reflect.TypeOf(condition).Elem()
@@ -177,7 +177,7 @@ func GetSpecialLocalLifeList(ctx context.Context, pageSize, pageNum int32, suppl
 	if tag == 1 {
 		db = db.Debug().Model(gorm_model.YounggeeSLocalLifeInfo{}).Where("task_status = 8 and local_type = 2 and supplier_id = ?", supplierId)
 	} else {
-		db = db.Debug().Model(gorm_model.YounggeeSLocalLifeInfo{}).Where("local_type = 2 and supplier_id = ?", supplierId)
+		db = db.Debug().Model(gorm_model.YounggeeSLocalLifeInfo{}).Where("local_type = 2 and s_local_status = 2 and supplier_id = ?", supplierId)
 
 	}
 

+ 1 - 1
db/s_project.go

@@ -80,7 +80,7 @@ func GetSpecialProjectList(ctx context.Context, supplierId int, pageSize, pageNu
 	if tag == 1 {
 		db = db.Debug().Model(gorm_model.SProjectInfo{}).Where("supplier_id = ? and project_status = 8 and project_type = 2", supplierId)
 	} else {
-		db = db.Debug().Model(gorm_model.SProjectInfo{}).Where("supplier_id = ? and project_type = 2", supplierId)
+		db = db.Debug().Model(gorm_model.SProjectInfo{}).Where("supplier_id = ? and project_type = 2 and s_project_status = 2", supplierId)
 	}
 
 	// 2. 根据SProjectCondition条件过滤

+ 77 - 77
model/gorm_model/local_life_task_info.go

@@ -5,83 +5,83 @@ import (
 )
 
 type YoungeeLocalTaskInfo struct {
-	TaskID                 string    `gorm:"column:task_id;primary_key"`                            // 任务id
-	LocalID                string    `gorm:"column:local_id;NOT NULL"`                              // 项目id
-	TalentID               string    `gorm:"column:talent_id;NOT NULL"`                             // 达人id
-	AccountID              int       `gorm:"column:account_id;NOT NULL"`                            // 账号id
-	StrategyID             int       `gorm:"column:strategy_id"`                                    // 报名选择的招募策略id
-	TalentPlatformInfoSnap string    `gorm:"column:talent_platform_info_snap;NOT NULL"`             // 达人平台信息快照
-	TalentPersonalInfoSnap string    `gorm:"column:talent_personal_info_snap;NOT NULL"`             // 达人个人信息快照
-	TalentPostAddrSnap     string    `gorm:"column:talent_post_addr_snap;NOT NULL"`                 // 收货地址快照
-	TaskReward             float64   `gorm:"column:task_reward;NOT NULL"`                           // 达人报酬(3.0未用)
-	SettleAmount           float64   `gorm:"column:settle_amount;NOT NULL"`                         // 达人实际所得(自动填充)(扣除违约扣款)
-	AllPayment             float64   `gorm:"column:all_payment;NOT NULL"`                           // 企业支付(3.0未用)
-	RealPayment            float64   `gorm:"column:real_payment;NOT NULL"`                          // 企业实际支付(加上服务商的服务费)(扣除违约扣款)
-	ServiceRate            int       `gorm:"column:service_rate"`                                   // 服务费率,千分之
-	ServiceCharge          float64   `gorm:"column:service_charge"`                                 // 服务费
-	RealServiceCharge      string    `gorm:"column:real_service_charge"`                            // 服务商实际所得服务费(扣除违约)
-	FeeForm                int       `gorm:"column:fee_form"`                                       // 稿费形式,1,2,3分别代表产品置换、一口价、自报价
-	ErrBreakRate           int       `gorm:"column:err_break_rate;default:0;NOT NULL"`              // 未上传类型违约扣款比例,百分之
-	ScriptBreakRate        int       `gorm:"column:script_break_rate;default:0;NOT NULL"`           // 脚本上传超时违约扣款比例,百分之
-	SketchBreakRate        int       `gorm:"column:sketch_break_rate;default:0;NOT NULL"`           // 初稿上传超时违约扣款比例,百分之
-	LinkBreakRate          int       `gorm:"column:link_break_rate;default:0;NOT NULL"`             // 链接上传超时违约扣款比例,百分之
-	DataBreakRate          int       `gorm:"column:data_break_rate;default:0;NOT NULL"`             // 数据上传超时违约扣款比例,百分之
-	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                            // 任务阶段,1:已报名, 2:申请成功, 3:申请失败, 4:待预约探店, 5:预约确认中 6:预约成功  , 7:待传脚本, 8:脚本待审, 9:待传初稿, 10:初稿待审, 11:待传链接, 12:链接待审, 13:待传数据, 14:数据待审, 15:已结案, 16:解约, 17:终止合作(过渡态)
-	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`                 // 商家任务状态 1待选 2已选 3落选
-	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`                     // 发货状态 1 待发货 2已发货 3 已签收
-	BookStatus             uint      `gorm:"column:book_status;default:1"`                          // 预约探店状态 1-6分别代表待预约、已预约、待修改、已修改、已通过(待探店)、已探店
-	SketchStatus           uint      `gorm:"column:sketch_status;default:1"`                        // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	LinkStatus             uint      `gorm:"column:link_status;default:1"`                          // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	DataStatus             uint      `gorm:"column:data_status;default:1"`                          // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	CompleteStatus         int       `gorm:"column:complete_status;default:1"`                      // 结束方式 1未结束 2正常结束 3反选失败 4被解约
-	UpdateAt               time.Time `gorm:"column:update_at"`                                      // 更新时间
-	CreateDate             time.Time `gorm:"column:create_date;default:CURRENT_TIMESTAMP;NOT NULL"` // 创建时间,即报名时间
-	SelectDate             time.Time `gorm:"column:select_date"`                                    // 反选时间,即任务开始执行时间
-	DeliveryDate           time.Time `gorm:"column:delivery_date"`                                  // 发货时间
-	CompleteDate           time.Time `gorm:"column:complete_date"`                                  // 结束时间
-	WithdrawDate           time.Time `gorm:"column:withdraw_date"`                                  // 提现时间
-	CurDefaultType         int       `gorm:"column:cur_default_type"`                               // 当前违约类型 0未违约 1脚本超时违约 2脚本未上传违约 3初稿超时违约 4初稿未上传违约 5链接超时违约 6链接未上传违约 7数据超时违约 8数据未上传违约 9解约待处理 10解约
-	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`                      // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
-	LeadTeamID             string    `gorm:"column:lead_team_id"`                                   // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
-	TeamID                 string    `gorm:"column:team_id"`                                        // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
-	SettleStatus           int       `gorm:"column:settle_status;default:1"`                        // 结算状态,1、2分别表示待结算、已结算
-	TeamIncome             string    `gorm:"column:team_income"`                                    // young之团团长现金收益
-	TeamPoint              int       `gorm:"column:team_point"`                                     // young之团团长积分收益
-	CurBreakAt             time.Time `gorm:"column:cur_break_at"`                                   // 当前阶段截止时间
-	SupplierID             int       `gorm:"column:supplier_id;default:0"`                          // 服务商ID
-	SupplierStatus         int       `gorm:"column:supplier_status;default:0"`                      // 服务商任务状态 0表示达人来源非服务商 1待选 2已选 3落选
-	DraftFee               float64   `gorm:"column:draft_fee;default:0.00"`                         // 达人稿费,达人所见的稿费金额
-	SignedTime             time.Time `gorm:"column:signed_time"`                                    // 签收时间
-	FansNum                int       `gorm:"column:fans_num"`                                       // 粉丝数
-	VoteAvg                int       `gorm:"column:vote_avg"`                                       // 平均点赞数
-	CommitAvg              int       `gorm:"column:commit_avg"`                                     // 平均评论数
-	BOperator              string    `gorm:"column:b_operator"`                                     // 商家确定达人操作人ID
-	BOperatorType          int       `gorm:"column:b_operator_type;default:0"`                      // 商家操作人类型,1商家用户,2商家子账号,3管理后台
-	SOperator              int       `gorm:"column:s_operator;default:0"`                           // 服务商提报达人操作人ID
-	SOperatorType          int       `gorm:"column:s_operator_type;default:0"`                      // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
-	OpenID                 string    `gorm:"column:open_id"`                                        // 达人报名的快手唯一标识
-	SLocalID               int       `gorm:"column:s_local_id"`                                     // 服务商本地生活任务ID
-	SupportFee             float64   `gorm:"column:support_fee"`                                    // 提报价格(达人自报价经过计算后,)
-	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time"`                            // 未传初稿违约时间
-	SketchMissingStatus    int       `gorm:"column:sketch_missing_status;default:0"`                // 未传初稿违约状态,0无违约,1有违约
-	LinkMissingTime        time.Time `gorm:"column:link_missing_time"`                              // 未发作品违约时间
-	LinkMissingStatus      int       `gorm:"column:link_missing_status;default:0"`                  // 未发作品违约状态,0无违约,1有违约
-	DataMissingTime        time.Time `gorm:"column:data_missing_time"`                              // 未传数据违约时间
-	DataMissingStatus      int       `gorm:"column:data_missing_status;default:0"`                  // 未传数据违约状态,0无违约,1有违约
-	TerminateOperatorType  int       `gorm:"column:terminate_operator_type"`                        // 终止合作操作人类型,1商家用户,2商家子账号,3管理后台
-	TerminateOperator      string    `gorm:"column:terminate_operator"`                             // 终止合作操作人ID
-	TerminateReason        string    `gorm:"column:terminate_reason"`                               // 终止理由
-	TerminateTime          time.Time `gorm:"column:terminate_time"`                                 // 终止合作时间
-	CancelOperatorType     int       `gorm:"column:cancel_operator_type"`                           // 解约操作人类型,1商家用户,2商家子账号,3管理后台
-	CancelOperator         string    `gorm:"column:cancel_operator"`                                // 解约操作人ID
-	CancelReason           string    `gorm:"column:cancel_reason"`                                  // 解约原因
-	CancelTime             time.Time `gorm:"column:cancel_time"`                                    // 解约时间
-	PlatformID             int       `gorm:"column:platform_id;NOT NULL"`                           // 平台id
-	City                   string    `gorm:"column:city;NOT NULL"`                                  // 所在城市
-	ReserveTime            time.Time `gorm:"column:reserve_time"`                                   // 预约探店时间
-	ExploreTime            time.Time `gorm:"column:explore_time"`                                   // 探店时间
-	FinishExploreTime      time.Time `gorm:"column:finish_explore_time"`                            // 完成探店时间
-	WxNum                  string    `gorm:"column:wx_num"`                                         // 报名时填写的微信号
+	TaskID                 string    `gorm:"column:task_id;primary_key"`                  // 任务id
+	LocalID                string    `gorm:"column:local_id;NOT NULL"`                    // 项目id
+	TalentID               string    `gorm:"column:talent_id;NOT NULL"`                   // 达人id
+	AccountID              int       `gorm:"column:account_id;NOT NULL"`                  // 账号id
+	StrategyID             int       `gorm:"column:strategy_id"`                          // 报名选择的招募策略id
+	TalentPlatformInfoSnap string    `gorm:"column:talent_platform_info_snap;NOT NULL"`   // 达人平台信息快照
+	TalentPersonalInfoSnap string    `gorm:"column:talent_personal_info_snap;NOT NULL"`   // 达人个人信息快照
+	TalentPostAddrSnap     string    `gorm:"column:talent_post_addr_snap;NOT NULL"`       // 收货地址快照
+	TaskReward             float64   `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬(3.0未用)
+	SettleAmount           float64   `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(自动填充)(扣除违约扣款)
+	AllPayment             float64   `gorm:"column:all_payment;NOT NULL"`                 // 企业支付(3.0未用)
+	RealPayment            float64   `gorm:"column:real_payment;NOT NULL"`                // 企业实际支付(加上服务商的服务费)(扣除违约扣款)
+	ServiceRate            int       `gorm:"column:service_rate"`                         // 服务费率,千分之
+	ServiceCharge          float64   `gorm:"column:service_charge"`                       // 服务费
+	RealServiceCharge      string    `gorm:"column:real_service_charge"`                  // 服务商实际所得服务费(扣除违约)
+	FeeForm                int       `gorm:"column:fee_form"`                             // 稿费形式,1,2,3分别代表产品置换、一口价、自报价
+	ErrBreakRate           int       `gorm:"column:err_break_rate;default:0;NOT NULL"`    // 未上传类型违约扣款比例,百分之
+	ScriptBreakRate        int       `gorm:"column:script_break_rate;default:0;NOT NULL"` // 脚本上传超时违约扣款比例,百分之
+	SketchBreakRate        int       `gorm:"column:sketch_break_rate;default:0;NOT NULL"` // 初稿上传超时违约扣款比例,百分之
+	LinkBreakRate          int       `gorm:"column:link_break_rate;default:0;NOT NULL"`   // 链接上传超时违约扣款比例,百分之
+	DataBreakRate          int       `gorm:"column:data_break_rate;default:0;NOT NULL"`   // 数据上传超时违约扣款比例,百分之
+	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                  // 任务阶段,1:已报名, 2:申请成功, 3:申请失败, 4:待预约探店, 5:预约确认中 6:预约成功  , 7:待传脚本, 8:脚本待审, 9:待传初稿, 10:初稿待审, 11:待传链接, 12:链接待审, 13:待传数据, 14:数据待审, 15:已结案, 16:解约, 17:终止合作(过渡态)
+	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`       // 商家任务状态 1待选 2已选 3落选
+	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`           // 发货状态 1 待发货 2已发货 3 已签收
+	BookStatus             uint      `gorm:"column:book_status;default:1"`                // 预约探店状态 1-6分别代表待预约、已预约、待修改、已修改、已通过(待探店)、已探店
+	SketchStatus           uint      `gorm:"column:sketch_status;default:1"`              // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	LinkStatus             uint      `gorm:"column:link_status;default:1"`                // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	DataStatus             uint      `gorm:"column:data_status;default:1"`                // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	CompleteStatus         int       `gorm:"column:complete_status;default:1"`            // 结束方式 1未结束 2正常结束 3反选失败 4被解约
+	UpdateAt               time.Time `gorm:"column:update_at"`                            // 更新时间
+	CreateDate             time.Time `gorm:"column:create_date;NOT NULL"`                 // 创建时间,即报名时间
+	SelectDate             time.Time `gorm:"column:select_date"`                          // 反选时间,即任务开始执行时间
+	DeliveryDate           time.Time `gorm:"column:delivery_date"`                        // 发货时间
+	CompleteDate           time.Time `gorm:"column:complete_date"`                        // 结束时间
+	WithdrawDate           time.Time `gorm:"column:withdraw_date"`                        // 提现时间
+	CurDefaultType         int       `gorm:"column:cur_default_type"`                     // 当前违约类型 0未违约 1脚本超时违约 2脚本未上传违约 3初稿超时违约 4初稿未上传违约 5链接超时违约 6链接未上传违约 7数据超时违约 8数据未上传违约 9解约待处理 10解约
+	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`            // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	LeadTeamID             string    `gorm:"column:lead_team_id"`                         // 作为团长的young之团id,对应younggee_talent_team中的team_id字段
+	TeamID                 string    `gorm:"column:team_id"`                              // 作为团员的young之团id,对应younggee_talent_team中的team_id字段
+	SettleStatus           int       `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
+	TeamIncome             string    `gorm:"column:team_income"`                          // young之团团长现金收益
+	TeamPoint              int       `gorm:"column:team_point"`                           // young之团团长积分收益
+	CurBreakAt             time.Time `gorm:"column:cur_break_at"`                         // 当前阶段截止时间
+	SupplierID             int       `gorm:"column:supplier_id;default:0"`                // 服务商ID
+	SupplierStatus         int       `gorm:"column:supplier_status;default:0"`            // 服务商任务状态 0表示达人来源非服务商 1待选 2已选 3落选
+	DraftFee               float64   `gorm:"column:draft_fee;default:0.00"`               // 达人稿费,达人所见的稿费金额
+	SignedTime             time.Time `gorm:"column:signed_time"`                          // 签收时间
+	FansNum                int       `gorm:"column:fans_num"`                             // 粉丝数
+	VoteAvg                int       `gorm:"column:vote_avg"`                             // 平均点赞数
+	CommitAvg              int       `gorm:"column:commit_avg"`                           // 平均评论数
+	BOperator              string    `gorm:"column:b_operator"`                           // 商家确定达人操作人ID
+	BOperatorType          int       `gorm:"column:b_operator_type;default:0"`            // 商家操作人类型,1商家用户,2商家子账号,3管理后台
+	SOperator              int       `gorm:"column:s_operator;default:0"`                 // 服务商提报达人操作人ID
+	SOperatorType          int       `gorm:"column:s_operator_type;default:0"`            // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
+	OpenID                 string    `gorm:"column:open_id"`                              // 达人报名的快手唯一标识
+	SLocalID               int       `gorm:"column:s_local_id"`                           // 服务商本地生活任务ID
+	SupportFee             float64   `gorm:"column:support_fee"`                          // 提报价格(达人自报价经过计算后,)
+	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time"`                  // 未传初稿违约时间
+	SketchMissingStatus    int       `gorm:"column:sketch_missing_status;default:0"`      // 未传初稿违约状态,0无违约,1有违约
+	LinkMissingTime        time.Time `gorm:"column:link_missing_time"`                    // 未发作品违约时间
+	LinkMissingStatus      int       `gorm:"column:link_missing_status;default:0"`        // 未发作品违约状态,0无违约,1有违约
+	DataMissingTime        time.Time `gorm:"column:data_missing_time"`                    // 未传数据违约时间
+	DataMissingStatus      int       `gorm:"column:data_missing_status;default:0"`        // 未传数据违约状态,0无违约,1有违约
+	TerminateOperatorType  int       `gorm:"column:terminate_operator_type"`              // 终止合作操作人类型,1商家用户,2商家子账号,3管理后台
+	TerminateOperator      string    `gorm:"column:terminate_operator"`                   // 终止合作操作人ID
+	TerminateReason        string    `gorm:"column:terminate_reason"`                     // 终止理由
+	TerminateTime          time.Time `gorm:"column:terminate_time"`                       // 终止合作时间
+	CancelOperatorType     int       `gorm:"column:cancel_operator_type"`                 // 解约操作人类型,1商家用户,2商家子账号,3管理后台
+	CancelOperator         string    `gorm:"column:cancel_operator"`                      // 解约操作人ID
+	CancelReason           string    `gorm:"column:cancel_reason"`                        // 解约原因
+	CancelTime             time.Time `gorm:"column:cancel_time"`                          // 解约时间
+	PlatformID             int       `gorm:"column:platform_id;NOT NULL"`                 // 平台id
+	City                   string    `gorm:"column:city;NOT NULL"`                        // 所在城市
+	ReserveTime            time.Time `gorm:"column:reserve_time"`                         // 预约探店时间
+	ExploreTime            time.Time `gorm:"column:explore_time"`                         // 探店时间
+	FinishExploreTime      time.Time `gorm:"column:finish_explore_time"`                  // 完成探店时间
+	WxNum                  string    `gorm:"column:wx_num"`                               // 报名时填写的微信号
 }
 
 func (m *YoungeeLocalTaskInfo) TableName() string {

+ 1 - 0
model/gorm_model/s_local_life.go

@@ -36,6 +36,7 @@ type YounggeeSLocalLifeInfo struct {
 	FinishTime          *time.Time `gorm:"column:finish_time"`            // 结束时间
 	CreateStrategyId    int        `gorm:"column:create_strategy_id"`     // 服务商修改服务费操作人ID
 	CreateStrategyType  int        `gorm:"column:create_strategy_type"`   // 服务商修改服务费操作人类型:1服务商主账号,2子账号
+	AgreeTime           *time.Time `gorm:"column:agree_time"`             // 同意邀约时间
 }
 
 func (m *YounggeeSLocalLifeInfo) TableName() string {

+ 1 - 0
model/gorm_model/s_project.go

@@ -32,6 +32,7 @@ type SProjectInfo struct {
 	CreateStrategyType  int        `gorm:"column:create_strategy_type"`                    // 服务商修改服务费操作人类型:1服务商主账号,2子账号
 	CreateTime          *time.Time `gorm:"column:create_time"`                             // 创建时间
 	FinishTime          *time.Time `gorm:"column:finish_time"`                             // 结案时间
+	AgreeTime           *time.Time `gorm:"column:agree_time"`                              // 同意邀约时间
 }
 
 func (m *SProjectInfo) TableName() string {

+ 5 - 0
model/http_model/local_life_detail.go

@@ -15,15 +15,20 @@ type ShowLocalData struct {
 	TaskStatus        int     `json:"task_status"`         // 任务状态
 	CreateAt          string  `json:"create_at"`           // 创建时间
 	EnterpriseId      string  `json:"enterprise_id"`       // 商家ID
+	CreatorName       string  `json:"creator_name"`        // 创建人名称
 	EnterprisePhone   string  `json:"enterprise_phone"`    // 商家用户手机号码
 	EstimatedCost     string  `json:"estimated_cost"`      // 预估成本
 	ServiceChargeRate float64 `json:"service_charge_rate"` // 公开服务费率
+	PassAt            string  `json:"pass_at"`             // 招募开始时间
+	LocalName         string  `json:"local_name"`          // 任务名称
 
 	// 关联主体
 	PromoteBody          int     `json:"promote_body"`            // 推广主体(1门店 2团购)
+	Donate               int     `json:"donate"`                  // 赠送达人套餐(1有赠送 2无赠送)
 	StoreId              int     `json:"store_id"`                // 关联门店id
 	StoreName            string  `json:"store_name"`              // 门店名称
 	StoreCategory        string  `json:"store_category"`          // 门店类目(/分隔)
+	StoreLocation        string  `json:"store_location"`          // 门店地址
 	StoreMainPhotoUrl    string  `json:"store_main_photo_url"`    // 门店主图URL
 	StoreMainPhotoUid    string  `json:"store_main_photo_uid"`    // 门店主图uid
 	StoreMainPhotoSymbol int     `json:"store_main_photo_symbol"` // 门店主图类型

+ 2 - 0
model/http_model/project_taskList.go

@@ -27,6 +27,8 @@ type ProjectTaskPreview struct {
 	DraftFee         float64 `json:"draft_fee"`         // 达人稿费
 	SupportFee       float64 `json:"support_fee"`       // 提报价格
 	StrategyId       int     `json:"strategy_id"`       // 报名选择的招募策略id
+	CooperateNum     int     `json:"cooperate_num"`     // 服务商-达人合作次数
+	IfCooperate      int     `json:"if_cooperate"`      // 服务商-达人是否合作过,1无,2合作过
 	TaskStatus       int     `json:"task_status"`       // 任务状态
 	CreateDate       string  `json:"create_date"`       // 创建时间
 	SelectDate       string  `json:"select_date"`       // 商家同意时间

+ 5 - 2
model/http_model/s_local_life_list.go

@@ -16,14 +16,16 @@ type FullSLocalListRequest struct {
 type FullSLocalPreview struct {
 	LocalId              string  `json:"local_id"`                // 本地生活ID
 	SLocalId             int     `json:"s_local_id"`              // 服务商加入商单后本地生活id
+	EnterpriseId         string  `json:"enterprise_id"`           // 商家ID
 	LocalName            string  `json:"local_name"`              // 本地生活名称
 	TaskStatus           int     `json:"task_status"`             // 本地生活状态
 	LocalPlatform        int     `json:"local_platform"`          // 本地生活平台
 	TaskForm             int     `json:"task_form"`               // 本地生活形式
 	LocalType            int     `json:"local_type"`              // 本地生活类型
 	LocalContentType     int     `json:"local_content_type"`      // 本地生活内容形式
-	ServiceCharge        float64 `json:"service_charge"`          // 预估赚
-	ServiceChargeActual  float64 `json:"service_charge_actual"`   // 实际已赚
+	ServiceCharge        float64 `json:"service_charge"`          // 服务商预估可赚服务费
+	ServiceChargeActual  float64 `json:"service_charge_actual"`   // 服务商实际可赚服务费
+	ServiceChargeSettle  float64 `json:"service_charge_settle"`   // 服务商已结算服务费
 	RecruitDdl           string  `json:"recruit_ddl"`             // 招募截至时间
 	StoreMainPhotoUrl    string  `json:"store_main_photo_url"`    // 门店主图URL
 	StoreMainPhotoSymbol int64   `json:"store_main_photo_symbol"` // 标志位
@@ -31,6 +33,7 @@ type FullSLocalPreview struct {
 	StoreName            string  `json:"store_name"`              // 门店名称
 	StoreId              int     `json:"store_id"`                // 门店ID
 	TeamBuyingId         int     `json:"team_buying_id"`          // 团购ID
+	TeamBuyingPrice      float64 `json:"team_buying_price"`       // 团购售价
 	ApplyNum             int     `json:"apply_num"`               // 报名人数
 	RecruitNum           int     `json:"recruit_num"`             // 已招募人数
 	SettleNum            int     `json:"settle_num"`              // 已结算人数

+ 3 - 3
model/http_model/s_special_project_list.go

@@ -1,7 +1,5 @@
 package http_model
 
-import "time"
-
 type SpecialSProjectListData struct {
 	SpecialProjectInfo []*SpecialSProjectResponse `json:"special_project_info"`
 	Total              int64                      `json:"total"`
@@ -10,13 +8,14 @@ type SpecialSProjectListData struct {
 type SpecialSProjectResponse struct {
 	SProjectId         int                   `json:"s_project_id"`         // 服务商加入商单后的种草任务ID
 	ProjectId          string                `json:"project_id"`           // 服务商加入商单前的种草任务ID
+	EnterpriseId       string                `json:"enterprise_id"`        // 商家ID
 	ProjectName        string                `json:"project_name"`         // 种草任务名称
 	ProjectStatus      int                   `json:"project_status"`       // 种草任务状态
 	ProjectPlatform    int64                 `json:"project_platform"`     // 种草任务平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
 	ProjectForm        int64                 `json:"project_form"`         // 任务形式,1-3分别代表商品寄拍、素材分发、虚拟产品测评
 	ContentType        int64                 `json:"content_type"`         // 内容形式,1代表图文,2代表视频
 	SProjectStatus     int                   `json:"s_project_status"`     // 服务商种草任务状态,1待确认,2已确认,3已拒绝
-	CreateTime         *time.Time            `json:"create_time"`          // 创建时间
+	CreateTime         string                `json:"create_time"`          // 创建时间
 	RecruitStrategy    []EasyRecruitStrategy `json:"recruit_strategy"`     // 招募策略
 	ProductPhotoUrl    string                `json:"product_photo_url"`    // 商品主图URL
 	ProductPhotoSymbol int64                 `json:"product_photo_symbol"` // 标志位
@@ -34,6 +33,7 @@ type SpecialSProjectResponse struct {
 	SettleNum          int                   `json:"settle_num"`           // 已结算人数
 	ShareCode          string                `json:"share_code"`           // 分享码url
 	AddToListOperate   string                `json:"add_to_list_operate"`  // 接受商单操作人
+	AgreeTime          string                `json:"agree_time"`           // 接受商单时间
 }
 
 func NewSpecialSProjectListRequest() *SpecialProjectListRequest {

+ 3 - 0
model/http_model/show_s_local_life.go

@@ -12,6 +12,7 @@ type ShowSLocalData struct {
 	// 系统信息
 	SLocalId          int     `json:"s_local_id"`          // 主键ID
 	LocalId           string  `json:"local_id"`            // 被加入商单的原本地生活ID
+	LocalName         string  `json:"local_name"`          // 本地生活名称
 	LocalPlatform     int     `json:"local_platform"`      // 任务平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
 	TaskStatus        int     `json:"task_status"`         // 任务状态
 	CreateAt          string  `json:"create_at"`           // 创建时间
@@ -23,9 +24,11 @@ type ShowSLocalData struct {
 	FinishAt          string  `json:"finish_at"`           // 结案时间
 	PayAt             string  `json:"pay_at"`              // 支付时间
 	AutoFailAt        string  `json:"auto_fail_at"`        // 自动失效时间
+	CreatorName       string  `json:"creator_name"`        // 创建者名称
 
 	// 关联主体
 	StoreId              int     `json:"store_id"`                // 关联门店id
+	Donate               int     `json:"donate"`                  // 赠送达人套餐(1有赠送 2无赠送)
 	StoreName            string  `json:"store_name"`              // 门店名称
 	StoreCategory        string  `json:"store_category"`          // 门店类目(/分隔)
 	StoreMainPhotoUrl    string  `json:"store_main_photo_url"`    // 门店主图URL

+ 4 - 0
model/http_model/special_local_list.go

@@ -15,6 +15,8 @@ type SpecialLocalListRequest struct {
 
 type SpecialLocalPreview struct {
 	LocalId            string                 `json:"local_id"`             // 本地生活ID
+	SLocalId           int                    `json:"s_local_id"`           // 服务商本地生活ID
+	EnterpriseId       string                 `json:"enterprise_id"`        // 商家ID
 	LocalName          string                 `json:"local_name"`           // 本地生活名称
 	TaskStatus         int                    `json:"task_status"`          // 本地生活状态
 	LocalPlatform      int                    `json:"local_platform"`       // 本地生活平台
@@ -34,6 +36,8 @@ type SpecialLocalPreview struct {
 	StoreId            int                    `json:"store_id"`             // 门店ID
 	SLocalStatus       int                    `json:"s_local_status"`       // 服务商本地生活任务状态,1待确认,2已确认,3已拒绝
 	Tools              string                 `json:"tools"`                // 工具选择
+	AddToListStatus    int                    `json:"add_to_list_status"`   // 加入商单状态,1已加入,2未加入
+	CreateTime         string                 `json:"create_time"`          // 邀请时间
 }
 
 type SpecialLocalListData struct {

+ 2 - 0
model/http_model/special_project_list.go

@@ -23,6 +23,7 @@ type SpecialProjectListData struct {
 type SpecialProjectResponse struct {
 	SProjectId         int                   `json:"s_project_id"`         // 服务商加入商单后的种草任务ID
 	ProjectId          string                `json:"project_id"`           // 服务商加入商单前的种草任务ID
+	EnterpriseId       string                `json:"enterprise_id"`        // 商家ID
 	ProjectStatus      int                   `json:"project_status"`       // 种草任务状态
 	ProjectName        string                `json:"project_name"`         // 种草任务名称
 	ProjectPlatform    int64                 `json:"project_platform"`     // 种草任务平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
@@ -38,6 +39,7 @@ type SpecialProjectResponse struct {
 	ProductId          int64                 `json:"product_id"`           // 商品ID
 	ProductPrice       float64               `json:"product_price"`        // 商品售价
 	Tools              string                `json:"tools"`                // 工具选择,1邀约招募 2样品物流 3审稿工具 4作品审查 5数据巡检 6结算账单(,分隔)
+	AddToListStatus    int                   `json:"add_to_list_status"`   // 加入商单状态,1已加入,2未加入
 }
 
 func NewSpecialProjectListRequest() *SpecialProjectListRequest {

+ 2 - 0
model/http_model/special_s_local_list.go

@@ -17,6 +17,7 @@ type SpecialSLocalPreview struct {
 	LocalId            string                 `json:"local_id"`             // 本地生活ID
 	LocalName          string                 `json:"local_name"`           // 本地生活名称
 	TaskStatus         int                    `json:"task_status"`          // 本地生活状态
+	EnterpriseId       string                 `json:"enterprise_id"`        // 商家ID
 	LocalPlatform      int                    `json:"local_platform"`       // 本地生活平台
 	TaskForm           int                    `json:"task_form"`            // 本地生活形式
 	LocalType          int                    `json:"local_type"`           // 本地生活类型
@@ -34,6 +35,7 @@ type SpecialSLocalPreview struct {
 	StoreId            int                    `json:"store_id"`             // 门店ID
 	SLocalStatus       int                    `json:"s_local_status"`       // 服务商本地生活任务状态,1待确认,2已确认,3已拒绝
 	Tools              string                 `json:"tools"`                // 工具选择
+	AgreeTime          string                 `json:"agree_time"`           // 同意加入商单时间
 }
 
 type SpecialSLocalListData struct {

+ 20 - 0
service/local_life.go

@@ -120,14 +120,23 @@ func (*localLife) GetSpecialLocalLifeList(ctx context.Context, pageSize, pageNum
 	for _, specialLocal := range specialLocals {
 		var specialLocalPreview *http_model.SpecialLocalPreview
 		specialLocalPreview = &http_model.SpecialLocalPreview{}
+		specialLocalPreview.SLocalId = specialLocal.SLocalId
+		specialLocalPreview.EnterpriseId = specialLocal.EnterpriseId
 		specialLocalPreview.LocalId = specialLocal.LocalId
 		specialLocalPreview.LocalName = specialLocal.LocalName
 		specialLocalPreview.TaskStatus = specialLocal.TaskStatus
 		specialLocalPreview.LocalPlatform = specialLocal.LocalPlatform
 		specialLocalPreview.TaskForm = specialLocal.TaskForm
+		specialLocalPreview.StoreId = specialLocal.StoreId
 		specialLocalPreview.LocalType = specialLocal.LocalType
 		specialLocalPreview.LocalContentType = specialLocal.ContentType
 		specialLocalPreview.SLocalStatus = specialLocal.SLocalStatus
+		specialLocalPreview.CreateTime = conv.MustString(specialLocal.CreateTime)[0:19]
+		if specialLocal.SLocalStatus == 2 {
+			specialLocalPreview.AddToListStatus = 1
+		} else {
+			specialLocalPreview.AddToListStatus = 2
+		}
 		specialLocalData.SpecialLocalPreview = append(specialLocalData.SpecialLocalPreview, specialLocalPreview)
 	}
 
@@ -209,8 +218,12 @@ func (*localLife) GetSpecialSLocalLifeList(ctx context.Context, pageSize, pageNu
 		specialLocalPreview.LocalPlatform = specialLocal.LocalPlatform
 		specialLocalPreview.TaskForm = specialLocal.TaskForm
 		specialLocalPreview.LocalType = specialLocal.LocalType
+		specialLocalPreview.EnterpriseId = specialLocal.EnterpriseId
 		specialLocalPreview.LocalContentType = specialLocal.ContentType
 		specialLocalPreview.SLocalStatus = specialLocal.SLocalStatus
+		if specialLocalPreview.SLocalStatus == 2 {
+			specialLocalPreview.AgreeTime = conv.MustString(specialLocal.AgreeTime)[0:19]
+		}
 		specialLocalData.SpecialSLocalPreview = append(specialLocalData.SpecialSLocalPreview, specialLocalPreview)
 	}
 
@@ -282,13 +295,19 @@ func (*localLife) ShowLocalLife(ctx context.Context, req *http_model.ShowLocalRe
 		return nil, localErr
 	}
 	if localData != nil {
+		localInfo.Donate = localData.Donate
 		localInfo.LocalId = localData.LocalId
+		localInfo.LocalName = localData.LocalName
 		localInfo.LocalPlatform = localData.LocalPlatform
 		localInfo.TaskStatus = localData.TaskStatus
 		localInfo.EnterpriseId = localData.EnterpriseId
 		localInfo.ServiceChargeRate = localData.ServiceChargeRate
 		localInfo.EstimatedCost = localData.EstimatedCost
 		localInfo.CreateAt = conv.MustString(localData.CreatedAt)[0:19]
+		if localData.PassAt != nil {
+			localInfo.PassAt = conv.MustString(localData.PassAt)[0:19]
+		}
+		localInfo.CreatorName = localData.EnterpriseId
 
 		// 2. 关联主体
 		// 2.1. 门店信息
@@ -298,6 +317,7 @@ func (*localLife) ShowLocalLife(ctx context.Context, req *http_model.ShowLocalRe
 			return nil, storeErr
 		}
 		if storeInfo != nil {
+			localInfo.StoreLocation = storeInfo.StoreLocation
 			localInfo.StoreId = storeInfo.StoreId
 			localInfo.StoreName = storeInfo.StoreName
 			localInfo.StoreCategory = storeInfo.StoreCategory

+ 8 - 3
service/s_local_life.go

@@ -36,6 +36,7 @@ func (*sLocalLife) CreateSLocalLife(ctx context.Context, request *http_model.Loc
 		sLocalLifeInfo.SettleNum = 0
 		sLocalLifeInfo.RecruitNum = 0
 		sLocalLifeInfo.ApplyNum = 0
+		sLocalLifeInfo.EnterpriseId = localLifeInfo.EnterpriseId
 		sLocalLifeInfo.LocalType = localLifeInfo.LocalType
 		sLocalLifeInfo.LocalName = localLifeInfo.LocalName
 		sLocalLifeInfo.LocalPlatform = localLifeInfo.LocalPlatform
@@ -111,6 +112,9 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
 	if localInfo != nil {
 		sLocalInfo.CreateAt = conv.MustString(localInfo.CreatedAt)[0:19]
 		sLocalInfo.LocalId = localInfo.LocalId
+		sLocalInfo.LocalName = localInfo.LocalName
+		sLocalInfo.CreatorName = localInfo.EnterpriseId
+		sLocalInfo.Donate = localInfo.Donate
 		sLocalInfo.SLocalId = req.SLocalId
 		sLocalInfo.LocalPlatform = localInfo.LocalPlatform
 		sLocalInfo.TaskStatus = localInfo.TaskStatus
@@ -245,7 +249,7 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
 func (*sLocalLife) GetFullSLocalLifeList(ctx context.Context, pageSize, pageNum int32, supplierId int, condition *common_model.SLocalLifeCondition) (*http_model.FullSLocalListData, error) {
 
 	// 1. 查询本地生活任务基本信息
-	fullLocals, total, err := db.GetFullSLocalLifeList(ctx, pageSize, pageNum, condition)
+	fullLocals, total, err := db.GetFullSLocalLifeList(ctx, pageSize, pageNum, supplierId, condition)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[fullLocals service] call GetFullSLocalLifeList error,err:%+v", err)
 		return nil, err
@@ -258,13 +262,14 @@ func (*sLocalLife) GetFullSLocalLifeList(ctx context.Context, pageSize, pageNum
 		fullLocalPreview = &http_model.FullSLocalPreview{}
 		fullLocalPreview.LocalId = fullLocal.LocalId
 		fullLocalPreview.SLocalId = fullLocal.SLocalId
+		fullLocalPreview.EnterpriseId = fullLocal.EnterpriseId
 		fullLocalPreview.LocalName = fullLocal.LocalName
 		fullLocalPreview.StoreId = fullLocal.StoreId
 		fullLocalPreview.TeamBuyingId = fullLocal.TeamBuyingId
 		fullLocalPreview.TaskStatus = fullLocal.TaskStatus
 		fullLocalPreview.LocalPlatform = fullLocal.LocalPlatform
 		fullLocalPreview.TaskForm = fullLocal.TaskForm
-		if fullLocalPreview.OperatorType == 1 {
+		if fullLocal.OperatorType == 1 {
 			fullLocalPreview.AddToListOperator = conv.MustString(fullLocal.SupplierId)
 		} else {
 			fullLocalPreview.AddToListOperator = conv.MustString(fullLocal.SubAccountId)
@@ -274,7 +279,7 @@ func (*sLocalLife) GetFullSLocalLifeList(ctx context.Context, pageSize, pageNum
 		fullLocalPreview.SupplierId = supplierId
 		fullLocalPreview.SubAccountId = fullLocal.SubAccountId
 		fullLocalPreview.OperatorType = fullLocal.OperatorType
-		fullLocalPreview.CreateTime = conv.MustString(fullLocal.CreateTime)
+		fullLocalPreview.CreateTime = conv.MustString(fullLocal.CreateTime)[0:19]
 		fullLocalPreview.ServiceCharge = fullLocal.ServiceCharge
 		fullLocalPreview.ServiceChargeActual = fullLocal.ServiceChargeActual
 		fullLocalPreview.ApplyNum = fullLocal.ApplyNum

+ 12 - 0
service/s_project.go

@@ -117,6 +117,7 @@ func (*sProject) GetSProjectList(ctx context.Context, supplierId int, pageSize,
 		currSProject.ProjectName = sProjectInfo.ProjectName
 		currSProject.ProjectPlatform = sProjectInfo.ProjectPlatform
 		currSProject.ContentType = sProjectInfo.ContentType
+		currSProject.EnterpriseId = sProjectInfo.EnterpriseId
 		currSProject.ProjectForm = sProjectInfo.ProjectForm
 		currSProject.ProjectStatus = sProjectInfo.ProjectStatus
 		currSProject.SupplierId = sProjectInfo.SupplierId
@@ -366,10 +367,16 @@ func (*sProject) GetSpecialProjectList(ctx context.Context, supplierId int, page
 			currSpecialProject.ProjectName = specialProject.ProjectName
 			currSpecialProject.ProjectStatus = int(specialProject.ProjectStatus)
 			currSpecialProject.SProjectId = specialProject.SProjectId
+			currSpecialProject.EnterpriseId = specialProject.EnterpriseId
 			currSpecialProject.ProjectPlatform = specialProject.ProjectPlatform
 			currSpecialProject.ProjectForm = specialProject.ProjectForm
 			currSpecialProject.ContentType = specialProject.ContentType
 			currSpecialProject.SProjectStatus = specialProject.SProjectStatus
+			if specialProject.SProjectStatus == 2 {
+				currSpecialProject.AddToListStatus = 1
+			} else {
+				currSpecialProject.AddToListStatus = 2
+			}
 
 			// 2. 定向种草任务商品信息填入
 			// 2.1. 商品信息
@@ -451,11 +458,16 @@ func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pag
 			currSpecialProject.ProjectPlatform = specialProject.ProjectPlatform
 			currSpecialProject.ProjectForm = specialProject.ProjectForm
 			currSpecialProject.ContentType = specialProject.ContentType
+			currSpecialProject.EnterpriseId = specialProject.EnterpriseId
 			currSpecialProject.SProjectStatus = specialProject.SProjectStatus
 			currSpecialProject.StrategyStatus = specialProject.StrategyStatus
 			currSpecialProject.ApplyNum = specialProject.ApplyNum
 			currSpecialProject.RecruitNum = specialProject.RecruitNum
 			currSpecialProject.SettleNum = specialProject.SettleNum
+			currSpecialProject.CreateTime = conv.MustString(specialProject.CreateTime)[0:19]
+			if specialProject.SProjectStatus == 2 {
+				currSpecialProject.AgreeTime = conv.MustString(specialProject.AgreeTime)[0:19]
+			}
 
 			// 加入商单操作人信息
 			if specialProject.OperatorType == 1 {