diff --git a/epdc-cloud-commons-yushan b/epdc-cloud-commons-yushan index 60b469f..6f363d0 160000 --- a/epdc-cloud-commons-yushan +++ b/epdc-cloud-commons-yushan @@ -1 +1 @@ -Subproject commit 60b469fb3d9fccb7220f65c3ddbaa412033ecc01 +Subproject commit 6f363d0fee687011f3fd37341fd7afbbdd2805c4 diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/common/base/BaseVimCurdServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/common/base/BaseVimCurdServiceImpl.java new file mode 100644 index 0000000..0e5fa77 --- /dev/null +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/common/base/BaseVimCurdServiceImpl.java @@ -0,0 +1,53 @@ +package com.elink.esua.epdc.vaccine.common.base; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.elink.esua.epdc.commons.mybatis.service.impl.CrudServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; + +import java.util.Map; + +/** + * 重写一些方法 + * + * @author work@yujt.net.cn + */ +public abstract class BaseVimCurdServiceImpl, T, D> extends CrudServiceImpl { + + + @Override + public IPage getPage(Map params) { + //分页参数 + long curPage = 1; + long limit = 10; + + if (params.get(Constant.PAGE) != null) { + curPage = Long.parseLong((String) params.get(Constant.PAGE)); + } + if (params.get(Constant.LIMIT) != null) { + limit = Long.parseLong((String) params.get(Constant.LIMIT)); + } + + //分页对象 + Page page = new Page<>(curPage, limit); + + //分页参数 + params.put(Constant.PAGE, page); + + return page; + } + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, currentDtoClass()); + } + + +} diff --git a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java index 0734141..e66b8e0 100644 --- a/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java +++ b/epdc-cloud-vim-yushan/src/main/java/com/elink/esua/epdc/vaccine/epidemic/service/impl/EpidemicUserInfoServiceImpl.java @@ -12,6 +12,8 @@ import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.vaccine.common.uitls.ValidateUtils; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicReportUserInfoDao; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInfoDao; import com.elink.esua.epdc.vaccine.epidemic.dao.EpidemicUserInoutRecordDao; @@ -238,7 +240,7 @@ public class EpidemicUserInfoServiceImpl extends CrudServiceImpl implements VaccinationInfoService { +public class VaccinationInfoServiceImpl extends BaseVimCurdServiceImpl implements VaccinationInfoService { @Override public QueryWrapper getWrapper(Map params) { @@ -38,14 +39,14 @@ public class VaccinationInfoServiceImpl extends CrudServiceImpl page(Map params) { IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); return getPageData(page, VaccinationInfoDTO.class); - } + }*/ @Override public List checkVaccination(VaccinationInfoDTO dto) {