| | |
| | | import com.xcong.farmer.cms.modules.system.entity.UserEntity; |
| | | import com.xcong.farmer.cms.modules.system.mapper.UserMapper; |
| | | import com.xcong.farmer.cms.modules.system.service.ICommonService; |
| | | import com.xcong.farmer.cms.modules.system.util.LoginUserUtil; |
| | | import com.xcong.farmer.cms.utils.MessageSourceUtils; |
| | | import com.xcong.farmer.cms.utils.RedisUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | if(ObjectUtil.isEmpty(userEntity)){ |
| | | return Result.fail("请输入正确的账号和密码"); |
| | | } |
| | | Integer status = userEntity.getStatus(); |
| | | if(UserEntity.STATUS_DISABLED.equals(status)){ |
| | | return Result.fail("账号禁止登陆,请联系管理员"); |
| | | } |
| | | //生成UUID作为token |
| | | String token = IdUtil.simpleUUID(); |
| | | String redisToken = AppContants.APP_LOGIN_PREFIX + token; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result memberLogout(Long id) { |
| | | public Result memberLogout() { |
| | | Long id = LoginUserUtil.getLoginUser().getId(); |
| | | //获取用户ID |
| | | UserEntity userEntity = userMapper.selectById(id); |
| | | if (ObjectUtil.isEmpty(userEntity)) { |