From 069e929bfec45c596cee0b0ac808fd387480f161 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 24 Aug 2022 14:50:41 +0800 Subject: [PATCH] // test --- .../WxProfitSharingReceiverApplyController.java | 2 +- .../pay/impl/TtPayServiceApacheHttpImpl.java | 16 +++++++++------- .../WxProfitSharingReceiverApplyServiceImpl.java | 2 +- .../service/share/douyin/TtPayShareService.java | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java index 83ddc5cdb..5b830c0b0 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java @@ -162,7 +162,7 @@ public class WxProfitSharingReceiverApplyController extends BaseController { } receiverAdd.updateTenantInfo(getTenantInfo()); if(receiverAdd.getId() == null){ - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空"); + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); } return wxProfitSharingReceiverApplyService.applyment(receiverAdd); } diff --git a/mallinkService/src/main/java/com/iformall/douyin/pay/impl/TtPayServiceApacheHttpImpl.java b/mallinkService/src/main/java/com/iformall/douyin/pay/impl/TtPayServiceApacheHttpImpl.java index 0eeef429e..2479959d2 100644 --- a/mallinkService/src/main/java/com/iformall/douyin/pay/impl/TtPayServiceApacheHttpImpl.java +++ b/mallinkService/src/main/java/com/iformall/douyin/pay/impl/TtPayServiceApacheHttpImpl.java @@ -10,6 +10,7 @@ import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpRequestBase; +import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.util.EntityUtils; @@ -119,13 +120,14 @@ public class TtPayServiceApacheHttpImpl extends BaseTtPayServiceImpl { } private StringEntity createEntry(String requestStr) { - try { - return new StringEntity(new String(requestStr.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8)); - } catch (UnsupportedEncodingException e) { - //cannot happen - this.log.error(e.getMessage(), e); - return null; - } + return new StringEntity(requestStr, ContentType.create("application/json", "utf-8")); +// try { +// return new StringEntity(new String(requestStr.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8)); +// } catch (UnsupportedEncodingException e) { +// //cannot happen +// this.log.error(e.getMessage(), e); +// return null; +// } } private HttpPost createHttpPost(String url, String requestStr) { diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java index c9c9fe600..fea88953d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java @@ -1287,7 +1287,7 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR if(!mediaIds.isEmpty()){ settlementInfo.setQualifications(mediaIds); } - settlementInfo.setActivitiesId(settlementInfoObject.getString("settlement_id")); + settlementInfo.setActivitiesId(settlementInfoObject.getString("activities_id")); settlementInfo.setActivitiesRate(settlementInfoObject.getString("activities_rate")); JSONArray activities_additions = settlementInfoObject.getJSONArray("activities_additions"); List mediaIds1 = this.getMerchantMediaIds(activities_additions); diff --git a/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java b/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java index 9ad25bf65..5790e2732 100644 --- a/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java +++ b/mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java @@ -119,7 +119,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ record.setOutSettleNo(record.getOutSettleNo() + 1l); } request.setOutSettleNo(record.getOutSettleNo().toString()); - request.setSettleDesc("mall_reciver_share"); + request.setSettleDesc("完结分账"); String settleId = ttPayService.getProfitSharingV2Service().profitSharing(request); return new PayShareResult(true, null,"success", null,settleId); } catch (TtPayException e) { @@ -171,7 +171,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ record.setOutSettleNo(record.getOutSettleNo() + 1l); } request.setOutSettleNo(record.getOutSettleNo().toString()); - request.setSettleDesc("merchant_reciver_share"); + request.setSettleDesc("完结分账"); List list = new ArrayList<>(); for (Object o: receivers) { JSONObject jo = (JSONObject) o;