fix(pay):后台支付应用信息列表关闭某一渠道,但是任然显示为开启状态
This commit is contained in:
parent
10bfbc9e6e
commit
03e3dc0121
|
@ -1,6 +1,7 @@
|
||||||
package cn.iocoder.yudao.module.pay.controller.admin.app;
|
package cn.iocoder.yudao.module.pay.controller.admin.app;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||||
|
@ -92,6 +93,8 @@ public class PayAppController {
|
||||||
// 得到所有的应用编号,查出所有的渠道
|
// 得到所有的应用编号,查出所有的渠道
|
||||||
Collection<Long> appIds = convertList(pageResult.getList(), PayAppDO::getId);
|
Collection<Long> appIds = convertList(pageResult.getList(), PayAppDO::getId);
|
||||||
List<PayChannelDO> channels = channelService.getChannelListByAppIds(appIds);
|
List<PayChannelDO> channels = channelService.getChannelListByAppIds(appIds);
|
||||||
|
// 移除未启用的渠道
|
||||||
|
channels.removeIf(channel -> !CommonStatusEnum.ENABLE.getStatus().equals(channel.getStatus()));
|
||||||
|
|
||||||
// 拼接后返回
|
// 拼接后返回
|
||||||
return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels));
|
return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels));
|
||||||
|
|
Loading…
Reference in New Issue