Browse Source

6.4待上线

Yankun168 10 months ago
parent
commit
e5b34e9c0c

+ 19 - 3
app/api/youngee_talent_api/talent_auth_get_api.go

@@ -96,7 +96,7 @@ func (*talentAuthGetApi) DisplayQrcode(r *ghttp.Request) {
 
 }
 
-// 轮询用户是否扫码了(数据库中有含tid的数据)
+// 检查表中有无数据
 func (*talentAuthGetApi) CheckAccount(r *ghttp.Request) {
 	res := youngee_talent_service.CheckAccount(r)
 	err := r.Response.WriteJson(res)
@@ -468,14 +468,13 @@ func (*talentAuthGetApi) GetSelectionDetail(r *ghttp.Request) {
 // 查询执行中选品任务
 func (*talentAuthGetApi) GetExeSecTaskList(r *ghttp.Request) {
 	res := youngee_sectask_service.GetExeSecTaskList(r)
-
 	err := r.Response.WriteJson(res)
 	if err != nil {
 		panic("write response error")
 	}
 }
 
-// 判断达人是否报名该选品
+// 判断达人是否免费领样了该选品
 func (*talentAuthGetApi) IsSignUpSecTask(r *ghttp.Request) {
 	res := youngee_sectask_service.IsSignUpSecTask(r)
 	err := r.Response.WriteJson(res)
@@ -484,6 +483,15 @@ func (*talentAuthGetApi) IsSignUpSecTask(r *ghttp.Request) {
 	}
 }
 
+// 判断sectask表中该达人对该选品下是否有task。有则添加橱窗时,仅添加橱窗,不创建任务。
+func (*talentAuthGetApi) IsCreateTask(r *ghttp.Request) {
+	res := youngee_sectask_service.IsCreateSecTask(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}
+
 // 创建young之团
 func (*talentAuthGetApi) GetLeadYoungTeamId(r *ghttp.Request) {
 	res := youngee_talent_service.GetLeadYoungTeamId(r)
@@ -501,3 +509,11 @@ func (*talentAuthGetApi) GetSecTaskDetail(r *ghttp.Request) {
 		panic("write response error")
 	}
 }
+
+func (*talentAuthGetApi) UpdateRewardStage(r *ghttp.Request) {
+	res := youngee_sectask_service.UpdateRewardStage(r)
+	err := r.Response.WriteJson(res)
+	if err != nil {
+		panic("write response error")
+	}
+}

+ 1 - 0
app/dao/internal/younggee_sec_task_info.go

@@ -39,6 +39,7 @@ type YounggeeSecTaskInfoColumns struct {
 	CompleteStatus         string // 结束方式 1未结束 2正常结束 3反选失败
 	LogisticsStatus        string // 发货状态 1 待发货 2已发货 3 已签收
 	AssignmentStatus       string // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	RewardStage            int
 	UpdateAt               string // 更新时间
 	WithdrawStatus         string // 提现状态,1-4分别代表不可提现、可提现、提现中、已提现
 	LeadTeamId             string // 作为团长的young之团id,对应younggee_talent_team中的team_id字段

+ 3 - 3
app/model/youngee_talent_model/selection_task.go

@@ -157,7 +157,7 @@ type SecTaskInfoBrief struct {
 }
 
 type SecTaskDetailResp struct {
-	SecTaskInfo     *model.YounggeeSecTaskInfo `json:"sec_task_info"`
-	SelectionDetail *SelectionDetail           `json:"selection_detail"`
-	WithdrawStatus  int                        `json:"withdraw_status"`
+	SecTaskInfo     *SecTaskInfoDetail `json:"sec_task_info"`
+	SelectionDetail *SelectionDetail   `json:"selection_detail"`
+	WithdrawStatus  int                `json:"withdraw_status"`
 }

+ 2 - 2
app/model/youngee_talent_model/task_info.go

@@ -102,6 +102,6 @@ type IsSign struct {
 }
 
 type IsSignSecTask struct {
-	IsSign      int                        `json:"is_sign"`
-	SecTaskInfo *model.YounggeeSecTaskInfo `json:"sec_task_info"`
+	IsSign      int                `json:"is_sign"`
+	SecTaskInfo *SecTaskInfoDetail `json:"sec_task_info"`
 }

+ 123 - 25
app/service/youngee_sectask_service/seletion_square.go

@@ -241,18 +241,46 @@ func IsSignUpSecTask(r *ghttp.Request) *TalentHttpResult {
 	}
 	selectionId := r.GetQueryInt("selection_id", -1)
 	//定义接口存该达人所有的报名任务
-	task := []model.YounggeeSecTaskInfo{}
-	err = g.Model(dao.YounggeeSecTaskInfo.Table).Where("selection_id = ? and talent_id = ?", selectionId, tid).Scan(&task)
+	//1.查task表全部数据
+	var task []youngee_talent_model.SecTaskInfoDetail
+	err = g.DB().Model(youngee_talent_model.SecTaskInfoDetail{}).WithAll().
+		Where("talent_id = ? AND selection_id = ? ", tid, selectionId).
+		Scan(&task)
 	if err != nil {
-		return &TalentHttpResult{Code: -1, Msg: err.Error()}
+		return &TalentHttpResult{Code: 0, Msg: err.Error(), Data: nil}
 	}
 	isSign := youngee_talent_model.IsSignSecTask{}
-	//如果有数据且sample_mode==3说明没有报名,否则报名了
-
-	//有数据且sample_mode==1说明报名了,否则没报名  &&左边为false就不执行了
-	if len(task) != 0 && task[0].SampleMode == 1 {
+	//有数据且sample_mode==1说明报名了,否则没报名  &&左边为false就不执行了 free_stage!=0
+	if len(task) != 0 && task[0].FreeStage != 0 {
+		isSign.IsSign = 1
 		isSign.SecTaskInfo = &task[0]
+	} else {
+		isSign.IsSign = 0
+	}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: isSign}
+}
+
+func IsCreateSecTask(r *ghttp.Request) *TalentHttpResult {
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
+	}
+	selectionId := r.GetQueryInt("selection_id", -1)
+	//定义接口存该达人所有的报名任务
+	//1.查task表全部数据
+	var task []youngee_talent_model.SecTaskInfoDetail
+	err = g.DB().Model(youngee_talent_model.SecTaskInfoDetail{}).WithAll().
+		Where("talent_id = ? AND selection_id = ? ", tid, selectionId).
+		Scan(&task)
+	if err != nil {
+		return &TalentHttpResult{Code: 0, Msg: err.Error(), Data: nil}
+	}
+	isSign := youngee_talent_model.IsSignSecTask{}
+
+	//添加橱窗时,有task了就不再创建
+	if len(task) != 0 {
 		isSign.IsSign = 1
+		isSign.SecTaskInfo = &task[0]
 	} else {
 		isSign.IsSign = 0
 	}
@@ -566,29 +594,99 @@ func SignUpSecTaskFromWindow(r *ghttp.Request) *TalentHttpResult {
 		TaskDdl:          selectionInfo.TaskDdl,
 	}
 	//如果已经有数据了,删除。模拟在快手侧里把橱窗商品删了,想再加回来
-	//删除添加橱窗时创建的不完整的数据
-	_, err = g.DB().Model("younggee_sec_task_info").
+
+	//1.查task表全部数据
+	var secTaskInfoList []youngee_talent_model.SecTaskInfoDetail
+	err = g.DB().Model(youngee_talent_model.SecTaskInfoDetail{}).WithAll().
 		Where("talent_id = ? AND selection_id = ? ", tid, signSecTaskReq.SelectionId).
-		Delete()
+		Scan(&secTaskInfoList)
 	if err != nil {
-		return &TalentHttpResult{Code: -17, Msg: "younggee_sec_task_info delete failed"}
-	}
+		return &TalentHttpResult{Code: 0, Msg: err.Error(), Data: nil}
+	}
+	//2.如果task不为空。取出free_stage的值。插入的值含有删除数据的free_stage
+	if len(secTaskInfoList) != 0 {
+		free_stage := secTaskInfoList[0].FreeStage
+		//删除旧的,
+		_, err = g.DB().Model("younggee_sec_task_info").
+			Where("talent_id = ? AND selection_id = ? ", tid, signSecTaskReq.SelectionId).
+			Delete()
+		if err != nil {
+			return &TalentHttpResult{Code: -17, Msg: "younggee_sec_task_info delete failed"}
+		}
+		//插入新的(含free_stage)
+		secTaskInfo_new := youngee_talent_model.SecTaskInfoWindowDetail{
+			TaskId:                 newTaskId,
+			SelectionId:            signSecTaskReq.SelectionId,
+			ProductId:              signSecTaskReq.ProductId,
+			SaleNum:                signSecTaskReq.SaleNum,
+			FansNum:                signSecTaskReq.FansNum,
+			TalentId:               tid,
+			AccountId:              accountInfo.AccountId,
+			TalentPlatformInfoSnap: string(accountSnap),
+			TalentPersonalInfoSnap: string(talentSnap),
+			//TalentPostAddrSnap:     string(addrSnap),
+			TaskReward:       selectionInfo.TaskReward,
+			TalentPayment:    product.ProductPrice,
+			IsPayPayment:     0,
+			IsPayReward:      0,
+			TaskMode:         selectionInfo.TaskMode,
+			SampleMode:       3, //添加橱窗,当作不提供领样处理
+			PlatformId:       4, //快手平台
+			TaskStage:        3,
+			TaskStatus:       1,
+			CreateDate:       gtime.Now(),
+			CompleteStatus:   1,
+			LogisticsStatus:  1,
+			AssignmentStatus: 1,
+			UpdateAt:         gtime.Now(),
+			WithdrawStatus:   1,
+			LeadTeamId:       signSecTaskReq.LeadTeamId,
+			TeamId:           signSecTaskReq.TeamId,
+			TeamIncome:       0,
+			TeamPoint:        0,
+			TaskDdl:          selectionInfo.TaskDdl,
+			FreeStage:        free_stage,
+		}
+		err = g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
+			// 新建任务,初始化状态为待确认
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeSecTaskInfo.Table).Data(&secTaskInfo_new).Insert()
+			if err != nil {
+				return err
+			}
+			return nil
+		})
+		if err != nil {
+			return &TalentHttpResult{Code: -18, Msg: "add Task data failed"}
+		}
 
