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;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.ArrayList;
import java.util.Collections;
/**
* @Description 配置
* @Author fanjiaxin
......@@ -19,23 +16,9 @@ import java.util.Collections;
public class WebConfig implements WebMvcConfigurer {
private final AuthInterceptor authInterceptor;
private static final String[] EXCLUDE_URLS = {"/i/health",
"/sharer/open/**", "/sharer/test/**",
"/sharer/user/login", "/sharer/product/page/list"};
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(authInterceptor)
.excludePathPatterns(getExcludePathPatterns());
}
/**
* 白名单
*/
private ArrayList<String> getExcludePathPatterns() {
ArrayList<String> list = new ArrayList<>();
Collections.addAll(list, EXCLUDE_URLS);
return list;
.addPathPatterns("/**");
}
}
......@@ -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.SharerInfoVO;
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 lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
......@@ -36,6 +37,7 @@ public class UserController extends BaseController {
/**
* 刷新用户信息
*/
@LoginRequired
@PostMapping("/refreshUserInfo")
public Result<SharerInfoVO> refreshUserInfo() {
SharerInfoVO result = iUserService.refreshUserInfo();
......@@ -45,6 +47,7 @@ public class UserController extends BaseController {
/**
* 用户信息
*/
@LoginRequired
@PostMapping("/getUserInfo")
public Result<SharerInfoVO> getUserInfo() {
SharerInfoVO result = iUserService.getUserInfo();
......@@ -54,6 +57,7 @@ public class UserController extends BaseController {
/**
* 查询平台默认的分佣比例
*/
@LoginRequired
@PostMapping("/getCommissionRatioDefault")
public Result<UserCommissionRatioVO> 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