//package com.inkasso.kafubao.system.permission.controller;
//
//import com.inkasso.auth.interfaces.Permissions;
//import com.inkasso.auth.interfaces.PermissionAndCheck;
//import com.inkasso.adapter.page.PageResult;
//import com.inkasso.kafubao.system.permission.model.dto.PermissionDTO;
//import com.inkasso.kafubao.system.permission.model.request.AddPermissionRequest;
//import com.inkasso.kafubao.system.permission.model.request.EditPermissionRequest;
//import com.inkasso.kafubao.system.permission.model.request.QueryPermissionRequest;
//import com.inkasso.kafubao.system.permission.service.PermissionService;
//import com.inkasso.adapter.exception.ServiceException;
//import com.inkasso.adapter.response.ResponseData;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.GetMapping;
//import com.inkasso.adapter.exception.enums.KafubaoExceptionEnum;
//
//
//import java.util.List;
//
///**
// * @author 张超
// * @date  2023-08-31
// */
//@RestController
//@RequestMapping(path = "permission")
//@Permissions(name="权限",code = "permissionManage")
//public class PermissionController {
//
//    @Autowired
//    private PermissionService permissionService;
//
//    @GetMapping(path = "permission/{id}")
//    @PermissionAndCheck(name = "查询权限详细信息", code="PermissionController:detail")
//    public ResponseData getById(@PathVariable("id") Long id){
//        if(id==null){
//            throw new ServiceException(400, KafubaoExceptionEnum.SYSTEM_DATE_ERROR);
//        }
//        PermissionDTO permissionDTO = permissionService.getPermissionDtoById(id);
//        return ResponseData.success(permissionDTO);
//
//    }
//
//
//    @DeleteMapping(path = "permission/{id}")
//    @PermissionAndCheck(name = "删除权限", code="PermissionController:delete")
//    public ResponseData deleteById(@PathVariable("id") Long id){
//        if(id==null){
//            throw new ServiceException(400, KafubaoExceptionEnum.SYSTEM_DATE_ERROR);
//        }
//        permissionService.deletePermission(id);
//        return ResponseData.success();
//    }
//}