| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.sangeshenbian.dao.SystemUserMapper; |
| | | import com.panzhihua.sangeshenbian.model.entity.SystemUser; |
| | | import com.panzhihua.sangeshenbian.service.ISystemUserService; |
| | | import com.panzhihua.sangeshenbian.warpper.SystemUserList; |
| | | import com.panzhihua.sangeshenbian.warpper.SystemUserListVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | IPage<SystemUserListVo> list = this.baseMapper.list(page, accountLevel, query); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号码查询小程序用户在三个身边的上级角色用户 |
| | | * @param phone |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Optional<SystemUser> getSystemUserByPhone(String phone) { |
| | | if (StringUtils.isBlank(phone)) { |
| | | return Optional.empty(); |
| | | } |
| | | return this.lambdaQuery() |
| | | .eq(SystemUser::getPhone, phone).ne(SystemUser::getStatus, 3) |
| | | .eq(SystemUser::getIsAdmin, 1).last("LIMIT 1").oneOpt(); |
| | | } |
| | | } |