update 生成请求号

This commit is contained in:
2024-01-05 09:06:42 +08:00
parent 71d53b4a40
commit c72ff5263c
3 changed files with 9 additions and 5 deletions

View File

@@ -688,7 +688,9 @@ public class SpringBootTestController {
// 需要重新分账的订单信息(针对未分账的订单)
public JSONArray getPaymentList() {
String jsonArrayString = "[" +
"{\"orderCode\":\"C63360856004\", \"settleAmount\":\"5.0\", \"paymentId\":\"002212023091018053010546887138713763840\"}" +
"{\"orderCode\":\"C23291179484\", \"settleAmount\":\"66.09\", \"paymentId\":\"002212024010122074910587897947023601664\"}" +
"{\"orderCode\":\"C84659366830\", \"settleAmount\":\"62.61\", \"paymentId\":\"002212024010216321410588175885140078592\"}" +
"{\"orderCode\":\"C82908707086\", \"settleAmount\":\"79.70\", \"paymentId\":\"002212024010311020010588455166592036864\"}" +
"]";
return JSONArray.parseArray(jsonArrayString);
}
@@ -702,7 +704,7 @@ public class SpringBootTestController {
// TODO 获取默认结算账户如需分给对应商户就填写正确的汇付会员id
// AdapayMemberAccount adapayMemberAccount = adapayMemberAccountService.getDefault();
AdapayMemberAccount adapayMemberAccount = new AdapayMemberAccount();
adapayMemberAccount.setAdapayMemberId("ACM23489463");
adapayMemberAccount.setAdapayMemberId("ACM42016718");
for (int i = 0; i < paymentList.size(); i++) {
JSONObject jsonObject = (JSONObject) paymentList.get(i);
BigDecimal confirmAmt = jsonObject.getBigDecimal("settleAmount"); // 确认金额就是结算金额

View File

@@ -94,7 +94,7 @@ public class IdUtils {
public static void main(String[] args) {
Set<String> set = Sets.newHashSet();
for (int i = 0; i < 1000000; i++) {
String id = getOrderCode();
String id = get16UUID("PC");
set.add(id);
System.out.println(id);
}

View File

@@ -630,7 +630,8 @@ public class AdapayService {
memberParams.put("member_id", adapayMemberId);
memberParams.put("app_id", config.getAdapayAppId());
memberParams.put("order_no", "jsdk_order" + System.currentTimeMillis());
// memberParams.put("order_no", "jsdk_order" + System.currentTimeMillis());
memberParams.put("order_no", IdUtils.get16UUID("jsdk_order"));
memberParams.put("social_credit_code_expires", dto.getSocialCreditCodeExpires());
memberParams.put("business_scope", dto.getBusinessScope());
memberParams.put("name", dto.getBusinessName());
@@ -806,7 +807,8 @@ public class AdapayService {
memberParams.put("adapay_func_code", "corp_members.update");
memberParams.put("member_id", adapayMemberAccount.getAdapayMemberId());
memberParams.put("app_id", config.getAdapayAppId());
memberParams.put("order_no", "jsdk_order_" + System.currentTimeMillis());
// memberParams.put("order_no", "jsdk_order_" + System.currentTimeMillis());
memberParams.put("order_no", IdUtils.get16UUID("jsdk_order_"));
memberParams.put("social_credit_code_expires", dto.getSocialCreditCodeExpires());
memberParams.put("business_scope", dto.getBusinessScope());
memberParams.put("name", dto.getNickname());