whycrzg
2021-02-03 9948b3f9a8d2d471a608b169de946eeb7d08b4b5
src/main/java/com/fgkj/services/BattDischarge_planService.java
@@ -41,7 +41,15 @@
   
   public ServiceModel add(BattDischarge_plan plan){
      ServiceModel model = new ServiceModel();
      Boolean bl=mapper.add(plan)>0;
      Boolean bl= null;
      try {
         bl = mapper.add(plan)>0;
      } catch (Exception e) {
         e.printStackTrace();
         model.setCode(0);
         model.setMsg("添加失败!");
         return model;
      }
      if(bl){
         model.setCode(1);
         model.setMsg("添加成功!");
@@ -53,7 +61,15 @@
   }
   public ServiceModel update(BattDischarge_plan obj){
      ServiceModel model = new ServiceModel();
      Boolean bl=mapper.update(obj)>0;
      Boolean bl= null;
      try {
         bl = mapper.update(obj)>0;
      } catch (Exception e) {
         e.printStackTrace();
         model.setCode(0);
         model.setMsg("修改失败!");
         return model;
      }
      if(bl){
         model.setCode(1);
         model.setMsg("修改成功!");
@@ -76,6 +92,7 @@
               bl = mapper.addPro(bdp) > 0;
            } catch (Exception e) {
               e.printStackTrace();
               dataSourceTransactionManager.rollback(transactionStatus);
               model.setCode(0);
               model.setMsg("添加失败!");
               return model;
@@ -111,6 +128,7 @@
               bl = mapper.updatePro(bdp) > 0;
            } catch (Exception e) {
               e.printStackTrace();
               dataSourceTransactionManager.rollback(transactionStatus);
               model.setCode(0);
               model.setMsg("添加失败!");
               return model;