修复:企业产品配置问题

This commit is contained in:
liu
2025-07-14 17:24:38 +08:00
parent 283abf45cb
commit 8f808926bc
3 changed files with 15 additions and 7 deletions

View File

@ -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;
/**

View File

@ -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<BusChannelProductVo> 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{

View File

@ -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,