-	err = g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
-		// 新建任务,初始化状态为待确认
-		_, err = tx.Ctx(ctx).Model(dao.YounggeeSecTaskInfo.Table).Data(&secTaskInfo).Insert()
+		signSecTaskResp := youngee_talent_model.SignSecTaskResp{
+			TaskId: newTaskId,
+		}
+		return &TalentHttpResult{Code: 0, Msg: "success", Data: signSecTaskResp}
+	} else {
+		//3.如果已经报过名了需要传递给新的数据。删除添加橱窗时创建的不完整的数据
+		_, err = g.DB().Model("younggee_sec_task_info").
+			Where("talent_id = ? AND selection_id = ? ", tid, signSecTaskReq.SelectionId).
+			Delete()
 		if err != nil {
-			return err
+			return &TalentHttpResult{Code: -17, Msg: "younggee_sec_task_info delete failed"}
 		}
-		return nil
-	})
-	if err != nil {
-		return &TalentHttpResult{Code: -18, Msg: "add Task data failed"}
-	}
 
-	signSecTaskResp := youngee_talent_model.SignSecTaskResp{
-		TaskId: newTaskId,
-	}
+		err = g.DB().Transaction(context.TODO(), func(ctx context.Context, tx *gdb.TX) error {
+			// 新建任务,初始化状态为待确认
+			_, err = tx.Ctx(ctx).Model(dao.YounggeeSecTaskInfo.Table).Data(&secTaskInfo).Insert()
+			if err != nil {
+				return err
+			}
+			return nil
+		})
+		if err != nil {
+			return &TalentHttpResult{Code: -18, Msg: "add Task data failed"}
+		}
 
