分页修改
This commit is contained in:
parent
be53cf08c6
commit
91e25c8df9
|
|
@ -37,11 +37,10 @@ public class AppAccController extends BaseController {
|
||||||
|
|
||||||
@ApiOperation("分页查询账户充值记录")
|
@ApiOperation("分页查询账户充值记录")
|
||||||
@PostMapping({"/queryTradeAppPage"})
|
@PostMapping({"/queryTradeAppPage"})
|
||||||
public PageVO<AppAccTradePageVO> queryTradeAppPage(@RequestBody @Valid AppTradeDetailListDTO dto) {
|
public Page<AppAccTradePageVO> queryTradeAppPage(@RequestBody @Valid AppTradeDetailListDTO dto) {
|
||||||
try {
|
try {
|
||||||
PageMethod.startPage((int) dto.getCurrent(), (int) dto.getSize());
|
Page<AppAccTradePageVO> pages = this.appAccService.queryTradeAppPage(dto);
|
||||||
List<AppAccTradePageVO> list = this.appAccService.queryTradeAppPage(dto);
|
return pages;
|
||||||
return PageVO.of(list, list);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package com.bonus.core.account.v3.app.dto;
|
package com.bonus.core.account.v3.app.dto;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
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.bonus.core.pay.common.constants.PayStateEnum;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import java.util.List;
|
||||||
|
|
||||||
public interface AppAccService {
|
public interface AppAccService {
|
||||||
|
|
||||||
List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
|
Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto);
|
||||||
|
|
||||||
MobilePayVO accRechargeForApp(AccRechargeForAppDTO dto);
|
MobilePayVO accRechargeForApp(AccRechargeForAppDTO dto);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class AppAccServiceImpl implements AppAccService {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
|
public Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
|
||||||
dto.setTradeTypeList(AccTradeTypeEnum.getRechargeListForApp());
|
dto.setTradeTypeList(AccTradeTypeEnum.getRechargeListForApp());
|
||||||
dto.setPayStateList(dto.convertPayStateList());
|
dto.setPayStateList(dto.convertPayStateList());
|
||||||
return this.accTradeService.queryTradeAppPage(dto);
|
return this.accTradeService.queryTradeAppPage(dto);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface AccTradeMapper extends BaseMapper<AccTrade> {
|
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);
|
List<RepAccMqModel> listAccTradeForSend(@Param("tradeIdList") List<Long> tradeIdList);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
||||||
|
|
||||||
public interface AccTradeService extends IService<AccTrade> {
|
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);
|
Long insertAccTradeAndDetail(AccInfoVO accInfoVO, Integer tradeType, BigDecimal amount, String mchSn, List<AccWalletPayPO> walletPayList, Long orderNo, String remark, Integer payState, boolean updateWalletInfo);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,11 @@ public class AccTradeServiceImpl extends ServiceImpl<AccTradeMapper, AccTrade> i
|
||||||
private CustInfoApi custInfoApi;
|
private CustInfoApi custInfoApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
|
public Page<AppAccTradePageVO> queryTradeAppPage(AppTradeDetailListDTO dto) {
|
||||||
|
Page<AccTrade> page = new Page(dto.getCurrent(), dto.getSize());
|
||||||
return ((AccTradeMapper) this.baseMapper).queryTradeAppPage(dto);
|
Page<AppAccTradePageVO> pages = ((AccTradeMapper) this.baseMapper).queryTradeAppPage(page,dto);
|
||||||
|
pages.setTotal(((AccTradeMapper) this.baseMapper).queryTradeAppPage(page, dto).getTotal());
|
||||||
|
return pages;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public Long insertAccTradeAndDetail(AccInfoVO accInfoVO, Integer tradeType, BigDecimal amount, String mchSn, List<AccWalletPayPO> walletPayList, Long orderNo, String remark, Integer payState, boolean updateWalletInfo) {
|
public Long insertAccTradeAndDetail(AccInfoVO accInfoVO, Integer tradeType, BigDecimal amount, String mchSn, List<AccWalletPayPO> walletPayList, Long orderNo, String remark, Integer payState, boolean updateWalletInfo) {
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,6 @@ public class AllocCanteenController {
|
||||||
@PostMapping({"/list-avail-pay-type"})
|
@PostMapping({"/list-avail-pay-type"})
|
||||||
public AjaxResult listAvailPayTypeForApp(@RequestBody AllocCanteen bean) {
|
public AjaxResult listAvailPayTypeForApp(@RequestBody AllocCanteen bean) {
|
||||||
try {
|
try {
|
||||||
if (bean.getCanteenId() == null) {
|
|
||||||
return AjaxResult.error("食堂ID不能为空");
|
|
||||||
}
|
|
||||||
return AjaxResult.success(this.allocCanteenService.listAvailPayTypeForApp(bean.getCanteenId()));
|
return AjaxResult.success(this.allocCanteenService.listAvailPayTypeForApp(bean.getCanteenId()));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.toString(), e);
|
log.error(e.toString(), e);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.core.config.mybatisPlusConfig;
|
package com.bonus.core.config.mybatisPlusConfig;
|
||||||
|
|
||||||
import com.alipay.api.domain.PageInfo;
|
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.MybatisPlusInterceptor;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
@ -19,7 +20,8 @@ public class MybatisPlusPageConfig {
|
||||||
@Bean
|
@Bean
|
||||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
// 根据你的数据库类型设置
|
||||||
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||||
return interceptor;
|
return interceptor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Reference in New Issue