解决冲突

dev-discount
胡锐 3 years ago
commit 406b262178
  1. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 19
      hai-cweb/src/main/java/com/cweb/controller/HighUserController.java
  3. 7
      hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java

@ -111,6 +111,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/user/getUnionId")
.excludePathPatterns("/highUser/setCacheParam")
.excludePathPatterns("/highUser/getCacheParam")
.excludePathPatterns("/highUser/delCacheParam")
.excludePathPatterns("/order/orderToH5Pay")
.excludePathPatterns("/order/orderToPay")
.excludePathPatterns("/test/*")

@ -235,6 +235,24 @@ public class HighUserController {
}
}
@RequestMapping(value="/delCacheParam",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "删除设置用户参数")
public ResponseData delCacheParam(@RequestParam(name = "key", required = true) String key) {
try {
Object param = redisUtil.hget("PROVISIONAL_CACHE_PARAM", key);
if (param != null) {
redisUtil.hdel("PROVISIONAL_CACHE_PARAM", key);
}
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("CommonController --> delCacheParam() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/GetMembershipLevel", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "请求会员体系")
@ -247,5 +265,4 @@ public class HighUserController {
}
}
}

@ -127,6 +127,7 @@ public class OrderController {
}
JSONObject jsonObject = JSONObject.parseObject(reqBodyStr);
Long orderId = jsonObject.getLong("orderId");
Integer openIdType = jsonObject.getInteger("openIdType"); // openId类型 1:小程序 2:公众号
String orderScene = jsonObject.getString("orderScene"); // 订单类型
String openId = jsonObject.getString("openId"); // openId
if ( orderId == null || StringUtils.isBlank(orderScene) || StringUtils.isBlank(openId)) {
@ -187,7 +188,11 @@ public class OrderController {
WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo();
weChatPayReqInfo.setAppid(SysConst.getSysConfig().getWxMchAppId()); //公众号id
weChatPayReqInfo.setMch_id(SysConst.getSysConfig().getWxMchId()); //商户号
if (openIdType != null && openIdType.equals(2)) {
weChatPayReqInfo.setSub_appid("wxa075e8509802f826"); //商户号公众号
} else {
weChatPayReqInfo.setSub_appid(SysConst.getSysConfig().getWxSubAppId());//商户号
}
weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxSubMchId()); //子商户号
// weChatPayReqInfo.setOpenid(openId);
@ -204,7 +209,7 @@ public class OrderController {
//附加数据,区分订单类型
Map<String,String> payMap = new HashMap<>();
payMap.put("app_id",SysConst.getSysConfig().getWxSubAppId());
payMap.put("app_id", weChatPayReqInfo.getSub_appid());
payMap.put("api_key",SysConst.getSysConfig().getWxApiKey());
payMap.put("unified_order_url",SysConst.getSysConfig().getWxUnifiedOrderUrl());
SortedMap<Object, Object> sortedMap = wechatPayUtil.goWechatPay(weChatPayReqInfo,payMap);

Loading…
Cancel
Save