|
|
|
@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Date; |
|
|
|
@ -89,7 +90,7 @@ public class RolePermissionController { |
|
|
|
|
*/ |
|
|
|
|
@Transactional |
|
|
|
|
@PostMapping("/saveRolePermission") |
|
|
|
|
public ResponseResult saveRolePermission(@RequestBody RolePermissionRequest rolePermission) { |
|
|
|
|
public ResponseResult saveRolePermission(@Valid @RequestBody RolePermissionRequest rolePermission) { |
|
|
|
|
Date date = new Date(); |
|
|
|
|
rolePermission.setCreateTime(date); |
|
|
|
|
rolePermission.setMotifyTime(date); |
|
|
|
@ -122,7 +123,7 @@ public class RolePermissionController { |
|
|
|
|
*/ |
|
|
|
|
@Transactional |
|
|
|
|
@PostMapping("/updateRolePermission") |
|
|
|
|
public ResponseResult updateRolePermission(@RequestBody RolePermissionRequest rolePermission) { |
|
|
|
|
public ResponseResult updateRolePermission(@Valid @RequestBody RolePermissionRequest rolePermission) { |
|
|
|
|
Date date = new Date(); |
|
|
|
|
rolePermission.setMotifyTime(date); |
|
|
|
|
//根据角色Id修改角色内容
|
|
|
|
|