From 8f808926bc305b1da11759d50af9576d78222166 Mon Sep 17 00:00:00 2001 From: liu <1085918938@qq.com> Date: Mon, 14 Jul 2025 17:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=85=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/bo/BusMerchantProductBo.java | 2 +- .../impl/BusMerchantProductServiceImpl.java | 18 +++++++++++++----- .../channel/BusChannelProductMapper.xml | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/domain/bo/BusMerchantProductBo.java b/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/domain/bo/BusMerchantProductBo.java index 095b505..5aa0add 100644 --- a/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/domain/bo/BusMerchantProductBo.java +++ b/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/domain/bo/BusMerchantProductBo.java @@ -77,7 +77,7 @@ public class BusMerchantProductBo extends BaseEntity { /** * 代理商服务费率(%) */ - @NotNull(message = "代理商服务费率(%)不能为空", groups = { AddGroup.class, EditGroup.class }) + @NotNull(message = "运营商或上级代理商服务费率(%)不能为空", groups = { AddGroup.class, EditGroup.class }) private BigDecimal costServiceCharge; /** diff --git a/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/service/impl/BusMerchantProductServiceImpl.java b/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/service/impl/BusMerchantProductServiceImpl.java index 0eae84f..4587c67 100644 --- a/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/service/impl/BusMerchantProductServiceImpl.java +++ b/ruoyi-modules/ruoyi-payment/src/main/java/org/dromara/payment/merchant/service/impl/BusMerchantProductServiceImpl.java @@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.RequiredArgsConstructor; import org.dromara.common.satoken.utils.LoginHelper; +import org.dromara.payment.bill.domain.MerBill; import org.dromara.payment.channel.domain.vo.BusChannelProductVo; import org.dromara.payment.channel.mapper.BusChannelProductMapper; import org.dromara.payment.merchant.domain.BusMerchant; @@ -195,8 +196,12 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe } boListStr = map.getJSONArray("boList").toJSONString(); Map paraMap = new HashMap(); - paraMap.put("channel_no", LoginHelper.getNo()); + BusMerchant busMerchant = busMerchantMapper.selectById(mer_id); + if(busMerchant != null){ + paraMap.put("channel_no", busMerchant.getAgentNo()); + } paraMap.put("bus_type",bus_type); + paraMap.put("pro_status",1); List agentList = this.busChannelProductMapper.selectAgentProInfos(paraMap); if(agentList.size() == 0){ this.invalidationParamsException("当前代理商未配置产品"); @@ -206,9 +211,9 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe for(BusMerchantProductBo vo :voList){ SysSyd sysSyd = sydMapper.selectSysSydById(vo.getSydId()); log.info("sydId:"+sysSyd.getId()+"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - SysThirdPlatform sysThirdPlatform = thirdPlatformMapper.selectThirdAppInfo(sysSyd.getId()); + SysThirdPlatform sysThirdPlatform = thirdPlatformMapper.selectThirdAppInfo(sysSyd.getThreeId()); if (ObjectUtils.isNotEmpty(sysThirdPlatform)&&sysThirdPlatform.getPlatformName().equals("薪遇见")){ - BusMerchant busMerchant = busMerchantMapper.selectById(mer_id); + xyjService.addMerchant(busMerchant,vo.getSydId()); } BusChannelProductVo agentVo = agentList.stream().filter(t -> t.getProNo().equals(vo.getProNo())).findFirst().orElse(null); @@ -226,17 +231,20 @@ public class BusMerchantProductServiceImpl extends BaseService implements IBusMe vo.setChannelNo(agentVo.getChannelNo()); vo.setMaxMonth(agentVo.getMaxMonth()); // vo.setInvoiceItems(agentVo.getInvoiceItems()); - vo.setCostServiceCharge(agentVo.getServiceCharge()); + vo.setCostServiceCharge(agentVo.getCostServiceCharge()); // ValidatorUtils.validate(vo, AddGroup.class); if(vo.getServiceCharge() != null && vo.getServiceCharge().compareTo(vo.getCostServiceCharge()) < 0){ vo.setServiceCharge(vo.getCostServiceCharge()); + }else{ + vo.setServiceCharge(vo.getServiceCharge()); } vo.setBusType(bus_type); vo.setMerId(mer_id); if(vo.getId() != null){ vo.setMdyServiceCharge(vo.getServiceCharge()); - vo.setServiceCharge(null); + BusMerchantProduct busMerchantProduct = this.baseMapper.selectById(vo.getId()); + vo.setServiceCharge(busMerchantProduct.getServiceCharge()); BusMerchantProduct update = MapstructUtils.convert(vo, BusMerchantProduct.class); insertList.add(update); }else{ diff --git a/ruoyi-modules/ruoyi-payment/src/main/resources/mapper/payment/channel/BusChannelProductMapper.xml b/ruoyi-modules/ruoyi-payment/src/main/resources/mapper/payment/channel/BusChannelProductMapper.xml index b2dc30c..50a345a 100644 --- a/ruoyi-modules/ruoyi-payment/src/main/resources/mapper/payment/channel/BusChannelProductMapper.xml +++ b/ruoyi-modules/ruoyi-payment/src/main/resources/mapper/payment/channel/BusChannelProductMapper.xml @@ -14,7 +14,7 @@ t4.NO syd_no, t4.gsmc service_name, t1.bus_type, - t1.service_charge cost_service_charge, + t2.cost_service_charge cost_service_charge, t2.service_charge, t1.charge_mode, t1.settlement_style,