1234567891011121314151617181920212223242526272829303132333435363738 |
- package com.lsw.controller.admin.system.site;
- import com.jfinal.aop.Before;
- import com.jfinal.kit.JsonKit;
- import com.lsw.base.BaseController;
- import com.lsw.model.system.Role;
- import com.lsw.model.system.Site;
- import org.apache.shiro.authz.annotation.RequiresPermissions;
- /**
- * @author 李书文
- * @description 站点管理
- * @time 2017-5-29
- */
- public class SiteController extends BaseController {
- /**
- * 管理页面
- */
- @RequiresPermissions("site:index")
- public void index() {
- Site site=Site.dao.findById("1");
- setAttr("site", JsonKit.toJson(site));
- render("index.html");
- }
- /**
- * 编辑站点
- */
- @RequiresPermissions("site:edit")
- @Before(SiteValidator.class)
- public void edit() {
- Role site = getModel(Role.class, "", true);
- site.update();
- renderSuccess();
- }
- }
|