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