|
|
|
@ -22,6 +22,10 @@ public class CommonSubMerchantIdServiceImpl implements CommonSubMerchantIdServic
|
|
|
|
|
private MpPaymentApi mpPaymentApi;
|
|
|
|
|
@Override
|
|
|
|
|
public void save(JSONObject record) {
|
|
|
|
|
JSONObject sub_merchant_id = commonSubMerchantIdMapper.find(record.getString("sub_merchant_id"));
|
|
|
|
|
if(sub_merchant_id!=null){
|
|
|
|
|
throw new BadRequestException("当前商户号已经添加,请重新输入");
|
|
|
|
|
}
|
|
|
|
|
WeChatPayConfig.Merchant availableMerchant = mpPaymentApi.determineMerchant(record.getString("sub_merchant_id"));
|
|
|
|
|
if(availableMerchant == null){
|
|
|
|
|
throw new BadRequestException("未检索到对应的商户号,请验证子商户号是否正确");
|
|
|
|
|