|
|
@@ -381,13 +381,14 @@ public class WeChatProfitSharingService {
|
|
|
Type receiverListType = new TypeToken<List<WechatReceiver>>() {}.getType();
|
|
|
// 转换
|
|
|
List<WechatReceiver> wechatReceivers = gson.fromJson(
|
|
|
- gson.toJson(res.get("receivers")), // 将receivers转为JSON字符串
|
|
|
+ // 将receivers转为JSON字符串
|
|
|
+ gson.toJson(res.get("receivers")),
|
|
|
receiverListType
|
|
|
);
|
|
|
for (WechatReceiver wechatReceiver : wechatReceivers) {
|
|
|
//关联订单分账详情
|
|
|
for (AppProfitSharingInfo appProfitSharingInfo : appProfitSharingInfos) {
|
|
|
- if (Objects.equals(wechatReceiver.getAccount(), appProfitSharingInfo.getMchId())) {
|
|
|
+ if (Objects.equals(wechatReceiver.getAccount(), appProfitSharingInfo.getMchId()) && appProfitSharingInfo.getPreAmount() != 0) {
|
|
|
appProfitSharingInfo.setProfitSharingRecordsId(appProfitSharingRecords.getId());
|
|
|
appProfitSharingInfo.setAmount(wechatReceiver.getAmount());
|
|
|
appProfitSharingInfo.setStatus(wechatReceiver.getResult());
|