分页修改

This commit is contained in:
tqzhang 2025-02-18 11:06:56 +08:00
parent be53cf08c6
commit 91e25c8df9
9 changed files with 16 additions and 16 deletions

View File

@ -37,11 +37,10 @@ public class AppAccController extends BaseController {
@ApiOperation("分页查询账户充值记录")
@PostMapping({"/queryTradeAppPage"})
public PageVO<AppAccTradePageVO> queryTradeAppPage(@RequestBody @Valid AppTradeDetailListDTO dto) {
public Page<AppAccTradePageVO> queryTradeAppPage(@RequestBody @Valid AppTradeDetailListDTO dto) {
try {
PageMethod.startPage((int) dto.getCurrent(), (int) dto.getSize());
List<AppAccTradePageVO> list = this.appAccService.queryTradeAppPage(dto);
return PageVO.of(list, list);
Page<AppAccTradePageVO> pages = this.appAccService.queryTradeAppPage(dto);
return pages;
} catch (Exception e) {
log.error(e.toString(), e);
return null;

View File

@ -1,7 +1,7 @@
package com.bonus.core.account.v3.app.dto;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
import com.bonus.core.common.page.PageDTO;
import com.bonus.core.pay.common.constants.PayStateEnum;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;

View File

@ -11,7 +11,7 @@ import java.util.List;
public interface AppAccService {
List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
MobilePayVO accRechargeForApp(AccRechargeForAppDTO dto);

View File

@ -81,7 +81,7 @@ public class AppAccServiceImpl implements AppAccService {
@Override
public List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
public Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
dto.setTradeTypeList(AccTradeTypeEnum.getRechargeListForApp());
dto.setPayStateList(dto.convertPayStateList());
return this.accTradeService.queryTradeAppPage(dto);

View File

@ -16,7 +16,7 @@ import java.util.List;
@Mapper
public interface AccTradeMapper extends BaseMapper<AccTrade> {
List<AppAccTradePageVO> queryTradeAppPage(@Param("infoParam") AppTradeDetailListDTO dto);
Page<AppAccTradePageVO> queryTradeAppPage(Page<AccTrade> page,@Param("infoParam") AppTradeDetailListDTO dto);
List<RepAccMqModel> listAccTradeForSend(@Param("tradeIdList") List<Long> tradeIdList);

View File

@ -18,7 +18,7 @@ import java.util.List;
public interface AccTradeService extends IService<AccTrade> {
List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
Long insertAccTradeAndDetail(AccInfoVO accInfoVO, Integer tradeType, BigDecimal amount, String mchSn, List<AccWalletPayPO> walletPayList, Long orderNo, String remark, Integer payState, boolean updateWalletInfo);

View File

@ -65,9 +65,11 @@ public class AccTradeServiceImpl extends ServiceImpl<AccTradeMapper, AccTrade> i
private CustInfoApi custInfoApi;
@Override
public List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
return ((AccTradeMapper) this.baseMapper).queryTradeAppPage(dto);
public Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
Page<AccTrade> page = new Page(dto.getCurrent(), dto.getSize());
Page<AppAccTradePageVO> pages = ((AccTradeMapper) this.baseMapper).queryTradeAppPage(page,dto);
pages.setTotal(((AccTradeMapper) this.baseMapper).queryTradeAppPage(page, dto).getTotal());
return pages;
}
@Override
public Long insertAccTradeAndDetail(AccInfoVO accInfoVO, Integer tradeType, BigDecimal amount, String mchSn, List<AccWalletPayPO> walletPayList, Long orderNo, String remark, Integer payState, boolean updateWalletInfo) {

View File

@ -37,9 +37,6 @@ public class AllocCanteenController {
@PostMapping({"/list-avail-pay-type"})
public AjaxResult listAvailPayTypeForApp(@RequestBody AllocCanteen bean) {
try {
if (bean.getCanteenId() == null) {
return AjaxResult.error("食堂ID不能为空");
}
return AjaxResult.success(this.allocCanteenService.listAvailPayTypeForApp(bean.getCanteenId()));
} catch (Exception e) {
log.error(e.toString(), e);

View File

@ -1,6 +1,7 @@
package com.bonus.core.config.mybatisPlusConfig;
import com.alipay.api.domain.PageInfo;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
@ -19,7 +20,8 @@ public class MybatisPlusPageConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
// 根据你的数据库类型设置
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}