admin后台可关联商户

This commit is contained in:
六如
2025-08-18 08:09:26 +08:00
parent c8ae961b0e
commit 933612bad3

View File

@@ -28,10 +28,7 @@ public class IsvMerchantService extends BaseLambdaService<IsvMerchant, IsvMercha
}
public int setMerchant(String appId, String merchantCode) {
// 检查商户code是否存在需要开发者自行实现
if (!checkMerchantCode(merchantCode)) {
throw new BizException("商户(" + merchantCode + ")不存在");
}
checkMerchantCode(merchantCode);
IsvMerchant isvMerchant = this.get(IsvMerchant::getAppId, appId);
if (isvMerchant == null) {
@@ -45,7 +42,15 @@ public class IsvMerchantService extends BaseLambdaService<IsvMerchant, IsvMercha
}
}
private boolean checkMerchantCode(String merchantCode) {
private void checkMerchantCode(String merchantCode) {
// 检查商户code是否合法不合法抛出 new BizException();
boolean exist = checkMerchantExist(merchantCode);
if (!exist) {
throw new BizException("商户不存在");
}
}
private boolean checkMerchantExist(String merchantCode) {
return true;
}