Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
cuibaocheng 2021-06-01 11:10:59 +08:00
commit b10e031520
4 changed files with 27 additions and 1 deletions

View File

@ -123,7 +123,7 @@ public class ColumnMngServiceImpl extends DefaultBaseService implements IColumnM
List<ColumnMngDTO> list = columnMngDao.list(params); List<ColumnMngDTO> list = columnMngDao.list(params);
for (ColumnMngDTO item : list){ for (ColumnMngDTO item : list){
String[] resourceTypeList = item.getResourceType().split(","); String[] resourceTypeList = item.getResourceType().split(",");
if(resourceTypeList != null || !"".equals(resourceTypeList[0])){ if(resourceTypeList != null && !"".equals(resourceTypeList[0])){
String resourceTypeName = ""; String resourceTypeName = "";
for(int i = 0; i < resourceTypeList.length; i++){ for(int i = 0; i < resourceTypeList.length; i++){
resourceTypeName += MaterialTypeEnum.valueOf(resourceTypeList[i]).getTypeName() + ","; resourceTypeName += MaterialTypeEnum.valueOf(resourceTypeList[i]).getTypeName() + ",";

View File

@ -53,6 +53,7 @@ public class UserColumnServiceImpl extends DefaultBaseService implements IUserCo
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("creator",creator); params.put("creator",creator);
return this.list(params); return this.list(params);
} }

View File

@ -37,10 +37,30 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
private IUserColumnDataDao userColumnDataDao; private IUserColumnDataDao userColumnDataDao;
@Autowired @Autowired
private MaterialDataService materialDataService; private MaterialDataService materialDataService;
@Autowired
private IUserColumnService userColumnService;
public List<UserColumnDataListDTO> listMyCreator(String creator){
List<UserColumnDataListDTO> list = new ArrayList<UserColumnDataListDTO>();
List<UserColumnDTO> userColumnDTOS = userColumnService.listByCreatorTitle(creator);
ListPage page = new ListPage();
page.setRows(3);
page.setPage(1);
for (UserColumnDTO userColumnDTO : userColumnDTOS) {
Map<String, Object> params = new HashMap<>();
params.put("columnId",userColumnDTO.getColumnId());
page.setParams(params);
SuccessResultList<List<UserColumnDataDTO>> listSuccessResultList = this.listPage(page);
UserColumnDataListDTO dto = new UserColumnDataListDTO();
dto.setData(listSuccessResultList.getRows());
dto.setColumnName(userColumnDTO.getColumnName());
dto.setColumnId(userColumnDTO.getColumnId());
}
return list;
}
@Override @Override
public void save(UserColumnDataVO userColumnDataVO) { public void save(UserColumnDataVO userColumnDataVO) {
@ -165,6 +185,10 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
@Override @Override
public List<UserColumnDataDTO> list(Map<String, Object> params) { public List<UserColumnDataDTO> list(Map<String, Object> params) {
String columnId = params.get("columnId").toString();
if(StringUtils.isBlank(columnId)){
return new ArrayList<>();
}
List<UserColumnDataDTO> list = userColumnDataDao.list(params); List<UserColumnDataDTO> list = userColumnDataDao.list(params);
for (UserColumnDataDTO userColumnDataDTO : list) { for (UserColumnDataDTO userColumnDataDTO : list) {
MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId()); MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId());

View File

@ -157,6 +157,7 @@
var laytpl = layui.laytpl; var laytpl = layui.laytpl;
var laydate = layui.laydate; var laydate = layui.laydate;
var columnId = top.restAjax.params(window.location.href).columnId; var columnId = top.restAjax.params(window.location.href).columnId;
var viewerObj = {};
// 初始化内容 // 初始化内容
function initData() { function initData() {