|
@@ -595,6 +595,18 @@ func (this *EnglishReportEmailController) Send() {
|
|
|
noCompanyIdsMap[v] = struct{}{}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 加个缓存吧,避免重复点击
|
|
|
+ cacheKey := "CACHE_ENGLISH_REPORT_SEND_" + strconv.Itoa(req.ReportId)
|
|
|
+ if !utils.Rc.SetNX(cacheKey, 1, 300*time.Second) {
|
|
|
+ br.Msg = "系统处理中,请稍后重试!"
|
|
|
+ br.ErrMsg = "系统处理中,请稍后重试!" + sysUser.RealName + ";data:" + string(this.Ctx.Input.RequestBody)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ defer func() {
|
|
|
+ _ = utils.Rc.Delete(cacheKey)
|
|
|
+ }()
|
|
|
+
|
|
|
// 指定品种的客户
|
|
|
sendCompanyIds := make([]int, 0)
|
|
|
if len(req.EnPermissions) > 0 {
|