| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.EsModel; |
| | | import com.ruoyi.common.utils.MapUtils; |
| | | import com.ruoyi.domain.ZInfoUser; |
| | | import com.ruoyi.domain.ZfAncestor; |
| | | import com.ruoyi.domain.ZfClan; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.domain.*; |
| | | import com.ruoyi.domain.dto.AncestorClan; |
| | | import com.ruoyi.mapper.ZfAncestorMapper; |
| | | import com.ruoyi.service.*; |
| | |
| | | |
| | | queryWrapper.eq(zfAncestor.getClanId() !=null , " zf_ancestor.clan_id", zfAncestor.getClanId()); |
| | | queryWrapper.eq(zfAncestor.getSysId() !=null , " zf_ancestor.sys_id ", zfAncestor.getSysId()); |
| | | queryWrapper.like(StringUtils.isNotEmpty(zfAncestor.getName()),"zf_ancestor.name",zfAncestor.getName()); |
| | | |
| | | Page<AncestorClan> info = zfAncestorMapper.selectInfo(new Page<>(pageNo, pageSize),queryWrapper); |
| | | //page(pa, wrapper); |
| | |
| | | return AjaxResult.success(data); |
| | | } |
| | | |
| | | @Override |
| | | public List<AncestorClan> selectByCondition(ZfAncestor zfAncestor) { |
| | | QueryWrapper<Object> lqw = new QueryWrapper<>(); |
| | | |
| | | lqw.like(StringUtils.isNotEmpty(zfAncestor.getName()),"zf_ancestor.name",zfAncestor.getName()); |
| | | |
| | | List<AncestorClan> lis = zfAncestorMapper.selectAllInfo(lqw); |
| | | |
| | | return lis; |
| | | } |
| | | |
| | | @Override |
| | | public List<AncestorClan> selectByIds(Long[] ids) { |
| | | List<AncestorClan> list = new ArrayList<>(); |
| | | QueryWrapper<Object> lqw = new QueryWrapper<>(); |
| | | // lqw.like(StringUtils.isNotEmpty(zfAncestor.getName()),"zf_ancestor.name",zfAncestor.getName()); |
| | | |
| | | // if(ids.length!=0) |
| | | // list = listByIds(Arrays.asList(ids)); |
| | | //else |
| | | list = zfAncestorMapper.selectAllInfo(lqw); |
| | | // System.out.println(list.size()); |
| | | // System.out.println("---------+++++++++---------"); |
| | | |
| | | List tmp = new ArrayList<>(Arrays.asList(ids)); |
| | | List res = new ArrayList(); |
| | | if(ids.length!=0) |
| | | { |
| | | for(AncestorClan ast : list) |
| | | { |
| | | if(tmp.contains(ast.getId().longValue())) |
| | | { |
| | | res.add(ast); |
| | | } |
| | | } |
| | | return res; |
| | | } |
| | | else |
| | | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Long addData(ZfAncestor zfAncestor) { |