use of com.topcom.cms.yuqing.vo.request.GroupStyle in project topcom-cloud by 545314690.
the class UserStyleController method findAllGroupAndUsersyle.
@ApiOperation("查询group列表")
@RequestMapping(value = { "findAllGroupAndUsersyle" }, method = { RequestMethod.POST }, produces = { "application/json" }, consumes = { "application/json" })
@ResponseBody
public Page findAllGroupAndUsersyle(@RequestBody PageRequest page) {
Page<Group> groupPage = groupManager.findAll(page.pageable());
List<GroupStyle> contentList = new ArrayList<>();
for (Group group : groupPage.getContent()) {
Long groupId = group.getId();
UserStyle userStyle = this.userStyleManager.findByGroupId(groupId);
GroupStyle groupStyle;
if (userStyle != null) {
groupStyle = new GroupStyle(group, userStyle);
} else {
groupStyle = new GroupStyle(group);
}
contentList.add(groupStyle);
}
Page result = new AggPageImpl<>(contentList, groupPage.getTotalPages(), groupPage.getTotalElements(), page.pageable());
return result;
}
use of com.topcom.cms.yuqing.vo.request.GroupStyle in project topcom-cloud by 545314690.
the class UserStyleController method addUserStyleToGroup.
private GroupStyle addUserStyleToGroup(Group group) {
Long groupId = group.getId();
UserStyle userStyle = this.userStyleManager.findByGroupId(groupId);
GroupStyle result = new GroupStyle(group, userStyle);
// result.put("text",group.getText());
return result;
}
Aggregations