Эх сурвалжийг харах

selection_add_sub_account

Xingyu Xian 3 долоо хоног өмнө
parent
commit
43b588c494

+ 2 - 0
model/gorm_model/selection_task_info.go

@@ -51,6 +51,8 @@ type YounggeeSecTaskInfo struct {
 	BOperator              string     `gorm:"column:b_operator;size:255" json:"b_operator" comment:"ID"`
 	CreateLogisticUserType int        `gorm:"column:create_logistic_user_type"` // 创建快递单类型
 	CreateLogisticUserId   string     `gorm:"column:create_logistic_user_id"`   // 创建快递单ID
+	ChooseTalentUserId     string     `gorm:"column:choose_talent_user_id"`     // 同意/拒绝达人操作人ID
+	ChooseTalentUserType   int        `gorm:"column:choose_talent_user_type"`   // 同意/拒绝达人操作人类型,1商家,2子账号
 }
 
 func (m *YounggeeSecTaskInfo) TableName() string {

+ 42 - 36
model/http_model/GetSecTaskList.go

@@ -24,42 +24,48 @@ type GetSecTaskListData struct {
 }
 
 type SecTaskInfo struct {
-	SelectionId           string    `json:"selection_id"`            // 带货任务ID
-	SecTaskId             string    `json:"sec_task_id"`             // 带货任务ID
-	PlatformNickname      string    `json:"platform_nickname"`       // 帐号昵称
-	TalentId              string    `json:"talent_id"`               // 达人ID
-	TalentAvatar          string    `json:"talent_avatar"`           // 达人头像
-	KuaiShouUserId        string    `json:"kuai_shou_user_id"`       // 快手账号
-	KuaiShouUserGender    string    `json:"kuai_shou_user_gender"`   // 快手用户性别
-	KuaiShouUserLocation  string    `json:"kuai_shou_user_location"` // 快手用户ip属地
-	FansCount             string    `json:"fans_count"`              // 粉丝数
-	EnterpriseId          string    `json:"enterprise_id"`           // 商家ID
-	SubAccountId          int       `json:"sub_account_id"`          // 商家子账号ID
-	HomePageCaptureUrl    string    `json:"home_page_capture_url"`   // 主页截图链接
-	HomePageUrl           string    `json:"home_page_url"`           // 主页链接
-	RegionCode            int       `json:"region_code"`             // 区域编码
-	DetailAddr            string    `json:"detail_addr"`             // 物流信息
-	CompanyName           string    `json:"company_name"`            // 物流公司
-	LogisticsNumber       string    `json:"logistics_number"`        // 物流单号
-	ExplorestoreStarttime time.Time `json:"explorestore_starttime"`  // 线下探店-探店开始时间
-	ExplorestoreEndtime   time.Time `json:"explorestore_endtime"`    // 线下探店-探店结束时间
-	ExplorestorePeriod    string    `json:"explorestore_period"`     // 线下探店-探店持续时间
-	DataScreenshot        string    `json:"data_screenshot"`         // 数据截图
-	AssignmentLink        string    `json:"assignment_link"`         // 作业链接
-	ReturnMoney           string    `json:"return_money"`            // 返现
-	TaskReward            string    `json:"task_reward"`             // 悬赏金
-	IsPayReward           int       `json:"is_pay_reward"`           // 是否给悬赏金
-	IsPayPayment          int       `json:"is_pay_payment"`          // 是否返现
-	CreateDate            string    `json:"create_date"`             // 创建时间
-	SelectDate            string    `json:"select_date"`             // 反选时间
-	DeliveryDate          string    `json:"delivery_date"`           // 发货时间
-	CompleteDate          string    `json:"complete_date"`           // 结算时间
-	SignedTime            string    `json:"signed_time"`             // 快递签收时间
-	SaleNum               int       `json:"sale_num"`                // 30天橱窗销量
-	FreeStrategyId        int       `json:"free_strategy_id"`        // 免费领样策略id
-	ProductId             int       `json:"product_id"`              // 商品ID
-	FreeStage             int       `json:"free_stage"`              // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货
-	RewardStage           int       `json:"reward_stage"`            // 悬赏阶段,1-2分别代表待结算(管理后台设置)、已结算(小程序端设置)
+	SelectionId            string    `json:"selection_id"`              // 带货任务ID
+	SecTaskId              string    `json:"sec_task_id"`               // 带货任务ID
+	PlatformNickname       string    `json:"platform_nickname"`         // 帐号昵称
+	TalentId               string    `json:"talent_id"`                 // 达人ID
+	TalentAvatar           string    `json:"talent_avatar"`             // 达人头像
+	KuaiShouUserId         string    `json:"kuai_shou_user_id"`         // 快手账号
+	KuaiShouUserGender     string    `json:"kuai_shou_user_gender"`     // 快手用户性别
+	KuaiShouUserLocation   string    `json:"kuai_shou_user_location"`   // 快手用户ip属地
+	FansCount              string    `json:"fans_count"`                // 粉丝数
+	EnterpriseId           string    `json:"enterprise_id"`             // 商家ID
+	SubAccountId           int       `json:"sub_account_id"`            // 商家子账号ID
+	HomePageCaptureUrl     string    `json:"home_page_capture_url"`     // 主页截图链接
+	HomePageUrl            string    `json:"home_page_url"`             // 主页链接
+	RegionCode             int       `json:"region_code"`               // 区域编码
+	DetailAddr             string    `json:"detail_addr"`               // 物流信息
+	CompanyName            string    `json:"company_name"`              // 物流公司
+	LogisticsNumber        string    `json:"logistics_number"`          // 物流单号
+	ExplorestoreStarttime  time.Time `json:"explorestore_starttime"`    // 线下探店-探店开始时间
+	ExplorestoreEndtime    time.Time `json:"explorestore_endtime"`      // 线下探店-探店结束时间
+	ExplorestorePeriod     string    `json:"explorestore_period"`       // 线下探店-探店持续时间
+	DataScreenshot         string    `json:"data_screenshot"`           // 数据截图
+	AssignmentLink         string    `json:"assignment_link"`           // 作业链接
+	ReturnMoney            string    `json:"return_money"`              // 返现
+	TaskReward             string    `json:"task_reward"`               // 悬赏金
+	IsPayReward            int       `json:"is_pay_reward"`             // 是否给悬赏金
+	IsPayPayment           int       `json:"is_pay_payment"`            // 是否返现
+	CreateDate             string    `json:"create_date"`               // 创建时间
+	SelectDate             string    `json:"select_date"`               // 反选时间
+	DeliveryDate           string    `json:"delivery_date"`             // 发货时间
+	CompleteDate           string    `json:"complete_date"`             // 结算时间
+	SignedTime             string    `json:"signed_time"`               // 快递签收时间
+	SaleNum                int       `json:"sale_num"`                  // 30天橱窗销量
+	FreeStrategyId         int       `json:"free_strategy_id"`          // 免费领样策略id
+	ProductId              int       `json:"product_id"`                // 商品ID
+	FreeStage              int       `json:"free_stage"`                // 免费领样阶段,1-5分别代表已申请、已拒绝、待发货、已发货、已收货
+	RewardStage            int       `json:"reward_stage"`              // 悬赏阶段,1-2分别代表待结算(管理后台设置)、已结算(小程序端设置)
+	CreateLogisticUserId   string    `json:"create_logistic_user_id"`   // 创建快递单ID
+	CreateLogisticUserType int       `json:"create_logistic_user_type"` // 创建快递单类型
+	CreateLogisticUserName string    `json:"create_logistic_user_name"` // 创建快递单用户名称
+	ChooseTalentUserId     string    `json:"choose_talent_user_id"`     // 同意/拒绝达人操作人ID
+	ChooseTalentUserType   int       `json:"choose_talent_user_type"`   // 同意/拒绝达人操作人类型,1商家,2子账号
+	ChooseTalentUserName   string    `json:"choose_talent_user_name"`   // 同意/拒绝达人操作人名称
 }
 
 func NewGetSecTaskListRequest() *GetSecTaskListRequest {

+ 25 - 19
pack/sec_task_list.go

@@ -22,25 +22,31 @@ func GormSecTaskToHttpSecTask(secTask *gorm_model.YounggeeSecTaskInfo) *http_mod
 	TalentPlatformInfoSnap := secTask.TalentPlatformInfoSnap
 	regionCode, _ := strconv.Atoi(conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "region_code"), ""))
 	return &http_model.SecTaskInfo{
-		SelectionId:        secTask.SelectionID,
-		SecTaskId:          secTask.TaskID,
-		PlatformNickname:   conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
-		FansCount:          conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
-		HomePageCaptureUrl: conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
-		HomePageUrl:        conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
-		RegionCode:         regionCode,
-		DetailAddr:         conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "detail_addr"), "") + " " + conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "receiver_name"), "") + " " + conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "phone_number"), ""),
-		CreateDate:         conv.MustString(secTask.CreateDate, "")[:19],
-		SelectDate:         conv.MustString(secTask.SelectDate, "")[:19],
-		DeliveryDate:       conv.MustString(secTask.DeliveryDate, "")[:19],
-		CompleteDate:       conv.MustString(secTask.CompleteDate, "")[:19],
-		IsPayReward:        secTask.IsPayReward,
-		IsPayPayment:       secTask.IsPayPayment,
-		SignedTime:         conv.MustString(secTask.SignedTime, "0000"),
-		SaleNum:            secTask.SaleNum,
-		FreeStrategyId:     secTask.FreeStrategyId,
-		TalentId:           secTask.TalentID,
-		ProductId:          secTask.ProductId,
+		SelectionId:            secTask.SelectionID,
+		SecTaskId:              secTask.TaskID,
+		PlatformNickname:       conv.MustString(gjson.Get(TalentPlatformInfoSnap, "platform_nickname"), ""),
+		FansCount:              conv.MustString(gjson.Get(TalentPlatformInfoSnap, "fans_count"), ""),
+		HomePageCaptureUrl:     conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_capture_url"), ""),
+		HomePageUrl:            conv.MustString(gjson.Get(TalentPlatformInfoSnap, "home_page_url"), ""),
+		RegionCode:             regionCode,
+		DetailAddr:             conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "detail_addr"), "") + " " + conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "receiver_name"), "") + " " + conv.MustString(gjson.Get(secTask.TalentPostAddrSnap, "phone_number"), ""),
+		CreateDate:             conv.MustString(secTask.CreateDate, "")[:19],
+		SelectDate:             conv.MustString(secTask.SelectDate, "")[:19],
+		DeliveryDate:           conv.MustString(secTask.DeliveryDate, "")[:19],
+		CompleteDate:           conv.MustString(secTask.CompleteDate, "")[:19],
+		IsPayReward:            secTask.IsPayReward,
+		IsPayPayment:           secTask.IsPayPayment,
+		SignedTime:             conv.MustString(secTask.SignedTime, "0000"),
+		SaleNum:                secTask.SaleNum,
+		FreeStrategyId:         secTask.FreeStrategyId,
+		TalentId:               secTask.TalentID,
+		ProductId:              secTask.ProductId,
+		CreateLogisticUserId:   secTask.CreateLogisticUserId,
+		CreateLogisticUserType: secTask.CreateLogisticUserType,
+		CreateLogisticUserName: secTask.CreateLogisticUserId,
+		ChooseTalentUserId:     secTask.ChooseTalentUserId,
+		ChooseTalentUserType:   secTask.ChooseTalentUserType,
+		ChooseTalentUserName:   secTask.ChooseTalentUserId,
 	}
 }