fix(bms): 发票列表兼容pageNum/pageNo参数名,修复翻页始终返回第一页;排序补id兜底防翻页重复
This commit is contained in:
@@ -52,11 +52,14 @@ public class BmsInvoiceListApi extends BaseController {
|
|||||||
@ApiOperation(value = "销项发票表-分页列表查询", notes = "销项发票表-分页列表查询")
|
@ApiOperation(value = "销项发票表-分页列表查询", notes = "销项发票表-分页列表查询")
|
||||||
@RequestMapping(value = "/queryList")
|
@RequestMapping(value = "/queryList")
|
||||||
public Result<IPage<BmsInvoiceListVO>> queryList(BmsInvoiceListQueryDTO bmsInvoiceListQueryDTO,
|
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,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
|
// 前端分页参数名不统一(pageNum / pageNo),两个都兼容,优先 pageNo
|
||||||
|
int currentPage = pageNo != null ? pageNo : (pageNum != null ? pageNum : 1);
|
||||||
Result<IPage<BmsInvoiceListVO>> result = new Result<IPage<BmsInvoiceListVO>>();
|
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);
|
pageList = bmsInvoiceListService.queryList(pageList, bmsInvoiceListQueryDTO);
|
||||||
result.setResult(pageList);
|
result.setResult(pageList);
|
||||||
result.setSuccess(true);
|
result.setSuccess(true);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
where a.is_delete = 0
|
where a.is_delete = 0
|
||||||
<include refid="common_where"></include>
|
<include refid="common_where"></include>
|
||||||
group by a.id
|
group by a.id
|
||||||
order by a.create_time desc
|
order by a.create_time desc, a.id desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getById" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO">
|
<select id="getById" parameterType="java.lang.String" resultType="com.mhd.bms.domain.bmsInvoiceList.repository.vo.BmsInvoiceListDetailsVO">
|
||||||
select
|
select
|
||||||
|
|||||||
Reference in New Issue
Block a user