From cdcbed9af813b2a02cdc01eefa24db8bec6b51a9 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 27 三月 2019 12:17:33 +0800 Subject: [PATCH] 主分类 + 子分类 DAO改造 --- fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserMsgReadStateServiceImpl.java | 32 ++++++++++++++++++++++++++++++-- 1 files changed, 30 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserMsgReadStateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserMsgReadStateServiceImpl.java index 1c7d774..302fbd2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserMsgReadStateServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserMsgReadStateServiceImpl.java @@ -14,6 +14,7 @@ import com.yeshi.fanli.service.inter.msg.MsgInviteDetailService; import com.yeshi.fanli.service.inter.msg.MsgMoneyDetailService; import com.yeshi.fanli.service.inter.msg.MsgOrderDetailService; +import com.yeshi.fanli.service.inter.msg.MsgOtherDetailService; import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService; import com.yeshi.fanli.service.inter.msg.UserSystemMsgService; @@ -34,7 +35,10 @@ @Resource private MsgMoneyDetailService msgMoneyDetailService; - + + @Resource + private MsgOtherDetailService msgOtherDetailService; + @Resource private UserSystemMsgService userSystemMsgService; @@ -99,6 +103,16 @@ update.setUpdateTime(new Date()); userMsgUnReadNumMapper.updateByPrimaryKeySelective(update); } + + @Override + public void addOtherMsgUnReadCount(Long uid, int count) { + UserMsgUnReadNum num = getUserMsgUnReadNum(uid); + UserMsgUnReadNum update = new UserMsgUnReadNum(); + update.setId(num.getId()); + update.setTypeOther(num.getTypeOther() + count); + update.setUpdateTime(new Date()); + userMsgUnReadNumMapper.updateByPrimaryKeySelective(update); + } @Override public UserMsgUnReadNum getReadStateByUid(Long uid) { @@ -158,7 +172,6 @@ @Override public void readUserSystemMsg(Long uid) { userSystemMsgService.readMsgByUid(uid); - UserMsgUnReadNum num = getUserMsgUnReadNum(uid); UserMsgUnReadNum update = new UserMsgUnReadNum(); update.setId(num.getId()); @@ -179,6 +192,7 @@ update.setTypeOrder(0); update.setTypeScore(0); update.setTypeSystem(0); + update.setTypeOrder(0); update.setUpdateTime(new Date()); userMsgUnReadNumMapper.updateByPrimaryKeySelective(update); readAccountMsg(uid); @@ -186,6 +200,20 @@ readMoneyMsg(uid); readInviteMsg(uid); readUserSystemMsg(uid); + readOtherMsg(uid); } + @Override + public void readOtherMsg(Long uid) { + msgOtherDetailService.readMsgByUid(uid); + UserMsgUnReadNum num = getUserMsgUnReadNum(uid); + UserMsgUnReadNum update = new UserMsgUnReadNum(); + update.setId(num.getId()); + update.setTypeOther(0); + update.setUpdateTime(new Date()); + userMsgUnReadNumMapper.updateByPrimaryKeySelective(update); + } + + + } -- Gitblit v1.8.0