2 changed files with 37 additions and 2 deletions
@ -0,0 +1,35 @@ |
|||
package com.ccsens.defaultwbs.api; |
|||
|
|||
import com.ccsens.common.bean.dto.CProjectDto; |
|||
import com.ccsens.common.service.IPowerService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
|
|||
@Api(tags = "权限相关" , description = "") |
|||
@RestController |
|||
@RequestMapping("/power") |
|||
@Slf4j |
|||
public class PowerController { |
|||
|
|||
@Resource |
|||
private IPowerService powerService; |
|||
|
|||
|
|||
@ApiOperation(value = "查询用户在项目中的权限", notes = "") |
|||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<Integer> queryPatientList(@ApiParam @Validated @RequestBody CProjectDto.QueryPower params) throws Exception{ |
|||
Integer power = powerService.queryUserPower(params.getProjectId(), params.getUserId()); |
|||
return JsonResponse.newInstance().ok(power); |
|||
} |
|||
|
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: prod |
|||
include: common, util-prod |
|||
active: test |
|||
include: common, util-test |
|||
|
|||
Loading…
Reference in new issue