feat(channel-direct): douyin/wechat 直连商户实体/参数/结果/服务调整

This commit is contained in:
daxpay
2026-08-05 14:22:17 +08:00
parent 549a6c8c6b
commit 4ba092b48b
9 changed files with 26 additions and 5 deletions

View File

@@ -29,9 +29,13 @@ public class DouyinDirectChannelMerchant extends MchBaseEntity implements ToResu
/// 抖音商户号(MCHID)
private String dyMchId;
/// 转账场景ID(商家转账 transfer_scene_id, 未配置时发起转账报错)
private String transferScene;
/// 转换
@Override
public DouyinDirectChannelMerchantResult toResult() {
return DouyinDirectChannelMerchantConvert.CONVERT.toResult(this);
}
}

View File

@@ -31,4 +31,9 @@ public class DouyinDirectChannelMerchantCreateParam {
@Schema(description = "抖音商户号(MCHID)")
@NotBlank(message = "{validation.field.dyMchId.notBlank}")
private String dyMchId;
/// 转账场景ID(商家转账, 抖音转账时必填)
@Schema(description = "转账场景ID")
private String transferScene;
}

View File

@@ -22,4 +22,8 @@ public class DouyinDirectChannelMerchantResult extends MchBaseResult {
@Schema(description = "抖音商户号(MCHID)")
private String dyMchId;
@Schema(description = "转账场景ID(商家转账)")
private String transferScene;
}

View File

@@ -61,6 +61,7 @@ public class DouyinDirectChannelMerchantService {
entity.setChannelMchNo(channelMchNo);
entity.setProduct(param.getProduct());
entity.setDyMchId(param.getDyMchId());
entity.setTransferScene(param.getTransferScene());
douyinDirectChannelMerchantManager.save(entity);
}
@@ -74,3 +75,4 @@ public class DouyinDirectChannelMerchantService {
.orElseThrow(() -> new DataNotExistException("error.payment.channel.channelMerchantNotExist"));
}
}

View File

@@ -29,6 +29,9 @@ public class WechatDirectChannelMerchant extends MchBaseEntity implements ToResu
/// 微信直连商户号
private String wxMchId;
/// 转账场景ID(商家转账到零钱 transfer_scene, 未配置时发起转账报错)
private String transferScene;
/// 转换
@Override
public WechatDirectChannelMerchantResult toResult() {

View File

@@ -31,4 +31,8 @@ public class WechatDirectChannelMerchantCreateParam {
@Schema(description = "微信直连商户号")
@NotBlank(message = "{validation.field.wxMchId.notBlank}")
private String wxMchId;
/// 转账场景ID(商家转账到零钱, 微信转账时必填)
@Schema(description = "转账场景ID")
private String transferScene;
}

View File

@@ -24,4 +24,7 @@ public class WechatDirectChannelMerchantResult extends MchBaseResult {
@Schema(description = "微信直连商户号")
private String wxMchId;
@Schema(description = "转账场景ID(商家转账到零钱)")
private String transferScene;
}

View File

@@ -62,6 +62,7 @@ public class WechatDirectChannelMerchantService {
entity.setChannelMchNo(channelMchNo);
entity.setProduct(param.getProduct());
entity.setWxMchId(param.getWxMchId());
entity.setTransferScene(param.getTransferScene());
wechatDirectChannelMerchantManager.save(entity);
}

View File

@@ -19,11 +19,6 @@ import lombok.experimental.FieldNameConstants;
@Schema(title = "通道商户信息")
public class ChannelMerchantResult extends MchBaseResult {
/// 商户名称(由 mchNo 翻译, 走系统 @Trans 机制)
@Trans(entity = MerchantInfo.class, source = MchBaseResult.Fields.mchNo, result = MerchantInfo.Fields.mchName)
@Schema(description = "商户名称")
private String mchName;
/// 申请单ID
@Schema(description = "申请单ID")
private Long applyId;