|
@@ -5,12 +5,16 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.diagbot.annotation.SysLogger;
|
|
import com.diagbot.annotation.SysLogger;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.dto.TokenHospitaDTO;
|
|
import com.diagbot.dto.TokenHospitaDTO;
|
|
|
|
+import com.diagbot.dto.UserRoleInfoFindDTO;
|
|
import com.diagbot.facade.UserRoleFacade;
|
|
import com.diagbot.facade.UserRoleFacade;
|
|
import com.diagbot.vo.TokenHospitalVO;
|
|
import com.diagbot.vo.TokenHospitalVO;
|
|
|
|
+import com.diagbot.vo.UserRoleInfoCancelVO;
|
|
|
|
+import com.diagbot.vo.UserRoleInfoFindVO;
|
|
import com.diagbot.vo.UserRoleInfoVO;
|
|
import com.diagbot.vo.UserRoleInfoVO;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -19,6 +23,7 @@ import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
@@ -39,8 +44,27 @@ public class UserRoleController {
|
|
@ApiOperation(value = "添加医院管理员[by:wangfeng]",notes = "添加医院管理员")
|
|
@ApiOperation(value = "添加医院管理员[by:wangfeng]",notes = "添加医院管理员")
|
|
@PostMapping("/addUserRole")
|
|
@PostMapping("/addUserRole")
|
|
@SysLogger("addUserRole")
|
|
@SysLogger("addUserRole")
|
|
|
|
+ @Transactional
|
|
public RespDTO<Boolean> addUserRole(@RequestBody @Valid UserRoleInfoVO userRoleInfoVO) {
|
|
public RespDTO<Boolean> addUserRole(@RequestBody @Valid UserRoleInfoVO userRoleInfoVO) {
|
|
boolean res = userRoleFacade.addUserRoles(userRoleInfoVO);
|
|
boolean res = userRoleFacade.addUserRoles(userRoleInfoVO);
|
|
return RespDTO.onSuc(res);
|
|
return RespDTO.onSuc(res);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "获取医院管理员[by:wangfeng]",notes = "获取医院管理员")
|
|
|
|
+ @PostMapping("/getUserRole")
|
|
|
|
+ @SysLogger("getUserRole")
|
|
|
|
+ @Transactional
|
|
|
|
+ public RespDTO<List<UserRoleInfoFindDTO>> getUserRole(@RequestBody @Valid UserRoleInfoFindVO userRoleInfoFindVO) {
|
|
|
|
+ List<UserRoleInfoFindDTO> data = userRoleFacade.getUserRoles(userRoleInfoFindVO);
|
|
|
|
+ return RespDTO.onSuc(data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "删除医院管理员[by:wangfeng]",notes = "获取医院管理员")
|
|
|
|
+ @PostMapping("/cancelUserRole")
|
|
|
|
+ @SysLogger("cancelUserRole")
|
|
|
|
+ @Transactional
|
|
|
|
+ public RespDTO<Boolean> cancelUserRole(@RequestBody @Valid UserRoleInfoCancelVO userRoleInfoCancelVO) {
|
|
|
|
+ boolean res = userRoleFacade.cancelUserRole(userRoleInfoCancelVO);
|
|
|
|
+ return RespDTO.onSuc(res);
|
|
|
|
+ }
|
|
}
|
|
}
|