From 8c207e5e97b4f2b999f55ffe52d9bb1ac6cb6277 Mon Sep 17 00:00:00 2001 From: "james.zhao" Date: Wed, 6 Feb 2019 18:49:50 +0800 Subject: [PATCH] update --- .../manage/customers/core/CustomerRewardLogService.java | 4 +++- .../customers/core/impls/CustomerRewardLogServiceImpl.java | 4 ++-- .../payment/manage/customers/task/RedpackSendingTask.java | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/core/CustomerRewardLogService.java b/src/main/java/au/com/royalpay/payment/manage/customers/core/CustomerRewardLogService.java index c9c91f94a..87faf2ff2 100644 --- a/src/main/java/au/com/royalpay/payment/manage/customers/core/CustomerRewardLogService.java +++ b/src/main/java/au/com/royalpay/payment/manage/customers/core/CustomerRewardLogService.java @@ -11,7 +11,9 @@ public interface CustomerRewardLogService { void saveReward(int type2,int type3,String type1,String date); - void checkRedpacksStatus(String rewardId); + void checkRedpacksStatus(String rewardId,String sendListId); void reSendRedPacks(); + + } diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/core/impls/CustomerRewardLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/customers/core/impls/CustomerRewardLogServiceImpl.java index 2545c8dd6..fe30afe81 100644 --- a/src/main/java/au/com/royalpay/payment/manage/customers/core/impls/CustomerRewardLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/customers/core/impls/CustomerRewardLogServiceImpl.java @@ -188,9 +188,9 @@ public class CustomerRewardLogServiceImpl implements CustomerRewardLogService { } @Override - public void checkRedpacksStatus(String rewardId) { + public void checkRedpacksStatus(String rewardId,String sendListId) { MpWechatApi redpackApi = mpWechatApiProvider.getApi("redpack"); - JSONObject redpack = redpackApi.redpackStatus(rewardId); + JSONObject redpack = redpackApi.redpackStatus(sendListId); int status = redpack.getIntValue("status"); JSONObject params = new JSONObject(); if(status == 2){ diff --git a/src/main/java/au/com/royalpay/payment/manage/customers/task/RedpackSendingTask.java b/src/main/java/au/com/royalpay/payment/manage/customers/task/RedpackSendingTask.java index 3aca45c85..3cebd17c3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/customers/task/RedpackSendingTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/customers/task/RedpackSendingTask.java @@ -24,7 +24,7 @@ public class RedpackSendingTask { public void checkRedpacks() { List unConfirmedRedpacks = cusRewardLogsMapper.listUnconfirmRewards(); for (JSONObject redpack : unConfirmedRedpacks) { - customerRewardLogService.checkRedpacksStatus(redpack.getString("send_listid")); + customerRewardLogService.checkRedpacksStatus(redpack.getString("reward_id"),redpack.getString("send_listid")); } } }