Compare commits
13 Commits
fengshuang
...
master
Author | SHA1 | Date |
---|---|---|
ptka4xvyr | 44ed3ad0cf | 1 year ago |
ptka4xvyr | b9d2de1120 | 1 year ago |
ptka4xvyr | 64285b12ba | 1 year ago |
ptka4xvyr | 31ed221045 | 1 year ago |
ptka4xvyr | f2c12e9adf | 1 year ago |
ptka4xvyr | b2b003be41 | 1 year ago |
ptka4xvyr | b27be6d47a | 1 year ago |
ptka4xvyr | 4089dd8150 | 1 year ago |
ptka4xvyr | fff5ccf385 | 1 year ago |
ptka4xvyr | bc64cfd4c5 | 1 year ago |
ptka4xvyr | de93ce159f | 1 year ago |
ptka4xvyr | 82bf4c135f | 1 year ago |
ptka4xvyr | ed981b67b5 | 1 year ago |
After Width: | Height: | Size: 470 KiB |
@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
@ -0,0 +1,24 @@
|
||||
# vue-project02
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset'
|
||||
]
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "esnext",
|
||||
"baseUrl": "./",
|
||||
"moduleResolution": "node",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "vue-project02",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.5.1",
|
||||
"core-js": "^3.8.3",
|
||||
"element-ui": "^2.15.3",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.0",
|
||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||
"@vue/cli-plugin-router": "~5.0.0",
|
||||
"@vue/cli-service": "~5.0.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"env": {
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:vue/essential",
|
||||
"eslint:recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"parser": "@babel/eslint-parser"
|
||||
},
|
||||
"rules": {}
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not dead"
|
||||
]
|
||||
}
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,17 @@
|
||||
<!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.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- <element-vue></element-vue> -->
|
||||
<!-- <emp-view></emp-view> -->
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
// import EmpView from './views/emp/EmpView.vue';
|
||||
// import ElementVue from './views/element/ElementVue.vue';
|
||||
// import ElementVue from './views/element/ElementVue.vue'
|
||||
export default {
|
||||
// components: { EmpView },
|
||||
// components: { ElementVue },
|
||||
// components:{ElementVue},
|
||||
data() {
|
||||
return {
|
||||
message:"hello vue"
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
After Width: | Height: | Size: 6.7 KiB |
@ -0,0 +1,59 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,16 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
Vue.use(ElementUI);
|
||||
import axios from 'axios'
|
||||
Vue.prototype.$axios = axios
|
||||
axios.defaults.baseURL = '/list'
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App)
|
||||
}).$mount('#app')
|
@ -0,0 +1,56 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import HomeView from '../views/HomeView.vue'
|
||||
import LoginView from '../views/LoginView.vue'
|
||||
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
|
||||
{
|
||||
path: '/',
|
||||
name: 'stu',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/EmpView.vue')
|
||||
},
|
||||
{
|
||||
path: '/stu',
|
||||
name: 'stu',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/EmpView.vue')
|
||||
},
|
||||
{
|
||||
path: '/lost',
|
||||
name: 'lost',
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/LostView.vue')
|
||||
},
|
||||
{
|
||||
path: '/order',
|
||||
name: 'order',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/OrderView.vue')
|
||||
},
|
||||
{
|
||||
path: '/forum',
|
||||
name: 'forum',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/forumView.vue')
|
||||
},
|
||||
{
|
||||
path: '/comment',
|
||||
name: 'comment',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/emp/commentView.vue')
|
||||
}
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<img alt="Vue logo" src="../assets/logo.png">
|
||||
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: 'HomeView',
|
||||
components: {
|
||||
HelloWorld
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div>
|
||||
登录界面
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: {
|
||||
return(){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
@ -0,0 +1,159 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container style="height: 700px; border: 1px solid #eee">
|
||||
<el-header style="font-size: 40px; background-color: #d188c7"
|
||||
>校园墙后台管理系统</el-header
|
||||
>
|
||||
|
||||
<el-container >
|
||||
<!-- 侧边框 -->
|
||||
<el-aside width="230px" style="border: 1px solid #eee ;" >
|
||||
<el-menu :default-openeds="['1', '3']">
|
||||
<el-submenu index="1">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>系统信息管理</template
|
||||
>
|
||||
<el-menu-item index="1-1" >
|
||||
<router-link to="/stu">用户管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-2" >
|
||||
<router-link to="/order">二手物品管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="2">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>失物认领管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/lost">失物管理</router-link>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="3">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>帖子管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/forum">帖子管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-2">
|
||||
<router-link to="/comment">评论管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
|
||||
<el-main style="background-color: aqua;">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="请输入员工姓名"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-select v-model="formInline.gender" placeholder="请选择">
|
||||
<el-option label="男" value="1"></el-option>
|
||||
<el-option label="女" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="formInline.entrydate"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableDate" border="">
|
||||
<el-table-column prop="name" label="物品名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" label="失物描述" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop= "image" label="图片" width="180">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.image" width="100px" height="70px">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isLoser" label="上传人是否为失者" width="140" >
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.isLoser == true ?"是":"否"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lostAddress" label="丢失地点" width="140" >
|
||||
</el-table-column>
|
||||
<el-table-column prop="contact" label="微信联系方式" width="140">
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadTime" label="上传时间" width="180">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作">
|
||||
<el-button type="primary" size="mini">编辑</el-button>
|
||||
<el-button type="danger" size="mini">删除</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
background
|
||||
layout="sizes,prev, pager, next"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:total="1000"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableDate: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
gender: "",
|
||||
entrydate: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange: function (val) {
|
||||
alert("每页记录数变化: " + val);
|
||||
},
|
||||
handleCurrentChange: function (val) {
|
||||
alert("页码变化" + val);
|
||||
},
|
||||
onSubmit: function () {
|
||||
alert(JSON.stringify(this.formInline));
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
axios.get("/list/lost").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container style="height: 700px; border: 1px solid #eee">
|
||||
<el-header style="font-size: 40px; background-color: #d188c7"
|
||||
>校园墙后台管理系统</el-header
|
||||
>
|
||||
|
||||
<el-container >
|
||||
<!-- 侧边框 -->
|
||||
<el-aside width="230px" style="border: 1px solid #eee ;" >
|
||||
<el-menu :default-openeds="['1', '3']">
|
||||
<el-submenu index="1">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>系统信息管理</template
|
||||
>
|
||||
<el-menu-item index="1-1" >
|
||||
<router-link to="/stu">用户管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-2" >
|
||||
<router-link to="/order">二手物品管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="2">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>失物认领管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/lost">失物管理</router-link>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="3">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>帖子管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/forum">帖子管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-2">
|
||||
<router-link to="/comment">评论管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
|
||||
<el-main style="background-color: aqua;">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="请输入员工姓名"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-select v-model="formInline.gender" placeholder="请选择">
|
||||
<el-option label="男" value="1"></el-option>
|
||||
<el-option label="女" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="formInline.entrydate"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableDate" border="">
|
||||
<el-table-column prop="name" label="物品名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="description" label="物品描述" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop= "image" label="图片" width="180">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.image" width="100px" height="70px">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contact" label="联系方式" width="140">
|
||||
</el-table-column>
|
||||
<el-table-column prop="uploadTime" label="上传时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="userId" label="上传用户Id" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<el-button type="primary" size="mini">编辑</el-button>
|
||||
<el-button type="danger" size="mini">删除</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
background
|
||||
layout="sizes,prev, pager, next"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:total="1000"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableDate: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
gender: "",
|
||||
entrydate: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange: function (val) {
|
||||
alert("每页记录数变化: " + val);
|
||||
},
|
||||
handleCurrentChange: function (val) {
|
||||
alert("页码变化" + val);
|
||||
},
|
||||
onSubmit: function () {
|
||||
alert(JSON.stringify(this.formInline));
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
axios.get("/list/market").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container style="height: 700px; border: 1px solid #eee">
|
||||
<el-header style="font-size: 40px; background-color: #d188c7"
|
||||
>校园墙后台管理系统</el-header
|
||||
>
|
||||
|
||||
<el-container >
|
||||
<!-- 侧边框 -->
|
||||
<el-aside width="230px" style="border: 1px solid #eee ;" >
|
||||
<el-menu :default-openeds="['1', '3']">
|
||||
<el-submenu index="1">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>系统信息管理</template
|
||||
>
|
||||
<el-menu-item index="1-1" >
|
||||
<router-link to="/stu">用户管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-2" >
|
||||
<router-link to="/order">二手物品管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="2">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>失物认领管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/lost">失物管理</router-link>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="3">
|
||||
<template slot="title"><i class="el-icon-message"></i>帖子管理</template>
|
||||
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/forum">帖子管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-2">
|
||||
<router-link to="/comment">评论管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
|
||||
<el-main style="background-color: aqua;">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="请输入员工姓名"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-select v-model="formInline.gender" placeholder="请选择">
|
||||
<el-option label="男" value="1"></el-option>
|
||||
<el-option label="女" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="formInline.entrydate"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableDate" border="">
|
||||
<el-table-column prop="username" label="用户名" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="commentText" label="评论内容" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop= "commentTime" label="评论时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click.native="shanchu(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
background
|
||||
layout="sizes,prev, pager, next"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:total="1000"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableDate: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
gender: "",
|
||||
entrydate: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange: function (val) {
|
||||
alert("每页记录数变化: " + val);
|
||||
},
|
||||
handleCurrentChange: function (val) {
|
||||
alert("页码变化" + val);
|
||||
},
|
||||
onSubmit: function () {
|
||||
alert(JSON.stringify(this.formInline));
|
||||
},
|
||||
shanchu: function (e) {
|
||||
axios.delete("/list/deleteComment/" + e.id).then((result) => {
|
||||
axios.get("/list/comment").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
axios.get("/list/Replycomment").then((result) => {
|
||||
this.tableDate = this.tableDate.push(result.data.data);
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get("/list/comment").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
axios.get("/list/Replycomment").then((result) => {
|
||||
this.tableDate = this.tableDate.push(result.data.data);
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-container style="height: 700px; border: 1px solid #eee">
|
||||
<el-header style="font-size: 40px; background-color: #d188c7"
|
||||
>校园墙后台管理系统</el-header
|
||||
>
|
||||
|
||||
<el-container >
|
||||
<!-- 侧边框 -->
|
||||
<el-aside width="230px" style="border: 1px solid #eee ;" >
|
||||
<el-menu :default-openeds="['1', '3']">
|
||||
<el-submenu index="1">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>系统信息管理</template
|
||||
>
|
||||
<el-menu-item index="1-1" >
|
||||
<router-link to="/stu">用户管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="1-2" >
|
||||
<router-link to="/order">二手物品管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="2">
|
||||
<template slot="title"
|
||||
><i class="el-icon-message"></i>失物认领管理</template
|
||||
>
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/lost">失物管理</router-link>
|
||||
</el-menu-item>
|
||||
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu index="3">
|
||||
<template slot="title"><i class="el-icon-message"></i>帖子管理</template>
|
||||
|
||||
<el-menu-item index="2-1">
|
||||
<router-link to="/forum">帖子管理</router-link>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2-2">
|
||||
<router-link to="/comment">评论管理</router-link>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
|
||||
<el-main style="background-color: aqua;">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="请输入员工姓名"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-select v-model="formInline.gender" placeholder="请选择">
|
||||
<el-option label="男" value="1"></el-option>
|
||||
<el-option label="女" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker
|
||||
v-model="formInline.entrydate"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table :data="tableDate" border="">
|
||||
<el-table-column prop="userId" label="用户ID" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" label="标题" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop= "content" label="内容" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop= "image" label="图片" width="180">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.image" width="100px" height="70px">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop= "releaseTime" label="发表时间" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" @click.native="shanchu(scope.row)">删除</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<br>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
background
|
||||
layout="sizes,prev, pager, next"
|
||||
:page-sizes="[2, 4, 6, 8]"
|
||||
:total="1000"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import axios from 'axios';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableDate: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
gender: "",
|
||||
entrydate: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange: function (val) {
|
||||
alert("每页记录数变化: " + val);
|
||||
},
|
||||
handleCurrentChange: function (val) {
|
||||
alert("页码变化" + val);
|
||||
},
|
||||
onSubmit: function () {
|
||||
alert(JSON.stringify(this.formInline));
|
||||
},
|
||||
shanchu: function (e) {
|
||||
axios.delete("/list/deletForum/" + e.id).then((result) => {
|
||||
axios.get("/list/forum").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get("/list/forum").then((result) => {
|
||||
this.tableDate = result.data.data;
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
|
||||
</style>
|
@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -0,0 +1,2 @@
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
|
@ -0,0 +1,308 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Apache Maven Wrapper startup batch script, version 3.2.0
|
||||
#
|
||||
# Required ENV vars:
|
||||
# ------------------
|
||||
# JAVA_HOME - location of a JDK home dir
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
# e.g. to debug Maven itself, use
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||
|
||||
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||
. /usr/local/etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f /etc/mavenrc ] ; then
|
||||
. /etc/mavenrc
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.mavenrc" ] ; then
|
||||
. "$HOME/.mavenrc"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false;
|
||||
darwin=false;
|
||||
mingw=false
|
||||
case "$(uname)" in
|
||||
CYGWIN*) cygwin=true ;;
|
||||
MINGW*) mingw=true;;
|
||||
Darwin*) darwin=true
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
if [ -x "/usr/libexec/java_home" ]; then
|
||||
JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME
|
||||
else
|
||||
JAVA_HOME="/Library/Java/Home"; export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
if [ -r /etc/gentoo-release ] ; then
|
||||
JAVA_HOME=$(java-config --jre-home)
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
|
||||
fi
|
||||
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||
if $mingw ; then
|
||||
[ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
|
||||
JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)"
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
javaExecutable="$(which javac)"
|
||||
if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
|
||||
# readlink(1) is not available as standard on Solaris 10.
|
||||
readLink=$(which readlink)
|
||||
if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then
|
||||
if $darwin ; then
|
||||
javaHome="$(dirname "\"$javaExecutable\"")"
|
||||
javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
|
||||
else
|
||||
javaExecutable="$(readlink -f "\"$javaExecutable\"")"
|
||||
fi
|
||||
javaHome="$(dirname "\"$javaExecutable\"")"
|
||||
javaHome=$(expr "$javaHome" : '\(.*\)/bin')
|
||||
JAVA_HOME="$javaHome"
|
||||
export JAVA_HOME
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$JAVACMD" ] ; then
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
else
|
||||
JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||
echo " We cannot execute $JAVACMD" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$JAVA_HOME" ] ; then
|
||||
echo "Warning: JAVA_HOME environment variable is not set."
|
||||
fi
|
||||
|
||||
# traverses directory structure from process work directory to filesystem root
|
||||
# first directory with .mvn subdirectory is considered project base directory
|
||||
find_maven_basedir() {
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "Path not specified to find_maven_basedir"
|
||||
return 1
|
||||
fi
|
||||
|
||||
basedir="$1"
|
||||
wdir="$1"
|
||||
while [ "$wdir" != '/' ] ; do
|
||||
if [ -d "$wdir"/.mvn ] ; then
|
||||
basedir=$wdir
|
||||
break
|
||||
fi
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||
if [ -d "${wdir}" ]; then
|
||||
wdir=$(cd "$wdir/.." || exit 1; pwd)
|
||||
fi
|
||||
# end of workaround
|
||||
done
|
||||
printf '%s' "$(cd "$basedir" || exit 1; pwd)"
|
||||
}
|
||||
|
||||
# concatenates all lines of a file
|
||||
concat_lines() {
|
||||
if [ -f "$1" ]; then
|
||||
# Remove \r in case we run on Windows within Git Bash
|
||||
# and check out the repository with auto CRLF management
|
||||
# enabled. Otherwise, we may read lines that are delimited with
|
||||
# \r\n and produce $'-Xarg\r' rather than -Xarg due to word
|
||||
# splitting rules.
|
||||
tr -s '\r\n' ' ' < "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
log() {
|
||||
if [ "$MVNW_VERBOSE" = true ]; then
|
||||
printf '%s\n' "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
BASE_DIR=$(find_maven_basedir "$(dirname "$0")")
|
||||
if [ -z "$BASE_DIR" ]; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
|
||||
log "$MAVEN_PROJECTBASEDIR"
|
||||
|
||||
##########################################################################################
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
##########################################################################################
|
||||
wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
|
||||
if [ -r "$wrapperJarPath" ]; then
|
||||
log "Found $wrapperJarPath"
|
||||
else
|
||||
log "Couldn't find $wrapperJarPath, downloading it ..."
|
||||
|
||||
if [ -n "$MVNW_REPOURL" ]; then
|
||||
wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||
else
|
||||
wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||
fi
|
||||
while IFS="=" read -r key value; do
|
||||
# Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
|
||||
safeValue=$(echo "$value" | tr -d '\r')
|
||||
case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
|
||||
esac
|
||||
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
log "Downloading from: $wrapperUrl"
|
||||
|
||||
if $cygwin; then
|
||||
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
|
||||
fi
|
||||
|
||||
if command -v wget > /dev/null; then
|
||||
log "Found wget ... using wget"
|
||||
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
else
|
||||
wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||
fi
|
||||
elif command -v curl > /dev/null; then
|
||||
log "Found curl ... using curl"
|
||||
[ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||
curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
|
||||
else
|
||||
curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
|
||||
fi
|
||||
else
|
||||
log "Falling back to using Java to download"
|
||||
javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||
javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class"
|
||||
# For Cygwin, switch paths to Windows format before running javac
|
||||
if $cygwin; then
|
||||
javaSource=$(cygpath --path --windows "$javaSource")
|
||||
javaClass=$(cygpath --path --windows "$javaClass")
|
||||
fi
|
||||
if [ -e "$javaSource" ]; then
|
||||
if [ ! -e "$javaClass" ]; then
|
||||
log " - Compiling MavenWrapperDownloader.java ..."
|
||||
("$JAVA_HOME/bin/javac" "$javaSource")
|
||||
fi
|
||||
if [ -e "$javaClass" ]; then
|
||||
log " - Running MavenWrapperDownloader.java ..."
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
##########################################################################################
|
||||
# End of extension
|
||||
##########################################################################################
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven wrapper jar file
|
||||
wrapperSha256Sum=""
|
||||
while IFS="=" read -r key value; do
|
||||
case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
|
||||
esac
|
||||
done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
|
||||
if [ -n "$wrapperSha256Sum" ]; then
|
||||
wrapperSha256Result=false
|
||||
if command -v sha256sum > /dev/null; then
|
||||
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
|
||||
wrapperSha256Result=true
|
||||
fi
|
||||
elif command -v shasum > /dev/null; then
|
||||
if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
|
||||
wrapperSha256Result=true
|
||||
fi
|
||||
else
|
||||
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available."
|
||||
echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
|
||||
exit 1
|
||||
fi
|
||||
if [ $wrapperSha256Result = false ]; then
|
||||
echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2
|
||||
echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2
|
||||
echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
[ -n "$JAVA_HOME" ] &&
|
||||
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
|
||||
[ -n "$CLASSPATH" ] &&
|
||||
CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
|
||||
fi
|
||||
|
||||
# Provide a "standardized" way to retrieve the CLI args that will
|
||||
# work with both Windows and non-Windows executions.
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*"
|
||||
export MAVEN_CMD_LINE_ARGS
|
||||
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
# shellcheck disable=SC2086 # safe args
|
||||
exec "$JAVACMD" \
|
||||
$MAVEN_OPTS \
|
||||
$MAVEN_DEBUG_OPTS \
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
@ -0,0 +1,205 @@
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.2.0
|
||||
@REM
|
||||
@REM Required ENV vars:
|
||||
@REM JAVA_HOME - location of a JDK home dir
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||
@REM e.g. to debug Maven itself, use
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||
@echo off
|
||||
@REM set title of command window
|
||||
title %0
|
||||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||
|
||||
@REM set %HOME% to equivalent of $HOME
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||
|
||||
@REM Execute a user defined script before this one
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||
:skipRcPre
|
||||
|
||||
@setlocal
|
||||
|
||||
set ERROR_CODE=0
|
||||
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||
@setlocal
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME not found in your environment. >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
:OkJHome
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||
|
||||
echo.
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||
echo location of your Java installation. >&2
|
||||
echo.
|
||||
goto error
|
||||
|
||||
@REM ==== END VALIDATION ====
|
||||
|
||||
:init
|
||||
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||
@REM Fallback to current working directory if not found.
|
||||
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||
|
||||
set EXEC_DIR=%CD%
|
||||
set WDIR=%EXEC_DIR%
|
||||
:findBaseDir
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||
cd ..
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||
set WDIR=%CD%
|
||||
goto findBaseDir
|
||||
|
||||
:baseDirFound
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||
cd "%EXEC_DIR%"
|
||||
goto endDetectBaseDir
|
||||
|
||||
:baseDirNotFound
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||
cd "%EXEC_DIR%"
|
||||
|
||||
:endDetectBaseDir
|
||||
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||
|
||||
@setlocal EnableExtensions EnableDelayedExpansion
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||
|
||||
:endReadAdditionalConfig
|
||||
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||
|
||||
set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||
|
||||
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||
IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B
|
||||
)
|
||||
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||
if exist %WRAPPER_JAR% (
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Found %WRAPPER_JAR%
|
||||
)
|
||||
) else (
|
||||
if not "%MVNW_REPOURL%" == "" (
|
||||
SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
|
||||
)
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||
echo Downloading from: %WRAPPER_URL%
|
||||
)
|
||||
|
||||
powershell -Command "&{"^
|
||||
"$webclient = new-object System.Net.WebClient;"^
|
||||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||
"}"^
|
||||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^
|
||||
"}"
|
||||
if "%MVNW_VERBOSE%" == "true" (
|
||||
echo Finished downloading %WRAPPER_JAR%
|
||||
)
|
||||
)
|
||||
@REM End of extension
|
||||
|
||||
@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file
|
||||
SET WRAPPER_SHA_256_SUM=""
|
||||
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||
IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B
|
||||
)
|
||||
IF NOT %WRAPPER_SHA_256_SUM%=="" (
|
||||
powershell -Command "&{"^
|
||||
"$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^
|
||||
"If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^
|
||||
" Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^
|
||||
" Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^
|
||||
" Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^
|
||||
" exit 1;"^
|
||||
"}"^
|
||||
"}"
|
||||
if ERRORLEVEL 1 goto error
|
||||
)
|
||||
|
||||
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||
@REM work with both Windows and non-Windows executions.
|
||||
set MAVEN_CMD_LINE_ARGS=%*
|
||||
|
||||
%MAVEN_JAVA_EXE% ^
|
||||
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||
%MAVEN_OPTS% ^
|
||||
%MAVEN_DEBUG_OPTS% ^
|
||||
-classpath %WRAPPER_JAR% ^
|
||||
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||
if ERRORLEVEL 1 goto error
|
||||
goto end
|
||||
|
||||
:error
|
||||
set ERROR_CODE=1
|
||||
|
||||
:end
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||
|
||||
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||
:skipRcPost
|
||||
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||
|
||||
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||
|
||||
cmd /C exit /B %ERROR_CODE%
|
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.1.4</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>demo</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>demo</name>
|
||||
<description>demo</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>2.1.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.47</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml.bind</groupId>
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<!-- no more than 2.3.3-->
|
||||
<dependency>
|
||||
<groupId>org.glassfish.jaxb</groupId>
|
||||
<artifactId>jaxb-runtime</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.15.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter-test</artifactId>
|
||||
<version>3.0.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,13 @@
|
||||
package com.example;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DemoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DemoApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.controller;
|
||||
|
||||
import com.example.pojo.Admin;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.service.AdminService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class AdminController {
|
||||
@Autowired
|
||||
private AdminService adminService;
|
||||
|
||||
@GetMapping("/list/admin")
|
||||
public Result list(){
|
||||
List<Admin> list = adminService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Result;
|
||||
import com.example.pojo.Comment;
|
||||
import com.example.service.CommentService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class CommentController {
|
||||
|
||||
@Autowired
|
||||
private CommentService commentService;
|
||||
|
||||
|
||||
@GetMapping("/list/comment")
|
||||
public Result list(){
|
||||
List<Comment> list = commentService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list/Replycomment")
|
||||
public Result list2(){
|
||||
List<Comment> list = commentService.list2();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@DeleteMapping("/list/deleteComment/{id}")
|
||||
public Result deleteComment(@PathVariable Integer id){
|
||||
commentService.deleteComment(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/addComment")
|
||||
public Result addComment(@RequestBody Comment comment){
|
||||
commentService.addComment(comment);
|
||||
return Result.success();
|
||||
}
|
||||
@PostMapping("/list/addReplyComment")
|
||||
public Result addReplyComment(@RequestBody Comment comment){
|
||||
commentService.addReplyComment(comment);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.example.controller;
|
||||
|
||||
import com.example.pojo.Forum;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.service.ForumService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class ForumController {
|
||||
|
||||
@Autowired
|
||||
private ForumService forumService;
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
|
||||
//查询帖子
|
||||
@GetMapping("/list/forum")
|
||||
public Result list(){
|
||||
List<Forum> list = forumService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
//添加帖子
|
||||
@PostMapping("/list/addForum")
|
||||
public Result addForum(@RequestBody Forum forum){
|
||||
forumService.addForum(forum);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
//删除帖子
|
||||
@DeleteMapping("/list/deletForum/{id}")
|
||||
public Result deleteForum(@PathVariable Integer id){
|
||||
forumService.deleteForum(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/forumImage")
|
||||
public String add1(MultipartFile image) throws IOException {
|
||||
log.info("新增用户: {}",image.getOriginalFilename());
|
||||
String url = aliOSSUtils.upload(image);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/forum/{id}")
|
||||
public Result selectForum(@PathVariable Integer id){
|
||||
Forum forum1 = forumService.selectForum(id);
|
||||
return Result.success(forum1);
|
||||
}
|
||||
|
||||
@PostMapping("/list/UserIdforum/{userId}")
|
||||
public Result selectUserIdForum(@PathVariable Integer userId){
|
||||
List<Forum> list = forumService.selectUserIdForum(userId);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Result;
|
||||
import com.example.pojo.User;
|
||||
import com.example.service.UserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class LoginController {
|
||||
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
|
||||
@PostMapping("user/login")
|
||||
public Result Login(@RequestBody User user){
|
||||
log.info("员工登录");
|
||||
User user1 = userService.login(user);
|
||||
return user1!=null?Result.success():Result.error("用户名或密码错误");
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("user/login_isStudent")
|
||||
public Result Login_isStudent(@RequestBody User user){
|
||||
log.info("登录前判断是否认证通过");
|
||||
User user1 = userService.SelectStudent(user);
|
||||
return Result.success(user1);
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.example.controller;
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Lost1;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.service.Lost1Service;
|
||||
import com.example.service.LostService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class Lost1Controller {
|
||||
@Autowired
|
||||
private Lost1Service lost1Service;
|
||||
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
@GetMapping("/list/lost1")
|
||||
public Result list(){
|
||||
List<Lost1> list = lost1Service.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/list/addLost11")
|
||||
public Result add(@RequestBody Lost1 lost1) throws IOException {
|
||||
log.info("新增用户");
|
||||
lost1Service.addLost1(lost1);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/addLost111")
|
||||
public String add1(MultipartFile image) throws IOException {
|
||||
log.info("新增用户: {}",image.getOriginalFilename());
|
||||
String url = aliOSSUtils.upload(image);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/lost1/{id}")
|
||||
public Result getById(@PathVariable Integer id){
|
||||
Lost1 lost1 = lost1Service.getById1(id);
|
||||
return Result.success(lost1);
|
||||
}
|
||||
@PostMapping("/list/lost11/{id}")
|
||||
public Result getByUserId(@PathVariable Integer id){
|
||||
List<Lost1> list = lost1Service.selectLostByUserId1(id);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.pojo.User;
|
||||
import com.example.service.LostService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class LostController {
|
||||
|
||||
@Autowired
|
||||
private LostService lostService;
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
@GetMapping("/list/lost")
|
||||
public Result list(){
|
||||
List<Lost> list = lostService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/list/addLost")
|
||||
public Result add(@RequestBody Lost lost) throws IOException {
|
||||
log.info("新增用户");
|
||||
lostService.addLost(lost);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/addLost1")
|
||||
public String add1(MultipartFile image) throws IOException {
|
||||
log.info("新增用户: {}",image.getOriginalFilename());
|
||||
String url = aliOSSUtils.upload(image);
|
||||
return url;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/{id}")
|
||||
public Result getById(@PathVariable Integer id){
|
||||
Lost lost = lostService.getById(id);
|
||||
return Result.success(lost);
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Market;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.service.MarketService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class MarketController {
|
||||
|
||||
@Autowired
|
||||
private MarketService marketService;
|
||||
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
|
||||
|
||||
@GetMapping("/list/market")
|
||||
public Result list(){
|
||||
List<Market> list = marketService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/list/addMarket")
|
||||
public Result addList(@RequestBody Market market){
|
||||
marketService.addMarket(market);
|
||||
return Result.success();
|
||||
}
|
||||
@PostMapping("/list/market/{userId}")
|
||||
public Result selectMarket(@PathVariable Integer userId){
|
||||
List<Market> list = marketService.selectMarket(userId);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/list/marketId/{id}")
|
||||
public Result selectIdMarket(@PathVariable Integer id){
|
||||
Market market1 = marketService.selectIdMarket(id);
|
||||
return Result.success(market1);
|
||||
}
|
||||
|
||||
@PostMapping("/list/addMarket1")
|
||||
public String add1(MultipartFile image) throws IOException {
|
||||
log.info("新增用户: {}",image.getOriginalFilename());
|
||||
String url = aliOSSUtils.upload(image);
|
||||
return url;
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Market;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.pojo.Task;
|
||||
import com.example.service.TaskService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
public class TaskController {
|
||||
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
@GetMapping("/list/task")
|
||||
public Result list(){
|
||||
List<Task> list = taskService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/addTask")
|
||||
public Result addTask(@RequestBody Task task){
|
||||
taskService.addTask(task);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/task/{userId}")
|
||||
public Result selectTask(@PathVariable Integer userId){
|
||||
List<Task> list = taskService.selectTask(userId);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/taskId/{id}")
|
||||
public Result selectTaskId(@PathVariable Integer id){
|
||||
Task task1 = taskService.selectTaskId(id);
|
||||
return Result.success(task1);
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.example.controller;
|
||||
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Result;
|
||||
import com.example.pojo.User;
|
||||
import com.example.service.UserService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
@GetMapping("/list/user")
|
||||
public Result list(){
|
||||
log.info("查询所有用户");
|
||||
List<User> list = userService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/add")
|
||||
public Result add(@RequestBody User user){
|
||||
log.info("新增用户");
|
||||
userService.addUser(user);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/list/add1")
|
||||
public String add1(MultipartFile image) throws IOException {
|
||||
log.info("新增用户: {}",image.getOriginalFilename());
|
||||
String url = aliOSSUtils.upload(image);
|
||||
return url;
|
||||
}
|
||||
|
||||
@PostMapping("/list/userUpdate/{id}")
|
||||
public Result getById(@PathVariable Integer id){
|
||||
userService.update(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list/user/studentid")
|
||||
public Result IsStudent(@RequestBody User user){
|
||||
User user1 = userService.IsStudentId(user);
|
||||
return user1!=null?Result.success("已注册"):Result.success("未注册");
|
||||
}
|
||||
|
||||
@PostMapping("/list/user/phone")
|
||||
public Result IsPhone(@RequestBody User user){
|
||||
User user1 = userService.IsPhone(user);
|
||||
return user1!=null?Result.success("已注册"):Result.success("未注册");
|
||||
}
|
||||
|
||||
|
||||
//根据学号和密码查询当前用户信息:
|
||||
@PostMapping("/list/user/password")
|
||||
public Result SelectStudent(@RequestBody User user){
|
||||
User user1 = userService.SelectStudent(user);
|
||||
return Result.success(user1);
|
||||
}
|
||||
|
||||
@PostMapping("/list/user/{id}")
|
||||
public Result selectStudentId(@PathVariable Integer id){
|
||||
User user1 = userService.selectStudentId(id);
|
||||
return Result.success(user1);
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Admin;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AdminMapper {
|
||||
@Select("select * from admin")
|
||||
public List<Admin> list();
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Comment;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CommentMapper {
|
||||
|
||||
@Select("select * from comment")
|
||||
public List<Comment> list();
|
||||
|
||||
@Select("select * from replycomment;")
|
||||
public List<Comment> list2();
|
||||
|
||||
@Delete("delete from comment where id=#{id}")
|
||||
public void deleteComment(Integer id);
|
||||
|
||||
@Insert("insert into comment(id, forumId, username, commentText, commentTime,replyId,parentId) " +
|
||||
"values (#{id},#{forumId},#{username},#{commentText},#{commentTime},#{replyId},#{parentId})")
|
||||
public void addComment(Comment comment);
|
||||
|
||||
@Insert("insert into replycomment (id, forumId, username, commentText, commentTime, replyId, parentId,replyName)" +
|
||||
"values (#{id},#{forumId},#{username},#{commentText},#{commentTime},#{replyId},#{parentId},#{replyName})")
|
||||
public void addReplyComment(Comment comment);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Forum;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ForumMapper {
|
||||
@Select("select forum.*,user.username,user.image from forum,user where forum.userId = user.id")
|
||||
public List<Forum> list();
|
||||
|
||||
|
||||
@Insert("insert into forum(id, title, content, image, releaseTime, userId) " +
|
||||
"values (#{id},#{title},#{content},#{image},#{releaseTime},#{userId})")
|
||||
public void addForum(Forum forum);
|
||||
|
||||
@Delete("delete from forum where id = #{id}")
|
||||
public void deleteForum(Integer id);
|
||||
|
||||
|
||||
@Select("select * from forum where id = #{id}")
|
||||
public Forum selectForum(@PathVariable Integer id);
|
||||
|
||||
@Select("select forum.*,user.username,user.image from forum,user where forum.userId = #{userId} and user.id = #{userId}")
|
||||
public List<Forum> selectUserIdForum(@PathVariable Integer userId);
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.mapper;
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Lost1;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface Lost1Mapper {
|
||||
@Select("select * from lost1")
|
||||
public List<Lost1> list();
|
||||
|
||||
@Insert("insert into lost1(description, image,name,uploadTime,isLoser, lostAddress, contact,userId) " +
|
||||
"values (#{description},#{image},#{name},#{uploadTime},#{isLoser},#{lostAddress},#{contact},#{userId})")
|
||||
public void addLost1(Lost1 lost1);
|
||||
|
||||
@Select("select * from lost1 where id = #{id}")
|
||||
public Lost1 getById1(Integer id);
|
||||
|
||||
@Select("select * from lost1 where userId=#{userId};")
|
||||
public List<Lost1> selectLostByUserId1(Integer userId);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface LostMapper {
|
||||
@Select("select * from lost")
|
||||
public List<Lost> list();
|
||||
|
||||
@Insert("insert into lost(description, image,name,uploadTime,isLoser, lostAddress, contact,userId) " +
|
||||
"values (#{description},#{image},#{name},#{uploadTime},#{isLoser},#{lostAddress},#{contact},#{userId})")
|
||||
public void addLost(Lost lost);
|
||||
|
||||
@Select("select * from lost where id = #{id}")
|
||||
public Lost getById(Integer id);
|
||||
|
||||
@Select("select * from lost where userId=#{userId};")
|
||||
public List<Lost> selectLostByUserId(Integer userId);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Market;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface MarketMapper {
|
||||
|
||||
@Select("select * from market;")
|
||||
public List<Market> list();
|
||||
|
||||
@Insert("insert into market(id, name, description, price, contact, image,uploadTime,userId)" +
|
||||
"values (#{id},#{name},#{description},#{price},#{contact},#{image},#{uploadTime},#{userId})")
|
||||
public void addMarket(Market market);
|
||||
|
||||
@Select("select * from market where userId=#{userId}")
|
||||
public List<Market> selectMarket(@PathVariable Integer userId);
|
||||
|
||||
@Select("select * from market where id=#{id}")
|
||||
public Market selectIdMarket(@PathVariable Integer id);
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.Task;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface TaskMapper {
|
||||
@Select("select * from task")
|
||||
public List<Task> list();
|
||||
|
||||
@Insert("insert into task(id, name, description, price, contact, userId, uploadTime) " +
|
||||
"values (#{id},#{name},#{description},#{price},#{contact},#{userId},#{uploadTime})")
|
||||
public void addTask(Task task);
|
||||
|
||||
@Select("select * from task where userId=#{userId};")
|
||||
public List<Task> selectTask(Integer userId);
|
||||
|
||||
@Select("select * from task where id=#{id}")
|
||||
public Task selectTaskId(Integer id);
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.example.mapper;
|
||||
|
||||
|
||||
import com.example.pojo.User;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.springframework.web.context.annotation.RequestScope;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface UserMapper {
|
||||
@Select("select * from user")
|
||||
public List<User> list();
|
||||
|
||||
|
||||
@Insert("insert into user (username, image, entryTime, password, isStudent, phone, studentId) " +
|
||||
"values (#{username},#{image},#{entryTime},#{password},#{isStudent},#{phone},#{studentId})")
|
||||
public void addUser(User user);
|
||||
|
||||
@Update("update user set isStudent = true where id = #{id}")
|
||||
public void update(Integer id);
|
||||
|
||||
|
||||
@Select("select * from user where studentId = #{studentId} and password = #{password};")
|
||||
public User login(User user);
|
||||
|
||||
@Select("select * from user where studentId = #{studentId}")
|
||||
public User IsStudentId(User user);
|
||||
|
||||
@Select("select * from user where phone = #{phone}")
|
||||
public User IsPhone(User user);
|
||||
|
||||
@Select("select isStudent from user where studentId = #{studentId} and password = #{password};")
|
||||
public User login_isStudent(User user);
|
||||
|
||||
@Select("select * from user where studentId = #{studentId} and password = #{password}")
|
||||
public User SelectStudent(User user);
|
||||
|
||||
@Select("select * from user where id = #{id}")
|
||||
public User selectStudentId(Integer id);
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.example.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Admin {
|
||||
private String username;
|
||||
private String password;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Comment {
|
||||
private Integer id;
|
||||
private Integer forumId;
|
||||
private String username;
|
||||
private String commentText;
|
||||
private LocalDateTime commentTime;
|
||||
private Integer replyId;
|
||||
private Integer parentId;
|
||||
private String replyName;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Forum {
|
||||
private Integer id;
|
||||
private String title;
|
||||
private String content;
|
||||
private Integer userId;
|
||||
private String image;
|
||||
private LocalDateTime releaseTime;
|
||||
private String username;
|
||||
private String headImage;
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.example.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Lost {
|
||||
private Integer id;//主键id
|
||||
private String description;//失物描述
|
||||
private String image;//失物图片
|
||||
private LocalDateTime uploadTime;//上传时间
|
||||
private String lostAddress;//丢失地点
|
||||
private String contact;//微信联系方式
|
||||
private String name;
|
||||
private Boolean isLoser;
|
||||
private Integer userId;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Lost1 {
|
||||
private Integer id;//主键id
|
||||
private String description;//失物描述
|
||||
private String image;//失物图片
|
||||
private LocalDateTime uploadTime;//上传时间
|
||||
private String lostAddress;//丢失地点
|
||||
private String contact;//微信联系方式
|
||||
private String name;
|
||||
private Boolean isLoser;
|
||||
private Integer userId;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.example.pojo;
|
||||
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Market {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String description;
|
||||
private Integer price;
|
||||
private String contact;
|
||||
private String image;
|
||||
private LocalDate uploadTime;
|
||||
private Integer userId;
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.example.pojo;
|
||||
|
||||
/**
|
||||
* 统一响应结果封装类
|
||||
*/
|
||||
public class Result {
|
||||
private Integer code ;//1 成功 , 0 失败
|
||||
private String msg; //提示信息
|
||||
private Object data; //数据 data
|
||||
|
||||
public Result() {
|
||||
}
|
||||
public Result(Integer code, String msg, Object data) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static Result success(Object data){
|
||||
return new Result(1, "success", data);
|
||||
}
|
||||
public static Result success(){
|
||||
return new Result(1, "success", null);
|
||||
}
|
||||
public static Result error(String msg){
|
||||
return new Result(0, msg, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Result{" +
|
||||
"code=" + code +
|
||||
", msg='" + msg + '\'' +
|
||||
", data=" + data +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.example.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Task {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String description;
|
||||
private int price;
|
||||
private String contact;
|
||||
private Integer userId;
|
||||
private LocalDateTime uploadTime;
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.example.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class User {
|
||||
private Integer id;
|
||||
private String username;
|
||||
private String image;
|
||||
private LocalDateTime entryTime;
|
||||
private String phone;
|
||||
private Boolean isStudent;
|
||||
private String password;
|
||||
private String studentId;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.Admin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdminService {
|
||||
|
||||
public List<Admin> list();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.Comment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CommentService {
|
||||
|
||||
public List<Comment> list();
|
||||
|
||||
public void addComment(Comment comment);
|
||||
|
||||
public void addReplyComment(Comment comment);
|
||||
|
||||
public void deleteComment(Integer id);
|
||||
|
||||
public List<Comment> list2();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.Forum;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ForumService {
|
||||
|
||||
public List<Forum> list();
|
||||
|
||||
public void addForum(Forum forum);
|
||||
|
||||
public void deleteForum(Integer id);
|
||||
|
||||
public Forum selectForum(Integer id);
|
||||
|
||||
public List<Forum> selectUserIdForum(Integer id);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.example.service;
|
||||
|
||||
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Lost1;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface Lost1Service {
|
||||
public List<Lost1> list();
|
||||
|
||||
public void addLost1(Lost1 lost1);
|
||||
|
||||
public Lost1 getById1(Integer id);
|
||||
|
||||
public List<Lost1> selectLostByUserId1(Integer userId);
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.example.service;
|
||||
|
||||
|
||||
import com.example.mapper.LostMapper;
|
||||
import com.example.pojo.Lost;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface LostService {
|
||||
|
||||
public List<Lost> list();
|
||||
|
||||
public void addLost(Lost lost);
|
||||
|
||||
public Lost getById(Integer id);
|
||||
|
||||
public List<Lost> selectLostByUserId(Integer userId);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.Market;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface MarketService {
|
||||
|
||||
public List<Market> list();
|
||||
public void addMarket(Market market);
|
||||
|
||||
public List<Market> selectMarket(Integer userId);
|
||||
|
||||
public Market selectIdMarket(Integer id);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.Market;
|
||||
import com.example.pojo.Task;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public interface TaskService {
|
||||
public List<Task> list();
|
||||
public void addTask(Task task);
|
||||
public List<Task> selectTask(Integer userId);
|
||||
|
||||
public Task selectTaskId(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.example.service;
|
||||
|
||||
import com.example.pojo.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserService {
|
||||
//返回所有用户
|
||||
public List<User> list();
|
||||
|
||||
public void addUser(User user);
|
||||
|
||||
public void update(Integer id);
|
||||
|
||||
User login(User user);
|
||||
|
||||
User login_isStudent(User user);
|
||||
|
||||
public User IsStudentId(User user);
|
||||
|
||||
public User IsPhone(User user);
|
||||
|
||||
|
||||
public User SelectStudent(User user);
|
||||
|
||||
public User selectStudentId(Integer userId);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
|
||||
import com.example.mapper.AdminMapper;
|
||||
import com.example.pojo.Admin;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AdminService implements com.example.service.AdminService {
|
||||
@Autowired
|
||||
private AdminMapper adminMapper;
|
||||
|
||||
@Override
|
||||
public List<Admin> list() {
|
||||
return adminMapper.list();
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
import com.example.mapper.CommentMapper;
|
||||
import com.example.pojo.Comment;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class CommentService implements com.example.service.CommentService {
|
||||
|
||||
@Autowired
|
||||
private CommentMapper commentMapper;
|
||||
@Override
|
||||
public List<Comment> list() {
|
||||
return commentMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addComment(Comment comment) {
|
||||
comment.setCommentTime(LocalDateTime.now());
|
||||
commentMapper.addComment(comment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addReplyComment(Comment comment) {
|
||||
comment.setCommentTime(LocalDateTime.now());
|
||||
commentMapper.addReplyComment(comment);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteComment(Integer id) {
|
||||
commentMapper.deleteComment(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Comment> list2() {
|
||||
return commentMapper.list2();
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
|
||||
import com.example.mapper.ForumMapper;
|
||||
import com.example.pojo.Forum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ForumService implements com.example.service.ForumService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ForumMapper forumMapper;
|
||||
@Override
|
||||
public List<Forum> list() {
|
||||
return forumMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addForum(Forum forum) {
|
||||
forum.setReleaseTime(LocalDateTime.now());
|
||||
forumMapper.addForum(forum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteForum(Integer id) {
|
||||
forumMapper.deleteForum(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Forum selectForum(Integer id) {
|
||||
return forumMapper.selectForum(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Forum> selectUserIdForum(Integer userId) {
|
||||
return forumMapper.selectUserIdForum(userId);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
|
||||
import com.example.mapper.Lost1Mapper;
|
||||
import com.example.mapper.LostMapper;
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.pojo.Lost1;
|
||||
import com.example.service.LostService;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class Lost1Service implements com.example.service.Lost1Service {
|
||||
@Autowired
|
||||
private Lost1Mapper lost1Mapper;
|
||||
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Lost1> list() {
|
||||
return lost1Mapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLost1(Lost1 lost1) {
|
||||
lost1.setUploadTime(LocalDateTime.now());
|
||||
lost1Mapper.addLost1(lost1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Lost1 getById1(Integer id) {
|
||||
return lost1Mapper.getById1(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Lost1> selectLostByUserId1(Integer userId) {
|
||||
return lost1Mapper.selectLostByUserId1(userId);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
import com.example.mapper.LostMapper;
|
||||
import com.example.pojo.Lost;
|
||||
import com.example.utils.AliOSSUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LostService implements com.example.service.LostService {
|
||||
|
||||
@Autowired
|
||||
private LostMapper lostMapper;
|
||||
|
||||
@Autowired
|
||||
private AliOSSUtils aliOSSUtils;
|
||||
|
||||
@Override
|
||||
public List<Lost> list() {
|
||||
return lostMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLost(Lost lost) {
|
||||
lost.setUploadTime(LocalDateTime.now());
|
||||
lostMapper.addLost(lost);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Lost getById(Integer id) {
|
||||
return lostMapper.getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Lost> selectLostByUserId(Integer userId) {
|
||||
return lostMapper.selectLostByUserId(userId);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
import com.example.mapper.MarketMapper;
|
||||
import com.example.pojo.Market;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class MarketService implements com.example.service.MarketService {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private MarketMapper marketMapper;
|
||||
|
||||
@Override
|
||||
public List<Market> list() {
|
||||
return marketMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMarket(Market market) {
|
||||
market.setUploadTime(LocalDate.now());
|
||||
marketMapper.addMarket(market);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Market> selectMarket(Integer userId) {
|
||||
return marketMapper.selectMarket(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Market selectIdMarket(Integer id) {
|
||||
return marketMapper.selectIdMarket(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
import com.example.mapper.TaskMapper;
|
||||
import com.example.pojo.Task;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TaskService implements com.example.service.TaskService {
|
||||
@Autowired
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
@Override
|
||||
public List<Task> list() {
|
||||
return taskMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTask(Task task) {
|
||||
task.setUploadTime(LocalDateTime.now());
|
||||
taskMapper.addTask(task);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Task> selectTask(Integer userId) {
|
||||
return taskMapper.selectTask(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Task selectTaskId(Integer id) {
|
||||
return taskMapper.selectTaskId(id);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.example.service.impl;
|
||||
|
||||
|
||||
import com.example.mapper.UserMapper;
|
||||
import com.example.pojo.User;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class UserService implements com.example.service.UserService {
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
@Override
|
||||
public List<User> list() {
|
||||
return userMapper.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addUser(User user) {
|
||||
|
||||
user.setEntryTime(LocalDateTime.now());
|
||||
user.setIsStudent(false);
|
||||
userMapper.addUser(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(Integer id) {
|
||||
userMapper.update(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User login(User user) {
|
||||
return userMapper.login(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User login_isStudent(User user) {
|
||||
return userMapper.login_isStudent(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User IsStudentId(User user) {
|
||||
return userMapper.IsStudentId(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User IsPhone(User user) {
|
||||
return userMapper.IsPhone(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User SelectStudent(User user) {
|
||||
return userMapper.SelectStudent(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public User selectStudentId(Integer id) {
|
||||
return userMapper.selectStudentId(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.example.utils;
|
||||
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.*;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* 阿里云 OSS 工具类
|
||||
*/
|
||||
|
||||
@Component
|
||||
public class AliOSSUtils {
|
||||
|
||||
private String endpoint = "https://oss-cn-beijing.aliyuncs.com";
|
||||
private String accessKeyId = "LTAI5tC2q5VBNHMmt9u9kF6f";
|
||||
private String accessKeySecret = "ip2E9rdQL2XffjAFGSh8M0QZfOgJmM";
|
||||
private String bucketName = "web-xiaoyuanqiang";
|
||||
|
||||
/**
|
||||
* 实现上传图片到OSS
|
||||
*/
|
||||
public String upload(MultipartFile file) throws IOException {
|
||||
// 获取上传的文件的输入流
|
||||
InputStream inputStream = file.getInputStream();
|
||||
|
||||
// 避免文件覆盖
|
||||
String originalFilename = file.getOriginalFilename();
|
||||
String fileName = UUID.randomUUID().toString() + originalFilename.substring(originalFilename.lastIndexOf("."));
|
||||
|
||||
//上传文件到 OSS
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
ossClient.putObject(bucketName, fileName, inputStream);
|
||||
|
||||
//文件访问路径
|
||||
String url = endpoint.split("//")[0] + "//" + bucketName + "." + endpoint.split("//")[1] + "/" + fileName;
|
||||
// 关闭ossClient
|
||||
ossClient.shutdown();
|
||||
return url;// 把上传到oss的路径返回
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
#?????
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
#??????url
|
||||
spring.datasource.url=jdbc:mysql://localhost:3306/db01
|
||||
#?????????
|
||||
spring.datasource.username=root
|
||||
#????????
|
||||
spring.datasource.password=1234
|
||||
|
||||
#??mybatis???, ????????
|
||||
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
#??mybatis??????????? a_column ------> aCloumn
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
server.port=8814
|
||||
spring.servlet.multipart.max-file-size=1000MB
|
||||
spring.servlet.multipart.max-request-size=100MB
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.example;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class DemoApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Eslint config file
|
||||
* Documentation: https://eslint.org/docs/user-guide/configuring/
|
||||
* Install the Eslint extension before using this feature.
|
||||
*/
|
||||
module.exports = {
|
||||
env: {
|
||||
es6: true,
|
||||
browser: true,
|
||||
node: true,
|
||||
},
|
||||
ecmaFeatures: {
|
||||
modules: true,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
wx: true,
|
||||
App: true,
|
||||
Page: true,
|
||||
getCurrentPages: true,
|
||||
getApp: true,
|
||||
Component: true,
|
||||
requirePlugin: true,
|
||||
requireMiniProgram: true,
|
||||
},
|
||||
// extends: 'eslint:recommended',
|
||||
rules: {},
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
# Windows
|
||||
[Dd]esktop.ini
|
||||
Thumbs.db
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
|
||||
# Node.js
|
||||
node_modules/
|
@ -0,0 +1,31 @@
|
||||
// app.js
|
||||
App({
|
||||
onLaunch() {
|
||||
// 展示本地存储能力
|
||||
const logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
wx.cloud.init({
|
||||
env:'cloud1-6gq468mcc1c4cbcd'//这里输入云开发id
|
||||
})
|
||||
|
||||
// 登录
|
||||
wx.login({
|
||||
success: res => {
|
||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||
}
|
||||
})
|
||||
},
|
||||
globalData: {
|
||||
userId:'',
|
||||
studentId:'210340012',
|
||||
// username:'个人中心',
|
||||
// imageUrl:'/images/wode.png',
|
||||
url:"http://localhost:8814",
|
||||
userinfo:{
|
||||
username:'个人中心',
|
||||
avatarUrl:'/images/shop/rikka.jpg'
|
||||
}
|
||||
},
|
||||
|
||||
})
|
@ -0,0 +1,65 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/home/home",
|
||||
"pages/contact/contact",
|
||||
"pages/info/info",
|
||||
"pages/message/message",
|
||||
"pages/delivery/delivery",
|
||||
"pages/market/market",
|
||||
"pages/market_publish/market_publish",
|
||||
"pages/task/task",
|
||||
"pages/goodsDetails/goodsDetails",
|
||||
"pages/lost/lost",
|
||||
"pages/lost_publish/lost_publish",
|
||||
"pages/login/login",
|
||||
"pages/forum/forum",
|
||||
"pages/forum1/forum1",
|
||||
"pages/forum2/forum2",
|
||||
"pages/myforum1/myforum1",
|
||||
"pages/myforum2/myforum2",
|
||||
"pages/mytask1/mytask1",
|
||||
"pages/mytask2/mytask2",
|
||||
"pages/mylost1/mylost1",
|
||||
"pages/mylost2/mylost2",
|
||||
"pages/mygoods1/mygoods1",
|
||||
"pages/mygoods2/mygoods2",
|
||||
"pages/goodsDetails1/goodsDetails1",
|
||||
"pages/task1/task1",
|
||||
"pages/task2/task2",
|
||||
"pages/goods/goods"
|
||||
],
|
||||
"tabBar": {
|
||||
"list": [{
|
||||
"pagePath": "pages/home/home",
|
||||
"text": "首页",
|
||||
"iconPath": "/images/shouye.png",
|
||||
"selectedIconPath": "/images/shouye_selected.png"
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
"pagePath": "pages/contact/contact",
|
||||
"text": "我的",
|
||||
"iconPath": "/images/wode.png",
|
||||
"selectedIconPath": "/images/wode_selected.png"
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
"window":{
|
||||
"backgroundTextStyle":"light",
|
||||
"navigationBarBackgroundColor": "#2b4b6b",
|
||||
"navigationBarTitleText": "智慧校园",
|
||||
"navigationBarTextStyle": "white",
|
||||
"backgroundColor": "#ff0000"
|
||||
},
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"usingComponents": {
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-field": "@vant/weapp/field/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
"van-radio": "@vant/weapp/radio/index",
|
||||
"van-radio-group": "@vant/weapp/radio-group/index"
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
/**app.wxss**/
|
||||
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 2.9 KiB |