|
@@ -562,6 +562,40 @@ public class SmartAuthorGroupController implements SmartAuthorGroupControllerAPI
|
|
|
|
|
|
|
|
@PassToken
|
|
@PassToken
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @DESRespondSecret(validated = false)
|
|
|
|
|
+ public CommonResult getSmartAuthorGroupMenu(Integer id) {
|
|
|
|
|
+ SmartAuthorGroup smartAuthorGroup = smartAuthorGroupService.getSmartById(id);
|
|
|
|
|
+ if (smartAuthorGroup==null || smartAuthorGroup.getDeleted()==1){
|
|
|
|
|
+ return CommonResult.fail("当前权限组已删除");
|
|
|
|
|
+ }
|
|
|
|
|
+ String[] applyIds = smartAuthorGroup.getApplyId().split(",");
|
|
|
|
|
+ QueryWrapper<SmartMenu> queryWrapper2 = new QueryWrapper<>();
|
|
|
|
|
+ queryWrapper2.eq("deleted", 0);
|
|
|
|
|
+ List<String> applyId_ = Arrays.asList(applyIds);
|
|
|
|
|
+ queryWrapper2.in("id", applyId_);
|
|
|
|
|
+ List<SmartMenu> list2 = smartMenuService.list(queryWrapper2);
|
|
|
|
|
+ return CommonResult.ok(list2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PassToken
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CommonResult updateSmartAuthorGroupName(JSONObject jsonObject) {
|
|
|
|
|
+ Integer id = jsonObject.getInteger("id");
|
|
|
|
|
+ String name = jsonObject.getString("name");
|
|
|
|
|
+ if (id==null || name==null){
|
|
|
|
|
+ return CommonResult.fail("请传入参数");
|
|
|
|
|
+ }
|
|
|
|
|
+ SmartAuthorGroup smartAuthorGroup = smartAuthorGroupService.getSmartById(id);
|
|
|
|
|
+ if (smartAuthorGroup==null || smartAuthorGroup.getDeleted()==1){
|
|
|
|
|
+ return CommonResult.fail("该权限组已删除");
|
|
|
|
|
+ }
|
|
|
|
|
+ smartAuthorGroup.setName(name);
|
|
|
|
|
+ smartAuthorGroupService.updateSmartAuthorGroup(smartAuthorGroup);
|
|
|
|
|
+ return CommonResult.ok("修改成功");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PassToken
|
|
|
|
|
+ @Override
|
|
|
@DESRespondSecret(validated = true)
|
|
@DESRespondSecret(validated = true)
|
|
|
public CommonResult queryUserAuthor(String userId) {
|
|
public CommonResult queryUserAuthor(String userId) {
|
|
|
String[] userids = userId.split(",");
|
|
String[] userids = userId.split(",");
|