feat: 添加服务商支付模式

1. 添加服务商模式标识字段
    2. 添加服务商相关字段
    3. 添加子商户相关字段
    4. 创建索引以提高查询性能
    5. 添加注释说明
This commit is contained in:
2025-07-01 11:39:43 +08:00
parent 1f47d7e9fe
commit 85a03da606
12 changed files with 1477 additions and 148 deletions
@@ -25,12 +25,12 @@ public class WechatConfig {
private String type;
/**
* 商户ID
* 商户ID(普通商户模式使用)
*/
private String merchantId;
/**
* 应用ID
* 应用ID(普通商户模式使用)
*/
private String appId;
@@ -118,4 +118,41 @@ public class WechatConfig {
* 备注
*/
private String remark;
// ========== 服务商模式新增字段 ==========
/**
* 是否服务商模式:0-普通商户,1-服务商
*/
private Boolean isServiceMode;
/**
* 服务商应用ID
*/
private String serviceAppId;
/**
* 服务商商户号
*/
private String serviceMchId;
/**
* 子商户号(服务商模式下的子商户)
*/
private String subMchId;
/**
* 子商户应用ID(服务商模式下的子商户应用)
*/
private String subAppId;
/**
* 子商户名称
*/
private String subMchName;
/**
* 子商户描述
*/
private String subMchDescription;
}
@@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* @author zlt
*/
@@ -29,4 +31,32 @@ public interface WechatConfigService {
@GetMapping(value = "/wechat/config/serial/{serialNumber}")
WechatConfig getConfigBySerialNumber(@PathVariable("serialNumber") String serialNumber);
// ========== 服务商模式新增方法 ==========
/**
* 获取服务商配置
*
* @param tenantId 租户ID
* @return 服务商配置
*/
@GetMapping(value = "/wechat/config/service/{tenantId}")
WechatConfig getServiceConfig(@PathVariable("tenantId") String tenantId);
/**
* 根据子商户号获取配置
*
* @param subMchId 子商户号
* @return 微信配置
*/
@GetMapping(value = "/wechat/config/sub/{subMchId}")
WechatConfig getConfigBySubMchId(@PathVariable("subMchId") String subMchId);
/**
* 获取指定服务商下的所有子商户配置
*
* @param serviceMchId 服务商商户号
* @return 子商户配置列表
*/
@GetMapping(value = "/wechat/config/submerchants/{serviceMchId}")
List<WechatConfig> getSubMerchantConfigs(@PathVariable("serviceMchId") String serviceMchId);
}