2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package com.landtool.lanbase.modules.api.controller;
 
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.landtool.lanbase.modules.api.utils.PageBean;
import com.landtool.lanbase.modules.res.entity.Res_Catalog;
import com.landtool.lanbase.modules.res.entity.Res_MainInfo;
import com.landtool.lanbase.modules.res.entity.Role_ResCatalog;
import com.landtool.lanbase.modules.res.service.ResCatalogService;
import com.landtool.lanbase.modules.res.service.RoleResCatalogService;
import com.landtool.lanbase.modules.sys.controller.AbstractController;
@Controller
@RequestMapping("/api/res")
public class RoleResController extends AbstractController {
    
    
         @Autowired
        RoleResCatalogService roleResCatalogService;
         
         @Autowired
         ResCatalogService resCatalogService;
         
        //插入角色-资源 管理
        @ResponseBody
        @GetMapping("insert")
        public String insertRoleResCatalogRel(Role_ResCatalog bean) {
             boolean result=roleResCatalogService.insertRoleResCatalogRel(bean);
            return result?"插入成功":"插入失败";
        
 
        }
        
        @ResponseBody
        @GetMapping("query")
        public String queryRoleResCatalogRel(Role_ResCatalog bean) {     
             List<Role_ResCatalog> list=roleResCatalogService.queryRoleResCatalogRel(bean);
            return JSONObject.toJSONStringWithDateFormat(list, "yyyy-MM-dd HH:mm:ss", SerializerFeature.PrettyFormat);
        }
 
        
        @ResponseBody
        @GetMapping("update")
        public String updateRoleResCatalogRel(Role_ResCatalog bean) {     
             boolean result=roleResCatalogService.updateRoleResCatalogRel(bean);
             return result?"更新成功":"更新失败";
        }
 
        
 
        
}