Merge branch 'feat-cjy-taskBench' into dev
This commit is contained in:
commit
20f8af09cb
@ -11,7 +11,6 @@ import (
|
||||
"fonchain-fiee/pkg/e"
|
||||
logicCast "fonchain-fiee/pkg/logic/cast"
|
||||
modelCast "fonchain-fiee/pkg/model/cast"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/utils/stime"
|
||||
"strconv"
|
||||
@ -64,26 +63,27 @@ func UpdateWorkImage(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// EmployeeName 和 EmployeeNum 从 token 中获取
|
||||
userInfo := login.GetUserInfoFromC(ctx)
|
||||
// 更新任务台的任务数量,调用员工实际任务状态更新
|
||||
if service.BundleProvider != nil {
|
||||
resp1, err := service.BundleProvider.UpdateTaskProgress(context.Background(), &bundle.UpdateTaskProgressRequest{
|
||||
AssignRecordsUUID: "",
|
||||
EmployeeName: userInfo.Name,
|
||||
EmployeeNum: userInfo.TelNum,
|
||||
TaskType: "post",
|
||||
CompleteCount: 1,
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("UpdateTaskProgress failed", zap.Error(err))
|
||||
// 不直接返回错误,允许主要功能继续执行
|
||||
} else {
|
||||
zap.L().Info("UpdateTaskProgress", zap.Any("resp", resp1))
|
||||
}
|
||||
} else {
|
||||
zap.L().Warn("BundleProvider is nil, skipping UpdateTaskProgress")
|
||||
}
|
||||
// 产品暂时关闭从其他入口发布,扣减任务台的数量的功能
|
||||
// // EmployeeName 和 EmployeeNum 从 token 中获取
|
||||
// userInfo := login.GetUserInfoFromC(ctx)
|
||||
// // 更新任务台的任务数量,调用员工实际任务状态更新
|
||||
// if service.BundleProvider != nil {
|
||||
// resp1, err := service.BundleProvider.UpdateTaskProgress(context.Background(), &bundle.UpdateTaskProgressRequest{
|
||||
// AssignRecordsUUID: "",
|
||||
// EmployeeName: userInfo.Name,
|
||||
// EmployeeNum: userInfo.TelNum,
|
||||
// TaskType: "post",
|
||||
// CompleteCount: 1,
|
||||
// })
|
||||
// if err != nil {
|
||||
// zap.L().Error("UpdateTaskProgress failed", zap.Error(err))
|
||||
// // 不直接返回错误,允许主要功能继续执行
|
||||
// } else {
|
||||
// zap.L().Info("UpdateTaskProgress", zap.Any("resp", resp1))
|
||||
// }
|
||||
// } else {
|
||||
// zap.L().Warn("BundleProvider is nil, skipping UpdateTaskProgress")
|
||||
// }
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
@ -131,26 +131,27 @@ func UpdateWorkVideo(ctx *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// EmployeeName 和 EmployeeNum 从 token 中获取
|
||||
userInfo := login.GetUserInfoFromC(ctx)
|
||||
// 更新任务台的任务数量,调用员工实际任务状态更新
|
||||
if service.BundleProvider != nil {
|
||||
resp1, err := service.BundleProvider.UpdateTaskProgress(context.Background(), &bundle.UpdateTaskProgressRequest{
|
||||
AssignRecordsUUID: "",
|
||||
EmployeeName: userInfo.Name,
|
||||
EmployeeNum: userInfo.TelNum,
|
||||
TaskType: "video",
|
||||
CompleteCount: 1,
|
||||
})
|
||||
if err != nil {
|
||||
zap.L().Error("UpdateTaskProgress failed", zap.Error(err))
|
||||
// 不直接返回错误,允许主要功能继续执行
|
||||
} else {
|
||||
zap.L().Info("UpdateTaskProgress", zap.Any("resp", resp1))
|
||||
}
|
||||
} else {
|
||||
zap.L().Warn("BundleProvider is nil, skipping UpdateTaskProgress")
|
||||
}
|
||||
// 产品暂时关闭从其他入口发布,扣减任务台的数量的功能
|
||||
// // EmployeeName 和 EmployeeNum 从 token 中获取
|
||||
// userInfo := login.GetUserInfoFromC(ctx)
|
||||
// // 更新任务台的任务数量,调用员工实际任务状态更新
|
||||
// if service.BundleProvider != nil {
|
||||
// resp1, err := service.BundleProvider.UpdateTaskProgress(context.Background(), &bundle.UpdateTaskProgressRequest{
|
||||
// AssignRecordsUUID: "",
|
||||
// EmployeeName: userInfo.Name,
|
||||
// EmployeeNum: userInfo.TelNum,
|
||||
// TaskType: "video",
|
||||
// CompleteCount: 1,
|
||||
// })
|
||||
// if err != nil {
|
||||
// zap.L().Error("UpdateTaskProgress failed", zap.Error(err))
|
||||
// // 不直接返回错误,允许主要功能继续执行
|
||||
// } else {
|
||||
// zap.L().Info("UpdateTaskProgress", zap.Any("resp", resp1))
|
||||
// }
|
||||
// } else {
|
||||
// zap.L().Warn("BundleProvider is nil, skipping UpdateTaskProgress")
|
||||
// }
|
||||
service.Success(ctx, resp)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user