Bladeren bron

粉丝数支持小数,发货列表状态过滤

Ethan 1 week geleden
bovenliggende
commit
0b844a6126

+ 5 - 1
app/dao/project_dao.go

@@ -100,7 +100,11 @@ func (d ProjectDAO) GetProjectPreviews(param *vo.ProjectSearchParam) ([]vo.RePro
 	if param.ProjectStatus != 0 {
 		query = query.Where("project_status = ?", param.ProjectStatus)
 	} else {
-		query = query.Where("project_status not in ?", []int{1, 3})
+		if param.Logistics == 1 {
+			query = query.Where("project_status >= ?", 8)
+		} else {
+			query = query.Where("project_status not in ?", []int{1, 3})
+		}
 	}
 	if param.ProjectForm != 0 {
 		query = query.Where("project_form = ?", param.ProjectForm)

+ 6 - 6
app/service/local_life_service.go

@@ -133,8 +133,8 @@ func (s LocalLifeService) CreateLocalLife(localCreateParam *vo.LocalCreateParam)
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     localId,
 					StrategyType:  1,
@@ -198,8 +198,8 @@ func (s LocalLifeService) UpdateLocal(localUpdateParam *vo.LocalUpdateParam) (*s
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     localLife.LocalID,
 					StrategyType:  1,
@@ -357,8 +357,8 @@ func (s LocalLifeService) UpdateLocalTarget(localUpdateParam *vo.LocalUpdatePara
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     localLife.LocalID,
 					StrategyType:  1,

+ 6 - 6
app/service/project_service.go

@@ -133,8 +133,8 @@ func (s ProjectService) CreateProject(projectCreateParam *vo.ProjectCreateParam)
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     projectId,
 					StrategyType:  1,
@@ -198,8 +198,8 @@ func (s ProjectService) UpdateProject(projectUpdateParam *vo.ProjectUpdateParam)
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     project.ProjectId,
 					StrategyType:  1,
@@ -366,8 +366,8 @@ func (s ProjectService) UpdateProjectTarget(projectUpdateParam *vo.ProjectUpdate
 				recruitStrategy := entity.RecruitStrategy{
 					FeeForm:       strategy.FeeForm,
 					StrategyID:    strategy.StrategyID,
-					FollowersLow:  strategy.FollowersLow,
-					FollowersUp:   strategy.FollowersUp,
+					FollowersLow:  int64(strategy.FollowersLow * 10000),
+					FollowersUp:   int64(strategy.FollowersUp * 10000),
 					RecruitNumber: strategy.RecruitNumber,
 					ProjectID:     project.ProjectId,
 					StrategyType:  1,

+ 4 - 4
app/service/selection_info_service.go

@@ -166,8 +166,8 @@ func (s SelectionInfoService) CreateSelectionInfo(selectionCreateParam *vo.Selec
 				free := entity.FreeStrategy{
 					SelectionId:    selectionId,
 					StrategyId:     v.StrategyId,
-					FollowersLow:   v.FollowersLow,
-					FollowersUp:    v.FollowersUp,
+					FollowersLow:   int64(v.FollowersLow * 10000),
+					FollowersUp:    int64(v.FollowersUp * 10000),
 					SaleNum:        v.SaleNum,
 					StrategyStatus: 1,
 					EnrollNum:      0,
@@ -377,8 +377,8 @@ func (s SelectionInfoService) UpdateSelectionInfo(selectionUpdateParam *vo.Selec
 				free := entity.FreeStrategy{
 					SelectionId:    selectionInfo.SelectionID,
 					StrategyId:     v.StrategyId,
-					FollowersLow:   v.FollowersLow,
-					FollowersUp:    v.FollowersUp,
+					FollowersLow:   int64(v.FollowersLow * 10000),
+					FollowersUp:    int64(v.FollowersUp * 10000),
 					SaleNum:        v.SaleNum,
 					StrategyStatus: 1,
 					EnrollNum:      0,

+ 2 - 2
app/vo/local_create_param.go

@@ -42,8 +42,8 @@ type LocalMaterialInfo struct {
 type CreateLocalRecruitStrategy struct {
 	StrategyID    int64   `json:"strategy_id"`    // 策略id
 	FeeForm       int64   `json:"fee_form"`       // 稿费形式,1-3分别代表无费置换、一口价、自报价
-	FollowersLow  int64   `json:"followers_low"`  // 达人粉丝数下限
-	FollowersUp   int64   `json:"followers_up"`   // 达人粉丝数上限
+	FollowersLow  float64 `json:"followers_low"`  // 达人粉丝数下限
+	FollowersUp   float64 `json:"followers_up"`   // 达人粉丝数上限
 	RecruitNumber int64   `json:"recruit_number"` // 招募数量
 	Offer         float64 `json:"offer"`          // 报价
 	ServiceCharge float64 `json:"service_charge"` // 服务费

+ 2 - 2
app/vo/project_create_param.go

@@ -39,8 +39,8 @@ type ProjectMaterialInfo struct {
 type CreateRecruitStrategy struct {
 	StrategyID    int64   `json:"strategy_id"`    // 策略id
 	FeeForm       int64   `json:"fee_form"`       // 稿费形式,1-3分别代表无费置换、一口价、自报价
-	FollowersLow  int64   `json:"followers_low"`  // 达人粉丝数下限
-	FollowersUp   int64   `json:"followers_up"`   // 达人粉丝数上限
+	FollowersLow  float64 `json:"followers_low"`  // 达人粉丝数下限
+	FollowersUp   float64 `json:"followers_up"`   // 达人粉丝数上限
 	RecruitNumber int64   `json:"recruit_number"` // 招募数量
 	Offer         float64 `json:"offer"`          // 报价
 	ServiceCharge float64 `json:"service_charge"` // 服务费

+ 2 - 0
app/vo/project_search_param.go

@@ -12,6 +12,8 @@ type ProjectSearchParam struct {
 	ContentType     int64  `json:"content_type"`   // 内容形式, 1图文 2视频
 	Order           int64  `json:"order"`          // 排序 0降序 1升序(默认0)
 
+	Logistics int64 `json:"logistics"` // 1-物流
+
 	ProjectId string `json:"project_id"` // 任务ID
 	Others    string `json:"others"`     // 任务标题/任务ID/创建者
 }

+ 6 - 6
app/vo/selection_info_create_param.go

@@ -41,12 +41,12 @@ type SecMaterialInfo struct {
 
 // 领样策略
 type UpdateFreeStrategys struct {
-	StrategyId   int64 `json:"strategy_id"`   // 策略编号
-	FollowersLow int64 `json:"followers_low"` // 达人粉丝数下限
-	FollowersUp  int64 `json:"followers_up"`  // 达人粉丝数上限
-	SaleNum      int64 `json:"sale_num"`      // 近30天橱窗销量
-	EnrollNum    int64 `json:"enroll_num"`    // 报名人数
-	ChooseNum    int64 `json:"choose_num"`    // 已选人数
+	StrategyId   int64   `json:"strategy_id"`   // 策略编号
+	FollowersLow float64 `json:"followers_low"` // 达人粉丝数下限
+	FollowersUp  float64 `json:"followers_up"`  // 达人粉丝数上限
+	SaleNum      int64   `json:"sale_num"`      // 近30天橱窗销量
+	EnrollNum    int64   `json:"enroll_num"`    // 报名人数
+	ChooseNum    int64   `json:"choose_num"`    // 已选人数
 }
 
 // 悬赏策略