1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- package company
- import (
- "github.com/gin-gonic/gin"
- "hongze/hongze_yb/controller/response"
- "hongze/hongze_yb/services/company"
- userService "hongze/hongze_yb/services/user"
- )
- func GetHomeFiccPermissions(c *gin.Context) {
- userinfo := userService.GetInfoByClaims(c)
- list, err := company.GetHomeFiccPermissions(userinfo)
- if err !=nil {
- response.Fail(err.Error(), c)
- return
- }
- response.OkData("获取成功", list, c)
- }
- func GetPermissionTree(c *gin.Context) {
- list, err := company.GetFiccPermissionList()
- if err != nil {
- response.FailMsg("获取失败", "GetPermissionList ErrMsg:" + err.Error(), c)
- return
- }
- response.OkData("获取成功", list, c)
- }
- func GetBindFiccPermissions(c *gin.Context) {
- userinfo := userService.GetInfoByClaims(c)
- list, err := company.GetBindFiccPermissions(userinfo)
- if err !=nil {
- response.Fail(err.Error(), c)
- return
- }
- response.OkData("获取成功", list, c)
- }
- func GetCommoditiesBindFiccPermissions(c *gin.Context) {
- userinfo := userService.GetInfoByClaims(c)
- list, err := company.GetCommoditiesBindFiccPermissions(userinfo)
- if err !=nil {
- response.Fail(err.Error(), c)
- return
- }
- response.OkData("获取成功", list, c)
- }
|