| | |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | |
| | | } |
| | | SysUserDO sysUserDO1 = userDao.selectById(userPhoneVO.getUserId()); |
| | | String phone = sysUserDO1.getPhone(); |
| | | if (!phone.equals(oldPhone)) { |
| | | if (!StringUtils.isEmpty(phone)&& !phone.equals(oldPhone)) { |
| | | return R.fail("旧手机号错误"); |
| | | } |
| | | ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue(); |
| | |
| | | public R addFamily(ComMngFamilyInfoVO comMngFamilyInfoVO) { |
| | | ComMngFamilyInfoDO comMngFamilyInfoDO=new ComMngFamilyInfoDO(); |
| | | BeanUtils.copyProperties(comMngFamilyInfoVO,comMngFamilyInfoDO); |
| | | ComMngFamilyInfoDO comMngFamilyInfoDO1 = comMngFamilyInfoDAO.selectOne(new QueryWrapper<ComMngFamilyInfoDO>().lambda().eq(ComMngFamilyInfoDO::getIdCard, comMngFamilyInfoVO.getIdCard()).eq(ComMngFamilyInfoDO::getUserId, comMngFamilyInfoVO.getUserId())); |
| | | if (!ObjectUtils.isEmpty(comMngFamilyInfoDO1)) { |
| | | return R.fail("家庭成员已经存在"); |
| | | } |
| | | int insert = comMngFamilyInfoDAO.insert(comMngFamilyInfoDO); |
| | | if (insert>0) { |
| | | return R.ok(); |
| | |
| | | @Override |
| | | public R putFamily(ComMngFamilyInfoVO comMngFamilyInfoVO) { |
| | | ComMngFamilyInfoDO comMngFamilyInfoDO=new ComMngFamilyInfoDO(); |
| | | BeanUtils.copyProperties(comMngFamilyInfoDO,comMngFamilyInfoVO); |
| | | BeanUtils.copyProperties(comMngFamilyInfoVO,comMngFamilyInfoDO); |
| | | int update = comMngFamilyInfoDAO.updateById(comMngFamilyInfoDO); |
| | | if (update>0) { |
| | | return R.ok(); |