mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-08 06:05:33 +08:00
refactor(merchant): 默认应用/门店名称改用商户简称拼接
创建商户时(运营端创建 + 商户自助注册), 默认应用名与默认门店名 由 mchName(全称) 改为 mchShortName(简称) 拼接 i18n 模板, 名称更简短; 同步更新 createDefaultApp/createDefaultStore 形参名与注释为 mchShortName, 保持语义一致。
This commit is contained in:
@@ -121,9 +121,9 @@ public class MerchantAdminService {
|
||||
this.createMerchantAdmin(param, merchant);
|
||||
merchantInfoManager.save(merchant);
|
||||
// 创建默认应用(名称按请求语言)
|
||||
mchAppInfoService.createDefaultApp(merchant.getMchNo(), merchant.getMchName());
|
||||
mchAppInfoService.createDefaultApp(merchant.getMchNo(), merchant.getMchShortName());
|
||||
// 创建默认门店(名称按请求语言)
|
||||
mchStoreInfoService.createDefaultStore(merchant.getMchNo(), merchant.getMchName(), param.getPhone());
|
||||
mchStoreInfoService.createDefaultStore(merchant.getMchNo(), merchant.getMchShortName(), param.getPhone());
|
||||
}
|
||||
|
||||
/// 创建商户管理员
|
||||
|
||||
@@ -85,12 +85,12 @@ public class MchAppInfoService {
|
||||
|
||||
/// 为商户创建默认应用(启用 + defaultApp=true;名称按当前请求语言生成)
|
||||
///
|
||||
/// @param mchNo 商户号
|
||||
/// @param mchName 商户名称(用于生成默认应用名)
|
||||
public void createDefaultApp(String mchNo, String mchName) {
|
||||
/// @param mchNo 商户号
|
||||
/// @param mchShortName 商户简称(用于生成默认应用名)
|
||||
public void createDefaultApp(String mchNo, String mchShortName) {
|
||||
MchAppInfo mchApp = new MchAppInfo();
|
||||
// 默认应用名称(payment.merchant.defaultAppName,{0}=商户名)
|
||||
mchApp.setAppName(I18nUtil.get("payment.merchant.defaultAppName", mchName));
|
||||
// 默认应用名称(payment.merchant.defaultAppName,{0}=商户简称)
|
||||
mchApp.setAppName(I18nUtil.get("payment.merchant.defaultAppName", mchShortName));
|
||||
mchApp.setDefaultApp(true);
|
||||
mchApp.setStatus(MchAppStatusEnum.ENABLE.getCode());
|
||||
mchApp.setAppId(this.generateAppId());
|
||||
|
||||
@@ -73,12 +73,12 @@ public class MchStoreInfoService {
|
||||
/// 为商户创建默认门店(启用 + defaultStore=true;名称按当前请求语言生成)
|
||||
///
|
||||
/// @param mchNo 商户号
|
||||
/// @param mchName 商户名称(用于生成默认门店名)
|
||||
/// @param mchShortName 商户简称(用于生成默认门店名)
|
||||
/// @param contactPhone 联系电话(可空)
|
||||
public void createDefaultStore(String mchNo, String mchName, String contactPhone) {
|
||||
public void createDefaultStore(String mchNo, String mchShortName, String contactPhone) {
|
||||
MchStoreInfo store = new MchStoreInfo();
|
||||
// 默认门店名称(payment.merchant.defaultStoreName,{0}=商户名)
|
||||
store.setStoreName(I18nUtil.get("payment.merchant.defaultStoreName", mchName));
|
||||
// 默认门店名称(payment.merchant.defaultStoreName,{0}=商户简称)
|
||||
store.setStoreName(I18nUtil.get("payment.merchant.defaultStoreName", mchShortName));
|
||||
store.setContactPhone(contactPhone);
|
||||
store.setStatus(StoreStatusEnum.ENABLE.getCode());
|
||||
store.setDefaultStore(true);
|
||||
|
||||
@@ -77,9 +77,9 @@ public class MerchantUserService {
|
||||
this.createMerchantAdmin(param, merchant);
|
||||
merchantInfoManager.save(merchant);
|
||||
// 创建默认应用(名称按请求语言)
|
||||
mchAppInfoService.createDefaultApp(merchant.getMchNo(), merchant.getMchName());
|
||||
mchAppInfoService.createDefaultApp(merchant.getMchNo(), merchant.getMchShortName());
|
||||
// 创建默认门店(名称按请求语言)
|
||||
mchStoreInfoService.createDefaultStore(merchant.getMchNo(), merchant.getMchName(), param.getPhone());
|
||||
mchStoreInfoService.createDefaultStore(merchant.getMchNo(), merchant.getMchShortName(), param.getPhone());
|
||||
}
|
||||
|
||||
/// 创建商户管理员
|
||||
|
||||
Reference in New Issue
Block a user