收音机页面路径配置
This commit is contained in:
parent
b976f041a3
commit
dfc6f5a1f5
|
|
@ -9,6 +9,7 @@ import com.czg.resp.CzgResult;
|
||||||
import com.czg.sa.StpKit;
|
import com.czg.sa.StpKit;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -42,7 +43,7 @@ public class ShopPagePermissionController {
|
||||||
* @return 是否成功
|
* @return 是否成功
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public CzgResult<Boolean> add(PagePathPermissionAddDTO pagePathPermissionAddDTO) {
|
public CzgResult<Boolean> add(@RequestBody @Validated PagePathPermissionAddDTO pagePathPermissionAddDTO) {
|
||||||
if (StpKit.USER.isStaff()) {
|
if (StpKit.USER.isStaff()) {
|
||||||
return CzgResult.failure("员工无权限");
|
return CzgResult.failure("员工无权限");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.czg.account.dto.pagepath;
|
package com.czg.account.dto.pagepath;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -9,6 +11,8 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class PagePathPermissionAddDTO {
|
public class PagePathPermissionAddDTO {
|
||||||
|
@NotEmpty(message = "权限id不为空")
|
||||||
private List<Long> pagePathIdList;
|
private List<Long> pagePathIdList;
|
||||||
|
@NotNull(message = "员工id不为空")
|
||||||
private Long staffId;
|
private Long staffId;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue