| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.constants.SecurityConstants; |
| | | import com.panzhihua.common.constants.UserConstants; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | sysUserDO.setUserId(loginUserInfoVO.getUserId()); |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update>0) { |
| | | //删除用户信息缓存 |
| | | String userKey = UserConstants.LOGIN_USER_INFO + loginUserInfoVO.getUserId(); |
| | | stringRedisTemplate.delete(userKey); |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | |
| | | sysUserDO.setUserId(loginUserInfoVO.getUserId()); |
| | | sysUserDO.setFaceUrl(loginUserInfoVO.getFaceUrl()); |
| | | sysUserDO.setFaceState(0); |
| | | SysUserDO sysUserDO1 = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getIdCard, loginUserInfoVO.getIdCard())); |
| | | if (!ObjectUtils.isEmpty(sysUserDO1)) { |
| | | return R.fail("身份证已经存在"); |
| | | } |
| | | int update = userDao.updateById(sysUserDO); |
| | | if (update>0) { |
| | | return R.ok(); |
| | |
| | | */ |
| | | @Override |
| | | public R putUser(LoginUserInfoVO loginUserInfoVO) { |
| | | Integer faceState = loginUserInfoVO.getFaceState(); |
| | | if (null==faceState||0==faceState) { |
| | | loginUserInfoVO.setFaceState(null); |
| | | } |
| | | Integer isPartymember = loginUserInfoVO.getIsPartymember(); |
| | | if (null==isPartymember||0==isPartymember) { |
| | | loginUserInfoVO.setIsPartymember(null); |
| | | } |
| | | Integer isVolunteer = loginUserInfoVO.getIsVolunteer(); |
| | | if (null==isVolunteer||0==isVolunteer) { |
| | | loginUserInfoVO.setIsVolunteer(null); |
| | | } |
| | | Integer operationType = loginUserInfoVO.getOperationType(); |
| | | if (null==operationType||0==operationType) { |
| | | loginUserInfoVO.setOperationType(null); |
| | | } |
| | | Integer sex = loginUserInfoVO.getSex(); |
| | | if (null==sex||0==sex) { |
| | | loginUserInfoVO.setSex(null); |
| | | } |
| | | Integer status = loginUserInfoVO.getStatus(); |
| | | if (null==status||0==status) { |
| | | loginUserInfoVO.setStatus(null); |
| | | } |
| | | Integer type = loginUserInfoVO.getType(); |
| | | if (null==type||0==type) { |
| | | loginUserInfoVO.setType(null); |
| | | } |
| | | Long communityId = loginUserInfoVO.getCommunityId(); |
| | | if (null==communityId||0==communityId) { |
| | | loginUserInfoVO.setCommunityId(null); |
| | | } |
| | | SysUserDO sysUserDO=new SysUserDO(); |
| | | BeanUtils.copyProperties(loginUserInfoVO,sysUserDO); |
| | | int update = userDao.updateById(sysUserDO); |