| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.domain.ZAuthority; |
| | | import com.ruoyi.domain.dto.AuthorityDto; |
| | | import com.ruoyi.domain.dto.AuthorityDto2; |
| | | import com.ruoyi.domain.dto.EmpowerDto; |
| | | import com.ruoyi.service.ZAuthorityService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | /** |
| | | * 根据条件查看权限 |
| | | */ |
| | | @GetMapping("/condition") |
| | | @PostMapping("/condition") |
| | | public AjaxResult getAuthorityByCondition(@RequestBody AuthorityDto authorityDto){ |
| | | return AjaxResult.success(zAuthorityService.getByCondition(authorityDto)); |
| | | } |
| | | |
| | | // /** |
| | | // * 授权(只有家庭管理员才能调用这个接口) |
| | | // */ |
| | | // @PostMapping("/empower") |
| | | // public AjaxResult empower(){ |
| | | // |
| | | // } |
| | | /** |
| | | * 权限管理(管理员端) |
| | | */ |
| | | @PostMapping() |
| | | public AjaxResult authorityManager(@RequestBody AuthorityDto2 authorityDto){ |
| | | return zAuthorityService.managerAuthority(authorityDto); |
| | | } |
| | | |
| | | /** |
| | | * 查看其他人现有的权限 |
| | | */ |
| | | @PostMapping("/list/other") |
| | | public AjaxResult getOtherAuthority(@RequestBody AuthorityDto authorityDto){ |
| | | return zAuthorityService.getOtherAuthority(authorityDto); |
| | | } |
| | | |
| | | /** |
| | | * 授权(只有家庭管理员才能调用这个接口) |
| | | */ |
| | | @PostMapping("/empower") |
| | | public AjaxResult empower(@RequestBody EmpowerDto zAuthority){ |
| | | return zAuthorityService.saveZa(zAuthority); |
| | | } |
| | | /** |
| | | * 根据authorityId和家庭id查看已经授权给那些人 |
| | | */ |
| | | @PostMapping("/getInfoByAidFid") |
| | | public AjaxResult empowerGetInfo(@RequestBody ZAuthority zAuthority){ |
| | | return zAuthorityService.listByFidAid(zAuthority); |
| | | } |
| | | /** |
| | | * 根据authorityId和家庭id收回已经授权给那些人 |
| | | */ |
| | | @PostMapping("/deleteInfoByAidFid") |
| | | public AjaxResult deleteEmpower(@RequestBody EmpowerDto zAuthority){ |
| | | return zAuthorityService.deleteZa(zAuthority); |
| | | } |
| | | |
| | | |
| | | |