mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
处理部分接口忽略日志记录
This commit is contained in:
+1
@@ -63,6 +63,7 @@ public class FileController {
|
||||
@PermitAll
|
||||
@Operation(summary = "下载文件")
|
||||
@Parameter(name = "configId", description = "配置编号", required = true)
|
||||
@OperateLog(enable = false)
|
||||
public void getFileContent(HttpServletRequest request,
|
||||
HttpServletResponse response,
|
||||
@PathVariable("configId") Long configId) throws Exception {
|
||||
|
||||
+1
-6
@@ -8,7 +8,6 @@ import com.cf.imes.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
||||
import com.cf.imes.module.infra.dal.mysql.logger.ApiErrorLogMapper;
|
||||
import com.cf.imes.module.infra.enums.logger.ApiErrorLogProcessStatusEnum;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
@@ -36,11 +35,7 @@ public class ApiErrorLogServiceImpl implements ApiErrorLogService {
|
||||
public void createApiErrorLog(ApiErrorLogCreateReqDTO createDTO) {
|
||||
ApiErrorLogDO apiErrorLog = BeanUtils.toBean(createDTO, ApiErrorLogDO.class)
|
||||
.setProcessStatus(ApiErrorLogProcessStatusEnum.INIT.getStatus());
|
||||
try {
|
||||
apiErrorLogMapper.insert(apiErrorLog);
|
||||
}catch (DataIntegrityViolationException e) {
|
||||
log.error(apiErrorLog.toString());
|
||||
}
|
||||
apiErrorLogMapper.insert(apiErrorLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user