diff --git a/pom.xml b/pom.xml index 24ad9e0..cea4846 100644 --- a/pom.xml +++ b/pom.xml @@ -169,8 +169,8 @@ ${commons-beanutils.version} - org.springframework.data - spring-data-redis + org.springframework.boot + spring-boot-starter-data-redis org.apache.commons @@ -236,11 +236,6 @@ persistence-api 1.0.2 - - redis.clients - jedis - 3.0.1 - diff --git a/src/main/java/com/zhangmeng/fiction/server/controller/EntranceController.java b/src/main/java/com/zhangmeng/fiction/server/controller/EntranceController.java index 00f37c0..739c889 100644 --- a/src/main/java/com/zhangmeng/fiction/server/controller/EntranceController.java +++ b/src/main/java/com/zhangmeng/fiction/server/controller/EntranceController.java @@ -96,10 +96,18 @@ public class EntranceController extends BaseController { Integer user_count = this.userService.selectCountEq("deleteStatus", false); model.addAttribute("user_count",user_count); //小说数量 - Integer fiction_count = this.fictionService.selectCount(new Fiction()); + Fiction fiction = new Fiction(); + fiction.setDeleteStatus(false); + fiction.setAddTime(null); + fiction.setUpdateTime(null); + Integer fiction_count = this.fictionService.selectCount(fiction); model.addAttribute("fiction_count",fiction_count); //小说集合数量 - Integer fiction_collection = this.fictionCollectionService.selectCount(new FictionCollection()); + FictionCollection fictionCollection = new FictionCollection(); + fictionCollection.setDeleteStatus(false); + fictionCollection.setAddTime(null); + fictionCollection.setUpdateTime(null); + Integer fiction_collection = this.fictionCollectionService.selectCount(fictionCollection); model.addAttribute("fiction_collection",fiction_collection); //消息数量 model.addAttribute("message_count",200); diff --git a/src/main/java/com/zhangmeng/fiction/server/controller/PermissionController.java b/src/main/java/com/zhangmeng/fiction/server/controller/PermissionController.java new file mode 100644 index 0000000..ff384d1 --- /dev/null +++ b/src/main/java/com/zhangmeng/fiction/server/controller/PermissionController.java @@ -0,0 +1,221 @@ +package com.zhangmeng.fiction.server.controller; + + +import com.zhangmeng.fiction.server.common.controller.BaseController; +import com.zhangmeng.fiction.server.common.utils.CommonUtil; +import com.zhangmeng.fiction.server.entity.Permission; +import com.zhangmeng.fiction.server.res.Result; +import com.zhangmeng.fiction.server.res.ResultTree; +import com.zhangmeng.fiction.server.res.StatusCode; +import com.zhangmeng.fiction.server.service.PermissionService; +import com.zhangmeng.fiction.server.service.RolePermissionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import springfox.documentation.annotations.ApiIgnore; +import tk.mybatis.mapper.entity.Condition; +import tk.mybatis.mapper.entity.Example; + +import java.util.List; +import java.util.Map; + +@Api(tags = "权限管理") +@RestController +@RequestMapping("/permission") +public class PermissionController extends BaseController { + + @Autowired + private PermissionService permissionService; + + @Autowired + private RolePermissionService rolePermissionService; + + @ApiIgnore + @GetMapping("/index") + public ModelAndView index() { + return this.jumpPage("admin/permission/list"); + } + + @ApiIgnore + @GetMapping("/add") + public ModelAndView add(Model model) { + model.addAttribute("permissionTypeList", Permission.Type.valueListMap()); + return this.jumpPage("admin/permission/add"); + } + + @ApiIgnore + @GetMapping("/edit") + public ModelAndView edit(Model model, String permissionId) { + if (CommonUtil.isNotNull(permissionId)) { + Permission permission = this.permissionService.findById(Long.parseLong(permissionId)); + model.addAttribute("permission", permission); + model.addAttribute("permissionTypeList",Permission.Type.valueListMap()); + } + return this.jumpPage("admin/permission/edit"); + } + + @ApiOperation("权限列表") + @GetMapping("/list") + public Result list(Integer pageNum, Integer pageSize, String title) { + Condition condition = new Condition(Permission.class); + Example.Criteria criteria = condition.createCriteria(); + if (CommonUtil.isNotNull(title)){ + criteria.andLike("title","%" + title + "%"); + } +// criteria.andEqualTo("status",Permission.Status.show); +// PageHelper.startPage(pageNum,pageSize,"addTime desc"); + List permissionList = this.permissionService.findByCondition(condition); +// PageInfo pageInfo = new PageInfo<>(permissionList); + return new Result(true, 0, "查询成功", permissionList.size(),permissionList); + } + + @ApiOperation("查询上级") + @GetMapping("/selectParent") + public ResultTree selectParent(String parentId) { + Condition condition = new Condition(Permission.class); + Example.Criteria criteria = condition.createCriteria(); + if (parentId != null && !parentId.equals("")) { + criteria.andEqualTo("parent_id", Long.parseLong(parentId)); + } + List list = this.permissionService.findByCondition(condition); + Permission basePower = new Permission(); + basePower.setTitle("顶级权限"); + basePower.setId(0L); + basePower.setParent_id(-1L); + list.add(basePower); + return dataTree(list); + } + + @ApiOperation("保存权限") + @PostMapping("/save") + public Result save(@RequestParam @RequestBody Map map) { + Permission permission = null; + boolean flag = false; + String message = null; + String id = CommonUtil.map_get_value(map, "id"); + if (id == null || id.equals("")) { + permission = new Permission(); + flag = true; + } else { + permission = this.permissionService.findById(Long.parseLong(id)); + } + String parentId = CommonUtil.map_get_value(map, "parentId"); + if (CommonUtil.isNotNull(parentId)) { + permission.setParent_id(Long.parseLong(parentId)); + } + + String title = CommonUtil.map_get_value(map, "title"); + if (CommonUtil.isNotNull(title)) { + permission.setTitle(title); + } + + String code = CommonUtil.map_get_value(map, "code"); + + if (CommonUtil.isNotNull(code)) { + permission.setCode(code); + } + + String type = CommonUtil.map_get_value(map, "type"); + + if (CommonUtil.isNotNull(type)) { + Permission.Type permission_type = null; + if (type.equals("CATALOG")) { + permission_type = Permission.Type.CATALOG; + } + if (type.equals("MENU")) { + permission_type = Permission.Type.MENU; + } + if (type.equals("BUTTON")) { + permission_type = Permission.Type.BUTTON; + } + permission.setType(permission_type); + } + + String href = CommonUtil.map_get_value(map, "href"); + if (CommonUtil.isNotNull(href)) { + permission.setHref(href); + } + + String openType = CommonUtil.map_get_value(map, "openType"); + if (CommonUtil.isNotNull(openType)) { + permission.setOpenType(openType); + } + String icon = CommonUtil.map_get_value(map, "icon"); + if (CommonUtil.isNotNull(icon)) { + permission.setIcon(icon); + } + + String sort = CommonUtil.map_get_value(map, "sort"); + if (CommonUtil.isNotNull(sort)) { + //判断是否为数字 + if (CommonUtil.isNumeric_ASCII(sort)) { + permission.setSort(Integer.parseInt(sort)); + } + } + if (flag) { + message = "保存成功"; + this.permissionService.save(permission); + } else { + message = "修改成功"; + this.permissionService.update(permission); + } + return new Result(true, StatusCode.OK, message); + } + + @ApiOperation("删除权限") + @PostMapping("/delete") + public Result delete(String permissionId) { + if (CommonUtil.isNotNull(permissionId)) { + this.permissionService.deleteById(Long.parseLong(permissionId)); + } + return new Result(true, StatusCode.OK, "删除成功"); + } + + @ApiOperation("批量删除权限") + @PostMapping("/batchRemove") + public Result batchRemove(String ids) { + String id_s = CommonUtil.firstLastComma(ids); + String[] strings = id_s.split(","); + if (strings.length > 0) { + for (String id : strings) { + this.permissionService.deleteById(Long.parseLong(id)); + } + } + return new Result(true, 0, "删除成功"); + } + + @ApiOperation("菜单的显示与隐藏") + @PostMapping("/upStatus") + public Result upStatus(@RequestParam @RequestBody Map params){ + String status = CommonUtil.map_get_value(params, "status"); + String id = CommonUtil.map_get_value(params, "id"); + + if (status == null || status.equals("")){ + return Result.failure("stats不能为空"); + } + + if (id == null || id.equals("")){ + return Result.failure("id不能为空"); + } + + if (status.equals("true")){ + status = "show"; + }else { + status = "hidden"; + } + + + Permission.Status st = CommonUtil.getEnum(status,Permission.Status.class); + Permission permission = this.permissionService.findById(Long.parseLong(id)); + + if (permission != null){ + permission.setStatus(st); + this.permissionService.update(permission); + } + + return Result.success("操作成功"); + } +} diff --git a/src/main/java/com/zhangmeng/fiction/server/controller/RoleController.java b/src/main/java/com/zhangmeng/fiction/server/controller/RoleController.java new file mode 100644 index 0000000..5911b28 --- /dev/null +++ b/src/main/java/com/zhangmeng/fiction/server/controller/RoleController.java @@ -0,0 +1,163 @@ +package com.zhangmeng.fiction.server.controller; + +import com.github.pagehelper.PageInfo; +import com.zhangmeng.fiction.server.common.controller.BaseController; +import com.zhangmeng.fiction.server.common.utils.CommonUtil; +import com.zhangmeng.fiction.server.entity.Permission; +import com.zhangmeng.fiction.server.entity.Role; +import com.zhangmeng.fiction.server.query.QueryParams; +import com.zhangmeng.fiction.server.res.Result; +import com.zhangmeng.fiction.server.res.ResultTree; +import com.zhangmeng.fiction.server.res.StatusCode; +import com.zhangmeng.fiction.server.service.PermissionService; +import com.zhangmeng.fiction.server.service.RolePermissionService; +import com.zhangmeng.fiction.server.service.RoleService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import springfox.documentation.annotations.ApiIgnore; +import tk.mybatis.mapper.entity.Condition; +import tk.mybatis.mapper.entity.Example; + +import java.util.Date; +import java.util.Map; + +@Api(tags = "角色管理") +@RestController +@RequestMapping("/role") +public class RoleController extends BaseController { + + @Autowired + private RoleService roleService; + + @ApiIgnore + @GetMapping("/index") + public ModelAndView index() { + return this.jumpPage("admin/role/list"); + } + + @ApiIgnore + @GetMapping("/add") + public ModelAndView add(Model model) { + model.addAttribute("roleStatusList", Role.Status.enumListMap()); + return this.jumpPage("admin/role/add"); + } + + @ApiIgnore + @GetMapping("/edit") + public ModelAndView edit(Model model, String roleId) { + if (roleId != null && !roleId.equals("")) { + Role role = this.roleService.findById(Long.parseLong(roleId)); + model.addAttribute("roleTypeList", Role.Type.enumListMap()); + model.addAttribute("role", role); + } + return this.jumpPage("admin/role/edit"); + } + + /** + * 授权 + * + * @param model + * @param roleId + * @return + */ + @ApiIgnore + @GetMapping("/authorize") + public ModelAndView authorize(Model model, String roleId) { + if (roleId != null && !roleId.equals("")) { + Role role = this.roleService.findById(Long.parseLong(roleId)); + model.addAttribute("roleTypeList", Role.Type.enumListMap()); + model.addAttribute("role", role); + } + return this.jumpPage("admin/role/authorize"); + } + + @ApiOperation("角色保存") + @PostMapping("/save") + public Result save(@RequestParam @RequestBody Map map) { + String roleId = CommonUtil.map_get_value(map, "roleId"); + boolean flag = false; + Role role = null; + if (roleId == null || roleId.equals("")) { + flag = true; + role = new Role(); + role.setAddTime(new Date()); + role.setUpdateTime(new Date()); + role.setDeleteStatus(false); + } else { + role = this.roleService.findById(Long.parseLong(roleId)); + } + + String type = CommonUtil.map_get_value(map, "type"); + if (CommonUtil.isNotNull(type)) { + role.setType(CommonUtil.getEnum(type, Role.Type.class)); + } + String roleName = CommonUtil.map_get_value(map, "roleName"); + if (CommonUtil.isNotNull(roleName)) { + role.setRoleName(roleName); + } + String status = CommonUtil.map_get_value(map, "status"); + if (CommonUtil.isNotNull(status)) { + role.setStatus(CommonUtil.getEnum(status, Role.Status.class)); + } + + String description = CommonUtil.map_get_value(map, "description"); + if (CommonUtil.isNotNull(description)) { + role.setDescription(description); + } + if (flag) { + this.roleService.save(role); + } else { + this.roleService.update(role); + } + return Result.success("添加成功"); + } + + @ApiOperation("角色列表") + @GetMapping("/list") + public Result list(Integer pageNum, Integer pageSize,String roleName,String roleCode) { + Condition condition = new Condition(Role.class); + Example.Criteria criteria = condition.createCriteria(); + if (CommonUtil.isNotNull(roleName)){ + criteria.andEqualTo("roleName",roleName); + } + + if (CommonUtil.isNotNull(roleCode)){ + criteria.andEqualTo("roleCode",roleCode); + } + PageInfo pageInfo = this.roleService.findByCondition(new QueryParams(pageNum, pageSize, condition),true); + return new Result(true, StatusCode.OK, "重新成功", pageInfo.getTotal(),pageInfo.getList()); + } + + /** + * Describe: 获取角色权限 + * Param RoleId + * Return ResuTree + */ + @GetMapping("/getRolePower") + @ApiOperation(value = "获取角色权限数据") + public ResultTree getRolePower(String roleId) { + return dataTree(this.roleService.getRolePermission(roleId)); + } + + @ApiOperation("角色删除") + @PostMapping("/delete") + public Result delete(String roleId) { + if (CommonUtil.isNotNull(roleId) && CommonUtil.isNumeric_ASCII(roleId)) { + this.roleService.deleteById(Long.parseLong(roleId)); + } + return Result.success("删除成功"); + } + + @ApiOperation("批量删除") + @PostMapping("/batchRemove") + public Result batchRemove(String ids){ + if (CommonUtil.isNotNull(ids)){ + this.roleService.deleteByIds(CommonUtil.firstLastComma(ids)); + } + return Result.success("批量删除成功"); + } +} diff --git a/src/main/java/com/zhangmeng/fiction/server/controller/UserController.java b/src/main/java/com/zhangmeng/fiction/server/controller/UserController.java new file mode 100644 index 0000000..ff8f922 --- /dev/null +++ b/src/main/java/com/zhangmeng/fiction/server/controller/UserController.java @@ -0,0 +1,265 @@ +package com.zhangmeng.fiction.server.controller; + +import com.github.pagehelper.PageInfo; +import com.zhangmeng.fiction.server.common.controller.BaseController; +import com.zhangmeng.fiction.server.common.utils.CommonUtil; +import com.zhangmeng.fiction.server.common.utils.UserUtil; +import com.zhangmeng.fiction.server.dto.LoginUser; +import com.zhangmeng.fiction.server.dto.Token; +import com.zhangmeng.fiction.server.entity.Permission; +import com.zhangmeng.fiction.server.entity.Role; +import com.zhangmeng.fiction.server.entity.User; +import com.zhangmeng.fiction.server.entity.VerificationCode; +import com.zhangmeng.fiction.server.query.QueryParams; +import com.zhangmeng.fiction.server.res.Result; +import com.zhangmeng.fiction.server.res.ResultTree; +import com.zhangmeng.fiction.server.res.StatusCode; +import com.zhangmeng.fiction.server.service.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; +import springfox.documentation.annotations.ApiIgnore; +import tk.mybatis.mapper.entity.Condition; +import tk.mybatis.mapper.entity.Example; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author zhangmeng + * @version 1.0 + * @date 2021年7月10日09:15:06 + */ +@Slf4j +@Api(tags = "用户管理") +@RestController +@RequestMapping("/user") +public class UserController extends BaseController { + + @Autowired + private UserService userService; + + @Autowired + private VerificationCodeService verificationCodeService; + + @Autowired + private PermissionService permissionService; + + @Autowired + private TokenService tokenService; + + @ApiIgnore + @GetMapping("/index") + public ModelAndView index() { + return this.jumpPage("admin/user/list"); + } + + @ApiIgnore + @GetMapping("/add") + public ModelAndView add() { + return this.jumpPage("admin/user/add"); + } + + @ApiIgnore + @GetMapping("/edit") + public ModelAndView edit(Model model, String userId) { + if (userId != null && !userId.equals("")) { + User user = this.userService.findById(Long.parseLong(userId)); + model.addAttribute("user", user); + } + return this.jumpPage("admin/user/edit"); + } + + @ApiIgnore + @GetMapping("/person") + public ModelAndView person(Model model) { + User user = this.userService.findById(UserUtil.getLoginUser().getId()); + model.addAttribute("loginUser", user); + //性别 + model.addAttribute("gender_list", User.Gender.enumListMap()); + //状态 + model.addAttribute("status_list", User.Status.enumListMap()); + //角色类型 + model.addAttribute("type_list", Role.Type.enumListMap()); + return this.jumpPage("admin/user/person"); + } + + @ApiOperation("用户保存") + @PostMapping("/save") + public Result save(@RequestParam @RequestBody Map parms) { + return this.userService.save_user(parms); + } + + @ApiOperation("用户删除") + @PostMapping("/delete") + public Result delete(String userId) { + if (userId != null && !userId.equals("")) { + this.userService.deleteById(Long.parseLong(userId)); + } + return new Result(true, StatusCode.OK, "删除成功"); + } + + @ApiOperation("用户列表") + @GetMapping("/list") + public Result list(Integer pageNum, Integer pageSize, String username, String telephone) { + Condition condition = new Condition(User.class); + Example.Criteria criteria = condition.createCriteria(); + if (username != null && !username.equals("")) { + criteria.andLike("username", "%" + username + "%"); + } + if (telephone != null && !telephone.equals("")) { + criteria.andLike("telephone", "%" + telephone + "%"); + } + PageInfo pageInfo = this.userService.findByCondition(new QueryParams(pageNum, pageSize, condition, "addTime desc"), true); + return new Result(true, StatusCode.OK, "查询成功", pageInfo.getTotal(), pageInfo.getList()); + } + + @ApiOperation("用户批量删除") + @PostMapping("/batchRemove") + public Result batchRemove(String ids) { + if (CommonUtil.isNotNull(ids)) { + this.userService.deleteByIds(CommonUtil.firstLastComma(ids)); + } + return Result.success("批量删除成功"); + } + + @ApiIgnore + @GetMapping("/reg") + public ModelAndView reg() { + return this.jumpPage("admin/user/reg"); + } + + @ApiOperation("注册保存") + @PostMapping("/reg_save") + public Result reg_save(@RequestParam @RequestBody Map parms) { + return this.userService.reg_save(parms); + } + + @ApiOperation("获取当前用户") + @GetMapping("/current") + public Result current() { + return new Result(true, StatusCode.OK, "查询成功", UserUtil.getLoginUser()); + } + + @ApiOperation("个人资料修改") + @PostMapping("/personUpdate") + public Result personUpdate(@RequestParam @RequestBody Map map) { + User user = null; + boolean flag = false; + String userId = CommonUtil.map_get_value(map, "userId"); + if (userId != null && !userId.equals("")) { + user = this.userService.findById(Long.parseLong(userId)); + flag = true; + } else { + user = new User(); + } + String username = CommonUtil.map_get_value(map, "username"); + if (CommonUtil.isNotNull(username)) { + user.setUsername(username); + } + + String sex = CommonUtil.map_get_value(map, "sex"); + if (CommonUtil.isNotNull(sex)) { + user.setGender(CommonUtil.getEnum(sex, User.Gender.class)); + } + String status = CommonUtil.map_get_value(map, "status"); + if (CommonUtil.isNotNull(status)) { + user.setStatus(CommonUtil.getEnum(status, User.Status.class)); + } + + String role_type = CommonUtil.map_get_value(map, "role_name"); + if (CommonUtil.isNotNull(role_type)) { + user.setRoleType(CommonUtil.getEnum(role_type, Role.Type.class)); + } + + String email = CommonUtil.map_get_value(map, "email"); + if (CommonUtil.isNotNull(email)) { + user.setEmail(email); + } + String telephone = CommonUtil.map_get_value(map, "telephone"); + if (CommonUtil.isNotNull(telephone)) { + user.setTelephone(telephone); + } + + String profession = CommonUtil.map_get_value(map, "profession"); + if (CommonUtil.isNotNull(profession)) { + user.setProfession(profession); + } + + String sign = CommonUtil.map_get_value(map, "sign"); + if (CommonUtil.isNotNull(sign)) { + user.setSign(sign); + } + + String file_id = CommonUtil.map_get_value(map, "file_id"); + if (CommonUtil.isNotNull(file_id)) { + user.setPhoto_id(Long.parseLong(file_id)); + } + String upload_image = CommonUtil.map_get_value(map, "upload_image"); + if (CommonUtil.isNotNull(upload_image)) { + user.setAvatar(upload_image); + } + + String now_pos = CommonUtil.map_get_value(map, "now_pos"); + if (CommonUtil.isNotNull(now_pos)) { + user.setNow_pos(now_pos); + } + + if (flag) { + this.userService.update(user); + } else { + this.userService.save(user); + } + return Result.success("修改成功"); + } + + + @PostMapping("/loginVerification") + public ResponseEntity loginVerification(@RequestBody Map params) { + //判断验证码是否正确 + String telephone = CommonUtil.map_get_value(params, "phone"); + String code = CommonUtil.map_get_value(params, "verificationCode"); + boolean flag = false; + if (CommonUtil.isNotNull(code) && CommonUtil.isNotNull(telephone)) { + Condition condition = new Condition(VerificationCode.class); + Example.Criteria criteria = condition.createCriteria(); + criteria.andEqualTo("telephone", telephone); + criteria.andEqualTo("code", code); + List codeList = this.verificationCodeService.findByCondition(condition); + if (codeList.size() > 0) { + flag = true; + } + } + Token token = null; + boolean istrue = false; + if (flag) { + //根据手机号查询登录对象 + Condition condition = new Condition(User.class); + Example.Criteria criteria = condition.createCriteria(); + criteria.andEqualTo("telephone", telephone); + List users = this.userService.findByCondition(condition); + if (users.size() > 0) { + User user = users.get(0); + List permissions = this.permissionService.findByUserId(user.getId()); + LoginUser loginUser = new LoginUser(); + BeanUtils.copyProperties(user, loginUser); + loginUser.setPermissions(permissions); + token = this.tokenService.saveToken(loginUser); + istrue = true; + } + } + if (istrue){ + Map result = new HashMap<>(); + result.put("isNew", false); result.put("token", token.getToken()); + return ResponseEntity.ok(result); + } + return null; + } +} diff --git a/src/main/resources/templates/admin/home/home.ftl b/src/main/resources/templates/admin/home/home.ftl new file mode 100644 index 0000000..c83d6d4 --- /dev/null +++ b/src/main/resources/templates/admin/home/home.ftl @@ -0,0 +1,335 @@ + + + + + 首页 + + + + + + + + + + + + + + 用户人数 + + + + 0 + + + + + + + + + + + + + + + + + + + 小说集合数量 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + 小说数量 + + + + 0 + + + + + + + + + + + + + + + + + + + + 消息数量 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 登录日志 + + + + <#if sysLogs ??> + <#list sysLogs as syslog> + + + + + ${syslog.addTime?string('yyyy-MM-dd hh:mm')} ${syslog.description!} + ${syslog.date_difference!} + + + <#else > + 暂无记录 + #list> + #if> + + + + + + + 最近小说 + + + <#if articleList ??> + <#list articleList as article> + ${article.bookName!}${article.addTime?string('yyyy-MM-dd hh:mm')} + #list> + <#else > + 暂无文章 + #if> + + + + + + + + + + + + + diff --git a/src/main/resources/templates/admin/permission/add.ftl b/src/main/resources/templates/admin/permission/add.ftl new file mode 100644 index 0000000..0052226 --- /dev/null +++ b/src/main/resources/templates/admin/permission/add.ftl @@ -0,0 +1,183 @@ + + + + 添加权限 + + + + + + + + + 父级 + + + + + + 名称 + + + + + + 标识 + + + + + + 状态 + +<#-- --> +<#-- --> +<#-- --> + + + <#if permissionTypeList ??> + <#list permissionTypeList as permissionType> + <#if permissionType.value == 'MENU'> + + <#else > + + #if> + #list> + #if> + + + + 路径 + + + + + + 打开 + + + + 框架 + 签页 + + + + + 图标 + + + + + + 排序 + + + + + + + + + + + + 提交 + + + + 重置 + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/admin/permission/edit.ftl b/src/main/resources/templates/admin/permission/edit.ftl new file mode 100644 index 0000000..581bc4f --- /dev/null +++ b/src/main/resources/templates/admin/permission/edit.ftl @@ -0,0 +1,222 @@ + + + + 添加权限 + + + + + + + + + 父级 + + + + + + 名称 + + + + + + 标识 + + + + + + 状态 + + <#if permissionTypeList ??> + <#list permissionTypeList as permissionType> + <#if permissionType.value == permission.type> + + <#else > + + #if> + #list> + #if> + + + + 路径 + + + + + + 打开 + + + + <#if permission.openType ??> + <#if permission.openType == '_iframe'> + 框架 + 签页 + <#else > + 框架 + 签页 + #if> + <#else > + 框架 + 签页 + #if> + + + + + 图标 + + + + + + 排序 + + + + + + + + + + + + 提交 + + + + 重置 + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/admin/permission/list.ftl b/src/main/resources/templates/admin/permission/list.ftl new file mode 100644 index 0000000..9b23290 --- /dev/null +++ b/src/main/resources/templates/admin/permission/list.ftl @@ -0,0 +1,299 @@ + + + + + 权限管理 + + + + + + + + + 权限名称 + + + + + + + + + 查询 + + + + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file
${syslog.addTime?string('yyyy-MM-dd hh:mm')} ${syslog.description!}