Merge branch 'prod' into test
This commit is contained in:
@@ -41,7 +41,7 @@ public class ADisGroupController {
|
|||||||
if (share == null) {
|
if (share == null) {
|
||||||
return CzgResult.success(mkDistributionGroupService.save(group));
|
return CzgResult.success(mkDistributionGroupService.save(group));
|
||||||
} else {
|
} else {
|
||||||
return CzgResult.success(mkDistributionGroupService.updateById(group, false));
|
return CzgResult.success(mkDistributionGroupService.updateById(group));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,6 +41,7 @@ public class AShareBaseController {
|
|||||||
if (share == null) {
|
if (share == null) {
|
||||||
return CzgResult.success(mkShareBaseService.save(shareBase));
|
return CzgResult.success(mkShareBaseService.save(shareBase));
|
||||||
} else {
|
} else {
|
||||||
|
shareBase.setCreateTime(share.getCreateTime());
|
||||||
return CzgResult.success(mkShareBaseService.updateById(shareBase, false));
|
return CzgResult.success(mkShareBaseService.updateById(shareBase, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,11 +181,9 @@ public class OrderPayController {
|
|||||||
@PostMapping("/shopPayApi/js2Pay")
|
@PostMapping("/shopPayApi/js2Pay")
|
||||||
@Debounce(value = "#payParam.checkOrderPay.orderId")
|
@Debounce(value = "#payParam.checkOrderPay.orderId")
|
||||||
public CzgResult<Map<String, Object>> js2PayOrder(HttpServletRequest request, @RequestBody OrderPayParamDTO payParam) {
|
public CzgResult<Map<String, Object>> js2PayOrder(HttpServletRequest request, @RequestBody OrderPayParamDTO payParam) {
|
||||||
if ("alipay".equals(payParam.getPayType())) {
|
if ("ALIPAY".equals(payParam.getPayType())) {
|
||||||
payParam.setPayType(PayCst.Type.ALIPAY);
|
payParam.setPayType(PayCst.Type.ALIPAY);
|
||||||
} else if ("aliPay".equals(payParam.getPayType())) {
|
} else if ("WECHAT".equals(payParam.getPayType())) {
|
||||||
payParam.setPayType(PayCst.Type.ALIPAY);
|
|
||||||
} else if ("wechatPay".equals(payParam.getPayType())) {
|
|
||||||
payParam.setPayType(PayCst.Type.WECHAT);
|
payParam.setPayType(PayCst.Type.WECHAT);
|
||||||
} else {
|
} else {
|
||||||
throw new CzgException(payParam.getPayType() + "支付方式错误");
|
throw new CzgException(payParam.getPayType() + "支付方式错误");
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.czg.config;
|
package com.czg.config;
|
||||||
|
|
||||||
import cn.dev33.satoken.application.ApplicationInfo;
|
|
||||||
import cn.dev33.satoken.config.SaTokenConfig;
|
import cn.dev33.satoken.config.SaTokenConfig;
|
||||||
import cn.dev33.satoken.context.SaHolder;
|
import cn.dev33.satoken.context.SaHolder;
|
||||||
import cn.dev33.satoken.interceptor.SaInterceptor;
|
import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||||
@@ -58,14 +57,17 @@ public class SaTokenConfigure implements WebMvcConfigurer {
|
|||||||
public void addInterceptors(InterceptorRegistry registry) {
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
// 注册路由拦截器,自定义认证规则
|
// 注册路由拦截器,自定义认证规则
|
||||||
registry.addInterceptor(new SaInterceptor(handler -> {
|
registry.addInterceptor(new SaInterceptor(handler -> {
|
||||||
log.info(SaHolder.getRequest().getRequestPath());
|
log.info("{}: {}", SaHolder.getRequest().getMethod(), SaHolder.getRequest().getRequestPath());
|
||||||
// 重置根路径,防止satoken切割根路径导致匹配不到路径
|
if ("OPTIONS".equalsIgnoreCase(SaHolder.getRequest().getMethod())) {
|
||||||
ApplicationInfo.routePrefix = "";
|
SaRouter.back();
|
||||||
|
return;
|
||||||
|
}
|
||||||
SaRouter
|
SaRouter
|
||||||
|
.match(r -> "OPTIONS".equalsIgnoreCase(SaHolder.getRequest().getMethod()))
|
||||||
|
.stop()
|
||||||
// 完全开放的路径(不需要任何认证)
|
// 完全开放的路径(不需要任何认证)
|
||||||
.match("/user/login", "/user/geo/**", "/user/home/**",
|
.match("/user/login", "/user/geo/**", "/user/home/**",
|
||||||
"/user/dict/**", "/user/openId","/admin/auth/**",
|
"/user/dict/**", "/user/openId", "/admin/auth/**",
|
||||||
"/admin/shopMsgPush/subscribe/**",
|
"/admin/shopMsgPush/subscribe/**",
|
||||||
"/admin/coupon/grant",
|
"/admin/coupon/grant",
|
||||||
"/pay/**",
|
"/pay/**",
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ public class MkShareBaseServiceImpl extends ServiceImpl<MkShareBaseMapper, MkSha
|
|||||||
}
|
}
|
||||||
//绑定上下级
|
//绑定上下级
|
||||||
if (StrUtil.isNotBlank(inviteCode)) {
|
if (StrUtil.isNotBlank(inviteCode)) {
|
||||||
FunUtils.safeRunVoid(() -> distributionUserService.bindInviteUser(fromUserId, toUserId, shopId), "shareClaim 绑定上下级");
|
FunUtils.safeRunVoid(() -> {
|
||||||
|
distributionUserService.bindInviteUser(fromUserId, toUserId, shopId);
|
||||||
|
}, "shareClaim绑定上下级");
|
||||||
}
|
}
|
||||||
MkShareBase shareBase = getById(shopId);
|
MkShareBase shareBase = getById(shopId);
|
||||||
if (shareBase == null || !shareBase.getIsEnabled().equals(1) || StrUtil.isBlank(shareBase.getRewardSharePages())) {
|
if (shareBase == null || !shareBase.getIsEnabled().equals(1) || StrUtil.isBlank(shareBase.getRewardSharePages())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user