feat:批量导入增加校验竞品报告的余额
This commit is contained in:
parent
8fa9f89db9
commit
a3e617a87f
@ -164,6 +164,21 @@ func ImportCompetitiveReportBatch(ctx *gin.Context) {
|
||||
temp.ArtistID = fmt.Sprint(subInfoResp.Id)
|
||||
temp.ArtistName = subInfoResp.Name
|
||||
temp.ArtistPhone = subInfoResp.TelNum
|
||||
|
||||
// 这里根据 ArtistID 查询竞品报告余额
|
||||
artistID, _ := strconv.ParseUint(temp.ArtistID, 10, 64)
|
||||
if _, err = CheckUserBundleBalance(int32(artistID), modelCast.BalanceTypeCompetitiveValue); err != nil {
|
||||
if err != nil && err.Error() == e.ErrorBalanceInsufficient {
|
||||
temp.Remark = "该艺人竞品报告可用次数为0"
|
||||
req.Reports = append(req.Reports, temp)
|
||||
continue
|
||||
}
|
||||
if err != nil {
|
||||
temp.Remark = errors.New("查询竞品报告余额失败").Error()
|
||||
req.Reports = append(req.Reports, temp)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析标题(C列,row[2])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user