|
@@ -94,6 +94,8 @@ func GetLocallifetaskList(ctx context.Context, request http_model.GetLocalTaskLi
|
|
case 2:
|
|
case 2:
|
|
query = query.Where("supplier_id !=0 AND supplier_status = 2")
|
|
query = query.Where("supplier_id !=0 AND supplier_status = 2")
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ query = query.Where("(supplier_id = 0 AND supplier_status = 0) OR (supplier_id != 0 AND supplier_status = 2)")
|
|
}
|
|
}
|
|
if request.Others != "" {
|
|
if request.Others != "" {
|
|
query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
|
|
query = query.Where("talent_name LIKE ? OR s_operate_name LIKE ?", "%"+request.Others+"%", "%"+request.Others+"%")
|
|
@@ -397,6 +399,13 @@ func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequ
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //recruit_strategy total_offer
|
|
|
|
+ err = db.Model(gorm_model.RecruitStrategy{}).Where("strategy_id = ? AND project_id = ?", taskInfo.StrategyId, taskInfo.LocalId).Update("total_offer", gorm.Expr("total_offer + ?", taskInfo.DraftFee+taskInfo.ServiceCharge)).Error
|
|
|
|
+ if err != nil {
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+
|
|
//服务商s_project已招募人数+1改成s_locallife
|
|
//服务商s_project已招募人数+1改成s_locallife
|
|
var sprojectinfo gorm_model.YounggeeSProjectInfo
|
|
var sprojectinfo gorm_model.YounggeeSProjectInfo
|
|
err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SLocalLifeId).Find(&sprojectinfo).Error
|
|
err = db.Model(gorm_model.YounggeeSProjectInfo{}).Where(" s_project_id =?", taskInfo.SLocalLifeId).Find(&sprojectinfo).Error
|
|
@@ -454,6 +463,12 @@ func PassLocalTaskCoop(ctx context.Context, req http_model.PasslocalTaskCoopRequ
|
|
if err != nil {
|
|
if err != nil {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //recruit_strategy total_offer
|
|
|
|
+ err = db.Model(gorm_model.RecruitStrategy{}).Where("strategy_id = ? AND project_id = ?", taskInfo.StrategyId, taskInfo.LocalId).Update("total_offer", gorm.Expr("total_offer + ?", taskInfo.DraftFee+taskInfo.ServiceCharge)).Error
|
|
|
|
+ if err != nil {
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|