Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbom_dianjiang
已添加21个文件
已复制2个文件
已删除22个文件
已修改47个文件
已重命名1个文件
| | |
| | | <project version="4"> |
| | | <component name="CompilerConfiguration"> |
| | | <annotationProcessing> |
| | | <profile default="true" name="Default" enabled="true" /> |
| | | <profile name="Maven default annotation processors profile" enabled="true"> |
| | | <sourceOutputDir name="target/generated-sources/annotations" /> |
| | | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
| | |
| | | <option name="url" value="https://repo.maven.apache.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="nexus" /> |
| | | <option name="name" value="Nexus" /> |
| | | <option name="url" value="http://47.97.118.181:8089/nexus/content/groups/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Maven Central repository" /> |
| | | <option name="url" value="https://repo1.maven.org/maven2" /> |
| | |
| | | <option name="name" value="JBoss Community repository" /> |
| | | <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="http://47.97.118.181:8089/nexus/content/groups/public/" /> |
| | | </remote-repository> |
| | | </component> |
| | | </project> |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | #VUE_APP_API_URL = 'http://192.168.1.54:10010' |
| | | VUE_APP_API_URL = 'https://jinkuai.832smartfarm.com/jinkuai_admin' |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | |
| | | <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>è¿å¿«åå°ç®¡çç³»ç»</title><link href="static/css/app.daf6fc74.css" rel="preload" as="style"><link href="static/css/chunk-vendors.d9e68312.css" rel="preload" as="style"><link href="static/js/app.83e26f0e.js" rel="preload" as="script"><link href="static/js/chunk-vendors.2417847b.js" rel="preload" as="script"><link href="static/css/chunk-vendors.d9e68312.css" rel="stylesheet"><link href="static/css/app.daf6fc74.css" rel="stylesheet"></head><body><div id="app"></div><script src="static/js/chunk-vendors.2417847b.js"></script><script src="static/js/app.83e26f0e.js"></script></body></html> |
| | | <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>å¿é¦ç¹å°åå°ç®¡çç³»ç»</title><link href="static/css/app.daf6fc74.css" rel="preload" as="style"><link href="static/css/chunk-vendors.d9e68312.css" rel="preload" as="style"><link href="static/js/app.83e26f0e.js" rel="preload" as="script"><link href="static/js/chunk-vendors.2417847b.js" rel="preload" as="script"><link href="static/css/chunk-vendors.d9e68312.css" rel="stylesheet"><link href="static/css/app.daf6fc74.css" rel="stylesheet"></head><body><div id="app"></div><script src="static/js/chunk-vendors.2417847b.js"></script><script src="static/js/app.83e26f0e.js"></script></body></html> |
| | |
| | | "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", |
| | | "dev": true |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "ssri": { |
| | | "version": "8.0.1", |
| | | "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826515595&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "minipass": "^3.1.1" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | |
| | | "integrity": "sha1-UylVzB6yCKPZkLOp+acFdGV+CPI=", |
| | | "dev": true |
| | | }, |
| | | "vue-json-viewer": { |
| | | "version": "2.2.22", |
| | | "resolved": "https://registry.npmmirror.com/vue-json-viewer/-/vue-json-viewer-2.2.22.tgz", |
| | | "integrity": "sha512-3oPH5BxoUWva/qp7wNJj+15FBXyi9Yu5VDW4mCWivjHR1pUpMv34fjqqxML7jh2uOqm1S/3Xks5nQ5JjC5+OWw==", |
| | | "dev": true, |
| | | "requires": { |
| | | "clipboard": "^2.0.4" |
| | | } |
| | | }, |
| | | "vue-loader": { |
| | | "version": "15.9.7", |
| | | "resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-15.9.7.tgz", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "vue-router": { |
| | | "version": "3.5.1", |
| | | "resolved": "https://registry.nlark.com/vue-router/download/vue-router-3.5.1.tgz?cache=0&sync_timestamp=1620899536020&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fvue-router%2Fdownload%2Fvue-router-3.5.1.tgz", |
| | |
| | | "@vue/cli-service": "~4.5.0", |
| | | "@vue/eslint-config-standard": "^5.1.2", |
| | | "babel-eslint": "^10.1.0", |
| | | "crypto-js": "^4.2.0", |
| | | "eslint": "^6.7.2", |
| | | "eslint-plugin-import": "^2.20.2", |
| | | "eslint-plugin-node": "^11.1.0", |
| | | "eslint-plugin-promise": "^4.2.1", |
| | | "eslint-plugin-standard": "^4.0.0", |
| | | "eslint-plugin-vue": "^6.2.2", |
| | | "jsencrypt": "^3.3.2", |
| | | "lint-staged": "^9.5.0", |
| | | "node-sass": "^4.12.0", |
| | | "sass-loader": "^8.0.2", |
| | | "vue-cli-plugin-element-ui": "~1.1.4", |
| | | "vue-template-compiler": "^2.6.11", |
| | | "crypto-js": "^4.2.0", |
| | | "jsencrypt": "^3.3.2" |
| | | "vue-json-viewer": "^2.2.22", |
| | | "vue-template-compiler": "^2.6.11" |
| | | }, |
| | | "eslintConfig": { |
| | | "root": true, |
| | |
| | | <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>è¿å¿«åå°ç®¡çç³»ç»</title> |
| | | <title>å¿é¦ç¹å°åå°ç®¡çç³»ç»</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function findAll (data) { |
| | | return request.post('/business/category/list', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/importRecord/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/importRecord/create', data) |
| | | } |
| | | export function updateStatus (data) { |
| | | return request.post('/business/importRecord/updateStatus', data) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/importRecord/exportExcel', data, { |
| | | download: true |
| | | }) |
| | | } |
| | | export function importExcel (data) { |
| | | return request.post('/business/importRecord/importExcel', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/importRecord/updateById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/importRecord/delete/${id}`) |
| | | } |
| | | export function getById (id) { |
| | | return request.get(`/business/importRecord/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/importRecord/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/interfaceLog/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/interfaceLog/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/interfaceLog/updateById', data) |
| | | } |
| | |
| | | download: true |
| | | }) |
| | | } |
| | | export function importExcel (data) { |
| | | return request.post('/business/member/importExcel', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-if="form.type !=3" v-model="form.name" placeholder="请è¾å
¥åç§°" v-trim/> |
| | | <el-select v-else v-model="form.name" placeholder="è¯·éæ©è®¢åç±»å" v-trim> |
| | | <el-option :value="'0'" label="ç¨å·¥å"></el-option> |
| | | <el-option :value="'1'" label="è´§è¿å"></el-option> |
| | | <el-option :value="'2'" label="订é¤å"></el-option> |
| | | </el-select> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥åç§°" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type ==3 " label="æç»è´¹ï¼%ï¼" prop="detail"> |
| | | <el-input type="number" v-model="form.detail" placeholder="请è¾å
¥åç§°" v-trim/> |
| | | <el-form-item label="æåºç¼ç " prop="detail" v-if="form.type ==0" > |
| | | <el-input v-model="form.detail" placeholder="请è¾å
¥æåºç¼ç " v-trim/> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type == 1 || form.type == 2" :label=" form.type == 1?'车è¾è§æ ¼':'餿 é
ç½®ï¼å
ï¼'" prop="detailList"> |
| | | <div style="display: flex;flex-direction: column"> |
| | | <div style="position: relative;display: block;width: 100%;" v-for="(item,index) in form.detailList" > |
| | | <el-input :type="form.type == 1?'text':'number'" style="display:inline-block;width: 60%;margin:5px ;float: left" v-model="form.detailList[index]" placeholder="请è¾å
¥å
容" v-trim/> |
| | | <el-button style="display:inline-block;margin : 5px " @click="del(index)" v-if="form.detailList.length>0">x</el-button> |
| | | </div> |
| | | <div style="position: relative;display: block;width: 100%;"> |
| | | <el-button style="width: 100px;margin: 5px;" type="primary" @click="add()">æ·»å è§æ ¼</el-button> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type == 1" label="徿 " prop="icon"> |
| | | <el-form-item v-if="form.type == 3" label="徿 " prop="icon"> |
| | | <UploadAvatarImage |
| | | :file="{ imgurlfull: form.iconFull, imgurl: form.icon }" |
| | | :uploadData="uploadData" |
| | | @uploadSuccess="uploadAvatarSuccess" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.id ==null && form.type == 1" label="æ¯å¦åºå®è½¦è¾" prop="isFixed"> |
| | | <el-radio-group v-model="form.isFixed"> |
| | | <el-radio :label="0">éåºå®</el-radio> |
| | | <el-radio :label="1">åºå®è½¦å</el-radio> |
| | | </el-radio-group> |
| | | <el-form-item v-if="form.type == 1" label="æè¡æ¦å¾é" prop="icon"> |
| | | <UploadImage |
| | | :fileList="tempfileList" |
| | | :uploadData="uploadData" |
| | | @beginUpload="isUploading=true" |
| | | @endUpload="isUploading=false"/> |
| | | <p class="tip-warn"> |
| | | 建议尺寸ï¼750px X 750pxï¼ä¸é6å¼ |
| | | æ¯æpngãjpgãjpegæ ¼å¼ï¼å¤§å°ä¸è¶
è¿2Mï¼ä¸ä¼ å¾çä¸å
许æ¶åæ¿æ²»ææä¸è²æ
, |
| | | </p> |
| | | </el-form-item> |
| | | <el-form-item label="æåºç " prop="sortnum"> |
| | | <el-input v-model="form.sortnum" placeholder="请è¾å
¥æåºç " v-trim/> |
| | | <el-input v-model="form.sortnum" type="" placeholder="请è¾å
¥æåºç " v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥æè¿°" v-trim/> |
| | | <el-input type="textarea" v-model="form.remark" placeholder="请è¾å
¥æè¿°" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadImage from '@/components/common/UploadImage' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow ,UploadAvatarImage}, |
| | | components: { GlobalWindow, UploadAvatarImage,UploadImage }, |
| | | data () { |
| | | return { |
| | | isUploading: false, |
| | | uploadData: { |
| | | folder: 'category' |
| | | folder: 'dianjiang/category' |
| | | }, |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | |
| | | type: null, |
| | | detail: null, |
| | | remark: null, |
| | | detailList: [''], |
| | | fileList: [], |
| | | icon: '', |
| | | iconFull: '', |
| | | isFixed: 0 |
| | | }, |
| | | tempfileList: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥é
ç½®åç§°' }] |
| | | name: [{ required: true, message: '请è¾å
¥åç§°' }] |
| | | } |
| | | } |
| | | }, |
| | |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods:{ |
| | | del(index){ |
| | | if(this.form.detailList.length<=1){ |
| | | methods: { |
| | | del (index) { |
| | | if (this.form.detailList.length <= 1) { |
| | | return |
| | | } |
| | | this.form.detailList.splice(index,1) |
| | | this.form.detailList.splice(index, 1) |
| | | }, |
| | | add(){ |
| | | add () { |
| | | this.form.detailList.push('') |
| | | }, |
| | | uploadAvatarSuccess (file) { |
| | | this.$set(this.form, 'icon', file.imgurl) |
| | | this.$set(this.form, 'iconFull', file.imgurlfull) |
| | | }, |
| | | open(title, target, type) { |
| | | confirm () { |
| | | this.form.fileList = this.tempfileList |
| | | if (this.form[this.configData['field.id']] == null || this.form[this.configData['field.id']] === '') { |
| | | this.__confirmCreate() |
| | | return |
| | | } |
| | | this.__confirmEdit() |
| | | }, |
| | | open (title, target, type) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.tempfileList = [] |
| | | this.form = { |
| | | id: null, |
| | | status: 0, |
| | |
| | | detail: null, |
| | | type: type, |
| | | remark: null, |
| | | detailList: [''], |
| | | fileList: [], |
| | | icon: '', |
| | | iconFull: '', |
| | | isFixed: 0 |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | if(this.form.detailList==null){ |
| | | this.form.detailList = [''] |
| | | } |
| | | this.form.fileList = this.form.fileList||[] |
| | | this.form.fileList.forEach(item=>{ |
| | | this.tempfileList.push({ |
| | | fileurl: item.fileurl, |
| | | name: item.name, |
| | | url: item.url |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="title" |
| | | width="60%" |
| | | :withFooter="false" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | append-to-body |
| | | @confirm="confirm" |
| | | > |
| | | <div class="codeEditBox"> |
| | | <json-viewer |
| | | :value="form.formatContent" |
| | | :expand-depth="5" |
| | | copyable |
| | | boxed |
| | | :expanded="false" |
| | | @copied="copyText" |
| | | sort |
| | | :show-array-index="false" |
| | | class="w-100%"> |
| | | <template slot="copy"> |
| | | <i class="el-icon-document-copy" title="å¤å¶">å¤å¶ä»£ç </i> |
| | | </template> |
| | | </json-viewer> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import JsonViewer from 'vue-json-viewer' |
| | | |
| | | export default { |
| | | name: 'OperaInterfaceLogWindow', |
| | | extends: BaseOpera, |
| | | components: { JsonViewer }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | content: '', |
| | | formatContent: {} |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | }, |
| | | copyable: { copyText: 'copy', copiedText: 'copied' } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/interfaceLog', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | copyText (val) { |
| | | this.$message.success('å
容已æåå¤å¶å°åªåæ¿ï¼') |
| | | }, |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | try { |
| | | this.form.formatContent = JSON.parse(this.form.content) |
| | | } catch (e) { |
| | | this.form.formatContent = this.form.content |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .codeEditBox { |
| | | width: 100%; |
| | | height: 90%; |
| | | overflow:auto; |
| | | display: block; |
| | | border: 1px solid #dcdee2; |
| | | overflow-y: auto; |
| | | } |
| | | ::v-deep .el-dialog__body{height:70vh;overflow-y: auto} |
| | | ::v-deep .el-dialog{height:78vh;overflow: hidden} |
| | | .jv-container { |
| | | //height: 60vh; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | class="center-title" |
| | | :title="title" |
| | | width="500px" |
| | | top="30vh" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <p class="tip-warn"><i class="el-icon-warning"></i>导å
¥è¯´æï¼<br> |
| | | 1.请å
ä¸è½½æä»¶æ¨¡æ¿ï¼å¹¶æç
§æ¨¡æ¿è¦å»å¡«åè¡¨æ ¼å
容;<br> |
| | | </p> |
| | | <el-form class="demo-form-inline" > |
| | | <el-form-item label="èå¸åå" required> |
| | | <div style="width: 100%;display: flex;align-items: center;"> |
| | | <el-button type="primary" :loading="importing" @click="clickRef">ç¹å»ä¸ä¼ </el-button> |
| | | <el-button type="text" @click="exportTemplate">ç¹å»ä¸è½½æ¨¡ç.EXCEL</el-button> |
| | | </div> |
| | | <div style="font-size: 14px; color: black;" v-if="fileName">{{fileName}}</div> |
| | | </el-form-item> |
| | | </el-form> |
| | | <input type="file" style="position: fixed; left: 0; top: -50px;" accept=".xlsx" ref="fileExcel" @change="result" /> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { importExcel } from '@/api/business/importRecord' |
| | | export default { |
| | | name: 'OperaMemberImportWindow', |
| | | extends: BaseOpera, |
| | | // eslint-disable-next-line vue/no-unused-components |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | importing: false, |
| | | fileName: '', |
| | | type: 0 |
| | | } |
| | | }, |
| | | methods: { |
| | | open (title) { |
| | | this.title = title |
| | | this.fileName = '' |
| | | this.visible = true |
| | | this.type = 0 |
| | | }, |
| | | // å¯¼åºæ¨¡æ¿ |
| | | exportTemplate () { |
| | | // æä¿ç³è¯· |
| | | window.open('/template/member.xlsx') |
| | | }, |
| | | clickRef () { |
| | | this.$refs.fileExcel.click() |
| | | }, |
| | | result (e) { |
| | | this.importing=true |
| | | const data = new FormData() |
| | | data.append('file', e.target.files[0]) |
| | | data.append('type', this.type) |
| | | importExcel(data) |
| | | .then(res => { |
| | | this.$message.success('ååå·²ä¸ä¼ æåï¼å¯åå¾ã导å
¥è®°å½ãè忥ç任塿§è¡è¿åº¦ã') |
| | | this.$emit('success') |
| | | this.visible = false |
| | | }) |
| | | .catch(err => { |
| | | this.fileName = '' |
| | | }) |
| | | .finally(() => { |
| | | this.$refs.fileExcel.value = null |
| | | this.importing=false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
| | |
| | | <div class="menu" :class="{collapse: menuData.collapse}"> |
| | | <div class="logo"> |
| | | <div><img src="@/assets/logo.png"></div> |
| | | <h1 :class="{hidden: menuData.collapse}">è¿å¿«åå°ç®¡çç³»ç»</h1> |
| | | <h1 :class="{hidden: menuData.collapse}">å¿é¦ç¹å°åå°ç®¡çç³»ç»</h1> |
| | | </div> |
| | | <scrollbar> |
| | | <el-menu |
| | |
| | | data() { |
| | | return { |
| | | loading: null, |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/web/public/upload' |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload' |
| | | } |
| | | }, |
| | | |
| | |
| | | accept=".jpg,.png" |
| | | :before-upload="beforeUpload" |
| | | :on-success="uploadSuccess" |
| | | :on-preview="handlePreview" |
| | | :on-remove="handleRemove" |
| | | :on-error="fail" |
| | | > |
| | | <i class="el-icon-plus icon"></i> |
| | | <div slot="file" slot-scope="{file}"> |
| | | <img |
| | | class="el-upload-list__item-thumbnail" |
| | | :src="file.url" alt="" |
| | | style="width: 100px;height: 100px;" |
| | | > |
| | | <span class="el-upload-list__item-actions"> |
| | | <span |
| | | class="el-upload-list__item-preview" |
| | | @click="handlePictureCardPreview(file)" |
| | | > |
| | | <i class="el-icon-zoom-in"></i> |
| | | </span> |
| | | <span |
| | | class="el-upload-list__item-delete" |
| | | @click="handleRemove(file)" |
| | | > |
| | | <i class="el-icon-delete"></i> |
| | | </span> |
| | | </span> |
| | | </div> |
| | | </el-upload> |
| | | <el-image-viewer |
| | | <el-image-viewer |
| | | v-if="showViewer" |
| | | :on-close="closeViewer" |
| | | :initialIndex="tempIndex" |
| | |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | uploadData: Object, |
| | | maxNum: { |
| | | type: Number, |
| | | default: () => null |
| | | }, |
| | | uploadData: Object |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/web/public/uploadLocal', |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/upload', |
| | | realList: [], |
| | | srcList: [], |
| | | // srcList: [], |
| | | tempIndex: 0, |
| | | showViewer: false, |
| | | showViewer: false |
| | | } |
| | | }, |
| | | computed:{ |
| | | srcList(){ |
| | | return this.fileList.map(item => { return item.url }) |
| | | } |
| | | }, |
| | | watch: { |
| | | fileList: { |
| | | handler(val) { |
| | | console.log(val); |
| | | if (val.length==0) { |
| | | this.realList = [] |
| | | this.srcList = [] |
| | | } |
| | | } |
| | | |
| | | } |
| | | }, |
| | | methods: { |
| | | beforeUpload(file) { |
| | | handlePreview(file) { |
| | | // console.log('é¢è§æä»¶ï¼', file,this.fileList); |
| | | this.tempIndex = this.srcList.findIndex(item => item == file.url) |
| | | this.showViewer = true |
| | | }, |
| | | beforeUpload (file) { |
| | | this.$emit('beginUpload') |
| | | const isJPGOrPNG = file.type === 'image/jpeg' || file.type === 'image/png' |
| | | const isLt2M = file.size / 1024 / 1024 < 1; // 500kb |
| | | if (!isJPGOrPNG) { |
| | | this.$message.error('ä¸ä¼ 头åå¾çåªè½æ¯ JPG/PNG æ ¼å¼!'); |
| | | return false |
| | | } |
| | | if (!isLt2M) { |
| | | this.$message.error('ä¸ä¼ 头åå¾ç大å°ä¸è½è¶
è¿ 500KB!'); |
| | | return false |
| | | } |
| | | return true |
| | | }, |
| | | // ä¸ä¼ å¾çæå |
| | | uploadSuccess (res, file, fileList) { |
| | | // console.log('this.fileList', this.fileList); |
| | | // console.log('fileList', fileList); |
| | | this.$emit('uploadEnd') |
| | | this.realList = fileList |
| | | this.srcList.push(res.data.url) |
| | | // console.log('file', file); |
| | | // ä¸ä¼ å¾çæå |
| | | uploadSuccess (res, file, fileList) { |
| | | this.$emit('endUpload') |
| | | console.log('ä¸ä¼ æå1ï¼',fileList); |
| | | if (res.code === 200) { |
| | | this.fileList.push( |
| | | { |
| | | fileurl: res.data.imgaddr, |
| | | name: res.data.originname, |
| | | url: res.data.url |
| | | } |
| | | ) |
| | | this.fileList.push({ |
| | | fileurl: res.data.imgaddr, |
| | | name: res.data.originname, |
| | | url: res.data.url |
| | | }) |
| | | console.log('ä¸ä¼ æå2ï¼', this.fileList); |
| | | } else { |
| | | this.$message.error(res.msg || 'ä¸ä¼ 失败') |
| | | } |
| | | }, |
| | | fail (err, file, fileList) { |
| | | this.$emit('uploadEnd') |
| | | this.$emit('endUpload') |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | }, |
| | | handlePictureCardPreview(file) { |
| | | // this.tempIndex = this.srcList.findIndex(item => item == file.response.data.url ) |
| | | // console.log(file); |
| | | this.tempIndex = this.fileList.findIndex(item => item.url == file.url ) |
| | | // console.log( this.tempIndex); |
| | | this.srcList = this.fileList.map(item => item.url) |
| | | this.showViewer = true |
| | | }, |
| | | closeViewer() { |
| | | closeViewer () { |
| | | this.showViewer = false |
| | | }, |
| | | handleRemove(file) { |
| | | console.log(this.fileList); |
| | | let tempIndex = this.realList.findIndex(item => item.url === file.url) |
| | | // debugger |
| | | this.realList.splice(tempIndex, 1) |
| | | this.fileList.splice(tempIndex, 1) |
| | | this.srcList.splice(tempIndex, 1) |
| | | |
| | | handleRemove (file) { |
| | | const tempIndex = this.fileList.findIndex(item => item.url === file.url) |
| | | if(tempIndex >= 0){ |
| | | this.fileList.splice(tempIndex, 1) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | height: 90px !important; |
| | | } |
| | | </style> |
| | | |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºåç§é
ç½®',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºæåº',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:category:create']">忥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="åä½åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="æåºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="detail" label="æåºç¼ç " min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾æ°å»ºåç§é
ç½®', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾æåº', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
copy from admin/src/views/business/categoryCb.vue
copy to admin/src/views/business/categoryBusType.vue
| Îļþ´Ó admin/src/views/business/categoryCb.vue ¸´ÖÆ |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºé¤æ é
ç½®',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºåä¸åç±»å',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="ç¨é¤æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="detail" label="餿 " min-width="200px"> |
| | | <el-table-column prop="name" label="åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="icon" label="æè¡æ¦å¾é" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.detailList && row.detailList.length"> |
| | | <span v-for="(item,index) in row.detailList"> |
| | | {{item || 0}}å
|
| | | <span v-if="index < row.detailList.length-1" style="margin: 5px">|</span> |
| | | </span> |
| | | <div style="display: flex; flex-wrap: wrap;width: 200px;" v-if="row.fileList && row.fileList.length"> |
| | | <div v-for="item in row.fileList" :key="row.id+'_img'+item.id" style=" box-sizing: border-box; margin-right: 10px; " > |
| | | <el-image style="width: 50px; height: 50px;" :src="item.url" |
| | | :preview-src-list="[item.url]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="æè¿°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾é¤æ é
ç½®', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾åä¸åç±»å', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | type: 2 |
| | | type: 1 |
| | | } |
| | | } |
| | | }, |
copy from admin/src/views/business/categoryCb.vue
copy to admin/src/views/business/categoryField.vue
| Îļþ´Ó admin/src/views/business/categoryCb.vue ¸´ÖÆ |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºé¤æ é
ç½®',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºæ
é¿é¢å',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="ç¨é¤æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="detail" label="餿 " min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.detailList && row.detailList.length"> |
| | | <span v-for="(item,index) in row.detailList"> |
| | | {{item || 0}}å
|
| | | <span v-if="index < row.detailList.length-1" style="margin: 5px">|</span> |
| | | </span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="æè¿°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾é¤æ é
ç½®', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾æ
é¿é¢å', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| ÎļþÃû´Ó admin/src/views/business/categoryCb.vue ÐÞ¸Ä |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:category:create', 'business:category:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºé¤æ é
ç½®',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaCategoryWindow.open('æ°å»ºèå¸ç级',null,searchForm.type)" icon="el-icon-plus" v-permissions="['business:category:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="ç¨é¤æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="detail" label="餿 " min-width="200px"> |
| | | <el-table-column prop="name" label="åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="icon" label="徿 " min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.detailList && row.detailList.length"> |
| | | <span v-for="(item,index) in row.detailList"> |
| | | {{item || 0}}å
|
| | | <span v-if="index < row.detailList.length-1" style="margin: 5px">|</span> |
| | | </span> |
| | | </div> |
| | | <el-image v-if="row.iconFull" style="width: 50px; height: 50px; margin-right: 10px" :src="row.iconFull" |
| | | :preview-src-list="[row.iconFull]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="æè¿°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾é¤æ é
ç½®', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.operaCategoryWindow.open('ç¼è¾èå¸ç级', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | type: 2 |
| | | type: 3 |
| | | } |
| | | } |
| | | }, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:interfacelog:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="æ¥å£åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥æ¥å£åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <el-select v-model="searchForm.type" @change="search" placeholder="è¯·éæ©"> |
| | | <el-option label="è°ç¨" value="0"></el-option> |
| | | <el-option label="æ¨éæ¥å" value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="èµ·æ¢æ¶é´" prop="startDate"> |
| | | <!-- <el-date-picker |
| | | @change="seleTime" |
| | | v-model="time" |
| | | type="datetimerange" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´"> |
| | | </el-date-picker> --> |
| | | <el-date-picker type="datetime" v-model="searchForm.startDate" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="è¯·éæ©å¼å§æ¶é´" @change="changeRadio" /> |
| | | <el-date-picker type="datetime" v-model="searchForm.endDate" value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="è¯·éæ©ç»ææ¶é´" @change="changeRadio" /> |
| | | </el-form-item> |
| | | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> |
| | | <el-radio-button label="0">å½å¤©</el-radio-button> |
| | | <el-radio-button label="1">è¿7天</el-radio-button> |
| | | <el-radio-button label="2">è¿30天</el-radio-button> |
| | | </el-radio-group> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table :height="tableHeightNew" v-loading="isWorking.search" :data="tableData.list" stripe> |
| | | <el-table-column prop="name" label="æ¥å£åç§°" min-width="180px"></el-table-column> |
| | | <el-table-column prop="url" label="å°åä¿¡æ¯" min-width="180px"></el-table-column> |
| | | <el-table-column label="ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type == 0">è°ç¨</span> |
| | | <span v-if="row.type == 1">æ¨éæ¥æ¶</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¹³å°" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.plat == 0">海康å®é²å¹³å°</span> |
| | | <span v-if="row.plat == 1">ERPç³»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="request" label="请æ±åæ°" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" |
| | | @click="$refs.operaInterfaceLogWindow.open('请æ±åæ°', { content: row.request })">æ¥ç</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="repose" label="ååºåæ°" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" |
| | | @click="$refs.operaInterfaceLogWindow.open('ååºåæ°', { content: row.repose })">æ¥ç</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaInterfaceLogWindow ref="operaInterfaceLogWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaInterfaceLogWindow from '@/components/business/OperaInterfaceLogWindow' |
| | | import { timeForMat } from '@/utils/util' |
| | | export default { |
| | | name: 'InterfaceLog', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaInterfaceLogWindow }, |
| | | data() { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | type: '', |
| | | endDate: '', |
| | | startDate: '', |
| | | radio: '0' |
| | | }, |
| | | time: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.config({ |
| | | module: '䏿¹å¹³å°æ¥å£äº¤äºè®°å½', |
| | | api: '/business/interfaceLog', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.changeRadio('0') |
| | | }, |
| | | methods: { |
| | | changeRadio(e) { |
| | | if (e === '0') { |
| | | this.searchForm.startDate = timeForMat(0)[0] |
| | | this.searchForm.endDate = timeForMat(0)[1] |
| | | } else if (e === '1') { |
| | | this.searchForm.startDate = timeForMat(6)[0] |
| | | this.searchForm.endDate = timeForMat(6)[1] |
| | | } else if (e === '2') { |
| | | this.searchForm.startDate = timeForMat(29)[0] |
| | | this.searchForm.endDate = timeForMat(29)[1] |
| | | } else { |
| | | this.searchForm.radio = '' |
| | | } |
| | | if (this.searchForm.startDate && this.searchForm.endDate && new Date(this.searchForm.startDate).getTime() > new Date(this.searchForm.endDate).getTime()) { |
| | | this.$message.error('å¼å§æ¶é´ä¸è½å¤§äºç»ææ¶é´') |
| | | this.searchForm.startDate = '' |
| | | return |
| | | } |
| | | this.search() |
| | | }, |
| | | seleTime(e) { |
| | | this.searchForm.startDate = e[0] |
| | | this.searchForm.endDate = e[1] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | }, |
| | | reset() { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.startDate = '' |
| | | this.searchForm.endDate = '' |
| | | this.searchForm.radio = '' |
| | | this.time = [] |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <TableLayout :permissions="['business:member:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ææºå·" prop="telephone"> |
| | | <el-input v-model="searchForm.telephone" clearable placeholder="请è¾å
¥ææºå·" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" style="width: 150px" placeholder="请è¾å
¥åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çå®å§å" prop="name"> |
| | | <el-input v-model="searchForm.name" clearable placeholder="请è¾å
¥çå®å§å" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="å·¥å·" prop="code"> |
| | | <el-input v-model="searchForm.code" style="width: 150px" placeholder="请è¾å
¥å·¥å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <el-select v-model="searchForm.type" clearable placeholder="è¯·éæ©ç±»å" @change="search"> |
| | | <el-option :value="0" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="æ¥åæ¹"></el-option> |
| | | <el-form-item label="æåº" prop="fieldIdList"> |
| | | <el-select |
| | | v-model="searchForm.fieldIdList" |
| | | style="width: 150px" |
| | | placeholder="æåº" |
| | | clearable |
| | | multiple |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" @keypress.enter.native="search" clearable placeholder="ç¶æ"> |
| | | <el-option label="å¯ç¨" value="0"></el-option> |
| | | <el-option label="ç¦ç¨" value="1"></el-option> |
| | | <el-form-item label="åä¸åç±»å" prop="busTypeIdList"> |
| | | <el-select |
| | | v-model="searchForm.busTypeIdList" |
| | | style="width: 150px" |
| | | placeholder="åä¸åç±»å" |
| | | clearable |
| | | multiple |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList1" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item>--> |
| | | <el-form-item label="æ³¨åæ¶é´" prop="eventType"> |
| | | <el-date-picker type="datetime" style="width: 120px" v-model="searchForm.startTime" clearable value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="å¼å§æ¶é´" />- |
| | | <el-date-picker type="datetime" style="width: 120px" v-model="searchForm.endTime" clearable value-format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="ç»ææ¶é´" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ
é¿é¢å" prop="levelIdList"> |
| | | <el-select |
| | | v-model="searchForm.levelIdList" |
| | | style="width: 150px" |
| | | placeholder="æ
é¿é¢å" |
| | | clearable |
| | | multiple |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList2" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="èå¸ç级" prop="levelIdList"> |
| | | <el-select |
| | | v-model="searchForm.levelIdList" |
| | | style="width: 150px" |
| | | placeholder="èå¸ç级" |
| | | clearable |
| | | multiple |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList3" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | | placeholder="ç¶æ" |
| | | clearable |
| | | style="width: 150px" |
| | | @change="search" |
| | | > |
| | | <el-option :key="0" :value="0" label="å¯ç¨"></el-option> |
| | | <el-option :key="1" :value="1" label="ç¦ç¨"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" @click="exportExcel">导åº</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <!-- <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaMemberWindow.open('æ°å»ºä¼åä¿¡æ¯è¡¨')" icon="el-icon-plus" v-permissions="['business:member:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button></li> |
| | | </ul>--> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaMemberWindow.open('æ°å»ºèå¸',null)" icon="el-icon-plus" v-permissions="['business:member:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:member:create']" @click="$refs.OperaMemberImportWindow.open('èå¸å¯¼å
¥', searchForm.companyType)">æ¹é导å
¥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" |
| | | v-loading="isWorking.search" |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="openid" label="openid" min-width="100px"> |
| | | <el-table-column prop="imgurl" label="å¾ç" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span style="cursor: pointer;color: #2E68EC" @click="openDetail(row)">{{row.openid}}</span> |
| | | <el-image v-if="row.imgurlfull" style="width: 50px; height: 50px; margin-right: 10px" :src="row.imgurlfull" |
| | | :preview-src-list="[row.imgurlfull]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="æµç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="çå®å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="telephone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="workerIdentity" label="身份" min-width="100px"> |
| | | <el-table-column prop="code" label="å·¥å·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sex" label="æ§å«" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | ååæ¹<span v-if="row.workerIdentity == 2 || row.driverIdentity == 2 || row.chefIdentity == 2">{{' | æ¥åæ¹'}}</span> |
| | | <span v-if="row.sex ==0">ç·</span> |
| | | <span v-if="row.sex ==1">女</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="workerIdentity" label="æ¥å认è¯èº«ä»½" width="120px"> |
| | | <el-table-column prop="position" label="å²ä½" min-width="120px"></el-table-column> |
| | | <el-table-column prop="levelName" label="ç级" min-width="100px"></el-table-column> |
| | | <el-table-column prop="jobYear" label="ä»ä¸å¹´ä»½" min-width="100px"></el-table-column> |
| | | <el-table-column prop="serveNum" label="æå¡ååº" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.workerIdentity == 2" class="renzhen">工人</div> |
| | | <div v-if=" row.driverIdentity == 2" class="renzhen">叿º</div> |
| | | <div v-if="row.chefIdentity == 2" class="renzhen">ä¾é¤</div> |
| | | <span v-if="row.serveNum">{{row.serveNum}}个</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" label="å½åä½é¢(å
)" min-width="100px"> |
| | | <el-table-column prop="caseNum" label="æ ææ¡ä¾" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="yellowstate">{{((row.amount || 0)/100).toFixed(2)}}</span> |
| | | <span v-if="row.caseNum">{{row.caseNum}}个</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="æ³¨åæ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="autoReciveStatus" label="æ¥åèªå¨æ´¾å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{row.autoReceiveStatus ==1?"æ¯":"å¦"}} |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="ç¶æ"> |
| | | <el-table-column prop="busTypeNames" label="åä¸åç±»å" min-width="200px"></el-table-column> |
| | | <el-table-column prop="areaNames" label="æå¡æåº" min-width="200px"></el-table-column> |
| | | <el-table-column prop="fieldNames" label="æ
é¿é¢å" min-width="200px"></el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaMemberWindow.open('ç¼è¾ä¼åä¿¡æ¯è¡¨', row)" icon="el-icon-edit" v-permissions="['business:member:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button> |
| | | <el-button type="text" @click="$refs.operaMemberWindow.open('ç¼è¾èå¸', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">ç¼è¾</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column>--> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaMemberDetailWindow ref="OperaMemberDetailWindow" /> |
| | | <OperaMemberWindow ref="operaMemberWindow" @success="handlePageChange"/> |
| | | <OperaMemberImportWindow ref="OperaMemberImportWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaMemberWindow from '@/components/business/OperaMemberWindow' |
| | | import OperaMemberDetailWindow from '@/components/business/OperaMemberDetailWindow' |
| | | import OperaMemberImportWindow from '@/components/business/OperaMemberImportWindow' |
| | | import { findAll as cateList } from '@/api/business/category' |
| | | export default { |
| | | name: 'Member', |
| | | name: 'Category', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaMemberDetailWindow, OperaMemberWindow }, |
| | | components: { TableLayout, Pagination, OperaMemberWindow ,OperaMemberImportWindow}, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | type: 0, |
| | | startTime: '', |
| | | endTime: '', |
| | | telephone: '', |
| | | name: '', |
| | | status: '' |
| | | } |
| | | code: '', |
| | | status: null, |
| | | levelIdList:[], |
| | | fieldIdList: [], |
| | | busTypeIdList:[], |
| | | type: 0 |
| | | }, |
| | | cateList:[], |
| | | cateList1:[], |
| | | cateList2:[], |
| | | cateList3:[], |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ä¼åä¿¡æ¯è¡¨', |
| | | module: '讲å¸ä¿¡æ¯è¡¨', |
| | | api: '/business/member', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | cateList({ |
| | | type: 0 , //æåº |
| | | }).then(res => { |
| | | this.cateList = res |
| | | }) |
| | | cateList({ |
| | | type: 1 , //åä¸å |
| | | }).then(res => { |
| | | this.cateList1 = res |
| | | }) |
| | | cateList({ |
| | | type: 2 , //æ
é¿é¢ç¨ |
| | | }).then(res => { |
| | | this.cateList2 = res |
| | | }) |
| | | cateList({ |
| | | type: 3 , //ç级 |
| | | }).then(res => { |
| | | this.cateList3 = res |
| | | }) |
| | | }, |
| | | methods: { |
| | | reset () { |
| | | this.searchForm = { |
| | | type: 0, |
| | | startTime: '', |
| | | endTime: '', |
| | | telephone: '', |
| | | name: '', |
| | | status: '' |
| | | } |
| | | this.search() |
| | | }, |
| | | openDetail (row) { |
| | | this.$refs.OperaMemberDetailWindow.open('ç¨æ·è¯¦æ
', row.id) |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.working = true |
| | | this.api.updateStatus({ id: row.id, workStatus: e }) |
| | | this.api.updateStatus({ id: row.id, status: e }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || 'æä½æå') |
| | | this.search() |
| | |
| | | .finally(() => { |
| | | this.working = false |
| | | }) |
| | | .catch(() => { }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .renzhen{ |
| | | margin: 5px; |
| | | line-height: 30px; |
| | | color:#67c23a; |
| | | height: 30px; |
| | | text-align:center; |
| | | border-color: #e1f3d8; |
| | | background-color: #f0f9eb; |
| | | } |
| | | </style> |
| | |
| | | <div class="home_header"> |
| | | <div class="mb10 fs17">ä¸å好ï¼{{ userInfo.realname }}</div> |
| | | <div class="fs13"> |
| | | ä»å¤©æ¯ {{ nowDate }} {{ nowWeek }}ï¼æ¬¢è¿è®¿é®è¿å¿«åå°ç®¡çç³»ç» |
| | | ä»å¤©æ¯ {{ nowDate }} {{ nowWeek }}ï¼æ¬¢è¿è®¿é®å¿é¦ç¹å°åå°ç®¡çç³»ç» |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <template> |
| | | <div class="wrap"> |
| | | <div class="introduce"> |
| | | <h2>è¿å¿«åå°ç®¡çç³»ç»</h2> |
| | | <h2>å¿é¦ç¹å°åå°ç®¡çç³»ç»</h2> |
| | | <h3></h3> |
| | | </div> |
| | | <div class="login"> |
| | |
| | | public ApiResponse<PageData<Category>> findPage (@RequestBody PageWrap<Category> pageWrap) { |
| | | return ApiResponse.success(categoryService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("å表æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:category:query") |
| | | public ApiResponse<List<Category>> findList (@RequestBody Category pageWrap) { |
| | | return ApiResponse.success(categoryService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | import com.doumee.dao.business.model.ImportRecord; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.service.business.ImportRecordService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | |
| | | /** |
| | | * å类信æ¯è¡¨Controllerå®ä¹ |
| | | * @author doumee |
| | | * @date 2026-01-27 16:02:37 |
| | | */ |
| | | @Api(tags = "tableNameæ¥å£") |
| | | @Api(tags = "å类信æ¯è¡¨æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/business/importRecord") |
| | | public class ImportRecordController extends BaseController { |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(importRecordService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ä¿¡æ¯å¯¼å
¥" ,notes = "ä¿åç³è¯·") |
| | | @PostMapping("/importExcel") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), |
| | | @ApiImplicitParam(name = "导å
¥ç±»å 0人å 1æ¡ä¾", value = "type", required = true, paramType = "query", dataType = "Integer",example = "0",dataTypeClass = Integer.class), |
| | | }) |
| | | public ApiResponse<String> importExcel (@ApiParam(value = "file") MultipartFile file, @ApiParam(value = "type") Integer type) { |
| | | ImportRecord importRecord = importRecordService.importBatch(file,type); |
| | | importRecordService.dealImporTask(importRecord); |
| | | return ApiResponse.success("æä»¶ä¸ä¼ æå"); |
| | | } |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.service.business.MemberService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | |
| | | /** |
| | | * ä¼åä¿¡æ¯è¡¨Controllerå®ä¹ |
| | | * @author doumee |
| | | * @date 2026-01-27 16:02:37 |
| | | */ |
| | | @Api(tags = "tableNameæ¥å£") |
| | | @Api(tags = "ä¼åä¿¡æ¯è¡¨æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/business/member") |
| | | public class MemberController extends BaseController { |
| | |
| | | ExcelExporter.build(Member.class).export(memberService.findPage(pageWrap).getRecords(), "ä¼åä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:member:query") |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.40</version> |
| | | </dependency> |
| | | <!-- Shiro --> |
| | | <dependency> |
| | | <groupId>org.apache.shiro</groupId> |
| | |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </parent> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.tianyiyun</groupId> |
| | | <artifactId>zob</artifactId> |
| | | <version>1.0</version> |
| | | <scope>system</scope> |
| | | <!--æ¬å°çjacob.jarçè·¯å¾--> |
| | | <systemPath>${project.basedir}/lib/zos-sdk.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.40</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | | <maven.compiler.target>8</maven.compiler.target> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.common; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.FtpUtil; |
| | | import com.doumee.core.utils.tyyun.TyyZosUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | import org.springframework.web.multipart.commons.CommonsMultipartResolver; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.imageio.stream.ImageOutputStream; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.*; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.*; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Api(tags = "å
Œ
±æ¥å£") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/public") |
| | | @Slf4j |
| | | public class PublicController extends BaseController { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | public static FtpUtil ftp = null; |
| | | |
| | | @ApiOperation(value = "ä¸ä¼ ", notes = "ä¸ä¼ ", httpMethod = "POST", position = 6) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "folder", value = "æä»¶å¤¹", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class), |
| | | }) |
| | | @PostMapping(value = "/upload", headers = "content-type=multipart/form-data") |
| | | public void uploadMobile(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | upload(multipartRequest, response, folder + "/", |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.BUCKETNAME).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_ID).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_KEY).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ENDPOINT).getCode()); |
| | | } |
| | | |
| | | |
| | | public void upload(HttpServletRequest request, HttpServletResponse response, String folder, String bucketName, |
| | | String access_id, String access_key, String resourcePath, String endpoint) throws Exception { |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html;charset=UTF-8"); |
| | | Map<String, Object> context = new HashMap<>(); |
| | | CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver(); |
| | | if (multipartResovler.isMultipart(request)) { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | Iterator<String> it = multipartRequest.getFileNames(); |
| | | while (it.hasNext()) { |
| | | MultipartFile file = multipartRequest.getFile((String) it.next());// file |
| | | // multipartRequest.getFile((String) |
| | | // it.next()); |
| | | if (file != null) { |
| | | // 1ãä¸ä¼ å°æå¡å¨ä¸´æ¶æä»¶å¤¹ |
| | | String uploadFileName = file.getOriginalFilename(); |
| | | String originname = uploadFileName; |
| | | if (originname.lastIndexOf("/") >= 0) { |
| | | originname = originname.substring(originname.lastIndexOf("/") + 1); |
| | | } |
| | | String nfix = "";// åç¼å |
| | | if (StringUtils.isNotBlank(uploadFileName)) { |
| | | nfix = uploadFileName.substring(uploadFileName.lastIndexOf(".")); |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".exe")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".exe\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".dll")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".dll\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | if (StringUtils.equalsIgnoreCase(nfix, ".so")) { |
| | | context.put("code", 4000); |
| | | context.put("message", "对ä¸èµ·ï¼æä»¶æ ¼å¼\".so\"ä¸ä¼ æè¯¯ï¼"); |
| | | return; |
| | | } |
| | | String nowDate = DateUtil.getNowShortDate();// å½åæ¶é´ï¼å¹´ææ¥ï¼ |
| | | String fileName = UUID.randomUUID().toString() + nfix; |
| | | String tempFileName = nowDate + "/" + fileName; |
| | | String key = folder + tempFileName;// æä»¶å |
| | | TyyZosUtil obs = new TyyZosUtil(endpoint,access_id, access_key); |
| | | if (obs.uploadInputstreamObject(file.getInputStream(),bucketName, key)) { |
| | | // ç§»å¨æå,è¿åæä»¶å |
| | | // sendSuccessMessage(response, resourcePath+key); |
| | | context.put("success", true); |
| | | context.put("code", 200); |
| | | context.put("errno",0); |
| | | JSONObject fileJSON = new JSONObject(); |
| | | fileJSON.put("url", resourcePath + key); |
| | | fileJSON.put("imgaddr", tempFileName); |
| | | fileJSON.put("imgname", fileName); |
| | | fileJSON.put("originname", originname); |
| | | context.put("data",fileJSON); |
| | | context.put("message","è¯·æ±æå"); |
| | | writerJson(response, context); |
| | | return; |
| | | } else { |
| | | // ç§»å¨å¤±è´¥ |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | context.put("code", 0); |
| | | context.put("message", "ä¸ä¼ 失败"); |
| | | context.put("errno",0); |
| | | writerJson(response, context); |
| | | return; |
| | | } |
| | | |
| | | public static void writerJson(HttpServletResponse response, Object object) { |
| | | response.setContentType("application/json"); |
| | | writer(response, JSONObject.toJSONString(object)); |
| | | } |
| | | |
| | | private static void writer(HttpServletResponse response, String str) { |
| | | try { |
| | | StringBuffer result = new StringBuffer(); |
| | | //设置页é¢ä¸ç¼å |
| | | response.setHeader("Pragma", "No-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | response.setCharacterEncoding("UTF-8"); |
| | | PrintWriter out = null; |
| | | out = response.getWriter(); |
| | | out.print(str); |
| | | out.flush(); |
| | | out.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | void sort(UpdateSortDTO dto); |
| | | |
| | | String updateQywxToken(); |
| | | |
| | | void updateByIdNew(SystemDictData systemDictData); |
| | | SystemDictData queryByCode(String dicCode, String label); |
| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.qiyeweixin.QywxUtil; |
| | | import com.doumee.dao.common.dto.UpdateSortDTO; |
| | | import com.doumee.dao.system.model.SystemDict; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | |
| | | @Override |
| | | public void updateById(SystemDictData systemDictData) { |
| | | systemDictDataService.updateById(systemDictData); |
| | | } |
| | | |
| | | @Override |
| | | public String updateQywxToken(){ |
| | | String corpid = queryByCode(Constants.QYWX,Constants.QYWX_CORPID).getCode(); |
| | | String secret = queryByCode(Constants.QYWX,Constants.QYWX_SECRET).getCode(); |
| | | String token = QywxUtil.getAccessToken(corpid,secret); |
| | | SystemDictData dictData = queryByCode(Constants.QYWX,Constants.QYWX_TOKEN); |
| | | if (dictData != null ) { |
| | | dictData.setCode(token); |
| | | dictData.setUpdateTime(new Date()); |
| | | systemDictDataService.updateById(dictData); |
| | | String ticket = QywxUtil.getJsApiTicket(token); |
| | | SystemDictData ticketDictData = queryByCode(Constants.QYWX,Constants.QYWX_JS_API_TICKET); |
| | | if (dictData != null ) { |
| | | ticketDictData.setCode(ticket); |
| | | ticketDictData.setUpdateTime(new Date()); |
| | | systemDictDataService.updateById(ticketDictData); |
| | | } |
| | | } |
| | | return token; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.vo.WebLoginUserVO; |
| | | import io.jsonwebtoken.Jwts; |
| | | import io.jsonwebtoken.SignatureAlgorithm; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | /** |
| | | * çætoken令ç |
| | | * |
| | | * @param member 令ç䏿ºå¸¦çéå ä¿¡æ¯ |
| | | * @param webLoginUser 令ç䏿ºå¸¦çéå ä¿¡æ¯ |
| | | * @return 令tokenç |
| | | */ |
| | | public String generateToken(Member member) { |
| | | if(member == null){ |
| | | public String generateToken(WebLoginUserVO webLoginUser) { |
| | | if(webLoginUser == null){ |
| | | return null; |
| | | } |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("id",member.getId()); |
| | | return generateTokenDo(member); |
| | | return generateTokenDo(webLoginUser); |
| | | } |
| | | |
| | | |
| | | public Member getUserInfoByToken(String token) { |
| | | public WebLoginUserVO getUserInfoByToken(String token) { |
| | | try { |
| | | Member member = getClaimsFromToken(token); |
| | | return member; |
| | | WebLoginUserVO userVO = getClaimsFromToken(token); |
| | | return userVO; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | * |
| | | * @return 令ç |
| | | */ |
| | | private String generateTokenDo(Member member) { |
| | | private String generateTokenDo(WebLoginUserVO webLoginUser) { |
| | | Map<String, Object> claims = new HashMap<>(); |
| | | claims.put("id",member.getId()); |
| | | claims.put("id",webLoginUser.getId()); |
| | | Date expirationDate = new Date(System.currentTimeMillis() + jwtProperties.getExpiration()); |
| | | String token = Jwts.builder().setClaims(claims) |
| | | .setExpiration(expirationDate) |
| | | .signWith(SignatureAlgorithm.HS512, jwtProperties.getSecret()) |
| | | .compact(); |
| | | redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,JSONObject.toJSONString(member) |
| | | // , jwtProperties.getExpiration(), TimeUnit.MILLISECONDS |
| | | ); |
| | | redisTemplate.opsForValue().set(Constants.REDIS_TOKEN_KEY+token,JSONObject.toJSONString(webLoginUser)); |
| | | return token; |
| | | } |
| | | |
| | |
| | | * @param token 令ç |
| | | * @return æ°æ®å£°æ |
| | | */ |
| | | private Member getClaimsFromToken(String token) { |
| | | Member claims; |
| | | private WebLoginUserVO getClaimsFromToken(String token) { |
| | | WebLoginUserVO claims; |
| | | try { |
| | | String userInfo = (String) redisTemplate.opsForValue().get(Constants.REDIS_TOKEN_KEY+token); |
| | | claims = JSONObject.toJavaObject(JSONObject.parseObject(userInfo),Member.class); |
| | | claims = JSONObject.toJavaObject(JSONObject.parseObject(userInfo),WebLoginUserVO.class); |
| | | } catch (Exception e) { |
| | | claims = null; |
| | | } |
| | |
| | | package com.doumee.config.jwt; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.vo.WebLoginUserVO; |
| | | import io.jsonwebtoken.JwtException; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public Boolean checkLogin(HttpServletRequest request, HttpServletResponse response){ |
| | | String token = request.getHeader(JwtTokenUtil.HEADER_KEY); |
| | | try { |
| | | Member member = jwtTokenUtil.getUserInfoByToken(token); |
| | | if(Objects.isNull(member)){ |
| | | WebLoginUserVO webLoginUserVO = jwtTokenUtil.getUserInfoByToken(token); |
| | | if(Objects.isNull(webLoginUserVO)){ |
| | | throw new BusinessException(ResponseStatus.TOKEN_EXCEED_TIME.getCode(),"é¿æ¶é´æªæä½,è¯·éæ°ç»å½"); |
| | | } |
| | | Integer isDeleted = dao.queryForObject(" select COALESCE(DELETED,1) from member where id = ?", Integer.class, member.getId()); |
| | | if(isDeleted.equals(Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·å·²å é¤,请è系管çå"); |
| | | } |
| | | Integer count = dao.queryForObject("select count(1) from member where id = ?", Integer.class, member.getId()); |
| | | if (count != null && count > 0) { |
| | | // jwtTokenUtil.refreshToken(token,member); |
| | | request.setAttribute(JwtTokenUtil.MEMBER_INFO, JSONObject.toJSONString(member)); |
| | | request.setAttribute(JwtTokenUtil.MEMBER_ID, member.getId()); |
| | | return true; |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"ç¨æ·ä¿¡æ¯åºé"); |
| | | } |
| | | request.setAttribute(JwtTokenUtil.MEMBER_INFO, JSONObject.toJSONString(webLoginUserVO)); |
| | | request.setAttribute(JwtTokenUtil.MEMBER_ID, webLoginUserVO.getId()); |
| | | return true; |
| | | } catch (IllegalArgumentException | JwtException e) { |
| | | throw new BusinessException(ResponseStatus.BE_OVERDUE.getCode(),"æªç»å½"); |
| | | } |
| | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.XSSFPictureData; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | * æ é¢è¡å· |
| | | */ |
| | | private CellType changeType; |
| | | |
| | | private Map<String, XSSFPictureData> pictureList; |
| | | /** |
| | | * æé 彿° |
| | | * @param--path 导å
¥æä»¶ï¼è¯»å第ä¸ä¸ªå·¥ä½è¡¨ |
| | |
| | | this.sheet = this.wb.getSheetAt(sheetIndex); |
| | | this.headerNum = headerNum; |
| | | this.changeType = cellType; |
| | | this.pictureList = ExcelPictureUtil.getExcelPictures(in); |
| | | log.debug("Initialize success."); |
| | | } |
| | | |
| | |
| | | } |
| | | return val; |
| | | } |
| | | public Map<String,XSSFPictureData> getExcelPictures(){ |
| | | return this.pictureList; |
| | | } |
| | | |
| | | /** |
| | | * è·å导å
¥æ°æ®å表 |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.annotation.excel; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.XML; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.map.HashedMap; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.openxml4j.opc.PackagePartName; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.apache.poi.xssf.usermodel.*; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipInputStream; |
| | | |
| | | |
| | | /** |
| | | * @author bianhl |
| | | * @version 1.0 |
| | | * @description è·åå¾çèµæº |
| | | * @date 2024å¹´4æ28æ¥08:44:42 |
| | | */ |
| | | @Slf4j |
| | | public class ExcelPictureUtil { |
| | | |
| | | public static Map<String, XSSFPictureData> getExcelPictures(InputStream is) { |
| | | try { |
| | | byte[] fileData = getFileStream(is); |
| | | Map<String, XSSFPictureData> pictures = getPictures(fileData); |
| | | pictures.forEach((id, xssfPictureData) -> { |
| | | System.out.println("idï¼" + id); |
| | | String fileName = xssfPictureData.getPackagePart().getPartName().getName(); |
| | | System.out.println("fileNameï¼" + fileName); |
| | | }); |
| | | return pictures; |
| | | }catch (Exception e){ |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * è·åæµ®å¨å¾çï¼ä»¥ map å½¢å¼è¿åï¼é®ä¸ºè¡åæ ¼å¼ x-yã |
| | | * |
| | | * @param xssfSheet WPS å·¥ä½è¡¨ |
| | | * @return æµ®å¨å¾çç map |
| | | */ |
| | | public static Map<String, XSSFPictureData> getFloatingPictures(XSSFSheet xssfSheet) { |
| | | Map<String, XSSFPictureData> mapFloatingPictures = new HashMap<>(); |
| | | XSSFDrawing drawingPatriarch = xssfSheet.getDrawingPatriarch(); |
| | | if (drawingPatriarch != null) { |
| | | List<XSSFShape> shapes = drawingPatriarch.getShapes(); |
| | | for (XSSFShape shape : shapes) { |
| | | if (shape instanceof XSSFPicture ) { |
| | | XSSFPicture picture = (XSSFPicture)shape; |
| | | XSSFClientAnchor anchor = (XSSFClientAnchor) picture.getAnchor(); |
| | | XSSFPictureData pictureData = picture.getPictureData(); |
| | | String key = anchor.getRow1() + "-" + anchor.getCol1(); |
| | | mapFloatingPictures.put(key, pictureData); |
| | | } |
| | | } |
| | | } |
| | | return mapFloatingPictures; |
| | | } |
| | | |
| | | /** |
| | | * å¤ç WPS æä»¶ä¸çå¾çæ°æ®ï¼è¿åå¾çä¿¡æ¯ mapã |
| | | * |
| | | * @param stream è¾å
¥æµ |
| | | * @param mapConfig é
ç½®æ å° |
| | | * @return å¾çä¿¡æ¯ç map |
| | | * @throws IOException |
| | | */ |
| | | private static Map<String, XSSFPictureData> processPictures(ByteArrayInputStream stream, Map<String, String> mapConfig) throws IOException { |
| | | Map<String, XSSFPictureData> mapPictures = new HashedMap<>(); |
| | | Workbook workbook = WorkbookFactory.create(stream); |
| | | List<XSSFPictureData> allPictures = (List<XSSFPictureData>) workbook.getAllPictures(); |
| | | for (XSSFPictureData pictureData : allPictures) { |
| | | PackagePartName partName = pictureData.getPackagePart().getPartName(); |
| | | String uri = partName.getURI().toString(); |
| | | if (mapConfig.containsKey(uri)) { |
| | | String strId = mapConfig.get(uri); |
| | | mapPictures.put(strId, pictureData); |
| | | } |
| | | } |
| | | return mapPictures; |
| | | } |
| | | |
| | | /** |
| | | * è·å WPS ææ¡£ä¸çå¾çï¼å
æ¬åµå
¥å¼å¾çåæµ®å¨å¼å¾çã |
| | | * |
| | | * @param data äºè¿å¶æ°æ® |
| | | * @return å¾çä¿¡æ¯ç map |
| | | * @throws IOException |
| | | */ |
| | | public static Map<String, XSSFPictureData> getPictures(byte[] data) { |
| | | try { |
| | | Map<String, String> mapConfig = processZipEntries(new ByteArrayInputStream(data)); |
| | | Map<String, XSSFPictureData> mapPictures = processPictures(new ByteArrayInputStream(data), mapConfig); |
| | | Iterator<Sheet> sheetIterator = WorkbookFactory.create(new ByteArrayInputStream(data)).sheetIterator(); |
| | | while (sheetIterator.hasNext()) { |
| | | mapPictures.putAll(getFloatingPictures((XSSFSheet) sheetIterator.next())); |
| | | } |
| | | return mapPictures; |
| | | } catch (IOException e) { |
| | | return new HashedMap<>(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤ç Zip æä»¶ä¸çæ¡ç®ï¼æ´æ°å¾çé
置信æ¯ã |
| | | * |
| | | * @param stream Zip è¾å
¥æµ |
| | | * @return é
置信æ¯ç map |
| | | * @throws IOException |
| | | */ |
| | | private static Map<String, String> processZipEntries(ByteArrayInputStream stream) throws IOException { |
| | | Map<String, String> mapConfig = new HashedMap<>(); |
| | | ZipInputStream zipInputStream = new ZipInputStream(stream); |
| | | ZipEntry zipEntry; |
| | | while ((zipEntry = zipInputStream.getNextEntry()) != null) { |
| | | try { |
| | | final String fileName = zipEntry.getName(); |
| | | if ("xl/cellimages.xml".equals(fileName)) { |
| | | processCellImages(zipInputStream, mapConfig); |
| | | } else if ("xl/_rels/cellimages.xml.rels".equals(fileName)) { |
| | | return processCellImagesRels(zipInputStream, mapConfig); |
| | | } |
| | | } finally { |
| | | zipInputStream.closeEntry(); |
| | | } |
| | | } |
| | | return new HashedMap<>(); |
| | | } |
| | | |
| | | /** |
| | | * å¤ç Zip æä»¶ä¸ç cellimages.xml æä»¶ï¼æ´æ°å¾çé
置信æ¯ã |
| | | * |
| | | * @param zipInputStream Zip è¾å
¥æµ |
| | | * @param mapConfig é
置信æ¯ç map |
| | | * @throws IOException |
| | | */ |
| | | private static void processCellImages(ZipInputStream zipInputStream, Map<String, String> mapConfig) throws IOException { |
| | | String content = IOUtils.toString(zipInputStream); |
| | | JSONObject jsonObject = XML.toJSONObject(content); |
| | | if (jsonObject != null) { |
| | | JSONObject cellImages = jsonObject.getJSONObject("etc:cellImages"); |
| | | if (cellImages != null) { |
| | | JSONArray cellImageArray = null; |
| | | Object cellImage = cellImages.get("etc:cellImage"); |
| | | if (cellImage != null && cellImage instanceof JSONArray) { |
| | | cellImageArray = (JSONArray) cellImage; |
| | | } else if (cellImage != null && cellImage instanceof JSONObject) { |
| | | JSONObject cellImageObj = (JSONObject) cellImage; |
| | | if (cellImageObj != null) { |
| | | cellImageArray = new JSONArray(); |
| | | cellImageArray.add(cellImageObj); |
| | | } |
| | | } |
| | | if (cellImageArray != null) { |
| | | processImageItems(cellImageArray, mapConfig); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤ç cellImageArray ä¸çå¾çé¡¹ï¼æ´æ°å¾çé
置信æ¯ã |
| | | * |
| | | * @param cellImageArray å¾ç项ç JSONArray |
| | | * @param mapConfig é
置信æ¯ç map |
| | | */ |
| | | private static void processImageItems(JSONArray cellImageArray, Map<String, String> mapConfig) { |
| | | for (int i = 0; i < cellImageArray.size(); i++) { |
| | | JSONObject imageItem = cellImageArray.getJSONObject(i); |
| | | if (imageItem != null) { |
| | | JSONObject pic = imageItem.getJSONObject("xdr:pic"); |
| | | if (pic != null) { |
| | | processPic(pic, mapConfig); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤ç pic ä¸çå¾çä¿¡æ¯ï¼æ´æ°å¾çé
置信æ¯ã |
| | | * |
| | | * @param pic å¾çç JSONObject |
| | | * @param mapConfig é
置信æ¯ç map |
| | | */ |
| | | private static void processPic(JSONObject pic, Map<String, String> mapConfig) { |
| | | JSONObject nvPicPr = pic.getJSONObject("xdr:nvPicPr"); |
| | | if (nvPicPr != null) { |
| | | JSONObject cNvPr = nvPicPr.getJSONObject("xdr:cNvPr"); |
| | | if (cNvPr != null) { |
| | | String name = cNvPr.getStr("name"); |
| | | if (StringUtils.isNotEmpty(name)) { |
| | | String strImageEmbed = updateImageEmbed(pic); |
| | | if (strImageEmbed != null) { |
| | | mapConfig.put(strImageEmbed, name); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·ååµå
¥å¼å¾çç embed ä¿¡æ¯ã |
| | | * |
| | | * @param pic å¾çç JSONObject |
| | | * @return embed ä¿¡æ¯ |
| | | */ |
| | | private static String updateImageEmbed(JSONObject pic) { |
| | | JSONObject blipFill = pic.getJSONObject("xdr:blipFill"); |
| | | if (blipFill != null) { |
| | | JSONObject blip = blipFill.getJSONObject("a:blip"); |
| | | if (blip != null) { |
| | | return blip.getStr("r:embed"); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * å¤ç Zip æä»¶ä¸ç relationship æ¡ç®ï¼æ´æ°é
置信æ¯ã |
| | | * |
| | | * @param zipInputStream Zip è¾å
¥æµ |
| | | * @param mapConfig é
置信æ¯ç map |
| | | * @return é
置信æ¯ç map |
| | | * @throws IOException |
| | | */ |
| | | private static Map<String, String> processCellImagesRels(ZipInputStream zipInputStream, Map<String, String> mapConfig) throws IOException { |
| | | String content = IOUtils.toString(zipInputStream ); |
| | | JSONObject jsonObject = XML.toJSONObject(content); |
| | | JSONObject relationships = jsonObject.getJSONObject("Relationships"); |
| | | if (relationships != null) { |
| | | JSONArray relationshipArray = null; |
| | | Object relationship = relationships.get("Relationship"); |
| | | |
| | | if (relationship != null && relationship instanceof JSONArray) { |
| | | relationshipArray = (JSONArray) relationship; |
| | | } else if (relationship != null && relationship instanceof JSONObject ) { |
| | | JSONObject relationshipObj = (JSONObject) relationship; |
| | | if (relationshipObj != null) { |
| | | relationshipArray = new JSONArray(); |
| | | relationshipArray.add(relationshipObj); |
| | | } |
| | | } |
| | | if (relationshipArray != null) { |
| | | return processRelationships(relationshipArray, mapConfig); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * å¤ç relationshipArray ä¸çå
³ç³»é¡¹ï¼æ´æ°é
置信æ¯ã |
| | | * |
| | | * @param relationshipArray å
³ç³»é¡¹ç JSONArray |
| | | * @param mapConfig é
置信æ¯ç map |
| | | * @return é
置信æ¯ç map |
| | | */ |
| | | private static Map<String, String> processRelationships(JSONArray relationshipArray, Map<String, String> mapConfig) { |
| | | Map<String, String> mapRelationships = new HashedMap<>(); |
| | | for (int i = 0; i < relationshipArray.size(); i++) { |
| | | JSONObject relaItem = relationshipArray.getJSONObject(i); |
| | | if (relaItem != null) { |
| | | String id = relaItem.getStr("Id"); |
| | | String value = "/xl/" + relaItem.getStr("Target"); |
| | | if (mapConfig.containsKey(id)) { |
| | | String strImageId = mapConfig.get(id); |
| | | mapRelationships.put(value, strImageId); |
| | | } |
| | | } |
| | | } |
| | | return mapRelationships; |
| | | } |
| | | |
| | | /** |
| | | * @return {@link byte[]} |
| | | * @description |
| | | * @author bianhl |
| | | * @date 2024/4/26 13:52 |
| | | */ |
| | | private static byte[] getFileStream(InputStream inputStream) { |
| | | // å建 ByteArrayOutputStream æ¥æåæµæ°æ® |
| | | try { |
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int length; |
| | | while ((length = inputStream.read(buffer)) != -1) { |
| | | byteArrayOutputStream.write(buffer, 0, length); |
| | | } |
| | | // å° byteArrayOutputStream çå
容è·å为åèæ°ç» |
| | | return byteArrayOutputStream.toByteArray(); |
| | | } catch (IOException e) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public static final String HWY_OBS_ENDPOINT ="HWY_OBS_ENDPOINT" ; |
| | | public static final String HWY_OBS_BUCKET ="HWY_OBS_BUCKET" ; |
| | | public static final String RESOURCE_PATH ="RESOURCE_PATH" ; |
| | | public static final String ROLE_CONFIG ="ROLE_CONFIG" ; |
| | | |
| | | public static final String QYWX_CORPID = "QYWX_CORPID"; |
| | | public static final String QYWX_SECRET = "QYWX_SECRET"; |
| | | public static final String QYWX_TOKEN = "QYWX_TOKEN"; |
| | |
| | | public static final String AUTO_CONFIRM ="AUTO_CONFIRM" ; |
| | | public static final String AUTO_CANCEL_WAIT_PAY ="AUTO_CANCEL_WAIT_PAY" ; |
| | | |
| | | |
| | | public static final String ACCESS_ID="ACCESS_ID"; |
| | | public static final String BUCKETNAME = "BUCKETNAME"; |
| | | public static final String ACCESS_KEY = "ACCESS_KEY"; |
| | | public static final String ENDPOINT = "ENDPOINT"; |
| | | |
| | | |
| | | public static final String UTF = "UTF-8"; |
| | | public static final String QYWX = "QYWX"; |
| | | public static final Integer ONE = 1; |
| | | public static final Integer TWO = 2; |
| | |
| | | public static final String MEMBER_FILES = "MEMBER_FILES"; |
| | | public static final String CATEGORY_FILES = "CATEGORY_FILES"; |
| | | public static final String ORDERS_FILES = "ORDERS_FILES"; |
| | | public static final String ZBOM_PARAM ="ZBOM_PARAM" ; |
| | | public static final String ZBOM_UK_ERROR_URL ="ZBOM_UK_ERROR_URL" ; |
| | | public static final String ZBOM_TICKET_LOGIN_URL ="ZBOM_TICKET_LOGIN_URL" ; |
| | | public static final String OBJCET_STORAGE = "OBJCET_STORAGE"; |
| | | public static final Object OBJECT_TYPE_CASES = "OBJECT_TYPE_CASES"; |
| | | public static boolean WORKORDER_SHE_EMAIL_SENDING = false; |
| | | public static boolean DEALING_COMPANY_SYNC = false ; |
| | | public static boolean DEALING_MEMBER_SYNC = false ; |
| | |
| | | public static final String WORKORDER_LOG_FILE_PATH ="WORKORDER_LOG_FILE_PATH" ; |
| | | |
| | | public static final String REDIS_TOKEN_KEY = "token_"; |
| | | public static final String CASES_FILES = "CASES_FILES"; |
| | | |
| | | public static final String SUCCESS = "SUCCESS"; |
| | | public static final String FAIL = "FAIL"; |
| | | public static final String CANCELLED = "CANCELLED"; |
| | | |
| | | public interface ZbomConst{ |
| | | String TICKET_LOGIN = "https://sso.zbom.com/esc-idm/api/v1/getUserInfo"; |
| | | String TICKET_LOGIN_TEST = "http://testsso.zhibang.com:8080/esc-idm/api/v1/getUserInfo"; |
| | | } |
| | | |
| | | |
| | | public interface uploadType{ |
| | |
| | | interface CacheKey { |
| | | } |
| | | public interface RedisKeys { |
| | | public static final String ORDER_CODE = "ORDER_CODE"; |
| | | String IMPORTING_RECORD = "IMPORTING_RECORD"; |
| | | String ORDER_CODE = "ORDER_CODE"; |
| | | } |
| | | /** |
| | | * æä½ç±»åï¼ç¨äºåæ¥å£éªè¯åç» |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.utils.tyyun; |
| | | |
| | | import com.amazonaws.ClientConfiguration; |
| | | import com.amazonaws.Protocol; |
| | | import com.amazonaws.auth.AWSCredentials; |
| | | import com.amazonaws.auth.AWSStaticCredentialsProvider; |
| | | import com.amazonaws.auth.BasicAWSCredentials; |
| | | import com.amazonaws.client.builder.AwsClientBuilder; |
| | | import com.amazonaws.services.s3.AmazonS3; |
| | | import com.amazonaws.services.s3.AmazonS3ClientBuilder; |
| | | import com.amazonaws.services.s3.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.io.*; |
| | | import java.net.URL; |
| | | |
| | | @Slf4j |
| | | public class TyyZosUtil { |
| | | |
| | | private AmazonS3 client; |
| | | |
| | | // public static final String ENDPOINT = "oss-cn-shanghai.aliyuncs.com"; |
| | | |
| | | public TyyZosUtil(String END_POINT, String ACCESS_KEY, String SECRET_KEY) { |
| | | try { |
| | | AWSCredentials credentials = new BasicAWSCredentials(ACCESS_KEY,SECRET_KEY); |
| | | ClientConfiguration awsClientConfig = new ClientConfiguration(); |
| | | awsClientConfig.setSignerOverride("AWSS3V4SignerType"); |
| | | awsClientConfig.setProtocol(Protocol.HTTP); |
| | | |
| | | client = AmazonS3ClientBuilder.standard() |
| | | .withCredentials(new |
| | | AWSStaticCredentialsProvider(credentials)) |
| | | .withClientConfiguration(awsClientConfig) |
| | | .withEndpointConfiguration(new |
| | | AwsClientBuilder.EndpointConfiguration(END_POINT, "")) |
| | | .disableChunkedEncoding() |
| | | .enablePathStyleAccess() |
| | | .build(); |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨====================è¿æ¥å¤©ç¿¼äºZOS失败"+e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ æä»¶ |
| | | * |
| | | * @param bucketName äºç«¯åæ¾bucketåç§° |
| | | * @param key éæ°å½åçæä»¶å |
| | | * @param filepath å°è¦ä¸ä¼ çæä»¶åç§° |
| | | * @throws FileNotFoundException |
| | | */ |
| | | |
| | | public void uploadObject(String bucketName, String key, String filepath, |
| | | String mime){ |
| | | try { |
| | | File file= new File(filepath); |
| | | PutObjectRequest request = new PutObjectRequest(bucketName, key, file); |
| | | PutObjectResult result = client.putObject(request); |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨===================="+filepath+"æä»¶ä¸ä¼ 失败"+e.getMessage()); |
| | | }finally { |
| | | shutDown(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 讲keyæä»¶åå¨å¨æ¬å°filenameç®æ æä»¶ä¸ |
| | | * @param bucketName |
| | | * @param key |
| | | * @param filename |
| | | */ |
| | | public void getObject(String bucketName, String key, String filename ){ |
| | | try { |
| | | GetObjectRequest request = new GetObjectRequest(bucketName, key); |
| | | S3Object result = client.getObject(request); |
| | | System.out.print("=====request success=====\n"); |
| | | try { |
| | | InputStream in = result.getObjectContent(); |
| | | File outputFile = new File(filename); |
| | | FileOutputStream outputStream = new |
| | | FileOutputStream(outputFile); |
| | | byte[] read_buf = new byte[1024 * 1024]; |
| | | int read_len = 0; |
| | | while ((read_len = in.read(read_buf)) > 0) { |
| | | outputStream.write(read_buf, 0, read_len); |
| | | } |
| | | in.close(); |
| | | outputStream.close(); |
| | | } catch (IOException e){ |
| | | e.printStackTrace(); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨===================="+filename+"æä»¶è¯»å失败"+e.getMessage()); |
| | | }finally { |
| | | shutDown(); |
| | | } |
| | | } |
| | | public void deleteObject(String bucketName, String key ){ |
| | | try { |
| | | DeleteObjectRequest request = new DeleteObjectRequest(bucketName, key); |
| | | client.deleteObject(request); |
| | | System.out.print("=====request deleteObject success====="); |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨===================="+key+"æä»¶å é¤å¤±è´¥"+e.getMessage()); |
| | | }finally { |
| | | shutDown(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å
³é |
| | | * |
| | | * @throws FileNotFoundException |
| | | */ |
| | | |
| | | public void shutDown() { |
| | | if (client != null) { |
| | | // å
³éclient |
| | | client.shutdown(); |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | TyyZosUtil aLiYunUtil = new TyyZosUtil("", "uc4nnpsqep1i9fijqr37nokh", |
| | | "/rp41xCx/XdGEVCptdH6v7xpc9w="); |
| | | // aLiYunUtil.uploadObject("pongto", "work/li2.txt", "D://å.txt", |
| | | // ".html,.html text/html");D://è£
æºè½¯ä»¶/åå
¬å¦ä¹ |
| | | // aLiYunUtil.partUploadObject("pongto", "work/ps.exe", |
| | | // "D://è£
æºè½¯ä»¶/åå
¬å¦ä¹ /Adobe_Illustrator_CS6_XiaZaiBa.exe", |
| | | // ".html,.html text/html"); |
| | | // aLiYunUtil.deleteBucket("pongto"); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ ç½ç»æä»¶ |
| | | * |
| | | * @param bucketName äºç«¯åæ¾bucketåç§° |
| | | * @param key éæ°å½åçæä»¶å |
| | | * å°è¦ä¸ä¼ çæä»¶åç§° |
| | | * @throws IOException |
| | | */ |
| | | |
| | | public boolean uploadOnlineObject(String url, String bucketName, String key ) { |
| | | try { |
| | | |
| | | InputStream inputStream = new URL(url).openStream(); |
| | | if (inputStream != null) { |
| | | ObjectMetadata metadata = new ObjectMetadata(); |
| | | PutObjectRequest request = new PutObjectRequest(bucketName, key, inputStream,metadata); |
| | | PutObjectResult result = client.putObject(request); |
| | | }else { |
| | | log.error("对象åå¨===================="+url+"ç½ç»æä»¶ä¸ä¼ 失败ï¼ç½ç»æä»¶è¯»å失败"); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨===================="+url+"ç½ç»æä»¶ä¸ä¼ 失败"+e.getMessage()); |
| | | }finally { |
| | | shutDown(); |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | public boolean uploadInputstreamObject(InputStream inputStream, String bucketName, String key ) { |
| | | try { |
| | | |
| | | if (inputStream != null) { |
| | | ObjectMetadata metadata = new ObjectMetadata(); |
| | | metadata.setContentLength(inputStream.available()); |
| | | |
| | | PutObjectRequest request = new PutObjectRequest(bucketName, key, inputStream,metadata); |
| | | request.setCannedAcl(CannedAccessControlList.PublicRead); |
| | | PutObjectResult result = client.putObject(request); |
| | | return true; |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("对象åå¨==================== æä»¶ä¸ä¼ 失败"+e.getMessage()); |
| | | }finally { |
| | | shutDown(); |
| | | } |
| | | return false; |
| | | |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface InterfaceLogMapper extends BaseMapper<InterfaceLog> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å工信æ¯å¯¼å
¥è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("å工信æ¯å¯¼å
¥") |
| | | public class CasesImport { |
| | | |
| | | // @ExcelColumn(name="åºå·",value = "sn") |
| | | private Integer sn; |
| | | |
| | | @ExcelColumn(name="å§å",value = "name",index = 1) |
| | | private String name; |
| | | @ExcelColumn(name="ææºå·",value = "phone",index = 2) |
| | | private String phone; |
| | | |
| | | @ExcelColumn(name="身份è¯å·",value = "idcardNo",index = 3) |
| | | private String idcardNo; |
| | | |
| | | @ExcelColumn(name="ç»ç»åç§°" , value = "companyName" ,index = 4) |
| | | private String companyName; |
| | | |
| | | @ExcelColumn(name="å·¥å·" , value = "code") |
| | | private String code; |
| | | |
| | | @ExcelColumn(name="å²ä½" , value = "code") |
| | | private String positionName; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class LoginRequestNewParam { |
| | | private String appid;// 1 O ææºå·ç |
| | | private String user_name;// 1 M ç¨æ·åId |
| | | private String rediUrl;// 1 M ç»å½è´¦æ·ï¼ |
| | | private String account_no ;//String è´¦å· |
| | | private String scode;//String ç¨æ·å¯¹åºå çåScode |
| | | private List<RoleRequestParam> roles;// 1 M ç»å½å¯ç |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * å工信æ¯å¯¼å
¥è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/01/16 10:03 |
| | | */ |
| | | @Data |
| | | @ApiModel("å工信æ¯å¯¼å
¥") |
| | | public class MemberImport { |
| | | @ExcelColumn(name="å·¥å·",value = "code",index = 1) |
| | | private String code; |
| | | @ExcelColumn(name="å§å",value = "name",index = 2) |
| | | private String name; |
| | | @ExcelColumn(name="èä¸ç
§",value = "imgurl",index = 3) |
| | | private String imgurl; |
| | | @ExcelColumn(name="ç级",value = "levelName",index = 4) |
| | | private String levelName; |
| | | @ExcelColumn(name="æ§å«" , value = "sex" ,index = 5) |
| | | private String sex; |
| | | @ExcelColumn(name="å²ä½" , value = "position",index = 6) |
| | | private String position; |
| | | @ExcelColumn(name="ä»ä¸å¹´ä»½(å¹´)" , value = "jobYear",index = 7) |
| | | private String jobYear; |
| | | @ExcelColumn(name="æå¡æåº", value = "zqNames",index = 8) |
| | | private String zqNames; |
| | | @ExcelColumn(name="åä¸åç±»å", value = "typeNames",index = 9) |
| | | private String typeNames; |
| | | @ExcelColumn(name="æ
é¿é¢å", value = "fieldNames",index = 10) |
| | | private String fieldNames; |
| | | @ExcelColumn(name="æå¡ååºæ°(个)", value = "serveNum",index = 11) |
| | | private String serveNum; |
| | | @ExcelColumn(name="è´¹ç¨æ å(å
/å¨)", value = "fee",index = 12) |
| | | private String fee; |
| | | @ExcelColumn(name="èå¸ç®ä»", value = "fee",index = 13) |
| | | private String info; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class RoleRequestParam { |
| | | private String code;//è§è²ç¼ç |
| | | private String name;// è§è²åç§° |
| | | private String id;//ç¼ç ï¼ |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ExcelColumn(name="åä½åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç±»å:0=åç§é
ç½®ï¼1=车è¾ç±»åé
ç½®ï¼2=餿 é
ç½®ï¼3=æç»è´¹é
ç½®ï¼", example = "1") |
| | | @ExcelColumn(name="ç±»å:0=åç§é
ç½®ï¼1=车è¾ç±»åé
ç½®ï¼2=餿 é
ç½®ï¼3=æç»è´¹é
ç½®ï¼") |
| | | @ApiModelProperty(value = "ç±»å:0=æåº;1=åä¸å;2=æ
é¿é¢å;3=讲å¸ç级;", example = "1") |
| | | @ExcelColumn(name="ç±»å:0=æåº;1=åä¸å;2=æ
é¿é¢å;3=讲å¸ç级;") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "å
容ï¼è½¦è¾è§æ ¼ã餿 ãæç»è´¹æ¯ä¾ï¼") |
| | |
| | | @ExcelColumn(name="æåºç ï¼ååºï¼") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦åºå®è½¦è¾ï¼è½¦è¾ç±»å使ç¨ï¼:0=å¦ï¼1=æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="æ¯å¦åºå®è½¦è¾ï¼è½¦è¾ç±»å使ç¨ï¼:0=å¦ï¼1=æ¯ï¼") |
| | | @ApiModelProperty(value = "æ¯å¦åºå®ï¼:0=å¦ï¼1=æ¯ï¼", example = "1") |
| | | @ExcelColumn(name="æ¯å¦åºå® :0=å¦ï¼1=æ¯ï¼") |
| | | private Integer isFixed; |
| | | @ApiModelProperty(value = "æ¯å¦åºå®è½¦è¾ï¼è½¦è¾ç±»å使ç¨ï¼:0=å¦ï¼1=æ¯ï¼", example = "1") |
| | | @ApiModelProperty(value = "æåæä½äººåï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String updateUserName; |
| | | @ApiModelProperty(value = "餿 çé
置项éå", example = "1") |
| | | @ApiModelProperty(value = "åä¸åå¾ééä»¶éå", example = "1") |
| | | @TableField(exist = false) |
| | | private JSONArray detailList; |
| | | private List<Multifile> fileList; |
| | | @ApiModelProperty(value = "徿 å
¨è·¯å¾") |
| | | @TableField(exist = false) |
| | | private String iconFull; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.dao.business.dto.CasesImport; |
| | | import com.doumee.dao.business.dto.MemberImport; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import org.apache.poi.ss.usermodel.PictureData; |
| | | |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å类信æ¯è¡¨Modelå®ä¹ |
| | | * @author doumee |
| | |
| | | @ApiModelProperty("导å
¥å¤±è´¥è®°å½æ°") |
| | | @ExcelColumn(name="导å
¥å¤±è´¥è®°å½æ°",index=18 ,width=10) |
| | | private Integer errorNum; |
| | | @TableField(exist = false) |
| | | private List<CasesImport> caseList; |
| | | @TableField(exist = false) |
| | | private List<MemberImport> memberList; |
| | | @TableField(exist = false) |
| | | private List<PictureData> pictureDataList; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 䏿¹å¹³å°æ¥å£äº¤äºè®°å½ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Data |
| | | @ApiModel("䏿¹å¹³å°æ¥å£äº¤äºè®°å½") |
| | | @TableName("`interface_log`") |
| | | public class InterfaceLog{ |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0è°ç¨ 1æ¨éæ¥å", example = "1") |
| | | @ExcelColumn(name="ç±»å 0è°ç¨ 1æ¨éæ¥å") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ¥å£åç§°") |
| | | @ExcelColumn(name="æ¥å£åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "å°åä¿¡æ¯") |
| | | @ExcelColumn(name="å°åä¿¡æ¯") |
| | | private String url; |
| | | |
| | | @ApiModelProperty(value = "请æ±åæ°") |
| | | @ExcelColumn(name="请æ±åæ°") |
| | | private String request; |
| | | |
| | | @ApiModelProperty(value = "ååºåæ°") |
| | | @ExcelColumn(name="ååºåæ°") |
| | | private String repose; |
| | | |
| | | @ApiModelProperty(value = "è°ç¨ç»æ 0æå 1失败", example = "1") |
| | | @ExcelColumn(name="è°ç¨ç»æ 0æå 1失败") |
| | | private Integer success; |
| | | |
| | | @ApiModelProperty(value = "å¹³å° 0海康å®é²å¹³å° 1ERPç³»ç»", example = "1") |
| | | @ExcelColumn(name="å¹³å° 0海康å®é²å¹³å° 1ERPç³»ç»") |
| | | private Integer plat; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象类å 0ç»ç» 1人å 2é¨ç¦äºä»¶ 3设å¤", example = "1") |
| | | @ExcelColumn(name="å
³è对象类å 0ç»ç» 1人å 2é¨ç¦äºä»¶ 3设å¤") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象ç¼ç ï¼å¤ä¸ªç¨è±æéå·éå¼ï¼") |
| | | @ExcelColumn(name="å
³è对象ç¼ç ï¼å¤ä¸ªç¨è±æéå·éå¼ï¼") |
| | | private String objId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @TableField(exist = false) |
| | | private Date startDate; |
| | | |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date endDate; |
| | | |
| | | } |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ä¼åä¿¡æ¯è¡¨Modelå®ä¹ |
| | | * @author doumee |
| | |
| | | @ApiModelProperty("åä¸åç±»åç¼ç éåï¼[1],[2],...]ï¼") |
| | | @ExcelColumn(name="åä¸åç±»åç¼ç éåï¼[1],[2],...]ï¼",index=16 ,width=10) |
| | | private String bustypeIds; |
| | | @ApiModelProperty("æ
é¿é¢åéåï¼[1],[2],...]ï¼") |
| | | private String fieldIds; |
| | | @ApiModelProperty("å·¥å·") |
| | | private String code; |
| | | @ApiModelProperty("讲å¸ç级ç¼ç ï¼å
³ècategoryï¼") |
| | | @ExcelColumn(name="讲å¸ç级ç¼ç ï¼å
³ècategoryï¼",index=17 ,width=10) |
| | | private Integer levelId; |
| | |
| | | @ApiModelProperty("导å
¥è®°å½ç¼ç ï¼å
³èimport_record)") |
| | | @ExcelColumn(name="导å
¥è®°å½ç¼ç ï¼å
³èimport_record)",index=28 ,width=10) |
| | | private Integer importId; |
| | | |
| | | @ApiModelProperty("å·¥ä½å¹´æ°") |
| | | @TableField(exist = false) |
| | | private Integer workYears; |
| | | |
| | | @ApiModelProperty("æ
é¿é¢ååç§°") |
| | | @TableField(exist = false) |
| | | private String fieldNames; |
| | | |
| | | @ApiModelProperty("å·¥ä½å²ä½åç§°") |
| | | @TableField(exist = false) |
| | | private String promotionName; |
| | | |
| | | @ApiModelProperty("级å«åç§°") |
| | | @TableField(exist = false) |
| | | private String levelName; |
| | | |
| | | @ApiModelProperty("æåºç¼ç - æ¥è¯¢") |
| | | @TableField(exist = false) |
| | | private String queryZQCode; |
| | | |
| | | @ApiModelProperty("æåºä¿¡æ¯ï¼0=æ¶è´¹ä»é«å°ä½ï¼1=æ¶è´¹ä»ä½å°é«ï¼2=ç级ä»é«å°ä½ï¼3=ç级ä»ä½å°é«ï¼4=æå¡æ°ä»é«å°ä½") |
| | | @TableField(exist = false) |
| | | private Integer orderByType; |
| | | |
| | | @ApiModelProperty("è¯ä»¶ç
§å
¨è·¯å¾") |
| | | @TableField(exist = false) |
| | | private String fullImgurl; |
| | | |
| | | @ApiModelProperty("æ¥è¯¢ç¨æ·ç±»å") |
| | | @TableField(exist = false) |
| | | private String queryUserRole; |
| | | |
| | | @ApiModelProperty("æ
é¿é¢å") |
| | | @TableField(exist = false) |
| | | private List<Category> fieldList; |
| | | |
| | | @ApiModelProperty("æ¡ä¾ä¿¡æ¯") |
| | | @TableField(exist = false) |
| | | private List<Cases> casesList; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "ç±»å0å¾ç 1è§é¢ 2å
¶ä»", example = "1") |
| | | private Integer type; |
| | | |
| | | // @ApiModelProperty(value = "å
³è对象类å 0SHE䏿¥ 1è·ç»æ»ä¸æ¥ 2è·ç»æ»å¤ç 3è·ç»æ»åé
ç©ä¸ä¸»ç®¡ 4è·ç»æ»åé
å¤ç人 5DCAé£é©ä¸æ¥ 6DCAé£é©å¤ç 7DCAå·¥åå¾ç", example = "1") |
| | | // @ExcelExportColumn(name="å
³è对象类å 0SHE䏿¥ 1è·ç»æ»ä¸æ¥ 2è·ç»æ»å¤ç 3è·ç»æ»åé
ç©ä¸ä¸»ç®¡ 4è·ç»æ»åé
å¤ç人 5DCAé£é©ä¸æ¥ 6DCAé£é©å¤ç 7DCAå·¥åå¾ç") |
| | | @ApiModelProperty(value = "å
³è对象类å 0身份ç³è¯·èµæ 1订åéä»¶", example = "1") |
| | | @ApiModelProperty(value = "å
³è对象类å 0åä¸åç±»åå¤å¾ 1æ¡ä¾", example = "1") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å") |
| | |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å") |
| | | @TableField(exist = false) |
| | | private String fileurlFull; |
| | | private String url; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å
ç½æä»¶å°å") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2026/1/28 10:43 |
| | | */ |
| | | @Data |
| | | @ApiModel("H5ç¨æ·è¯·æ±è¿å对象类") |
| | | public class WebLoginUserVO { |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·ä¸»é®") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·è§è²ï¼") |
| | | private String roleType; |
| | | |
| | | @ApiModelProperty(value = "æåºç¼ç ") |
| | | private String zhanqu; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.ImportRecord; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(ImportRecord model); |
| | | ImportRecord importBatch(MultipartFile file, int type ); |
| | | |
| | | void dealImporTask(ImportRecord importRecord); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 䏿¹å¹³å°æ¥å£äº¤äºè®°å½Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface InterfaceLogService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(InterfaceLog interfaceLog); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(InterfaceLog interfaceLog); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(InterfaceLog interfaceLog); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param interfaceLogs å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<InterfaceLog> interfaceLogs); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return InterfaceLog |
| | | */ |
| | | InterfaceLog findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | * @return InterfaceLog |
| | | */ |
| | | InterfaceLog findOne(InterfaceLog interfaceLog); |
| | | void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type); |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | * @return List<InterfaceLog> |
| | | */ |
| | | List<InterfaceLog> findList(InterfaceLog interfaceLog); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<InterfaceLog> |
| | | */ |
| | | PageData<InterfaceLog> findPage(PageWrap<InterfaceLog> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param interfaceLog å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(InterfaceLog interfaceLog); |
| | | |
| | | void clearThreeMonthLog(); |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Member; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(Member model); |
| | | |
| | | Member findDetailById(Integer id,String queryUserRole); |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.MultifileMapper; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.CategoryService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | |
| | | @Autowired |
| | | private CategoryMapper categoryMapper; |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(Category category) { |
| | | // ç±»å:0=æåº;1=åä¸å;2=æ
é¿é¢å;3=讲å¸ç级; |
| | | if(Objects.isNull(category) |
| | | || Objects.isNull(category.getType()) |
| | | || Objects.isNull(category.getName()) |
| | | || (!Constants.equalsInteger(category.getType(),Constants.ZERO)&& CollectionUtils.isEmpty(category.getDetailList())) |
| | | || (Constants.equalsInteger(category.getType(),Constants.ONE) && (Objects.isNull(category.getIcon())||Objects.isNull(category.getIsFixed())) ) |
| | | ){ |
| | | || (Constants.equalsInteger(category.getType(),Constants.ZERO)&& StringUtils.isBlank(category.getDetail())) ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | |
| | | category.setCreateUser(loginUserInfo.getId()); |
| | | category.setUpdateTime(new Date()); |
| | | category.setUpdateUser(loginUserInfo.getId()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(category.getDetailList()) |
| | | && !Constants.equalsInteger(category.getType(),Constants.THREE)){ |
| | | category.setDetail(category.getDetailList().toJSONString()); |
| | | } |
| | | if(!Constants.equalsInteger(category.getType(),Constants.ONE)){ |
| | | category.setIsFixed(Constants.ZERO); |
| | | } |
| | | categoryMapper.insert(category); |
| | | dealBatchMultiFiles(category, category.getFileList(), loginUserInfo,false); |
| | | return category.getId(); |
| | | } |
| | | |
| | | public void dealBatchMultiFiles(Category category, List<Multifile> fileList, LoginUserInfo user,boolean update) { |
| | | Date today = new Date(); |
| | | //æ¸
空åæç |
| | | if(update){ |
| | | multifileMapper.delete(new UpdateWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .eq(Multifile::getObjType,Constants.ZERO) |
| | | .eq(Multifile::getObjId,category.getId())); |
| | | } |
| | | if(fileList!=null && fileList.size()>0){ |
| | | List<Multifile> multifileList = new ArrayList<>(); |
| | | fileList.stream().forEach(s -> { |
| | | if(StringUtils.isNotBlank(s.getFileurl())){ |
| | | s.setIsdeleted(Constants.ZERO); |
| | | s.setCreator(user.getId()); |
| | | s.setCreateDate(today); |
| | | s.setObjId(category.getId()); |
| | | s.setType(Constants.ZERO); |
| | | s.setObjType(Constants.ZERO); |
| | | multifileList.add(s); |
| | | } |
| | | }); |
| | | if(multifileList.size()>0){ |
| | | multifileMapper.insert(multifileList); |
| | | } |
| | | } |
| | | } |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | categoryMapper.update(new UpdateWrapper<Category>().lambda().set(Category::getDeleted,Constants.ONE).eq(Category::getId,id)); |
| | | |
| | | // categoryMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | |
| | | || Objects.isNull(category.getId()) |
| | | || Objects.isNull(category.getType()) |
| | | || Objects.isNull(category.getName()) |
| | | || (!Constants.equalsInteger(category.getType(),Constants.ZERO)&& CollectionUtils.isEmpty(category.getDetailList())) |
| | | || (Constants.equalsInteger(category.getType(),Constants.ONE) && (Objects.isNull(category.getIcon())||Objects.isNull(category.getIsFixed())) ) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | category.setUpdateTime(new Date()); |
| | | category.setIsFixed(null); |
| | | category.setUpdateUser(loginUserInfo.getId()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(category.getDetailList()) |
| | | && !Constants.equalsInteger(category.getType(),Constants.THREE)){ |
| | | category.setDetail(category.getDetailList().toJSONString()); |
| | | } |
| | | categoryMapper.updateById(category); |
| | | dealBatchMultiFiles(category, category.getFileList(), loginUserInfo,true); |
| | | } |
| | | @Override |
| | | public void updateStatus(Category category) { |
| | | if(Objects.isNull(category) |
| | | || Objects.isNull(category.getId())){ |
| | | if(Objects.isNull(category) || Objects.isNull(category.getId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | category.setUpdateTime(new Date()); |
| | | category.setIsFixed(null); |
| | | category.setUpdateUser(loginUserInfo.getId()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(category.getDetailList())){ |
| | | category.setDetail(category.getDetailList().toJSONString()); |
| | | } |
| | | categoryMapper.updateById(category); |
| | | } |
| | | |
| | |
| | | if(Objects.isNull(category)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(StringUtils.isNotBlank(category.getDetail())){ |
| | | category.setDetailList(JSONArray.parseArray(category.getDetail())); |
| | | } |
| | | if(StringUtils.isNotBlank(category.getIcon())){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CATEGORY_FILES).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.CATEGORY_FILES).getCode(); |
| | | category.setIconFull(path + category.getIcon()); |
| | | } |
| | | return category; |
| | |
| | | |
| | | @Override |
| | | public List<Category> findList(Category category) { |
| | | category.setDeleted(Constants.ZERO); |
| | | QueryWrapper<Category> wrapper = new QueryWrapper<>(category); |
| | | return categoryMapper.selectList(wrapper); |
| | | } |
| | |
| | | queryWrapper.orderByAsc(Category::getSortnum); |
| | | PageData<Category> result =PageData.from(categoryMapper.selectJoinPage(page, Category.class,queryWrapper)); |
| | | if(result!=null && result.getRecords()!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CATEGORY_FILES).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.CATEGORY_FILES).getCode(); |
| | | for(Category cate : result.getRecords()){ |
| | | try { |
| | | if(StringUtils.isNotBlank(cate.getDetail())){ |
| | | cate.setDetailList(JSONArray.parseArray(cate.getDetail())); |
| | | } |
| | | if(StringUtils.isNotBlank(cate.getIcon())){ |
| | | cate.setIconFull(path + cate.getIcon()); |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | if(Constants.equalsInteger(cate.getType(),Constants.ONE) ){ |
| | | initMultifileList(cate); |
| | | } |
| | | if(StringUtils.isNotBlank(cate.getIcon())){ |
| | | cate.setIconFull(path + cate.getIcon()); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | private void initMultifileList(Category cate) { |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | |
| | | Multifile find = new Multifile(); |
| | | find.setObjId(cate.getId()); |
| | | find.setObjType(Constants.ZERO); |
| | | find.setIsdeleted(Constants.ZERO); |
| | | List<Multifile> fileList= multifileMapper.selectList(new QueryWrapper<>(find)); |
| | | if(fileList!=null){ |
| | | for(Multifile f : fileList){ |
| | | if(StringUtils.isNotBlank(f.getFileurl())){ |
| | | f.setUrl(path+f.getFileurl()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | cate.setFileList(fileList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CATEGORY_FILES).getCode(); |
| | | for (Category category:categoryList) { |
| | | if(StringUtils.isNotBlank(category.getDetail())){ |
| | | category.setDetailList(JSONArray.parseArray(category.getDetail())); |
| | | } |
| | | if(StringUtils.isNotBlank(category.getIcon())){ |
| | | category.setIconFull(path + category.getIcon()); |
| | | } |
| | | if(Constants.equalsInteger(category.getType(),Constants.ONE) ){ |
| | | initMultifileList(category); |
| | | } |
| | | } |
| | | } |
| | | return categoryList; |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.dto.CasesImport; |
| | | import com.doumee.dao.business.dto.MemberImport; |
| | | import com.doumee.dao.business.model.ImportRecord; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ImportRecordMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.ImportRecordService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * å类信æ¯è¡¨Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private ImportRecordMapper importRecordMapper; |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Override |
| | | public Integer create(ImportRecord importRecord) { |
| | | if(StringUtils.isBlank(importRecord.getImgurl())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | importRecord.setDeleted(Constants.ZERO); |
| | | importRecord.setStatus(Constants.ZERO); |
| | | importRecord.setCreateTime(new Date()); |
| | | importRecord.setCreateUser(loginUserInfo.getId()); |
| | | importRecord.setUpdateTime(new Date()); |
| | | importRecord.setUpdateUser(loginUserInfo.getId()); |
| | | importRecordMapper.insert(importRecord); |
| | | return importRecord.getId(); |
| | | } |
| | |
| | | QueryWrapper<ImportRecord> wrapper = new QueryWrapper<>(importRecord); |
| | | return importRecordMapper.selectCount(wrapper); |
| | | } |
| | | @Override |
| | | public ImportRecord importBatch(MultipartFile file,int type ){ |
| | | Boolean importing = (Boolean) redisTemplate.opsForValue().get(Constants.RedisKeys.IMPORTING_RECORD); |
| | | if(importing!=null && importing){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å·²åå¨å¯¼å
¥ä»»å¡æ£å¨æ§è¡ä¸ï¼è¯·ç¨ååè¯ï¼"); |
| | | } |
| | | redisTemplate.opsForValue().set(Constants.RedisKeys.IMPORTING_RECORD,true,30, TimeUnit.MINUTES); |
| | | try { |
| | | ImportRecord model = new ImportRecord(); |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | model.setDeleted(Constants.ZERO); |
| | | model.setStatus(Constants.ONE);//弿¥å¤çä¸ |
| | | model.setCreateTime(new Date()); |
| | | model.setCreateUser(loginUserInfo.getId()); |
| | | model.setUpdateTime(model.getCreateTime()); |
| | | model.setUpdateUser(loginUserInfo.getId()); |
| | | model.setType(type); |
| | | model.setTitle((type==1?"æ¡ä¾ä¿¡æ¯æ¹é导å
¥":"èå¸ä¿¡æ¯æ¹é导å
¥")+ DateUtil.getPlusTime2(model.getCreateTime())); |
| | | model.setTotalNum(0); |
| | | ExcelImporter ie= new ExcelImporter(file,0,0, CellType.STRING); // ç¡®ä¿åå
æ ¼ç±»å为å符串); |
| | | if(type == 1) { |
| | | model.setCaseList(ie.getDataList(CasesImport.class,null)); |
| | | if(model.getCaseList() ==null || model.getCaseList().size()==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"导å
¥æä»¶æ¡ä¾ä¿¡æ¯å
容为空ï¼"); |
| | | } |
| | | model.setTotalNum(model.getCaseList().size()); |
| | | }else{ |
| | | model.setMemberList(ie.getDataList(MemberImport.class,null)); |
| | | if(model.getMemberList() ==null || model.getMemberList().size()==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"导å
¥æä»¶èå¸ä¿¡æ¯å
容为空ï¼"); |
| | | } |
| | | model.setTotalNum(model.getMemberList().size()); |
| | | } |
| | | // model.setPictureDataList(ie); |
| | | importRecordMapper.insert(model); |
| | | return model; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æä»¶ä¿¡æ¯è¯»å失败ï¼è¯·æ£æ¥æä»¶å
容åéè¯ï¼"); |
| | | }finally { |
| | | redisTemplate.delete(Constants.RedisKeys.IMPORTING_RECORD); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 弿¥æ§è¡æä»¶ä»»å¡ |
| | | * @param importRecord |
| | | */ |
| | | @Override |
| | | @Async |
| | | public void dealImporTask(ImportRecord importRecord){ |
| | | int success = 0; |
| | | if(Constants.equalsInteger(importRecord.getType(),0)){ |
| | | dealUserImportBiz(importRecord); |
| | | }else{ |
| | | dealCaseImportBiz(importRecord); |
| | | } |
| | | importRecord.setStatus(Constants.TWO); |
| | | importRecord.setUpdateTime(new Date()); |
| | | importRecordMapper.updateById(importRecord); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å¤çæ¡ä¾å¯¼å
¥ä»»å¡ |
| | | * @param importRecord |
| | | */ |
| | | |
| | | private int dealCaseImportBiz(ImportRecord importRecord) { |
| | | int success=0; |
| | | String msg =""; |
| | | try { |
| | | for(CasesImport param:importRecord.getCaseList()){ |
| | | |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | importRecord.setDoneNum(success); |
| | | importRecord.setErrorNum(importRecord.getTotalNum() - success); |
| | | return success; |
| | | } |
| | | |
| | | /** |
| | | * å¤ç人å导å
¥è®°å½ |
| | | * @param importRecord |
| | | */ |
| | | private int dealUserImportBiz(ImportRecord importRecord) { |
| | | int success=0; |
| | | String msg = ""; |
| | | try { |
| | | for(MemberImport param:importRecord.getMemberList()){ |
| | | |
| | | } |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | importRecord.setDoneNum(success); |
| | | importRecord.setErrorNum(importRecord.getTotalNum() - success); |
| | | importRecord.setDetail(msg); |
| | | |
| | | return success; |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.InterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 䏿¹å¹³å°æ¥å£äº¤äºè®°å½Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | public class InterfaceLogServiceImpl implements InterfaceLogService { |
| | | |
| | | @Autowired |
| | | private InterfaceLogMapper interfaceLogMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | public Integer create(InterfaceLog interfaceLog) { |
| | | interfaceLogMapper.insert(interfaceLog); |
| | | return interfaceLog.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | interfaceLogMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(InterfaceLog interfaceLog) { |
| | | UpdateWrapper<InterfaceLog> deleteWrapper = new UpdateWrapper<>(interfaceLog); |
| | | interfaceLogMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | interfaceLogMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(InterfaceLog interfaceLog) { |
| | | interfaceLogMapper.updateById(interfaceLog); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<InterfaceLog> interfaceLogs) { |
| | | if (CollectionUtils.isEmpty(interfaceLogs)) { |
| | | return; |
| | | } |
| | | for (InterfaceLog interfaceLog: interfaceLogs) { |
| | | this.updateById(interfaceLog); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public InterfaceLog findById(Integer id) { |
| | | return interfaceLogMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public InterfaceLog findOne(InterfaceLog interfaceLog) { |
| | | QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog); |
| | | return interfaceLogMapper.selectOne(wrapper); |
| | | } |
| | | @Override |
| | | public void saveInterfaceLog(String url,String name,String param,Integer success,String respone,int type){ |
| | | if(interfaceLogMapper ==null){ |
| | | return; |
| | | } |
| | | InterfaceLog log = new InterfaceLog(); |
| | | log.setCreateDate(new Date()); |
| | | log.setUrl(url); |
| | | log.setEditDate(log.getCreateDate()); |
| | | log.setPlat(Constants.ZERO); |
| | | log.setName(name); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setRequest(param); |
| | | log.setType(type); |
| | | log.setSuccess(success); |
| | | log.setRepose(respone); |
| | | interfaceLogMapper.insert(log); |
| | | } |
| | | |
| | | @Override |
| | | public List<InterfaceLog> findList(InterfaceLog interfaceLog) { |
| | | QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog); |
| | | return interfaceLogMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<InterfaceLog> findPage(PageWrap<InterfaceLog> pageWrap) { |
| | | IPage<InterfaceLog> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<InterfaceLog> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(InterfaceLog::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(InterfaceLog::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(InterfaceLog::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(InterfaceLog::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | |
| | | if (pageWrap.getModel().getStartDate() != null) { |
| | | queryWrapper.lambda().ge(InterfaceLog::getCreateDate, pageWrap.getModel().getStartDate()); |
| | | } |
| | | if (pageWrap.getModel().getEndDate() != null) { |
| | | queryWrapper.lambda().le(InterfaceLog::getCreateDate, pageWrap.getModel().getEndDate()); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getType() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getType, pageWrap.getModel().getType()); |
| | | } |
| | | if (pageWrap.getModel().getName() != null) { |
| | | queryWrapper.lambda().like(InterfaceLog::getName, pageWrap.getModel().getName()); |
| | | } |
| | | if (pageWrap.getModel().getUrl() != null) { |
| | | queryWrapper.lambda().like(InterfaceLog::getUrl, pageWrap.getModel().getUrl()); |
| | | } |
| | | if (pageWrap.getModel().getRequest() != null) { |
| | | queryWrapper.lambda().like(InterfaceLog::getRequest, pageWrap.getModel().getRequest()); |
| | | } |
| | | if (pageWrap.getModel().getRepose() != null) { |
| | | queryWrapper.lambda().like(InterfaceLog::getRepose, pageWrap.getModel().getRepose()); |
| | | } |
| | | if (pageWrap.getModel().getSuccess() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getSuccess, pageWrap.getModel().getSuccess()); |
| | | } |
| | | if (pageWrap.getModel().getPlat() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getPlat, pageWrap.getModel().getPlat()); |
| | | } |
| | | if (pageWrap.getModel().getObjType() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getObjType, pageWrap.getModel().getObjType()); |
| | | } |
| | | if (pageWrap.getModel().getObjId() != null) { |
| | | queryWrapper.lambda().eq(InterfaceLog::getObjId, pageWrap.getModel().getObjId()); |
| | | } |
| | | queryWrapper.lambda().orderByDesc(InterfaceLog::getCreateDate); |
| | | return PageData.from(interfaceLogMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(InterfaceLog interfaceLog) { |
| | | QueryWrapper<InterfaceLog> wrapper = new QueryWrapper<>(interfaceLog); |
| | | return interfaceLogMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void clearThreeMonthLog() { |
| | | int days =15; |
| | | try { |
| | | // days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HK_LOG_DEL_DAYS_LIMIT).getCode()); |
| | | }catch (Exception e){} |
| | | interfaceLogMapper.delete(new UpdateWrapper<InterfaceLog>().lambda() |
| | | .apply("to_days(create_date)+"+days+" < to_days(now())") ); |
| | | } |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CasesMapper; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.MultifileMapper; |
| | | import com.doumee.dao.business.model.Cases; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Multifile; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * ä¼åä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private CategoryMapper categoryMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CasesMapper casesMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Override |
| | | public Integer create(Member member) { |
| | |
| | | @Override |
| | | public PageData<Member> findPage(PageWrap<Member> pageWrap) { |
| | | IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<Member> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getId() != null,Member::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getDeleted() != null,Member::getDeleted, pageWrap.getModel().getDeleted()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getCreateUser() != null,Member::getCreateUser, pageWrap.getModel().getCreateUser()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().ge(Member::getCreateTime, Utils.Date.getStart(pageWrap.getModel().getCreateTime())); |
| | | queryWrapper.lambda().le(Member::getCreateTime, Utils.Date.getEnd(pageWrap.getModel().getCreateTime())); |
| | | } |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getUpdateUser() != null,Member::getUpdateUser, pageWrap.getModel().getUpdateUser()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().ge(Member::getUpdateTime, Utils.Date.getStart(pageWrap.getModel().getUpdateTime())); |
| | | queryWrapper.lambda().le(Member::getUpdateTime, Utils.Date.getEnd(pageWrap.getModel().getUpdateTime())); |
| | | } |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getRemark() != null,Member::getRemark, pageWrap.getModel().getRemark()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getImgurl() != null,Member::getImgurl, pageWrap.getModel().getImgurl()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getDingdingId() != null,Member::getDingdingId, pageWrap.getModel().getDingdingId()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getPhone() != null,Member::getPhone, pageWrap.getModel().getPhone()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getName() != null,Member::getName, pageWrap.getModel().getName()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getSex() != null,Member::getSex, pageWrap.getModel().getSex()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getJobYear() != null,Member::getJobYear, pageWrap.getModel().getJobYear()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getPositon() != null,Member::getPositon, pageWrap.getModel().getPositon()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getZhanquIds() != null,Member::getZhanquIds, pageWrap.getModel().getZhanquIds()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getBustypeIds() != null,Member::getBustypeIds, pageWrap.getModel().getBustypeIds()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getLevelId() != null,Member::getLevelId, pageWrap.getModel().getLevelId()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getStatus() != null,Member::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getFee() != null,Member::getFee, pageWrap.getModel().getFee()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getServeNum() != null,Member::getServeNum, pageWrap.getModel().getServeNum()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getType() != null,Member::getType, pageWrap.getModel().getType()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getContent() != null,Member::getContent, pageWrap.getModel().getContent()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().ge(Member::getLoginDate, Utils.Date.getStart(pageWrap.getModel().getLoginDate())); |
| | | queryWrapper.lambda().le(Member::getLoginDate, Utils.Date.getEnd(pageWrap.getModel().getLoginDate())); |
| | | } |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getLoginCount() != null,Member::getLoginCount, pageWrap.getModel().getLoginCount()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getSortnum() != null,Member::getSortnum, pageWrap.getModel().getSortnum()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getUsername() != null,Member::getUsername, pageWrap.getModel().getUsername()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getAddType() != null,Member::getAddType, pageWrap.getModel().getAddType()); |
| | | queryWrapper.lambda().eq(pageWrap.getModel().getImportId() != null,Member::getImportId, pageWrap.getModel().getImportId()); |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | Member model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(Member.class) |
| | | .select(" c1.NAME ", Member::getPromotionName) |
| | | .select(" c2.NAME ", Member::getLevelName) |
| | | .leftJoin(" category c1 on t.POSITON = c1.id ") |
| | | .leftJoin(" category c2 on t.LEVEL_ID = c2.id ") |
| | | .apply(Objects.nonNull(model.getBustypeIds())," find_in_set( '["+model.getBustypeIds()+"]', t.BUSTYPE_IDS ) ") |
| | | .like(StringUtils.isNotBlank(model.getName()),Member::getName, model.getName()) |
| | | .eq(Objects.nonNull(model.getStatus()),Member::getStatus, model.getStatus()) |
| | | .orderByAsc(Objects.isNull(model.getOrderByType()),"c2.DETAIL") |
| | | .orderByDesc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.ZERO),Member::getFee) |
| | | .orderByAsc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.ONE),Member::getFee) |
| | | .orderByDesc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.TWO),"c2.DETAIL") |
| | | .orderByAsc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.THREE),"c2.DETAIL") |
| | | .orderByDesc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.FOUR),Member::getServeNum) |
| | | ; |
| | | if(StringUtils.isNotBlank(model.getFieldIds())){ |
| | | String [] fieldIds = model.getFieldIds().split(","); |
| | | for (String s:fieldIds) { |
| | | queryWrapper.apply("find_in_set( '["+s+"]' , t.FIELD_IDS )"); |
| | | } |
| | | } |
| | | return PageData.from(memberMapper.selectPage(page, queryWrapper)); |
| | | if (StringUtils.isNotBlank(model.getQueryZQCode())) { |
| | | Category zhanqu = categoryMapper.selectOne(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getDeleted,Constants.ZERO) |
| | | .eq(Category::getStatus,Constants.ZERO) |
| | | .eq(Category::getDetail,model.getQueryZQCode()) |
| | | .last(" limit 1") |
| | | ); |
| | | if(Objects.nonNull(zhanqu)){ |
| | | queryWrapper.apply(" find_in_set( '["+zhanqu.getId()+"]', t.ZHANQU_IDS ) "); |
| | | } |
| | | } |
| | | IPage<Member> memberIPage = memberMapper.selectJoinPage(page, Member.class, new MPJLambdaWrapper<>()); |
| | | if(CollectionUtils.isNotEmpty(memberIPage.getRecords())){ |
| | | List<Category> categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getDeleted, Constants.ZERO) |
| | | .eq(Category::getType,Constants.TWO) |
| | | .orderByAsc(Category::getSortnum) |
| | | ); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | String roleConfig = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ROLE_CONFIG).getCode(); |
| | | for (Member member:memberIPage.getRecords()) { |
| | | if(CollectionUtils.isNotEmpty(categoryList)){ |
| | | dealMemberField(member,categoryList); |
| | | } |
| | | member.setFullImgurl(StringUtils.isNotBlank(member.getImgurl())?(path + member.getImgurl()):""); |
| | | if(StringUtils.isBlank(roleConfig)||StringUtils.isBlank(model.getQueryUserRole()) |
| | | || !roleConfig.contains(model.getQueryUserRole())){ |
| | | member.setFee(null); |
| | | } |
| | | if(member.getJobYear()!=null){ |
| | | member.setWorkYears(DateUtil.getCurrentYear( ) - member.getJobYear()+1); |
| | | } |
| | | } |
| | | } |
| | | return PageData.from(memberIPage); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Member findDetailById(Integer id,String queryUserRole) { |
| | | Member member = memberMapper.selectJoinOne(Member.class, new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | .select(" c1.NAME ", Member::getPromotionName) |
| | | .select(" c2.NAME ", Member::getLevelName) |
| | | .select(" TIMESTAMPDIFF(YEAR, CONCAT(t.JOB_YEAR , '-01-01'), now()) ",Member::getWorkYears) |
| | | .leftJoin(" category c1 on t.POSITON = c1.id ") |
| | | .leftJoin(" category c2 on t.LEVEL_ID = c2.id ") |
| | | .eq(Member::getId, id) |
| | | .last(" limit 1 ")); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(StringUtils.isNotBlank(member.getFieldIds())){ |
| | | member.setFieldList( |
| | | categoryMapper.selectList(new QueryWrapper<Category>().lambda() |
| | | .eq(Category::getDeleted, Constants.ZERO) |
| | | .eq(Category::getType,Constants.TWO) |
| | | .apply(" find_in_set(CONCAT('[',id,']'),'"+member.getFieldIds()+"') ") |
| | | .orderByAsc(Category::getSortnum) |
| | | ) |
| | | ); |
| | | } |
| | | |
| | | String resourcePath = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | String roleConfig = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ROLE_CONFIG).getCode(); |
| | | member.setFullImgurl(StringUtils.isNotBlank(member.getImgurl())?(resourcePath + path + member.getImgurl()):""); |
| | | List<Cases> casesList = casesMapper.selectList(new QueryWrapper<Cases>().lambda() |
| | | .eq(Cases::getMemberId,member.getId()) |
| | | .eq(Cases::getDeleted,Constants.ZERO) |
| | | .orderByDesc(Cases::getId) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(casesList)){ |
| | | String casePath = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CASES_FILES).getCode(); |
| | | for (Cases cases:casesList) { |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,cases.getId()) |
| | | .eq(Multifile::getObjType,Constants.ONE) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(Multifile::getId) |
| | | ); |
| | | multifileList.forEach(multifile -> { |
| | | multifile.setUrl(StringUtils.isNotBlank(multifile.getFileurl())?(resourcePath + casePath + multifile.getFileurl()):""); |
| | | }); |
| | | } |
| | | member.setCasesList(casesList); |
| | | } |
| | | if(StringUtils.isBlank(roleConfig)||StringUtils.isBlank(queryUserRole) |
| | | || !roleConfig.contains(queryUserRole)){ |
| | | member.setFee(null); |
| | | } |
| | | return member; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public void dealMemberField(Member member,List<Category> categoryList){ |
| | | if(CollectionUtils.isNotEmpty(categoryList)){ |
| | | return; |
| | | } |
| | | String fieldNames = ""; |
| | | for (Category category:categoryList) { |
| | | if(member.getFieldIds().contains("["+category.getId()+"]")){ |
| | | fieldNames = fieldNames + (StringUtils.isNotBlank(fieldNames)?",":"") + category.getName(); |
| | | } |
| | | } |
| | | member.setFieldNames(fieldNames); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(Member member) { |
| | | QueryWrapper<Member> wrapper = new QueryWrapper<>(member); |
| | | return memberMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.service.system.SystemLoginLogService; |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authc.AuthenticationException; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | |
| | | |
| | | @Value("${project.version}") |
| | | private String systemVersion; |
| | | /** |
| | | * # ç¯å¢ï¼ç产ç¯å¢productionï¼å¼åç¯å¢development |
| | | */ |
| | | @Value("${project.env}") |
| | | private String projectEnv; |
| | | |
| | | @Autowired |
| | | private CaptchaService captchaService; |
| | |
| | | loginLog.setClientInfo(Utils.User_Client.getBrowser(request)); |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | // æ ¡éªéªè¯ç |
| | | try { |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | loginLog.setReason(e.getMessage().length() > 200 ? (e.getMessage().substring(0, 190) + "...") : e.getMessage()); |
| | | loginLog.setSuccess(Boolean.FALSE); |
| | | systemLoginLogService.create(loginLog); |
| | | throw e; |
| | | if(StringUtils.equals(projectEnv,"development")){ |
| | | // æ ¡éªéªè¯ç |
| | | try { |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | loginLog.setReason(e.getMessage().length() > 200 ? (e.getMessage().substring(0, 190) + "...") : e.getMessage()); |
| | | loginLog.setSuccess(Boolean.FALSE); |
| | | systemLoginLogService.create(loginLog); |
| | | throw e; |
| | | } |
| | | } |
| | | // æ ¡éªç¨æ·ååå¯ç |
| | | Subject subject = SecurityUtils.getSubject(); |
| | |
| | | username: admin |
| | | password: 111111 |
| | | |
| | | qiwei: |
| | | serviceurl: https://qyapi.weixin.qq.com |
| | | |
| | | aes: |
| | | encrypt: |
| | | open: true # æ¯å¦å¼å¯å å¯ true or false |
| | |
| | | upload: |
| | | type: ftp |
| | | |
| | | project: |
| | | # ç¯å¢ï¼ç产ç¯å¢productionï¼å¼åç¯å¢development |
| | | env: development |
| | | # 模å¼ï¼testingæµè¯æ¨¡å¼ |
| | | mode: testing |
| | | |
| | | |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://b66cc1a382964a6a9d46a522f2dfe672in01.internal.cn-south-1.mysql.rds.myhuaweicloud.com:3306/jinkuai?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.0.211:3306/zbom_dianjiang?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Jinkuai!@#$%^ |
| | | password: Doumee@168 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | redis: |
| | |
| | | enable: true |
| | | username: admin |
| | | password: doumee@168 |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | wx: |
| | | pay: |
| | | #æå¡å---------start------- åæ°è¯¦è§£å°å https://pay.weixin.qq.com/doc/v3/partner/4013080340 |
| | | mchId: 1700071922 #æå¡åå¨å¾®ä¿¡æ¯ä»ä¾§çå¯ä¸èº«ä»½æ è¯ |
| | | appId: wx6cc1087ca79db7f6 #æå¡åå¨å¾®ä¿¡å¼æ¾å¹³å°ï¼ç§»å¨åºç¨ï¼æå
¬ä¼å¹³å°ï¼å
¬ä¼å·/å°ç¨åºï¼ä¸ç³è¯·çä¸ä¸ªå¯ä¸æ è¯ |
| | | apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB |
| | | serialNumer: 6696086F6EFB8D6A4F821BD47DDBAF75C3BC1209 #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #æå¡åè¯ä¹¦åºåå· |
| | | payPublicKeyId: PUB_KEY_ID_0117000719222024112700219100000508 #åæ·/平尿¯ä»å
¬é¥id |
| | | #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | notifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wxPayNotify |
| | | refundNotifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wxRefundNotify |
| | | keyPath: /usr/local/jars/payFile/apiclient_cert.p12 |
| | | privateCertPath: /usr/local/jars/payFile/apiclient_cert.pem |
| | | privateKeyPath: /usr/local/jars/payFile/apiclient_key.pem |
| | | pubKeyPath: /usr/local/jars/payFile/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | |
| | | #æå¡å-------------end--- |
| | | |
| | | #åæ·ä¿¡æ¯ |
| | | wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC |
| | | wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #åæ·/平尿¯ä»å
¬é¥id |
| | | wechatPubKeyPath: /usr/local/jars/payFile/shanghu/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | wechatPrivateKeyPath: /usr/local/jars/payFile/shanghu/apiclient_key.pem #åæ·ç§é¥ |
| | | wechatNotifyUrl: https://jinkuai.832smartfarm.com/jinkuai_admin/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | wechatApiV3Key: 7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB |
| | | |
| | | |
| | | existsSub: 1 |
| | | appSecret: |
| | | #ååæ·------------start---- |
| | | subMchId: 1723326069 #ååæ·å· |
| | | subAppId: wx332441ae5b12be7d #å°ç¨åºid |
| | | subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #å°ç¨åºç§é¥ |
| | | #ååæ·------------end---- |
| | | # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | typeId: jinkuai |
| | | |
| | | upload: |
| | | type: blob |
| | | |
| | | qiwei: |
| | | serviceurl: https://wecom-qyapi.unilever-china.com/ |
| | | |
| | | project: |
| | | # ç¯å¢ï¼ç产ç¯å¢productionï¼å¼åç¯å¢development |
| | | env: production |
| | | # 模å¼ï¼testingæµè¯æ¨¡å¼ |
| | | mode: production |
| | |
| | | username: admin |
| | | password: 111111 |
| | | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | wx: |
| | | pay: |
| | | #æå¡å---------start------- åæ°è¯¦è§£å°å https://pay.weixin.qq.com/doc/v3/partner/4013080340 |
| | | mchId: 1700071922 #æå¡åå¨å¾®ä¿¡æ¯ä»ä¾§çå¯ä¸èº«ä»½æ è¯ |
| | | appId: wx6cc1087ca79db7f6 #æå¡åå¨å¾®ä¿¡å¼æ¾å¹³å°ï¼ç§»å¨åºç¨ï¼æå
¬ä¼å¹³å°ï¼å
¬ä¼å·/å°ç¨åºï¼ä¸ç³è¯·çä¸ä¸ªå¯ä¸æ è¯ |
| | | apiV3Key: 0a056faa107c2b2944b9d6a9aa6d4142 #7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB |
| | | serialNumer: 6696086F6EFB8D6A4F821BD47DDBAF75C3BC1209 #38495CE0137D90E4DC4F64F7ECDE035A35470BE3 #æå¡åè¯ä¹¦åºåå· |
| | | payPublicKeyId: PUB_KEY_ID_0117000719222024112700219100000508 #åæ·/平尿¯ä»å
¬é¥id |
| | | #mchKey: W97N53Q71326D6JZ2E9HY5M4VT4BAC8S |
| | | notifyUrl: https://test.doumee.cn/zbom_dianjiang_admin/web/wxPayNotify |
| | | refundNotifyUrl: https://test.doumee.cn/zbom_dianjiang_admin/web/wxRefundNotify |
| | | keyPath: /usr/local/jars/payFile/apiclient_cert.p12 |
| | | privateCertPath: /usr/local/jars/payFile/apiclient_cert.pem |
| | | privateKeyPath: /usr/local/jars/payFile/apiclient_key.pem |
| | | pubKeyPath: /usr/local/jars/payFile/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | |
| | | #æå¡å-------------end--- |
| | | |
| | | #åæ·ä¿¡æ¯ |
| | | wechatSerialNumer: 12C0F0DD0F3D2B565B45586D3FEA225EBF723BEC |
| | | wechatPayPublicKeyId: PUB_KEY_ID_0117233260692025072500181939000603 #åæ·/平尿¯ä»å
¬é¥id |
| | | wechatPubKeyPath: /usr/local/jars/payFile/shanghu/pub_key.pem #åæ·æ¯ä»å
¬é¥ |
| | | wechatPrivateKeyPath: /usr/local/jars/payFile/shanghu/apiclient_key.pem #åæ·ç§é¥ |
| | | wechatNotifyUrl: https://test.doumee.cn/jinkuai_admin/web/wechat/transferNotify #åæ·è½¬è´¦åè°å°å |
| | | wechatApiV3Key: 7tG4Vk9Zp2L8dXw5Jq0N3hR6yE1sF3cB |
| | | |
| | | |
| | | existsSub: 1 |
| | | appSecret: |
| | | #ååæ·------------start---- |
| | | subMchId: 1723326069 #ååæ·å· |
| | | subAppId: wx332441ae5b12be7d #å°ç¨åºid |
| | | subAppSecret: add86d6406f5c14501ac5bbb1a60e004 #å°ç¨åºç§é¥ |
| | | #ååæ·------------end---- |
| | | # mchKey: u4TSNtv0wFP7WRfnxBgijYOtRhS9FvlM |
| | | typeId: jinkuai |
| | | |
| | | upload: |
| | | type: blob |
| | | |
| | | qiwei: |
| | | serviceurl: https://qyapi.weixin.qq.com |
| | | |
| | | project: |
| | | # ç¯å¢ï¼ç产ç¯å¢productionï¼å¼åç¯å¢development |
| | | env: production |
| | | # 模å¼ï¼testingæµè¯æ¨¡å¼ |
| | | mode: testing |
| | |
| | | ApplicationContext context = SpringApplication.run(DJWebApplication.class); |
| | | context.getEnvironment(); |
| | | } |
| | | |
| | | // @Override |
| | | // protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | // return builder.sources(JKWebApplication.class) ; |
| | | // } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.vo.WebLoginUserVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | |
| | | * è·åç»å½ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | protected Member getMemberResponse(){ |
| | | protected WebLoginUserVO getMemberResponse(){ |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.MEMBER_INFO); |
| | | if(obj != null){ |
| | | return JSONObject.parseObject(obj.toString(),Member.class); |
| | | return JSONObject.parseObject(obj.toString(), WebLoginUserVO.class); |
| | | } |
| | | return null; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | | import com.doumee.config.jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.dao.business.dto.LoginRequestNewParam; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.model.SystemJob; |
| | | import com.doumee.dao.vo.WebLoginUserVO; |
| | | import com.doumee.service.business.CategoryService; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.sun.deploy.net.HttpUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/07/09 12:00 |
| | | */ |
| | | @Api(tags = "webç»å½ç¸å
³æ¥å£") |
| | | @Trace(exclude = true) |
| | | @RestController |
| | | @RequestMapping("/web/login") |
| | | @Slf4j |
| | | public class LoginController extends ApiController { |
| | | |
| | | @Autowired |
| | | private CategoryService categoryService; |
| | | |
| | | @Autowired |
| | | private JwtTokenUtil jwtTokenUtil; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | |
| | | @ApiOperation("UKåç¹ç»å½") |
| | | @GetMapping("/ukLogin") |
| | | public void ukLogin(String tick, Object obj, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | LoginRequestNewParam requestParam = new LoginRequestNewParam(); |
| | | /*// UK_ERROR_URL = "http://u.zhibang.com/sso/web/token/error"; |
| | | String errorUrl =systemDictDataBiz.queryByCode(Constants.ZBOM_PARAM,Constants.ZBOM_UK_ERROR_URL).getCode(); |
| | | try { |
| | | log.error("请æ±åæ°TICKæåå§===========ï¼" + tick); |
| | | JSONObject urlParams = new JSONObject(); |
| | | log.info("请æ±åæ°ï¼" + JSON.toJSONString(urlParams)); |
| | | //TICKET_LOGIN_TEST = "http://testsso.zhibang.com:8080/esc-idm/api/v1/getUserInfo"; |
| | | //TICKET_LOGIN = "https://sso.zbom.com/esc-idm/api/v1/getUserInfo"; |
| | | String url = systemDictDataBiz.queryByCode(Constants.ZBOM_PARAM,Constants.ZBOM_TICKET_LOGIN_URL).getCode() + "?tick=" + URLEncoder.encode(tick,Constants.UTF); |
| | | String post = HttpsUtil.get(url,true); |
| | | log.info("è¿ååæ°ï¼" + post); |
| | | JSONObject json = JSONObject.parseObject(post); |
| | | if (StringUtils.equals(json.getString("code"), "0")) { |
| | | JSONObject userInfo = json.getJSONObject("data"); |
| | | requestParam = JSONObject.toJavaObject(userInfo, LoginRequestNewParam.class); |
| | | } else { |
| | | log.error("æ¡ä¾åºç³»ç»åç¹ç»å½å¤±è´¥ é误åå è·åtick失败" + json.getString("message")); |
| | | response.sendRedirect(errorUrl + "?title=" + enCode("ç»éé误") + "&msg="+ enCode(json.getString("message"))); |
| | | return; |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("ticketæ¥å£è¯·æ±é误ï¼" + e.getMessage()); |
| | | response.sendRedirect(errorUrl + "?title=" + enCode("ç»éé误") + "&msg=" + enCode("ç³»ç»ç¹å¿ï¼è¯·ç¨åéè¯~")); |
| | | return; |
| | | }*/ |
| | | requestParam.setRediUrl("http://localhost:10087/#/login"); |
| | | WebLoginUserVO loginUserVO = new WebLoginUserVO(); |
| | | loginUserVO.setId("123"); |
| | | loginUserVO.setRoleType("admin"); |
| | | loginUserVO.setZhanqu("1"); |
| | | String token = jwtTokenUtil.generateToken(loginUserVO); |
| | | response.sendRedirect(requestParam.getRediUrl()+"?token="+token); |
| | | } |
| | | |
| | | |
| | | private String enCode(String string) { |
| | | // TODO Auto-generated method stub |
| | | String str = ""; |
| | | try { |
| | | str = java.net.URLEncoder.encode(string, "utf-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | // TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("èå¸å页æ¥è¯¢") |
| | | @PostMapping("/memberPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<PageData<Member>> memberPage(@RequestBody PageWrap<Member> pageWrap) { |
| | | WebLoginUserVO loginUserVO = this.getMemberResponse(); |
| | | pageWrap.getModel().setQueryUserRole(loginUserVO.getRoleType()); |
| | | pageWrap.getModel().setQueryZQCode(loginUserVO.getZhanqu()); |
| | | return ApiResponse.success(memberService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("èå¸è¯¦æ
") |
| | | @GetMapping("/memberDetail") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<Member> memberPage(@RequestParam Integer id) { |
| | | WebLoginUserVO loginUserVO = this.getMemberResponse(); |
| | | return ApiResponse.success(memberService.findDetailById(id,loginUserVO.getRoleType())); |
| | | } |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("åç±»ä¿¡æ¯æ¥è¯¢") |
| | | @GetMapping("/categoryList") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | }) |
| | | public ApiResponse<List<Category>> categoryList(@RequestParam Integer type) { |
| | | return ApiResponse.success(categoryService.getCategoryList(type)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | port: 10011 |
| | | # 项ç®ä¿¡æ¯é
ç½® |
| | | project: |
| | | name: è¿å¿« |
| | | name: å¿é¦ç¹å° |
| | | version: 1.0.0 |
| | | # ç¯å¢ï¼ç产ç¯å¢productionï¼å¼åç¯å¢development |
| | | env: development |
| | | # 模å¼ï¼testingæµè¯æ¨¡å¼ |
| | | mode: testing |
| | | |
| | | spring: |
| | | profiles: |
| | | active: pro |
| | | active: dev |
| | | # JSONè¿åé
ç½® |
| | | jackson: |
| | | # é»è®¤æ¶åº |