|
@@ -3,6 +3,7 @@ package com.ydtech.modules.esm.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
+import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
import com.ydtech.exception.SystemException;
|
|
|
import com.ydtech.modules.admin.model.SysUser;
|
|
import com.ydtech.modules.admin.model.SysUser;
|
|
|
import com.ydtech.modules.admin.model.vo.SysReferrerVo;
|
|
import com.ydtech.modules.admin.model.vo.SysReferrerVo;
|
|
@@ -117,7 +118,7 @@ public class EsmUserReferrerServiceImpl extends ServiceImpl<EsmUserReferrerMappe
|
|
|
return remove(queryWrapper);
|
|
return remove(queryWrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
List<String> getUpUser(String userId,List<String> list){
|
|
List<String> getUpUser(String userId,List<String> list){
|
|
|
|
|
|
|
|
EsmUserReferrer esmUserReferrer=this.getById(userId);
|
|
EsmUserReferrer esmUserReferrer=this.getById(userId);
|
|
@@ -130,9 +131,13 @@ public class EsmUserReferrerServiceImpl extends ServiceImpl<EsmUserReferrerMappe
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public PageVo gainReferrerPage(PageDto<SysReferrerVo> pageDto) {
|
|
|
|
|
|
|
+ public HttpResult<PageVo<SysReferrerVo>> gainReferrerPage(PageDto<SysReferrerVo> pageDto) {
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(pageDto.getDto().getAffiliation())){
|
|
if(StringUtils.isNotEmpty(pageDto.getDto().getAffiliation())){
|
|
|
|
|
+ EsmUserReferrer esmUserReferrer=this.getById(pageDto.getDto().getAffiliation());
|
|
|
|
|
+ if(esmUserReferrer==null){
|
|
|
|
|
+ return HttpResult.error("工号有误,请重新输入");
|
|
|
|
|
+ }
|
|
|
List<String> up3list=new ArrayList<>();
|
|
List<String> up3list=new ArrayList<>();
|
|
|
getUpUser(pageDto.getDto().getAffiliation(),up3list);
|
|
getUpUser(pageDto.getDto().getAffiliation(),up3list);
|
|
|
List<String> down3list=this.baseMapper.getIdDown3(pageDto.getDto().getAffiliation());
|
|
List<String> down3list=this.baseMapper.getIdDown3(pageDto.getDto().getAffiliation());
|
|
@@ -167,7 +172,7 @@ public class EsmUserReferrerServiceImpl extends ServiceImpl<EsmUserReferrerMappe
|
|
|
pageDto.setPageNum(firstIndex);
|
|
pageDto.setPageNum(firstIndex);
|
|
|
pageVo.setContent(super.baseMapper.selectReferrerByAffiliation(pageDto));
|
|
pageVo.setContent(super.baseMapper.selectReferrerByAffiliation(pageDto));
|
|
|
|
|
|
|
|
- return pageVo;
|
|
|
|
|
|
|
+ return HttpResult.ok(pageVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|