Xingyu Xian 2 долоо хоног өмнө
parent
commit
6b9b87fd70

+ 11 - 1
db/s_local_life.go

@@ -220,8 +220,18 @@ func GetSpecialLocalLifeList(ctx context.Context, pageSize, pageNum int32, suppl
 func UpdateSLocal(ctx context.Context, sLocalInfo *gorm_model.YounggeeSLocalLifeInfo) error {
 	db := GetWriteDB(ctx)
 	whereCondition := gorm_model.YounggeeSLocalLifeInfo{SLocalId: sLocalInfo.SLocalId}
-	err := db.Model(&gorm_model.YounggeeSLocalLifeInfo{}).Where(whereCondition).Updates(sLocalInfo).Error
+	sLocal := gorm_model.YounggeeSLocalLifeInfo{
+		SLocalStatus:       sLocalInfo.SLocalStatus,
+		SubAccountId:       sLocalInfo.SubAccountId,
+		OperatorType:       sLocalInfo.OperatorType,
+		SupplierId:         sLocalInfo.SupplierId,
+		StrategyStatus:     sLocalInfo.StrategyStatus,
+		CreateStrategyType: sLocalInfo.CreateStrategyType,
+		CreateStrategyId:   sLocalInfo.CreateStrategyId,
+	}
+	err := db.Model(&gorm_model.YounggeeSLocalLifeInfo{}).Where(whereCondition).Updates(sLocal).Error
 	if err != nil {
+		fmt.Println(err)
 		return err
 	}
 	return nil

+ 2 - 2
db/task.go

@@ -161,7 +161,7 @@ func GetUnfinishedTaskNumber(ctx context.Context, projectID string) (*int64, err
 func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 	db := GetReadDB(ctx)
 	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
 		return err
@@ -256,7 +256,7 @@ func SetTaskFinish(ctx context.Context, TaskIDs []string) error {
 func SetSpecialTaskFinish(ctx context.Context, TaskIDs []string) error {
 	db := GetReadDB(ctx)
 	// 1. 修改任务表,更新任务阶段为已结案,结案方式为正常结束,数据状态为已通过,
-	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2, CompleteDate: time.Now()}).Error
+	err := db.Model(gorm_model.YoungeeTaskInfo{}).Where("task_id in ?", TaskIDs).Updates(gorm_model.YoungeeTaskInfo{DataStatus: 5, TaskStage: 15, CompleteStatus: 2, WithdrawStatus: 2}).Error
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[Task db] Update YoungeeTaskInfo error,err:%+v", err)
 		return err

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

+ 57 - 57
model/gorm_model/project_task.go

@@ -5,63 +5,63 @@ import (
 )
 
 type YoungeeTaskInfo struct {
-	TaskID                 string    `gorm:"column:task_id;primary_key;AUTO_INCREMENT"`   // 任务id
-	ProjectID              string    `gorm:"column:project_id;NOT NULL"`                  // 项目id
-	TalentID               string    `gorm:"column:talent_id;NOT NULL"`                   // 达人id
-	AccountID              int       `gorm:"column:account_id;NOT NULL"`                  // 账号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"`       // 收货地址快照
-	StrategyID             int       `gorm:"column:strategy_id"`                          // 报名选择的招募策略id
-	TaskReward             float64   `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬
-	SettleAmount           float64   `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(扣除违约扣款)
-	AllPayment             float64   `gorm:"column:all_payment;NOT NULL"`                 // 企业支付
-	RealPayment            float64   `gorm:"column:real_payment;NOT NULL"`                // 企业实际支付(扣除违约扣款)
-	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"`   // 数据上传超时违约扣款比例,百分之
-	FeeForm                int       `gorm:"column:fee_form;NOT NULL"`                    // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
-	ServiceCharge          float64   `gorm:"column:service_charge"`                       // 服务费
-	ServiceRate            int       `gorm:"column:service_rate"`                         // 服务费率,千分之
-	TaskStatus             int       `gorm:"column:task_status;default:1;NOT NULL"`       // 任务状态 1待选 2已选 3落选
-	TaskStage              int       `gorm:"column:task_stage;NOT NULL"`                  // 任务阶段,详情见info_task_stage表
-	CreateDate             time.Time `gorm:"column:create_date;NOT NULL"`                 // 创建时间
-	SelectDate             time.Time `gorm:"column:select_date"`                          // 反选时间
-	DeliveryDate           time.Time `gorm:"column:delivery_date"`                        // 发货时间
-	CompleteStatus         int       `gorm:"column:complete_status;default:1;NOT NULL"`   // 结束方式 1未结束 2正常结束 3反选失败 4被解约
-	CompleteDate           time.Time `gorm:"column:complete_date"`                        // 结束时间
-	LogisticsStatus        int       `gorm:"column:logistics_status;default:1"`           // 发货状态 1 待发货 2已发货 3 已签收
-	ScriptStatus           uint      `gorm:"column:script_status;default:1"`              // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	SketchStatus           uint      `gorm:"column:sketch_status;default:1"`              // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	UpdateAt               time.Time `gorm:"column:update_at"`                            // 更新时间
-	LinkStatus             uint      `gorm:"column:link_status;default:1"`                // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	DataStatus             uint      `gorm:"column:data_status;default:1"`                // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
-	CurDefaultType         int       `gorm:"column:cur_default_type"`                     // 任务当前处于的违约类型 0-8分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约
-	CurBreakAt             time.Time `gorm:"column:cur_break_at"`                         // 当前阶段结束时间
-	WithdrawStatus         int       `gorm:"column:withdraw_status;default:1"`            // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
-	SettleStatus           int       `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
-	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"`                            // 达人稿费
-	SignedTime             time.Time `gorm:"column:signed_time"`                          // 签收时间
-	ViewAvg                int       `gorm:"column:view_avg"`                             // 浏览量
-	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"`                      // 商家操作人类型,1商家用户,2商家子账号,3管理后台
-	SOperator              int       `gorm:"column:s_operator"`                           // 服务商提报达人操作人ID
-	SOperatorType          int       `gorm:"column:s_operator_type"`                      // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
-	SProjectId             int       `gorm:"column:s_project_id"`                         // 服务商种草任务ID
-	SupportFee             float64   `gorm:"column:support_fee"`                          // 提报价格
-	TerminateTime          time.Time `gorm:"column:terminate_time"`                       // 终止合作时间
-	TerminateReason        string    `gorm:"column:terminate_reason"`                     // 终止合作理由
-	CancelTime             time.Time `gorm:"column:cancel_time"`                          // 解约时间
-	CancelReason           string    `gorm:"column:cancel_reason"`                        // 解约理由
-	SketchMissingTime      time.Time `gorm:"column:sketch_missing_time"`                  // 未传初稿违约时间
-	OpenId                 string    `gorm:"column:open_id"`                              // openID
+	TaskID                 string     `gorm:"column:task_id;primary_key;AUTO_INCREMENT"`   // 任务id
+	ProjectID              string     `gorm:"column:project_id;NOT NULL"`                  // 项目id
+	TalentID               string     `gorm:"column:talent_id;NOT NULL"`                   // 达人id
+	AccountID              int        `gorm:"column:account_id;NOT NULL"`                  // 账号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"`       // 收货地址快照
+	StrategyID             int        `gorm:"column:strategy_id"`                          // 报名选择的招募策略id
+	TaskReward             float64    `gorm:"column:task_reward;NOT NULL"`                 // 达人报酬
+	SettleAmount           float64    `gorm:"column:settle_amount;NOT NULL"`               // 达人实际所得(扣除违约扣款)
+	AllPayment             float64    `gorm:"column:all_payment;NOT NULL"`                 // 企业支付
+	RealPayment            float64    `gorm:"column:real_payment;NOT NULL"`                // 企业实际支付(扣除违约扣款)
+	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"`   // 数据上传超时违约扣款比例,百分之
+	FeeForm                int        `gorm:"column:fee_form;NOT NULL"`                    // 稿费形式,1,2,3分别代表产品置换、固定稿费、自报价
+	ServiceCharge          float64    `gorm:"column:service_charge"`                       // 服务费
+	ServiceRate            int        `gorm:"column:service_rate"`                         // 服务费率,千分之
+	TaskStatus             int        `gorm:"column:task_status;default:1;NOT NULL"`       // 任务状态 1待选 2已选 3落选
+	TaskStage              int        `gorm:"column:task_stage;NOT NULL"`                  // 任务阶段,详情见info_task_stage表
+	CreateDate             *time.Time `gorm:"column:create_date;NOT NULL"`                 // 创建时间
+	SelectDate             *time.Time `gorm:"column:select_date"`                          // 反选时间
+	DeliveryDate           *time.Time `gorm:"column:delivery_date"`                        // 发货时间
+	CompleteStatus         int        `gorm:"column:complete_status;default:1;NOT NULL"`   // 结束方式 1未结束 2正常结束 3反选失败 4被解约
+	CompleteDate           *time.Time `gorm:"column:complete_date"`                        // 结束时间
+	LogisticsStatus        int        `gorm:"column:logistics_status;default:1"`           // 发货状态 1 待发货 2已发货 3 已签收
+	ScriptStatus           uint       `gorm:"column:script_status;default:1"`              // 脚本上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	SketchStatus           uint       `gorm:"column:sketch_status;default:1"`              // 初稿上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	UpdateAt               *time.Time `gorm:"column:update_at"`                            // 更新时间
+	LinkStatus             uint       `gorm:"column:link_status;default:1"`                // 链接上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	DataStatus             uint       `gorm:"column:data_status;default:1"`                // 数据上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	CurDefaultType         int        `gorm:"column:cur_default_type"`                     // 任务当前处于的违约类型 0-8分别表示未违约、脚本超时违约、脚本未上传违约、初稿超时违约、初稿未上传违约、链接超时违约、链接未上传违约、数据超时违约、数据未上传违约
+	CurBreakAt             *time.Time `gorm:"column:cur_break_at"`                         // 当前阶段结束时间
+	WithdrawStatus         int        `gorm:"column:withdraw_status;default:1"`            // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
+	SettleStatus           int        `gorm:"column:settle_status;default:1"`              // 结算状态,1、2分别表示待结算、已结算
+	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"`                            // 达人稿费
+	SignedTime             *time.Time `gorm:"column:signed_time"`                          // 签收时间
+	ViewAvg                int        `gorm:"column:view_avg"`                             // 浏览量
+	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"`                      // 商家操作人类型,1商家用户,2商家子账号,3管理后台
+	SOperator              int        `gorm:"column:s_operator"`                           // 服务商提报达人操作人ID
+	SOperatorType          int        `gorm:"column:s_operator_type"`                      // 服务商操作人类型,1服务商主账号,2服务商子账号,3管理后台
+	SProjectId             int        `gorm:"column:s_project_id"`                         // 服务商种草任务ID
+	SupportFee             float64    `gorm:"column:support_fee"`                          // 提报价格
+	TerminateTime          *time.Time `gorm:"column:terminate_time"`                       // 终止合作时间
+	TerminateReason        string     `gorm:"column:terminate_reason"`                     // 终止合作理由
+	CancelTime             *time.Time `gorm:"column:cancel_time"`                          // 解约时间
+	CancelReason           string     `gorm:"column:cancel_reason"`                        // 解约理由
+	SketchMissingTime      *time.Time `gorm:"column:sketch_missing_time"`                  // 未传初稿违约时间
+	OpenId                 string     `gorm:"column:open_id"`                              // openID
 }
 
 func (m *YoungeeTaskInfo) TableName() string {

+ 1 - 0
model/gorm_model/s_local_life.go

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

+ 15 - 11
model/http_model/local_life_detail.go

@@ -10,17 +10,20 @@ type ShowLocalPhoto struct {
 
 type ShowLocalData struct {
 	// 系统信息
-	LocalId           string  `json:"local_id"`            // 本地生活ID
-	LocalPlatform     int     `json:"local_platform"`      // 任务平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
-	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"`          // 任务名称
+	LocalId           string  `json:"local_id"`             // 本地生活ID
+	LocalPlatform     int     `json:"local_platform"`       // 任务平台,1-7分别代表小红书、抖音、微博、快手、b站、大众点评、知乎
+	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"`           // 任务名称
+	AddToListOperator string  `json:"add_to_list_operator"` // 加入商单操作人
+	AgreeTime         string  `json:"agree_time"`           // 同意加入商单时间
+	RejectTime        string  `json:"reject_time"`          // 拒绝加入商单时间
 
 	// 关联主体
 	PromoteBody          int     `json:"promote_body"`            // 推广主体(1门店 2团购)
@@ -33,6 +36,7 @@ type ShowLocalData struct {
 	StoreMainPhotoUid    string  `json:"store_main_photo_uid"`    // 门店主图uid
 	StoreMainPhotoSymbol int     `json:"store_main_photo_symbol"` // 门店主图类型
 	StoreRelatedAt       string  `json:"store_related_at"`        // 关联门店时间
+	TeamNum              int     `json:"team_num"`                // 包含团购套餐数
 	TeamBuyingId         int     `json:"team_buying_id"`          // 关联团购id
 	TeamBuyingCategory   string  `json:"team_buying_category"`    // 团购类目(/分隔)
 	TeamBuyingName       string  `json:"team_buying_name"`        // 团购标题

+ 4 - 6
model/http_model/local_special_add_strategy.go

@@ -1,12 +1,10 @@
 package http_model
 
-import "youngee_b_api/model/gorm_model"
-
 type LocalSpecialAddStrategyRequest struct {
-	SLocalId         int                          `json:"s_local_id"`        // 服务商本地生活任务ID
-	RecruitStrategys []gorm_model.RecruitStrategy `json:"recruit_strategys"` // 招募策略
-	SupplierId       int                          `json:"supplier_id"`       // 服务商ID
-	SubAccountId     int                          `json:"sub_account_id"`    // 子账号ID
+	SLocalId         int                     `json:"s_local_id"`        // 服务商本地生活任务ID
+	RecruitStrategys []ChangeRecruitStrategy `json:"recruit_strategys"` // 招募策略
+	SupplierId       int                     `json:"supplier_id"`       // 服务商ID
+	SubAccountId     int                     `json:"sub_account_id"`    // 子账号ID
 	// CreateStrategyType int                          `json:"create_strategy_type"` // 服务商修改服务费操作人类型:1服务商主账号,2子账号
 }
 

+ 3 - 0
model/http_model/local_task_list.go

@@ -28,6 +28,9 @@ type LocalTaskPreview struct {
 	SelectDate       string  `json:"select_date"`       // 商家同意时间
 	DeliveryDate     string  `json:"delivery_date"`     // 发货时间
 	SignedTime       string  `json:"signed_time"`       // 收货时间
+	CancelTime       string  `json:"cancel_time"`       // 解约时间
+	CompletedTime    string  `json:"completed_time"`    // 结算时间
+	IfMissing        int     `json:"if_missing"`        // 是否有违约,0无,1有
 	CurBreakAt       string  `json:"cur_break_at"`      // 当前阶段结束时间
 	FansNum          int     `json:"fans_num"`          // 粉丝数
 	VoteAvg          int     `json:"vote_avg"`          // 平均点赞数

+ 3 - 0
model/http_model/project_taskList.go

@@ -34,6 +34,9 @@ type ProjectTaskPreview struct {
 	SelectDate       string  `json:"select_date"`       // 商家同意时间
 	DeliveryDate     string  `json:"delivery_date"`     // 发货时间
 	SignedTime       string  `json:"signed_time"`       // 收货时间
+	CancelTime       string  `json:"cancel_time"`       // 解约时间
+	CompletedTime    string  `json:"completed_time"`    // 结算时间
+	IfMissing        int     `json:"if_missing"`        // 是否有违约,0无,1有
 	CurBreakAt       string  `json:"cur_break_at"`      // 当前阶段结束时间
 	FansNum          int     `json:"fans_num"`          // 粉丝数
 	VoteAvg          int     `json:"vote_avg"`          // 平均点赞数

+ 2 - 2
model/http_model/s_special_project_list.go

@@ -24,7 +24,7 @@ type SpecialSProjectResponse struct {
 	ProductId          int64                 `json:"product_id"`           // 商品ID
 	ProductPrice       float64               `json:"product_price"`        // 商品售价
 	Tools              string                `json:"tools"`                // 工具选择,1邀约招募 2样品物流 3审稿工具 4作品审查 5数据巡检 6结算账单
-	StrategyStatus     int                   `json:"strategy_status"`      // 定向种草任务是否替换招募策略
+	StrategyStatus     int                   `json:"strategy_status"`      // 定向任务是否替换招募策略
 	SubAccountId       int                   `json:"sub_account_id"`       // 子账号ID
 	SupplierId         int                   `json:"supplier_id"`          // 服务商ID
 	OperatorType       int                   `json:"operator_type"`        // 添加商单操作人类型,1为服务商主账号,2为服务商子账号
@@ -32,7 +32,7 @@ type SpecialSProjectResponse struct {
 	RecruitNum         int                   `json:"recruit_num"`          // 已招募人数
 	SettleNum          int                   `json:"settle_num"`           // 已结算人数
 	ShareCode          string                `json:"share_code"`           // 分享码url
-	AddToListOperate   string                `json:"add_to_list_operate"`  // 接受商单操作人
+	AddToListOperator  string                `json:"add_to_list_operator"` // 接受商单操作人
 	AgreeTime          string                `json:"agree_time"`           // 接受商单时间
 }
 

+ 21 - 15
model/http_model/show_s_local_life.go

@@ -10,27 +10,33 @@ type ShowSLocalPhoto struct {
 
 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"`           // 创建时间
-	EnterpriseId      string  `json:"enterprise_id"`       // 商家ID
-	EnterprisePhone   string  `json:"enterprise_phone"`    // 商家用户手机号码
-	EstimatedCost     float64 `json:"estimated_cost"`      // 预估成本
-	ServiceChargeRate float64 `json:"service_charge_rate"` // 公开服务费率
-	PassAt            string  `json:"pass_at"`             // 审核通过时间
-	FinishAt          string  `json:"finish_at"`           // 结案时间
-	PayAt             string  `json:"pay_at"`              // 支付时间
-	AutoFailAt        string  `json:"auto_fail_at"`        // 自动失效时间
-	CreatorName       string  `json:"creator_name"`        // 创建者名称
+	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"`            // 创建时间
+	EnterpriseId      string  `json:"enterprise_id"`        // 商家ID
+	EnterprisePhone   string  `json:"enterprise_phone"`     // 商家用户手机号码
+	EstimatedCost     float64 `json:"estimated_cost"`       // 预估成本
+	ServiceChargeRate float64 `json:"service_charge_rate"`  // 公开服务费率
+	PassAt            string  `json:"pass_at"`              // 审核通过时间
+	FinishAt          string  `json:"finish_at"`            // 结案时间
+	PayAt             string  `json:"pay_at"`               // 支付时间
+	AutoFailAt        string  `json:"auto_fail_at"`         // 自动失效时间
+	CreatorName       string  `json:"creator_name"`         // 创建者名称
+	Tools             string  `json:"tools"`                // 工具选择
+	AddToListOperator string  `json:"add_to_list_operator"` // 加入商单操作人
+	AgreeTime         string  `json:"agree_time"`           // 同意加入商单时间
+	RejectTime        string  `json:"reject_time"`          // 拒绝加入商单时间
 
 	// 关联主体
 	StoreId              int     `json:"store_id"`                // 关联门店id
 	Donate               int     `json:"donate"`                  // 赠送达人套餐(1有赠送 2无赠送)
 	StoreName            string  `json:"store_name"`              // 门店名称
 	StoreCategory        string  `json:"store_category"`          // 门店类目(/分隔)
+	StoreLocation        string  `json:"store_location"`          // 门店位置
+	TeamNum              int     `json:"team_num"`                // 包含团购套餐数
 	StoreMainPhotoUrl    string  `json:"store_main_photo_url"`    // 门店主图URL
 	StoreMainPhotoUid    string  `json:"store_main_photo_uid"`    // 门店主图uid
 	StoreMainPhotoSymbol int     `json:"store_main_photo_symbol"` // 门店主图类型

+ 1 - 1
model/http_model/special_local_add_to_list.go

@@ -1,7 +1,7 @@
 package http_model
 
 type SpecialLocalAddToListRequest struct {
-	SLocalId     int `json:"sLocalId"`       //
+	SLocalId     int `json:"s_Local_id"`     // 服务商本地ID
 	SupplierId   int `json:"supplier_id"`    // 服务商ID
 	SubAccountId int `json:"sub_account_id"` // 子账号ID
 	SLocalStatus int `json:"s_local_status"` // 服务商本地生活任务状态,1待确认,2已确认,3已拒绝

+ 6 - 0
model/http_model/special_s_local_list.go

@@ -15,6 +15,7 @@ type SpecialSLocalListRequest struct {
 
 type SpecialSLocalPreview struct {
 	LocalId            string                 `json:"local_id"`             // 本地生活ID
+	SLocalId           int                    `json:"s_local_id"`           // 服务商本地ID
 	LocalName          string                 `json:"local_name"`           // 本地生活名称
 	TaskStatus         int                    `json:"task_status"`          // 本地生活状态
 	EnterpriseId       string                 `json:"enterprise_id"`        // 商家ID
@@ -36,6 +37,11 @@ type SpecialSLocalPreview struct {
 	SLocalStatus       int                    `json:"s_local_status"`       // 服务商本地生活任务状态,1待确认,2已确认,3已拒绝
 	Tools              string                 `json:"tools"`                // 工具选择
 	AgreeTime          string                 `json:"agree_time"`           // 同意加入商单时间
+	AddToListOperator  string                 `json:"add_to_list_operator"` // 加入商单操作人
+	StrategyStatus     int                    `json:"strategy_status"`      // 定向种草任务是否替换招募策略
+	ApplyNum           int                    `json:"apply_num"`            // 报名人数
+	RecruitNum         int                    `json:"recruit_num"`          // 已招募人数
+	SettleNum          int                    `json:"settle_num"`           // 已结算人数
 }
 
 type SpecialSLocalListData struct {

+ 5 - 5
pack/project_task_list.go

@@ -51,11 +51,11 @@ func GetTaskInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *http_model.Proje
 	TalentPlatformInfoSnap := taskAccount.TalentPlatformInfoSnap
 	fmt.Printf("任务-账户关联 %+v", taskAccount)
 	return &http_model.ProjectTaskInfo{
-		TaskID:             taskAccount.TaskID,
-		TaskReward:         taskAccount.TaskReward,
-		AllPayment:         taskAccount.AllPayment,
-		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname")),
-		CreateDate:         taskAccount.CreateDate,
+		TaskID:           taskAccount.TaskID,
+		TaskReward:       taskAccount.TaskReward,
+		AllPayment:       taskAccount.AllPayment,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname")),
+		//CreateDate:         taskAccount.CreateDate,
 		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url")),
 		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url")),
 		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count")),

+ 6 - 6
pack/special_task_invite_list.go

@@ -48,12 +48,12 @@ func GetSpecialTaskInviteInfoStruct(taskAccount gorm_model.YoungeeTaskInfo) *htt
 	TalentPersonalInfoSnap := taskAccount.TalentPersonalInfoSnap
 	//fmt.Printf("任务-账户关联 %+v", taskAccount)
 	return &http_model.SpecialTaskInviteInfo{
-		TaskID:             taskAccount.TaskID,
-		TaskReward:         taskAccount.TaskReward,
-		AllPayment:         taskAccount.AllPayment,
-		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname")),
-		Phone:              conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number")),
-		CreateDate:         taskAccount.CreateDate,
+		TaskID:           taskAccount.TaskID,
+		TaskReward:       taskAccount.TaskReward,
+		AllPayment:       taskAccount.AllPayment,
+		PlatformNickname: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname")),
+		Phone:            conv.MustString(gjson.Get(TalentPersonalInfoSnap, "talent_phone_number")),
+		//CreateDate:         taskAccount.CreateDate,
 		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url")),
 		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url")),
 		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count")),

+ 3 - 3
pack/special_task_script_list.go

@@ -81,8 +81,8 @@ func GetSpecialTaskSettleInfoStruct(SpecialTaskSettle *http_model.SpecialTaskSet
 		CreateAt:         SpecialTaskSettle.Data.CreateAt,
 		SubmitAt:         SpecialTaskSettle.Data.SubmitAt,
 		AgreeAt:          SpecialTaskSettle.Data.AgreeAt,
-		UpdateAt:         SpecialTaskSettle.Talent.UpdateAt,
-		RejectAt:         SpecialTaskSettle.Data.RejectAt,
-		IsReview:         SpecialTaskSettle.Data.IsReview,
+		// UpdateAt:         SpecialTaskSettle.Talent.UpdateAt,
+		RejectAt: SpecialTaskSettle.Data.RejectAt,
+		IsReview: SpecialTaskSettle.Data.IsReview,
 	}
 }

+ 11 - 0
service/local_life.go

@@ -213,14 +213,25 @@ func (*localLife) GetSpecialSLocalLifeList(ctx context.Context, pageSize, pageNu
 		var specialLocalPreview *http_model.SpecialSLocalPreview
 		specialLocalPreview = &http_model.SpecialSLocalPreview{}
 		specialLocalPreview.LocalId = specialLocal.LocalId
+		specialLocalPreview.SLocalId = specialLocal.SLocalId
+		specialLocalPreview.StrategyStatus = specialLocal.StrategyStatus
 		specialLocalPreview.LocalName = specialLocal.LocalName
 		specialLocalPreview.TaskStatus = specialLocal.TaskStatus
 		specialLocalPreview.LocalPlatform = specialLocal.LocalPlatform
 		specialLocalPreview.TaskForm = specialLocal.TaskForm
 		specialLocalPreview.LocalType = specialLocal.LocalType
+		specialLocalPreview.ApplyNum = specialLocal.ApplyNum
+		specialLocalPreview.RecruitNum = specialLocal.RecruitNum
+		specialLocalPreview.SettleNum = specialLocal.SettleNum
 		specialLocalPreview.EnterpriseId = specialLocal.EnterpriseId
 		specialLocalPreview.LocalContentType = specialLocal.ContentType
 		specialLocalPreview.SLocalStatus = specialLocal.SLocalStatus
+		specialLocalPreview.StoreId = specialLocal.StoreId
+		if specialLocal.OperatorType == 1 {
+			specialLocalPreview.AddToListOperator = conv.MustString(specialLocal.SupplierId)
+		} else {
+			specialLocalPreview.AddToListOperator = conv.MustString(specialLocal.SubAccountId)
+		}
 		if specialLocalPreview.SLocalStatus == 2 {
 			specialLocalPreview.AgreeTime = conv.MustString(specialLocal.AgreeTime)[0:19]
 		}

+ 22 - 5
service/project.go

@@ -504,11 +504,28 @@ func (*project) GetProjectTaskList(ctx context.Context, pageSize, pageNum int64,
 				projectTaskInfo.SupportFee = projectTask.SupportFee
 				projectTaskInfo.StrategyId = projectTask.StrategyID
 				projectTaskInfo.TaskStatus = projectTask.TaskStatus
-				projectTaskInfo.CreateDate = conv.MustString(projectTask.CreateDate)
-				projectTaskInfo.SelectDate = conv.MustString(projectTask.SelectDate)
-				projectTaskInfo.DeliveryDate = conv.MustString(projectTask.DeliveryDate)
-				projectTaskInfo.SignedTime = conv.MustString(projectTask.SignedTime)
-				projectTaskInfo.CurBreakAt = conv.MustString(projectTask.CurBreakAt)
+				if projectTask.CreateDate != nil {
+					projectTaskInfo.CreateDate = conv.MustString(projectTask.CreateDate)[0:19]
+				}
+				if projectTask.SelectDate != nil {
+					projectTaskInfo.SelectDate = conv.MustString(projectTask.SelectDate)[0:19]
+				}
+				if projectTask.DeliveryDate != nil {
+					projectTaskInfo.DeliveryDate = conv.MustString(projectTask.DeliveryDate)[0:19]
+				}
+				if projectTask.SignedTime != nil {
+					projectTaskInfo.SignedTime = conv.MustString(projectTask.SignedTime)[0:19]
+				}
+				if projectTask.CurBreakAt != nil {
+					projectTaskInfo.CurBreakAt = conv.MustString(projectTask.CurBreakAt)[0:19]
+				}
+				if projectTask.CompleteDate != nil {
+					projectTaskInfo.CompletedTime = conv.MustString(projectTask.CompleteDate)[0:19]
+				}
+				if projectTask.CancelTime != nil {
+					projectTaskInfo.CancelTime = conv.MustString(projectTask.CancelTime)[0:19]
+				}
+				projectTaskInfo.IfMissing = 0
 				projectTaskInfo.FansNum = projectTask.FansNum
 				projectTaskInfo.VoteAvg = projectTask.VoteAvg
 				projectTaskInfo.CommitAvg = projectTask.CommitAvg

+ 79 - 12
service/s_local_life.go

@@ -119,11 +119,32 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
 		sLocalInfo.LocalPlatform = localInfo.LocalPlatform
 		sLocalInfo.TaskStatus = localInfo.TaskStatus
 		sLocalInfo.EnterpriseId = localInfo.EnterpriseId
+		sLocalInfo.Tools = localInfo.Tools
 		sLocalInfo.ServiceChargeRate = localInfo.ServiceChargeRate
 		if localInfo.PayAt != nil {
 			sLocalInfo.PayAt = conv.MustString(localInfo.PayAt)[0:19]
 		}
 		sLocalInfo.EstimatedCost = 0.0
+		sLocalInfo.CreatorName = localInfo.EnterpriseId
+
+		sLocal, sLocalErr := db.GetSLocalLifeDetail(ctx, req.SLocalId)
+		if sLocalErr != nil {
+			return nil, sLocalErr
+		}
+		if sLocal != nil {
+			if sLocal.OperatorType == 1 {
+				sLocalInfo.AddToListOperator = conv.MustString(sLocal.SupplierId)
+			} else {
+				sLocalInfo.AddToListOperator = conv.MustString(sLocal.SubAccountId)
+			}
+			if sLocal.CreateTime != nil {
+				sLocalInfo.AgreeTime = conv.MustString(sLocal.CreateTime)[0:19]
+			}
+			if sLocal.RejectTime != nil {
+				sLocalInfo.RejectTime = conv.MustString(sLocal.RejectTime)[0:19]
+			}
+
+		}
 
 		// 2. 关联主体
 		// 2.1. 门店信息
@@ -135,6 +156,8 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
 			sLocalInfo.StoreId = storeInfo.StoreId
 			sLocalInfo.StoreName = storeInfo.StoreName
 			sLocalInfo.StoreCategory = storeInfo.StoreCategory
+			sLocalInfo.StoreLocation = storeInfo.StoreLocation
+			sLocalInfo.TeamNum = storeInfo.TeamNum
 			sLocalInfo.StoreRelatedAt = conv.MustString(localInfo.StoreRelatedAt)
 
 			// 2.2. 门店图片信息
@@ -159,6 +182,7 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
 			return nil, teamErr
 		}
 		if teamInfo != nil {
+			sLocalInfo.TeamBuyingPrice = teamInfo.TeamBuyingPrice
 			sLocalInfo.TeamBuyingId = teamInfo.TeamBuyingId
 			sLocalInfo.TeamBuyingName = teamInfo.TeamBuyingName
 			sLocalInfo.TeamBuyingCategory = teamInfo.TeamBuyingCategory
@@ -350,11 +374,33 @@ func (*sLocalLife) GetLocalTaskList(ctx context.Context, pageSize, pageNum int32
 				localTaskInfo.SupportFee = localTask.SupportFee
 				localTaskInfo.StrategyId = localTask.StrategyID
 				localTaskInfo.TaskStatus = localTask.TaskStatus
-				localTaskInfo.CreateDate = conv.MustString(localTask.CreateDate)
-				localTaskInfo.SelectDate = conv.MustString(localTask.SelectDate)
-				localTaskInfo.DeliveryDate = conv.MustString(localTask.DeliveryDate)
-				localTaskInfo.SignedTime = conv.MustString(localTask.SignedTime)
-				localTaskInfo.CurBreakAt = conv.MustString(localTask.CurBreakAt)
+				if localTask.CreateDate != nil {
+					localTaskInfo.CreateDate = conv.MustString(localTask.CreateDate)[0:19]
+				}
+				if localTask.SelectDate != nil {
+					localTaskInfo.SelectDate = conv.MustString(localTask.SelectDate)[0:19]
+				}
+				if localTask.DeliveryDate != nil {
+					localTaskInfo.DeliveryDate = conv.MustString(localTask.DeliveryDate)[0:19]
+				}
+				if localTask.SignedTime != nil {
+					localTaskInfo.SignedTime = conv.MustString(localTask.SignedTime)[0:19]
+				}
+				if localTask.CurBreakAt != nil {
+					localTaskInfo.CurBreakAt = conv.MustString(localTask.CurBreakAt)[0:19]
+				}
+				if localTask.CompleteDate != nil {
+					localTaskInfo.CompletedTime = conv.MustString(localTask.CompleteDate)[0:19]
+				}
+				if localTask.CancelTime != nil {
+					localTaskInfo.CancelTime = conv.MustString(localTask.CancelTime)[0:19]
+				}
+				localTaskInfo.IfMissing = 0
+				//localTaskInfo.CreateDate = conv.MustString(localTask.CreateDate)
+				//localTaskInfo.SelectDate = conv.MustString(localTask.SelectDate)
+				//localTaskInfo.DeliveryDate = conv.MustString(localTask.DeliveryDate)
+				//localTaskInfo.SignedTime = conv.MustString(localTask.SignedTime)
+				//localTaskInfo.CurBreakAt = conv.MustString(localTask.CurBreakAt)
 				localTaskInfo.FansNum = localTask.FansNum
 				localTaskInfo.VoteAvg = localTask.VoteAvg
 				localTaskInfo.CommitAvg = localTask.CommitAvg
@@ -416,6 +462,7 @@ func (*sLocalLife) ChangeSupplierStatus(ctx context.Context, req *http_model.Spe
 	sLocalInfo.SubAccountId = req.SubAccountId
 	sLocalInfo.OperatorType = operatorType
 	sLocalInfo.SLocalStatus = req.SLocalStatus
+	fmt.Println("data: ", sLocalInfo)
 	err := db.UpdateSLocal(ctx, sLocalInfo)
 	if err != nil {
 		return err
@@ -427,15 +474,35 @@ func (*sLocalLife) ChangeSupplierStatus(ctx context.Context, req *http_model.Spe
 func (*sLocalLife) CreateSpecialStrategy(ctx context.Context, request *http_model.LocalSpecialAddStrategyRequest) error {
 	// 1. 添加服务商招募策略
 	// 1.1. 整理数据
+	var recruitStrategys []gorm_model.RecruitStrategy
 	for _, strategy := range request.RecruitStrategys {
+		var recruitStrategy *gorm_model.RecruitStrategy
+		recruitStrategy = &gorm_model.RecruitStrategy{}
+
+		recruitStrategy.StrategyID = strategy.StrategyID
+		recruitStrategy.QuoteRecruitStrategyId = strategy.QuoteRecruitStrategyId
+		recruitStrategy.FeeForm = strategy.FeeForm
+		recruitStrategy.StrategyID = strategy.StrategyID
+		recruitStrategy.FollowersLow = strategy.FollowersLow
+		recruitStrategy.FollowersUp = strategy.FollowersUp
+		recruitStrategy.RecruitNumber = strategy.RecruitNumber
+		recruitStrategy.Offer = strategy.Offer
+		recruitStrategy.ServiceCharge = strategy.ServiceCharge
+		recruitStrategy.StrategyType = 2
+		recruitStrategy.QuoteRecruitStrategyId = strategy.QuoteRecruitStrategyId
+
 		// 一口价需要计算服务费率和达人所见报价
-		strategy.ServiceRate = int(strategy.ServiceCharge / strategy.Offer)
-		strategy.TOffer = strategy.Offer - strategy.ServiceCharge
-		strategy.ProjectID = "0"
-		strategy.SLocalId = request.SLocalId
-		strategy.QuoteRecruitStrategyId = int(strategy.RecruitStrategyID)
+		if strategy.FeeForm == 3 {
+			recruitStrategy.ServiceRate = strategy.ServiceRate
+		} else {
+			recruitStrategy.ServiceRate = int(strategy.ServiceCharge / strategy.Offer)
+		}
+		recruitStrategy.TOffer = strategy.Offer - strategy.ServiceCharge
+		recruitStrategy.ProjectID = "0"
+		recruitStrategy.SLocalId = request.SLocalId
+		recruitStrategys = append(recruitStrategys, *recruitStrategy)
 	}
-	createErr := db.CreateSpecialStrategy(ctx, request.RecruitStrategys)
+	createErr := db.CreateSpecialStrategy(ctx, recruitStrategys)
 	if createErr != nil {
 		return createErr
 	}
@@ -634,7 +701,7 @@ func (p *sLocalLife) GetLocalStrategys(ctx *gin.Context, req *http_model.LocalSt
 	}
 	if slocalInfo != nil {
 		if slocalInfo.StrategyStatus == 1 {
-			recruitStrategys, getProjectStrategysErr := db.GetRecruitStrategyBySProjectId(ctx, req.SLocalId)
+			recruitStrategys, getProjectStrategysErr := db.GetRecruitStrategyBySLocalId(ctx, req.SLocalId)
 			if getProjectStrategysErr != nil {
 				return nil, getProjectStrategysErr
 			}

+ 2 - 2
service/s_project.go

@@ -476,7 +476,7 @@ func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pag
 					return nil, supplierErr
 				}
 				if supplierInfo != nil {
-					currSpecialProject.AddToListOperate = supplierInfo.SupplierName
+					currSpecialProject.AddToListOperator = supplierInfo.SupplierName
 				}
 			} else if specialProject.OperatorType == 2 {
 				subAccountInfo, subAccountErr := db.FindSubAccountById(ctx, specialProject.SubAccountId)
@@ -484,7 +484,7 @@ func (*sProject) GetSpecialSProjectList(ctx context.Context, supplierId int, pag
 					return nil, subAccountErr
 				}
 				if subAccountInfo != nil {
-					currSpecialProject.AddToListOperate = subAccountInfo.SubAccountName
+					currSpecialProject.AddToListOperator = subAccountInfo.SubAccountName
 				}
 			}