use of com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO in project pmph by BCSquad.
the class GroupController method manager.
/**
* 功能描述:分页查询小组成员管理界面小组成员信息
*
* @param pageSize
* 当页条数
* @param pageNumber
* 当前页数
* @param groupId
* 小组id
* @param name
* 姓名/帐号
* @return
*/
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "分页查询小组成员管理界面小组成员信息")
@RequestMapping(value = "/list/manager", method = RequestMethod.GET)
public ResponseBean manager(Integer pageSize, Integer pageNumber, Long groupId, String name) {
PageParameter pageParameter = new PageParameter<>(pageNumber, pageSize);
PmphGroupMemberManagerVO pmphGroupMemberManagerVO = new PmphGroupMemberManagerVO();
pmphGroupMemberManagerVO.setName(name);
pmphGroupMemberManagerVO.setGroupId(groupId);
pageParameter.setParameter(pmphGroupMemberManagerVO);
return new ResponseBean(pmphGroupMemberService.listGroupMemberManagerVOs(pageParameter));
}
use of com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO in project pmph by BCSquad.
the class PmphGroupMemberServiceTest method testListGroupMemberManagerVOs.
@Test
public void testListGroupMemberManagerVOs() {
pmphGroupMemberService.addPmphGroupMember(pmphGroupMember);
PageParameter pageParameter = new PageParameter<>(1, 20);
PmphGroupMemberManagerVO pmphGroupMemberManagerVO = new PmphGroupMemberManagerVO();
pmphGroupMemberManagerVO.setName(null);
pmphGroupMemberManagerVO.setGroupId(pmphGroupMember.getGroupId());
pageParameter.setParameter(pmphGroupMemberManagerVO);
Assert.assertNotNull("获取数据失败", pmphGroupMemberService.listGroupMemberManagerVOs(pageParameter));
}
use of com.bc.pmpheep.back.vo.PmphGroupMemberManagerVO in project pmph by BCSquad.
the class PmphGroupMemberServiceImpl method listGroupMemberManagerVOs.
@Override
public PageResult<PmphGroupMemberManagerVO> listGroupMemberManagerVOs(PageParameter<PmphGroupMemberManagerVO> pageParameter) throws CheckedServiceException {
if (null == pageParameter.getParameter().getGroupId()) {
throw new CheckedServiceException(CheckedExceptionBusiness.GROUP, CheckedExceptionResult.NULL_PARAM, "小组id不能为空");
}
String name = pageParameter.getParameter().getName();
if (StringUtil.notEmpty(name)) {
pageParameter.getParameter().setName(name);
}
PageResult<PmphGroupMemberManagerVO> pageResult = new PageResult<>();
PageParameterUitl.CopyPageParameter(pageParameter, pageResult);
int total = pmphGroupMemberDao.groupMemberTotal(pageParameter);
if (total > 0) {
List<PmphGroupMemberManagerVO> list = pmphGroupMemberDao.listGroupMemberManagerVOs(pageParameter);
for (PmphGroupMemberManagerVO pmphGroupMemberManagerVO : list) {
pmphGroupMemberManagerVO.setAvatar(RouteUtil.userAvatar(pmphGroupMemberManagerVO.getAvatar()));
if (pmphGroupMemberManagerVO.getIsWriter()) {
pmphGroupMemberManagerVO.setUserType(Const.SENDER_TYPE_2);
} else {
pmphGroupMemberManagerVO.setUserType(Const.SENDER_TYPE_1);
}
// 处理position
String position = pmphGroupMemberManagerVO.getPosition();
if (null != position && position.contains(",")) {
position = position.replace("无,", "").replace(",无", "");
String[] positions = position.split(",");
String tempPosition = positions[0];
for (int i = 1; i < positions.length; i++) {
if (!("," + tempPosition + ",").contains("," + positions[i] + ",")) {
tempPosition += "," + positions[i];
}
}
pmphGroupMemberManagerVO.setPosition(tempPosition);
}
// 处理position end
}
pageResult.setRows(list);
}
pageResult.setTotal(total);
return pageResult;
}
Aggregations