| | |
| | | package com.nq.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.github.pagehelper.Page; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | |
| | | dbAgent.setSiteLever(agentUser.getSiteLever()); |
| | | } |
| | | if (StringUtils.isNotBlank(agentUser.getAgentPhone())) { |
| | | AgentUser phoneAgent = this.agentUserMapper.findByPhone(agentUser.getAgentPhone()); |
| | | |
| | | if (phoneAgent == null || phoneAgent.getId() == agentUser.getId()) { |
| | | Long count = agentUserMapper.selectCount(new LambdaQueryWrapper<AgentUser>() |
| | | .eq(AgentUser::getAgentPhone, agentUser.getAgentPhone()) |
| | | .ne(AgentUser::getId, agentUser.getId()) |
| | | ); |
| | | if (count == 0) { |
| | | dbAgent.setAgentPhone(agentUser.getAgentPhone()); |
| | | } else { |
| | | return ServerResponse.createByErrorMsg("手机号已存在,请更换手机"); |