|
|
|
@ -31,6 +31,7 @@ import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper; |
|
|
|
|
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService; |
|
|
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.servlet.ModelAndView; |
|
|
|
@ -87,13 +88,18 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS |
|
|
|
|
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize); |
|
|
|
|
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
|
|
|
|
|
//改变list中的实体类 类型
|
|
|
|
|
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords()); |
|
|
|
|
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size()); |
|
|
|
|
pageList2.setRecords(newStyleModuleList); |
|
|
|
|
return Result.OK(pageList2); |
|
|
|
|
|
|
|
|
|
if (!ObjectUtils.isEmpty(newStyleModuleList)){ |
|
|
|
|
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size()); |
|
|
|
|
pageList2.setRecords(newStyleModuleList); |
|
|
|
|
return Result.OK(pageList2); |
|
|
|
|
} else { |
|
|
|
|
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, 0); |
|
|
|
|
return Result.OK(pageList2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|