mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-11-13 17:56:09 +08:00
admin后台可关联商户
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user