Ver código fonte

对物流状态更改

shenzekai 2 anos atrás
pai
commit
3f0fb66eaa

+ 1 - 1
db/project.go

@@ -230,7 +230,7 @@ func ChangeTaskStatus(ctx context.Context, data []string, taskStatus string) err
 	return nil
 }
 
-func GetProjectTalentList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TaskConditions) ([]*http_model.ProjectTalentInfo, int64, error) {
+func GetProjectTalentList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) ([]*http_model.ProjectTalentInfo, int64, error) {
 	db := GetReadDB(ctx)
 	// 查询Task表信息
 	db = db.Debug().Model(gorm_model.YoungeeTaskInfo{})

+ 1 - 0
handler/project_change_logisticsStatus.go

@@ -0,0 +1 @@
+package handler

+ 1 - 1
handler/project_talentlist.go

@@ -55,7 +55,7 @@ func (h *ProjectTalentListHandler) getResponse() interface{} {
 }
 func (h *ProjectTalentListHandler) run() {
 	conditions := pack.HttpProjectTalentRequestToCondition(h.req)
-	data, err := service.Project.GetProjectTaskList(h.ctx, h.req.ProjectId, h.req.PageSize, h.req.PageNum, conditions)
+	data, err := service.Project.GetProjectTalentList(h.ctx, h.req.ProjectId, h.req.PageSize, h.req.PageNum, conditions)
 	if err != nil {
 		logrus.WithContext(h.ctx).Errorf("[ProjectTalentListHandler] error GetProjectTaskList, err:%+v", err)
 		util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, consts.DefaultToast)

+ 9 - 0
model/common_model/talent_condition.go

@@ -0,0 +1,9 @@
+package common_model
+
+type TalentConditions struct {
+	ProjectId        int64  `condition:"project_id"`        // 项目ID
+	LogisticsStatus  int64  `condition:"logistics_status"`  // 物流状态
+	StrategyId       int64  `condition:"strategy_id"`       // 策略ID
+	TaskId           string `condition:"task_id"`           // 任务ID
+	PlatformNickname string `condition:"platform_nickname"` // 账号昵称
+}

+ 9 - 6
model/http_model/project_show.go

@@ -8,12 +8,15 @@ type ShowProjectPhoto struct {
 }
 
 type ShowRecruitStrategy struct {
-	FeeForm       string `json:"fee_form"`       // 稿费形式,1-3分别代表自报价、固定稿费、产品置换
-	StrategyID    string `json:"strategy_id"`    // 策略id
-	FollowersLow  string `json:"followers_low"`  // 达人粉丝数下限
-	FollowersUp   string `json:"followers_up"`   // 达人粉丝数上限
-	RecruitNumber string `json:"recruit_number"` // 招募数量
-	Offer         string `json:"offer"`          // 报价
+	FeeForm         string `json:"fee_form"`         // 稿费形式,1-3分别代表自报价、固定稿费、产品置换
+	StrategyID      string `json:"strategy_id"`      // 策略id
+	FollowersLow    string `json:"followers_low"`    // 达人粉丝数下限
+	FollowersUp     string `json:"followers_up"`     // 达人粉丝数上限
+	RecruitNumber   string `json:"recruit_number"`   // 招募数量
+	Offer           string `json:"offer"`            // 报价
+	WaitingNumber   int64  `json:"waiting_number"`   // 待发货
+	DeliveredNumber int64  `json:"delivered_number"` // 已发货
+	SignedNumber    int64  `json:"signed_number"`    // 已签收
 }
 
 type ShowProjectData struct {

+ 3 - 3
pack/project_talentlist_conditions.go

@@ -7,10 +7,10 @@ import (
 	"github.com/issue9/conv"
 )
 
-func HttpProjectTalentRequestToCondition(req *http_model.ProjectTalentListRequest) *common_model.TaskConditions {
-	return &common_model.TaskConditions{
+func HttpProjectTalentRequestToCondition(req *http_model.ProjectTalentListRequest) *common_model.TalentConditions {
+	return &common_model.TalentConditions{
 		ProjectId:        conv.MustInt64(req.ProjectId),
-		TaskStatus:       conv.MustInt64(req.TaskStatus),
+		LogisticsStatus:  conv.MustInt64(req.TaskStatus),
 		StrategyId:       conv.MustInt64(req.StrategyId),
 		TaskId:           conv.MustString(req.TaskId),
 		PlatformNickname: conv.MustString(req.PlatformNickname),

+ 2 - 1
service/project.go

@@ -245,6 +245,7 @@ func (*project) GetPorjectDetail(ctx context.Context, projectID int64) (*http_mo
 			FollowersUp:   conv.MustString(strategy.FollowersUp),
 			RecruitNumber: conv.MustString(strategy.RecruitNumber),
 			Offer:         conv.MustString(strategy.Offer),
+			WaitingNumber: strategy.WaitingNumber,
 		}
 		ProjectDetail.RecruitStrategys = append(ProjectDetail.RecruitStrategys, RecruitStrategy)
 	}
@@ -263,7 +264,7 @@ func (*project) GetPorjectDetail(ctx context.Context, projectID int64) (*http_mo
 	return &ProjectDetail, nil
 }
 
-func (*project) GetProjectTalentList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TaskConditions) (*http_model.ProjectTalentListData, error) {
+func (*project) GetProjectTalentList(ctx context.Context, projectID string, pageSize, pageNum int64, conditions *common_model.TalentConditions) (*http_model.ProjectTalentListData, error) {
 	projectTalents, total, err := db.GetProjectTalentList(ctx, projectID, pageSize, pageNum, conditions)
 	if err != nil {
 		logrus.WithContext(ctx).Errorf("[project service] call GetProjectTalentList error,err:%+v", err)