| @@ -162,7 +162,7 @@ public class WxProfitSharingReceiverApplyController extends BaseController { | |||||
| } | } | ||||
| receiverAdd.updateTenantInfo(getTenantInfo()); | receiverAdd.updateTenantInfo(getTenantInfo()); | ||||
| if(receiverAdd.getId() == null){ | 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); | return wxProfitSharingReceiverApplyService.applyment(receiverAdd); | ||||
| } | } | ||||
| @@ -10,6 +10,7 @@ import org.apache.http.client.methods.CloseableHttpResponse; | |||||
| import org.apache.http.client.methods.HttpGet; | import org.apache.http.client.methods.HttpGet; | ||||
| import org.apache.http.client.methods.HttpPost; | import org.apache.http.client.methods.HttpPost; | ||||
| import org.apache.http.client.methods.HttpRequestBase; | import org.apache.http.client.methods.HttpRequestBase; | ||||
| import org.apache.http.entity.ContentType; | |||||
| import org.apache.http.entity.StringEntity; | import org.apache.http.entity.StringEntity; | ||||
| import org.apache.http.impl.client.CloseableHttpClient; | import org.apache.http.impl.client.CloseableHttpClient; | ||||
| import org.apache.http.util.EntityUtils; | import org.apache.http.util.EntityUtils; | ||||
| @@ -119,13 +120,14 @@ public class TtPayServiceApacheHttpImpl extends BaseTtPayServiceImpl { | |||||
| } | } | ||||
| private StringEntity createEntry(String requestStr) { | 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) { | private HttpPost createHttpPost(String url, String requestStr) { | ||||
| @@ -1287,7 +1287,7 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR | |||||
| if(!mediaIds.isEmpty()){ | if(!mediaIds.isEmpty()){ | ||||
| settlementInfo.setQualifications(mediaIds); | settlementInfo.setQualifications(mediaIds); | ||||
| } | } | ||||
| settlementInfo.setActivitiesId(settlementInfoObject.getString("settlement_id")); | |||||
| settlementInfo.setActivitiesId(settlementInfoObject.getString("activities_id")); | |||||
| settlementInfo.setActivitiesRate(settlementInfoObject.getString("activities_rate")); | settlementInfo.setActivitiesRate(settlementInfoObject.getString("activities_rate")); | ||||
| JSONArray activities_additions = settlementInfoObject.getJSONArray("activities_additions"); | JSONArray activities_additions = settlementInfoObject.getJSONArray("activities_additions"); | ||||
| List<String> mediaIds1 = this.getMerchantMediaIds(activities_additions); | List<String> mediaIds1 = this.getMerchantMediaIds(activities_additions); | ||||
| @@ -119,7 +119,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ | |||||
| record.setOutSettleNo(record.getOutSettleNo() + 1l); | record.setOutSettleNo(record.getOutSettleNo() + 1l); | ||||
| } | } | ||||
| request.setOutSettleNo(record.getOutSettleNo().toString()); | request.setOutSettleNo(record.getOutSettleNo().toString()); | ||||
| request.setSettleDesc("mall_reciver_share"); | |||||
| request.setSettleDesc("完结分账"); | |||||
| String settleId = ttPayService.getProfitSharingV2Service().profitSharing(request); | String settleId = ttPayService.getProfitSharingV2Service().profitSharing(request); | ||||
| return new PayShareResult(true, null,"success", null,settleId); | return new PayShareResult(true, null,"success", null,settleId); | ||||
| } catch (TtPayException e) { | } catch (TtPayException e) { | ||||
| @@ -171,7 +171,7 @@ public class TtPayShareService extends PayShareBaseAdapterService{ | |||||
| record.setOutSettleNo(record.getOutSettleNo() + 1l); | record.setOutSettleNo(record.getOutSettleNo() + 1l); | ||||
| } | } | ||||
| request.setOutSettleNo(record.getOutSettleNo().toString()); | request.setOutSettleNo(record.getOutSettleNo().toString()); | ||||
| request.setSettleDesc("merchant_reciver_share"); | |||||
| request.setSettleDesc("完结分账"); | |||||
| List list = new ArrayList<>(); | List list = new ArrayList<>(); | ||||
| for (Object o: receivers) { | for (Object o: receivers) { | ||||
| JSONObject jo = (JSONObject) o; | JSONObject jo = (JSONObject) o; | ||||