|
@@ -3,7 +3,10 @@ package service
|
|
|
import (
|
|
|
"context"
|
|
|
"fmt"
|
|
|
+ "gorm.io/gorm"
|
|
|
"time"
|
|
|
+ "youngee_b_api/app/dao"
|
|
|
+ "youngee_b_api/app/entity"
|
|
|
"youngee_b_api/db"
|
|
|
"youngee_b_api/model/gorm_model"
|
|
|
"youngee_b_api/model/http_model"
|
|
@@ -80,6 +83,8 @@ func (*logistics) Create(ctx context.Context, newLogistics http_model.CreateLogi
|
|
|
return nil, err1
|
|
|
}
|
|
|
|
|
|
+ dao.Db.Model(&entity.Project{ProjectId: *projectId}).Update("delivery_num", gorm.Expr("delivery_num + ?", 1))
|
|
|
+
|
|
|
// 查询StrategyID 通过 StrategyID 和 projectId
|
|
|
RecruitStrategyId, err2 := db.GetRecruitStrategyIdByTS(ctx, *projectId, StrategyID)
|
|
|
if err2 != nil {
|
|
@@ -102,7 +107,7 @@ func (*logistics) Create(ctx context.Context, newLogistics http_model.CreateLogi
|
|
|
return nil, err
|
|
|
}
|
|
|
// 修改task_info中任务阶段
|
|
|
- err = db.UpdateTaskStageByTaskId(ctx, Logistics.TaskID, 2, 5) //修改为待传初稿
|
|
|
+ err = db.UpdateTaskStageByTaskId(ctx, Logistics.TaskID, 2, 5) //修改为已发货
|
|
|
if err != nil {
|
|
|
logrus.WithContext(ctx).Errorf("[logistics service] call UpdateLogisticsDate error,err:%+v", err)
|
|
|
return nil, err
|