用户栏目新增app接口

This commit is contained in:
ly19960718 2021-05-31 17:43:47 +08:00
parent 3eb14d2d4c
commit 5aeb6d6e75

View File

@ -50,11 +50,29 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
private IUserColumnDataDao userColumnDataDao;
@Autowired
private MaterialDataService materialDataService;
@Autowired
private IUserColumnService userColumnService;
@Override
public List<UserColumnDataListDTO> listMyCreator(String creator) {
return null;
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
@ -180,6 +198,10 @@ public class UserColumnDataServiceImpl extends DefaultBaseService implements IUs
@Override
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);
for (UserColumnDataDTO userColumnDataDTO : list) {
MaterialDataDTO materialDataDTO = materialDataService.getByMaterialId(userColumnDataDTO.getUserColumnDataId());