diff --git a/yyq/front/.idea/.gitignore b/yyq/front/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/yyq/front/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/yyq/front/.idea/front.iml b/yyq/front/.idea/front.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/yyq/front/.idea/front.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/yyq/front/.idea/inspectionProfiles/Project_Default.xml b/yyq/front/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..146ab09 --- /dev/null +++ b/yyq/front/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/yyq/front/.idea/misc.xml b/yyq/front/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/yyq/front/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/yyq/front/.idea/modules.xml b/yyq/front/.idea/modules.xml new file mode 100644 index 0000000..a3b5ecf --- /dev/null +++ b/yyq/front/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/yyq/front/api/clear.json b/yyq/front/api/clear.json new file mode 100644 index 0000000..e0f5ed7 --- /dev/null +++ b/yyq/front/api/clear.json @@ -0,0 +1,4 @@ +{ + "code": 1, + "msg": "服务端清理缓存成功" +} \ No newline at end of file diff --git a/yyq/front/api/init.json b/yyq/front/api/init.json new file mode 100644 index 0000000..e8e74d4 --- /dev/null +++ b/yyq/front/api/init.json @@ -0,0 +1,234 @@ +[ + { + "title": "常规管理", + "icon": "fa fa-address-book", + "href": "", + "target": "_self", + "child": [ + { + "title": "主页模板", + "href": "", + "icon": "fa fa-home", + "target": "_self", + "child": [ + { + "title": "主页一", + "href": "page/welcome-1.html", + "icon": "fa fa-tachometer", + "target": "_self" + }, + { + "title": "主页二", + "href": "page/welcome-2.html", + "icon": "fa fa-tachometer", + "target": "_self" + }, + { + "title": "主页三", + "href": "page/welcome-3.html", + "icon": "fa fa-tachometer", + "target": "_self" + } + ] + }, + { + "title": "菜单管理", + "href": "page/menu.html", + "icon": "fa fa-window-maximize", + "target": "_self" + }, + { + "title": "系统设置", + "href": "page/setting.html", + "icon": "fa fa-gears", + "target": "_self" + }, + { + "title": "表格示例", + "href": "page/table.html", + "icon": "fa fa-file-text", + "target": "_self" + }, + { + "title": "表单示例", + "href": "", + "icon": "fa fa-calendar", + "target": "_self", + "child": [ + { + "title": "普通表单", + "href": "page/form.html", + "icon": "fa fa-list-alt", + "target": "_self" + }, + { + "title": "分步表单", + "href": "page/form-step.html", + "icon": "fa fa-navicon", + "target": "_self" + } + ] + }, + { + "title": "登录模板", + "href": "", + "icon": "fa fa-flag-o", + "target": "_self", + "child": [ + { + "title": "登录-1", + "href": "page/login-1.html", + "icon": "fa fa-stumbleupon-circle", + "target": "_blank" + }, + { + "title": "登录-2", + "href": "page/login-2.html", + "icon": "fa fa-viacoin", + "target": "_blank" + }, + { + "title": "登录-3", + "href": "page/login-3.html", + "icon": "fa fa-tags", + "target": "_blank" + } + ] + }, + { + "title": "异常页面", + "href": "", + "icon": "fa fa-home", + "target": "_self", + "child": [ + { + "title": "404页面", + "href": "page/404.html", + "icon": "fa fa-hourglass-end", + "target": "_self" + } + ] + }, + { + "title": "其它界面", + "href": "", + "icon": "fa fa-snowflake-o", + "target": "", + "child": [ + { + "title": "按钮示例", + "href": "page/button.html", + "icon": "fa fa-snowflake-o", + "target": "_self" + }, + { + "title": "弹出层", + "href": "page/layer.html", + "icon": "fa fa-shield", + "target": "_self" + } + ] + } + ] + }, + { + "title": "组件管理", + "icon": "fa fa-lemon-o", + "href": "", + "target": "_self", + "child": [ + { + "title": "图标列表", + "href": "page/icon.html", + "icon": "fa fa-dot-circle-o", + "target": "_self" + }, + { + "title": "图标选择", + "href": "page/icon-picker.html", + "icon": "fa fa-adn", + "target": "_self" + }, + { + "title": "颜色选择", + "href": "page/color-select.html", + "icon": "fa fa-dashboard", + "target": "_self" + }, + { + "title": "下拉选择", + "href": "page/table-select.html", + "icon": "fa fa-angle-double-down", + "target": "_self" + }, + { + "title": "文件上传", + "href": "page/upload.html", + "icon": "fa fa-arrow-up", + "target": "_self" + }, + { + "title": "富文本编辑器", + "href": "page/editor.html", + "icon": "fa fa-edit", + "target": "_self" + }, + { + "title": "省市县区选择器", + "href": "page/area.html", + "icon": "fa fa-rocket", + "target": "_self" + } + ] + }, + { + "title": "其它管理", + "icon": "fa fa-slideshare", + "href": "", + "target": "_self", + "child": [ + { + "title": "多级菜单", + "href": "", + "icon": "fa fa-meetup", + "target": "", + "child": [ + { + "title": "按钮1", + "href": "page/button.html?v=1", + "icon": "fa fa-calendar", + "target": "_self", + "child": [ + { + "title": "按钮2", + "href": "page/button.html?v=2", + "icon": "fa fa-snowflake-o", + "target": "_self", + "child": [ + { + "title": "按钮3", + "href": "page/button.html?v=3", + "icon": "fa fa-snowflake-o", + "target": "_self" + }, + { + "title": "表单4", + "href": "page/form.html?v=1", + "icon": "fa fa-calendar", + "target": "_self" + } + ] + } + ] + } + ] + }, + { + "title": "失效菜单", + "href": "page/error.html", + "icon": "fa fa-superpowers", + "target": "_self" + } + ] + } +] \ No newline at end of file diff --git a/yyq/front/api/menus.json b/yyq/front/api/menus.json new file mode 100644 index 0000000..e14d00e --- /dev/null +++ b/yyq/front/api/menus.json @@ -0,0 +1,254 @@ +{ + "code": 0, + "msg": "", + "count": 19, + "data": [ + { + "authorityId": 1, + "authorityName": "系统管理", + "orderNumber": 1, + "menuUrl": null, + "menuIcon": "layui-icon-set", + "createTime": "2018/06/29 11:05:41", + "authority": null, + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 0, + "parentId": -1 + }, + { + "authorityId": 2, + "authorityName": "用户管理", + "orderNumber": 2, + "menuUrl": "system/user", + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": null, + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 0, + "parentId": 1 + }, + { + "authorityId": 3, + "authorityName": "查询用户", + "orderNumber": 3, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/07/21 13:54:16", + "authority": "user:view", + "checked": 0, + "updateTime": "2018/07/21 13:54:16", + "isMenu": 1, + "parentId": 2 + }, + { + "authorityId": 4, + "authorityName": "添加用户", + "orderNumber": 4, + "menuUrl": null, + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": "user:add", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 2 + }, + { + "authorityId": 5, + "authorityName": "修改用户", + "orderNumber": 5, + "menuUrl": null, + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": "user:edit", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 2 + }, + { + "authorityId": 6, + "authorityName": "删除用户", + "orderNumber": 6, + "menuUrl": null, + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": "user:delete", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 2 + }, + { + "authorityId": 7, + "authorityName": "角色管理", + "orderNumber": 7, + "menuUrl": "system/role", + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": null, + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 0, + "parentId": 1 + }, + { + "authorityId": 8, + "authorityName": "查询角色", + "orderNumber": 8, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/07/21 13:54:59", + "authority": "role:view", + "checked": 0, + "updateTime": "2018/07/21 13:54:58", + "isMenu": 1, + "parentId": 7 + }, + { + "authorityId": 9, + "authorityName": "添加角色", + "orderNumber": 9, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "role:add", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 7 + }, + { + "authorityId": 10, + "authorityName": "修改角色", + "orderNumber": 10, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "role:edit", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 7 + }, + { + "authorityId": 11, + "authorityName": "删除角色", + "orderNumber": 11, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "role:delete", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 7 + }, + { + "authorityId": 12, + "authorityName": "角色权限管理", + "orderNumber": 12, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "role:auth", + "checked": 0, + "updateTime": "2018/07/13 15:27:18", + "isMenu": 1, + "parentId": 7 + }, + { + "authorityId": 13, + "authorityName": "权限管理", + "orderNumber": 13, + "menuUrl": "system/authorities", + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": null, + "checked": 0, + "updateTime": "2018/07/13 15:45:13", + "isMenu": 0, + "parentId": 1 + }, + { + "authorityId": 14, + "authorityName": "查询权限", + "orderNumber": 14, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/07/21 13:55:57", + "authority": "authorities:view", + "checked": 0, + "updateTime": "2018/07/21 13:55:56", + "isMenu": 1, + "parentId": 13 + }, + { + "authorityId": 15, + "authorityName": "添加权限", + "orderNumber": 15, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "authorities:add", + "checked": 0, + "updateTime": "2018/06/29 11:05:41", + "isMenu": 1, + "parentId": 13 + }, + { + "authorityId": 16, + "authorityName": "修改权限", + "orderNumber": 16, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/07/13 09:13:42", + "authority": "authorities:edit", + "checked": 0, + "updateTime": "2018/07/13 09:13:42", + "isMenu": 1, + "parentId": 13 + }, + { + "authorityId": 17, + "authorityName": "删除权限", + "orderNumber": 17, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/06/29 11:05:41", + "authority": "authorities:delete", + "checked": 0, + "updateTime": "2018/06/29 11:05:41", + "isMenu": 1, + "parentId": 13 + }, + { + "authorityId": 18, + "authorityName": "登录日志", + "orderNumber": 18, + "menuUrl": "system/loginRecord", + "menuIcon": null, + "createTime": "2018/06/29 11:05:41", + "authority": null, + "checked": 0, + "updateTime": "2018/06/29 11:05:41", + "isMenu": 0, + "parentId": 1 + }, + { + "authorityId": 19, + "authorityName": "查询登录日志", + "orderNumber": 19, + "menuUrl": "", + "menuIcon": "", + "createTime": "2018/07/21 13:56:43", + "authority": "loginRecord:view", + "checked": 0, + "updateTime": "2018/07/21 13:56:43", + "isMenu": 1, + "parentId": 18 + } + ] +} \ No newline at end of file diff --git a/yyq/front/api/table.json b/yyq/front/api/table.json new file mode 100644 index 0000000..7bda61b --- /dev/null +++ b/yyq/front/api/table.json @@ -0,0 +1,127 @@ +{ + "code": 0, + "msg": "", + "count": 1000, + "data": [ + { + "id": 10000, + "username": "user-0", + "sex": "女", + "city": "城市-0", + "sign": "签名-0", + "experience": 255, + "logins": 24, + "wealth": 82830700, + "classify": "作家", + "score": 57 + }, + { + "id": 10001, + "username": "user-1", + "sex": "男", + "city": "城市-1", + "sign": "签名-1", + "experience": 884, + "logins": 58, + "wealth": 64928690, + "classify": "词人", + "score": 27 + }, + { + "id": 10002, + "username": "user-2", + "sex": "女", + "city": "城市-2", + "sign": "签名-2", + "experience": 650, + "logins": 77, + "wealth": 6298078, + "classify": "酱油", + "score": 31 + }, + { + "id": 10003, + "username": "user-3", + "sex": "女", + "city": "城市-3", + "sign": "签名-3", + "experience": 362, + "logins": 157, + "wealth": 37117017, + "classify": "诗人", + "score": 68 + }, + { + "id": 10004, + "username": "user-4", + "sex": "男", + "city": "城市-4", + "sign": "签名-4", + "experience": 807, + "logins": 51, + "wealth": 76263262, + "classify": "作家", + "score": 6 + }, + { + "id": 10005, + "username": "user-5", + "sex": "女", + "city": "城市-5", + "sign": "签名-5", + "experience": 173, + "logins": 68, + "wealth": 60344147, + "classify": "作家", + "score": 87 + }, + { + "id": 10006, + "username": "user-6", + "sex": "女", + "city": "城市-6", + "sign": "签名-6", + "experience": 982, + "logins": 37, + "wealth": 57768166, + "classify": "作家", + "score": 34 + }, + { + "id": 10007, + "username": "user-7", + "sex": "男", + "city": "城市-7", + "sign": "签名-7", + "experience": 727, + "logins": 150, + "wealth": 82030578, + "classify": "作家", + "score": 28 + }, + { + "id": 10008, + "username": "user-8", + "sex": "男", + "city": "城市-8", + "sign": "签名-8", + "experience": 951, + "logins": 133, + "wealth": 16503371, + "classify": "词人", + "score": 14 + }, + { + "id": 10009, + "username": "user-9", + "sex": "女", + "city": "城市-9", + "sign": "签名-9", + "experience": 484, + "logins": 25, + "wealth": 86801934, + "classify": "词人", + "score": 75 + } + ] +} \ No newline at end of file diff --git a/yyq/front/api/tableSelect.json b/yyq/front/api/tableSelect.json new file mode 100644 index 0000000..37fb0ed --- /dev/null +++ b/yyq/front/api/tableSelect.json @@ -0,0 +1,23 @@ +{ + "code": 0, + "msg": "", + "count": 16, + "data": [ + { "id":"001", "username":"张玉林", "sex":"女" }, + { "id":"002", "username":"刘晓军", "sex":"男" }, + { "id":"003", "username":"张恒", "sex":"男" }, + { "id":"004", "username":"朱一", "sex":"男" }, + { "id":"005", "username":"刘佳能", "sex":"女" }, + { "id":"006", "username":"晓梅", "sex":"女" }, + { "id":"007", "username":"马冬梅", "sex":"女" }, + { "id":"008", "username":"刘晓庆", "sex":"女" }, + { "id":"009", "username":"刘晓庆", "sex":"女" }, + { "id":"010", "username":"刘晓庆", "sex":"女" }, + { "id":"011", "username":"刘晓庆", "sex":"女" }, + { "id":"012", "username":"刘晓庆", "sex":"女" }, + { "id":"013", "username":"刘晓庆", "sex":"女" }, + { "id":"014", "username":"刘晓庆", "sex":"女" }, + { "id":"015", "username":"刘晓庆", "sex":"女" }, + { "id":"016", "username":"刘晓庆", "sex":"女" } + ] +} \ No newline at end of file diff --git a/yyq/front/api/upload.json b/yyq/front/api/upload.json new file mode 100644 index 0000000..691902d --- /dev/null +++ b/yyq/front/api/upload.json @@ -0,0 +1,10 @@ +{ + "code": 1, + "msg": "上传成功", + "data": { + "url": [ + "../images/logo.png", + "../images/captcha.jpg" + ] + } +} diff --git a/yyq/front/css/layuimini.css b/yyq/front/css/layuimini.css new file mode 100644 index 0000000..b67e5e8 --- /dev/null +++ b/yyq/front/css/layuimini.css @@ -0,0 +1,803 @@ +/** +配色方案(如有需要,请自行配置) + */ +/**头部-配色*/ +.layui-layout-admin .layui-header { + background-color: #1aa094 !important; +} + +.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #197971 !important; +} + +.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #197971 !important; +} + +/**logo-配色*/ +.layui-layout-admin .layuimini-logo { + background-color: #243346 !important; +} + +/**左侧-配色*/ +.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul { + background-color: #2f4056 !important; +} + +.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) { + background-color: #3b3f4b; +} + +/**左侧菜单选中-配色*/ +.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #1aa094 !important; +} + + +/**头部样式 */ +.layui-layout-admin .header { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.layuimini-header-menu, .layui-header { + height: 60px !important; +} + +.layuimini-header-menu > .layui-nav-item { + color: #1b1d21; + height: 60px !important; + line-height: 60px !important; +} + +.layui-header > .layui-layout-right > .layui-nav-item { + height: 60px !important; + line-height: 60px !important; +} + +.layui-layout-left { + left: 295px !important; +} + +.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show { + font-weight: bold; + transition: all .2s; +} + + +/**logo演示(通用) */ +.layui-layout-admin .layuimini-logo { + font-weight: bold; + color: #ffffff !important; + height: 60px !important; + line-height: 60px !important; + overflow: hidden; + line-height: 64px; + transition: all .2s !important; +} + +.layui-layout-admin .layuimini-logo img { + display: inline-block; + height: 40px; + vertical-align: middle; +} + +.layui-layout-admin .layuimini-logo h1 { + display: inline-block; + margin: 0 0 0 12px; + color: #ffffff; + font-weight: 600; + font-size: 20px; + font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; + vertical-align: middle; +} + +/**缩放工具(通用) */ +.layuimini-tool { + position: absolute !important; + top: 0; + left: 235px; + width: 60px; + height: 100%; + line-height: 60px; + text-align: center; + color: #ffffff !important; + transition: all .2s; +} + +/**缩放工具(缩放) */ +.layuimini-tool i { + display: block; + color: #bbe3df; + width: 32px; + height: 32px; + line-height: 32px; + border-radius: 3px; + text-align: center; + margin-top: 15px; + cursor: pointer; +} + + +.layuimini-page-header { + overflow: hidden; + display: block; + height: 35px; + line-height: 35px; + margin-bottom: 0; + border-radius: 0; + border-bottom: 1px solid #e1dddd; +} + +.layuimini-page-header .layui-breadcrumb { + border-top: 1px solid #f6f6f6; + padding: 0 15px; + visibility: visible; +} + + +/**左侧菜单栏 (通用) */ +.layui-side.layui-bg-black { + transition: all .2s; +} + +.layui-side.layui-bg-black > .layuimini-menu-left > ul { + transition: all .2s; +} + +.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child { + border-top: 1px solid #4b5461; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a { + height: 40px; + line-height: 40px; + padding-right: 30px; +} + +.layuimini-menu-left .layui-nav .layui-nav-item > a { + padding-top: 5px; + padding-bottom: 5px; +} + +.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child { + background: 0 0 !important +} + +.layuimini-menu-left .layui-nav .layui-nav-more { + right: 15px; +} + +.layuimini-menu-left .layui-nav .layui-nav-item a:hover { + background-color: transparent !important; +} + +.layuimini-menu-left .layui-nav { + background-color: transparent !important; +} + + +/**左侧菜单栏 (正常) */ +.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a { + padding-left: 35px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a { + padding-left: 45px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a { + padding-left: 55px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a { + padding-left: 65px; +} + +.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child { + padding: 5px 0; +} + +/**内容主体(通用) */ +.layui-layout-admin .layui-body { + /*position: fixed;*/ + overflow: hidden; + bottom: 0px !important; + top: 60px !important; + transition: all .2s; +} + +/**选择配色方案 */ +.layuimini-color .color-title { + padding: 10px 0 10px 20px; + border-bottom: 1px solid #d9dada; + margin-bottom: 8px; +} + +.layuimini-color .color-content { + padding: 10px 5px 0 5px; +} + +.layuimini-color .color-content ul { + list-style: none; + text-align: center; +} + +.layuimini-color .color-content ul li { + position: relative; + display: inline-block; + vertical-align: top; + width: 80px; + height: 50px; + margin: 0 15px 15px 0; + padding: 2px 2px 4px 2px; + background-color: #f2f2f2; + cursor: pointer; + font-size: 12px; + color: #666; +} + +.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after { + width: 100%; + height: 100%; + padding: 4px; + top: -5px; + left: -5px; + border-color: #d8d8d8; + opacity: 1; +} + +.layuimini-color .color-content li:after { + content: ''; + position: absolute; + z-index: 20; + top: 50%; + left: 50%; + width: 1px; + height: 0; + border: 1px solid #f2f2f2; + transition: all .3s; + -webkit-transition: all .3s; + opacity: 0; +} + + +/**其它 */ +.layui-tab-item { + width: 100% !important; + height: 100% !important; +} + +.layui-nav-item.layui-this { + background-color: #1b1d21; +} + +.layui-width-height { + width: 100%; + height: 95%; +} + +.layui-tab { + margin: 0 0 0 0; + z-index: 99999; +} + +.text-center { + height: 30px !important; + line-height: 30px !important; + text-align: center !important; +} + +.layui-nav { + padding: 0 !important; +} + +.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after { + width: 0 !important; + height: 0 !important; +} + +.layui-layout-admin .layui-side { + top: 60px !important; +} + +.layui-tab-card { + box-shadow: 0px 0px 0px #888888; + border-bottom: 0; +} + + +/*打开页面动画*/ +.layui-tab-item.layui-show { + animation: moveTop 1s; + -webkit-animation: moveTop 1s; + animation-fill-mode: both; + -webkit-animation-fill-mode: both; + position: relative; + height: 100%; + -webkit-overflow-scrolling: touch; + overflow: auto; +} + +@keyframes moveTop { + 0% { + opacity: 0; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +@-o-keyframes moveTop { + 0% { + opacity: 0; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +@-moz-keyframes moveTop { + 0% { + opacity: 0; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +@-webkit-keyframes moveTop { + 0% { + opacity: 0; + -webkit-transform: translateY(30px); + -ms-transform: translateY(30px); + transform: translateY(30px); + } + 100% { + opacity: 1; + -webkit-transform: translateY(0); + -ms-transform: translateY(0); + transform: translateY(0); + } +} + +/**自定义滚动条样式 */ +::-webkit-scrollbar { + width: 6px; + height: 6px +} + +::-webkit-scrollbar-track { + background-color: transparent; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; +} + +::-webkit-scrollbar-thumb { + background-color: #9c9da0; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em +} + + +.layuimini-content-page { + overflow: auto; + width: 100%; + height: 100%; +} + + +/*移动端遮罩层*/ +.layuimini-make { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 1000; + background: rgba(0, 0, 0, .5); + display: none; +} + +.layuimini-mini .layui-header { + z-index: 1001; +} + +/**初始化加载层*/ +.layuimini-loader { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: #ffffff; + z-index: 999999; +} + +.layuimini-loader .layuimini-loader-inner { + display: block; + position: relative; + left: 50%; + top: 50%; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 2s linear infinite; +} + +.layuimini-loader .layuimini-loader-inner:before { + content: ""; + position: absolute; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 3s linear infinite; +} + +.layuimini-loader .layuimini-loader-inner:after { + content: ""; + position: absolute; + top: 15px; + left: 15px; + right: 15px; + bottom: 15px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #1E9FFF; + animation: spin 1.5s linear infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + to { + transform: rotate(1turn); + } +} + +/*系统设置*/ + +.layuimini-color .layui-word-aux { + position: absolute; + left: 60px; + top: 12px; + font-size: 12px; +} + +.layuimini-color .layui-input-block { + margin-left: 15px; + min-height: 36px; +} + +.layuimini-color .more-menu-list { + width: 100%; + margin-top: 30px; +} + + +.layuimini-color .more-menu-item:first-child { + border-top: 1px solid #e8e8e8; +} + +.layuimini-color .more-menu-item .layui-icon { + font-size: 18px; + padding-right: 10px; +} + +.layuimini-color .more-menu-item { + color: #595959; + height: 50px; + line-height: 50px; + font-size: 16px; + padding: 0 25px; + border-bottom: 1px solid #e8e8e8; + font-style: normal; + display: block; +} + +.layuimini-color .more-menu-item:hover { + background-color: whitesmoke; +} + +.layuimini-color .more-menu-item:after { + color: #8c8c8c; + right: 16px; + content: "\e602"; + position: absolute; + font-family: layui-icon !important; +} + +/** +菜单缩放 + */ +.popup-tips .layui-layer-TipsG{ + display: none; +} +.popup-tips.layui-layer-tips .layui-layer-content{ + padding: 0; +} +.popup-tips .layui-nav-tree{ + width: 150px; + border-radius: 10px; +} + +/**左侧菜单字体间距*/ +.layuimini-menu-left .layui-nav-item a span { + letter-spacing: 1px; +} + +/**头部菜单字体间距*/ +.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show,.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show { + letter-spacing: 1px; +} + + +/**左侧菜单更多下拉样式*/ +.layuimini-menu-left .layui-nav-more,.layuimini-menu-left-zoom .layui-nav-more { + font-family: layui-icon !important; + font-size: 12px; + font-style: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + overflow: hidden; + width: auto; + height: auto; + line-height: normal; + border: none; + display: inline-block; + margin-top: -6px !important; +} + +.layuimini-menu-left .layui-nav-child .layui-nav-more { + margin-top: -6px !important; +} + +.layuimini-menu-left .layui-nav .layui-nav-mored,.layuimini-menu-left .layui-nav-itemed>a .layui-nav-more{ + margin-top: -9px!important; +} + +.layuimini-menu-left-zoom.layui-nav .layui-nav-mored,.layuimini-menu-left-zoom.layui-nav-itemed>a .layui-nav-more{ + margin-top: -9px!important; +} + +.layuimini-menu-left .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-more:before { + content: "\e61a"; +} +.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more,.layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more { + transform: rotate(180deg); + -ms-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -webkit-transform: rotate(180deg); + -o-transform: rotate(180deg); + width: 12px; + text-align: center; + border-style:none; +} + +.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before,.layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before { + content: '\e61a'; + background-color: transparent; + display: inline-block; + vertical-align: middle; +} + +/**修复左侧菜单字体不对齐的问题*/ +.layuimini-menu-left .layui-nav-item a .fa,.layuimini-menu-left .layui-nav-item a .layui-icon{ + width: 20px; +} + + + +/** + PC版样式 + */ +@media screen and (min-width: 1025px) { + /**头部样式(缩放) */ + .layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show { + left: 155px !important; + } + + /**logo演示(缩放) */ + .layuimini-mini .layui-layout-admin .layuimini-logo { + width: 60px !important; + } + + .layuimini-mini .layui-layout-admin .layuimini-logo h1 { + display: none; + } + + /**左侧菜单栏(缩放) */ + .layuimini-mini .layuimini-menu-left { + width: 80px !important; + } + + .layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i { + width: 60px !important; + } + + .layuimini-mini .layuimini-menu-left > ul li span:first-child { + display: none; + } + + .layuimini-mini .layuimini-menu-left > ul li span:last-child { + float: right; + right: 7px; + } + + .layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a { + height: 40px; + line-height: 40px; + padding-right: 0px !important; + } + + /**内容主体(缩放) */ + .layuimini-mini .layui-layout-admin .layui-body { + left: 60px !important; + } + + .layuimini-mini .layuimini-tool { + left: 95px !important; + } + + .layuimini-pc-show{ + display: block; + } + .layuimini-mobile-show{ + display: none; + } + + /**菜单缩放*/ + .layuimini-mini .layuimini-menu-left .layui-nav-more,.layuimini-mini .layuimini-menu-left .layui-nav-child{ + display: none!important; + } + +} + +/** + 手机自适应样式 +*/ +@media screen and (max-width: 1024px) { + + .layuimini-pc-show{ + display: none; + } + .layuimini-mobile-show{ + display: block; + } + + .layuimini-header-content { + left: 0; + } + + .layui-layout-admin .layui-body .layui-tab-item.layui-show { + border-top: 1px solid #e2e2e2; + } + + .layuimini-all .layui-layout-left.layuimini-header-menu { + left: 15px !important + } + + .layuimini-mini .layui-layout-left.layuimini-header-menu { + left: 205px !important + } + + .layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) { + width: 40px !important; + } + + .layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a { + padding: 0 15px; + } + + .layuimini-all .layui-layout-admin .layui-body { + left: 0px !important; + } + + .layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo { + left: 0; + transition: left .2s; + z-index: 1001 !important; + } + + .layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo { + left: -200px; + transition: left .2s; + top: 0; + z-index: 1002; + } + + .layuimini-mini .layui-layout-admin .layui-body { + left: 0!important; + transition: left .2s; + top: 0; + z-index: 998; + } + + .layuimini-mini .layuimini-make { + display: block; + } + + .layuimini-multi-module .layuimini-header-content .layuimini-tool { + display: none; + } + + .layuimini-single-module .layuimini-header-content .layuimini-tool { + left: 15px; + } + + .layuimini-mini .layuimini-site-mobile { + display: none !important; + } + + .layuimini-site-mobile { + display: block !important; + position: fixed; + z-index: 100000; + bottom: 15px; + left: 15px; + width: 40px; + height: 40px; + line-height: 40px; + border-radius: 2px; + text-align: center; + background-color: rgba(0, 0, 0, .7); + color: #fff; + } + + .layuimini-header-content { + z-index: 997; + } + + .layuimini-content-page { + -webkit-overflow-scrolling: touch; + } + + /*修复UC之类的浏览器点击无效*/ + .layuimini-make { + cursor: pointer; + } + + .layuimini-site-mobile { + cursor: pointer; + } + +} + +@media screen and (max-width: 550px){ + + /**头部右侧数据*/ + .layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right { + display: none; + } +} diff --git a/yyq/front/css/public.css b/yyq/front/css/public.css new file mode 100644 index 0000000..6fbdf17 --- /dev/null +++ b/yyq/front/css/public.css @@ -0,0 +1,13 @@ +.layuimini-content-page{background-color:#f2f2f2!important;} +.layuimini-container {border:1px solid #f2f2f2;border-radius:5px;background-color:#f2f2f2} +.layuimini-main {margin:10px 10px 10px 10px;border:5px solid #ffffff;border-radius:5px;background-color:#ffffff} +.layui-breadcrumb>* {font-size: 13px;!important;} + +/**必填红点 */ +.layuimini-form>.layui-form-item>.required:after {content:'*';color:red;position:absolute;margin-left:4px;font-weight:bold;line-height:1.8em;top:6px;right:5px;} +.layuimini-form>.layui-form-item>.layui-form-label {width:120px !important;} +.layuimini-form>.layui-form-item>.layui-input-block {margin-left:150px !important;} +.layuimini-form>.layui-form-item>.layui-input-block >tip {display:inline-block;margin-top:10px;line-height:10px;font-size:10px;color:#a29c9c;} + +/**搜索框*/ +.layuimini-container .table-search-fieldset {margin: 0;border: 1px solid #e6e6e6;padding: 10px 20px 5px 20px;color: #6b6b6b;} diff --git a/yyq/front/css/themes/default.css b/yyq/front/css/themes/default.css new file mode 100644 index 0000000..4f3cefb --- /dev/null +++ b/yyq/front/css/themes/default.css @@ -0,0 +1,95 @@ +/*头部右侧背景色 headerRightBg */ +.layui-layout-admin .layui-header { + background-color: #ffffff !important; +} + +/*头部右侧选中背景色 headerRightBgThis */ +.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover { + background-color: #e4e4e4 !important; +} + +/*头部右侧字体颜色 headerRightColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item a { + color: rgba(107, 107, 107, 0.7); +} + +/**头部右侧下拉字体颜色 headerRightChildColor */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a { + color: rgba(107, 107, 107, 0.7) !important; +} + +/*头部右侧鼠标选中 headerRightColorThis */ +.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a { + color: #565656 !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-more { + border-top-color: rgba(160, 160, 160, 0.7) !important; +} + +/*头部右侧更多下拉颜色 headerRightNavMore */ +.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgba(160, 160, 160, 0.7) !important; +} + +/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */ +.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a { + background-color: #1E9FFF !important; + color: #ffffff !important; +} + +/*头部缩放按钮样式 headerRightToolColor */ +.layui-layout-admin .layui-header .layuimini-tool i { + color: #565656; +} + +/*logo背景颜色 headerLogoBg */ +.layui-layout-admin .layuimini-logo { + background-color: #192027 !important; +} + +/*logo字体颜色 headerLogoColor */ +.layui-layout-admin .layuimini-logo h1 { + color: rgb(191, 187, 187); +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more { + border-top-color: rgb(191, 187, 187); +} + +/*左侧菜单更多下拉样式 leftMenuNavMore */ +.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more { + border-color: transparent transparent rgb(191, 187, 187) !important; +} + +/*左侧菜单背景 leftMenuBg */ +.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul { + background-color: #28333E !important; +} + +/*左侧菜单选中背景 leftMenuBgThis */ +.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a { + background-color: #1E9FFF !important +} + +/*左侧菜单子菜单背景 leftMenuChildBg */ +.layuimini-menu-left .layui-nav-itemed > .layui-nav-child { + background-color: #0c0f13 !important; +} + +/*左侧菜单字体颜色 leftMenuColor */ +.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a { + color: rgb(191, 187, 187) !important; +} + +/*左侧菜单选中字体颜色 leftMenuColorThis */ +.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a { + color: #ffffff !important; +} + +/**tab选项卡选中颜色 tabActiveColor */ +.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active { + background-color: #1e9fff; +} diff --git a/yyq/front/page/grade/add.html b/yyq/front/page/grade/add.html new file mode 100644 index 0000000..bca009d --- /dev/null +++ b/yyq/front/page/grade/add.html @@ -0,0 +1,47 @@ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/grade/list.html b/yyq/front/page/grade/list.html new file mode 100644 index 0000000..c7cbfa4 --- /dev/null +++ b/yyq/front/page/grade/list.html @@ -0,0 +1,149 @@ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ + + +
+ +
+
+ + \ No newline at end of file diff --git a/yyq/front/page/grade/update.html b/yyq/front/page/grade/update.html new file mode 100644 index 0000000..39565cf --- /dev/null +++ b/yyq/front/page/grade/update.html @@ -0,0 +1,50 @@ + + +
+
+
+ + +
+ +
+
+
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/notice/add.html b/yyq/front/page/notice/add.html new file mode 100644 index 0000000..f23dc71 --- /dev/null +++ b/yyq/front/page/notice/add.html @@ -0,0 +1,90 @@ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/notice/list.html b/yyq/front/page/notice/list.html new file mode 100644 index 0000000..9d87e47 --- /dev/null +++ b/yyq/front/page/notice/list.html @@ -0,0 +1,155 @@ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ + + +
+ +
+
+ + \ No newline at end of file diff --git a/yyq/front/page/notice/update.html b/yyq/front/page/notice/update.html new file mode 100644 index 0000000..7f45771 --- /dev/null +++ b/yyq/front/page/notice/update.html @@ -0,0 +1,107 @@ +
+
+ +
+ +
+ + +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/org/add.html b/yyq/front/page/org/add.html new file mode 100644 index 0000000..7e58062 --- /dev/null +++ b/yyq/front/page/org/add.html @@ -0,0 +1,106 @@ +
+
+
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/org/list.html b/yyq/front/page/org/list.html new file mode 100644 index 0000000..3c7b12e --- /dev/null +++ b/yyq/front/page/org/list.html @@ -0,0 +1,124 @@ +
+
+
+ + + +
+
+ + + +
+
+ + \ No newline at end of file diff --git a/yyq/front/page/org/update.html b/yyq/front/page/org/update.html new file mode 100644 index 0000000..7883cf6 --- /dev/null +++ b/yyq/front/page/org/update.html @@ -0,0 +1,109 @@ +
+
+
+ +
+ + +
+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/repair/list.html b/yyq/front/page/repair/list.html new file mode 100644 index 0000000..ec75e8b --- /dev/null +++ b/yyq/front/page/repair/list.html @@ -0,0 +1,134 @@ +
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+
+
+
+ + + +
+ +
+
+ + \ No newline at end of file diff --git a/yyq/front/page/selection/add.html b/yyq/front/page/selection/add.html new file mode 100644 index 0000000..2b8b4e0 --- /dev/null +++ b/yyq/front/page/selection/add.html @@ -0,0 +1,111 @@ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+
+ + + +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/front/page/selection/distribute.html b/yyq/front/page/selection/distribute.html new file mode 100644 index 0000000..4dac8c5 --- /dev/null +++ b/yyq/front/page/selection/distribute.html @@ -0,0 +1,172 @@ +
+
+ +
+
+
+
+ + +
+ +
+
+ +
+ + \ No newline at end of file diff --git a/yyq/front/page/selection/list.html b/yyq/front/page/selection/list.html new file mode 100644 index 0000000..70084bc --- /dev/null +++ b/yyq/front/page/selection/list.html @@ -0,0 +1,208 @@ +
+
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+
+
+
+ + + +
+ +
+
+ + \ No newline at end of file diff --git a/yyq/front/page/selection/update.html b/yyq/front/page/selection/update.html new file mode 100644 index 0000000..7dc4e2a --- /dev/null +++ b/yyq/front/page/selection/update.html @@ -0,0 +1,112 @@ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+
+ + + +
+
+ +
+
+
+
+ \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/framework/exception/MyException.java b/yyq/src/main/java/com/yanzhen/framework/exception/MyException.java new file mode 100644 index 0000000..b7d4f92 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/framework/exception/MyException.java @@ -0,0 +1,15 @@ +package com.yanzhen.framework.exception; + +// 定义一个名为MyException的类,继承自RuntimeException +public class MyException extends RuntimeException { + + // 无参构造函数 + public MyException() { + } + + // 带一个字符串参数的构造函数 + public MyException(String message) { + // 调用父类的构造函数,并传递消息参数 + super(message); + } +} diff --git a/yyq/src/main/java/com/yanzhen/framework/jwt/JWTUtil.java b/yyq/src/main/java/com/yanzhen/framework/jwt/JWTUtil.java new file mode 100644 index 0000000..2feed32 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/framework/jwt/JWTUtil.java @@ -0,0 +1,237 @@ +package com.yanzhen.framework.jwt; + +import com.yanzhen.entity.Student; // 导入Student类 +import com.yanzhen.entity.User; // 导入User类 +import com.yanzhen.framework.exception.MyException; // 导入自定义异常类MyException +import io.jsonwebtoken.*; // 导入JWT相关类 +import org.springframework.util.StringUtils; // 导入Spring框架的StringUtils工具类 + +import java.util.Date; // 导入Date类 +import java.util.HashMap; // 导入HashMap类 +import java.util.Map; // 导入Map接口 +import java.util.UUID; // 导入UUID类 + +//jwt的工具类 +public class JWTUtil { + + // 定义静态变量token,用于存储token字符串 + public static String token = "token"; + //秘钥 + // 定义静态变量jwt_secret,用于存储JWT签名的密钥 + public static String jwt_secret="yanzhen@cms@cc596183363."; + //过期时长 + // 定义静态变量jwt_expr,用于设置JWT的过期时间(单位:毫秒) + public static long jwt_expr = 3600*24*1000; + + //1、生成token + // 定义静态方法sign,用于生成用户类型的JWT + public static String sign(User user){ + + //1、指定签名的时候使用的签名算法 + // 使用HS256算法进行签名 + SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; + //2、生成签发时间 + // 获取当前时间的毫秒数 + long nowMillis = System.currentTimeMillis(); + // 将毫秒数转换为Date对象 + Date date = new Date(nowMillis); + + //3、创建playLoad的私有声明 + // 创建一个Map对象,用于存储JWT的负载信息 + Map claims = new HashMap<>(); + // 将用户的ID添加到负载中 + claims.put("id",user.getId()); + // 将用户名添加到负载中 + claims.put("userName",user.getUserName()); + // 添加类型信息到负载中 + claims.put("type","USER"); + //4、生成签发人 + // 将用户名作为JWT的签发人 + String subject = user.getUserName(); + + // 创建JwtBuilder对象,用于构建JWT + JwtBuilder builder = Jwts.builder() + // 设置JWT的负载信息 + .setClaims(claims) + // 设置JWT的唯一标识符 + .setId(UUID.randomUUID().toString()) + // 设置JWT的签发时间 + .setIssuedAt(date) + // 设置JWT的签发人 + .setSubject(subject) + // 使用指定的签名算法和密钥对JWT进行签名 + .signWith(signatureAlgorithm,jwt_secret); + //设置过期时间 + // 计算JWT的过期时间 + Date exprDate = new Date(nowMillis + jwt_expr); + // 设置JWT的过期时间 + builder.setExpiration(exprDate); + // 生成并返回JWT字符串 + return builder.compact(); + } + + + //1、生成token + // 定义静态方法signForStudent,用于生成学生类型的JWT + public static String signForStudent(Student student){ + + //1、指定签名的时候使用的签名算法 + // 使用HS256算法进行签名 + SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; + //2、生成签发时间 + // 获取当前时间的毫秒数 + long nowMillis = System.currentTimeMillis(); + // 将毫秒数转换为Date对象 + Date date = new Date(nowMillis); + + //3、创建playLoad的私有声明 + // 创建一个Map对象,用于存储JWT的负载信息 + Map claims = new HashMap<>(); + // 将学生的ID添加到负载中 + claims.put("id",student.getId()); + // 将学号添加到负载中 + claims.put("stuNo",student.getStuNo()); + // 添加类型信息到负载中 + claims.put("type","STUDENT"); + //4、生成签发人 + // 将学号作为JWT的签发人 + String subject = student.getStuNo(); + // 创建JwtBuilder对象,用于构建JWT + JwtBuilder builder = Jwts.builder() + // 设置JWT的负载信息 + .setClaims(claims) + // 设置JWT的唯一标识符 + .setId(UUID.randomUUID().toString()) + // 设置JWT的签发时间 + .setIssuedAt(date) + // 设置JWT的签发人 + .setSubject(subject) + // 使用指定的签名算法和密钥对JWT进行签名 + .signWith(signatureAlgorithm,jwt_secret); + //设置过期时间 + // 计算JWT的过期时间 + Date exprDate = new Date(nowMillis + jwt_expr); + // 设置JWT的过期时间 + builder.setExpiration(exprDate); + // 生成并返回JWT字符串 + return builder.compact(); + } + + //2、验证token + // 定义静态方法verify,用于验证JWT是否合法 + public static boolean verify(String token){ + try { + // 如果token为空,则返回false + if(StringUtils.isEmpty(token)){ + return false; + } + // 解析JWT并验证签名 + Jwts.parser().setSigningKey(jwt_secret).parseClaimsJws(token).getBody(); + // 如果解析成功且签名合法,则返回true + return true; + // 如果解析或验证过程中发生异常,则捕获异常 + } catch (Exception e) { + // 打印异常堆栈信息 + e.printStackTrace(); + // 返回false表示验证失败 + return false; + } + } + + // 定义静态方法getType,用于获取JWT的类型信息 + public static String getType(String token){ + try { + // 如果token为空,则抛出自定义异常 + if(StringUtils.isEmpty(token)){ + throw new MyException("token不能为空"); + } + // 如果token验证通过,则解析JWT并获取类型信息 + if(verify(token)){ + // 解析JWT并获取负载信息 + Claims claims = Jwts.parser().setSigningKey(jwt_secret).parseClaimsJws(token).getBody(); + // 返回类型信息 + return claims.get("type")+""; + }else{ + // 如果token验证失败,则抛出自定义异常 + throw new MyException("超时或不合法token"); + } + // 如果解析或验证过程中发生异常,则捕获异常 + } catch (Exception e) { + // 抛出自定义异常 + throw new MyException("超时或不合法token"); + } + } + + //3、获取用户信息 + // 定义静态方法getUser,用于从JWT中提取用户信息 + public static User getUser(String token){ + try { + // 如果token为空,则抛出自定义异常 + if(StringUtils.isEmpty(token)){ + throw new MyException("token不能为空"); + } + // 如果token验证通过,则解析JWT并获取用户信息 + if(verify(token)){ + // 解析JWT并获取负载信息 + Claims claims = Jwts.parser().setSigningKey(jwt_secret).parseClaimsJws(token).getBody(); + // 创建User对象 + User user = new User(); + // 从负载中提取用户ID并设置到User对象中 + user.setId(Integer.parseInt(claims.get("id")+"")); + // 从负载中提取用户名并设置到User对象中 + user.setUserName(claims.get("userName")+""); + // 返回User对象 + return user; + }else{ + // 如果token验证失败,则抛出自定义异常 + throw new MyException("超时或不合法token"); + } + // 如果解析或验证过程中发生异常,则捕获异常 + } catch (Exception e) { + // 抛出自定义异常 + throw new MyException("超时或不合法token"); + } + } + + // 定义静态方法getStudent,用于从JWT中提取学生信息 + public static Student getStudent(String token){ + try { + // 如果token为空,则抛出自定义异常 + if(StringUtils.isEmpty(token)){ + throw new MyException("token不能为空"); + } + // 如果token验证通过,则解析JWT并获取学生信息 + if(verify(token)){ + // 解析JWT并获取负载信息 + Claims claims = Jwts.parser().setSigningKey(jwt_secret).parseClaimsJws(token).getBody(); + // 创建Student对象 + Student student = new Student(); + // 从负载中提取学生ID并设置到Student对象中 + student.setId(Integer.parseInt(claims.get("id")+"")); + // 从负载中提取学号并设置到Student对象中 + student.setStuNo(claims.get("stuNo")+""); + // 返回Student对象 + return student; + }else{ + // 如果token验证失败,则抛出自定义异常 + throw new MyException("超时或不合法token"); + } + // 如果解析或验证过程中发生异常,则捕获异常 + } catch (Exception e) { + // 抛出自定义异常 + throw new MyException("超时或不合法token"); + } + } + + // 主方法,程序入口点 + public static void main(String[] args) { + // 创建User对象 + User user = new User(); + // 设置用户ID + user.setId(1); + // 设置用户名 + user.setUserName("admin"); + // 生成用户类型的JWT并打印输出 + System.out.println(sign(user)); + } +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/framework/mvc/GlobalControllerAdvice.java b/yyq/src/main/java/com/yanzhen/framework/mvc/GlobalControllerAdvice.java new file mode 100644 index 0000000..1d888b0 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/framework/mvc/GlobalControllerAdvice.java @@ -0,0 +1,37 @@ +package com.yanzhen.framework.mvc; + +import com.yanzhen.framework.exception.MyException; // 导入自定义异常类 +import com.yanzhen.utils.Result; // 导入结果处理工具类 +import org.springframework.web.bind.annotation.ControllerAdvice; // 导入Spring MVC的ControllerAdvice注解 +import org.springframework.web.bind.annotation.ExceptionHandler; // 导入Spring MVC的ExceptionHandler注解 +import org.springframework.web.bind.annotation.RequestBody; // 导入Spring MVC的RequestBody注解 +import org.springframework.web.bind.annotation.ResponseBody; // 导入Spring MVC的ResponseBody注解 + +// 全局异常处理类 +@ControllerAdvice +public class GlobalControllerAdvice { + + // 处理所有RuntimeException类型的异常 + @ExceptionHandler(RuntimeException.class) + @ResponseBody + // 定义处理方法,参数为捕获到的异常 + public Result handle(RuntimeException exception){ + // 打印异常堆栈信息 + exception.printStackTrace(); + // 返回失败的结果对象,包含异常信息 + return Result.fail(exception.getMessage()); + } + + // 处理所有MyException类型的异常 + @ExceptionHandler(MyException.class) + // 将返回值作为HTTP响应体 + @ResponseBody + // 定义处理方法,参数为捕获到的异常 + public Result handle(MyException exception){ + // 打印异常堆栈信息 + exception.printStackTrace(); + // 返回失败的结果对象,包含错误码和异常信息 + return Result.fail(Result.TOKEN_ERROR,exception.getMessage()); + } + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/framework/mvc/MyWebMvcConfigurer.java b/yyq/src/main/java/com/yanzhen/framework/mvc/MyWebMvcConfigurer.java new file mode 100644 index 0000000..e65c2ac --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/framework/mvc/MyWebMvcConfigurer.java @@ -0,0 +1,42 @@ +package com.yanzhen.framework.mvc; // 定义包名 + +import org.springframework.context.annotation.Bean; // 导入@Bean注解 +import org.springframework.context.annotation.Configuration; // 导入@Configuration注解 +import org.springframework.web.cors.CorsConfiguration; // 导入CorsConfiguration类 +import org.springframework.web.cors.CorsConfigurationSource; // 导入CorsConfigurationSource接口 +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; // 导入UrlBasedCorsConfigurationSource类 +import org.springframework.web.filter.CorsFilter; // 导入CorsFilter类 +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; // 导入InterceptorRegistry类 +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; // 导入WebMvcConfigurer接口 + +@Configuration // 标记该类为配置类 +public class MyWebMvcConfigurer implements WebMvcConfigurer { // 实现WebMvcConfigurer接口 + + @Bean // 将方法返回的对象注册为Spring容器中的Bean + public TokenInterceptor tokenInterceptor(){ // 定义tokenInterceptor方法,返回TokenInterceptor对象 + return new TokenInterceptor(); // 创建并返回TokenInterceptor实例 + } + + @Override // 重写父类的方法 + public void addInterceptors(InterceptorRegistry registry) { // 定义addInterceptors方法,参数为InterceptorRegistry对象 + registry.addInterceptor(tokenInterceptor()) // 添加自定义拦截器 + .addPathPatterns("/**") // 设置拦截所有路径 + .excludePathPatterns("/login"); // 排除登录路径不拦截 + } + + //使用CorsFilter解决跨域的问题 + @Bean // 将方法返回的对象注册为Spring容器中的Bean + public CorsFilter corsFilter(){ // 定义corsFilter方法,返回CorsFilter对象 + CorsConfiguration corsConfiguration = new CorsConfiguration(); // 创建CorsConfiguration实例 + //允许跨域请求的域名 + corsConfiguration.addAllowedOrigin("*"); // 允许所有域名进行跨域请求 + corsConfiguration.addAllowedMethod("*"); // 允许所有HTTP方法进行跨域请求 + //允许任何头部 + corsConfiguration.addAllowedHeader("*"); // 允许所有头部信息进行跨域请求 + UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource(); // 创建UrlBasedCorsConfigurationSource实例 + urlBasedCorsConfigurationSource.registerCorsConfiguration("/**",corsConfiguration); // 注册跨域配置到URL模式 + CorsFilter corsFilter = new CorsFilter(urlBasedCorsConfigurationSource); // 创建CorsFilter实例 + return corsFilter; // 返回CorsFilter实例 + } + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/framework/mvc/TokenInterceptor.java b/yyq/src/main/java/com/yanzhen/framework/mvc/TokenInterceptor.java new file mode 100644 index 0000000..9ccc70f --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/framework/mvc/TokenInterceptor.java @@ -0,0 +1,53 @@ +package com.yanzhen.framework.mvc; // 定义包名 + +import com.yanzhen.entity.Student; // 导入Student类 +import com.yanzhen.entity.User; // 导入User类 +import com.yanzhen.framework.exception.MyException; // 导入自定义异常类MyException +import com.yanzhen.framework.jwt.JWTUtil; // 导入JWT工具类JWTUtil +import org.springframework.web.servlet.HandlerInterceptor; // 导入Spring MVC的HandlerInterceptor接口 +import org.springframework.web.servlet.ModelAndView; // 导入Spring MVC的ModelAndView类 + +import javax.servlet.http.HttpServletRequest; // 导入HttpServletRequest类 +import javax.servlet.http.HttpServletResponse; // 导入HttpServletResponse类 + +public class TokenInterceptor implements HandlerInterceptor { // 定义TokenInterceptor类并实现HandlerInterceptor接口 + + @Override // 重写preHandle方法,在请求处理之前进行调用 + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + String token = request.getHeader(JWTUtil.token); // 从请求头中获取token + + String type = JWTUtil.getType(token); // 根据token获取类型 + if("USER".equals(type)){ // 如果类型是USER + //根据token获取user对象 + User user = JWTUtil.getUser(token); // 通过JWT工具类获取User对象 + if(user == null){ // 如果User对象为空 + throw new MyException("超时或不合法的token"); // 抛出自定义异常 + } + String newToken = JWTUtil.sign(user); // 重新生成新的token + response.setHeader(JWTUtil.token,newToken); // 将新token设置到响应头中 + response.setHeader("Access-Control-Expose-Headers", JWTUtil.token); // 设置允许暴露的响应头 + request.setAttribute("user",user); // 将User对象设置到请求属性中 + }else if("STUDENT".equals(type)){ // 如果类型是STUDENT + //根据token获取user对象 + Student student = JWTUtil.getStudent(token); // 通过JWT工具类获取Student对象 + if(student == null){ // 如果Student对象为空 + throw new MyException("超时或不合法的token"); // 抛出自定义异常 + } + String newToken = JWTUtil.signForStudent(student); // 重新生成新的token + response.setHeader(JWTUtil.token,newToken); // 将新token设置到响应头中 + response.setHeader("Access-Control-Expose-Headers", JWTUtil.token); // 设置允许暴露的响应头 + request.setAttribute("student",student); // 将Student对象设置到请求属性中 + } + return true; // 返回true表示继续执行后续的拦截器和处理器 + } + + @Override // 重写postHandle方法,在请求处理之后但在视图渲染之前进行调用 + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + + } + + @Override // 重写afterCompletion方法,在整个请求结束之后进行调用 + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { + + } +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.java b/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.java new file mode 100644 index 0000000..b9eb34e --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.java @@ -0,0 +1,25 @@ +package com.yanzhen.mapper; // 定义包名,表示该接口属于com.yanzhen.mapper包 + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 + +import com.yanzhen.entity.Absence; // 导入Absence缺勤实体类,用于操作缺勤信息 + +public interface AbsenceMapper { // 定义AbsenceMapper接口,提供对Absence缺勤实体进行数据库操作的方法 + + // 创建一个新的Absence缺勤记录 + public int create(Absence absence); + + // 根据id删除缺勤 + public int delete(Integer id); + // 更新缺勤记录 + public int update(Absence absence); + // 选择性地更新缺勤记录 + public int updateSelective(Absence absence); + // 根据条件查询缺勤记录,返回缺勤列表 + public List query(Absence absence); + // 根据id查询一个缺勤记录的详细信息 + public Absence detail(Integer id); + // 统计缺勤记录的数量 + public int count(Absence absence); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.xml new file mode 100644 index 0000000..132f5b7 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/AbsenceMapper.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + insert into tb_absence( + student_id, + dormitory_id, + start_time, + end_time, + remark + )values( + #{studentId}, + #{dormitoryId}, + #{startTime}, + #{endTime}, + #{remark} + ) + + + + + + + + + + delete from tb_absence where id = #{id} + + + update tb_absence set + student_id=#{studentId}, + dormitory_id=#{dormitoryId}, + start_time=#{startTime}, + end_time=#{endTime}, + remark=#{remark} + where id = #{id} + + + + update tb_absence + + student_id = #{studentId}, + dormitory_id = #{dormitoryId}, + start_time = #{startTime}, + end_time = #{endTime}, + remark = #{remark}, + + where id = #{id} + + + + + and id = #{id} + and student_id = #{studentId} + and dormitory_id = #{dormitoryId} + and remark = #{remark} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/BedMapper.java b/yyq/src/main/java/com/yanzhen/mapper/BedMapper.java new file mode 100644 index 0000000..5533109 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/BedMapper.java @@ -0,0 +1,27 @@ +package com.yanzhen.mapper; // 定义包名,表示该接口属于com.yanzhen.mapper包 + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 + +import com.yanzhen.entity.Bed; // 导入Bed床实体类,用于操作床位信息 + +// 定义接口,提供对Bed床实体进行数据库操作的方法 +public interface BedMapper { + // 创建一个新的Bed记录,返回影响的行数 + public int create(Bed bed); + // 根据id删除一个Bed记录 + public int delete(Integer id); + // 根据宿舍ID删除相关的Bed记录 + public int deleteByDormitoryId(Integer dormitoryId); + // 更新一个Bed记录 + public int update(Bed bed); + // 选择性地更新一个Bed记录 + public int updateSelective(Bed bed); + // 根据设置的条件查询Bed记录,返回符合条件的Bed列表 + public List query(Bed bed); + // 根据id查询一个Bed记录的详细信息 + public Bed detail(Integer id); + + // 统计Bed记录的数量,返回数量 + public int count(Bed bed); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/BedMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/BedMapper.xml new file mode 100644 index 0000000..5f18bed --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/BedMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + insert into tb_bed( + bno, + dormitory_id + )values( + #{bno}, + #{dormitoryId} + ) + + + + + + + + + + delete from tb_bed where id = #{id} + + + + delete from tb_bed where dormitory_id = #{dormitoryId} + + + + update tb_bed set + bno=#{bno}, + dormitory_id=#{dormitoryId} + where id = #{id} + + + + update tb_bed set + bno = #{bno}, + dormitory_id = #{dormitoryId} + where id = #{id} + + + + + and id = #{id} + and bno = #{bno} + and dormitory_id = #{dormitoryId} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.java b/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.java new file mode 100644 index 0000000..0ad876c --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.java @@ -0,0 +1,24 @@ +package com.yanzhen.mapper; // 定义包名,表示该接口属于com.yanzhen.mapper包 + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 + +import com.yanzhen.entity.Building; // 导入Building楼宇实体类,用于操作楼宇信息 +// 定义BuildingMapper接口 +public interface BuildingMapper { + // 创建一个新的Building楼宇记录 + public int create(Building building); + // 根据id删除一个Building + public int delete(Integer id); + // 更新一个Building + public int update(Building building); + // 选择性地更新一个Building + public int updateSelective(Building building); + + // 根据条件查询Building,返回符合条件的Building楼宇列表 + public List query(Building building); + // 根据id查询一个Building楼宇记录的详细信息 + public Building detail(Integer id); + // 根据条件统计Building楼宇记录的数量 + public int count(Building building); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.xml new file mode 100644 index 0000000..5fbeed8 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/BuildingMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + insert into tb_building( + name, + type, + storey_num, + sex, + remark, + user_id + )values( + #{name}, + #{type}, + #{storeyNum}, + #{sex}, + #{remark}, + #{userId} + ) + + + + + + + + + + delete from tb_building where id = #{id} + + + update tb_building set + name=#{name}, + type=#{type}, + storey_num=#{storeyNum}, + sex=#{sex}, + remark=#{remark}, + user_id=#{userId} + where id = #{id} + + + + update tb_building set + name = #{name}, + type = #{type}, + storey_num = #{storeyNum}, + sex = #{sex}, + remark = #{remark}, + user_id = #{userId} + where id = #{id} + + + + + and id = #{id} + and name like concat('%',#{name},'%') + and type = #{type} + and storey_num = #{storeyNum} + and sex = #{sex} + and remark = #{remark} + and user_id = #{userId} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.java b/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.java new file mode 100644 index 0000000..f7065cf --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.java @@ -0,0 +1,29 @@ +package com.yanzhen.mapper; // 定义包名,表示该接口属于com.yanzhen.mapper包 + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 + +import com.yanzhen.entity.Dormitory; // 导入Dormitory宿舍实体类,用于操作宿舍信息 +import org.apache.ibatis.annotations.Param; // 导入MyBatis的Param注解,用于传递参数到SQL语句中 + +// 定义DormitoryMapper接口,提供对Dormitory的方法 +public interface DormitoryMapper { + // 创建Dormitory宿舍记录 + public int create(Dormitory dormitory); + // 根据id删除Dormitory宿舍记录 + public int delete(Integer id); + // 更新一个Dormitory + public int update(Dormitory dormitory); + // 选择性地更新一个Dormitory + public int updateSelective(Dormitory dormitory); + + // 根据条件查询Dormitory并返回符合设置条件的Dormitory宿舍列表 + public List query(Dormitory dormitory); + // 根据id查询Dormitory宿舍记录的详细信息 + public Dormitory detail(Integer id); + // 根据条件统计Dormitory的数量 + public int count(Dormitory dormitory); + + // 根据建筑ID和楼层ID删除Dormitory + public int deleteByBuildingIdAndStoryId(@Param("buildingId") Integer buildingId, @Param("storeyId")Integer storeyId); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.xml new file mode 100644 index 0000000..3a6302a --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitoryMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + insert into tb_dormitory( + no, + sex, + type, + capacity, + storey_id, + building_id + )values( + #{no}, + #{sex}, + #{type}, + #{capacity}, + #{storeyId}, + #{buildingId} + ) + + + + + + + + + + delete from tb_dormitory where id = #{id} + + + + delete from tb_dormitory where building_id = #{buildingId} and storey_id = #{storeyId} + + + + + update tb_dormitory set + no=#{no}, + sex=#{sex}, + type=#{type}, + capacity=#{capacity}, + storey_id=#{storeyId}, + building_id=#{buildingId} + where id = #{id} + + + + update tb_dormitory set + no = #{no}, + sex = #{sex}, + type = #{type}, + capacity = #{capacity}, + storey_id = #{storeyId}, + building_id = #{buildingId} + where id = #{id} + + + + + and id = #{id} + and no = #{no} + and sex = #{sex} + and type = #{type} + and capacity = #{capacity} + and storey_id = #{storeyId} + and building_id = #{buildingId} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.java b/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.java new file mode 100644 index 0000000..2577924 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.java @@ -0,0 +1,24 @@ +package com.yanzhen.mapper; // 定义包名,表示该接口属于com.yanzhen.mapper包 + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 + +import com.yanzhen.entity.DormitorySet; // 导入DormitorySet宿舍设置实体类,用于操作宿舍设置信息 + +// 定义DormitorySetMapper接口,提供对DormitorySet宿舍设置实体的方法 +public interface DormitorySetMapper { + //创建新的宿舍设置记录 + public int create(DormitorySet dormitorySet); + //删除宿舍设置记录 + public int delete(Integer id); + // 更新一个DormitorySet宿舍设置记录 + public int update(DormitorySet dormitorySet); + // 选择性地更新一个宿舍设置记录 + public int updateSelective(DormitorySet dormitorySet); + // 根据条件查询宿舍设置记录 + public List query(DormitorySet dormitorySet); + // 根据id查询一个宿舍设置记录的详细信息 + public DormitorySet detail(Integer id); + // 根据条件统计宿舍设置记录的数量,返回记录数量 + public int count(DormitorySet dormitorySet); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.xml new file mode 100644 index 0000000..4733d93 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitorySetMapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + insert into tb_dormitory_set( + prefix, + start, + end, + building_id, + storey_id, + capacity + )values( + #{prefix}, + #{start}, + #{end}, + #{buildingId}, + #{storeyId}, + #{capacity} + ) + + + + + + + + + + delete from tb_dormitory_set where id = #{id} + + + update tb_dormitory_set set + prefix=#{prefix}, + start=#{start}, + end=#{end}, + building_id=#{buildingId}, + storey_id=#{storeyId}, + capacity=#{capacity} + where id = #{id} + + + + update tb_dormitory_set set + prefix = #{prefix}, + start = #{start}, + end = #{end}, + building_id = #{buildingId}, + storey_id = #{storeyId}, + capacity = #{capacity} + where id = #{id} + + + + + and id = #{id} + and prefix = #{prefix} + and start = #{start} + and end = #{end} + and building_id = #{buildingId} + and storey_id = #{storeyId} + and capacity = #{capacity} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.java b/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.java new file mode 100644 index 0000000..0d70748 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.java @@ -0,0 +1,32 @@ +// 定义包名,表示该接口属于com.yanzhen.mapper包 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.DormitoryStudent; // 导入DormitoryStudent实体类,用于操作学生宿舍信息 +import org.apache.ibatis.annotations.Param; // 导入MyBatis的Param注解,用于传递参数到SQL语句中 + +// 定义DormitoryStudentMapper接口,提供对DormitoryStudent实体的方法 +public interface DormitoryStudentMapper { + // 创建一个新的DormitoryStudent记录 + public int create(DormitoryStudent dormitoryStudent); + // 根据id删除一个记录 + public int delete(Integer id); + // 根据条件删除记录 + public int deleteByCond(@Param("studentId") Integer studentId, @Param("dormitoryId")Integer dormitoryId); + // 更新一个记录 + public int update(DormitoryStudent dormitoryStudent); + // 选择性地更新一个DormitoryStudent记录 + public int updateSelective(DormitoryStudent dormitoryStudent); + // 根据条件查询DormitoryStudent记录,返回符合条件的DormitoryStudent列表 + public List query(DormitoryStudent dormitoryStudent); + // 根据id查询一个DormitoryStudent记录的详细信息 + public DormitoryStudent detail(Integer id); + // 根据条件统计记录的数量 + public int count(DormitoryStudent dormitoryStudent); + // 根据buildingId统计DormitoryStudent记录的数量 + public int countByBuildingId(Integer buildingId); + // 根据bedId查询学生信息,返回包含学生信息的Map对象 + public Map queryStudentByBedId(Integer bedId); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.xml new file mode 100644 index 0000000..e801b02 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/DormitoryStudentMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + insert into tb_dormitory_student( + dormitory_id, + bed_id, + student_id, + checkin, + status + )values( + #{dormitoryId}, + #{bedId}, + #{studentId}, + #{checkin}, + #{status} + ) + + + + + + + + + + delete from tb_dormitory_student where id = #{id} + + + + delete from tb_dormitory_student where student_id = #{studentId} + + + + + update tb_dormitory_student set + dormitory_id=#{dormitoryId}, + bed_id=#{bedId}, + student_id=#{studentId}, + checkin=#{checkin}, + status=#{status} + where id = #{id} + + + + update tb_dormitory_student set + dormitory_id = #{dormitoryId}, + bed_id = #{bedId}, + student_id = #{studentId}, + checkin = #{checkin}, + status = #{status} + where id = #{id} + + + + + and id = #{id} + and dormitory_id = #{dormitoryId} + and bed_id = #{bedId} + and student_id = #{studentId} + and status = #{status} + + + + + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.java b/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.java new file mode 100644 index 0000000..e54ec94 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.java @@ -0,0 +1,26 @@ +// 定义包名,表示该接口属于com.yanzhen.mapper包 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Grade; // 导入Grade实体类,用于操作年级信息 + +// 定义GradeMapper接口 +public interface GradeMapper { + // 创建一个新的Grade记录 + public int create(Grade grade); + // 根据id删除一个Grade + public int delete(Integer id); + // 更新一个Grade + public int update(Grade grade); + // 选择性地更新一个Grade记录 + public int updateSelective(Grade grade); + // 根据条件查询Grade记录,返回符合条件的Grade列表 + public List query(Grade grade); + // 从id查询一个Grade的详细信息,返回Grade对象 + public Grade detail(Integer id); + // 根据条件统计Grade记录的数量 + public int count(Grade grade); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.xml new file mode 100644 index 0000000..0488fb4 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/GradeMapper.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + insert into tb_grade( + name + )values( + #{name} + ) + + + + + + + + + + delete from tb_grade where id = #{id} + + + update tb_grade set + name=#{name} + where id = #{id} + + + + update tb_grade set + name = #{name} + where id = #{id} + + + + + and id = #{id} + and name = #{name} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.java b/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.java new file mode 100644 index 0000000..5ecdb16 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.java @@ -0,0 +1,24 @@ +// 定义包名 +package com.yanzhen.mapper; + +import com.yanzhen.entity.Menu; // 导入Menu实体类 +import com.yanzhen.entity.User; // 导入User实体类 +import org.apache.ibatis.annotations.Param; // 导入MyBatis的@Param注解 + +import java.util.List; // 导入List集合 +// 定义MenuMapper接口 +public interface MenuMapper { + // 根据用户ID查询菜单列表 + public List query(Integer userId); + // 查询所有类型的菜单列表 + public List queryByType(); + // 列出所有菜单列表 + public List list(); + // 为用户创建菜单,关联用户ID和菜单ID + public int createUserMenu(@Param("userId") Integer userId, @Param("menuId") Integer menuId); + // 删除用户的菜单 + public int deleteUserMenu(@Param("userId") Integer userId); + // 查询用户已选择的菜单ID列表 + public List queryCheckMenuId(Integer userId); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.xml new file mode 100644 index 0000000..b91defc --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/MenuMapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + delete from tb_user_menu where user_id = #{userId} + + + + insert into tb_user_menu(user_id,menu_id) values(#{userId},#{menuId}) + + + + + + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.java b/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.java new file mode 100644 index 0000000..2ef5107 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.java @@ -0,0 +1,28 @@ +// 定义包名 +package com.yanzhen.mapper; +import java.util.List; // 导入List集合类 +import java.util.Map; // 导入Map集合类 + +import com.yanzhen.entity.Notice; // 导入Notice实体类 +// 定义NoticeMapper接口 +public interface NoticeMapper { + // 创建Notice记录,返回受影响的行数 + public int create(Notice notice); + // 根据ID删除Notice记录 + public int delete(Integer id); + // 更新Notice记录 + public int update(Notice notice); + // 选择性更新Notice记录 + public int updateSelective(Notice notice); + // 根据条件查询Notice列表 + public List query(Notice notice); + // 根据建筑ID查询Notice列表 + public List queryByBuildingId(Notice notice); + + // 根据ID查询Notice详情 + public Notice detail(Integer id); + + // 统计符合条件的Notice数量并返回 + public int count(Notice notice); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.xml new file mode 100644 index 0000000..4666e31 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/NoticeMapper.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + insert into tb_notice( + title, + content, + create_time, + user_id, + filepath + )values( + #{title}, + #{content}, + now(), + #{userId}, + #{filepath} + ) + + + + + + + + + + delete from tb_notice where id = #{id} + + + update tb_notice set + title=#{title}, + content=#{content}, + create_time=#{createTime}, + user_id=#{userId}, + filepath=#{filepath} + where id = #{id} + + + + update tb_notice + + title = #{title}, + content = #{content}, + create_time = #{createTime}, + user_id = #{userId}, + filepath = #{filepath}, + + where id = #{id} + + + + + and id = #{id} + and title = #{title} + and content = #{content} + and user_id = #{userId} + and filepath = #{filepath} + + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.java b/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.java new file mode 100644 index 0000000..bb340ff --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.java @@ -0,0 +1,26 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入List集合类 +import java.util.Map; // 导入Map集合类 + +import com.yanzhen.entity.NoticeReceive; // 导入NoticeReceive实体类 +// 定义NoticeReceiveMapper接口 +public interface NoticeReceiveMapper { + // 创建记录的方法 + public int create(NoticeReceive noticeReceive); + // 根据ID删除记录的方法 + public int delete(Integer id); + // 根据通知ID删除记录的方法并返回 + public int deleteByNoticeId(Integer noticeId); + // 更新记录的方法 + public int update(NoticeReceive noticeReceive); + // 选择性更新记录的方法 + public int updateSelective(NoticeReceive noticeReceive); + // 查询记录列表的方法 + public List query(NoticeReceive noticeReceive); + // 根据ID获取NoticeReceive详情的方法 + public NoticeReceive detail(Integer id); + // 统计NoticeReceive记录数量的方法 + public int count(NoticeReceive noticeReceive); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.xml new file mode 100644 index 0000000..efa66c5 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/NoticeReceiveMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + insert into tb_notice_receive( + notice_id, + building_id + )values( + #{noticeId}, + #{buildingId} + ) + + + + + + + + + + delete from tb_notice_receive where id = #{id} + + + + delete from tb_notice_receive where notice_id = #{noticeId} + + + + update tb_notice_receive set + notice_id=#{noticeId}, + building_id=#{buildingId} + where id = #{id} + + + + update tb_notice_receive set + notice_id = #{noticeId}, + building_id = #{buildingId} + where id = #{id} + + + + + and id = #{id} + and notice_id = #{noticeId} + and building_id = #{buildingId} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.java b/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.java new file mode 100644 index 0000000..e6de2c1 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.java @@ -0,0 +1,28 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Org; // 导入Org实体类,用于操作组织信息 +// 定义OrgMapper接口 +public interface OrgMapper { + // 创建一个新的Org记录,返回影响的行数 + public int create(Org org); + // 根据id删除一个Org记录 + public int delete(Integer id); + // 更新一个Org记录 + public int update(Org org); + + // 选择性地更新一个Org记录 + public int updateSelective(Org org); + // 根据条件查询Org的记录,返回符合条件的Org列表 + public List query(Org org); + // 根据id查询一个Org记录的详细信息,返回Org的对象 + public Org detail(Integer id); + // 根据条件统计出Org记录的数量 + public int count(Org org); + + // 根据selectionId查询相关的Org记录 + public List queryOrgBySelectionId(Integer selectionId); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.xml new file mode 100644 index 0000000..12581fa --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/OrgMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + insert into tb_org( + name, + type, + grade_id, + parent_id, + remark + )values( + #{name}, + #{type}, + #{gradeId}, + #{parentId}, + #{remark} + ) + + + + + + + + + + delete from tb_org where id = #{id} + + + update tb_org set + name=#{name}, + type=#{type}, + grade_id=#{gradeId}, + parent_id=#{parentId}, + remark=#{remark} + where id = #{id} + + + + update tb_org set + name = #{name}, + type = #{type}, + grade_id = #{gradeId}, + parent_id = #{parentId}, + remark = #{remark} + where id = #{id} + + + + + and id = #{id} + and name = #{name} + and type = #{type} + and grade_id = #{gradeId} + and parent_id = #{parentId} + and remark = #{remark} + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.java b/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.java new file mode 100644 index 0000000..90ad7bb --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.java @@ -0,0 +1,27 @@ +// 定义包名,表示该接口属于com.yanzhen.mapper包 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Record; // 导入Record实体类,用于操作记录信息 +// 定义RecordMapper接口 +public interface RecordMapper { + // 创建一个Record记录,返回影响的行数 + public int create(Record record); + // 根据id删除一个Record记录 + public int delete(Integer id); + // 更新一个Record记录 + public int update(Record record); + + // 选择性地更新一个Record记录 + public int updateSelective(Record record); + // 根据设置条件查询Record记录,返回符合条件的Record列表 + public List query(Record record); + // 根据id查询一个Record记录的详细信息 + public Record detail(Integer id); + + // 根据条件统计Record记录的数量,返回记录数量 + public int count(Record record); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.xml new file mode 100644 index 0000000..5ae2c16 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/RecordMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + insert into tb_record( + student_id, + dormitory_id, + bed_id, + status, + create_date + )values( + #{studentId}, + #{dormitoryId}, + #{bedId}, + #{status}, + #{createDate} + ) + + + + + + + + + + delete from tb_record where id = #{id} + + + update tb_record set + student_id=#{studentId}, + dormitory_id=#{dormitoryId}, + bed_id=#{bedId}, + status=#{status}, + create_date=#{createDate} + where id = #{id} + + + + update tb_record set + student_id = #{studentId}, + dormitory_id = #{dormitoryId}, + bed_id = #{bedId}, + status = #{status}, + create_date = #{createDate} + where id = #{id} + + + + + and id = #{id} + and student_id = #{studentId} + and dormitory_id = #{dormitoryId} + and bed_id = #{bedId} + and status = #{status} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.java b/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.java new file mode 100644 index 0000000..42ce731 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.java @@ -0,0 +1,27 @@ +// 定义包名,表示该接口属于com.yanzhen.mapper包 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Repair; // 导入Repair实体类,用于操作维修记录信息 +// 定义RepairMapper接口 +public interface RepairMapper { + // 创建一个Repair记录,返回影响的行数 + public int create(Repair repair); + // 根据id删除Repair记录 + public int delete(Integer id); + // 更新Repair记录 + public int update(Repair repair); + + // 选择性地更新Repair记录 + public int updateSelective(Repair repair); + + // 查询满足的Repair记录,返回符合条件的Repair列表 + public List query(Repair repair); + // 根据id查询Repair记录的详细信息 + public Repair detail(Integer id); + // 根据条件统计Repair记录的数量 + public int count(Repair repair); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.xml new file mode 100644 index 0000000..7d7ca27 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/RepairMapper.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + insert into tb_repair( + student_id, + dormitory_id, + building_id, + description, + create_date, + status + )values( + #{studentId}, + #{dormitoryId}, + #{buildingId}, + #{description}, + #{createDate}, + #{status} + ) + + + + + + + + + + delete from tb_repair where id = #{id} + + + update tb_repair set + student_id=#{studentId}, + dormitory_id=#{dormitoryId}, + building_id=#{buildingId}, + description=#{description}, + create_date=#{createDate}, + status=#{status} + where id = #{id} + + + + update tb_repair + + student_id = #{studentId}, + dormitory_id = #{dormitoryId}, + building_id = #{buildingId}, + description = #{description}, + create_date = #{createDate}, + status = #{status}, + + where id = #{id} + + + + + and id = #{id} + and student_id = #{studentId} + and dormitory_id = #{dormitoryId} + and building_id = #{buildingId} + and description = #{description} + and status = #{status} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.java b/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.java new file mode 100644 index 0000000..7e04325 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.java @@ -0,0 +1,26 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.SelectionDormitory; // 导入SelectionDormitory实体类,用于操作宿舍选择信息 +// 定义SelectionDormitoryMapper接口 +public interface SelectionDormitoryMapper { + // 创建SelectionDormitory记录 + public int create(SelectionDormitory selectionDormitory); + // 根据id删除一个记录 + public int delete(Integer id); + // 根据clazzId删除记录 + public int deleteByClazzId(Integer clazzId); + // 更新一个记录 + public int update(SelectionDormitory selectionDormitory); + // 选择性地更新一个记录 + public int updateSelective(SelectionDormitory selectionDormitory); + // 根据条件查询记录 + public List query(SelectionDormitory selectionDormitory); + // 根据id查询一个记录的详细信息 + public SelectionDormitory detail(Integer id); + // 根据条件统计记录的数量 + public int count(SelectionDormitory selectionDormitory); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.xml new file mode 100644 index 0000000..da3a87e --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionDormitoryMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + insert into tb_selection_dormitory( + dormitory_id, + clazz_id + )values( + #{dormitoryId}, + #{clazzId} + ) + + + + + + + + + + delete from tb_selection_dormitory where id = #{id} + + + update tb_selection_dormitory set + dormitory_id=#{dormitoryId}, + clazz_id=#{clazzId} + where id = #{id} + + + + update tb_selection_dormitory set + dormitory_id = #{dormitoryId}, + clazz_id = #{clazzId} + where id = #{id} + + + + + and id = #{id} + and dormitory_id = #{dormitoryId} + and clazz_id = #{clazzId} + + + + + delete from tb_selection_dormitory where clazz_id = #{clazzId} + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.java b/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.java new file mode 100644 index 0000000..9ab9df4 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.java @@ -0,0 +1,26 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.SelectionJoiner; // 导入SelectionJoiner实体类,用于操作宿舍层信息 +// 定义SelectionJoinerMapper接口 +public interface SelectionJoinerMapper { + // 创建一个新的SelectionJoiner记录 + public int create(SelectionJoiner selectionJoiner); + // 删除一个记录 + public int delete(Integer id); + // 根据selectionId删除记录 + public int deleteBySelectionId(Integer selectionId); + // 更新一个记录 + public int update(SelectionJoiner selectionJoiner); + // 选择性地更新一个记录 + public int updateSelective(SelectionJoiner selectionJoiner); + // 查询记录 + public List query(SelectionJoiner selectionJoiner); + // 查询一个记录的详细信息 + public SelectionJoiner detail(Integer id); + // 统计记录的数量 + public int count(SelectionJoiner selectionJoiner); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.xml new file mode 100644 index 0000000..b112de5 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionJoinerMapper.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + insert into tb_selection_joiner( + selection_id, + clazz_id + )values( + #{selectionId}, + #{clazzId} + ) + + + + + + + + + + delete from tb_selection_joiner where id = #{id} + + + update tb_selection_joiner set + selection_id=#{selectionId}, + clazz_id=#{clazzId} + where id = #{id} + + + + update tb_selection_joiner set + selection_id = #{selectionId}, + clazz_id = #{clazzId} + where id = #{id} + + + + + and id = #{id} + and selection_id = #{selectionId} + and clazz_id = #{clazzId} + + + + + delete from tb_selection_joiner where selection_id = #{selectionId} + + + + diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.java b/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.java new file mode 100644 index 0000000..bf451ac --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.java @@ -0,0 +1,27 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Selection; // 导入Selection实体类,用于操作选择信息 +// 定义SelectionMapper接口 +public interface SelectionMapper { + // 创建一个新的Selection记录 + public int create(Selection selection); + // 删除一个Selection记录 + public int delete(Integer id); + // 更新一个Selection记录 + public int update(Selection selection); + // 选择性地更新一个Selection记录 + public int updateSelective(Selection selection); + //查询Selection记录 + public List query(Selection selection); + // 查询Selection记录 + public List queryByClazzId(Integer clazzId); + // 查询一个Selection记录的详细信息 + public Selection detail(Integer id); + // 统计Selection记录的数量 + public int count(Selection selection); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.xml new file mode 100644 index 0000000..1a780ec --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/SelectionMapper.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + insert into tb_selection( + name, + start_time, + end_time, + remark + )values( + #{name}, + #{startTime}, + #{endTime}, + #{remark} + ) + + + + + + + + + + delete from tb_selection where id = #{id} + + + update tb_selection set + name=#{name}, + start_time=#{startTime}, + end_time=#{endTime}, + remark=#{remark} + where id = #{id} + + + + update tb_selection set + name = #{name}, + start_time = #{startTime}, + end_time = #{endTime}, + remark = #{remark} + where id = #{id} + + + + + and id = #{id} + and name = #{name} + and remark = #{remark} + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.java b/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.java new file mode 100644 index 0000000..29d9d59 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.java @@ -0,0 +1,24 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Storey; // 导入Storey实体类,用于操作宿舍层信息 +// 定义StoreyMapper接口 +public interface StoreyMapper { + // 创建一个新的Storey记录 + public int create(Storey storey); + // 删除一个Storey记录 + public int delete(Integer id); + // 更新一个Storey记录 + public int update(Storey storey); + // 选择性地更新一个Storey记录 + public int updateSelective(Storey storey); + // 查询Storey记录 + public List query(Storey storey); + // 查询一个Storey记录的详细信息 + public Storey detail(Integer id); + // 统计Storey记录的数量 + public int count(Storey storey); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.xml new file mode 100644 index 0000000..16593dc --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/StoreyMapper.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + insert into tb_storey( + name, + building_id, + remark + )values( + #{name}, + #{buildingId}, + #{remark} + ) + + + + + + + + + + delete from tb_storey where id = #{id} + + + update tb_storey set + name=#{name}, + building_id=#{buildingId}, + remark=#{remark} + where id = #{id} + + + + update tb_storey set + name = #{name}, + building_id = #{buildingId}, + remark = #{remark} + where id = #{id} + + + + + and id = #{id} + and name = #{name} + and building_id = #{buildingId} + and remark = #{remark} + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.java b/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.java new file mode 100644 index 0000000..61491bc --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.java @@ -0,0 +1,28 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.Student; // 导入Student实体类,用于操作学生信息 +// 定义一个StudentMapper公共接口 +public interface StudentMapper { + // 创建学生记录 + public int create(Student student); + //删除学生记录 + public int delete(Integer id); + // 更新学生记录 + public int update(Student student); + // 选择性更新学生记录 + public int updateSelective(Student student); + // 查询学生记录 + public List query(Student student); + // 定义一个获取学生详细信息的方法 + public Student detail(Integer id); + // 通过名字获取学生详细信息 + public Student detailByName(String name); + // 定义一个统计学生数量的方法 + public int count(Student student); + // 定义一个登录方法,返回值为Student对象,参数为用户名称和密码 + public Student login(String userName,String password); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.xml new file mode 100644 index 0000000..ded5f2d --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/StudentMapper.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + insert into tb_student( + stu_no, + name, + idcard, + grade_id, + sex, + phone, + password, + clazz_id + )values( + #{stuNo}, + #{name}, + #{idcard}, + #{gradeId}, + #{sex}, + #{phone}, + '123456', + #{clazzId} + ) + + + + + + + + + + + + delete from tb_student where id = #{id} + + + update tb_student set + stu_no=#{stuNo}, + name=#{name}, + idcard=#{idcard}, + grade_id=#{gradeId}, + sex=#{sex}, + phone=#{phone}, + password=#{password}, + clazz_id=#{clazzId} + where id = #{id} + + + + update tb_student + + stu_no = #{stuNo}, + name = #{name}, + idcard = #{idcard}, + grade_id = #{gradeId}, + sex = #{sex}, + phone = #{phone}, + password = #{password}, + clazz_id = #{clazzId}, + + where id = #{id} + + + + + and id = #{id} + and stu_no = #{stuNo} + and name like concat('%',#{name},'%') + and idcard = #{idcard} + and grade_id = #{gradeId} + and sex = #{sex} + and phone = #{phone} + and password = #{password} + and clazz_id = #{clazzId} + + + + + + diff --git a/yyq/src/main/java/com/yanzhen/mapper/UserMapper.java b/yyq/src/main/java/com/yanzhen/mapper/UserMapper.java new file mode 100644 index 0000000..7e9b9cd --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/UserMapper.java @@ -0,0 +1,27 @@ +// 定义包名 +package com.yanzhen.mapper; + +import java.util.List; // 导入Java的List类,用于处理列表数据结构 +import java.util.Map; // 导入Java的Map类,用于处理键值对数据结构 + +import com.yanzhen.entity.User; // 导入User实体类,用于操作用户数据 +import org.apache.ibatis.annotations.Param; // 导入MyBatis的Param注解,用于传递参数到SQL语句中 +// 定义UserMapper接口 +public interface UserMapper { + // 定义create方法创建新用户 + public int create(User user); + // 根据用户ID删除用户 + public int delete(Integer id); + // 更新用户信息 + public int update(User user); + // 选择性更新用户信息 + public int updateSelective(User user); + //查询用户列表 + public List query(User user); + // 查询用户详情 + public User detail(Integer id); + //查询用户 + public User login(@Param("userName") String userName, @Param("password") String password); + // 统计符合条件的用户数量 + public int count(User user); +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/UserMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/UserMapper.xml new file mode 100644 index 0000000..3fc2689 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/UserMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + insert into tb_user( + user_name, + password, + name, + phone, + type, + remark + )values( + #{userName}, + #{password}, + #{name}, + #{phone}, + #{type}, + #{remark} + ) + + + + + + + + + + delete from tb_user where id = #{id} + + + update tb_user set + user_name=#{userName}, + password=#{password}, + name=#{name}, + phone=#{phone}, + type=#{type}, + remark=#{remark} + where id = #{id} + + + + update tb_user + + user_name = #{userName}, + password = #{password}, + name = #{name}, + phone = #{phone}, + type = #{type}, + remark = #{remark}, + + where id = #{id} + + + + + and id = #{id} + and user_name like concat('%',#{userName},'%') + and password = #{password} + and name like concat('%',#{name},'%') + and phone = #{phone} + and type = #{type} + and remark = #{remark} + + + + + + \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.java b/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.java new file mode 100644 index 0000000..c4f0528 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.java @@ -0,0 +1,24 @@ +package com.yanzhen.mapper; + +import java.util.List; // 导入Java标准库中的List类 +import java.util.Map; // 导入Java标准库中的Map类 + +import com.yanzhen.entity.Visit; // 导入自定义的Visit实体类 +// 定义一个VisitMapper公共接口 +public interface VisitMapper { + // 创建访问记录 + public int create(Visit visit); + // 定义一个删除访问记录的方法 + public int delete(Integer id); + // 定义一个更新访问记录的方法 + public int update(Visit visit); + // 定义一个选择性更新访问记录的方法 + public int updateSelective(Visit visit); + // 定义一个查询访问记录的方法 + public List query(Visit visit); + // 定义一个获取访问记录详情的方法 + public Visit detail(Integer id); + // 定义一个统计访问记录数量的方法 + public int count(Visit visit); + +} \ No newline at end of file diff --git a/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.xml b/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.xml new file mode 100644 index 0000000..7633511 --- /dev/null +++ b/yyq/src/main/java/com/yanzhen/mapper/VisitMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + insert into tb_visit( + visitor, + phone, + sex, + idcard, + student_id, + visit_time, + leave_time, + remark + )values( + #{visitor}, + #{phone}, + #{sex}, + #{idcard}, + #{studentId}, + #{visitTime}, + #{leaveTime}, + #{remark} + ) + + + + + + + + + + delete from tb_visit where id = #{id} + + + update tb_visit set + visitor=#{visitor}, + phone=#{phone}, + sex=#{sex}, + idcard=#{idcard}, + student_id=#{studentId}, + visit_time=#{visitTime}, + leave_time=#{leaveTime}, + remark=#{remark} + where id = #{id} + + + + update tb_visit + + visitor = #{visitor}, + phone = #{phone}, + sex = #{sex}, + idcard = #{idcard}, + student_id = #{studentId}, + visit_time = #{visitTime}, + leave_time = #{leaveTime}, + remark = #{remark}, + + where id = #{id} + + + + + and id = #{id} + and visitor = #{visitor} + and phone = #{phone} + and sex = #{sex} + and idcard = #{idcard} + and student_id = #{studentId} + and remark = #{remark} + + + + \ No newline at end of file