|
|
@ -13,6 +13,7 @@ import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
|
|
|
|
import au.com.royalpay.payment.manage.mappers.system.SysWxMerchantApplyMapper;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
|
|
|
|
import au.com.royalpay.payment.tools.threadpool.RoyalThreadPoolExecutor;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.yeepay.shade.org.apache.commons.lang3.StringUtils;
|
|
|
|
import com.yeepay.shade.org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
@ -52,6 +53,8 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
@Resource
|
|
|
|
@Resource
|
|
|
|
private SysWxMerchantApplyMapper sysWxMerchantApplyMapper;
|
|
|
|
private SysWxMerchantApplyMapper sysWxMerchantApplyMapper;
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private RoyalThreadPoolExecutor royalThreadPoolExecutor;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -170,6 +173,7 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void registerWechatMerchant() {
|
|
|
|
public void registerWechatMerchant() {
|
|
|
|
|
|
|
|
royalThreadPoolExecutor.execute(() -> {
|
|
|
|
List<JSONObject> apClients = clientMapper.findApClient();
|
|
|
|
List<JSONObject> apClients = clientMapper.findApClient();
|
|
|
|
apClients.forEach(client -> {
|
|
|
|
apClients.forEach(client -> {
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
@ -195,11 +199,12 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
throw new BadRequestException(elem.elementText("return_msg"));
|
|
|
|
throw new BadRequestException(elem.elementText("return_msg"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject registerRangeAlipayOnlineMerchant(int start, int end) {
|
|
|
|
public void registerRangeAlipayOnlineMerchant(int start, int end) {
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
royalThreadPoolExecutor.execute(() -> {
|
|
|
|
List<String> needRegisterMerchant = new ArrayList<>();
|
|
|
|
List<String> needRegisterMerchant = new ArrayList<>();
|
|
|
|
List<String> registerSuccessMerchant = new ArrayList<>();
|
|
|
|
List<String> registerSuccessMerchant = new ArrayList<>();
|
|
|
|
List<JSONObject> registerFailMerchant = new ArrayList<>();
|
|
|
|
List<JSONObject> registerFailMerchant = new ArrayList<>();
|
|
|
@ -249,16 +254,12 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
registerFailMerchant.add(exception);
|
|
|
|
registerFailMerchant.add(exception);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
result.put("need_register_merchant", needRegisterMerchant);
|
|
|
|
});
|
|
|
|
result.put("success_register_merchant", registerSuccessMerchant);
|
|
|
|
|
|
|
|
result.put("fail_register_merchant", registerFailMerchant);
|
|
|
|
|
|
|
|
result.put("less_info_merchant", lessInfoMerchant);
|
|
|
|
|
|
|
|
logger.info("-------AlipayOnline Gms end----fail_register_merchant" + registerFailMerchant.toString());
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject registerAlipayMerchant() {
|
|
|
|
public void registerAlipayMerchant() {
|
|
|
|
|
|
|
|
royalThreadPoolExecutor.execute(() -> {
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
List<String> needRegisterMerchant = new ArrayList<>();
|
|
|
|
List<String> needRegisterMerchant = new ArrayList<>();
|
|
|
|
List<String> registerSuccessMerchant = new ArrayList<>();
|
|
|
|
List<String> registerSuccessMerchant = new ArrayList<>();
|
|
|
@ -297,7 +298,7 @@ public class AliforexcelServiceImpl implements AliforexcelService {
|
|
|
|
result.put("success_register_merchant", registerSuccessMerchant);
|
|
|
|
result.put("success_register_merchant", registerSuccessMerchant);
|
|
|
|
result.put("fail_register_merchant", registerFailMerchant);
|
|
|
|
result.put("fail_register_merchant", registerFailMerchant);
|
|
|
|
result.put("less_info_merchant", lessInfoMerchant);
|
|
|
|
result.put("less_info_merchant", lessInfoMerchant);
|
|
|
|
return result;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|