refactor(merchant): 默认应用/门店名称改用商户简称拼接

创建商户时(运营端创建 + 商户自助注册), 默认应用名与默认门店名
由 mchName(全称) 改为 mchShortName(简称) 拼接 i18n 模板, 名称更简短;
同步更新 createDefaultApp/createDefaultStore 形参名与注释为 mchShortName,
保持语义一致。
This commit is contained in:
DaxPay Dev
2026-07-20 13:22:25 +08:00
parent e8f5e785c3
commit 51a5d802cb
4 changed files with 13 additions and 13 deletions

View File

@@ -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());
}
/// 创建商户管理员

View File

@@ -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());

View File

@@ -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);

View File

@@ -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());
}
/// 创建商户管理员