Commit 0cefa4b3 by HlQ

[chg] 权限修改

1 parent c1e946f1
......@@ -45,20 +45,20 @@ public class DictionaryController {
}
@GetMapping("/dictionaryTypes")
@SaCheckPermission("dict:type:list")
@SaCheckPermission(value = "dict:type:list", orRole = "admin")
public Page<DictionaryType> getDictionaryTypeList(DictionaryTypeDTO data) {
return dictionaryTypeService.lambdaQuery(converter.convert(data, new DictionaryType()))
.page(Page.of(data.getPageNum(), data.getPageSize()));
}
@GetMapping("/dictionaryType")
@SaCheckPermission("dict:type:query")
@SaCheckPermission(value = "dict:type:query", orRole = "admin")
public Object getDictionaryTypeByID(@RequestParam Integer id) {
return dictionaryTypeService.getById(id);
}
@PostMapping("/dictionaryType")
@SaCheckPermission("dict:type:editAndSave")
@SaCheckPermission(value = "dict:type:editAndSave", orRole = "admin")
public String saveOrUpdateDictionaryType(@RequestBody DictionaryTypeDTO data) {
DictionaryType dictionaryType = converter.convert(data, new DictionaryType());
return dictionaryTypeService.saveOrUpdate(dictionaryType) ? "成功" : "失败";
......
......@@ -26,7 +26,7 @@ public class RRoleResourceController {
private final Converter converter;
@PostMapping("/rRoleRes")
@SaCheckPermission("role:resource:edit")
@SaCheckPermission(value = "role:resource:edit", orRole = "admin")
public String saveOrUpdateRUserRole(@RequestBody List<RRoleResourceDTO> dto) {
List<Long> roleIdList = dto.stream().map(RRoleResourceDTO::getRoleId).collect(Collectors.toList());
roleResourceService.lambdaUpdate().in(RRoleResource::getRoleId, roleIdList).remove();
......
......@@ -23,7 +23,7 @@ public class RUserRoleController {
private final Converter converter;
@PostMapping("/rUserRole")
@SaCheckPermission("user:role:edit")
@SaCheckPermission(value = "user:role:edit", orRole = "admin")
public String saveOrUpdateRUserRole(@RequestBody List<RUserRoleDTO> dto) {
List<Long> userIdList = dto.stream().map(RUserRoleDTO::getUserId).collect(Collectors.toList());
rUserRoleService.lambdaUpdate().in(RUserRole::getUserId, userIdList).remove();
......
......@@ -42,7 +42,7 @@ public class TaskController {
}
@GetMapping("/faultLogs")
@SaCheckPermission("task:log:list")
@SaCheckPermission(value = "task:log:list", orRole = "admin")
public List<FaultLog> getFaultLogById(Integer storeId, Integer taskId) {
return faultLogService.lambdaQuery()
.eq(FaultLog::getStoreId, storeId)
......
......@@ -64,7 +64,7 @@ public class UserController {
return Opt.ofEmptyAble(data).map(userService::updateBatchById).orElse(false) ? "更新成功" : "更新失败";
}
@GetMapping("/user/{token}")
@SaCheckPermission("user:token:query")
@SaCheckPermission(value = "user:token:query", orRole = "admin")
public UserVO getUserByToken(@PathVariable String token) {
return Global.USERNAME_MAP.get(token);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!