master
james.zhao 6 years ago
parent 8e109ad2e3
commit 8c207e5e97

@ -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();
}

@ -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){

@ -24,7 +24,7 @@ public class RedpackSendingTask {
public void checkRedpacks() {
List<JSONObject> unConfirmedRedpacks = cusRewardLogsMapper.listUnconfirmRewards();
for (JSONObject redpack : unConfirmedRedpacks) {
customerRewardLogService.checkRedpacksStatus(redpack.getString("send_listid"));
customerRewardLogService.checkRedpacksStatus(redpack.getString("reward_id"),redpack.getString("send_listid"));
}
}
}

Loading…
Cancel
Save