瀏覽代碼

操作日志插入失败,不影响主流程回滚

houweiyu 4 年之前
父節點
當前提交
d08819863b

+ 0 - 3
src/main/java/fcb/project/manager/core/controller/AuditController.java

@@ -188,7 +188,6 @@ public class AuditController extends BaseController{
         int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "审核管理/" + auditResultStr  + "/" + dbHouse.getHouseTitle() );
         if(ins != 1){
             log.info("插入操作记录失败");
-            throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
         }
         Map<String , Object> resMap = new HashMap<>();
         resMap.put("auditId" , tmAudit.getId());
@@ -243,7 +242,6 @@ public class AuditController extends BaseController{
                     int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "审核管理/审核下线/" + tmHouse.getHouseTitle() + "-失败");
                     if(ins != 1){
                         log.info("插入操作记录失败");
-                        throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
                     }
                     throw new CommonBaseException(ResultCodeEnum.D101 , "更新看看场景状态失败");
                 }
@@ -255,7 +253,6 @@ public class AuditController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "审核管理/审核下线/" + tmHouse.getHouseTitle() + "-成功");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
         }
         return Result.success();

+ 0 - 11
src/main/java/fcb/project/manager/core/controller/HouseManagerController.java

@@ -269,7 +269,6 @@ public class HouseManagerController extends BaseController{
                 int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "更新VR项目分享二维码/" + tmHouse.getHouseTitle() + "-失败");
                 if(ins != 1){
                     log.info("插入操作记录失败");
-                    throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
                 }
                 return Result.failure("生成分享二维码失败");
             }
@@ -279,7 +278,6 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "更新VR项目分享二维码/" + tmHouse.getHouseTitle() + "-异常");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("生成分享二维码出现异常");
         }
@@ -297,7 +295,6 @@ public class HouseManagerController extends BaseController{
         int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "更新VR项目分享二维码/" + tmHouse.getHouseTitle() + "-成功");
         if(ins != 1){
             log.info("插入操作记录失败");
-            throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
         }
 
         Map<String , Object> resultMap = new HashMap<>();
@@ -439,14 +436,12 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "删除VR项目/" + dbHouse.getHouseTitle() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("删除失败");
         }
         int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "删除VR项目/" + dbHouse.getHouseTitle() + "-成功");
         if(ins != 1){
             log.info("插入操作记录失败");
-            throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
         }
         List<String> sceneNumList = panoService.getKanKanSceneNums(dbHouse.getId() , getToken());
         log.info("720返回的房源的[{}]对应的四维场景码列表为:{}" , dbHouse.getId() , JSON.toJSONString(sceneNumList));
@@ -505,14 +500,12 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "更新VR项目/" + dbHouse.getHouseTitle() + "-成功");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.success("修改成功");
         }else{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "更新VR项目/" + dbHouse.getHouseTitle() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("修改失败");
         }
@@ -565,7 +558,6 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "提交审核/" + dbHouse.getHouseTitle() + "-成功");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
 
             Map<String , Object> map = new HashMap<>();
@@ -575,7 +567,6 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "提交审核/" + dbHouse.getHouseTitle() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("提交失败");
         }
@@ -631,7 +622,6 @@ public class HouseManagerController extends BaseController{
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "撤销审核/" + dbHouse.getHouseTitle() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             throw new CommonBaseException(ResultCodeEnum.D101 , "撤销房源的审批记录失败");
         }
@@ -644,7 +634,6 @@ public class HouseManagerController extends BaseController{
         int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "审核管理" , "撤销审核/" + dbHouse.getHouseTitle() + "-成功");
         if(ins != 1){
             log.info("插入操作记录失败");
-            throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
         }
 
         return Result.success("撤销成功");

+ 0 - 6
src/main/java/fcb/project/manager/core/controller/ProjectController.java

@@ -95,14 +95,12 @@ public class ProjectController extends BaseController {
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "创建楼盘/" + dbEstate.getEstateName() + "-成功");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.success("新增成功");
         } else {
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "创建楼盘/" + dbEstate.getEstateName() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("新增失败");
         }
@@ -141,14 +139,12 @@ public class ProjectController extends BaseController {
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "删除楼盘/" + dbEstate.getEstateName() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("删除失败");
         }
         int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "删除楼盘/" + dbEstate.getEstateName() + "-成功");
         if(ins != 1){
             log.info("插入操作记录失败");
-            throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
         }
 
         return Result.success("删除楼盘成功");
@@ -174,14 +170,12 @@ public class ProjectController extends BaseController {
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "修改楼盘/" + dbEstate.getEstateName() + "-成功");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.success("修改成功");
         } else {
             int ins = tmOperationService.addNewWithTypeAndContent(getContextUserInfo() , "VR楼盘项目" , "修改楼盘/" + dbEstate.getEstateName() + "-失败");
             if(ins != 1){
                 log.info("插入操作记录失败");
-                throw new CommonBaseException(ResultCodeEnum.D101 , "插入操作记录失败");
             }
             return Result.failure("修改失败");
         }