admin
2019-06-14 1e92eff67b997263ecefa255c63eb6641c47b57f
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
@@ -21,7 +21,7 @@
   @Resource
   private MsgOtherDetailMapper msgOtherDetailMapper;
   @Resource
   private UserMsgReadStateService userMsgReadStateService;
@@ -34,7 +34,8 @@
         if (detail.getCoupnContent() == null)
            throw new MsgOtherDetailException(1, "内容为空");
         detail.setContent(new Gson().toJson(detail.getCoupnContent()));
         detail.setCreateTime(new Date());
         if (detail.getCreateTime() == null)
            detail.setCreateTime(new Date());
         msgOtherDetailMapper.insertSelective(detail);
         userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
      }
@@ -50,6 +51,7 @@
         if (detail.getCoupnContent() == null)
            throw new MsgOtherDetailException(1, "内容为空");
         detail.setContent(new Gson().toJson(detail.getCoupnContent()));
         if(detail.getUpdateTime()==null)
         detail.setUpdateTime(new Date());
         msgOtherDetailMapper.updateByPrimaryKeySelective(detail);
      }