Commit 7c34f41c by 唐功亮

修改token认证

parent a7020248
......@@ -61,7 +61,7 @@ public class ShiroConfig {
filterMap.put("/captcha.jpg", "anon");
filterMap.put("/aaa.txt", "anon");
//不需要登录的接口
filterMap.put("/*/api/login", "anon");
filterMap.put("/*/authApi/login", "anon");
filterMap.put("/*/api/**", "anon");
filterMap.put("/**", "oauth2");
shiroFilter.setFilterChainDefinitionMap(filterMap);
......
......@@ -47,7 +47,7 @@ public class LogLoginController {
/**
* 用户登录
*/
@RequestMapping("/api/login")
@RequestMapping("/authApi/login")
@Login
// @RequiresPermissions("manage:member:list")
public R login(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
......
......@@ -84,11 +84,11 @@ public class MemberController extends AbstractController {
/**
* 信息
*/
@RequestMapping("/api/info/{id}")
@Login
@RequestMapping("/api/info/")
// @RequiresPermissions("manage:member:info")
public R info(@PathVariable("id") Integer id){
MemberEntity member = memberService.getById(id);
public R info(){
Integer memberUserId = getMemberUserId();
MemberEntity member = memberService.getById(memberUserId);
return R.ok().put("data", member);
}
......
......@@ -91,7 +91,6 @@ public class TycpdmFirmController extends AbstractController {
* 保存(保存企业信息)
*/
@RequestMapping("/api/save")
@Login
// @RequiresPermissions("manage:tycpdmfirm:save")
public R save(@RequestBody TycpdmFirmEntity tycpdmFirm,@RequestParam("file")MultipartFile file){
String baseUser = tycpdmFirm.getBaseUser();
......@@ -147,13 +146,14 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/api/findTycpdmFirmLogoutFlagCount")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R findTycpdmFirmLogoutFlagCount(@RequestParam("userId") Integer userId){
public R findTycpdmFirmLogoutFlagCount(){
/*Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
}
MemberEntity userMember = getMemberUser();*/
MemberEntity memberUser = getMemberUser();
Map<String,Integer> map=tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return R.ok().put("data",map);
}
......
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