xhxu 3 лет назад
Родитель
Сommit
069e929bfe
4 измененных файлов: 13 добавлений и 11 удалений
  1. +1
    -1
      mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java
  2. +9
    -7
      mallinkService/src/main/java/com/iformall/douyin/pay/impl/TtPayServiceApacheHttpImpl.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java
  4. +2
    -2
      mallinkService/src/main/java/com/iformall/service/pay/service/share/douyin/TtPayShareService.java

+ 1
- 1
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);
}


+ 9
- 7
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) {


+ 1
- 1
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<String> mediaIds1 = this.getMerchantMediaIds(activities_additions);


+ 2
- 2
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;


Загрузка…
Отмена
Сохранить