|
|
@ -76,7 +76,7 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public IPage<ClassifyEntity> pageList(IPage<Object> page, Map<String, Object> classify) { |
|
|
|
public IPage<ClassifyVO> pageList(IPage<Object> page, Map<String, Object> classify) { |
|
|
|
Long pId = (Long) classify.get("pId"); |
|
|
|
Long pId = (Long) classify.get("pId"); |
|
|
|
String name = (String) classify.get("name"); |
|
|
|
String name = (String) classify.get("name"); |
|
|
|
String isPid = (String) classify.get("isPid"); |
|
|
|
String isPid = (String) classify.get("isPid"); |
|
|
@ -86,7 +86,21 @@ public class ClassifyServiceImpl extends BaseServiceImpl<ClassifyMapper, Classif |
|
|
|
classifyDTO.setName(name); |
|
|
|
classifyDTO.setName(name); |
|
|
|
classifyDTO.setIsPid(Integer.parseInt(isPid)); |
|
|
|
classifyDTO.setIsPid(Integer.parseInt(isPid)); |
|
|
|
|
|
|
|
|
|
|
|
IPage<ClassifyEntity> pages = baseMapper.pageList(page,classifyDTO); |
|
|
|
IPage<ClassifyVO> pages = baseMapper.pageList(page,classifyDTO); |
|
|
|
|
|
|
|
List<ClassifyVO> records = pages.getRecords(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!"1".equals(isPid)){ |
|
|
|
|
|
|
|
for (ClassifyVO record : records) { |
|
|
|
|
|
|
|
Long classifyId = record.getId(); |
|
|
|
|
|
|
|
QueryWrapper<PointsEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
queryWrapper.eq("classify_id",classifyId) |
|
|
|
|
|
|
|
.eq("is_deleted",0); |
|
|
|
|
|
|
|
List<PointsEntity> list = pointsService.list(queryWrapper); |
|
|
|
|
|
|
|
record.setPointsEntities(list); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pages.setRecords(records); |
|
|
|
|
|
|
|
|
|
|
|
return pages; |
|
|
|
return pages; |
|
|
|
} |
|
|
|
} |
|
|
|