diff --git a/base-manager-ui/admin/public/SourceHanSansSC-Regular-2.otf b/base-manager-ui/admin/public/SourceHanSansSC-Regular-2.otf new file mode 100644 index 0000000000000000000000000000000000000000..73fcdaffa1ca0db99f21cce6dbad5838d2725755 Binary files /dev/null and b/base-manager-ui/admin/public/SourceHanSansSC-Regular-2.otf differ diff --git a/base-manager-ui/admin/public/index.html b/base-manager-ui/admin/public/index.html index bfb9970bbb0039cc91b4c2d7a845c7194abf5994..b52b99649f6fb7194c25e6dc0f0c9db0197fed7b 100644 --- a/base-manager-ui/admin/public/index.html +++ b/base-manager-ui/admin/public/index.html @@ -1,29 +1,39 @@ <!DOCTYPE html> <html lang="en"> - <head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width,initial-scale=1.0"> - <link rel="icon" href="<%= BASE_URL %>favicon.ico"> - <!-- <title><%= process.env.VUE_APP_NAME %></title> --> - <title></title> - <!-- require cdn assets css --> - <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> - <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> + +<head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width,initial-scale=1.0" /> + <link rel="icon" href="<%= BASE_URL %>favicon.ico" /> + <!-- <title><%= process.env.VUE_APP_NAME %></title> --> + <title></title> + <!-- require cdn assets css --> + <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> + <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" /> <% } %> - - </head> - <body> - <noscript> - <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> - </noscript> - <div id="popContainer"> - <div id="app"></div> - </div> - <!-- require cdn assets js --> - <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> - <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> + <style> + @font-face { + font-family: Source Han Sans CN; + src: url("./SourceHanSansSC-Regular-2.otf"); + } + </style> +</head> + +<body> + <noscript> + <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work + properly without JavaScript enabled. Please enable it to + continue.</strong> + </noscript> + <div id="popContainer"> + <div id="app"></div> + </div> + <!-- require cdn assets js --> + <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %> + <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script> <% } %> - <!-- built files will be auto injected --> - </body> -</html> + <!-- built files will be auto injected --> +</body> + +</html> \ No newline at end of file diff --git a/base-manager-ui/admin/src/assets/img/sms_bg.jpg b/base-manager-ui/admin/src/assets/img/sms_bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5d94e973728e4bfe2994728b39c550f10d7b5412 Binary files /dev/null and b/base-manager-ui/admin/src/assets/img/sms_bg.jpg differ diff --git a/base-manager-ui/admin/src/components/YButton.vue b/base-manager-ui/admin/src/components/YButton.vue new file mode 100644 index 0000000000000000000000000000000000000000..4278da6ff98cf13da3fe397709082966ecba2998 --- /dev/null +++ b/base-manager-ui/admin/src/components/YButton.vue @@ -0,0 +1,239 @@ +<template> + <div class="y-button" :style="{ '--w': width + 'px' }"> + <button + type="button" + :style="{ '--w': width + 'px' }" + :class="{ animating: active, active: value }" + @click="clickHandler" + @animationend="animationend" + > + <span> + <b></b> + <svg viewBox="-5.5 -5.5 71 71" id="circle"> + <circle + cx="30" + cy="30" + r="30" + stroke="white" + stroke-width="11" + fill="transparent" + ></circle> + </svg> + </span> + </button> + <div :class="['text', { active: value }]"> + <!-- <span class="on"> + <span> + {{ activeText }} + </span> + </span> + <span class="off"> + <span> + {{ unActiveText }} + </span> + </span> --> + + {{ value ? activeText : unActiveText }} + </div> + </div> +</template> + +<script> +export default { + model: { + prop: "checked", + event: "change", + }, + props: { + width: { + type: Number, + default: 84, + }, + checked: { + required: true, + }, + activeText: { + default: "ON", + }, + unActiveText: { + default: "OFF", + }, + }, + data() { + return { + active: false, + }; + }, + computed: { + value() { + return this.checked === 1 || this.checked === "1"; + }, + }, + methods: { + clickHandler() { + this.active = true; + }, + animationend() { + this.active = false; + this.$emit("change", this.checked ? 0 : 1); + }, + }, +}; +</script> + +<style lang="less" scoped> +@keyframes c { + to { + transform: none; + } +} +.y-button { + --timing: cubic-bezier(0.645, 0.045, 0.355, 1); + --primary: #f4f7f5; + width: var(--w); + + button { + --bg: rgb(var(--rgb)); + --bga: rgba(var(--rgb), 0.4); + /* Safari fix */ + -webkit-appearance: none; + border: none; + font-size: 100%; + width: var(--w); + height: var(--w); + background: var(--bg); + box-shadow: 0 3px 12px 2px var(--bga); + border-radius: 50%; + position: relative; + overflow: hidden; + cursor: pointer; + transition: 0.1s transform, 0.3s box-shadow; + will-change: transform, box-shadow; + backface-visibility: hidden; + } + button > * { + pointer-events: none; + } + button:focus { + outline: none; + } + button:active { + transform: scale(0.97); + } + button:after { + --bg: rgb(var(--rgb)); + content: ""; + position: absolute; + top: -15%; + left: -15%; + width: 200%; + height: 200%; + background: var(--bg); + border-radius: inherit; + transform: translate(5%, 5%) scale(0.03); + pointer-events: none; + } + button.animating:after { + animation: c 0.5s cubic-bezier(0.5, 0, 0.5, 1) backwards; + } + button.active, + button:not(.active):after { + --rgb: 64, 227, 120; + } + button:not(.active), + button.active:after { + --rgb: 229, 55, 94; + } + + button span { + display: inline-block; + position: relative; + margin-top: 5px; + } + button b { + --w: 7px; + overflow: hidden; + border-radius: var(--w); + display: grid; + width: var(--w); + height: 35px; + top: 0; + left: 50%; + position: absolute; + transform: translateX(-50%); + z-index: 3; + will-change: transform; + } + button b:before { + content: ""; + background: #fff; + width: 100%; + height: 100%; + border-radius: var(--w); + transform: translateY(-15px); + transition-timing-function: var(--timing); + transition: 0.5s; + } + button.active b:before { + transform: translateY(12px); + transition-delay: 0.27s; + transition-timing-function: cubic-bezier(0.25, 0.25, 0.25, 1.25); + } + button svg { + --dash: 190; + stroke-linecap: round; + stroke-dasharray: var(--dash); + stroke-dashoffset: var(--dash); + width: 46px; + height: 46px; + transform: scaleX(-1) rotate(-89deg); + transition: 0.4s; + transition-timing-function: var(--timing); + margin: auto; + position: relative; + z-index: 1; + will-change: transform, stroke-dashoffset; + } + button:not(.active) svg { + stroke-dashoffset: 40; + transform: scaleX(-1) rotate(-52deg); + transition: 0.5s 0.25s; + } + aside { + position: absolute; + bottom: 0; + left: 0; + display: flex; + justify-content: center; + text-align: center; + width: 100%; + padding: 0 2em 2em; + font-family: "Pacifico", cursive; + } + aside a { + text-decoration: underline; + color: #e65289; + display: flex; + align-items: center; + } + aside a:hover, + aside a:focus { + color: #000; + text-decoration: none; + } + .dribbble-logo { + width: 18px; + height: 18px; + margin-right: 5px; + } + .text { + width: 100%; + margin-top: 10px; + font-size: 22px; + font-family: Source Han Sans CN; + font-weight: 500; + color: #c9c9c9; + text-align: center; + } +} +</style> diff --git a/base-manager-ui/admin/src/components/sitetree/index.vue b/base-manager-ui/admin/src/components/sitetree/index.vue index 2f0ff404ef18cde9ddc59b21f8b0e8a81f782831..bd7dcc0b55b64eee895a912db1f0e32fbe248732 100644 --- a/base-manager-ui/admin/src/components/sitetree/index.vue +++ b/base-manager-ui/admin/src/components/sitetree/index.vue @@ -2,14 +2,15 @@ <div class="sitetree"> <!-- <span style="font-weight: 600">绔欑偣缁撴瀯</span> --> <div class="box"> - <a-tree - :load-data="onLoadData" - :tree-data="treeData" - :expandedKeys.sync="expandedKeys" - :replaceFields="{ title: 'label', key: 'id' }" - @select="onSelect" - > - </a-tree> + <a-spin :spinning="loading"> + <a-tree + :tree-data="treeData" + :expandedKeys.sync="expandedKeys" + :replaceFields="{ title: 'label', key: 'id' }" + @select="onSelect" + > + </a-tree> + </a-spin> </div> </div> </template> @@ -18,6 +19,7 @@ // api import { getListByParentId, + authAreaTree, // areaList, // getSiteList } from "@/services/basicsetFun"; @@ -28,43 +30,73 @@ export default { treeData: [], //鏍戠粨鏋� id: "", expandedKeys: [], + loading: false, }; }, created() { - this.getAreaList(); + this.authAreaTree(); + this.getTopArea(); }, methods: { - // 鑾峰彇鍖哄煙 - async getAreaList() { + editLeaf(arr) { + return arr.map((v) => { + if (v.children && v.children.length > 0) { + this.editLeaf(v.children); + } else { + v.isLeaf = true; + } + return v; + }); + }, + + // 鑾峰彇涓汉鍖哄煙鏁版嵁 + async authAreaTree() { + this.loading = true; + let res = await authAreaTree(); + if (res.data.code == 1) { + let { data } = res.data.data; + if (data.length) { + let firstData = data[0]; + if (firstData.areaLevel > 2 || data.length > 1) { + let TopParent = await this.getTopArea(); + TopParent.selectable = false; + TopParent.children = this.editLeaf(data); + this.treeData = [TopParent]; + } else { + this.treeData = this.editLeaf(data); + } + this.expandedKeys = [this.treeData[0].id]; + } + } + this.loading = false; + }, + + // 鑾峰彇椤跺眰鍖哄煙 + async getTopArea() { let res = await getListByParentId({ parentId: 0 }); const { data, code } = res.data; if (code === 1) { - this.treeData = data.data; - // let obj = { - // dataRef: { - // id: data.data[0].id, - // }, - // }; - // this.onLoadData(obj); - this.expandedKeys = [data.data[0].id]; + return data.data[0]; + } else { + return {}; } }, // 寮傛鑾峰彇瀛愬尯鍩� - onLoadData(treeNode) { - return new Promise((resolve) => { - getListByParentId({ - parentId: treeNode.dataRef.id, - }).then((res) => { - const { data } = res.data; - treeNode.dataRef.children = data.data; - this.treeData = [...this.treeData]; - resolve(); - }); - }); - }, + // onLoadData(treeNode) { + // return new Promise((resolve) => { + // getListByParentId({ + // parentId: treeNode.dataRef.id, + // }).then((res) => { + // const { data } = res.data; + // treeNode.dataRef.children = data.data; + // this.treeData = [...this.treeData]; + // resolve(); + // }); + // }); + // }, // 閫変腑鍖哄煙 onSelect(num, node) { if (num && node.selectedNodes.length > 0) { @@ -94,4 +126,4 @@ export default { overflow-y: auto; } } -</style> \ No newline at end of file +</style> diff --git a/base-manager-ui/admin/src/layouts/Layouts.vue b/base-manager-ui/admin/src/layouts/Layouts.vue index 133ba9548d3957e2b148298a03a0940730c51062..bc6aa106e3206c4aa94e4cacc73de4ec28d8e2d9 100644 --- a/base-manager-ui/admin/src/layouts/Layouts.vue +++ b/base-manager-ui/admin/src/layouts/Layouts.vue @@ -133,4 +133,4 @@ export default { background: #fff; border-radius: 4px; } -</style> \ No newline at end of file +</style> diff --git a/base-manager-ui/admin/src/layouts/header/HeaderSite.vue b/base-manager-ui/admin/src/layouts/header/HeaderSite.vue index 8287d42dc7d23160e555cee7ee8f6de44a02884a..632af60af0a5217473216238560c63daa1a232bf 100644 --- a/base-manager-ui/admin/src/layouts/header/HeaderSite.vue +++ b/base-manager-ui/admin/src/layouts/header/HeaderSite.vue @@ -134,7 +134,7 @@ export default { const { siteTree } = data; this.sitelist = siteTree; let arr = []; - const treeFn = function (e) { + const treeFn = function(e) { e.forEach((element) => { arr.push(element); if (element.children && element.children.length > 0) { diff --git a/base-manager-ui/admin/src/main.js b/base-manager-ui/admin/src/main.js index db2ae240e3fb40f2a7aa2e1224030671c3b1aeb8..244cfd5a9203331512f024cf7e2d7852ce265107 100644 --- a/base-manager-ui/admin/src/main.js +++ b/base-manager-ui/admin/src/main.js @@ -1,6 +1,5 @@ import Vue from "vue"; import App from "./App.vue"; -import { initRouter } from "./router"; import "./theme/index.less"; import Antd from "ant-design-vue"; import store from "./store"; @@ -9,7 +8,8 @@ import "./assets/css/common.less"; import "./assets/css/relas.less"; import "./assets/css/use.less"; import Plugins from "@/plugins"; -import { initI18n } from "@/utils/i18n"; +import { router } from "@/router"; +import { i18n } from "@/utils/i18n"; import bootstrap from "@/bootstrap"; import "moment/locale/zh-cn"; import VueResource from "vue-resource"; @@ -56,14 +56,11 @@ Vue.prototype.$nanoid = nanoid; import * as echarts from "echarts"; Vue.prototype.$echarts = echarts; -export const router = initRouter(store.state.setting.asyncRoutes); -const i18n = initI18n("CN", "US"); Vue.use(Antd); Vue.config.productionTip = false; // Vue.use(Viser) Vue.use(Plugins); Vue.use(VueResource); - bootstrap({ router, store, i18n, message: Vue.prototype.$message }); new Vue({ diff --git a/base-manager-ui/admin/src/pages/basicset/dept/department.vue b/base-manager-ui/admin/src/pages/basicset/dept/department.vue index 2f757bc60f5c35e1ba5212bf3637cba5d9127457..c757a7313c38b86dbf94611ede0b2bba34f975be 100644 --- a/base-manager-ui/admin/src/pages/basicset/dept/department.vue +++ b/base-manager-ui/admin/src/pages/basicset/dept/department.vue @@ -59,9 +59,7 @@ </div> </div> <div> - <div class="department_span"> - 绠€绉帮細{{ v.deptAbb ? v.deptAbb : "--" }} - </div> + <div>绠€绉帮細{{ v.deptAbb ? v.deptAbb : "--" }}</div> <div> 鑱旂郴鐢佃瘽锛歿{ v.deptTelphone ? v.deptTelphone : "--" }} </div> @@ -687,7 +685,6 @@ export default { } .department_span { margin-right: 3px; - font-size: 5px; } .department_off { // margin-left: 20px; diff --git a/base-manager-ui/admin/src/pages/basicset/hall/hallwindow/modal/WindowToHall.vue b/base-manager-ui/admin/src/pages/basicset/hall/hallwindow/modal/WindowToHall.vue index 719018d2344a2743880b349d3db5f2b903edb6ac..0338715b37833478d15694bf1bf710ddbd18277f 100644 --- a/base-manager-ui/admin/src/pages/basicset/hall/hallwindow/modal/WindowToHall.vue +++ b/base-manager-ui/admin/src/pages/basicset/hall/hallwindow/modal/WindowToHall.vue @@ -35,8 +35,9 @@ </a-modal> </div> </template> - - <script> + +<script> +import local from "@/utils/local"; import { // saveWindowHall, batchSaveWindowHall, @@ -60,6 +61,7 @@ export default { data() { return { selectInfo: undefined, + siteId: local.getLocal("siteId"), // 绔欑偣id form: { windowId: "", // 绐楀彛id windowName: "", // 绐楀彛鍚嶇О @@ -115,6 +117,7 @@ export default { windowName: v.name, // 绐楀彛鍚嶇О hallId: this.form.hallId, // 澶у巺id hallName: this.form.hallName, // 澶у巺鍚嶇О + siteId: this.siteId, }; }); let res = await batchSaveWindowHall(arr); @@ -135,6 +138,5 @@ export default { }, }; </script> - -<style lang="less" scoped> -</style> \ No newline at end of file + +<style lang="less" scoped></style> diff --git a/base-manager-ui/admin/src/pages/basicset/jump/jump.vue b/base-manager-ui/admin/src/pages/basicset/jump/jump.vue index 5d3ca6f1039d05a541035ae6277a237d816ea7ad..7f22d55458d36de1951d84ff8bb21f70bd69e664 100644 --- a/base-manager-ui/admin/src/pages/basicset/jump/jump.vue +++ b/base-manager-ui/admin/src/pages/basicset/jump/jump.vue @@ -7,6 +7,7 @@ <script> import local from "@/utils/local"; import { mapMutations } from "vuex"; +import { createMenus } from "@/router"; export default { data() { return {}; @@ -26,8 +27,15 @@ export default { ]), // 鑾峰彇token getToken() { - let { token, userInfo, siteid, siteName, sysName, sysLogo, path } = - this.$route.query; + let { + token, + userInfo, + siteid, + siteName, + sysName, + sysLogo, + path, + } = this.$route.query; if (token && userInfo) { userInfo = JSON.parse(userInfo); this.SET_userInfo(userInfo); @@ -39,6 +47,8 @@ export default { this.SET_path(path); local.setLocal("siteId", siteid); local.setLocal("siteName", siteName); + // 鍔ㄦ€佽彍鍗� + createMenus(); this.$router.push("/website"); } else { this.$message.warning("璺宠浆澶辫触,璇烽噸鏂扮櫥褰�"); diff --git a/base-manager-ui/admin/src/pages/basicset/sms/configurat.vue b/base-manager-ui/admin/src/pages/basicset/sms/configurat.vue index 6613d2855eb5ee33a24a8492eb1dfe142290c0d3..362ff33f6d977251f6b2317b462d3eb794fafe6a 100644 --- a/base-manager-ui/admin/src/pages/basicset/sms/configurat.vue +++ b/base-manager-ui/admin/src/pages/basicset/sms/configurat.vue @@ -1,27 +1,32 @@ <template> <div class="configurat"> <div class="title">鐭俊鍏ㄥ眬閰嶇疆</div> - <div class="set-configurat"> - <y-switch - v-model="setInfo.messageoff" - checkedChildren="寮€" - unCheckedChildren="鍏�" - @change="changeClose" - ></y-switch> + <div class="des"> + 鍏ㄥ眬閰嶇疆锛屼竴閿帶鍒� </div> + <div class="des"> + 杞绘澗绠$悊鏀垮姟鐭俊閫氱煡鐨勫叏灞€璁剧疆锛岀‘淇濅俊鎭殑鍑嗙‘浼犻€� + </div> + <div class="tag-list"> + <div class="tag-item" v-for="v in tagList" :key="v"> + {{ v }} + </div> + </div> + <YButton v-model="setInfo.messageoff" @change="changeClose"></YButton> </div> </template> <script> -import YSwitch from "@/components/yswitch/YSwitch.vue"; +import YButton from "@/components/YButton"; import { getSmssetList, saveSmssetList } from "@/services/configurat"; import local from "@/utils/local"; export default { components: { - YSwitch, + YButton, }, data() { return { + tagList: ["鍏ㄥ眬绠℃帶", "绮惧噯鍒拌揪", "杩滅▼鐩戠", "璐村績鏈嶅姟"], setInfo: { siteId: local.getLocal("siteId"), messageoff: "", @@ -53,6 +58,8 @@ export default { let { code, msg } = res.data; if (code === 1) { this.$message.success(msg); + } else { + this.getSmssetList(); } }, }, @@ -63,37 +70,42 @@ export default { .configurat { width: 100%; height: 100%; - padding: 20px; - .main { - height: 100%; - display: flex; - .set-configurat { - margin-left: 20px; - } - .left { - width: 224px; - margin-right: 20px; - } - .right { - height: 200px; - padding: 15px; - flex: 1; - background-color: #fff; - } - } + padding: 115px 80px; + background: url("~@/assets/img/sms_bg.jpg") no-repeat center/100% 100%; + .title { - margin-left: 15px; - position: relative; - margin-bottom: 15px; - &::before { - content: ""; - width: 4px; - height: 20px; - position: absolute; - top: 1px; - left: -16px; - background-color: rgba(5, 149, 253, 1); + margin-bottom: 35px; + font-size: 44px; + font-family: Source Han Sans CN; + font-weight: bold; + color: #0857e8; + } + .des { + font-size: 20px; + font-family: Source Han Sans CN; + font-weight: 500; + color: #365182; + line-height: 35px; + } + .tag-list { + margin-top: 38px; + margin-bottom: 40px; + display: flex; + align-items: center; + gap: 26px; + .tag-item { + width: 138px; + height: 50px; + background: rgba(8, 87, 232, 0.05); + border-radius: 24px; + display: flex; + align-items: center; + justify-content: center; + font-size: 22px; + font-family: Source Han Sans CN; + font-weight: 500; + color: #232323; } } } -</style> \ No newline at end of file +</style> diff --git a/base-manager-ui/admin/src/router/config.js b/base-manager-ui/admin/src/router/config.js index 8c6c1f538f130ceca5b969a31141968e4852cc99..0d5f5627e7d8ee7bd2233a40f87a936798228924 100644 --- a/base-manager-ui/admin/src/router/config.js +++ b/base-manager-ui/admin/src/router/config.js @@ -6,21 +6,6 @@ import Layouts from "@/layouts/Layouts"; // 璺敱閰嶇疆 const options = { routes: [ - { - path: "/jump", - name: "璺宠浆椤甸潰", - component: () => import("@/pages/basicset/jump/jump"), - }, - { - path: "*", - name: "404", - component: () => import("@/pages/exception/404"), - }, - { - path: "/403", - name: "403", - component: () => import("@/pages/exception/403"), - }, { path: "/apppreview", name: "棰勮椤甸潰", @@ -33,7 +18,7 @@ const options = { redirect: "/website", children: [ { - path: "website", + path: "/website", name: "绔欑偣绠$悊", meta: { icon: "bank", @@ -41,7 +26,7 @@ const options = { component: () => import("@/pages/basicset/site/website"), }, { - path: "business", + path: "/business", meta: { icon: "book", }, @@ -118,7 +103,7 @@ const options = { ], }, { - path: "department", + path: "/department", meta: { icon: "audit", }, @@ -141,7 +126,7 @@ const options = { ], }, { - path: "personnel", + path: "/personnel", name: "宸ヤ綔浜哄憳绠$悊", meta: { icon: "idcard", @@ -149,7 +134,7 @@ const options = { component: () => import("@/pages/basicset/workman/personnel"), }, { - path: "festival", + path: "/festival", name: "鑺傚亣鏃ョ鐞�", meta: { icon: "carry-out", @@ -157,16 +142,17 @@ const options = { component: () => import("@/pages/basicset/holiday/festival"), }, { - path: "deploy", + path: "/deploy", name: "閮ㄧ讲妯″潡绠$悊", meta: { icon: "appstore", + roles: ["admin"], }, component: () => import("@/pages/basicset/deploy/deploy"), }, { - path: "hall", + path: "/hall", name: "澶у巺绠$悊", meta: { icon: "gateway", @@ -196,7 +182,7 @@ const options = { }, { - path: "surface", + path: "/surface", component: () => import("@/pages/basicset/surface/index"), meta: { icon: "skin", @@ -210,7 +196,7 @@ const options = { }, { path: "addsurfacetemplate", - name: "鏂板鐨偆m妯℃澘", + name: "鏂板鐨偆妯℃澘", component: () => import("@/pages/basicset/surface/AddSurfaceTemplate"), meta: { invisible: true }, @@ -218,7 +204,7 @@ const options = { ], }, { - path: "configurat", + path: "/configurat", name: "鐭俊閰嶇疆", meta: { icon: "mail", @@ -227,7 +213,7 @@ const options = { }, { - path: "appmarket", + path: "/appmarket", component: () => import("@/pages/basicset/appmarket/Index"), meta: { icon: "shop", @@ -314,7 +300,7 @@ const options = { ], }, { - path: "system", + path: "/system", name: "绯荤粺璁剧疆", component: () => import("@/pages/basicset/system/System"), meta: { diff --git a/base-manager-ui/admin/src/router/index.js b/base-manager-ui/admin/src/router/index.js index 117c3fc8cabbd38109d024e5f0686a8d8624e7a8..d69c3807dc4ef507c5f70cf4f9fc872106058fb4 100644 --- a/base-manager-ui/admin/src/router/index.js +++ b/base-manager-ui/admin/src/router/index.js @@ -1,37 +1,108 @@ -import Vue from 'vue' -import Router from 'vue-router' -import {formatRoutes} from '@/utils/routerUtil' - -Vue.use(Router) +import Vue from "vue"; +import VueRouter from "vue-router"; +import { formatRoutes } from "@/utils/routerUtil"; +import { i18n } from "@/utils/i18n"; +import store from "@/store"; +import { mergeI18nFromRoutes } from "@/utils/i18n"; +Vue.use(VueRouter); //瑙e喅閲嶅璺敱鎶ラ敊 -const originalPush = Router.prototype.push +const originalPush = VueRouter.prototype.push; // 淇敼鍘熷瀷瀵硅薄涓殑push鏂规硶 -Router.prototype.push = function push(location) { - return originalPush.call(this, location).catch(err => err) -} +VueRouter.prototype.push = function push(location) { + return originalPush.call(this, location).catch((err) => err); +}; + +const routes = [ + { + path: "/jump", + name: "璺宠浆椤甸潰", + component: () => import("@/pages/basicset/jump/jump"), + }, + { + path: "*", + name: "404", + component: () => import("@/pages/exception/404"), + }, + { + path: "/403", + name: "403", + component: () => import("@/pages/exception/403"), + }, +]; +formatRoutes(routes); +const router = new VueRouter({ + routes, +}); // 涓嶉渶瑕佺櫥褰曟嫤鎴殑璺敱閰嶇疆 const loginIgnore = { - names: ['404', '403'], //鏍规嵁璺敱鍚嶇О鍖归厤 - paths: ['/login'], //鏍规嵁璺敱fullPath鍖归厤 + names: ["404", "403"], //鏍规嵁璺敱鍚嶇О鍖归厤 + paths: ["/login", "/jump"], //鏍规嵁璺敱fullPath鍖归厤 /** * 鍒ゆ柇璺敱鏄惁鍖呭惈鍦ㄨ閰嶇疆涓� * @param route vue-router 鐨� route 瀵硅薄 * @returns {boolean} */ includes(route) { - return this.names.includes(route.name) || this.paths.includes(route.path) - } -} + return this.names.includes(route.name) || this.paths.includes(route.path); + }, +}; /** * 鍒濆鍖栬矾鐢卞疄渚� - * @param isAsync 鏄惁寮傛璺敱妯″紡 * @returns {VueRouter} */ -function initRouter(isAsync) { - const options = isAsync ? require('./async/config.async').default : require('./config').default - formatRoutes(options.routes) - return new Router(options) +function initRouter() { + // 鏄惁寮傛璺敱妯″紡 + const options = store.state.setting.asyncRoutes + ? require("./async/config.async").default + : require("./config").default; + formatRoutes(options.routes); + return options; +} + +// 鍒ゆ柇鏉冮檺 +function permission(router, role) { + if (router.meta && router.meta.roles) { + return router.meta.roles.includes(role); + } else { + return true; + } +} +// 璁$畻鍔ㄦ€佽矾鐢� +function calcRouters(dynamicRouter, role) { + // 杩囨护 + let res = dynamicRouter.filter((v) => { + // 鍒ゆ柇鏄惁鏈夋潈闄愯闂璺敱 + if (permission(v, role)) { + // 鍒ゆ柇鏈夋病鏈夊瓙璺敱 + if (v.children) { + // 閫掑綊 + v.children = calcRouters(v.children, role); + } + return true; + } else { + return false; + } + }); + return res; +} + +// 鍔ㄦ€佽彍鍗� +function createMenus() { + let role = store.getters["site/userInfo"].name; + if (!role) return; + let options = initRouter(); + let routesArr = calcRouters(options.routes, role); + const rootRoute = routesArr.find((item) => item.path === "/"); + const menuRoutes = rootRoute && rootRoute.children; + mergeI18nFromRoutes(i18n, menuRoutes); + if (menuRoutes) { + routesArr.forEach((v) => { + router.addRoute(v); + }); + store.commit("setting/setMenuData", menuRoutes); + } } -export {loginIgnore, initRouter} +createMenus(); +export { loginIgnore, initRouter, createMenus, router }; diff --git a/base-manager-ui/admin/src/services/basicsetApi.js b/base-manager-ui/admin/src/services/basicsetApi.js index 9fe2164c9c38973a9cd8c380507510bcf07dad5d..2dfcad0e9cdf88755fd5c8da09086d5b5c128da6 100644 --- a/base-manager-ui/admin/src/services/basicsetApi.js +++ b/base-manager-ui/admin/src/services/basicsetApi.js @@ -30,7 +30,8 @@ module.exports = { treeselect: `${BASE_URL}/base/area/treeselect`, save: `${BASE_URL}/base/area/save`, delete: `${BASE_URL}/base/area/delete`, - init: `${BASE_URL}/base/base/area/genSubAreaByAreaName `, + init: `${BASE_URL}/base/area/genSubAreaByAreaName`, + authAreaTree: `${BASE_URL}/base/area/authAreaTree`, }, // 绔欑偣 site: { diff --git a/base-manager-ui/admin/src/services/basicsetFun.js b/base-manager-ui/admin/src/services/basicsetFun.js index 1515e69d9f68bc881bbf2df8cea8a9ff033bac84..67e01e7e9e8591684f74072cf7e7f93002a78911 100644 --- a/base-manager-ui/admin/src/services/basicsetFun.js +++ b/base-manager-ui/admin/src/services/basicsetFun.js @@ -19,6 +19,10 @@ export async function getListByParentId(data) { export async function treeselect(data) { return request(area.treeselect, METHOD.POST, data); } +// 鏌ョ湅涓汉鍖哄煙鍒楄〃 +export async function authAreaTree(data) { + return request(area.authAreaTree, METHOD.POST, data); +} // 鏌ョ湅绔欑偣鍒楄〃 export async function getSiteList(data) { return request(site.list, METHOD.POST, data); diff --git a/base-manager-ui/admin/src/store/modules/setting.js b/base-manager-ui/admin/src/store/modules/setting.js index 137a4accb2099fd3d268a59b256a5106acfc1130..d96bf3680e9cfca768ccfc041a79932effd0c92c 100644 --- a/base-manager-ui/admin/src/store/modules/setting.js +++ b/base-manager-ui/admin/src/store/modules/setting.js @@ -1,13 +1,15 @@ -import config from '@/config' -import { ADMIN } from '@/config/default' -import { formatFullPath } from '@/utils/i18n' -import { filterMenu } from '@/utils/authority-utils' -import { getLocalSetting } from '@/utils/themeUtil' -import deepClone from 'lodash.clonedeep' -const localSetting = getLocalSetting(true) +import config from "@/config"; +import { ADMIN } from "@/config/default"; +import { formatFullPath } from "@/utils/i18n"; +import { filterMenu } from "@/utils/authority-utils"; +import { getLocalSetting } from "@/utils/themeUtil"; +import deepClone from "lodash.clonedeep"; +const localSetting = getLocalSetting(true); // console.log(localSetting) -const customTitlesStr = sessionStorage.getItem(process.env.VUE_APP_TBAS_TITLES_KEY) -const customTitles = (customTitlesStr && JSON.parse(customTitlesStr)) || [] +const customTitlesStr = sessionStorage.getItem( + process.env.VUE_APP_TBAS_TITLES_KEY +); +const customTitles = (customTitlesStr && JSON.parse(customTitlesStr)) || []; export default { namespaced: true, @@ -20,96 +22,99 @@ export default { activatedFirst: undefined, customTitles, ...config, - ...localSetting + ...localSetting, }, getters: { - menuData (state, getters, rootState) { + menuData(state, getters, rootState) { if (state.filterMenu) { - const { permissions, roles } = rootState.account - return filterMenu(deepClone(state.menuData), permissions, roles) + const { permissions, roles } = rootState.account; + return filterMenu(deepClone(state.menuData), permissions, roles); } - return state.menuData + return state.menuData; }, - firstMenu (state, getters) { - const { menuData } = getters + firstMenu(state, getters) { + const { menuData } = getters; if (menuData.length > 0 && !menuData[0].fullPath) { - formatFullPath(menuData) + formatFullPath(menuData); } - return menuData.map(item => { - const menuItem = { ...item } - delete menuItem.children - return menuItem - }) - }, - subMenu (state) { - const { menuData, activatedFirst } = state + return menuData.map((item) => { + const menuItem = { ...item }; + delete menuItem.children; + return menuItem; + }); + }, + subMenu(state) { + const { menuData, activatedFirst } = state; if (menuData.length > 0 && !menuData[0].fullPath) { - formatFullPath(menuData) + formatFullPath(menuData); } - const current = menuData.find(menu => menu.fullPath === activatedFirst) - return current && current.children || [] - } + const current = menuData.find((menu) => menu.fullPath === activatedFirst); + return (current && current.children) || []; + }, }, mutations: { - setDevice (state, isMobile) { - state.isMobile = isMobile + setDevice(state, isMobile) { + state.isMobile = isMobile; }, - setTheme (state, theme) { + setTheme(state, theme) { // console.log(theme) - state.theme = theme + state.theme = theme; }, - setLayout (state, layout) { - state.layout = layout + setLayout(state, layout) { + state.layout = layout; }, - setMultiPage (state, multiPage) { - state.multiPage = multiPage + setMultiPage(state, multiPage) { + state.multiPage = multiPage; }, - setAnimate (state, animate) { - state.animate = animate + setAnimate(state, animate) { + state.animate = animate; }, - setWeekMode (state, weekMode) { - state.weekMode = weekMode + setWeekMode(state, weekMode) { + state.weekMode = weekMode; }, - setFixedHeader (state, fixedHeader) { - state.fixedHeader = fixedHeader + setFixedHeader(state, fixedHeader) { + state.fixedHeader = fixedHeader; }, - setFixedSideBar (state, fixedSideBar) { - state.fixedSideBar = fixedSideBar + setFixedSideBar(state, fixedSideBar) { + state.fixedSideBar = fixedSideBar; }, - setLang (state, lang) { - state.lang = lang + setLang(state, lang) { + state.lang = lang; }, - setHideSetting (state, hideSetting) { - state.hideSetting = hideSetting + setHideSetting(state, hideSetting) { + state.hideSetting = hideSetting; }, - correctPageMinHeight (state, minHeight) { - state.pageMinHeight += minHeight + correctPageMinHeight(state, minHeight) { + state.pageMinHeight += minHeight; }, - setMenuData (state, menuData) { - state.menuData = menuData + setMenuData(state, menuData) { + state.menuData = menuData; }, - setAsyncRoutes (state, asyncRoutes) { - state.asyncRoutes = asyncRoutes + setAsyncRoutes(state, asyncRoutes) { + state.asyncRoutes = asyncRoutes; }, - setPageWidth (state, pageWidth) { - state.pageWidth = pageWidth + setPageWidth(state, pageWidth) { + state.pageWidth = pageWidth; }, - setActivatedFirst (state, activatedFirst) { - state.activatedFirst = activatedFirst + setActivatedFirst(state, activatedFirst) { + state.activatedFirst = activatedFirst; }, - setFixedTabs (state, fixedTabs) { - state.fixedTabs = fixedTabs + setFixedTabs(state, fixedTabs) { + state.fixedTabs = fixedTabs; }, - setCustomTitle (state, { path, title }) { + setCustomTitle(state, { path, title }) { if (title) { - const obj = state.customTitles.find(item => item.path === path) + const obj = state.customTitles.find((item) => item.path === path); if (obj) { - obj.title = title + obj.title = title; } else { - state.customTitles.push({ path, title }) + state.customTitles.push({ path, title }); } - sessionStorage.setItem(process.env.VUE_APP_TBAS_TITLES_KEY, JSON.stringify(state.customTitles)) + sessionStorage.setItem( + process.env.VUE_APP_TBAS_TITLES_KEY, + JSON.stringify(state.customTitles) + ); } - } - } -} + }, + }, +}; diff --git a/base-manager-ui/admin/src/utils/i18n.js b/base-manager-ui/admin/src/utils/i18n.js index 68b9e3a61e1592a84de632fd60ab5152bd062ebd..2d8fb0b0cd52f8f527fd11f3e10c4e210489d6bd 100644 --- a/base-manager-ui/admin/src/utils/i18n.js +++ b/base-manager-ui/admin/src/utils/i18n.js @@ -1,8 +1,8 @@ -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import routesI18n from '@/router/i18n' -import './Objects' -import { getI18nKey } from '@/utils/routerUtil' +import Vue from "vue"; +import VueI18n from "vue-i18n"; +import routesI18n from "@/router/i18n"; +import "./Objects"; +import { getI18nKey } from "@/utils/routerUtil"; /** * 鍒涘缓 i18n 閰嶇疆 @@ -10,16 +10,18 @@ import { getI18nKey } from '@/utils/routerUtil' * @param fallback 鍥為€€璇█ * @returns {VueI18n} */ -function initI18n (locale, fallback) { - Vue.use(VueI18n) +function initI18n(locale, fallback) { + Vue.use(VueI18n); let i18nOptions = { locale, fallbackLocale: fallback, silentFallbackWarn: true, - } - return new VueI18n(i18nOptions) + }; + return new VueI18n(i18nOptions); } +const i18n = initI18n("CN", "US"); + /** * 鏍规嵁 router options 閰嶇疆鐢熸垚 鍥介檯鍖栬瑷€ * @param lang @@ -27,16 +29,22 @@ function initI18n (locale, fallback) { * @param valueKey * @returns {*} */ -function generateI18n (lang, routes, valueKey) { - routes.forEach(route => { - let keys = getI18nKey(route.fullPath).split('.') - let value = valueKey === 'path' ? route[valueKey].split('/').filter(item => !item.startsWith(':') && item != '').join('.') : route[valueKey] - lang.assignProps(keys, value) +function generateI18n(lang, routes, valueKey) { + routes.forEach((route) => { + let keys = getI18nKey(route.fullPath).split("."); + let value = + valueKey === "path" + ? route[valueKey] + .split("/") + .filter((item) => !item.startsWith(":") && item != "") + .join(".") + : route[valueKey]; + lang.assignProps(keys, value); if (route.children) { - generateI18n(lang, route.children, valueKey) + generateI18n(lang, route.children, valueKey); } - }) - return lang + }); + return lang; } /** @@ -44,14 +52,18 @@ function generateI18n (lang, routes, valueKey) { * @param routes * @param parentPath */ -function formatFullPath (routes, parentPath = '') { - routes.forEach(route => { - let isFullPath = route.path.substring(0, 1) === '/' - route.fullPath = isFullPath ? route.path : (parentPath === '/' ? parentPath + route.path : parentPath + '/' + route.path) +function formatFullPath(routes, parentPath = "") { + routes.forEach((route) => { + let isFullPath = route.path.substring(0, 1) === "/"; + route.fullPath = isFullPath + ? route.path + : parentPath === "/" + ? parentPath + route.path + : parentPath + "/" + route.path; if (route.children) { - formatFullPath(route.children, route.fullPath) + formatFullPath(route.children, route.fullPath); } - }) + }); } /** @@ -59,20 +71,16 @@ function formatFullPath (routes, parentPath = '') { * @param i18n * @param routes */ -function mergeI18nFromRoutes (i18n, routes) { - formatFullPath(routes) - const CN = generateI18n(new Object(), routes, 'name') - const US = generateI18n(new Object(), routes, 'path') - i18n.mergeLocaleMessage('CN', CN) - i18n.mergeLocaleMessage('US', US) - const messages = routesI18n.messages - Object.keys(messages).forEach(lang => { - i18n.mergeLocaleMessage(lang, messages[lang]) - }) +function mergeI18nFromRoutes(i18n, routes) { + formatFullPath(routes); + const CN = generateI18n(new Object(), routes, "name"); + const US = generateI18n(new Object(), routes, "path"); + i18n.mergeLocaleMessage("CN", CN); + i18n.mergeLocaleMessage("US", US); + const messages = routesI18n.messages; + Object.keys(messages).forEach((lang) => { + i18n.mergeLocaleMessage(lang, messages[lang]); + }); } -export { - initI18n, - mergeI18nFromRoutes, - formatFullPath -} +export { initI18n, mergeI18nFromRoutes, formatFullPath, i18n }; diff --git a/base-manager-ui/admin/src/utils/routerUtil.js b/base-manager-ui/admin/src/utils/routerUtil.js index e33dc9b4a2139aaf6d42031f693e79ae3a7ac43d..7212fca3c830539a1fa72380f17b2bb7193d8ebc 100644 --- a/base-manager-ui/admin/src/utils/routerUtil.js +++ b/base-manager-ui/admin/src/utils/routerUtil.js @@ -136,11 +136,11 @@ function loadRoutes(routesConfig) { // 鎻愬彇璺敱鍥介檯鍖栨暟鎹� mergeI18nFromRoutes(i18n, router.options.routes); // 鍒濆鍖朅dmin鍚庡彴鑿滃崟鏁版嵁 - const rootRoute = router.options.routes.find((item) => item.path === "/"); - const menuRoutes = rootRoute && rootRoute.children; - if (menuRoutes) { - store.commit("setting/setMenuData", menuRoutes); - } + // const rootRoute = router.options.routes.find((item) => item.path === "/"); + // const menuRoutes = rootRoute && rootRoute.children; + // if (menuRoutes) { + // store.commit("setting/setMenuData", menuRoutes); + // } } /** diff --git a/base-manager/db/add.sql b/base-manager/db/add.sql index 9bf8367feaeec32136101b91d841bf9069595710..9bfe25614617de111856be616bb1062ed8c65a41 100644 --- a/base-manager/db/add.sql +++ b/base-manager/db/add.sql @@ -20,7 +20,6 @@ ALTER TABLE mortals_sys_workman ADD COLUMN `operatorId` varchar (128) default " - -- ---------------------------- 2023-3-28 -- ---------------------------- @@ -211,3 +210,11 @@ ALTER TABLE mortals_sys_app_info_field ADD COLUMN `serviceApiParams` varchar(10 ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApi` varchar(255) default '' COMMENT '浜嬩欢鏈嶅姟鎺ュ彛璇锋眰鍦板潃'; ALTER TABLE mortals_sys_app_info_templete_field ADD COLUMN `serviceApiParams` varchar(1024) default '' COMMENT '浜嬩欢鏈嶅姟鎺ュ彛璇锋眰鍙傛暟'; + + + +-- ---------------------------- +2023-10-17 +-- ---------------------------- + +ALTER TABLE mortals_sys_window_hall ADD COLUMN `siteId` bigint(20) default '1' COMMENT '绔欑偣Id'; diff --git a/base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java b/base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java index d0ebd3b20d6f1be19d1c40441b635d686ece8df7..ad299dc3637cfb273312180bac295065b7037b5d 100644 --- a/base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java +++ b/base-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java @@ -38,7 +38,9 @@ public class UserEntityExt extends BaseEntityLong { private List<ModelEntity> modleList; - - + /** + * 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧 + */ + private String areaCodes; } \ No newline at end of file diff --git a/base-manager/src/main/java/com/mortals/xhx/common/utils/SyncTreeSiteThread.java b/base-manager/src/main/java/com/mortals/xhx/common/utils/SyncTreeSiteThread.java index 9d49b42898aee0a99e11eec3d1c26015380aacf6..82c35bacab4ba46708dcd369265eb03fdbdd9ce4 100644 --- a/base-manager/src/main/java/com/mortals/xhx/common/utils/SyncTreeSiteThread.java +++ b/base-manager/src/main/java/com/mortals/xhx/common/utils/SyncTreeSiteThread.java @@ -45,7 +45,6 @@ public class SyncTreeSiteThread implements Runnable { siteService.setSiteTree(siteTreeSelects, contextTemp); } } - // log.info("鍒锋柊鐢ㄦ埛绔欑偣鏍�=銆媢serID:{} siteIds:{} siteTree:{}",context.getUser().getId(),context.getUser().getSiteIds(), JSON.toJSONString(siteService.getSiteTree(context))); } } diff --git a/base-manager/src/main/java/com/mortals/xhx/module/area/service/AreaService.java b/base-manager/src/main/java/com/mortals/xhx/module/area/service/AreaService.java index fd872ea7d11ff71d0688267a22e30a918b5949be..5340403d5875ff02ffb34048dcb7a0d86e81fd92 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/area/service/AreaService.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/area/service/AreaService.java @@ -45,6 +45,9 @@ public interface AreaService extends ICRUDCacheService<AreaEntity,Long> { List<AreaTreeSelect> buildAreaTreeSelect(List<AreaEntity> areaList); + List<AreaTreeSelect> buildCustomAreaTreeSelect(List<AreaEntity> areaList); + + /** * 鏍规嵁鐖秈d鏌ヨ瀛愯妭鐐� * @param parentId @@ -55,6 +58,7 @@ public interface AreaService extends ICRUDCacheService<AreaEntity,Long> { + /** * 鑾峰彇褰撳墠鑺傜偣鎵€鏈夊瓙鑺傜偣 * @param rootId diff --git a/base-manager/src/main/java/com/mortals/xhx/module/area/service/impl/AreaServiceImpl.java b/base-manager/src/main/java/com/mortals/xhx/module/area/service/impl/AreaServiceImpl.java index 3190cd2c651218c2b45e9e83badd732760296e2b..f9e88edd8880593da69b3c1bc905dcf3ffc6dee3 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/area/service/impl/AreaServiceImpl.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/area/service/impl/AreaServiceImpl.java @@ -42,7 +42,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE //鍔犺浇瀛╁瓙鍏崇郴 if ("True".equalsIgnoreCase(data.getHaveSonArea())) { String childKey = super.getCacheName() + ":" + data.getIid(); - //cacheService.del(childKey); + cacheService.del(childKey); this.find(new AreaQuery().pid(data.getIid())).stream().forEach(item -> { cacheService.lpush(childKey, item); }); @@ -164,6 +164,39 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE return returnList.stream().map(AreaTreeSelect::new).collect(Collectors.toList()); } + /** + * @param areaList + * @return + */ + @Override + public List<AreaTreeSelect> buildCustomAreaTreeSelect(List<AreaEntity> areaList) { + List<AreaTreeSelect> returnList = new ArrayList<>(); + + List<Long> tempList = areaList.stream().map(AreaEntity::getId).collect(Collectors.toList()); + for (AreaEntity areaEntity : areaList) { + // 濡傛灉鏄《绾ц妭鐐�, 閬嶅巻璇ョ埗鑺傜偣鐨勬墍鏈夊瓙鑺傜偣 + if (!tempList.contains(areaEntity.getPid())) { + //recursionFn(list, areaEntity); + + AreaTreeSelect areaTreeSelect = new AreaTreeSelect(areaEntity); + + rebuildList(areaTreeSelect); + + // List<AreaTreeSelect> areaTreeSelectList = new ArrayList<>(); + // areaTreeSelectList.add(areaTreeSelect); + +// List<AreaTreeSelect> listTree = getListByRootId(areaEntity.getIid(), null); +// AreaTreeSelect areaTreeSelect = new AreaTreeSelect(areaEntity); + // areaTreeSelect.setChildren(areaTreeSelectList); + // areaEntity.setChildren(); + returnList.add(areaTreeSelect); + } + } + + + return returnList; + } + @Override public List<AreaTreeSelect> getListByParentId(String parentId, Context context) { if (ObjectUtils.isEmpty(parentId)) { @@ -186,6 +219,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE return collect; } + @Override public List<AreaTreeSelect> getListByRootId(String rootId, Context context) { if (ObjectUtils.isEmpty(rootId)) { @@ -207,11 +241,13 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE private void rebuildList(AreaTreeSelect areaTreeSelect) { List<AreaTreeSelect> list = this.cacheService.lrange(super.getCacheName() + ":" + areaTreeSelect.getId(), AreaEntity.class).stream().map(item -> new AreaTreeSelect(item)).collect(Collectors.toList()); - list.stream().forEach(item -> { - rebuildList(item); - }); - areaTreeSelect.setChildren(list); + if(!ObjectUtils.isEmpty(list)){ + list.stream().forEach(item -> { + rebuildList(item); + }); + areaTreeSelect.setChildren(list); + } } @@ -280,7 +316,7 @@ public class AreaServiceImpl extends AbstractCRUDCacheServiceImpl<AreaDao, AreaE @Override public Rest<String> removeAll() { HashMap condition = new HashMap(); - condition.put("1",1); + condition.put("1", 1); int delete = this.dao.delete(condition); //鍒犻櫎鎵€鏈夌紦瀛樻暟鎹� this.removeAllCache(); diff --git a/base-manager/src/main/java/com/mortals/xhx/module/area/web/AreaController.java b/base-manager/src/main/java/com/mortals/xhx/module/area/web/AreaController.java index 1b8f484369e11feeb0f56c3824607cddb39db5e4..cfc302d55d9d1f154113d47abafa991ee0a18f8d 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/area/web/AreaController.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/area/web/AreaController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -73,6 +74,33 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic } + /** + * 鑾峰彇绔欑偣涓嬫媺鏍戝垪琛� + */ + @PostMapping("authAreaTree") + public String authAreaTree() { + Map<String, Object> model = new HashMap<>(); + JSONObject ret = new JSONObject(); + String busiDesc = "鏌ヨ" + this.getModuleDesc(); + int code = VALUE_RESULT_SUCCESS; + try { + List<String> areaCodeList = Arrays.asList(this.getContext().getUser().getAreaCodes().split(",")); + AreaQuery areaQuery = new AreaQuery(); + areaQuery.setAreaCodeList(areaCodeList); + List<AreaEntity> list = this.service.find(areaQuery); + List<AreaTreeSelect> treeSelects = this.service.buildCustomAreaTreeSelect(list); + model.put(KEY_RESULT_DATA, treeSelects); + recordSysLog(request, busiDesc + " 銆愭垚鍔熴€�"); + } catch (Exception e) { + code = VALUE_RESULT_FAILURE; + this.doException(request, busiDesc, model, e); + } + ret.put(KEY_RESULT_DATA, model); + ret.put(KEY_RESULT_CODE, code); + return ret.toJSONString(); + } + + /** * 鏍规嵁parentId鏌ヨ瀛愪俊鎭� */ @@ -122,5 +150,4 @@ public class AreaController extends BaseCRUDJsonBodyMappingController<AreaServic return ret.toJSONString(); } - } \ No newline at end of file diff --git a/base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteController.java b/base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteController.java index 3dd8e91ce43092f89feb9a32cf8463a7c211457e..316f75042c1b9a6fef21f7c28d89bedc6257aead 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteController.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/site/web/SiteController.java @@ -97,15 +97,17 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic JSONObject jsonObject = new JSONObject(); Map<String, Object> model = new HashMap<>(); String busiDesc = this.getModuleDesc() + "鏋勫缓绔欑偣鏍�"; + Context context = getContext(); try { - List<SiteTreeSelect> siteTree = this.service.getSiteTree(getContext()); + List<SiteTreeSelect> siteTree = this.service.getSiteTree(context); if (ObjectUtils.isEmpty(siteTree)) { log.info("涓哄垵濮嬪寲绔欑偣鏍戯紝閲嶆柊鏋勫缓锛�"); - siteTree = this.service.siteTree(getContext()); + siteTree = this.service.siteTree(context); + siteService.setSiteTree(siteTree, context); } model.put("siteTree", siteTree); - this.init(model, getContext()); - if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) { + this.init(model, context); + if (!ObjectUtils.isEmpty(context) && !ObjectUtils.isEmpty(context.getUser())) { recordSysLog(request, busiDesc + " 銆愭垚鍔熴€�"); } jsonObject.put(KEY_RESULT_DATA, model); diff --git a/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallEntity.java b/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallEntity.java index 19bb3723bd8e7599db9bf4e80c6a7dd6a52b8632..d955e9bb4ee663a657197aa7e443380455f16b3a 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallEntity.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallEntity.java @@ -1,48 +1,55 @@ package com.mortals.xhx.module.window.model; import java.util.List; import java.util.ArrayList; +import java.math.BigDecimal; +import cn.hutool.core.date.DateUtil; +import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import com.mortals.framework.annotation.Excel; import com.mortals.framework.model.BaseEntityLong; import com.mortals.xhx.module.window.model.vo.WindowHallVo; import lombok.Data; /** -* 澶у巺绐楀彛瀹炰綋瀵硅薄 -* -* @author zxfei -* @date 2023-04-25 -*/ + * 澶у巺绐楀彛瀹炰綋瀵硅薄 + * + * @author zxfei + * @date 2023-10-17 + */ @Data public class WindowHallEntity extends WindowHallVo { private static final long serialVersionUID = 1L; /** - * 绐楀彛ID - */ + * 绔欑偣Id + */ + private Long siteId; + /** + * 绐楀彛ID + */ private Long windowId; /** - * 绐楀彛鍚嶇О - */ + * 绐楀彛鍚嶇О + */ private String windowName; /** - * 澶у巺ID - */ + * 澶у巺ID + */ private Long hallId; /** - * 澶у巺鍚嶇О - */ + * 澶у巺鍚嶇О + */ private String hallName; /** - * 鎺掑簭 - */ + * 鎺掑簭 + */ private Integer sort; /** - * 澶囨敞 - */ + * 澶囨敞 + */ private String remark; @Override public int hashCode() { - return this.getId().hashCode(); + return this.getId().hashCode(); } @Override public boolean equals(Object obj) { @@ -50,24 +57,19 @@ public class WindowHallEntity extends WindowHallVo { if (obj instanceof WindowHallEntity) { WindowHallEntity tmp = (WindowHallEntity) obj; if (this.getId() == tmp.getId()) { - return true; + return true; } } return false; } public void initAttrValue(){ - - this.windowId = null; - - this.windowName = ""; - - this.hallId = null; - - this.hallName = ""; - - this.sort = 0; - - this.remark = ""; + this.siteId = null; + this.windowId = null; + this.windowName = ""; + this.hallId = null; + this.hallName = ""; + this.sort = 0; + this.remark = ""; } } \ No newline at end of file diff --git a/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallQuery.java b/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallQuery.java index ddca34e2fa52fb3848fc9ca246aa17bdec24aada..62e5feb5137bfd73655971c82541a72a3e486357 100644 --- a/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallQuery.java +++ b/base-manager/src/main/java/com/mortals/xhx/module/window/model/WindowHallQuery.java @@ -3,11 +3,11 @@ package com.mortals.xhx.module.window.model; import java.util.List; import com.mortals.xhx.module.window.model.WindowHallEntity; /** -* 澶у巺绐楀彛鏌ヨ瀵硅薄 -* -* @author zxfei -* @date 2023-04-25 -*/ + * 澶у巺绐楀彛鏌ヨ瀵硅薄 + * + * @author zxfei + * @date 2023-10-17 + */ public class WindowHallQuery extends WindowHallEntity { /** 寮€濮� 搴忓彿锛屼富閿紝鑷闀� */ private Long idStart; @@ -24,6 +24,21 @@ public class WindowHallQuery extends WindowHallEntity { /** 搴忓彿锛屼富閿紝鑷闀挎帓闄ゅ垪琛� */ private List <Long> idNotList; + /** 寮€濮� 绔欑偣Id */ + private Long siteIdStart; + + /** 缁撴潫 绔欑偣Id */ + private Long siteIdEnd; + + /** 澧炲姞 绔欑偣Id */ + private Long siteIdIncrement; + + /** 绔欑偣Id鍒楄〃 */ + private List <Long> siteIdList; + + /** 绔欑偣Id鎺掗櫎鍒楄〃 */ + private List <Long> siteIdNotList; + /** 寮€濮� 绐楀彛ID */ private Long windowIdStart; @@ -120,927 +135,1062 @@ public class WindowHallQuery extends WindowHallEntity { public WindowHallQuery(){} /** - * 鑾峰彇 寮€濮� 搴忓彿锛屼富閿紝鑷闀� - * @return idStart - */ + * 鑾峰彇 寮€濮� 搴忓彿锛屼富閿紝鑷闀� + * @return idStart + */ public Long getIdStart(){ return this.idStart; } /** - * 璁剧疆 寮€濮� 搴忓彿锛屼富閿紝鑷闀� - * @param idStart - */ + * 璁剧疆 寮€濮� 搴忓彿锛屼富閿紝鑷闀� + * @param idStart + */ public void setIdStart(Long idStart){ this.idStart = idStart; } /** - * 鑾峰彇 缁撴潫 搴忓彿锛屼富閿紝鑷闀� - * @return $idEnd - */ + * 鑾峰彇 缁撴潫 搴忓彿锛屼富閿紝鑷闀� + * @return $idEnd + */ public Long getIdEnd(){ return this.idEnd; } /** - * 璁剧疆 缁撴潫 搴忓彿锛屼富閿紝鑷闀� - * @param idEnd - */ + * 璁剧疆 缁撴潫 搴忓彿锛屼富閿紝鑷闀� + * @param idEnd + */ public void setIdEnd(Long idEnd){ this.idEnd = idEnd; } /** - * 鑾峰彇 澧炲姞 搴忓彿锛屼富閿紝鑷闀� - * @return idIncrement - */ + * 鑾峰彇 澧炲姞 搴忓彿锛屼富閿紝鑷闀� + * @return idIncrement + */ public Long getIdIncrement(){ return this.idIncrement; } /** - * 璁剧疆 澧炲姞 搴忓彿锛屼富閿紝鑷闀� - * @param idIncrement - */ + * 璁剧疆 澧炲姞 搴忓彿锛屼富閿紝鑷闀� + * @param idIncrement + */ public void setIdIncrement(Long idIncrement){ this.idIncrement = idIncrement; } /** - * 鑾峰彇 搴忓彿锛屼富閿紝鑷闀� - * @return idList - */ + * 鑾峰彇 搴忓彿锛屼富閿紝鑷闀� + * @return idList + */ public List<Long> getIdList(){ return this.idList; } /** - * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� - * @param idList - */ + * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� + * @param idList + */ public void setIdList(List<Long> idList){ this.idList = idList; } /** - * 鑾峰彇 搴忓彿锛屼富閿紝鑷闀� - * @return idNotList - */ + * 鑾峰彇 搴忓彿锛屼富閿紝鑷闀� + * @return idNotList + */ public List<Long> getIdNotList(){ return this.idNotList; } /** - * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� - * @param idNotList - */ + * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� + * @param idNotList + */ public void setIdNotList(List<Long> idNotList){ this.idNotList = idNotList; } /** - * 鑾峰彇 寮€濮� 绐楀彛ID - * @return windowIdStart - */ + * 鑾峰彇 寮€濮� 绔欑偣Id + * @return siteIdStart + */ + public Long getSiteIdStart(){ + return this.siteIdStart; + } + + /** + * 璁剧疆 寮€濮� 绔欑偣Id + * @param siteIdStart + */ + public void setSiteIdStart(Long siteIdStart){ + this.siteIdStart = siteIdStart; + } + + /** + * 鑾峰彇 缁撴潫 绔欑偣Id + * @return $siteIdEnd + */ + public Long getSiteIdEnd(){ + return this.siteIdEnd; + } + + /** + * 璁剧疆 缁撴潫 绔欑偣Id + * @param siteIdEnd + */ + public void setSiteIdEnd(Long siteIdEnd){ + this.siteIdEnd = siteIdEnd; + } + + /** + * 鑾峰彇 澧炲姞 绔欑偣Id + * @return siteIdIncrement + */ + public Long getSiteIdIncrement(){ + return this.siteIdIncrement; + } + + /** + * 璁剧疆 澧炲姞 绔欑偣Id + * @param siteIdIncrement + */ + public void setSiteIdIncrement(Long siteIdIncrement){ + this.siteIdIncrement = siteIdIncrement; + } + + /** + * 鑾峰彇 绔欑偣Id + * @return siteIdList + */ + public List<Long> getSiteIdList(){ + return this.siteIdList; + } + + /** + * 璁剧疆 绔欑偣Id + * @param siteIdList + */ + public void setSiteIdList(List<Long> siteIdList){ + this.siteIdList = siteIdList; + } + + /** + * 鑾峰彇 绔欑偣Id + * @return siteIdNotList + */ + public List<Long> getSiteIdNotList(){ + return this.siteIdNotList; + } + + /** + * 璁剧疆 绔欑偣Id + * @param siteIdNotList + */ + public void setSiteIdNotList(List<Long> siteIdNotList){ + this.siteIdNotList = siteIdNotList; + } + + + /** + * 鑾峰彇 寮€濮� 绐楀彛ID + * @return windowIdStart + */ public Long getWindowIdStart(){ return this.windowIdStart; } /** - * 璁剧疆 寮€濮� 绐楀彛ID - * @param windowIdStart - */ + * 璁剧疆 寮€濮� 绐楀彛ID + * @param windowIdStart + */ public void setWindowIdStart(Long windowIdStart){ this.windowIdStart = windowIdStart; } /** - * 鑾峰彇 缁撴潫 绐楀彛ID - * @return $windowIdEnd - */ + * 鑾峰彇 缁撴潫 绐楀彛ID + * @return $windowIdEnd + */ public Long getWindowIdEnd(){ return this.windowIdEnd; } /** - * 璁剧疆 缁撴潫 绐楀彛ID - * @param windowIdEnd - */ + * 璁剧疆 缁撴潫 绐楀彛ID + * @param windowIdEnd + */ public void setWindowIdEnd(Long windowIdEnd){ this.windowIdEnd = windowIdEnd; } /** - * 鑾峰彇 澧炲姞 绐楀彛ID - * @return windowIdIncrement - */ + * 鑾峰彇 澧炲姞 绐楀彛ID + * @return windowIdIncrement + */ public Long getWindowIdIncrement(){ return this.windowIdIncrement; } /** - * 璁剧疆 澧炲姞 绐楀彛ID - * @param windowIdIncrement - */ + * 璁剧疆 澧炲姞 绐楀彛ID + * @param windowIdIncrement + */ public void setWindowIdIncrement(Long windowIdIncrement){ this.windowIdIncrement = windowIdIncrement; } /** - * 鑾峰彇 绐楀彛ID - * @return windowIdList - */ + * 鑾峰彇 绐楀彛ID + * @return windowIdList + */ public List<Long> getWindowIdList(){ return this.windowIdList; } /** - * 璁剧疆 绐楀彛ID - * @param windowIdList - */ + * 璁剧疆 绐楀彛ID + * @param windowIdList + */ public void setWindowIdList(List<Long> windowIdList){ this.windowIdList = windowIdList; } /** - * 鑾峰彇 绐楀彛ID - * @return windowIdNotList - */ + * 鑾峰彇 绐楀彛ID + * @return windowIdNotList + */ public List<Long> getWindowIdNotList(){ return this.windowIdNotList; } /** - * 璁剧疆 绐楀彛ID - * @param windowIdNotList - */ + * 璁剧疆 绐楀彛ID + * @param windowIdNotList + */ public void setWindowIdNotList(List<Long> windowIdNotList){ this.windowIdNotList = windowIdNotList; } /** - * 鑾峰彇 绐楀彛鍚嶇О - * @return windowNameList - */ + * 鑾峰彇 绐楀彛鍚嶇О + * @return windowNameList + */ public List<String> getWindowNameList(){ return this.windowNameList; } /** - * 璁剧疆 绐楀彛鍚嶇О - * @param windowNameList - */ + * 璁剧疆 绐楀彛鍚嶇О + * @param windowNameList + */ public void setWindowNameList(List<String> windowNameList){ this.windowNameList = windowNameList; } /** - * 鑾峰彇 绐楀彛鍚嶇О - * @return windowNameNotList - */ + * 鑾峰彇 绐楀彛鍚嶇О + * @return windowNameNotList + */ public List<String> getWindowNameNotList(){ return this.windowNameNotList; } /** - * 璁剧疆 绐楀彛鍚嶇О - * @param windowNameNotList - */ + * 璁剧疆 绐楀彛鍚嶇О + * @param windowNameNotList + */ public void setWindowNameNotList(List<String> windowNameNotList){ this.windowNameNotList = windowNameNotList; } /** - * 鑾峰彇 寮€濮� 澶у巺ID - * @return hallIdStart - */ + * 鑾峰彇 寮€濮� 澶у巺ID + * @return hallIdStart + */ public Long getHallIdStart(){ return this.hallIdStart; } /** - * 璁剧疆 寮€濮� 澶у巺ID - * @param hallIdStart - */ + * 璁剧疆 寮€濮� 澶у巺ID + * @param hallIdStart + */ public void setHallIdStart(Long hallIdStart){ this.hallIdStart = hallIdStart; } /** - * 鑾峰彇 缁撴潫 澶у巺ID - * @return $hallIdEnd - */ + * 鑾峰彇 缁撴潫 澶у巺ID + * @return $hallIdEnd + */ public Long getHallIdEnd(){ return this.hallIdEnd; } /** - * 璁剧疆 缁撴潫 澶у巺ID - * @param hallIdEnd - */ + * 璁剧疆 缁撴潫 澶у巺ID + * @param hallIdEnd + */ public void setHallIdEnd(Long hallIdEnd){ this.hallIdEnd = hallIdEnd; } /** - * 鑾峰彇 澧炲姞 澶у巺ID - * @return hallIdIncrement - */ + * 鑾峰彇 澧炲姞 澶у巺ID + * @return hallIdIncrement + */ public Long getHallIdIncrement(){ return this.hallIdIncrement; } /** - * 璁剧疆 澧炲姞 澶у巺ID - * @param hallIdIncrement - */ + * 璁剧疆 澧炲姞 澶у巺ID + * @param hallIdIncrement + */ public void setHallIdIncrement(Long hallIdIncrement){ this.hallIdIncrement = hallIdIncrement; } /** - * 鑾峰彇 澶у巺ID - * @return hallIdList - */ + * 鑾峰彇 澶у巺ID + * @return hallIdList + */ public List<Long> getHallIdList(){ return this.hallIdList; } /** - * 璁剧疆 澶у巺ID - * @param hallIdList - */ + * 璁剧疆 澶у巺ID + * @param hallIdList + */ public void setHallIdList(List<Long> hallIdList){ this.hallIdList = hallIdList; } /** - * 鑾峰彇 澶у巺ID - * @return hallIdNotList - */ + * 鑾峰彇 澶у巺ID + * @return hallIdNotList + */ public List<Long> getHallIdNotList(){ return this.hallIdNotList; } /** - * 璁剧疆 澶у巺ID - * @param hallIdNotList - */ + * 璁剧疆 澶у巺ID + * @param hallIdNotList + */ public void setHallIdNotList(List<Long> hallIdNotList){ this.hallIdNotList = hallIdNotList; } /** - * 鑾峰彇 澶у巺鍚嶇О - * @return hallNameList - */ + * 鑾峰彇 澶у巺鍚嶇О + * @return hallNameList + */ public List<String> getHallNameList(){ return this.hallNameList; } /** - * 璁剧疆 澶у巺鍚嶇О - * @param hallNameList - */ + * 璁剧疆 澶у巺鍚嶇О + * @param hallNameList + */ public void setHallNameList(List<String> hallNameList){ this.hallNameList = hallNameList; } /** - * 鑾峰彇 澶у巺鍚嶇О - * @return hallNameNotList - */ + * 鑾峰彇 澶у巺鍚嶇О + * @return hallNameNotList + */ public List<String> getHallNameNotList(){ return this.hallNameNotList; } /** - * 璁剧疆 澶у巺鍚嶇О - * @param hallNameNotList - */ + * 璁剧疆 澶у巺鍚嶇О + * @param hallNameNotList + */ public void setHallNameNotList(List<String> hallNameNotList){ this.hallNameNotList = hallNameNotList; } /** - * 鑾峰彇 寮€濮� 鎺掑簭 - * @return sortStart - */ + * 鑾峰彇 寮€濮� 鎺掑簭 + * @return sortStart + */ public Integer getSortStart(){ return this.sortStart; } /** - * 璁剧疆 寮€濮� 鎺掑簭 - * @param sortStart - */ + * 璁剧疆 寮€濮� 鎺掑簭 + * @param sortStart + */ public void setSortStart(Integer sortStart){ this.sortStart = sortStart; } /** - * 鑾峰彇 缁撴潫 鎺掑簭 - * @return $sortEnd - */ + * 鑾峰彇 缁撴潫 鎺掑簭 + * @return $sortEnd + */ public Integer getSortEnd(){ return this.sortEnd; } /** - * 璁剧疆 缁撴潫 鎺掑簭 - * @param sortEnd - */ + * 璁剧疆 缁撴潫 鎺掑簭 + * @param sortEnd + */ public void setSortEnd(Integer sortEnd){ this.sortEnd = sortEnd; } /** - * 鑾峰彇 澧炲姞 鎺掑簭 - * @return sortIncrement - */ + * 鑾峰彇 澧炲姞 鎺掑簭 + * @return sortIncrement + */ public Integer getSortIncrement(){ return this.sortIncrement; } /** - * 璁剧疆 澧炲姞 鎺掑簭 - * @param sortIncrement - */ + * 璁剧疆 澧炲姞 鎺掑簭 + * @param sortIncrement + */ public void setSortIncrement(Integer sortIncrement){ this.sortIncrement = sortIncrement; } /** - * 鑾峰彇 鎺掑簭 - * @return sortList - */ + * 鑾峰彇 鎺掑簭 + * @return sortList + */ public List<Integer> getSortList(){ return this.sortList; } /** - * 璁剧疆 鎺掑簭 - * @param sortList - */ + * 璁剧疆 鎺掑簭 + * @param sortList + */ public void setSortList(List<Integer> sortList){ this.sortList = sortList; } /** - * 鑾峰彇 鎺掑簭 - * @return sortNotList - */ + * 鑾峰彇 鎺掑簭 + * @return sortNotList + */ public List<Integer> getSortNotList(){ return this.sortNotList; } /** - * 璁剧疆 鎺掑簭 - * @param sortNotList - */ + * 璁剧疆 鎺掑簭 + * @param sortNotList + */ public void setSortNotList(List<Integer> sortNotList){ this.sortNotList = sortNotList; } /** - * 鑾峰彇 澶囨敞 - * @return remarkList - */ + * 鑾峰彇 澶囨敞 + * @return remarkList + */ public List<String> getRemarkList(){ return this.remarkList; } /** - * 璁剧疆 澶囨敞 - * @param remarkList - */ + * 璁剧疆 澶囨敞 + * @param remarkList + */ public void setRemarkList(List<String> remarkList){ this.remarkList = remarkList; } /** - * 鑾峰彇 澶囨敞 - * @return remarkNotList - */ + * 鑾峰彇 澶囨敞 + * @return remarkNotList + */ public List<String> getRemarkNotList(){ return this.remarkNotList; } /** - * 璁剧疆 澶囨敞 - * @param remarkNotList - */ + * 璁剧疆 澶囨敞 + * @param remarkNotList + */ public void setRemarkNotList(List<String> remarkNotList){ this.remarkNotList = remarkNotList; } /** - * 鑾峰彇 寮€濮� 鍒涘缓鏃堕棿 - * @return createTimeStart - */ + * 鑾峰彇 寮€濮� 鍒涘缓鏃堕棿 + * @return createTimeStart + */ public String getCreateTimeStart(){ return this.createTimeStart; } /** - * 璁剧疆 寮€濮� 鍒涘缓鏃堕棿 - * @param createTimeStart - */ + * 璁剧疆 寮€濮� 鍒涘缓鏃堕棿 + * @param createTimeStart + */ public void setCreateTimeStart(String createTimeStart){ this.createTimeStart = createTimeStart; } /** - * 鑾峰彇 缁撴潫 鍒涘缓鏃堕棿 - * @return createTimeEnd - */ + * 鑾峰彇 缁撴潫 鍒涘缓鏃堕棿 + * @return createTimeEnd + */ public String getCreateTimeEnd(){ return this.createTimeEnd; } /** - * 璁剧疆 缁撴潫 鍒涘缓鏃堕棿 - * @param createTimeEnd - */ + * 璁剧疆 缁撴潫 鍒涘缓鏃堕棿 + * @param createTimeEnd + */ public void setCreateTimeEnd(String createTimeEnd){ this.createTimeEnd = createTimeEnd; } /** - * 鑾峰彇 寮€濮� 鍒涘缓鐢ㄦ埛 - * @return createUserIdStart - */ + * 鑾峰彇 寮€濮� 鍒涘缓鐢ㄦ埛 + * @return createUserIdStart + */ public Long getCreateUserIdStart(){ return this.createUserIdStart; } /** - * 璁剧疆 寮€濮� 鍒涘缓鐢ㄦ埛 - * @param createUserIdStart - */ + * 璁剧疆 寮€濮� 鍒涘缓鐢ㄦ埛 + * @param createUserIdStart + */ public void setCreateUserIdStart(Long createUserIdStart){ this.createUserIdStart = createUserIdStart; } /** - * 鑾峰彇 缁撴潫 鍒涘缓鐢ㄦ埛 - * @return $createUserIdEnd - */ + * 鑾峰彇 缁撴潫 鍒涘缓鐢ㄦ埛 + * @return $createUserIdEnd + */ public Long getCreateUserIdEnd(){ return this.createUserIdEnd; } /** - * 璁剧疆 缁撴潫 鍒涘缓鐢ㄦ埛 - * @param createUserIdEnd - */ + * 璁剧疆 缁撴潫 鍒涘缓鐢ㄦ埛 + * @param createUserIdEnd + */ public void setCreateUserIdEnd(Long createUserIdEnd){ this.createUserIdEnd = createUserIdEnd; } /** - * 鑾峰彇 澧炲姞 鍒涘缓鐢ㄦ埛 - * @return createUserIdIncrement - */ + * 鑾峰彇 澧炲姞 鍒涘缓鐢ㄦ埛 + * @return createUserIdIncrement + */ public Long getCreateUserIdIncrement(){ return this.createUserIdIncrement; } /** - * 璁剧疆 澧炲姞 鍒涘缓鐢ㄦ埛 - * @param createUserIdIncrement - */ + * 璁剧疆 澧炲姞 鍒涘缓鐢ㄦ埛 + * @param createUserIdIncrement + */ public void setCreateUserIdIncrement(Long createUserIdIncrement){ this.createUserIdIncrement = createUserIdIncrement; } /** - * 鑾峰彇 鍒涘缓鐢ㄦ埛 - * @return createUserIdList - */ + * 鑾峰彇 鍒涘缓鐢ㄦ埛 + * @return createUserIdList + */ public List<Long> getCreateUserIdList(){ return this.createUserIdList; } /** - * 璁剧疆 鍒涘缓鐢ㄦ埛 - * @param createUserIdList - */ + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdList + */ public void setCreateUserIdList(List<Long> createUserIdList){ this.createUserIdList = createUserIdList; } /** - * 鑾峰彇 鍒涘缓鐢ㄦ埛 - * @return createUserIdNotList - */ + * 鑾峰彇 鍒涘缓鐢ㄦ埛 + * @return createUserIdNotList + */ public List<Long> getCreateUserIdNotList(){ return this.createUserIdNotList; } /** - * 璁剧疆 鍒涘缓鐢ㄦ埛 - * @param createUserIdNotList - */ + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdNotList + */ public void setCreateUserIdNotList(List<Long> createUserIdNotList){ this.createUserIdNotList = createUserIdNotList; } /** - * 鑾峰彇 寮€濮� 淇敼鏃堕棿 - * @return updateTimeStart - */ + * 鑾峰彇 寮€濮� 淇敼鏃堕棿 + * @return updateTimeStart + */ public String getUpdateTimeStart(){ return this.updateTimeStart; } /** - * 璁剧疆 寮€濮� 淇敼鏃堕棿 - * @param updateTimeStart - */ + * 璁剧疆 寮€濮� 淇敼鏃堕棿 + * @param updateTimeStart + */ public void setUpdateTimeStart(String updateTimeStart){ this.updateTimeStart = updateTimeStart; } /** - * 鑾峰彇 缁撴潫 淇敼鏃堕棿 - * @return updateTimeEnd - */ + * 鑾峰彇 缁撴潫 淇敼鏃堕棿 + * @return updateTimeEnd + */ public String getUpdateTimeEnd(){ return this.updateTimeEnd; } /** - * 璁剧疆 缁撴潫 淇敼鏃堕棿 - * @param updateTimeEnd - */ + * 璁剧疆 缁撴潫 淇敼鏃堕棿 + * @param updateTimeEnd + */ public void setUpdateTimeEnd(String updateTimeEnd){ this.updateTimeEnd = updateTimeEnd; } /** - * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� - * @param id - */ + * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� + * @param id + */ public WindowHallQuery id(Long id){ - setId(id); - return this; - } - - /** - * 璁剧疆 寮€濮� 搴忓彿锛屼富閿紝鑷闀� - * @param idStart - */ + setId(id); + return this; + } + + /** + * 璁剧疆 寮€濮� 搴忓彿锛屼富閿紝鑷闀� + * @param idStart + */ public WindowHallQuery idStart(Long idStart){ - this.idStart = idStart; - return this; + this.idStart = idStart; + return this; } /** - * 璁剧疆 缁撴潫 搴忓彿锛屼富閿紝鑷闀� - * @param idEnd - */ + * 璁剧疆 缁撴潫 搴忓彿锛屼富閿紝鑷闀� + * @param idEnd + */ public WindowHallQuery idEnd(Long idEnd){ - this.idEnd = idEnd; - return this; + this.idEnd = idEnd; + return this; } /** - * 璁剧疆 澧炲姞 搴忓彿锛屼富閿紝鑷闀� - * @param idIncrement - */ + * 璁剧疆 澧炲姞 搴忓彿锛屼富閿紝鑷闀� + * @param idIncrement + */ public WindowHallQuery idIncrement(Long idIncrement){ - this.idIncrement = idIncrement; - return this; + this.idIncrement = idIncrement; + return this; } /** - * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� - * @param idList - */ + * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� + * @param idList + */ public WindowHallQuery idList(List<Long> idList){ this.idList = idList; - return this; - } - - /** - * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� - * @param idNotList - */ - public WindowHallQuery idNotList(List<Long> idNotList){ + return this; + } + + /** + * 璁剧疆 搴忓彿锛屼富閿紝鑷闀� + * @param idNotList + */ + public WindowHallQuery idNotList(List<Long> idNotList){ this.idNotList = idNotList; return this; - } + } + + /** + * 璁剧疆 绔欑偣Id + * @param siteId + */ + public WindowHallQuery siteId(Long siteId){ + setSiteId(siteId); + return this; + } + + /** + * 璁剧疆 寮€濮� 绔欑偣Id + * @param siteIdStart + */ + public WindowHallQuery siteIdStart(Long siteIdStart){ + this.siteIdStart = siteIdStart; + return this; + } + + /** + * 璁剧疆 缁撴潫 绔欑偣Id + * @param siteIdEnd + */ + public WindowHallQuery siteIdEnd(Long siteIdEnd){ + this.siteIdEnd = siteIdEnd; + return this; + } + + /** + * 璁剧疆 澧炲姞 绔欑偣Id + * @param siteIdIncrement + */ + public WindowHallQuery siteIdIncrement(Long siteIdIncrement){ + this.siteIdIncrement = siteIdIncrement; + return this; + } + + /** + * 璁剧疆 绔欑偣Id + * @param siteIdList + */ + public WindowHallQuery siteIdList(List<Long> siteIdList){ + this.siteIdList = siteIdList; + return this; + } + + /** + * 璁剧疆 绔欑偣Id + * @param siteIdNotList + */ + public WindowHallQuery siteIdNotList(List<Long> siteIdNotList){ + this.siteIdNotList = siteIdNotList; + return this; + } /** - * 璁剧疆 绐楀彛ID - * @param windowId - */ + * 璁剧疆 绐楀彛ID + * @param windowId + */ public WindowHallQuery windowId(Long windowId){ - setWindowId(windowId); - return this; - } - - /** - * 璁剧疆 寮€濮� 绐楀彛ID - * @param windowIdStart - */ + setWindowId(windowId); + return this; + } + + /** + * 璁剧疆 寮€濮� 绐楀彛ID + * @param windowIdStart + */ public WindowHallQuery windowIdStart(Long windowIdStart){ - this.windowIdStart = windowIdStart; - return this; + this.windowIdStart = windowIdStart; + return this; } /** - * 璁剧疆 缁撴潫 绐楀彛ID - * @param windowIdEnd - */ + * 璁剧疆 缁撴潫 绐楀彛ID + * @param windowIdEnd + */ public WindowHallQuery windowIdEnd(Long windowIdEnd){ - this.windowIdEnd = windowIdEnd; - return this; + this.windowIdEnd = windowIdEnd; + return this; } /** - * 璁剧疆 澧炲姞 绐楀彛ID - * @param windowIdIncrement - */ + * 璁剧疆 澧炲姞 绐楀彛ID + * @param windowIdIncrement + */ public WindowHallQuery windowIdIncrement(Long windowIdIncrement){ - this.windowIdIncrement = windowIdIncrement; - return this; + this.windowIdIncrement = windowIdIncrement; + return this; } /** - * 璁剧疆 绐楀彛ID - * @param windowIdList - */ + * 璁剧疆 绐楀彛ID + * @param windowIdList + */ public WindowHallQuery windowIdList(List<Long> windowIdList){ this.windowIdList = windowIdList; - return this; - } - - /** - * 璁剧疆 绐楀彛ID - * @param windowIdNotList - */ - public WindowHallQuery windowIdNotList(List<Long> windowIdNotList){ + return this; + } + + /** + * 璁剧疆 绐楀彛ID + * @param windowIdNotList + */ + public WindowHallQuery windowIdNotList(List<Long> windowIdNotList){ this.windowIdNotList = windowIdNotList; return this; - } + } - /** - * 璁剧疆 绐楀彛鍚嶇О - * @param windowName - */ + /** + * 璁剧疆 绐楀彛鍚嶇О + * @param windowName + */ public WindowHallQuery windowName(String windowName){ setWindowName(windowName); - return this; + return this; } /** - * 璁剧疆 绐楀彛鍚嶇О - * @param windowNameList - */ + * 璁剧疆 绐楀彛鍚嶇О + * @param windowNameList + */ public WindowHallQuery windowNameList(List<String> windowNameList){ this.windowNameList = windowNameList; - return this; + return this; } /** - * 璁剧疆 澶у巺ID - * @param hallId - */ + * 璁剧疆 澶у巺ID + * @param hallId + */ public WindowHallQuery hallId(Long hallId){ - setHallId(hallId); - return this; - } - - /** - * 璁剧疆 寮€濮� 澶у巺ID - * @param hallIdStart - */ + setHallId(hallId); + return this; + } + + /** + * 璁剧疆 寮€濮� 澶у巺ID + * @param hallIdStart + */ public WindowHallQuery hallIdStart(Long hallIdStart){ - this.hallIdStart = hallIdStart; - return this; + this.hallIdStart = hallIdStart; + return this; } /** - * 璁剧疆 缁撴潫 澶у巺ID - * @param hallIdEnd - */ + * 璁剧疆 缁撴潫 澶у巺ID + * @param hallIdEnd + */ public WindowHallQuery hallIdEnd(Long hallIdEnd){ - this.hallIdEnd = hallIdEnd; - return this; + this.hallIdEnd = hallIdEnd; + return this; } /** - * 璁剧疆 澧炲姞 澶у巺ID - * @param hallIdIncrement - */ + * 璁剧疆 澧炲姞 澶у巺ID + * @param hallIdIncrement + */ public WindowHallQuery hallIdIncrement(Long hallIdIncrement){ - this.hallIdIncrement = hallIdIncrement; - return this; + this.hallIdIncrement = hallIdIncrement; + return this; } /** - * 璁剧疆 澶у巺ID - * @param hallIdList - */ + * 璁剧疆 澶у巺ID + * @param hallIdList + */ public WindowHallQuery hallIdList(List<Long> hallIdList){ this.hallIdList = hallIdList; - return this; - } - - /** - * 璁剧疆 澶у巺ID - * @param hallIdNotList - */ - public WindowHallQuery hallIdNotList(List<Long> hallIdNotList){ + return this; + } + + /** + * 璁剧疆 澶у巺ID + * @param hallIdNotList + */ + public WindowHallQuery hallIdNotList(List<Long> hallIdNotList){ this.hallIdNotList = hallIdNotList; return this; - } + } - /** - * 璁剧疆 澶у巺鍚嶇О - * @param hallName - */ + /** + * 璁剧疆 澶у巺鍚嶇О + * @param hallName + */ public WindowHallQuery hallName(String hallName){ setHallName(hallName); - return this; + return this; } /** - * 璁剧疆 澶у巺鍚嶇О - * @param hallNameList - */ + * 璁剧疆 澶у巺鍚嶇О + * @param hallNameList + */ public WindowHallQuery hallNameList(List<String> hallNameList){ this.hallNameList = hallNameList; - return this; + return this; } /** - * 璁剧疆 鎺掑簭 - * @param sort - */ + * 璁剧疆 鎺掑簭 + * @param sort + */ public WindowHallQuery sort(Integer sort){ - setSort(sort); - return this; - } - - /** - * 璁剧疆 寮€濮� 鎺掑簭 - * @param sortStart - */ + setSort(sort); + return this; + } + + /** + * 璁剧疆 寮€濮� 鎺掑簭 + * @param sortStart + */ public WindowHallQuery sortStart(Integer sortStart){ - this.sortStart = sortStart; - return this; + this.sortStart = sortStart; + return this; } /** - * 璁剧疆 缁撴潫 鎺掑簭 - * @param sortEnd - */ + * 璁剧疆 缁撴潫 鎺掑簭 + * @param sortEnd + */ public WindowHallQuery sortEnd(Integer sortEnd){ - this.sortEnd = sortEnd; - return this; + this.sortEnd = sortEnd; + return this; } /** - * 璁剧疆 澧炲姞 鎺掑簭 - * @param sortIncrement - */ + * 璁剧疆 澧炲姞 鎺掑簭 + * @param sortIncrement + */ public WindowHallQuery sortIncrement(Integer sortIncrement){ - this.sortIncrement = sortIncrement; - return this; + this.sortIncrement = sortIncrement; + return this; } /** - * 璁剧疆 鎺掑簭 - * @param sortList - */ + * 璁剧疆 鎺掑簭 + * @param sortList + */ public WindowHallQuery sortList(List<Integer> sortList){ this.sortList = sortList; - return this; - } - - /** - * 璁剧疆 鎺掑簭 - * @param sortNotList - */ - public WindowHallQuery sortNotList(List<Integer> sortNotList){ + return this; + } + + /** + * 璁剧疆 鎺掑簭 + * @param sortNotList + */ + public WindowHallQuery sortNotList(List<Integer> sortNotList){ this.sortNotList = sortNotList; return this; - } + } - /** - * 璁剧疆 澶囨敞 - * @param remark - */ + /** + * 璁剧疆 澶囨敞 + * @param remark + */ public WindowHallQuery remark(String remark){ setRemark(remark); - return this; + return this; } /** - * 璁剧疆 澶囨敞 - * @param remarkList - */ + * 璁剧疆 澶囨敞 + * @param remarkList + */ public WindowHallQuery remarkList(List<String> remarkList){ this.remarkList = remarkList; - return this; + return this; } /** - * 璁剧疆 鍒涘缓鐢ㄦ埛 - * @param createUserId - */ + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserId + */ public WindowHallQuery createUserId(Long createUserId){ - setCreateUserId(createUserId); - return this; - } - - /** - * 璁剧疆 寮€濮� 鍒涘缓鐢ㄦ埛 - * @param createUserIdStart - */ + setCreateUserId(createUserId); + return this; + } + + /** + * 璁剧疆 寮€濮� 鍒涘缓鐢ㄦ埛 + * @param createUserIdStart + */ public WindowHallQuery createUserIdStart(Long createUserIdStart){ - this.createUserIdStart = createUserIdStart; - return this; + this.createUserIdStart = createUserIdStart; + return this; } /** - * 璁剧疆 缁撴潫 鍒涘缓鐢ㄦ埛 - * @param createUserIdEnd - */ + * 璁剧疆 缁撴潫 鍒涘缓鐢ㄦ埛 + * @param createUserIdEnd + */ public WindowHallQuery createUserIdEnd(Long createUserIdEnd){ - this.createUserIdEnd = createUserIdEnd; - return this; + this.createUserIdEnd = createUserIdEnd; + return this; } /** - * 璁剧疆 澧炲姞 鍒涘缓鐢ㄦ埛 - * @param createUserIdIncrement - */ + * 璁剧疆 澧炲姞 鍒涘缓鐢ㄦ埛 + * @param createUserIdIncrement + */ public WindowHallQuery createUserIdIncrement(Long createUserIdIncrement){ - this.createUserIdIncrement = createUserIdIncrement; - return this; + this.createUserIdIncrement = createUserIdIncrement; + return this; } /** - * 璁剧疆 鍒涘缓鐢ㄦ埛 - * @param createUserIdList - */ + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdList + */ public WindowHallQuery createUserIdList(List<Long> createUserIdList){ this.createUserIdList = createUserIdList; - return this; - } - - /** - * 璁剧疆 鍒涘缓鐢ㄦ埛 - * @param createUserIdNotList - */ - public WindowHallQuery createUserIdNotList(List<Long> createUserIdNotList){ + return this; + } + + /** + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdNotList + */ + public WindowHallQuery createUserIdNotList(List<Long> createUserIdNotList){ this.createUserIdNotList = createUserIdNotList; return this; - } + } /** - * 鑾峰彇 OR鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疧R锛岄」鍐呭涔嬮棿鏄疉ND锛屽锛�(list[0].1 and list[0].2) or (list[1].3 and list[1].4) - * @return orConditionList - */ + * 鑾峰彇 OR鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疧R锛岄」鍐呭涔嬮棿鏄疉ND锛屽锛�(list[0].1 and list[0].2) or (list[1].3 and list[1].4) + * @return orConditionList + */ public List<WindowHallQuery> getOrConditionList(){ - return this.orConditionList; + return this.orConditionList; } /** - * 璁剧疆 OR鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疧R锛岄」鍐呭涔嬮棿鏄疉ND锛屽锛�(list[0].1 and list[0].2) or (list[1].3 and list[1].4) - * @param orConditionList - */ + * 璁剧疆 OR鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疧R锛岄」鍐呭涔嬮棿鏄疉ND锛屽锛�(list[0].1 and list[0].2) or (list[1].3 and list[1].4) + * @param orConditionList + */ public void setOrConditionList(List<WindowHallQuery> orConditionList){ this.orConditionList = orConditionList; } /** - * 鑾峰彇 AND鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疉ND锛岄」鍐呭涔嬮棿鏄疧R锛屽锛�(list[0].1 or list[0].2) and (list[1].3 or list[1].4) - * @return andConditionList - */ + * 鑾峰彇 AND鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疉ND锛岄」鍐呭涔嬮棿鏄疧R锛屽锛�(list[0].1 or list[0].2) and (list[1].3 or list[1].4) + * @return andConditionList + */ public List<WindowHallQuery> getAndConditionList(){ return this.andConditionList; } /** - * 璁剧疆 AND鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疉ND锛岄」鍐呭涔嬮棿鏄疧R锛屽锛�(list[0].1 or list[0].2) and (list[1].3 or list[1].4) - * @param andConditionList - */ + * 璁剧疆 AND鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疉ND锛岄」鍐呭涔嬮棿鏄疧R锛屽锛�(list[0].1 or list[0].2) and (list[1].3 or list[1].4) + * @param andConditionList + */ public void setAndConditionList(List<WindowHallQuery> andConditionList){ this.andConditionList = andConditionList; } diff --git a/base-manager/src/main/resources/sqlmap/module/window/WindowHallMapper.xml b/base-manager/src/main/resources/sqlmap/module/window/WindowHallMapper.xml index 864befdc426d31e8505e3e1cf656e69ccabe40cc..912fae2afae8c33e82437bb6fc36df90f161c5ba 100644 --- a/base-manager/src/main/resources/sqlmap/module/window/WindowHallMapper.xml +++ b/base-manager/src/main/resources/sqlmap/module/window/WindowHallMapper.xml @@ -1,74 +1,78 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" -"mybatis-3-mapper.dtd"> + "mybatis-3-mapper.dtd"> <mapper namespace="com.mortals.xhx.module.window.dao.ibatis.WindowHallDaoImpl"> <!-- 瀛楁鍜屽睘鎬ф槧灏� --> <resultMap type="WindowHallEntity" id="WindowHallEntity-Map"> - <id property="id" column="id" /> - <result property="windowId" column="windowId" /> - <result property="windowName" column="windowName" /> - <result property="hallId" column="hallId" /> - <result property="hallName" column="hallName" /> - <result property="sort" column="sort" /> - <result property="remark" column="remark" /> - <result property="createTime" column="createTime" /> - <result property="createUserId" column="createUserId" /> - <result property="updateTime" column="updateTime" /> - + <id property="id" column="id" /> + <result property="siteId" column="siteId" /> + <result property="windowId" column="windowId" /> + <result property="windowName" column="windowName" /> + <result property="hallId" column="hallId" /> + <result property="hallName" column="hallName" /> + <result property="sort" column="sort" /> + <result property="remark" column="remark" /> + <result property="createTime" column="createTime" /> + <result property="createUserId" column="createUserId" /> + <result property="updateTime" column="updateTime" /> + </resultMap> <!-- 琛ㄦ墍鏈夊垪 --> <sql id="_columns"> <trim suffixOverrides="," suffix=""> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> - a.id, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowId') or colPickMode == 1 and data.containsKey('windowId')))"> - a.windowId, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowName') or colPickMode == 1 and data.containsKey('windowName')))"> - a.windowName, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallId') or colPickMode == 1 and data.containsKey('hallId')))"> - a.hallId, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))"> - a.hallName, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))"> - a.sort, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> - a.remark, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> - a.createTime, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> - a.createUserId, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> - a.updateTime, - </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('id') or colPickMode == 1 and data.containsKey('id')))"> + a.id, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteId') or colPickMode == 1 and data.containsKey('siteId')))"> + a.siteId, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowId') or colPickMode == 1 and data.containsKey('windowId')))"> + a.windowId, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('windowName') or colPickMode == 1 and data.containsKey('windowName')))"> + a.windowName, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallId') or colPickMode == 1 and data.containsKey('hallId')))"> + a.hallId, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))"> + a.hallName, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))"> + a.sort, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('remark') or colPickMode == 1 and data.containsKey('remark')))"> + a.remark, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> + a.createTime, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createUserId') or colPickMode == 1 and data.containsKey('createUserId')))"> + a.createUserId, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> + a.updateTime, + </if> </trim> </sql> <!-- 鏂板 鍖哄垎涓婚敭鑷鍔犺繕鏄笟鍔℃彃鍏� --> <insert id="insert" parameterType="WindowHallEntity" useGeneratedKeys="true" keyProperty="id"> insert into mortals_sys_window_hall - (windowId,windowName,hallId,hallName,sort,remark,createTime,createUserId,updateTime) + (siteId,windowId,windowName,hallId,hallName,sort,remark,createTime,createUserId,updateTime) VALUES - (#{windowId},#{windowName},#{hallId},#{hallName},#{sort},#{remark},#{createTime},#{createUserId},#{updateTime}) + (#{siteId},#{windowId},#{windowName},#{hallId},#{hallName},#{sort},#{remark},#{createTime},#{createUserId},#{updateTime}) </insert> <!-- 鎵归噺鏂板 --> <insert id="insertBatch" parameterType="paramDto"> insert into mortals_sys_window_hall - (windowId,windowName,hallId,hallName,sort,remark,createTime,createUserId,updateTime) + (siteId,windowId,windowName,hallId,hallName,sort,remark,createTime,createUserId,updateTime) VALUES <foreach collection="data.dataList" item="item" index="index" separator="," > - (#{item.windowId},#{item.windowName},#{item.hallId},#{item.hallName},#{item.sort},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateTime}) + (#{item.siteId},#{item.windowId},#{item.windowName},#{item.hallId},#{item.hallName},#{item.sort},#{item.remark},#{item.createTime},#{item.createUserId},#{item.updateTime}) </foreach> </insert> @@ -78,6 +82,12 @@ update mortals_sys_window_hall as a set <trim suffixOverrides="," suffix=""> + <if test="(colPickMode==0 and data.containsKey('siteId')) or (colPickMode==1 and !data.containsKey('siteId'))"> + a.siteId=#{data.siteId}, + </if> + <if test="(colPickMode==0 and data.containsKey('siteIdIncrement')) or (colPickMode==1 and !data.containsKey('siteIdIncrement'))"> + a.siteId=ifnull(a.siteId,0) + #{data.siteIdIncrement}, + </if> <if test="(colPickMode==0 and data.containsKey('windowId')) or (colPickMode==1 and !data.containsKey('windowId'))"> a.windowId=#{data.windowId}, </if> @@ -129,89 +139,101 @@ <update id="updateBatch" parameterType="paramDto"> update mortals_sys_window_hall as a <trim prefix="set" suffixOverrides=","> - <trim prefix="windowId=(case" suffix="ELSE windowId end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <choose> - <when test="(colPickMode==0 and item.containsKey('windowId')) or (colPickMode==1 and !item.containsKey('windowId'))"> - when a.id=#{item.id} then #{item.windowId} - </when> - <when test="(colPickMode==0 and item.containsKey('windowIdIncrement')) or (colPickMode==1 and !item.containsKey('windowIdIncrement'))"> - when a.id=#{item.id} then ifnull(a.windowId,0) + #{item.windowIdIncrement} - </when> - </choose> - </foreach> - </trim> - <trim prefix="windowName=(case" suffix="ELSE windowName end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('windowName')) or (colPickMode==1 and !item.containsKey('windowName'))"> - when a.id=#{item.id} then #{item.windowName} - </if> - </foreach> - </trim> - <trim prefix="hallId=(case" suffix="ELSE hallId end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <choose> - <when test="(colPickMode==0 and item.containsKey('hallId')) or (colPickMode==1 and !item.containsKey('hallId'))"> - when a.id=#{item.id} then #{item.hallId} - </when> - <when test="(colPickMode==0 and item.containsKey('hallIdIncrement')) or (colPickMode==1 and !item.containsKey('hallIdIncrement'))"> - when a.id=#{item.id} then ifnull(a.hallId,0) + #{item.hallIdIncrement} - </when> - </choose> - </foreach> - </trim> - <trim prefix="hallName=(case" suffix="ELSE hallName end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('hallName')) or (colPickMode==1 and !item.containsKey('hallName'))"> - when a.id=#{item.id} then #{item.hallName} - </if> - </foreach> - </trim> - <trim prefix="sort=(case" suffix="ELSE sort end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <choose> - <when test="(colPickMode==0 and item.containsKey('sort')) or (colPickMode==1 and !item.containsKey('sort'))"> - when a.id=#{item.id} then #{item.sort} - </when> - <when test="(colPickMode==0 and item.containsKey('sortIncrement')) or (colPickMode==1 and !item.containsKey('sortIncrement'))"> - when a.id=#{item.id} then ifnull(a.sort,0) + #{item.sortIncrement} - </when> - </choose> - </foreach> - </trim> - <trim prefix="remark=(case" suffix="ELSE remark end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> - when a.id=#{item.id} then #{item.remark} - </if> - </foreach> - </trim> - <trim prefix="createTime=(case" suffix="ELSE createTime end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> - when a.id=#{item.id} then #{item.createTime} - </if> - </foreach> - </trim> - <trim prefix="createUserId=(case" suffix="ELSE createUserId end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <choose> - <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> - when a.id=#{item.id} then #{item.createUserId} - </when> - <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> - when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} - </when> - </choose> - </foreach> - </trim> - <trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> - when a.id=#{item.id} then #{item.updateTime} - </if> - </foreach> - </trim> + <trim prefix="siteId=(case" suffix="ELSE siteId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('siteId')) or (colPickMode==1 and !item.containsKey('siteId'))"> + when a.id=#{item.id} then #{item.siteId} + </when> + <when test="(colPickMode==0 and item.containsKey('siteIdIncrement')) or (colPickMode==1 and !item.containsKey('siteIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.siteId,0) + #{item.siteIdIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="windowId=(case" suffix="ELSE windowId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('windowId')) or (colPickMode==1 and !item.containsKey('windowId'))"> + when a.id=#{item.id} then #{item.windowId} + </when> + <when test="(colPickMode==0 and item.containsKey('windowIdIncrement')) or (colPickMode==1 and !item.containsKey('windowIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.windowId,0) + #{item.windowIdIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="windowName=(case" suffix="ELSE windowName end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('windowName')) or (colPickMode==1 and !item.containsKey('windowName'))"> + when a.id=#{item.id} then #{item.windowName} + </if> + </foreach> + </trim> + <trim prefix="hallId=(case" suffix="ELSE hallId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('hallId')) or (colPickMode==1 and !item.containsKey('hallId'))"> + when a.id=#{item.id} then #{item.hallId} + </when> + <when test="(colPickMode==0 and item.containsKey('hallIdIncrement')) or (colPickMode==1 and !item.containsKey('hallIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.hallId,0) + #{item.hallIdIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="hallName=(case" suffix="ELSE hallName end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('hallName')) or (colPickMode==1 and !item.containsKey('hallName'))"> + when a.id=#{item.id} then #{item.hallName} + </if> + </foreach> + </trim> + <trim prefix="sort=(case" suffix="ELSE sort end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('sort')) or (colPickMode==1 and !item.containsKey('sort'))"> + when a.id=#{item.id} then #{item.sort} + </when> + <when test="(colPickMode==0 and item.containsKey('sortIncrement')) or (colPickMode==1 and !item.containsKey('sortIncrement'))"> + when a.id=#{item.id} then ifnull(a.sort,0) + #{item.sortIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="remark=(case" suffix="ELSE remark end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('remark')) or (colPickMode==1 and !item.containsKey('remark'))"> + when a.id=#{item.id} then #{item.remark} + </if> + </foreach> + </trim> + <trim prefix="createTime=(case" suffix="ELSE createTime end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> + when a.id=#{item.id} then #{item.createTime} + </if> + </foreach> + </trim> + <trim prefix="createUserId=(case" suffix="ELSE createUserId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('createUserId')) or (colPickMode==1 and !item.containsKey('createUserId'))"> + when a.id=#{item.id} then #{item.createUserId} + </when> + <when test="(colPickMode==0 and item.containsKey('createUserIdIncrement')) or (colPickMode==1 and !item.containsKey('createUserIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.createUserId,0) + #{item.createUserIdIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="updateTime=(case" suffix="ELSE updateTime end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('updateTime')) or (colPickMode==1 and !item.containsKey('updateTime'))"> + when a.id=#{item.id} then #{item.updateTime} + </if> + </foreach> + </trim> </trim> where id in <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> @@ -328,299 +350,417 @@ ${_conditionType_} a.id=#{${_conditionParam_}.id} </if> </if> - <if test="conditionParamRef.containsKey('id')"> - <if test="conditionParamRef.id != null "> - ${_conditionType_} a.id = #{${_conditionParam_}.id} - </if> - <if test="conditionParamRef.id == null"> - ${_conditionType_} a.id is null - </if> + <if test="conditionParamRef.containsKey('id')"> + <if test="conditionParamRef.id != null "> + ${_conditionType_} a.id = #{${_conditionParam_}.id} </if> - <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0"> - ${_conditionType_} a.id in - <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + <if test="conditionParamRef.id == null"> + ${_conditionType_} a.id is null </if> - <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0"> - ${_conditionType_} a.id not in - <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> - </if> - <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> - ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} + </if> + <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0"> + ${_conditionType_} a.id in + <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0"> + ${_conditionType_} a.id not in + <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> + ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} + </if> + <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null"> + ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd} + </if> + + <if test="conditionParamRef.containsKey('siteId')"> + <if test="conditionParamRef.siteId != null "> + ${_conditionType_} a.siteId = #{${_conditionParam_}.siteId} </if> - <if test="conditionParamRef.containsKey('idEnd') and conditionParamRef.idEnd != null"> - ${_conditionType_} a.id <![CDATA[ <= ]]> #{${_conditionParam_}.idEnd} + <if test="conditionParamRef.siteId == null"> + ${_conditionType_} a.siteId is null </if> + </if> + <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0"> + ${_conditionType_} a.siteId in + <foreach collection="conditionParamRef.siteIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('siteIdNotList') and conditionParamRef.siteIdNotList.size() > 0"> + ${_conditionType_} a.siteId not in + <foreach collection="conditionParamRef.siteIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('siteIdStart') and conditionParamRef.siteIdStart != null"> + ${_conditionType_} a.siteId <![CDATA[ >= ]]> #{${_conditionParam_}.siteIdStart} + </if> + <if test="conditionParamRef.containsKey('siteIdEnd') and conditionParamRef.siteIdEnd != null"> + ${_conditionType_} a.siteId <![CDATA[ <= ]]> #{${_conditionParam_}.siteIdEnd} + </if> - <if test="conditionParamRef.containsKey('windowId')"> - <if test="conditionParamRef.windowId != null "> - ${_conditionType_} a.windowId = #{${_conditionParam_}.windowId} - </if> - <if test="conditionParamRef.windowId == null"> - ${_conditionType_} a.windowId is null - </if> + <if test="conditionParamRef.containsKey('windowId')"> + <if test="conditionParamRef.windowId != null "> + ${_conditionType_} a.windowId = #{${_conditionParam_}.windowId} </if> - <if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0"> - ${_conditionType_} a.windowId in - <foreach collection="conditionParamRef.windowIdList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + <if test="conditionParamRef.windowId == null"> + ${_conditionType_} a.windowId is null </if> - <if test="conditionParamRef.containsKey('windowIdNotList') and conditionParamRef.windowIdNotList.size() > 0"> - ${_conditionType_} a.windowId not in - <foreach collection="conditionParamRef.windowIdNotList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + </if> + <if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0"> + ${_conditionType_} a.windowId in + <foreach collection="conditionParamRef.windowIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('windowIdNotList') and conditionParamRef.windowIdNotList.size() > 0"> + ${_conditionType_} a.windowId not in + <foreach collection="conditionParamRef.windowIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('windowIdStart') and conditionParamRef.windowIdStart != null"> + ${_conditionType_} a.windowId <![CDATA[ >= ]]> #{${_conditionParam_}.windowIdStart} + </if> + <if test="conditionParamRef.containsKey('windowIdEnd') and conditionParamRef.windowIdEnd != null"> + ${_conditionType_} a.windowId <![CDATA[ <= ]]> #{${_conditionParam_}.windowIdEnd} + </if> + + + <if test="conditionParamRef.containsKey('windowName')"> + <if test="conditionParamRef.windowName != null and conditionParamRef.windowName != ''"> + ${_conditionType_} a.windowName like #{${_conditionParam_}.windowName} </if> - <if test="conditionParamRef.containsKey('windowIdStart') and conditionParamRef.windowIdStart != null"> - ${_conditionType_} a.windowId <![CDATA[ >= ]]> #{${_conditionParam_}.windowIdStart} + <if test="conditionParamRef.windowName == null"> + ${_conditionType_} a.windowName is null </if> - <if test="conditionParamRef.containsKey('windowIdEnd') and conditionParamRef.windowIdEnd != null"> - ${_conditionType_} a.windowId <![CDATA[ <= ]]> #{${_conditionParam_}.windowIdEnd} + </if> + <if test="conditionParamRef.containsKey('windowNameList') and conditionParamRef.windowNameList.size() > 0"> + ${_conditionType_} a.windowName in + <foreach collection="conditionParamRef.windowNameList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('windowNameNotList') and conditionParamRef.windowNameNotList.size() > 0"> + ${_conditionType_} a.windowName not in + <foreach collection="conditionParamRef.windowNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('hallId')"> + <if test="conditionParamRef.hallId != null "> + ${_conditionType_} a.hallId = #{${_conditionParam_}.hallId} </if> + <if test="conditionParamRef.hallId == null"> + ${_conditionType_} a.hallId is null + </if> + </if> + <if test="conditionParamRef.containsKey('hallIdList') and conditionParamRef.hallIdList.size() > 0"> + ${_conditionType_} a.hallId in + <foreach collection="conditionParamRef.hallIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('hallIdNotList') and conditionParamRef.hallIdNotList.size() > 0"> + ${_conditionType_} a.hallId not in + <foreach collection="conditionParamRef.hallIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('hallIdStart') and conditionParamRef.hallIdStart != null"> + ${_conditionType_} a.hallId <![CDATA[ >= ]]> #{${_conditionParam_}.hallIdStart} + </if> + <if test="conditionParamRef.containsKey('hallIdEnd') and conditionParamRef.hallIdEnd != null"> + ${_conditionType_} a.hallId <![CDATA[ <= ]]> #{${_conditionParam_}.hallIdEnd} + </if> - <if test="conditionParamRef.containsKey('windowName')"> - <if test="conditionParamRef.windowName != null and conditionParamRef.windowName != ''"> - ${_conditionType_} a.windowName like #{${_conditionParam_}.windowName} - </if> - <if test="conditionParamRef.windowName == null"> - ${_conditionType_} a.windowName is null - </if> + <if test="conditionParamRef.containsKey('hallName')"> + <if test="conditionParamRef.hallName != null and conditionParamRef.hallName != ''"> + ${_conditionType_} a.hallName like #{${_conditionParam_}.hallName} </if> - <if test="conditionParamRef.containsKey('windowNameList') and conditionParamRef.windowNameList.size() > 0"> - ${_conditionType_} a.windowName in - <foreach collection="conditionParamRef.windowNameList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + <if test="conditionParamRef.hallName == null"> + ${_conditionType_} a.hallName is null </if> - <if test="conditionParamRef.containsKey('windowNameNotList') and conditionParamRef.windowNameNotList.size() > 0"> - ${_conditionType_} a.windowName not in - <foreach collection="conditionParamRef.windowNameNotList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + </if> + <if test="conditionParamRef.containsKey('hallNameList') and conditionParamRef.hallNameList.size() > 0"> + ${_conditionType_} a.hallName in + <foreach collection="conditionParamRef.hallNameList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('hallNameNotList') and conditionParamRef.hallNameNotList.size() > 0"> + ${_conditionType_} a.hallName not in + <foreach collection="conditionParamRef.hallNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('sort')"> + <if test="conditionParamRef.sort != null "> + ${_conditionType_} a.sort = #{${_conditionParam_}.sort} </if> - <if test="conditionParamRef.containsKey('hallId')"> - <if test="conditionParamRef.hallId != null "> - ${_conditionType_} a.hallId = #{${_conditionParam_}.hallId} - </if> - <if test="conditionParamRef.hallId == null"> - ${_conditionType_} a.hallId is null - </if> + <if test="conditionParamRef.sort == null"> + ${_conditionType_} a.sort is null </if> - <if test="conditionParamRef.containsKey('hallIdList') and conditionParamRef.hallIdList.size() > 0"> - ${_conditionType_} a.hallId in - <foreach collection="conditionParamRef.hallIdList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + </if> + <if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0"> + ${_conditionType_} a.sort in + <foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('sortNotList') and conditionParamRef.sortNotList.size() > 0"> + ${_conditionType_} a.sort not in + <foreach collection="conditionParamRef.sortNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null"> + ${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart} + </if> + <if test="conditionParamRef.containsKey('sortEnd') and conditionParamRef.sortEnd != null"> + ${_conditionType_} a.sort <![CDATA[ <= ]]> #{${_conditionParam_}.sortEnd} + </if> + + + <if test="conditionParamRef.containsKey('remark')"> + <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''"> + ${_conditionType_} a.remark like #{${_conditionParam_}.remark} </if> - <if test="conditionParamRef.containsKey('hallIdNotList') and conditionParamRef.hallIdNotList.size() > 0"> - ${_conditionType_} a.hallId not in - <foreach collection="conditionParamRef.hallIdNotList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> + <if test="conditionParamRef.remark == null"> + ${_conditionType_} a.remark is null + </if> + </if> + <if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0"> + ${_conditionType_} a.remark in + <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0"> + ${_conditionType_} a.remark not in + <foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + + <if test="conditionParamRef.containsKey('createTime')"> + <if test="conditionParamRef.createTime != null "> + ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime} </if> - <if test="conditionParamRef.containsKey('hallIdStart') and conditionParamRef.hallIdStart != null"> - ${_conditionType_} a.hallId <![CDATA[ >= ]]> #{${_conditionParam_}.hallIdStart} + <if test="conditionParamRef.createTime == null"> + ${_conditionType_} a.createTime is null </if> - <if test="conditionParamRef.containsKey('hallIdEnd') and conditionParamRef.hallIdEnd != null"> - ${_conditionType_} a.hallId <![CDATA[ <= ]]> #{${_conditionParam_}.hallIdEnd} + </if> + <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''"> + ${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') + </if> + <if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''"> + ${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') + </if> + <if test="conditionParamRef.containsKey('createUserId')"> + <if test="conditionParamRef.createUserId != null "> + ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId} + </if> + <if test="conditionParamRef.createUserId == null"> + ${_conditionType_} a.createUserId is null </if> + </if> + <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0"> + ${_conditionType_} a.createUserId in + <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0"> + ${_conditionType_} a.createUserId not in + <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> + ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} + </if> + <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null"> + ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd} + </if> - <if test="conditionParamRef.containsKey('hallName')"> - <if test="conditionParamRef.hallName != null and conditionParamRef.hallName != ''"> - ${_conditionType_} a.hallName like #{${_conditionParam_}.hallName} - </if> - <if test="conditionParamRef.hallName == null"> - ${_conditionType_} a.hallName is null - </if> + <if test="conditionParamRef.containsKey('updateTime')"> + <if test="conditionParamRef.updateTime != null "> + ${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime} + </if> + <if test="conditionParamRef.updateTime == null"> + ${_conditionType_} a.updateTime is null </if> - <if test="conditionParamRef.containsKey('hallNameList') and conditionParamRef.hallNameList.size() > 0"> - ${_conditionType_} a.hallName in - <foreach collection="conditionParamRef.hallNameList" open="(" close=")" index="index" item="item" separator=","> + </if> + <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''"> + ${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') + </if> + <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> + ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') + </if> + </sql> + <sql id="_orderCols_"> + <if test="orderColList != null and !orderColList.isEmpty()"> + order by + <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0"> + field(a.id, + <foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('hallNameNotList') and conditionParamRef.hallNameNotList.size() > 0"> - ${_conditionType_} a.hallName not in - <foreach collection="conditionParamRef.hallNameNotList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0"> + field(a.siteId, + <foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('sort')"> - <if test="conditionParamRef.sort != null "> - ${_conditionType_} a.sort = #{${_conditionParam_}.sort} - </if> - <if test="conditionParamRef.sort == null"> - ${_conditionType_} a.sort is null - </if> - </if> - <if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0"> - ${_conditionType_} a.sort in - <foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0"> + field(a.windowId, + <foreach collection="conditionParamRef.windowIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('sortNotList') and conditionParamRef.sortNotList.size() > 0"> - ${_conditionType_} a.sort not in - <foreach collection="conditionParamRef.sortNotList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('hallIdList') and conditionParamRef.hallIdList.size() > 0"> + field(a.hallId, + <foreach collection="conditionParamRef.hallIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null"> - ${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart} - </if> - <if test="conditionParamRef.containsKey('sortEnd') and conditionParamRef.sortEnd != null"> - ${_conditionType_} a.sort <![CDATA[ <= ]]> #{${_conditionParam_}.sortEnd} - </if> - - - <if test="conditionParamRef.containsKey('remark')"> - <if test="conditionParamRef.remark != null and conditionParamRef.remark != ''"> - ${_conditionType_} a.remark like #{${_conditionParam_}.remark} - </if> - <if test="conditionParamRef.remark == null"> - ${_conditionType_} a.remark is null - </if> - </if> - <if test="conditionParamRef.containsKey('remarkList') and conditionParamRef.remarkList.size() > 0"> - ${_conditionType_} a.remark in - <foreach collection="conditionParamRef.remarkList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0"> + field(a.sort, + <foreach collection="conditionParamRef.sortList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('remarkNotList') and conditionParamRef.remarkNotList.size() > 0"> - ${_conditionType_} a.remark not in - <foreach collection="conditionParamRef.remarkNotList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0"> + field(a.createUserId, + <foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - - <if test="conditionParamRef.containsKey('createTime')"> - <if test="conditionParamRef.createTime != null "> - ${_conditionType_} a.createTime = #{${_conditionParam_}.createTime} - </if> - <if test="conditionParamRef.createTime == null"> - ${_conditionType_} a.createTime is null - </if> - </if> - <if test="conditionParamRef.containsKey('createTimeStart') and conditionParamRef.createTimeStart != null and conditionParamRef.createTimeStart!=''"> - ${_conditionType_} a.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') - </if> - <if test="conditionParamRef.containsKey('createTimeEnd') and conditionParamRef.createTimeEnd != null and conditionParamRef.createTimeEnd!=''"> - ${_conditionType_} a.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.createTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') + <trim suffixOverrides="," suffix=""> + <foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> + a.${item.colName} ${item.sortKind} + </foreach> + </trim> + </if> + <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> + order by + <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0"> + field(a.id, + <foreach collection="conditionParamRef.idList" open="" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + , </if> - <if test="conditionParamRef.containsKey('createUserId')"> - <if test="conditionParamRef.createUserId != null "> - ${_conditionType_} a.createUserId = #{${_conditionParam_}.createUserId} - </if> - <if test="conditionParamRef.createUserId == null"> - ${_conditionType_} a.createUserId is null - </if> + <if test="conditionParamRef.containsKey('siteIdList') and conditionParamRef.siteIdList.size() > 0"> + field(a.siteId, + <foreach collection="conditionParamRef.siteIdList" open="" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + , </if> - <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0"> - ${_conditionType_} a.createUserId in - <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('windowIdList') and conditionParamRef.windowIdList.size() > 0"> + field(a.windowId, + <foreach collection="conditionParamRef.windowIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0"> - ${_conditionType_} a.createUserId not in - <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=","> + <if test="conditionParamRef.containsKey('hallIdList') and conditionParamRef.hallIdList.size() > 0"> + field(a.hallId, + <foreach collection="conditionParamRef.hallIdList" open="" close=")" index="index" item="item" separator=","> #{item} </foreach> + , </if> - <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> - ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} + <if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0"> + field(a.sort, + <foreach collection="conditionParamRef.sortList" open="" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + , </if> - <if test="conditionParamRef.containsKey('createUserIdEnd') and conditionParamRef.createUserIdEnd != null"> - ${_conditionType_} a.createUserId <![CDATA[ <= ]]> #{${_conditionParam_}.createUserIdEnd} + <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0"> + field(a.createUserId, + <foreach collection="conditionParamRef.createUserIdList" open="" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + , </if> - - - <if test="conditionParamRef.containsKey('updateTime')"> - <if test="conditionParamRef.updateTime != null "> - ${_conditionType_} a.updateTime = #{${_conditionParam_}.updateTime} + <trim suffixOverrides="," suffix=""> + <if test="orderCol.containsKey('id')"> + a.id + <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if> + , </if> - <if test="conditionParamRef.updateTime == null"> - ${_conditionType_} a.updateTime is null + <if test="orderCol.containsKey('siteId')"> + a.siteId + <if test='orderCol.siteId != null and "DESC".equalsIgnoreCase(orderCol.siteId)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('windowId')"> + a.windowId + <if test='orderCol.windowId != null and "DESC".equalsIgnoreCase(orderCol.windowId)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('windowName')"> + a.windowName + <if test='orderCol.windowName != null and "DESC".equalsIgnoreCase(orderCol.windowName)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('hallId')"> + a.hallId + <if test='orderCol.hallId != null and "DESC".equalsIgnoreCase(orderCol.hallId)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('hallName')"> + a.hallName + <if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('sort')"> + a.sort + <if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('remark')"> + a.remark + <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('createTime')"> + a.createTime + <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('createUserId')"> + a.createUserId + <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('updateTime')"> + a.updateTime + <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> + , </if> - </if> - <if test="conditionParamRef.containsKey('updateTimeStart') and conditionParamRef.updateTimeStart != null and conditionParamRef.updateTimeStart!=''"> - ${_conditionType_} a.updateTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s') - </if> - <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> - ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') - </if> - </sql> - <sql id="_orderCols_"> - <if test="orderColList != null and !orderColList.isEmpty()"> - order by - <trim suffixOverrides="," suffix=""> - <foreach collection="orderColList" open="" close="" index="index" item="item" separator=","> - ${item.colName} ${item.sortKind} - </foreach> - </trim> - </if> - <if test="(orderColList == null or orderColList.isEmpty()) and orderCol != null and !orderCol.isEmpty()"> - order by - <trim suffixOverrides="," suffix=""> - <if test="orderCol.containsKey('id')"> - a.id - <if test='orderCol.id != null and "DESC".equalsIgnoreCase(orderCol.id)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('windowId')"> - a.windowId - <if test='orderCol.windowId != null and "DESC".equalsIgnoreCase(orderCol.windowId)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('windowName')"> - a.windowName - <if test='orderCol.windowName != null and "DESC".equalsIgnoreCase(orderCol.windowName)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('hallId')"> - a.hallId - <if test='orderCol.hallId != null and "DESC".equalsIgnoreCase(orderCol.hallId)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('hallName')"> - a.hallName - <if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('sort')"> - a.sort - <if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('remark')"> - a.remark - <if test='orderCol.remark != null and "DESC".equalsIgnoreCase(orderCol.remark)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('createTime')"> - a.createTime - <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('createUserId')"> - a.createUserId - <if test='orderCol.createUserId != null and "DESC".equalsIgnoreCase(orderCol.createUserId)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('updateTime')"> - a.updateTime - <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> - , - </if> </trim> </if> + + </sql> <sql id="_group_by_"> <if test="groupList != null and !groupList.isEmpty()"> diff --git a/base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http b/base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http index 2300cda6b5f5b2f38a3084ac155affd83196537b..b90b27a8ce0248eb8f5930bfea7ba38b88957659 100644 --- a/base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http +++ b/base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http @@ -65,7 +65,7 @@ Accept: application/json ###鏋勫缓绔欑偣鏍� GET {{baseUrl}}/site/siteTree #Authorization: {{authToken}} -Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE6NTgyNzRlMWM1MDlhNDQ2YzhmYjVlMDRkNjNlM2JmOTAifQ.dLq6-GLVOPvxq66pbqpj0K5qx1y3FzbKzbKq-wCxOr4 +Authorization: eyJhbGciOiJIUzI1NiJ9.eyJsb2dpbl91c2VyX2tleSI6IjIwNjY6MTM1OWYxYTQzZDNkNDljMmJkMDI5YzE5NThiNmFiZDAifQ.OQtNgxm9AH_TOuvAbbabJV0iMIbP3tj9pm6wofFqSis Accept: application/json diff --git a/base-manager/src/test/java/com/mortals/httpclient/system/system.http b/base-manager/src/test/java/com/mortals/httpclient/system/system.http index f2518dacd943e14b05bafabfcf50ea0d86aa6b54..4d30d49e64f0b985c30e3a140f51cfdf0d57d4e1 100644 --- a/base-manager/src/test/java/com/mortals/httpclient/system/system.http +++ b/base-manager/src/test/java/com/mortals/httpclient/system/system.http @@ -4,9 +4,9 @@ POST {{baseUrl}}/login/login Content-Type: application/json { - "loginName":"admin", - "password":"admin", - "securityCode":"8888" + "loginName":"banana", + "password":"gxjG123!@#", + "securityCode":"admin" } > {% @@ -15,6 +15,17 @@ client.global.set("authToken", JSON.parse(response.body).data.token); %} +###鏋勫缓绔欑偣鏍� +POST {{baseUrl}}/area/authAreaTree +Authorization: {{authToken}} +Accept: application/json + + +###鏋勫缓绔欑偣鏍� +POST {{baseUrl}}/area/treeselect +Authorization: {{authToken}} +Accept: application/json + ###棣栭〉 POST {{baseUrl}}/login/index diff --git a/common-lib/src/main/java/com/mortals/xhx/module/area/model/AreaTreeSelect.java b/common-lib/src/main/java/com/mortals/xhx/module/area/model/AreaTreeSelect.java index 8e396a97f939593ceba00886d61d53359d6d2ea0..12f5268756001ecd17d1da8426ad7aabc24497b1 100644 --- a/common-lib/src/main/java/com/mortals/xhx/module/area/model/AreaTreeSelect.java +++ b/common-lib/src/main/java/com/mortals/xhx/module/area/model/AreaTreeSelect.java @@ -44,6 +44,11 @@ public class AreaTreeSelect implements Serializable { */ private String icon; + /** + * 鍖哄煙绛夌骇(1.鐪侊紝2.鍦板競宸烇紝3.鍖哄幙锛�4.琛楅亾锛�5.绀惧尯) + */ + private Integer areaLevel; + /** * 瀛愯妭鐐� */ @@ -59,6 +64,7 @@ public class AreaTreeSelect implements Serializable { this.isLeaf = false; } this.areaCode=entity.getAreaCode(); + this.areaLevel=entity.getAreaLevel(); this.type = "area"; this.icon = "el-icon-folder"; } diff --git a/deploy.sh b/deploy.sh index cd9aec0b0f14c8136c71ba55c1191a11cbdef208..e38544feb9894ef52aeafc2ff955607d719983e2 100644 --- a/deploy.sh +++ b/deploy.sh @@ -49,8 +49,8 @@ MYSQL_SERVICE="${SERVICE_PATH}/mysql.service" RABBITMQ="rabbitmq" RABBIT_CENTOS_FILENAME="rabbitmq-server-3.9.16-1.el7.noarch.rpm" ELANG_CENTOS_FILENAME="erlang-23.3.4.11-1.el7.x86_64.rpm" -RABBITMQ_USER="root" -RABBITMQ_PASSWORD="xhx@2022" +RABBITMQ_USER="taxi_mq" +RABBITMQ_PASSWORD="admin@2020" RABBITMQ_CONF_PATH="/etc/rabbitmq/" #redis @@ -341,6 +341,10 @@ setup_rabbitmq() { else writelog "ubuntu erlang and rabbitmq clear" + apt-get remove rabbitmq-server -y + rm -rf /var/lib/rabbitmq + rm -rf /usr/lib64/erlang + apt-get remove erlang -y fi } diff --git a/portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue b/portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue index 8539cb7e34b34345a2946cff5d79aaa3786a3667..6077055568b8de6ce495cbed609111256fb18c83 100644 --- a/portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue +++ b/portal-manager-ui/admin/src/views/siteArrange/siteArrange.vue @@ -142,7 +142,9 @@ export default { methods: { // 鑾峰彇鐢ㄦ埛甯哥敤绔欑偣鍒楄〃 async getCollect() { - let res = await getCollect(); + let res = await getCollect({ + siteId: this.siteId, + }); if (res.code == 1) { this.collectList = res.data; } @@ -196,6 +198,7 @@ export default { async saveCollect() { let modelIds = this.collectList.map((v) => v.id).join(","); let res = await saveCollect({ + siteId: this.siteId, modelIds, }); // if (res.data.code == 1) { diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue index 26163512bca390de95b1de6a0f4f35eb51af493c..f39594415e5e290b4cbe63a55181fc769970b43d 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/EditUser.vue @@ -46,10 +46,10 @@ <a-form-model-item label="鐢ㄦ埛瑙掕壊" prop="roleId"> <a-select v-model="form.roleId" placeholder="璇烽€夋嫨瑙掕壊"> <a-select-option - v-for="v in userDict" - :key="v.key" - :value="v.key" - >{{ v.value }}</a-select-option + v-for="(v, key) in userDict" + :key="key" + :value="key" + >{{ v }}</a-select-option > </a-select> </a-form-model-item> @@ -105,9 +105,9 @@ export default { }, props: { userDict: { - type: Array, + type: Object, default: () => { - return []; + return {}; }, }, visibleUserEdit: { @@ -153,12 +153,22 @@ export default { // 缂栬緫 onEdit(row) { this.form = { ...row }; - this.form.areaNames = JSON.parse(this.form.areaNames); - if (this.form.areaNames.length) { - this.selectAreaList = this.form.areaNames.map((v) => v.label); + try { + this.form.areaNames = JSON.parse(this.form.areaNames); + } catch (err) { + this.form.areaNames = this.form.areaNames; + console.log(typeof this.form.areaNames); + } + if (typeof this.form.areaNames == "string") { + this.selectAreaList = [this.form.areaNames]; } else { - this.selectAreaList = []; + if (this.form.areaNames.length) { + this.selectAreaList = this.form.areaNames.map((v) => v.label); + } else { + this.selectAreaList = []; + } } + // this.form.areaCodes = this.form.areaCodes.split(","); this.form.loginPwd && this.$delete(this.form, "loginPwd"); }, @@ -216,5 +226,4 @@ export default { }; </script> -<style> -</style> \ No newline at end of file +<style></style> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue index eede923f8e183450fede703c2f885ca5cbf755ec..ec3e07269427709c93a58c27d7233ac3f56f3f0c 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/components/addUser.vue @@ -70,10 +70,10 @@ <a-form-model-item label="鐢ㄦ埛瑙掕壊" prop="roleId"> <a-select v-model="form.roleId" placeholder="璇烽€夋嫨瑙掕壊"> <a-select-option - v-for="v in userDict" - :key="v.key" - :value="v.key" - >{{ v.value }}</a-select-option + v-for="(v, key) in userDict" + :key="key" + :value="key" + >{{ v }}</a-select-option > </a-select> </a-form-model-item> @@ -135,9 +135,9 @@ export default { }, props: { userDict: { - type: Array, + type: Object, default: () => { - return []; + return {}; }, }, visibleUser: { @@ -229,5 +229,4 @@ export default { }; </script> -<style> -</style> \ No newline at end of file +<style></style> diff --git a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue index 09045dc5d3d59533ae3236801b1c83e52cfd8540..6a2a76e66d9aa4cb2f2b20345ddbb1c5827eca64 100644 --- a/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue +++ b/portal-manager-ui/admin/src/views/thePlatformIsSet/components/permissionsModel/userManagement.vue @@ -170,7 +170,7 @@ export default { }, formTitle: undefined, //琛ㄥ崟title sourceInfoForm: {}, - userDict: [], // 瑙掕壊鏁版嵁 + userDict: {}, // 瑙掕壊鏁版嵁 userform: { roleId: undefined, searchVal: undefined,