diff --git a/src/main/java/cn/com/tenlion/service/columnmng/impl/ColumnMngServiceImpl.java b/src/main/java/cn/com/tenlion/service/columnmng/impl/ColumnMngServiceImpl.java index d4c64c5..b0411c1 100644 --- a/src/main/java/cn/com/tenlion/service/columnmng/impl/ColumnMngServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/columnmng/impl/ColumnMngServiceImpl.java @@ -123,7 +123,7 @@ public class ColumnMngServiceImpl extends DefaultBaseService implements IColumnM List list = columnMngDao.list(params); for (ColumnMngDTO item : list){ String[] resourceTypeList = item.getResourceType().split(","); - if(resourceTypeList != null || !"".equals(resourceTypeList[0])){ + if(resourceTypeList != null && !"".equals(resourceTypeList[0])){ String resourceTypeName = ""; for(int i = 0; i < resourceTypeList.length; i++){ resourceTypeName += MaterialTypeEnum.valueOf(resourceTypeList[i]).getTypeName() + ","; diff --git a/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java b/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java index e36817b..05a7fad 100644 --- a/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java +++ b/src/main/java/cn/com/tenlion/service/usercolumn/impl/UserColumnServiceImpl.java @@ -53,6 +53,7 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo Map params = new HashMap<>(); params.put("creator",creator); return this.list(params); + } 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 49c6b02..5994604 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 @@ -37,10 +37,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) { @@ -165,6 +185,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()); diff --git a/src/main/resources/static/route/columnmng/update.html b/src/main/resources/static/route/columnmng/update.html index 012c595..3218d3f 100644 --- a/src/main/resources/static/route/columnmng/update.html +++ b/src/main/resources/static/route/columnmng/update.html @@ -157,6 +157,7 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var columnId = top.restAjax.params(window.location.href).columnId; + var viewerObj = {}; // 初始化内容 function initData() {