|
|
@@ -1951,16 +1951,23 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
//组合返回参数
|
|
|
String json;
|
|
|
R result = new R();
|
|
|
+ boolean fromRedis = true; // 标记是否从Redis获取
|
|
|
json = redisCache.getCacheObject("sys_config:redPacket.config.new");
|
|
|
if (StringUtil.isNullOrEmpty(json) || json.isEmpty()) {
|
|
|
+ fromRedis = false;
|
|
|
json = configService.selectConfigByKey("his.AppRedPacket");
|
|
|
}
|
|
|
-// String json = configService.selectConfigByKey("his.AppRedPacket");
|
|
|
AppRedPacketConfig config = JSONUtil.toBean(json, AppRedPacketConfig.class);
|
|
|
+
|
|
|
+ // 如果是从Redis获取的配置(即没进入上面的if),则设置NotifyUrl为Scrm的地址
|
|
|
+ if (fromRedis) {
|
|
|
+ config.setNotifyUrl(config.getNotifyUrlScrm());
|
|
|
+ }
|
|
|
+
|
|
|
if (config.getIsNew() != null && config.getIsNew() == 1) {
|
|
|
result = sendRedPacketV3(param, config);
|
|
|
} else {
|
|
|
- result= sendRedPacketLegacy(param, config);
|
|
|
+ result = sendRedPacketLegacy(param, config);
|
|
|
}
|
|
|
if (result.getMsg().equals("商家余额不足") && param.getRedPacketMode() == 1) {
|
|
|
redisCache.incr("sys_config:redPacket.config.newCount",1L);
|