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?"更新成功":"更新失败";
|
}
|
|
|
|
|
}
|