Commit c1789275 by 墨竹

fix:分页修改

parent b48bf17b
package com.gic.haoban.manage.service.service.hm;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO;
import com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO;
......@@ -123,6 +125,18 @@ public interface HmClerkRelationService {
/**
* 获取导购分页
*
* @param basePageInfo 基本信息页
* @param hmId hm id
* @return {@link List }<{@link HmClerkRelationBO }>
* @author mozhu
* @date 2022-07-20 15:04:40
*/
Page<HmClerkRelationBO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId);
/**
* 获取导购
*
* @param hmId hm id
......
package com.gic.haoban.manage.service.service.hm.impl;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO;
import com.gic.haoban.manage.service.dao.mapper.hm.TabHaobanHmClerkRelationMapper;
import com.gic.haoban.manage.service.entity.hm.TabHaobanHmClerkRelation;
import com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO;
import com.gic.haoban.manage.service.service.hm.HmClerkRelationService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -91,6 +96,13 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
}
@Override
public Page<HmClerkRelationBO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) {
PageHelper.startPage(basePageInfo.getPageNum(),basePageInfo.getPageSize());
List<TabHaobanHmClerkRelation> hmClerkByHmId = tabHaobanHmClerkRelationMapper.getHmClerkByHmId(hmId);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(hmClerkByHmId), HmClerkRelationBO.class);
}
@Override
public HmClerkRelationBO getHmClerkByHmIdAndStaffId(Long hmId, String staffId) {
return EntityUtil.changeEntityByOrika(HmClerkRelationBO.class,tabHaobanHmClerkRelationMapper.getHmClerkByHmIdAndStaffId(hmId,staffId));
}
......
......@@ -50,8 +50,6 @@ import com.gic.wechat.api.dto.qywx.response.QywxResponseDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -718,9 +716,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
@Override
public Page<HmClerkRelationDTO> getHmClerkByHmId(BasePageInfo basePageInfo, Long hmId) {
PageHelper.startPage(basePageInfo);
List<HmClerkRelationBO> hmClerkByHmId = hmClerkRelationService.getHmClerkByHmId(hmId);
return PageUtil.changePageHelperToCurrentPage(new PageInfo<>(hmClerkByHmId), HmClerkRelationDTO.class);
Page<HmClerkRelationBO> hmClerkByHmId = hmClerkRelationService.getHmClerkByHmId(basePageInfo, hmId);
return PageUtil.changeToCurrentPage(hmClerkByHmId,HmClerkRelationDTO.class);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment