|
|
@@ -53,12 +53,20 @@ public class WeComThirdPartyRoomServiceImpl implements WeComThirdPartyRoomServic
|
|
|
public Page<ThirdPartyRoomVO> list(ThirdPartyRoomListParam param) {
|
|
|
Page<ThirdPartyRoomVO> result = new Page<>(param.getPageNum(), param.getPageSize());
|
|
|
int offset = (param.getPageNum() - 1) * param.getPageSize();
|
|
|
- int count = roomMapperExt.getRoomCount(param);
|
|
|
+ List<Long> pushAccountIds = null;
|
|
|
+ if (StringUtils.isNotBlank(param.getPushAccountName())) {
|
|
|
+ pushAccountIds = staffMapperExt.getStaffIdByName(param.getPushAccountName());
|
|
|
+ if (CollectionUtils.isEmpty(pushAccountIds)) {
|
|
|
+ result.setTotalSize(0);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int count = roomMapperExt.getRoomCount(param, pushAccountIds);
|
|
|
result.setTotalSize(count);
|
|
|
if (count == 0) {
|
|
|
return result;
|
|
|
}
|
|
|
- List<ThirdPartWeComRoom> roomList = roomMapperExt.getRoomList(param, offset, param.getPageSize());
|
|
|
+ List<ThirdPartWeComRoom> roomList = roomMapperExt.getRoomList(param, pushAccountIds, offset, param.getPageSize());
|
|
|
List<ThirdPartyRoomVO> list = buildThirdPartyRoomVOList(roomList);
|
|
|
result.setObjs(list);
|
|
|
return result;
|