|
|
@ -11,15 +11,28 @@ import org.dromara.common.mybatis.core.page.PageQuery; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
@Service |
|
|
@Service |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
|
public class LawEnfOfficerSericeImpl implements ILawEnfOfficerService { |
|
|
public class LawEnfOfficerSericeImpl implements ILawEnfOfficerService { |
|
|
|
|
|
|
|
|
private final LawEnfOfficerMapper lawEnfOfficerMapper; |
|
|
private final LawEnfOfficerMapper lawEnfOfficerMapper; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 构建分页对象:排序统一由 XML 中的 orderByColumn 白名单控制。 |
|
|
|
|
|
* 清空 MyBatis-Plus 的 OrderItem,避免 PageQuery 把驼峰列名转成下划线列名后, |
|
|
|
|
|
* 在 SQL 里再追加一个排序字段(如 order by xzzf_count asc, xzzfCount asc)。 |
|
|
|
|
|
*/ |
|
|
|
|
|
private <T> Page<T> buildPage(PageQuery pageQuery) { |
|
|
|
|
|
Page<T> page = pageQuery.build(); |
|
|
|
|
|
// 排序只由 XML 中的 orderByColumn 白名单决定,清空 MP 的 OrderItem
|
|
|
|
|
|
page.setOrders(new ArrayList<>()); |
|
|
|
|
|
return page; |
|
|
|
|
|
} |
|
|
@Override |
|
|
@Override |
|
|
public TableDataInfo<EnforcementRegistrationVo> selectLawEnfOfficerPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) { |
|
|
public TableDataInfo<EnforcementRegistrationVo> selectLawEnfOfficerPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) { |
|
|
Page<EnforcementRegistrationVo> list=lawEnfOfficerMapper.selectLawEnfOfficerPageList(pageQuery.build(),bo); |
|
|
Page<EnforcementRegistrationVo> list=lawEnfOfficerMapper.selectLawEnfOfficerPageList(buildPage(pageQuery),bo); |
|
|
return TableDataInfo.build(list); |
|
|
return TableDataInfo.build(list); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -30,7 +43,7 @@ public class LawEnfOfficerSericeImpl implements ILawEnfOfficerService { |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public TableDataInfo<EnforcementRegistrationVo> selectLawEnfOfficerDetailsPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) { |
|
|
public TableDataInfo<EnforcementRegistrationVo> selectLawEnfOfficerDetailsPageList(PageQuery pageQuery, EnforcementRegistrationBo bo) { |
|
|
Page<EnforcementRegistrationVo> list=lawEnfOfficerMapper.selectLawEnfOfficerDetailsPageList(pageQuery.build(),bo); |
|
|
Page<EnforcementRegistrationVo> list=lawEnfOfficerMapper.selectLawEnfOfficerDetailsPageList(buildPage(pageQuery),bo); |
|
|
return TableDataInfo.build(list); |
|
|
return TableDataInfo.build(list); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|