fix(bms): 发票列表兼容pageNum/pageNo参数名,修复翻页始终返回第一页;排序补id兜底防翻页重复

This commit is contained in:
rcx
2026-09-02 19:31:01 +08:00
parent 49ab26a8e9
commit 87dae51a15
2 changed files with 6 additions and 3 deletions
@@ -52,11 +52,14 @@ public class BmsInvoiceListApi extends BaseController {
@ApiOperation(value = "销项发票表-分页列表查询", notes = "销项发票表-分页列表查询")
@RequestMapping(value = "/queryList")
public Result<IPage<BmsInvoiceListVO>> queryList(BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageNo", required=false) Integer pageNo,
@RequestParam(name="pageNum", required=false) Integer pageNum,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
// 前端分页参数名不统一(pageNum / pageNo),两个都兼容,优先 pageNo
int currentPage = pageNo != null ? pageNo : (pageNum != null ? pageNum : 1);
Result<IPage<BmsInvoiceListVO>> result = new Result<IPage<BmsInvoiceListVO>>();
Page<BmsInvoiceListVO> pageList = new Page<BmsInvoiceListVO>(pageNo,pageSize);
Page<BmsInvoiceListVO> pageList = new Page<BmsInvoiceListVO>(currentPage,pageSize);
pageList = bmsInvoiceListService.queryList(pageList, bmsInvoiceListQueryDTO);
result.setResult(pageList);
result.setSuccess(true);
@@ -10,7 +10,7 @@
where a.is_delete = 0
<include refid="common_where"></include>
group by a.id
order by a.create_time desc
order by a.create_time desc, a.id desc
</select>
<select id="getById" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO">
select