# Conflicts:
#	yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java
This commit is contained in:
YunaiV 2024-03-30 16:59:46 +08:00
commit c78519c6aa

View File

@ -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;
@ -89,9 +90,10 @@ public class PayAppController {
return success(PageResult.empty()); return success(PageResult.empty());
} }
// 得到所有的应用编号查出所有的渠道 // 得到所有的应用编号查出所有的渠道并移除未启用的渠道
Collection<Long> appIds = convertList(pageResult.getList(), PayAppDO::getId); List<PayChannelDO> channels = channelService.getChannelListByAppIds(
List<PayChannelDO> channels = channelService.getChannelListByAppIds(appIds); convertList(pageResult.getList(), PayAppDO::getId));
channels.removeIf(channel -> !CommonStatusEnum.ENABLE.getStatus().equals(channel.getStatus()));
// 拼接后返回 // 拼接后返回
return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels)); return success(PayAppConvert.INSTANCE.convertPage(pageResult, channels));