-	return &TalentHttpResult{Code: 0, Msg: "success", Data: signSecTaskResp}
+		signSecTaskResp := youngee_talent_model.SignSecTaskResp{
+			TaskId: newTaskId,
+		}
+		return &TalentHttpResult{Code: 0, Msg: "success", Data: signSecTaskResp}
+	}
 }

+ 34 - 71
app/service/youngee_sectask_service/work_space.go

@@ -1,13 +1,12 @@
 package youngee_sectask_service
 
 import (
+	"fmt"
 	"github.com/gogf/gf/frame/g"
 	"github.com/gogf/gf/net/ghttp"
-	"strconv"
 	"youngmini_server/app/dao"
 	"youngmini_server/app/model"
 	"youngmini_server/app/model/youngee_talent_model"
-	"youngmini_server/app/system/sectask"
 	"youngmini_server/app/utils"
 )
 
@@ -18,91 +17,37 @@ func GetExeSecTaskList(r *ghttp.Request) *TalentHttpResult {
 		return &TalentHttpResult{Code: -1, Msg: "Get talent info failed"}
 	}
 	taskStageKey := r.GetQueryInt("taskStage", 0)
-	var whereCondition g.Map
+	var whereStr string
 	switch taskStageKey {
 	case 4:
-		// 获取 TaskStage >= 2 且 <= 10 的数据
-		whereCondition = g.Map{
-			dao.YounggeeSecTaskInfo.Columns.TalentId:  tid,
-			dao.YounggeeSecTaskInfo.Columns.TaskStage: g.Slice{2, 3, 4, 5, 6, 7, 8, 9, 10},
-		}
+		// 返回指定talentId的所有数据
+		whereStr = fmt.Sprintf("talent_id='%s'", tid)
 	case 5:
-		// 获取 TaskStage = 9 的数据
-		whereCondition = g.Map{
-			dao.YounggeeSecTaskInfo.Columns.TalentId:  tid,
-			dao.YounggeeSecTaskInfo.Columns.TaskStage: 9,
-		}
+		// 返回待领悬赏
+		whereStr = fmt.Sprintf("talent_id='%s' AND reward_stage = 1", tid)
 	default:
 		return &TalentHttpResult{Code: -2, Msg: "parse param error"}
 	}
 
