diff --git a/src/main/java/cn/com/tenlion/service/usercolumndata/impl/UserColumnDataServiceImpl.java b/src/main/java/cn/com/tenlion/service/usercolumndata/impl/UserColumnDataServiceImpl.java index e3ebfec..d2fc592 100644 --- a/src/main/java/cn/com/tenlion/service/usercolumndata/impl/UserColumnDataServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/usercolumndata/impl/UserColumnDataServiceImpl.java @@ -50,10 +50,30 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs private IUserColumnDataDao userColumnDataDao; @Autowired private MaterialDataService materialDataService; + @Autowired + private IUserColumnService userColumnService; + public List listMyCreator(String creator){ + List list = new ArrayList(); + List userColumnDTOS = userColumnService.listByCreatorTitle(creator); + ListPage page = new ListPage(); + page.setRows(3); + page.setPage(1); + for (UserColumnDTO userColumnDTO : userColumnDTOS) { + Map params = new HashMap<>(); + params.put("columnId",userColumnDTO.getColumnId()); + page.setParams(params); + SuccessResultList> listSuccessResultList = this.listPage(page); + UserColumnDataListDTO dto = new UserColumnDataListDTO(); + dto.setData(listSuccessResultList.getRows()); + dto.setColumnName(userColumnDTO.getColumnName()); + dto.setColumnId(userColumnDTO.getColumnId()); + } + return list; + } @Override public void save(UserColumnDataVO userColumnDataVO) { @@ -178,6 +198,10 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs @Override public List list(Map params) { + String columnId = params.get("columnId").toString(); + if(StringUtils.isBlank(columnId)){ + return new ArrayList<>(); + } List list = userColumnDataDao.list(params); for (UserColumnDataDTO userColumnDataDTO : list) { MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId());