| | |
| | | |
| | | @Override |
| | | public void setUserMsgSetting(Long uid, UserMsgSettings setting) { |
| | | UserMsgSettings old = getUserMsgSettings(uid); |
| | | //设置已经设置的 |
| | | if (setting.getAssistSuccessMsg() != null) { |
| | | old.setAssistSuccessMsg(setting.getAssistSuccessMsg()); |
| | | } |
| | | |
| | | if (setting.getDrawnMsg() != null) { |
| | | old.setDrawnMsg(setting.getDrawnMsg()); |
| | | } |
| | | |
| | | if (setting.getJoinActivityMsg() != null) { |
| | | old.setJoinActivityMsg(setting.getJoinActivityMsg()); |
| | | } |
| | | |
| | | if (setting.getNotDrawnMsg() != null) { |
| | | old.setNotDrawnMsg(setting.getNotDrawnMsg()); |
| | | } |
| | | |
| | | if (setting.getNotOpenActivityMsg() != null) { |
| | | old.setNotOpenActivityMsg(setting.getNotOpenActivityMsg()); |
| | | } |
| | | |
| | | if (setting.getOpenActivityMsg() != null) { |
| | | old.setOpenActivityMsg(setting.getOpenActivityMsg()); |
| | | } |
| | | |
| | | |
| | | UserInfoExtra extra = new UserInfoExtra(); |
| | | extra.setUid(uid); |
| | | extra.setMsgSetting(setting.toString()); |
| | | extra.setMsgSetting(old.toString()); |
| | | extra.setUpdateTime(new Date()); |
| | | userInfoExtraMapper.updateByPrimaryKeySelective(extra); |
| | | } |