| | |
| | | import com.yeshi.buwan.exception.user.LoginUserException; |
| | | import com.yeshi.buwan.exception.user.RegisterUserException; |
| | | import com.yeshi.buwan.service.inter.LoginUserService; |
| | | import com.yeshi.buwan.service.inter.system.SystemConfigService; |
| | | import org.hibernate.HibernateException; |
| | | import org.hibernate.Session; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | |
| | | @Resource |
| | | private LoginUserService loginUserService; |
| | | |
| | | @Resource |
| | | private SystemConfigService systemConfigService; |
| | | |
| | | |
| | | // 用户操作 |
| | | public List<UserInfo> getUserList(int system, int page) { |
| | | return userDao.list("from UserInfo u where u.system.id=? order by u.createtime desc", |
| | | (page - 1) * Constant.pageCount, Constant.pageCount, new String[]{system + ""}); |
| | | } |
| | | |
| | | //设置昵称 |
| | | public void setNickName(Long uid, String nickName) { |
| | | LoginUser update = new LoginUser(); |
| | | update.setId(uid + ""); |
| | | update.setName(nickName); |
| | | loginUserDao.updateSelective(update); |
| | | } |
| | | |
| | | // 获取用户数量 |
| | |
| | | |
| | | loginUser = new LoginUser(); |
| | | loginUser.setLoginType(LoginUser.LOGIN_TYPE_PHONE); |
| | | loginUser.setName(null); |
| | | loginUser.setName(dto.getNickName()); |
| | | loginUser.setPhone(dto.getPhone()); |
| | | |
| | | loginUserExtra = new LoginUserExtra(); |
| | |
| | | loginUser.setId(uid + ""); |
| | | |
| | | if (StringUtil.isNullOrEmpty(loginUser.getName())) { |
| | | //TODO 昵称前缀 |
| | | // systemConfigService.getConfigValueByKeyCache(""); |
| | | //设置默认用户昵称 |
| | | String nickName = "无名氏"; |
| | | String nickName = "ID_" + uid; |
| | | LoginUser update = new LoginUser(); |
| | | update.setId(uid + ""); |
| | | update.setName(nickName); |