|
|
|
@ -127,7 +127,7 @@ public class RedpackServiceImpl implements RedpackService {
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
WechatRedpack redpack = newRedpack(config, orderOpenId);
|
|
|
|
|
String redpackId = mpWechatApiProvider.getApi("Redpack").sendRedpack(redpack).getString("redpack_id");
|
|
|
|
|
String redpackId = mpWechatApiProvider.getApi("Redpack").sendRedpack(redpack).getString("out_biz_no");
|
|
|
|
|
JSONObject obj = redpack.toJSON();
|
|
|
|
|
obj.put("redpack_id", redpackId);
|
|
|
|
|
obj.put("create_time", new Date());
|
|
|
|
@ -303,7 +303,7 @@ public class RedpackServiceImpl implements RedpackService {
|
|
|
|
|
String rpOpenId = customerRelation.getString(redpackApi.getOpenIdKey());
|
|
|
|
|
wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(act.getString("act_name")).setRemark("店长激励计划")
|
|
|
|
|
.setAmount(totalAmount).setWishing(wishing).setNotifyUrl(null);
|
|
|
|
|
String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("redpack_id");
|
|
|
|
|
String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("out_biz_no");
|
|
|
|
|
|
|
|
|
|
for (JSONObject prizeDetail : reallySend) {
|
|
|
|
|
prizeDetail.put("red_packet_id", redPacketId);
|
|
|
|
@ -421,8 +421,7 @@ public class RedpackServiceImpl implements RedpackService {
|
|
|
|
|
String rpOpenId = customerRelation.getString(redpackApi.getOpenIdKey());
|
|
|
|
|
wechatRedpack.setSendName(sendName).setOpenId(rpOpenId).setActName(actName).setRemark("店长激励计划").setAmount(luckyMoeny).setWishing(wishing)
|
|
|
|
|
.setNotifyUrl(notifyUrl);
|
|
|
|
|
String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("redpack_id");
|
|
|
|
|
logger.debug("kira-->>>>" + redPacketId);
|
|
|
|
|
String redPacketId = mpWechatApiProvider.getApi("Redpack").sendRedpack(wechatRedpack).getString("out_biz_no");
|
|
|
|
|
prizeDetail.put("red_packet_id", redPacketId);
|
|
|
|
|
prizeDetail.put("status", 1);
|
|
|
|
|
actPartnerLMLogMapper.update(prizeDetail);
|
|
|
|
@ -449,8 +448,7 @@ public class RedpackServiceImpl implements RedpackService {
|
|
|
|
|
alipayRedpack.setPayeeAccount(alipayUserId).setAmount(prizeDetail.getBigDecimal("red_packet_amount")).setPayerShowName("RoyalPay福利社")
|
|
|
|
|
.setRemark("RoyalPay店长活动-" + (rate.intValue() > 1 ? rate.intValue() + "倍" : "") + "红包奖励" + specialDocuments);
|
|
|
|
|
JSONObject mpAlipayJson = mpAlipayRedpackApi.sendRedpack(alipayRedpack);
|
|
|
|
|
logger.debug("mpAlipayJson------" + mpAlipayJson.toJSONString());
|
|
|
|
|
String redPacketId = mpAlipayJson.getString("redpack_id");
|
|
|
|
|
String redPacketId = mpAlipayJson.getString("out_biz_no");
|
|
|
|
|
prizeDetail.put("red_packet_id", redPacketId);
|
|
|
|
|
prizeDetail.put("status", 5);
|
|
|
|
|
actPartnerLMLogMapper.update(prizeDetail);
|
|
|
|
@ -463,7 +461,6 @@ public class RedpackServiceImpl implements RedpackService {
|
|
|
|
|
List<JSONObject> redPacketOrders = actPartnerLMLogMapper.sendList(params);
|
|
|
|
|
for (JSONObject redPack : redPacketOrders) {
|
|
|
|
|
JSONObject supportRedPack = mpAlipayRedpackApi.redpackStatus(redPack.getString("red_packet_id"));
|
|
|
|
|
logger.debug("kiratest----------" + supportRedPack.toJSONString());
|
|
|
|
|
if (supportRedPack != null && !supportRedPack.isEmpty()) {
|
|
|
|
|
switch (supportRedPack.getString("status")) {
|
|
|
|
|
case "0":
|
|
|
|
|