mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-12 23:45:39 +08:00
refactor: 移除冗余的实体 setId(IdUtil.getSnowflakeNextId()) 手动ID分配
This commit is contained in:
@@ -40,7 +40,6 @@ public class AlipayDirectChannelMerchantService {
|
||||
String channelMchNo = String.valueOf(IdUtil.getSnowflakeNextId());
|
||||
// 写通用通道商户主表
|
||||
ChannelMerchant channelMerchant = new ChannelMerchant();
|
||||
channelMerchant.setId(IdUtil.getSnowflakeNextId());
|
||||
channelMerchant.setMchNo(param.getMchNo());
|
||||
channelMerchant.setChannelMchNo(channelMchNo);
|
||||
channelMerchant.setChannelMerchantName(param.getChannelMerchantName());
|
||||
@@ -50,7 +49,6 @@ public class AlipayDirectChannelMerchantService {
|
||||
channelMerchantManager.save(channelMerchant);
|
||||
// 写直连绑定表(alipayUserId 作为业务字段, 不参与关联)
|
||||
AlipayDirectChannelMerchant entity = new AlipayDirectChannelMerchant();
|
||||
entity.setId(IdUtil.getSnowflakeNextId());
|
||||
entity.setMchNo(param.getMchNo());
|
||||
entity.setChannelMchNo(channelMchNo);
|
||||
entity.setProduct(param.getProduct());
|
||||
|
||||
@@ -46,7 +46,6 @@ public class AlipayIsvChannelMerchantService {
|
||||
String channelMchNo = "AISV" + IdUtil.getSnowflakeNextId();
|
||||
// 写通用通道商户主表
|
||||
ChannelMerchant channelMerchant = new ChannelMerchant();
|
||||
channelMerchant.setId(IdUtil.getSnowflakeNextId());
|
||||
channelMerchant.setMchNo(param.getMchNo());
|
||||
channelMerchant.setChannelMchNo(channelMchNo);
|
||||
channelMerchant.setChannelMerchantName(param.getChannelMerchantName());
|
||||
@@ -56,7 +55,6 @@ public class AlipayIsvChannelMerchantService {
|
||||
channelMerchantManager.save(channelMerchant);
|
||||
// 写服务商绑定表(含挂靠关系专属字段)
|
||||
AlipayIsvChannelMerchant entity = new AlipayIsvChannelMerchant();
|
||||
entity.setId(IdUtil.getSnowflakeNextId());
|
||||
entity.setMchNo(param.getMchNo());
|
||||
entity.setChannelMchNo(channelMchNo);
|
||||
entity.setProduct(param.getProduct());
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.dromara.daxpay.payment.pay.service.masterdata.channel.PayChannelMaste
|
||||
import org.dromara.daxpay.payment.pay.result.masterdata.channel.PayChannelResult;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -219,9 +218,7 @@ public class OnbMchApplyService {
|
||||
var channelMch = new ChannelMerchant();
|
||||
channelMch.setApplyId(mchApply.getId())
|
||||
.setSource(ChannelMerchantSourceEnum.APPLY.getCode())
|
||||
.setMchNo(mchApply.getMchNo())
|
||||
|
||||
.setId(IdUtil.getSnowflakeNextId());
|
||||
.setMchNo(mchApply.getMchNo());
|
||||
mchApply.setStatus(OnbApplyStatusEnum.GENERATED.getCode());
|
||||
// 调用策略处理通道商户处理后并保存
|
||||
var strategy = OnbStrategyFactory.create(mchApply.getChannel(), AbsChannelMerchantStrategy.class);
|
||||
|
||||
Reference in New Issue
Block a user