Compare commits
5 Commits
master
...
wxr_branch
| Author | SHA1 | Date |
|---|---|---|
|
|
3a63de6415 | 1 year ago |
|
|
0d2f7672be | 1 year ago |
|
|
4f7575e59b | 1 year ago |
|
|
3107a57450 | 1 year ago |
|
|
c8d6b09a67 | 1 year ago |
@ -0,0 +1,22 @@
|
||||
package com.liu.covid.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
// 配置类,用于设置 MyBatis Plus 的拦截器
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
// 声明一个 MybatisPlusInterceptor Bean
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
// 创建 MybatisPlusInterceptor 对象
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
// 添加分页拦截器,指定数据库类型为 MySQL
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||
// 返回配置完成的拦截器实例
|
||||
return interceptor;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.liu.covid.controller;
|
||||
|
||||
|
||||
import com.liu.covid.entity.Department;
|
||||
import com.liu.covid.mapper.DepartMapper;
|
||||
import com.liu.covid.service.DepartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
// 控制器类,用于处理与部门相关的请求
|
||||
@RestController
|
||||
@RequestMapping("/depart")
|
||||
public class DepartController {
|
||||
|
||||
// 自动注入 DepartService 服务
|
||||
@Autowired
|
||||
DepartService service;
|
||||
|
||||
// 处理 GET 请求,返回所有部门信息的列表// 处理 GET 请求,返回所有部门信息的列表
|
||||
@GetMapping("/findAll")
|
||||
private List<String> findAll(){
|
||||
return service.getAll();
|
||||
}// 调用服务层方法获取所有部门信息
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.Department;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface DepartMapper extends BaseMapper<Department> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIden;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIdenMapper extends BaseMapper<EmpIden> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpIs;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpIsMapper extends BaseMapper<EmpIs> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.EmpHealth;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface EmpMapper extends BaseMapper<EmpHealth> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.MaterialManage;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface MaterialMapper extends BaseMapper<MaterialManage> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package com.liu.covid.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.liu.covid.entity.User;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface UserMapper extends BaseMapper<User> {
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package org.example;
|
||||
|
||||
/**
|
||||
* Hello world! wangciurui
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
System.out.println( "Hello World!" );
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@ -0,0 +1,15 @@
|
||||
# 应用名称
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/covid?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: 123456
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
server:
|
||||
port: 8080
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
type-enums-package:
|
||||
com.liu.covid.entity
|
||||
@ -1,85 +1,97 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Index from '../views/Index.vue'
|
||||
import Login from '../views/login.vue'
|
||||
import Login from '../views/Login.vue'
|
||||
Vue.use(VueRouter)
|
||||
|
||||
/**
|
||||
* Router configuration for the application
|
||||
* Defines the routes and their corresponding components.
|
||||
*/
|
||||
const routes = [
|
||||
//配置默认的路径,默认显示登录页
|
||||
{ path: '/', meta:false, component: () => import('../views/login.vue')},
|
||||
|
||||
// Configure the default path to display the login page
|
||||
{
|
||||
path: '/',
|
||||
meta: false,
|
||||
component: () => import('../views/Login.vue')
|
||||
},
|
||||
|
||||
{
|
||||
path: "/Index",
|
||||
name:"日常防控管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[
|
||||
name: "日常防控管理",
|
||||
component: Index,
|
||||
meta: true,
|
||||
children: [
|
||||
{
|
||||
path:"/RecordManage",
|
||||
name:"打卡记录",
|
||||
component:() => import('../views/RecordManage.vue')
|
||||
path: "/RecordManage",
|
||||
name: "打卡记录",
|
||||
component: () => import('../views/RecordManage.vue')
|
||||
},
|
||||
{
|
||||
path:"/AddRecord",
|
||||
name:"健康打卡申报",
|
||||
component:()=>import('../views/AddRecord.vue')
|
||||
path: "/AddRecord",
|
||||
name: "健康打卡申报",
|
||||
component: () => import('../views/AddRecord.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"异常人员管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[
|
||||
name: "异常人员管理",
|
||||
component: Index,
|
||||
meta: true,
|
||||
children: [
|
||||
{
|
||||
path:"/IdenManage",
|
||||
name:"疑似/确诊人员登记",
|
||||
component:() => import(/* webpackChunkName: "BlogManage" */ '../views/IdenManage.vue')
|
||||
//const Foo = () => import(/* webpackChunkName: "group-foo" */ './Foo.vue')
|
||||
path: "/IdenManage",
|
||||
name: "疑似/确诊人员登记",
|
||||
component: () => import('../views/IdenManage.vue')
|
||||
},
|
||||
{
|
||||
path:"/IsManage",
|
||||
name:"隔离人员登记",
|
||||
component:()=>import(/* webpackChunkName:"AddBlog" */ '../views/IsManage.vue')
|
||||
path: "/IsManage",
|
||||
name: "隔离人员登记",
|
||||
component: () => import('../views/IsManage.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"防疫物资管理",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[{
|
||||
path:"/MaterialManage",
|
||||
name:"防疫物资查看",
|
||||
component:()=>import(/* webpackChunkName:"MaterialManage" */ '../views/MaterialManage.vue')
|
||||
},{
|
||||
path:"/AddMaterial",
|
||||
name:"新增防疫物资",
|
||||
component:()=>import(/* webpackChunkName:"AddMaterial" */ '../views/AddMaterial.vue')
|
||||
}
|
||||
]
|
||||
name: "防疫物资管理",
|
||||
component: Index,
|
||||
meta: true,
|
||||
children: [
|
||||
{
|
||||
path: "/MaterialManage",
|
||||
name: "防疫物资查看",
|
||||
component: () => import('../views/MaterialManage.vue')
|
||||
},
|
||||
{
|
||||
path: "/AddMaterial",
|
||||
name: "新增防疫物资",
|
||||
component: () => import('../views/AddMaterial.vue')
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/Index",
|
||||
name:"疫情概况",
|
||||
component:Index,
|
||||
meta:true,
|
||||
children:[{
|
||||
path:"/EChart",
|
||||
name:"防疫数据可视化",
|
||||
component:()=>import(/* webpackChunkName:"MaterialManage" */ '../views/EChart.vue')
|
||||
}
|
||||
name: "疫情概况",
|
||||
component: Index,
|
||||
meta: true,
|
||||
children: [
|
||||
{
|
||||
path: "/EChart",
|
||||
name: "防疫数据可视化",
|
||||
component: () => import('../views/EChart.vue')
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
/**
|
||||
* Creates a new VueRouter instance with the defined routes.
|
||||
*/
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
routes
|
||||
mode: 'history', // Use HTML5 history mode
|
||||
base: process.env.BASE_URL, // Base URL for the application
|
||||
routes // Define the routes
|
||||
})
|
||||
|
||||
export default router
|
||||
export default router
|
||||
@ -0,0 +1,13 @@
|
||||
package com.liu.covid;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest
|
||||
class CovidApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="main" />
|
||||
</component>
|
||||
</module>
|
||||
Loading…
Reference in new issue