Commit 1dfc5057 by fanjiaxin

联调问题处理

parent 1a2cd41d
Pipeline #71573 passed with stages
in 1 minute 11 seconds
...@@ -6,9 +6,6 @@ import org.springframework.context.annotation.Configuration; ...@@ -6,9 +6,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.ArrayList;
import java.util.Collections;
/** /**
* @Description 配置 * @Description 配置
* @Author fanjiaxin * @Author fanjiaxin
...@@ -19,23 +16,9 @@ import java.util.Collections; ...@@ -19,23 +16,9 @@ import java.util.Collections;
public class WebConfig implements WebMvcConfigurer { public class WebConfig implements WebMvcConfigurer {
private final AuthInterceptor authInterceptor; private final AuthInterceptor authInterceptor;
private static final String[] EXCLUDE_URLS = {"/i/health",
"/sharer/open/**", "/sharer/test/**",
"/sharer/user/login", "/sharer/product/page/list"};
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authInterceptor) registry.addInterceptor(authInterceptor)
.excludePathPatterns(getExcludePathPatterns()); .addPathPatterns("/**");
}
/**
* 白名单
*/
private ArrayList<String> getExcludePathPatterns() {
ArrayList<String> list = new ArrayList<>();
Collections.addAll(list, EXCLUDE_URLS);
return list;
} }
} }
...@@ -5,6 +5,7 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserCommissionRatio ...@@ -5,6 +5,7 @@ import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserCommissionRatio
import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserTokenVO; import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.UserTokenVO;
import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.SharerInfoVO; import com.netease.yanxuan.wx.store.sharer.biz.meta.model.vo.SharerInfoVO;
import com.netease.yanxuan.wx.store.sharer.biz.service.IUserService; import com.netease.yanxuan.wx.store.sharer.biz.service.IUserService;
import com.netease.yanxuan.wx.store.sharer.common.annotation.LoginRequired;
import com.netease.yanxuan.wx.store.sharer.common.core.Result; import com.netease.yanxuan.wx.store.sharer.common.core.Result;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
...@@ -36,6 +37,7 @@ public class UserController extends BaseController { ...@@ -36,6 +37,7 @@ public class UserController extends BaseController {
/** /**
* 刷新用户信息 * 刷新用户信息
*/ */
@LoginRequired
@PostMapping("/refreshUserInfo") @PostMapping("/refreshUserInfo")
public Result<SharerInfoVO> refreshUserInfo() { public Result<SharerInfoVO> refreshUserInfo() {
SharerInfoVO result = iUserService.refreshUserInfo(); SharerInfoVO result = iUserService.refreshUserInfo();
...@@ -45,6 +47,7 @@ public class UserController extends BaseController { ...@@ -45,6 +47,7 @@ public class UserController extends BaseController {
/** /**
* 用户信息 * 用户信息
*/ */
@LoginRequired
@PostMapping("/getUserInfo") @PostMapping("/getUserInfo")
public Result<SharerInfoVO> getUserInfo() { public Result<SharerInfoVO> getUserInfo() {
SharerInfoVO result = iUserService.getUserInfo(); SharerInfoVO result = iUserService.getUserInfo();
...@@ -54,6 +57,7 @@ public class UserController extends BaseController { ...@@ -54,6 +57,7 @@ public class UserController extends BaseController {
/** /**
* 查询平台默认的分佣比例 * 查询平台默认的分佣比例
*/ */
@LoginRequired
@PostMapping("/getCommissionRatioDefault") @PostMapping("/getCommissionRatioDefault")
public Result<UserCommissionRatioVO> getCommissionRatioDefault() { public Result<UserCommissionRatioVO> getCommissionRatioDefault() {
UserCommissionRatioVO result = iUserService.getCommissionRatioDefault(); UserCommissionRatioVO result = iUserService.getCommissionRatioDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment