Przeglądaj źródła

新增个人信息

RuoYi 7 lat temu
rodzic
commit
ba37447239

+ 1 - 1
README.md

@@ -20,7 +20,7 @@
 12. 在线构建器:拖动表单元素生成相应的HTML代码
 13. 连接池监视:监视当期系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
 
-## 系统演示 ## [www.ruoyi.club](http://www.ruoyi.club)
+## 系统演示 [www.ruoyi.club](http://www.ruoyi.club)
 
 ![登录界面](https://static.oschina.net/uploads/space/2018/0425/110329_Ftsu_1438828.png)
 

+ 2 - 2
src/main/java/com/ruoyi/project/system/menu/dao/IMenuDao.java

@@ -59,9 +59,9 @@ public interface IMenuDao
     public Menu selectMenuById(Long menuId);
     
     /**
-     * 查询菜单数量
+     * 查询菜单数量
      * 
-     * @param menuId 菜单ID
+     * @param parentId 菜单父ID
      * @return 结果
      */
     public int selectCountMenuByParentId(Long parentId);

+ 2 - 2
src/main/java/com/ruoyi/project/system/menu/service/IMenuService.java

@@ -77,9 +77,9 @@ public interface IMenuService
     public Menu selectMenuById(Long menuId);
 
     /**
-     * 查询菜单数量
+     * 查询菜单数量
      * 
-     * @param menuId 菜单ID
+     * @param parentId 菜单父ID
      * @return 结果
      */
     public int selectCountMenuByParentId(Long parentId);

+ 2 - 2
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java

@@ -81,7 +81,7 @@ public class RoleController extends BaseController
     @RequiresPermissions("system:role:save")
     @Log(title = "系统管理", action = "角色管理-保存角色")
     @PostMapping("/save")
-    @Transactional
+    @Transactional(rollbackFor=Exception.class)
     @ResponseBody
     public Message save(Role role)
     {
@@ -95,7 +95,7 @@ public class RoleController extends BaseController
     @RequiresPermissions("system:role:remove")
     @Log(title = "系统管理", action = "角色管理-删除角色")
     @RequestMapping("/remove/{roleId}")
-    @Transactional
+    @Transactional(rollbackFor=Exception.class)
     @ResponseBody
     public Message remove(@PathVariable("roleId") Long roleId)
     {

+ 7 - 0
src/main/java/com/ruoyi/project/system/user/controller/IndexController.java

@@ -47,4 +47,11 @@ public class IndexController extends BaseController
         return "main";
     }
 
+    // 个人信息
+    @GetMapping("/system/profile")
+    public String profile(Model model)
+    {
+        return "system/user/profile";
+    }
+
 }

+ 3 - 3
src/main/java/com/ruoyi/project/system/user/controller/UserController.java

@@ -120,7 +120,7 @@ public class UserController extends BaseController
     @RequiresPermissions("system:user:remove")
     @Log(title = "系统管理", action = "用户管理-删除用户")
     @RequestMapping("/remove/{userId}")
-    @Transactional
+    @Transactional(rollbackFor=Exception.class)
     @ResponseBody
     public Message remove(@PathVariable("userId") Long userId)
     {
@@ -139,7 +139,7 @@ public class UserController extends BaseController
     @RequiresPermissions("system:user:batchRemove")
     @Log(title = "系统管理", action = "用户管理-批量删除")
     @PostMapping("/batchRemove")
-    @Transactional
+    @Transactional(rollbackFor=Exception.class)
     @ResponseBody
     public Message batchRemove(@RequestParam("ids[]") Long[] ids)
     {
@@ -157,7 +157,7 @@ public class UserController extends BaseController
     @RequiresPermissions("system:user:save")
     @Log(title = "系统管理", action = "部门管理-保存部门")
     @PostMapping("/save")
-    @Transactional
+    @Transactional(rollbackFor=Exception.class)
     @ResponseBody
     public Message save(User user)
     {

BIN
src/main/resources/static/img/a1.jpg


BIN
src/main/resources/static/img/a2.jpg


BIN
src/main/resources/static/img/a3.jpg


BIN
src/main/resources/static/img/a4.jpg


BIN
src/main/resources/static/img/a5.jpg


BIN
src/main/resources/static/img/a6.jpg


BIN
src/main/resources/static/img/a7.jpg


BIN
src/main/resources/static/img/a8.jpg


BIN
src/main/resources/static/img/a9.jpg


+ 6 - 3
src/main/resources/templates/index.html

@@ -16,6 +16,9 @@
     <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
     <link href="../static/css/animate.css" th:href="@{/css/animate.css}" rel="stylesheet"/>
     <link href="../static/css/style.css" th:href="@{/css/style.css}" rel="stylesheet"/>
+    <style type="text/css">
+        .nav > li:hover .dropdown-menu {display: block;}
+    </style>
 </head>
 <body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
 <div id="wrapper">
@@ -32,11 +35,11 @@
                          <img src="img/profile_small.jpg" alt="image" class="img-circle" height="60" width="60"/></span>
                          <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                          <span class="clear"><span class="block m-t-xs"><strong class="font-bold" th:text="${user.userName}">RuoYi</strong></span>
-                         <span class="text-muted text-xs block" th:text="${user.dept.deptName}">研发部<b class="caret"></b></span> </span> </a>
+                         <span class="text-muted text-xs block"><span th:text="${user.dept.deptName}">研发部</span> <b class="caret"></b></span> </span> </a>
                          <ul class="dropdown-menu animated fadeInRight m-t-xs">
-                             <li><a class="menuItem" href="profile.html">个人信息</a></li>
+                             <li><a class="menuItem" th:href="@{/system/profile}">个人信息</a></li>
                              <li class="divider"></li>
-                             <li><a th-href="@{/logout}">退出</a></li>
+                             <li><a th:href="@{logout}">退出</a></li>
                          </ul>
                     </div>
                 </li>

+ 49 - 0
src/main/resources/templates/system/user/profile.html

@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!--360浏览器优先以webkit内核解析-->
+    <title>个人信息</title>
+    <link rel="shortcut icon" href="favicon.ico">
+    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
+    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+    <link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
+    <link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
+</head>
+
+<body class="gray-bg">
+    <div class="wrapper wrapper-content">
+        <div class="row animated fadeInRight">
+            <div class="col-sm-6">
+                <div class="ibox float-e-margins">
+                    <div class="ibox-title">
+                        <h5>个人资料</h5>
+                    </div>
+                    <div class="contact-box">
+	                        <div class="col-sm-4">
+	                            <div class="text-center">
+	                                <img alt="image" class="img-circle m-t-xs img-responsive" src="/img/a2.jpg">
+	                                <div class="m-t-xs font-bold">CEO</div>
+	                            </div>
+	                        </div>
+	                        <div class="col-sm-8">
+	                            <h3><strong>admin</strong></h3>
+	                            <p><i class="fa fa-user"></i> 若依 / 管理员</p>
+	                            <p><i class="fa fa-phone"></i> 15888888888</p>
+	                            <p><i class="fa fa-group"></i> 开发一部 / 初级开发</p>
+	                            <p><i class="fa fa-transgender"></i> 女</p>
+	                            <p><i class="fa fa-envelope-o"></i> ruoyi@163.com</p>
+	                            <p><i class="fa fa-calendar"></i> 2018-05-20 13:14:00</p>
+	                        </div>
+	                        <div class="clearfix"></div>
+	                    </a>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
+    <script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
+</body>
+</html>