-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wuwei
committed
Mar 17, 2020
1 parent
b412b74
commit 14bd6e3
Showing
60 changed files
with
708 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
bullet-server/src/main/java/com/wuweibi/bullet/common/domain/BasePo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
bullet-server/src/main/java/com/wuweibi/bullet/controller/SysMenuController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.wuweibi.bullet.controller; | ||
|
||
|
||
import com.wuweibi.bullet.annotation.JwtUser; | ||
import com.wuweibi.bullet.domain.domain.session.Session; | ||
import com.wuweibi.bullet.entity.SysMenu; | ||
import com.wuweibi.bullet.entity.api.Result; | ||
import com.wuweibi.bullet.service.ISysMenuService; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.annotation.Resource; | ||
import java.util.List; | ||
|
||
/** | ||
* <p> | ||
* 菜单表 前端控制器 | ||
* </p> | ||
* | ||
* @author marker | ||
* @since 2020-03-16 | ||
*/ | ||
@RestController | ||
@RequestMapping("/api/menu") | ||
public class SysMenuController { | ||
|
||
@Resource | ||
private ISysMenuService sysMenuService; | ||
|
||
|
||
/** | ||
* 获取用户的一级菜单 | ||
* (系统主界面菜单使用该接口) | ||
*/ | ||
@GetMapping("/list/one") | ||
public Object listOneLevel(@JwtUser Session session) { | ||
Long userId = session.getUserId(); | ||
List<SysMenu> list = sysMenuService.getOneLevel(userId); | ||
return Result.success(list); | ||
} | ||
|
||
|
||
/** | ||
* 获取二级以后的菜单 | ||
* | ||
* (系统主界面菜单使用该接口) | ||
* | ||
* @return | ||
*/ | ||
@GetMapping("/list/secondary") | ||
public Object listSecondaryLevel(@JwtUser Session session, @RequestParam Long pid) { | ||
Long userId = session.getUserId(); | ||
List<SysMenu> list = sysMenuService.getSecondaryLevel(userId, pid); | ||
return Result.success(list); | ||
} | ||
} |
Oops, something went wrong.