|
|
|
@ -10,6 +10,7 @@ import com.zh.project0512.utils.BizException;
|
|
|
|
|
import com.zh.project0512.utils.result.HttpStatusEnum;
|
|
|
|
|
import com.zh.project0512.utils.result.Result;
|
|
|
|
|
import com.zh.project0512.utils.result.ResultPageInfo;
|
|
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -35,6 +36,7 @@ public class UserRoleController {
|
|
|
|
|
* @param userRoleListDTO 用户角色 list DTO
|
|
|
|
|
* @return 用户角色
|
|
|
|
|
*/
|
|
|
|
|
@Operation(summary = "查询用户角色")
|
|
|
|
|
@PostMapping("/list")
|
|
|
|
|
public ResultPageInfo<UserRoleListVo> list(@Validated @RequestBody UserRoleListDTO userRoleListDTO){
|
|
|
|
|
return ResultPageInfo.success(userRoleService.list(userRoleListDTO));
|
|
|
|
@ -45,6 +47,7 @@ public class UserRoleController {
|
|
|
|
|
* @param userRoleInsertDTO 用户角色添加
|
|
|
|
|
* @return 操作信息
|
|
|
|
|
*/
|
|
|
|
|
@Operation(summary = "添加用户角色")
|
|
|
|
|
@PostMapping("/insert")
|
|
|
|
|
public Result<String> insert(@Validated @RequestBody UserRoleInsertDTO userRoleInsertDTO){
|
|
|
|
|
if (userRoleService.insert(userRoleInsertDTO)){
|
|
|
|
@ -59,6 +62,7 @@ public class UserRoleController {
|
|
|
|
|
* @param userRoleUpdateDTO 用户角色 update DTO
|
|
|
|
|
* @return 操作信息
|
|
|
|
|
*/
|
|
|
|
|
@Operation(summary = "修改用户角色")
|
|
|
|
|
@PostMapping("/update")
|
|
|
|
|
public Result<String> update(@Validated @RequestBody UserRoleUpdateDTO userRoleUpdateDTO){
|
|
|
|
|
if (userRoleService.update(userRoleUpdateDTO)){
|
|
|
|
|