-	// 获取任务列表
-	//var taskList []*model.YounggeeSecTaskInfo
-	var SecTask []*sectask.ListSecTaskSql
-
-	err = g.Model(dao.YounggeeSecTaskInfo.Table).Where(whereCondition).Scan(&SecTask)
+	//查task表全部数据
+	var secTaskInfoList []youngee_talent_model.SecTaskInfoDetail
+	err = g.DB().Model(youngee_talent_model.SecTaskInfoDetail{}).WithAll().
+		Where(whereStr).
+		Order("task_ddl DESC").
+		Scan(&secTaskInfoList)
 	if err != nil {
-		return &TalentHttpResult{Code: -1, Msg: "Get task list failed"}
+		return &TalentHttpResult{Code: -1, Msg: err.Error()}
 	}
 
-	platformMap := make(map[string]model.InfoThirdPlatform)
-	var platformInfo []*model.InfoThirdPlatform
-	if len(SecTask) != 0 {
-		err := g.Model(dao.InfoThirdPlatform.Table).Scan(&platformInfo)
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get platform failed"}
-		}
-
-		for i, _ := range platformInfo {
-			platformMap[strconv.Itoa(platformInfo[i].PlatformId)] = *platformInfo[i]
-		}
-	}
-
-	// 为每个任务根据项目id查询项目名称和主图
-	var taskBriefList []*youngee_talent_model.SecTaskInfoBrief
-	for _, v := range SecTask {
-		whereCondition = g.Map{
-			dao.YounggeeSelectionInfo.Columns.SelectionId: v.SelectionId,
-		}
-		selectionInfo, err := g.Model(dao.YounggeeSelectionInfo.Table).Where(whereCondition).One()
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get fullproject info failed"}
-		}
-		whereCondition = g.Map{
-			dao.YoungeePlatformAccountInfo.Columns.PlatformId: selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform],
-			dao.YoungeePlatformAccountInfo.Columns.TalentId:   v.TalentId,
-		}
-		account, err := g.Model(dao.YoungeePlatformAccountInfo.Table).Where(whereCondition).One()
-		if err != nil {
-			return &TalentHttpResult{Code: -1, Msg: "Get account info failed"}
-		}
-		taskInfoBrief := &youngee_talent_model.SecTaskInfoBrief{
-			TaskId:           v.TaskId,
-			PlatformIconUrl:  platformMap[selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform].String()].PlatformIcon,
-			PlatformName:     platformMap[selectionInfo[dao.YounggeeSelectionInfo.Columns.Platform].String()].PlatformName,
-			PlatformNickName: account[dao.YoungeePlatformAccountInfo.Columns.PlatformNickname].String(),
-			SelectionName:    selectionInfo[dao.YounggeeSelectionInfo.Columns.SelectionName].String(),
-			ProductPhotoSnap: selectionInfo[dao.YounggeeSelectionInfo.Columns.ProductPhotoSnap].String(),
-			TaskStatus:       v.TaskStatus,
-			TaskStage:        v.TaskStage,
-			AssignmentStatus: v.AssignmentStatus,
-			TaskReward:       v.TaskReward,
-			TalentPayment:    v.TalentPayment,
-			SampleMode:       v.SampleMode,
-			TaskDdl:          v.TaskDdl,
-		}
-		taskBriefList = append(taskBriefList, taskInfoBrief)
-	}
-
-	return &TalentHttpResult{Code: 0, Msg: "success", Data: taskBriefList}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: secTaskInfoList}
 }
 
 // 获取选品任务详情
 func GetSecTaskDetail(r *ghttp.Request) *TalentHttpResult {
 	taskId := r.GetQueryInt("task_id", -1)
 
-	var secTask *model.YounggeeSecTaskInfo
-	err := g.Model(dao.YounggeeSecTaskInfo.Table).Where("task_id = ?", taskId).Scan(&secTask)
+	var secTask *youngee_talent_model.SecTaskInfoDetail
+	err := g.DB().Model("younggee_sec_task_info").WithAll().Where("task_id = ?", taskId).Scan(&secTask)
 	if err != nil {
 		g.Log().Error("Get selection task info failed: " + err.Error())
 		return &TalentHttpResult{Code: -1, Msg: "Get task info failed"}
@@ -149,3 +94,21 @@ func GetSecTaskDetail(r *ghttp.Request) *TalentHttpResult {
 
 	return &TalentHttpResult{Code: 0, Msg: "success", Data: taskDetail}
 }
+
+// 带货是否满足悬赏条件 if 满足 更新状态
+func UpdateRewardStage(r *ghttp.Request) *TalentHttpResult {
+	//达人id获取
+	tid, err := utils.SessionTalentInfo.GetTalentIdFromSession(r)
+	sid := r.GetQueryString("selection_id")
+	if err != nil {
+		return &TalentHttpResult{Code: -1, Msg: "Get talent id failed"}
+	}
+	SecTaskInfo := &youngee_talent_model.SecTaskInfoDetail{}
+	_, err = g.DB().Model(SecTaskInfo).Data("reward_stage", 1).Where("talent_id =? and selection_id =?", tid, sid).Update()
+	if err != nil {
+		// 查询失败(未找到结果),返回失败结果
+		return &TalentHttpResult{Code: -1, Msg: "update failed", Data: nil}
+	}
+	// 查询成功,返回成功结果和数据
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: SecTaskInfo}
+}

+ 3 - 1
app/service/youngee_talent_service/talent_address.go

@@ -2,6 +2,7 @@ package youngee_talent_service
 
 import (
 	"context"
+	"fmt"
 	"youngmini_server/app/dao"
 	"youngmini_server/app/model"
 	"youngmini_server/app/model/youngee_talent_model"
@@ -179,6 +180,7 @@ func OnUpdateTalentAddress(r *ghttp.Request) *TalentHttpResult {
 
 	var modifyReq *youngee_talent_model.DeliveryAddressModifyReq
 	err = r.ParseForm(&modifyReq)
+	fmt.Println("sdafa", &modifyReq)
 	if err != nil {
 		return &TalentHttpResult{Code: -2, Msg: "params error"}
 	}
@@ -188,7 +190,7 @@ func OnUpdateTalentAddress(r *ghttp.Request) *TalentHttpResult {
 		return &TalentHttpResult{Code: -3, Msg: "update failed"}
 	}
 
-	return &TalentHttpResult{Code: 0, Msg: "success"}
+	return &TalentHttpResult{Code: 0, Msg: "success", Data: "bbb"}
 }
 
 // SetDefaultDeliveryAddr 设置默认收货地址

+ 12 - 3
app/service/youngee_talent_service/talent_ks_auth.go

@@ -67,7 +67,7 @@ func GetQrcode(r *ghttp.Request) *TalentHttpResult {
 	return &TalentHttpResult{Code: 0, Msg: "success", Data: text}
 }
 
-// 检查数据库表中是否有达人对应的数据
+// 检查数据库表中是否有达人对应的数据 且 token未过期
 func CheckAccount(r *ghttp.Request) *TalentHttpResult {
 	fmt.Println("into check")
 	//达人id获取
@@ -82,6 +82,17 @@ func CheckAccount(r *ghttp.Request) *TalentHttpResult {
 		// 查询失败(未找到结果),返回失败结果
 		return &TalentHttpResult{Code: -1, Msg: "Query failed", Data: nil}
 	}
+	//有查询结果,看是否accessToken是否有效
+	key, err1 := g.DB().Model("platform_kuaishou_user_info").Fields("access_token").Where("talent_id = ?", tid).Value()
+	if err1 != nil {
+		return &TalentHttpResult{Code: -1, Msg: "query database fail"}
+	}
+	AccessToken := key.String()
+	_, err2 := user.GetUserinfo(ClientKey, AccessToken)
+	if err2 != nil {
+		//前端接收code=-2表示token过期
+		return &TalentHttpResult{Code: -2, Msg: "accessToken过期", Data: nil}
+	}
 	// 查询成功,返回成功结果和数据
 	return &TalentHttpResult{Code: 0, Msg: "success", Data: userInfo}
 }
@@ -138,8 +149,6 @@ func CheckTokenExp(r *ghttp.Request) *TalentHttpResult {
 
 func AddWindow(r *ghttp.Request) *TalentHttpResult {
 	pId := r.GetString("product_id")
-	//pId := "66666"
-
 	//通过pId获取kuaishou_product_id
 	pIdSlice := []string{pId}
 	//达人id获取

+ 10 - 1
app/system/assignment/assignment_service.go

@@ -6,6 +6,7 @@ import (
 	"github.com/gogf/gf/net/ghttp"
 	"github.com/gogf/gf/os/gtime"
 	"youngmini_server/app/dao"
+	"youngmini_server/app/model/youngee_talent_model"
 	"youngmini_server/app/system/message"
 	"youngmini_server/app/system/sectask"
 	"youngmini_server/app/system/sectasklog"
@@ -33,8 +34,16 @@ func (s *assignmentService) Add(r *ghttp.Request, req *AddAssignmentReq) (res sq
 		TaskId:           req.TaskId,
 		TaskStage:        9, //任务状态变成待结算9
 		AssignmentStatus: 2, //作业上传状态变成2(已添加)
+		RewardStage:      1, //上传截图,变成待领悬赏
 	}
-	err = sectask.UpdateStageAndStatus(r.Context(), &updateStageReq)
+	SecTaskInfo := &youngee_talent_model.SecTaskInfoDetail{}
+	_, err = g.DB().Model(SecTaskInfo).Data(g.Map{
+		"task_stage":        updateStageReq.TaskStage,
+		"assignment_status": updateStageReq.AssignmentStatus,
+		"reward_stage":      updateStageReq.RewardStage,
+	}).Where("task_id =? ", req.TaskId).Update()
+
+	//err = sectask.UpdateStageAndStatus(r.Context(), &updateStageReq)
 	if err != nil {
 		return nil, err
 	}

+ 1 - 0
app/system/sectask/sectask_model.go

@@ -87,6 +87,7 @@ type UpdateStageReq struct {
 	TaskId           string `json:"task_id"`           // 选品任务id
 	TaskStage        int    `json:"task_stage"`        // 任务阶段,详情见info_sec_task_stage表
 	AssignmentStatus uint   `json:"assignment_status"` // 作业上传状态 1-5分别代表待添加、已添加、待修改、已修改、已通过
+	RewardStage      int    `json:"reward_stage"`
 }
 
 type LogisticsDetail struct {

+ 4 - 3
app/system/sectask/sectask_service.go

@@ -158,10 +158,11 @@ func UpdateStageAndStatus(ctx context.Context, updateStageReq *UpdateStageReq) (
 		dao.YounggeeSecTaskInfo.Columns.TaskId: updateStageReq.TaskId,
 	}
 	dataUpdate := g.Map{
-		dao.YounggeeSecTaskInfo.Columns.TaskStage:        updateStageReq.TaskStage,
-		dao.YounggeeSecTaskInfo.Columns.AssignmentStatus: updateStageReq.AssignmentStatus,
+		dao.YounggeeSecTaskInfo.Columns.TaskStage:                 updateStageReq.TaskStage,
+		dao.YounggeeSecTaskInfo.Columns.AssignmentStatus:          updateStageReq.AssignmentStatus,
+		strconv.Itoa(dao.YounggeeSecTaskInfo.Columns.RewardStage): updateStageReq.RewardStage,
 	}
-	fmt.Println("------>", dataUpdate)
+	fmt.Println("----UpdateStageAndStatus-->", dataUpdate)
 	_, err = dao.YounggeeSecTaskInfo.Ctx(ctx).Where(whereCondition).Data(dataUpdate).Update()
 	if err != nil {
 		return

BIN
bin/main.exe


BIN
bin/main.exe~