| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.uuid.UUID; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.dto.*; |
| | | import com.ruoyi.mapper.ZInfoUserMapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.crypto.spec.PSource; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | /** |
| | |
| | | private ZfClanService zfClanService; |
| | | |
| | | |
| | | |
| | | /** 使相同用户名+电话号码相同的用户对应的uaid同步*/ |
| | | @Override |
| | | public Boolean setUaidSame(String phone, String username,String uniqueId){ |
| | | UpdateWrapper<ZInfoUser> wrapper = new UpdateWrapper<>(); |
| | | wrapper.eq(phone!=null,"phone_number", phone) |
| | | .eq(username!=null,"old_name",username) |
| | | .set("uaid",uniqueId ); |
| | | this.update(null, wrapper); // 执行更新 |
| | | |
| | | return true; |
| | | } |
| | | |
| | | /** 使相同用户名+电话号码相同的用户对应的inforuser表同步*/ |
| | | @Override |
| | | public void setUserInfoSame(ZInfoUser zInfoUser){ |
| | | |
| | | ZInfoUser zInfoUser1 = new ZInfoUser(); |
| | | zInfoUser1.setPhoneNumber(zInfoUser.getPhoneNumber()); |
| | | zInfoUser1.setOldName(zInfoUser.getOldName()); |
| | | LambdaQueryWrapper<ZInfoUser> lqw = buildCondition(zInfoUser1); |
| | | if (list(lqw).size() != 0){ |
| | | ZInfoUser newUser = new ZInfoUser(); |
| | | // 拷贝所有属性 |
| | | BeanUtils.copyProperties(list(lqw).get(0), newUser); |
| | | |
| | | newUser.setUserId(zInfoUser.getUserId()); |
| | | newUser.setSysId(zInfoUser.getSysId()); |
| | | newUser.setFamilyId(null); |
| | | newUser.setFatherId(null); |
| | | newUser.setMomId(null); |
| | | newUser.setUrl(null); |
| | | newUser.setSpouseId(null); |
| | | newUser.setIsMyFamily(null); |
| | | newUser.setCreateTime(null); |
| | | newUser.setClanId(null); |
| | | newUser.setNickName(null); |
| | | |
| | | System.out.println("ddddd"+newUser); |
| | | |
| | | |
| | | this.updateById(newUser); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void setSpouseOnly(Long spouse){ |
| | | UpdateWrapper<ZInfoUser> wrapper = new UpdateWrapper<>(); |