use of com.bc.pmpheep.back.vo.GroupMemberWriterUserVO in project pmph by BCSquad.
the class WriterUserServiceImpl method listGroupMemberWriterUsers.
@Override
public PageResult<GroupMemberWriterUserVO> listGroupMemberWriterUsers(PageParameter<GroupMemberWriterUserVO> pageParameter) throws CheckedServiceException {
String bookName = pageParameter.getParameter().getBookname();
if (StringUtil.notEmpty(bookName)) {
pageParameter.getParameter().setBookname(bookName);
}
String name = pageParameter.getParameter().getName();
if (StringUtil.notEmpty(name)) {
pageParameter.getParameter().setRealname(name);
}
PageResult<GroupMemberWriterUserVO> pageResult = new PageResult<>();
PageParameterUitl.CopyPageParameter(pageParameter, pageResult);
int total = writerUserDao.getGroupMemberWriterUserTotal(pageParameter);
if (total > 0) {
List<GroupMemberWriterUserVO> list = writerUserDao.listGroupMemberWriterUserVOs(pageParameter);
for (GroupMemberWriterUserVO vo : list) {
switch(vo.getChosenPosition()) {
case 0:
vo.setChosenPositionName("无职位");
break;
case 1:
vo.setChosenPositionName("主编");
break;
case 2:
vo.setChosenPositionName("副主编");
break;
case 3:
vo.setChosenPositionName("编委");
break;
default:
throw new CheckedServiceException(CheckedExceptionBusiness.MATERIAL, CheckedExceptionResult.ILLEGAL_PARAM, "该用户没有身份");
}
}
pageResult.setRows(list);
}
pageResult.setTotal(total);
return pageResult;
}
use of com.bc.pmpheep.back.vo.GroupMemberWriterUserVO in project pmph by BCSquad.
the class WriterUserController method groupMember.
/**
* 功能描述: 分页查询小组成员添加界面作家用户信息
*
* @param bookname
* 书籍名称
* @param chosenPosition
* 申报职位
* @param name
* 姓名/帐号
* @return 分好页的数据集
*/
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = " 分页查询小组成员添加界面作家用户信息")
@RequestMapping(value = "/list/groupMember", method = RequestMethod.GET)
public ResponseBean groupMember(Integer pageSize, Integer pageNumber, String bookname, Integer chosenPosition, String name) {
PageParameter<GroupMemberWriterUserVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
GroupMemberWriterUserVO groupMemberWriterUserVO = new GroupMemberWriterUserVO();
groupMemberWriterUserVO.setBookname(bookname);
groupMemberWriterUserVO.setChosenPosition(chosenPosition);
groupMemberWriterUserVO.setName(name);
pageParameter.setParameter(groupMemberWriterUserVO);
return new ResponseBean(writerUserService.listGroupMemberWriterUsers(pageParameter));
}
Aggregations