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")); } } }