|
|
@@ -1,6 +1,7 @@
|
|
|
package com.cyksj.web.controller.sys;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.util.Jsons;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
@@ -56,7 +57,13 @@ public class FrontProblemCollectRecordController {
|
|
|
isFlag = true;
|
|
|
}
|
|
|
if (isFlag) {
|
|
|
- recordMapper.insert(record);
|
|
|
+ Integer selectCount = 0;
|
|
|
+ if (StrUtil.isNotBlank(record.getErrorMsg())) {
|
|
|
+ selectCount = recordMapper.selectCount(Wrappers.lambdaQuery(FrontProblemCollectRecord.class).eq(FrontProblemCollectRecord::getErrorMsg, record.getErrorMsg()));
|
|
|
+ }
|
|
|
+ if (selectCount == 0) {
|
|
|
+ recordMapper.insert(record);
|
|
|
+ }
|
|
|
}
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult();
|
|
|
}
|