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