| | |
| | | import com.ks.daylucky.pojo.DTO.UserMsgSettings; |
| | | import com.ks.daylucky.service.UserInfoExtraService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | |
| | | String msg = userInfoExtra.getMsgSetting(); |
| | | return UserMsgSettings.parse(msg); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void addMsgUnReadCount(Long uid, int count) { |
| | | UserInfoExtra userInfoExtra = userInfoExtraMapper.selectByPrimaryKeyForUpdate(uid); |
| | | UserInfoExtra update = new UserInfoExtra(); |
| | | update.setUid(uid); |
| | | update.setMsgUnreadCount(userInfoExtra.getMsgUnreadCount() + count); |
| | | update.setUpdateTime(new Date()); |
| | | userInfoExtraMapper.updateByPrimaryKeySelective(update); |
| | | } |
| | | } |