Merge branch 'feat-cjy-report' into dev
This commit is contained in:
commit
5df90b156e
@ -399,7 +399,29 @@ func UpdateCompetitiveReportStatus(ctx *gin.Context) {
|
|||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
userInfo := login.GetUserInfoFromC(ctx)
|
||||||
newCtx := NewCtxWithUserInfo(ctx)
|
newCtx := NewCtxWithUserInfo(ctx)
|
||||||
|
resp, err := service.CastProvider.GetCompetitiveReport(context.Background(), &cast.GetCompetitiveReportDetailReq{
|
||||||
|
Uuid: req.Uuid,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
service.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
artistID, _ := strconv.ParseUint(resp.ArtistID, 10, 64)
|
||||||
|
if artistID != uint64(userInfo.ID) {
|
||||||
|
service.Error(ctx, errors.New("非本人竞品报告,无法操作"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 判断 work_action 是否为 1 或 2
|
||||||
|
if req.WorkAction != 1 && req.WorkAction != 6 {
|
||||||
|
service.Error(ctx, errors.New("非法操作"))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if req.ConfirmStatus != 1 && req.ConfirmStatus != 2 {
|
||||||
|
service.Error(ctx, errors.New("非法操作"))
|
||||||
|
return
|
||||||
|
}
|
||||||
_, err = service.CastProvider.UpdateCompetitiveReportStatus(newCtx, req)
|
_, err = service.CastProvider.UpdateCompetitiveReportStatus(newCtx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, err)
|
service.Error(ctx, err)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user