Merge branch 'master' of https://bdgit.educoder.net/19833906703/psychological_health
commit
6482e5c613
@ -0,0 +1,55 @@
|
|||||||
|
package com.controller;
|
||||||
|
|
||||||
|
import com.domain.fenduan;
|
||||||
|
import com.untils.PageResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/fenduan")
|
||||||
|
public class fenduanController {
|
||||||
|
@Autowired
|
||||||
|
public com.service.fenduanService fenduanService;
|
||||||
|
|
||||||
|
@PostMapping("/Save")
|
||||||
|
public int Save(@RequestBody fenduan fenduan)
|
||||||
|
{
|
||||||
|
return fenduanService.insert(fenduan);
|
||||||
|
|
||||||
|
}
|
||||||
|
@DeleteMapping("/Delete/{id}")
|
||||||
|
public int Delete(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return fenduanService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/findById/{id}")
|
||||||
|
public fenduan findById(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return fenduanService.findById(id);
|
||||||
|
}
|
||||||
|
@PutMapping("/Update")
|
||||||
|
public int Update(@RequestBody fenduan fenduan)
|
||||||
|
{
|
||||||
|
|
||||||
|
return fenduanService.edit(fenduan);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/selectAll")
|
||||||
|
public List<fenduan> selectAll()
|
||||||
|
{
|
||||||
|
|
||||||
|
return fenduanService.selectAll();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,147 @@
|
|||||||
|
html,body {
|
||||||
|
/* overflow-y: scroll; */
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.login-container .input{
|
||||||
|
display: inline-block;
|
||||||
|
height: 47px;
|
||||||
|
width: 85%;
|
||||||
|
|
||||||
|
}
|
||||||
|
.login-container .input input {
|
||||||
|
background: transparent;
|
||||||
|
border: 0px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
padding: 12px 5px 12px 0;
|
||||||
|
height: 47px;
|
||||||
|
}
|
||||||
|
.login-container .el-form-item {
|
||||||
|
border: 1px solid #DCDFE6;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #454545;
|
||||||
|
}
|
||||||
|
.login-container .el-button--medium{
|
||||||
|
height: 50px;
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
.login-container .loginBox{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background: url('./../img/logingBg.png') no-repeat 100% 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.login-container .loginBox .el-form-item__content{
|
||||||
|
line-height: initial;
|
||||||
|
}
|
||||||
|
.login-container form {
|
||||||
|
position: absolute;
|
||||||
|
left: 20%;
|
||||||
|
top: 50%;
|
||||||
|
width: 520px;
|
||||||
|
padding: 35px 35px 15px 35px;
|
||||||
|
margin: -200px 0 0 0;
|
||||||
|
background:#f5f5f5;
|
||||||
|
}
|
||||||
|
.login-container .tips {
|
||||||
|
font-size: 14px;
|
||||||
|
/* // color: #fff; */
|
||||||
|
margin-bottom: 10px;
|
||||||
|
/* span {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
.login-container .svg-container {
|
||||||
|
padding: 6px 5px 6px 15px;
|
||||||
|
color: #889aa4;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
/* &_login {
|
||||||
|
font-size: 20px;
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
.login-container .title-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
.login-container .title-container .title {
|
||||||
|
font-size: 26px;
|
||||||
|
/* // font-weight: 400; */
|
||||||
|
color: #333;
|
||||||
|
margin: 0px auto 40px auto;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.login-container .title-container .set-language {
|
||||||
|
/* // color: #fff; */
|
||||||
|
position: absolute;
|
||||||
|
top: 5px;
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
.login-container {
|
||||||
|
position: fixed;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #2d3a4b;
|
||||||
|
background: url('./../img/bg.jpg');
|
||||||
|
-moz-background-size: 100% 100%;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
.login-container .show-pwd {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 7px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #889aa4;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.login-container .thirdparty-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 35px;
|
||||||
|
bottom: 28px;
|
||||||
|
}
|
||||||
|
.logoInfo{
|
||||||
|
padding-bottom:35px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.logoInfo span{
|
||||||
|
font-size: 22px;
|
||||||
|
padding: 0 10px;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
}
|
||||||
|
.logoInfo .logo{
|
||||||
|
background: url(../img/loginLogo.png) no-repeat;
|
||||||
|
display:inline-block;
|
||||||
|
width: 200px;
|
||||||
|
height: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.tipInfo{font-size: 12px;}
|
||||||
|
.tipInfo span{
|
||||||
|
color: #66b1ff;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
.tipInfo .el-checkbox{
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.svg-container span{
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.svg-container .user{
|
||||||
|
background: url(../img/user.png) no-repeat 0 50%;
|
||||||
|
}
|
||||||
|
.svg-container .username{
|
||||||
|
background: url(../img/pwd.png) no-repeat 0 50%;
|
||||||
|
}
|
@ -0,0 +1,245 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>心理测评系统</title>
|
||||||
|
<meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
|
||||||
|
<!-- 引入样式 -->
|
||||||
|
<link rel="stylesheet" href="../plugins/elementui/index.css">
|
||||||
|
<link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" href="../css/style.css">
|
||||||
|
<!-- 引入组件库 -->
|
||||||
|
<script type="text/javascript" src="../js/jquery.min.js"></script>
|
||||||
|
<script src="../js/vue.js"></script>
|
||||||
|
<script src="../plugins/elementui/index.js"></script>
|
||||||
|
<script src="../js/axios-0.18.0.js"></script>
|
||||||
|
<style type="text/css">
|
||||||
|
.el-main{
|
||||||
|
position: absolute;
|
||||||
|
top: 70px;
|
||||||
|
bottom: 0px;
|
||||||
|
left: 200px;
|
||||||
|
right: 10px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="hold-transition skin-purple sidebar-mini">
|
||||||
|
<div id="app">
|
||||||
|
|
||||||
|
<el-container>
|
||||||
|
<el-header class="main-header" style="height:70px;">
|
||||||
|
<nav class="navbar navbar-static-top" :class=''>
|
||||||
|
<!-- Logo -->
|
||||||
|
<a href="#" class="logo" style="text-align:center;">
|
||||||
|
|
||||||
|
<span>心理测评系统</span>
|
||||||
|
|
||||||
|
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<input type="image" src="../img/展开.svg" style="width: 30px;position: absolute;top:15px;left: 160px" style="" @click="q"/>
|
||||||
|
<div class="right-menu">
|
||||||
|
|
||||||
|
<el-dropdown class="avatar-container right-menu-item" trigger="click">
|
||||||
|
<div class="avatar-wrapper">
|
||||||
|
|
||||||
|
欢迎你:{{username}}
|
||||||
|
</div>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item divided>
|
||||||
|
|
||||||
|
<span style="display:block;"><a href="/logout">退出</a></span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</el-header>
|
||||||
|
<el-container>
|
||||||
|
|
||||||
|
<el-menu :collapse="isCollapse" class="el-menu-vertical-demo" >
|
||||||
|
<el-submenu v-for="menu in menuList" :index="menu.path">
|
||||||
|
<template slot="title">
|
||||||
|
<i class="fa" :class="menu.icon"></i>
|
||||||
|
|
||||||
|
<span slot="title"> {{menu.title}}</span>
|
||||||
|
</template>
|
||||||
|
<template v-for="child in menu.children">
|
||||||
|
<el-menu-item :index="child.path">
|
||||||
|
<a :href="child.linkUrl" target="right" @click="add(child)">{{child.title}}</a>
|
||||||
|
</el-menu-item>
|
||||||
|
</template>
|
||||||
|
</el-submenu>
|
||||||
|
</el-menu>
|
||||||
|
|
||||||
|
|
||||||
|
<div style="width: 100%">
|
||||||
|
<el-tag @click="table">桌面</el-tag>
|
||||||
|
<el-tag
|
||||||
|
v-for="tag in tags"
|
||||||
|
:key="tag.name"
|
||||||
|
|
||||||
|
@click="t(tag.s)"
|
||||||
|
|
||||||
|
|
||||||
|
>
|
||||||
|
{{tag.name}}
|
||||||
|
</el-tag>
|
||||||
|
<iframe name="right" width="100%" height="600px" frameborder="0" src="table.html" id="f"></iframe>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</el-container>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: {
|
||||||
|
username: null,//用户名
|
||||||
|
menuList: [ ],
|
||||||
|
isCollapse:true,
|
||||||
|
tags: [
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
axios.get("/user/getUsername").then((response)=>{
|
||||||
|
this.username=response.data;
|
||||||
|
localStorage.setItem("username",this.username);
|
||||||
|
|
||||||
|
}).finally(()=>{
|
||||||
|
|
||||||
|
axios.get("/user/getByUserId?username="+this.username).then((response)=>{
|
||||||
|
localStorage.setItem("userId",response.data)
|
||||||
|
});
|
||||||
|
axios.get("/user/getByUserName?username="+this.username).then((response)=>{
|
||||||
|
localStorage.setItem("t",response.data);
|
||||||
|
if(response.data==0)
|
||||||
|
{
|
||||||
|
this.menuList=[{
|
||||||
|
"path": "1",
|
||||||
|
"title": "管理员模块",
|
||||||
|
"icon": "fa-dashboard",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/1-1",
|
||||||
|
"title": "个人账号",
|
||||||
|
"linkUrl": "user1.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/1-2",
|
||||||
|
"title": "用户管理",
|
||||||
|
"linkUrl": "user.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "/1-3",
|
||||||
|
"title": "题目管理",
|
||||||
|
"linkUrl": "timu.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "/1-4",
|
||||||
|
"title": "测评分析",
|
||||||
|
"linkUrl": "fenduan.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/1-5",
|
||||||
|
"title": "测评结果",
|
||||||
|
"linkUrl": "all1.html",
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
this.menuList=[{
|
||||||
|
"path": "1",
|
||||||
|
"title": "用户模块",
|
||||||
|
"icon": "fa-dashboard",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"path": "/1-1",
|
||||||
|
"title": "个人账号",
|
||||||
|
"linkUrl": "user1.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "/1-2",
|
||||||
|
"title": "测试",
|
||||||
|
"linkUrl": "ceshi.html",
|
||||||
|
"children": []
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"path": "/1-3",
|
||||||
|
"title": "评测成绩",
|
||||||
|
"linkUrl": "all.html",
|
||||||
|
"children": []
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
q()
|
||||||
|
{
|
||||||
|
this.isCollapse=!this.isCollapse;
|
||||||
|
},
|
||||||
|
table()
|
||||||
|
{
|
||||||
|
document.getElementById("f").src="table.html";
|
||||||
|
},
|
||||||
|
t(value)
|
||||||
|
{
|
||||||
|
document.getElementById("f").src=value;
|
||||||
|
},
|
||||||
|
add(child)
|
||||||
|
{
|
||||||
|
var f={name:child.title,s:child.linkUrl};
|
||||||
|
this.tags=[];
|
||||||
|
this.tags.push(f);
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
$(function() {
|
||||||
|
var wd = 200;
|
||||||
|
$(".el-main").css('width', $('body').width() - wd + 'px');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.el-menu-vertical-demo:not(.el-menu--collapse) {
|
||||||
|
width: 200px;
|
||||||
|
min-height: 400px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.controller;
|
||||||
|
|
||||||
|
import com.domain.timu;
|
||||||
|
import com.service.timuService;
|
||||||
|
import com.untils.PageResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/timu")
|
||||||
|
public class timuController {
|
||||||
|
@Autowired
|
||||||
|
public com.service.timuService timuService;
|
||||||
|
|
||||||
|
@PostMapping("/Save")
|
||||||
|
public int Save(@RequestBody timu timu)
|
||||||
|
{
|
||||||
|
return timuService.insert(timu);
|
||||||
|
|
||||||
|
}
|
||||||
|
@DeleteMapping("/Delete/{id}")
|
||||||
|
public int Delete(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return timuService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/SelectPage/{size}/{current}")
|
||||||
|
public PageResult selectPage(@PathVariable Integer size, @PathVariable Integer current, timu timu)
|
||||||
|
{
|
||||||
|
return timuService.SelectPage(timu,size,current);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/findById/{id}")
|
||||||
|
public timu findById(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return timuService.findById(id);
|
||||||
|
}
|
||||||
|
@PutMapping("/Update")
|
||||||
|
public int Update(@RequestBody timu timu)
|
||||||
|
{
|
||||||
|
|
||||||
|
return timuService.edit(timu);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/selectAll")
|
||||||
|
public List<timu> selectAll()
|
||||||
|
{
|
||||||
|
|
||||||
|
return timuService.selectAll();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.controller;
|
||||||
|
|
||||||
|
import com.domain.user;
|
||||||
|
import com.service.userService;
|
||||||
|
import com.untils.PageResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user")
|
||||||
|
public class userController {
|
||||||
|
@Autowired
|
||||||
|
public userService userService;
|
||||||
|
|
||||||
|
@PostMapping("/Save")
|
||||||
|
public int Save(@RequestBody user user)
|
||||||
|
{
|
||||||
|
return userService.insert(user);
|
||||||
|
|
||||||
|
}
|
||||||
|
@DeleteMapping("/Delete/{id}")
|
||||||
|
public int Delete(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return userService.delete(id);
|
||||||
|
}
|
||||||
|
@PutMapping("/Update")
|
||||||
|
public int Update(@RequestBody user user)
|
||||||
|
{
|
||||||
|
return userService.edit(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/SelectPage/{size}/{current}")
|
||||||
|
public PageResult selectPage(@PathVariable Integer size, @PathVariable Integer current,user user)
|
||||||
|
{
|
||||||
|
return userService.SelectPage(user,size,current);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/SelectPageStudent/{size}/{current}")
|
||||||
|
public PageResult selectPageStudent(@PathVariable Integer size, @PathVariable Integer current,user user)
|
||||||
|
{
|
||||||
|
return userService.SelectPageStudent(user,size,current);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/findById/{id}")
|
||||||
|
public user findById(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return userService.findById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/login")
|
||||||
|
public Boolean login(@RequestBody user user)
|
||||||
|
{
|
||||||
|
user user1= userService.login(user);
|
||||||
|
if (user1==null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//获取当前登录用户的用户名
|
||||||
|
@GetMapping("/getUsername")
|
||||||
|
public String getUsername(){
|
||||||
|
|
||||||
|
org.springframework.security.core.userdetails.User user =
|
||||||
|
(org.springframework.security.core.userdetails.User)
|
||||||
|
SecurityContextHolder.getContext().getAuthentication().getPrincipal();
|
||||||
|
return user.getUsername();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getByUserName")
|
||||||
|
public int getByUserName(String username){
|
||||||
|
|
||||||
|
return userService.selectByUserName(username).getType();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getByUserId")
|
||||||
|
public int getByUserId(String username){
|
||||||
|
|
||||||
|
return userService.selectByUserName(username).getId();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.controller;
|
||||||
|
|
||||||
|
import com.domain.all;
|
||||||
|
import com.domain.ut;
|
||||||
|
import com.untils.PageResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ut")
|
||||||
|
public class utController {
|
||||||
|
@Autowired
|
||||||
|
public com.service.utService utService;
|
||||||
|
|
||||||
|
@PostMapping("/Save")
|
||||||
|
public int Save(@RequestBody List<ut> uts)
|
||||||
|
{
|
||||||
|
UUID uuid = UUID.randomUUID();
|
||||||
|
|
||||||
|
for (ut item:uts)
|
||||||
|
{
|
||||||
|
item.setBiaoshi(uuid.toString());
|
||||||
|
utService.insert(item);
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
@DeleteMapping("/Delete/{id}")
|
||||||
|
public int Delete(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return utService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/SelectPage/{size}/{current}")
|
||||||
|
public PageResult selectPage(@PathVariable Integer size, @PathVariable Integer current, ut ut)
|
||||||
|
{
|
||||||
|
return utService.SelectPage(ut,size,current);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/findById/{id}")
|
||||||
|
public ut findById(@PathVariable Integer id)
|
||||||
|
{
|
||||||
|
|
||||||
|
return utService.findById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@PutMapping("/Update")
|
||||||
|
public int Update(@RequestBody ut ut)
|
||||||
|
{
|
||||||
|
|
||||||
|
return utService.edit(ut);
|
||||||
|
}
|
||||||
|
@GetMapping("/selectAll/{userId}")
|
||||||
|
public List<all> selectAll(@PathVariable int userId)
|
||||||
|
{
|
||||||
|
|
||||||
|
return utService.selectAll(userId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/selectAll1")
|
||||||
|
public List<all> selectAll1()
|
||||||
|
{
|
||||||
|
|
||||||
|
return utService.selectAll1();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/selectDetails/{biaoshi}")
|
||||||
|
public List<ut> selectDetails(@PathVariable String biaoshi) {
|
||||||
|
return utService.selectDetails(biaoshi);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,133 @@
|
|||||||
|
/*
|
||||||
|
SQLyog Ultimate v12.08 (64 bit)
|
||||||
|
MySQL - 8.0.26 : Database - xinli
|
||||||
|
*********************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*!40101 SET NAMES utf8 */;
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=''*/;
|
||||||
|
|
||||||
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||||
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||||
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||||
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||||
|
CREATE DATABASE /*!32312 IF NOT EXISTS*/`xinli` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */;
|
||||||
|
|
||||||
|
USE `xinli`;
|
||||||
|
|
||||||
|
/*Table structure for table `fenduan` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `fenduan`;
|
||||||
|
|
||||||
|
CREATE TABLE `fenduan` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`start` double DEFAULT NULL,
|
||||||
|
`end` double DEFAULT NULL,
|
||||||
|
`guo` varchar(500) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `fenduan` */
|
||||||
|
|
||||||
|
insert into `fenduan`(`id`,`start`,`end`,`guo`) values (9,0,59,'抑郁'),(10,60,85,'正常'),(11,85,100,'精神非常好');
|
||||||
|
|
||||||
|
/*Table structure for table `liaotian` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `liaotian`;
|
||||||
|
|
||||||
|
CREATE TABLE `liaotian` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`one` int DEFAULT NULL,
|
||||||
|
`two` int DEFAULT NULL,
|
||||||
|
`content` longtext,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `liaotian` */
|
||||||
|
|
||||||
|
insert into `liaotian`(`id`,`one`,`two`,`content`) values (17,6,7,'<div style=\"margin-top: 10px\">李丽说:无奈</div><div style=\"margin-top: 10px\">李丽说:好累啊</div><div style=\"margin-top: 10px\">孙策说:去你的</div>');
|
||||||
|
|
||||||
|
/*Table structure for table `mokuai` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `mokuai`;
|
||||||
|
|
||||||
|
CREATE TABLE `mokuai` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(200) DEFAULT NULL,
|
||||||
|
`quanzhon` varchar(200) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `mokuai` */
|
||||||
|
|
||||||
|
insert into `mokuai`(`id`,`name`,`quanzhon`) values (3,'第一模块','30'),(4,'第二模块','30'),(5,'第三模块','30');
|
||||||
|
|
||||||
|
/*Table structure for table `timu` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `timu`;
|
||||||
|
|
||||||
|
CREATE TABLE `timu` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`xuhao` int DEFAULT NULL,
|
||||||
|
`them` varchar(200) DEFAULT NULL,
|
||||||
|
`one` varchar(200) DEFAULT NULL,
|
||||||
|
`two` varchar(200) DEFAULT NULL,
|
||||||
|
`three` varchar(200) DEFAULT NULL,
|
||||||
|
`four` varchar(200) DEFAULT NULL,
|
||||||
|
`ok` varchar(200) DEFAULT NULL,
|
||||||
|
`fen` double DEFAULT NULL,
|
||||||
|
`da` varchar(200) DEFAULT NULL,
|
||||||
|
`mokuaiId` int DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `timu` */
|
||||||
|
|
||||||
|
insert into `timu`(`id`,`xuhao`,`them`,`one`,`two`,`three`,`four`,`ok`,`fen`,`da`,`mokuaiId`) values (8,1,'童年','快乐','悲伤','兴奋','优秀','快乐',20,NULL,3),(9,2,'成年','压抑','忧郁','失败','成功','成功',10,NULL,3),(10,1,'吃饭','爱吃','厌食','暴饮暴食','正常就餐','正常就餐',20,NULL,4),(11,2,'睡觉','嗜睡','失眠','正常','压抑','正常',30,NULL,4),(12,1,'自我评价','正常','神经','快乐','失败','快乐',10,NULL,5),(13,2,'未来规划','努力生活','混吃等死','积极向上','好好学习','积极向上',10,NULL,5);
|
||||||
|
|
||||||
|
/*Table structure for table `user` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `user`;
|
||||||
|
|
||||||
|
CREATE TABLE `user` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`username` varchar(200) DEFAULT NULL,
|
||||||
|
`password` varchar(200) DEFAULT NULL,
|
||||||
|
`type` int DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `user` */
|
||||||
|
|
||||||
|
insert into `user`(`id`,`username`,`password`,`type`) values (1,'admin','123',0),(6,'李丽','123',1),(7,'孙策','123',1),(8,'李云','123',1);
|
||||||
|
|
||||||
|
/*Table structure for table `ut` */
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ut`;
|
||||||
|
|
||||||
|
CREATE TABLE `ut` (
|
||||||
|
`id` int NOT NULL AUTO_INCREMENT,
|
||||||
|
`userId` int DEFAULT NULL,
|
||||||
|
`xuhao` int DEFAULT NULL,
|
||||||
|
`them` varchar(200) DEFAULT NULL,
|
||||||
|
`one` varchar(200) DEFAULT NULL,
|
||||||
|
`two` varchar(200) DEFAULT NULL,
|
||||||
|
`three` varchar(200) DEFAULT NULL,
|
||||||
|
`four` varchar(200) DEFAULT NULL,
|
||||||
|
`ok` varchar(200) DEFAULT NULL,
|
||||||
|
`da` varchar(200) DEFAULT NULL,
|
||||||
|
`fen` double DEFAULT NULL,
|
||||||
|
`mokuaiId` int DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=utf8mb3;
|
||||||
|
|
||||||
|
/*Data for the table `ut` */
|
||||||
|
|
||||||
|
insert into `ut`(`id`,`userId`,`xuhao`,`them`,`one`,`two`,`three`,`four`,`ok`,`da`,`fen`,`mokuaiId`) values (118,7,1,'童年','快乐','悲伤','兴奋','优秀','快乐','快乐',20,3),(119,7,2,'成年','压抑','忧郁','失败','成功','成功','压抑',0,3),(120,7,1,'吃饭','爱吃','厌食','暴饮暴食','正常就餐','正常就餐','正常就餐',20,4),(121,7,2,'睡觉','嗜睡','失眠','正常','压抑','正常','正常',30,4),(122,7,1,'自我评价','正常','神经','快乐','失败','快乐','正常',0,5),(123,7,2,'未来规划','努力生活','混吃等死','积极向上','好好学习','积极向上','努力生活',0,5),(130,8,1,'童年','快乐','悲伤','兴奋','优秀','快乐','快乐',20,3),(131,8,2,'成年','压抑','忧郁','失败','成功','成功','成功',10,3),(132,8,1,'吃饭','爱吃','厌食','暴饮暴食','正常就餐','正常就餐','正常就餐',20,4),(133,8,2,'睡觉','嗜睡','失眠','正常','压抑','正常','正常',30,4),(134,8,1,'自我评价','正常','神经','快乐','失败','快乐','快乐',10,5),(135,8,2,'未来规划','努力生活','混吃等死','积极向上','好好学习','积极向上','积极向上',10,5),(136,6,1,'童年','快乐','悲伤','兴奋','优秀','快乐','快乐',20,3),(137,6,2,'成年','压抑','忧郁','失败','成功','成功','失败',0,3),(138,6,1,'吃饭','爱吃','厌食','暴饮暴食','正常就餐','正常就餐','暴饮暴食',0,4),(139,6,2,'睡觉','嗜睡','失眠','正常','压抑','正常','正常',30,4),(140,6,1,'自我评价','正常','神经','快乐','失败','快乐','神经',0,5),(141,6,2,'未来规划','努力生活','混吃等死','积极向上','好好学习','积极向上','努力生活',0,5);
|
||||||
|
|
||||||
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||||
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
Loading…
Reference in new issue