|
@@ -46,6 +46,7 @@ func (*sLocalLife) CreateSLocalLife(ctx context.Context, request *http_model.Loc
|
|
sLocalLifeInfo.TaskForm = localLifeInfo.TaskForm
|
|
sLocalLifeInfo.TaskForm = localLifeInfo.TaskForm
|
|
sLocalLifeInfo.ContentType = localLifeInfo.ContentType
|
|
sLocalLifeInfo.ContentType = localLifeInfo.ContentType
|
|
sLocalLifeInfo.SLocalStatus = 2
|
|
sLocalLifeInfo.SLocalStatus = 2
|
|
|
|
+ sLocalLifeInfo.StrategyStatus = 1
|
|
|
|
|
|
// 1.2. 填入加入商单操作人信息
|
|
// 1.2. 填入加入商单操作人信息
|
|
var operatorType int
|
|
var operatorType int
|
|
@@ -143,7 +144,7 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
|
|
if sLocal.RejectTime != nil {
|
|
if sLocal.RejectTime != nil {
|
|
sLocalInfo.RejectTime = conv.MustString(sLocal.RejectTime)[0:19]
|
|
sLocalInfo.RejectTime = conv.MustString(sLocal.RejectTime)[0:19]
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ sLocalInfo.StrategyStatus = sLocal.StrategyStatus
|
|
}
|
|
}
|
|
|
|
|
|
// 2. 关联主体
|
|
// 2. 关联主体
|
|
@@ -229,22 +230,49 @@ func (*sLocalLife) ShowSLocalLife(ctx context.Context, req *http_model.ShowSLoca
|
|
sLocalInfo.TalentType = strings.Join(categories, ",")
|
|
sLocalInfo.TalentType = strings.Join(categories, ",")
|
|
}
|
|
}
|
|
sLocalInfo.RecruitDdl = conv.MustString(localInfo.RecruitDdl)
|
|
sLocalInfo.RecruitDdl = conv.MustString(localInfo.RecruitDdl)
|
|
- recruitStrategy, recruitErr := db.GetRecruitStrategyBySLocalId(ctx, req.SLocalId)
|
|
|
|
- if recruitErr != nil {
|
|
|
|
- return nil, recruitErr
|
|
|
|
- }
|
|
|
|
- if recruitStrategy != nil {
|
|
|
|
- for _, strategy := range recruitStrategy {
|
|
|
|
- sLocalInfo.EstimatedCost += strategy.Offer * float64(strategy.RecruitNumber)
|
|
|
|
- showStrategy := http_model.ShowSRecruitStrategy{
|
|
|
|
- StrategyID: strategy.StrategyID,
|
|
|
|
- FeeForm: strategy.FeeForm,
|
|
|
|
- FollowersLow: strategy.FollowersLow,
|
|
|
|
- FollowersUp: strategy.FollowersUp,
|
|
|
|
- RecruitNumber: strategy.RecruitNumber,
|
|
|
|
- Offer: strategy.Offer,
|
|
|
|
|
|
+ if localInfo.LocalType == 1 {
|
|
|
|
+ recruitStrategy, recruitErr := db.GetRecruitStrategyBySLocalId(ctx, req.SLocalId)
|
|
|
|
+ if recruitErr != nil {
|
|
|
|
+ return nil, recruitErr
|
|
|
|
+ }
|
|
|
|
+ if recruitStrategy != nil {
|
|
|
|
+ for _, strategy := range recruitStrategy {
|
|
|
|
+ sLocalInfo.EstimatedCost += strategy.Offer * float64(strategy.RecruitNumber)
|
|
|
|
+ showStrategy := http_model.ShowSRecruitStrategy{
|
|
|
|
+ StrategyID: strategy.StrategyID,
|
|
|
|
+ FeeForm: strategy.FeeForm,
|
|
|
|
+ FollowersLow: strategy.FollowersLow,
|
|
|
|
+ FollowersUp: strategy.FollowersUp,
|
|
|
|
+ Offer: strategy.Offer,
|
|
|
|
+ ServiceCharge: strategy.ServiceCharge,
|
|
|
|
+ ServiceChargeRate: strategy.ServiceRate,
|
|
|
|
+ SelectedNumber: strategy.SelectedNumber,
|
|
|
|
+ RecruitNumber: strategy.RecruitNumber,
|
|
|
|
+ }
|
|
|
|
+ sLocalInfo.RecruitStrategys = append(sLocalInfo.RecruitStrategys, showStrategy)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ recruitStrategy, recruitErr := db.GetRecruitStrategyByProjectId(ctx, req.LocalId)
|
|
|
|
+ if recruitErr != nil {
|
|
|
|
+ return nil, recruitErr
|
|
|
|
+ }
|
|
|
|
+ if recruitStrategy != nil {
|
|
|
|
+ for _, strategy := range recruitStrategy {
|
|
|
|
+ sLocalInfo.EstimatedCost += strategy.Offer * float64(strategy.RecruitNumber)
|
|
|
|
+ showStrategy := http_model.ShowSRecruitStrategy{
|
|
|
|
+ StrategyID: strategy.StrategyID,
|
|
|
|
+ FeeForm: strategy.FeeForm,
|
|
|
|
+ FollowersLow: strategy.FollowersLow,
|
|
|
|
+ FollowersUp: strategy.FollowersUp,
|
|
|
|
+ Offer: strategy.Offer,
|
|
|
|
+ ServiceCharge: strategy.ServiceCharge,
|
|
|
|
+ ServiceChargeRate: strategy.ServiceRate,
|
|
|
|
+ SelectedNumber: strategy.SelectedNumber,
|
|
|
|
+ RecruitNumber: strategy.RecruitNumber,
|
|
|
|
+ }
|
|
|
|
+ sLocalInfo.RecruitStrategys = append(sLocalInfo.RecruitStrategys, showStrategy)
|
|
}
|
|
}
|
|
- sLocalInfo.RecruitStrategys = append(sLocalInfo.RecruitStrategys, showStrategy)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|