|
@@ -445,7 +445,6 @@ func (*project) GetPorjectDetail(ctx context.Context, projectID string) (*http_m
|
|
AutoFailAt: util.GetTimePoionter(project.AutoFailAt),
|
|
AutoFailAt: util.GetTimePoionter(project.AutoFailAt),
|
|
}
|
|
}
|
|
Strategys, err := db.GetRecruitStrategys(ctx, projectID)
|
|
Strategys, err := db.GetRecruitStrategys(ctx, projectID)
|
|
- //fmt.Println("招募策略:", Strategys)
|
|
|
|
if err != nil {
|
|
if err != nil {
|
|
logrus.WithContext(ctx).Error()
|
|
logrus.WithContext(ctx).Error()
|
|
return nil, err
|
|
return nil, err
|
|
@@ -501,16 +500,20 @@ func (*project) ChangeTaskStatus(ctx *gin.Context, data http_model.ProjectChange
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
if data.TaskStatus == "2" {
|
|
if data.TaskStatus == "2" {
|
|
- err = db.CalculateSelectedNumberByRecruitStrategyID(ctx, RecruitStrategyIDs, 1)
|
|
|
|
- if err != nil {
|
|
|
|
- logrus.WithContext(ctx).Errorf("[project service] call ChangeTaskStatus error,err:%+v", err)
|
|
|
|
- return err
|
|
|
|
|
|
+ for _, RecruitStrategyID := range RecruitStrategyIDs {
|
|
|
|
+ err = db.CalculateSelectedNumberByRecruitStrategyID(ctx, RecruitStrategyID, 1)
|
|
|
|
+ if err != nil {
|
|
|
|
+ logrus.WithContext(ctx).Errorf("[project service] call ChangeTaskStatus error,err:%+v", err)
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- err = db.CalculateSelectedNumberByRecruitStrategyID(ctx, RecruitStrategyIDs, -1)
|
|
|
|
- if err != nil {
|
|
|
|
- logrus.WithContext(ctx).Errorf("[project service] call ChangeTaskStatus error,err:%+v", err)
|
|
|
|
- return err
|
|
|
|
|
|
+ for _, RecruitStrategyID := range RecruitStrategyIDs {
|
|
|
|
+ err = db.CalculateSelectedNumberByRecruitStrategyID(ctx, RecruitStrategyID, -1)
|
|
|
|
+ if err != nil {
|
|
|
|
+ logrus.WithContext(ctx).Errorf("[project service] call ChangeTaskStatus error,err:%+v", err)
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
return nil
|