# offcn_parent
**Repository Path**: javayixin0921/offcn_parent
## Basic Information
- **Project Name**: offcn_parent
- **Description**: (基于springboot开发的健康管理系统)
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 23
- **Forks**: 4
- **Created**: 2021-07-19
- **Last Updated**: 2025-11-14
## Categories & Tags
**Categories**: bio-medical
**Tags**: None
## README
# offcn_parent
#### 介绍
(基于springboot开发的健康管理系统)
随着疫情的逐步结束,国民对于个人的身体健康越来越重视,对健康认识不断提高,对健康的需求也在不断增加,健康检查作为防患于未然的主动预防措施在人们思想中已有很深的认识,医疗管家管理系统 致力于建立一座健康管理机构和会员之间的灵活沟通的桥梁,医疗管家管理平台利用计算机对体检工作流程、结果收集、结论汇总、健康评估、会员管理等多种信息进行数字化管理,给会员提供定制化的健康体检方案,并持续追踪会员的健康状态,为会员的健康提供终身的服务。
#### 软件架构
软件架构说明
本项目采用maven分模块开发方式,即对整个项目拆分为几个maven工程,父工程提供统一的依赖规范,其余的每个maven 工程存放特定类型的代码,具体如下:
offcnpe_parent:父工程,打包方式为pom,统一锁定依赖的版本,同时聚合其他子模块 便于统一执行maven命令
offcnpe_pojo 数据模型,打包方式为jar,存放项目中使用到表对应的数据模型
offcnpe_interface:打包方式为jar,存放服务接口。
offcnpe_provider:Dubbo服务模块,打包方式为war,存放服务实现类、Dao接 口、Mapper映射文件等,作为服务提供方,需要部署到tomcat运行。
offcnpe_controller:小U健康管理后台,打包方式为war,作为Dubbo服务消费方,存放 Controller、HTML页面、js、css、spring配置文件等,需要部署到tomcat运行
offcnpe_mobile:移动端前台,打包方式为war,作为Dubbo服务消费方,存放 Controller、HTML页面、js、css、spring配置文件等,需要部署到tomcat运行.
offcnpe_util: 工具模块,打包方式为jar,存放项目中使用到的一些工具类、返回结果和常量类
#### 安装教程
Pom.xml
org.springframework.boot
spring-boot-starter-parent
2.4.5
pom
1.8
3.4.2
2.7.6
5.1.47
2.6.1
3.14
com.baomidou
mybatis-plus-boot-starter
${baomidou.version}
com.baomidou
mybatis-plus-generator
3.4.1
mysql
mysql-connector-java
${mysql.version}
io.springfox
springfox-swagger2
${swagger.version}
io.springfox
springfox-swagger-ui
${swagger.version}
org.apache.dubbo
dubbo-spring-boot-starter
${dubbo.version}
org.apache.poi
poi-ooxml
${poi.version}
创建子工程offcnpe_pojo
org.projectlombok
lombok
创建offcnpe_util工程
com.offcn
offcnpe_pojo
1.0
com.baomidou
mybatis-plus-generator
mysql
mysql-connector-java
org.apache.velocity
velocity-engine-core
2.0
创建offcnpe_interface工程
com.offcn
offcnpe_pojo
1.0
com.offcn
offcnpe_util
1.0
创建offcnpe_provider工程
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-test
test
com.baomidou
mybatis-plus-boot-starter
mysql
mysql-connector-java
runtime
org.apache.dubbo
dubbo-spring-boot-starter
org.apache.dubbo
dubbo-dependencies-zookeeper
2.7.6
pom
org.slf4j
slf4j-log4j12
com.offcn
offcnpe_interface
1.0
org.springframework.boot
spring-boot-starter-data-redis
com.alibaba
druid
1.1.20
org.springframework.boot
spring-boot-maven-plugin
Application.yml
#端口 访问路径
server:
port: 9001
servlet:
context-path: /
#spring应用名称
spring:
application:
name: offcnpe_provider
#数据源配置
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql:///offcnpe
username: root
password: root
type: com.alibaba.druid.pool.DruidDataSource
#mybatis-plus
mybatis-plus:
configuration:
#开启驼峰标识
map-underscore-to-camel-case: true
#控制台显示sql语句
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
global-config:
#逻辑删除
db-config:
logic-not-delete-value: 1
logic-delete-value: 0
#加载我们的xml文件
mapper-locations: classpath:/mappers/xml/*.xml
type-aliases-package: com.offcn.pojo
#dubbo端口和名称
dubbo:
protocol:
name: dubbo
port: 20880
registry:
address: zookeeper://192.168.18.230:2181
timeout: 60000
#扫描我们service注解
scan:
base-packages: com.offcn.service.impl
package com.offcn;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class PeServiceProviderApplication {
public static void main(String[] args) {
SpringApplication.run(PeServiceProviderApplication.class,args);
}
}
创建offcnpe_controller工程
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-data-redis
org.springframework.boot
spring-boot-devtools
runtime
true
org.springframework.boot
spring-boot-starter-test
test
org.apache.dubbo
dubbo-spring-boot-starter
org.apache.dubbo
dubbo-dependencies-zookeeper
2.7.6
pom
org.slf4j
slf4j-log4j12
mysql
mysql-connector-java
com.offcn
offcnpe_interface
1.0
com.alibaba
druid
1.1.20
com.alibaba
fastjson
1.2.68
org.springframework.boot
spring-boot-maven-plugin
true
true
application.yml
server:
servlet:
context-path: /
port: 9002
spring:
application:
name: offcnpe_controller
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql:///offcnpe
username: root
password: root
type: com.alibaba.druid.pool.DruidDataSource
devtools:
restart:
enabled: true
additional-paths: src/main/java
redis:
host: 192.168.18.230
port: 6379
password: 123456
dubbo:
protocol:
name: dubbo
port: 20881
registry:
address: zookeeper://192.168.18.230:2181
timeout: 60000
package com.offcn;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class PeControllerApplication {
public static void main(String[] args) {
SpringApplication.run(PeControllerApplication.class,args);
}
}
创建offcnpe_mobile移动端前台工程
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-data-redis
org.springframework.boot
spring-boot-devtools
runtime
true
org.springframework.boot
spring-boot-starter-test
test
org.apache.dubbo
dubbo-spring-boot-starter
org.apache.dubbo
dubbo-dependencies-zookeeper
2.7.6
pom
org.slf4j
slf4j-log4j12
mysql
mysql-connector-java
io.springfox
springfox-swagger2
io.springfox
springfox-swagger-ui
com.offcn
offcnpe_interface
1.0
com.alibaba
druid
1.1.20
org.springframework.boot
spring-boot-maven-plugin
application.yml
server:
servlet:
context-path: /
port: 9100
spring:
application:
name: offcnpe_mobile
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql:///offcnpe
username: root
password: root
type: com.alibaba.druid.pool.DruidDataSource
dubbo:
protocol:
name: dubbo
port: 21882
registry:
address: zookeeper://192.168.18.230:2181
timeout: 60000
package com.offcn;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class PeMobileApplication {
public static void main(String[] args) {
SpringApplication.run(PeMobileApplication.class,args);
}
}
基础环境搭建
使用Mybatis-plus逆向工程生成基本文件
public class MyBatisPlusGenerator {
public static void main(String[] args) {
// 代码生成器
AutoGenerator mpg = new AutoGenerator();
// 全局配置
GlobalConfig gc = new GlobalConfig();
//String projectPath = System.getProperty("user.dir");
gc.setOutputDir("F:\\1221\\workspace\\offcnpe_parent\\offcnpe_util\\src\\main\\java");
gc.setAuthor("yjq");
gc.setOpen(false);
//实体属性 Swagger2 注解
gc.setSwagger2(false);
mpg.setGlobalConfig(gc);
// 数据源配置
DataSourceConfig dsc = new DataSourceConfig();
//dsc.setUrl("jdbc:mysql://127.0.0.1:3306/demo?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true");
dsc.setUrl("jdbc:mysql:///offcnpe");
dsc.setDriverName("com.mysql.jdbc.Driver");
dsc.setUsername("root");
dsc.setPassword("root");
mpg.setDataSource(dsc);
// 包配置
PackageConfig pc = new PackageConfig();
pc.setParent("com.offcn");
pc.setEntity("pojo");
pc.setMapper("mapper");
pc.setController("controller");
mpg.setPackageInfo(pc);
// 配置模板
TemplateConfig templateConfig = new TemplateConfig();
//默认关闭不需要的生成内容
//templateConfig.setXml(null);
templateConfig.setService(null);
templateConfig.setServiceImpl(null);
mpg.setTemplate(templateConfig);
// 策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setNaming(NamingStrategy.underline_to_camel);
strategy.setColumnNaming(NamingStrategy.underline_to_camel);
strategy.setSuperEntityClass("com.baomidou.mybatisplus.extension.activerecord.Model");
strategy.setEntityLombokModel(true);
strategy.setRestControllerStyle(true);
strategy.setEntityLombokModel(true);
String tableNames="t_checkgroup,t_checkgroup_checkitem,t_checkitem,t_member,t_menu," +
"t_order,t_ordersetting," +
"t_permission,t_role,t_role_menu," +
"t_role_permission,t_setmeal,t_setmeal_checkgroup,t_user,t_user_role";
strategy.setInclude(tableNames.split(","));
strategy.setControllerMappingHyphenStyle(true);
strategy.setTablePrefix("t_");
mpg.setStrategy(strategy);
mpg.execute();
}
}
把pojo放到offcnpe_pojo工程中
把mapper的类放到offcnpe_provider工程中
把mapper的xml放到offcnpe_provider工程中的resources中
把controller放到offcnpe_controller工程中
导入工具类
把所需的工具类放到offcnpe_util中
在工具类中添加分页类
@Configuration
public class MyBatisPlusConfig {
/**
*分页插件
*/
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor mybatisPlusInterceptor=new MybatisPlusInterceptor();
PaginationInnerInterceptor innerInterceptor=new PaginationInnerInterceptor();
innerInterceptor.setDbType(DbType.MYSQL);
innerInterceptor.setOverflow(true);
mybatisPlusInterceptor.addInnerInterceptor(innerInterceptor);
return mybatisPlusInterceptor;
}
}
在ffcnpe_controller中添加静态资源
把index.html放到public 目录中
Loginstyle放到static目录中
把main目录中的内容放到static目录中
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)