Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
d61043f00d
|
@ -11,7 +11,6 @@ import io.swagger.annotations.Api;
|
|||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
|
|
@ -21,6 +21,7 @@ import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
|
|||
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -129,7 +130,11 @@ public class ResourceController {
|
|||
})
|
||||
public Result<PageData<ResourceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
PageData<ResourceDTO> page = resourceService.page(params);
|
||||
page.getList().forEach(item -> item.setInfoList(resourceService.selectAttrsByResourceId(item.getId())));
|
||||
page.getList().forEach(item -> {
|
||||
item.setInfoList(resourceService.selectAttrsByResourceId(item.getId()));
|
||||
String deptName = sysDeptService.get(item.getDeptId()).getName();
|
||||
item.setDeptName(StringUtils.isNotBlank(deptName) ? deptName : "--");
|
||||
});
|
||||
return new Result<PageData<ResourceDTO>>().ok(page);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue