当前位置:网站首页>Project practice - smart health
Project practice - smart health
2022-07-23 05:42:00 【Hash..】
Smart health project
2022.3.2-2022.3.16 --BDY
List of articles
- Smart health project
- Project introduction and technical framework
- One 、 Project process
- Two 、 Project code harvest
- 3、 ... and 、 Project questions
- 1. Initial project discussion
- 2. About setmeal Medium add The problem with the method
- 3. About ordersetting Date format problem in
- 4. About ordersetting in mysql Time zone problem
- 5. About static page display
- 6. About List<map> The problem of
- 7. About array null pointer exception The problem of
- 8. About business Report problems
- Four 、 summary
Project introduction and technical framework
Chuanzhi health management system is a business system applied to health management institutions , Realize the visualization of the work content of the health management organization 、 Member management specialization 、 Digital health assessment 、 Health intervention process 、 Knowledge base integration , So as to improve the work efficiency of health managers , Strengthen interaction with members , Enhance managers' understanding of the operation of health management institutions .
—
Main back-end technology stack :
Spring,SpringMVC,Mybatis (SSM frame ) zookeeper,dubbo,SpringSecrity
( Distribution and permissions ) Git,Apache POI,Echarts ( Version control and report )
Tencent cloud SMS service , Qiniu cloud storage service , Wechat development platform ( Third party service )
One 、 Project process
1. Background management system preparation
Booking Management
- CheckItem
- CheckGroup
- SetMeal
Package management is not complete , Edit and delete methods are not written
- OrderSetting
Main learning content :
1. Mainly about CRUD operation , And basic SSM Project preparation
2. Learning with paging query
3. About calendar controls and EXCEL File upload download
4. Upload pictures about qiniu cloud service
2. Preparation of wechat reservation system
- Setmeal Show all and details
- Login And verification code
Main learning content :
1.CRUD And Tencent cloud SMS service
2. Login and SMS authentication services
3. Wechat development platform operation
4. Page static technology
3. Graphic display and permission control
- Report_setmeal
- Report_member
- Report_business
4.Security
validate logon , To give permission
In the background code xiaoming No permission to delete check itemsPermission management is just a preliminary study , Simply use it in the system to understand the process
Main learning content :
1.Echarts Query and upload data about graphic reports
2. About Spring Security Learning to use
4. Database design
## Table Association and description are not displayed
5. General framework and configuration of the project
1. General framework
- health_parent
Parent , Unified management
- health_backend
Background system
- health_common Store tools and entity classes
- health_interface
Service interface
- health_jobs
About timing components
- health_M
Wechat end
health_servide_provider Deposit dubbo Medium service service
2. project pom rely on
The main pom Depending on common,interface Depend on commom, The rest depends on interface,parent Realization pom Document version control .
3. To configure
Primary profile
1.log4j.properties: Log files
2.springmvc.xml: About SpringMVC To configure , Annotation driven , Package scanning
3.spring-redis.xml:redis cache ,jedis Connection pool
4.spring-security.xml:SpringSecurity Access control
5.web.xml:web Container configuration , Interact with the front end
6.redis.properties:redis A launch configuration
7.freemarker.properties: Web page static technology
8.spring-service.xml: Service registration , Package scanning
9.spring-dao.xml:mybatis Use JDBC To configure
10.spring-tx.xml: Used to enable transaction support
Two 、 Project code harvest
1. Interact with the front page (springmvc)


The project is mainly through ajax Request to visit , commonly get A request is a request for data , Put the data to be transferred to the background in url in , Data is generally the basic type ,post The request is usually to transmit data to the background , The data is mainly placed in the form or request body . By observing the front page, you can know how the background needs to operate
Controller layer , adopt @RequestMapping To map requests , adopt @RequestBody To get the returned json Data and encapsulation , Or by @RequestParam To get general data , And then through @Reference( call dubbo) call service Layer to get services .
In the returned data , Generally, in entity classes entity Add the return entity class Result, Then return Result object .
2. Service layer (spring)
Project Controller Layer by calling dubbo Services to access service layer , stay service Business code is mainly written in the layer , And then call Dao Layer access database , Get data
Main notes @Service(interfaceClass = OrderService.class),@Transactional
3. Data access layer (mybatis)
mybatis in Dao After the interface is called, it will pass dao.xml Medium sql Statement to query the database . Main design CRUD Associated query with multiple tables and condition query
//mapper A dynamic proxy
4. Other entity classes and operations
When writing entity classes, you need to pay attention to the tables in the corresponding database , And paging queries PageQuery, Return results Result The entity class
@PreAuthorize(“hasAuthority(‘CHECKITEM_DELETE’)”)// Permission to check , Permission verification annotation use
How to use paging query , How to use dates
3、 ... and 、 Project questions
1. Initial project discussion
// Go to zookepper Service registry to find services , The role of annotations
@Reference// the reason being that int So no parsing, no requestBody
public Result delete( Integer id){// because RestController ,java The data goes to json data
// Specify which service interface is implemented @Service(interfaceClass = CheckItemService.class)
Mysql Version of the problem driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql://localhost:3306/health?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong"
//checkgroupIds The name should be the same as the one worn back from the front
public Result add(@RequestBody Setmeal setmeal,Integer[] checkgroupIds){
2. About setmeal Medium add The problem with the method
stay setmealService Can call to get id stay Controller Problems that cannot be found in , There is no id, To call Dao
After the new method of id value
3. About ordersetting Date format problem in
// The data in the database here is 2022-03-01;
// The data transmitted is 2022-3-1;
// Yes ordersetting.html Add 0
// No addition 0 It can also be successful ,?mybatis Will judge automatically ?==》 sql sentence SELECT * FROM t_ordersetting WHERE orderDate BETWEEN ‘2022-3-4’ AND ‘2022-3-24’; You can also query successfully
// Note that zero is not required , Add 0 No addition 0 All can succeed
4. About ordersetting in mysql Time zone problem
// there date There will be problems after importing , Because the database time is UTC Eight hours earlier than China , So the time passed by will become the time of the previous day
Time zone details //https://blog.csdn.net/qq631431929/article/details/51731834
// Method , Change time zone hongkong
// One more question ,select error ,insert Able to operate ???
5. About static page display
The static page in the original video will not overwrite the original page after adding new data , You need to delete the original file first , Add static pages .
// Static web pages will not overwrite the original static web pages
// terms of settlement , Delete the original file ,new File(outputPath + “\” + htmlname).delete();
6. About List<map> The problem of
// here list The value of will overwrite the original value ?????
//https://blog.csdn.net/ChaoticNg/article/details/121669316LIst<map>
// stay for Inside the loop Map map = new HashMap(); that will do , Create a new one in the heap at a time map, To prevent from covering .
// because list Pointing to map The address of , So whenever you check list, stay map There is only one data in
7. About array null pointer exception The problem of
// An array null pointer exception occurred , The solution is to check the quantity first and then assign a value
8. About business Report problems
// What you can find in the database here is the data from the first day to all days after , Not the data from the first day of this month to this day , There is a problem
// modify , In the database query statement, the limit is less than this day
Four 、 summary
This project lasts a total of 16 God , Generally speaking, the efficiency is very low , Normally, it should be within ten days . This project is mainly based on SSM Of CRUD, To study the SpringSecurity and Redis Cache issues , Reviewed a lot of things , I also learned the development process and development specifications of the whole project .
Including Tencent cloud , Qiniuyun , Development of wechat end , It also makes simple use of zookeeper and dubbo Building distributed systems , Also learned paging Inquire about , Calendar operation , Report and graphic operations .The project was successfully uploaded to gitee url:https://gitee.com/bian-deyong/project-practice.git
边栏推荐
- Vscode environment configuration management
- C语言结构体与链表——难点简答
- 2021-10-25 Boostrap-treeview组件节点数目过多搜索后如何跳转?
- Code random notes_ Array_ 59 spiral matrix II
- 抽象类
- Libcurl redirection
- OpenGL 摄像机 及阶段性复习
- Discussion préliminaire sur JVM
- Super detailed - how to understand the expression while (scanf ("%d", & Num)! = EOF) in C language?
- Debug No3 多张纹理叠加
猜你喜欢

Unity3d uses vrtk to configure the scene environment

"Dial" out the number on the number of digits - a variety of ideas to achieve reverse output of a four digit number

Form validation and regular expressions (I)

Greatest common divisor and least common multiple

Windows下编译安装Redis-6.2.5

Vscode environment configuration management

Summary of SV knowledge points

Recognize and install redis

How to use C language to realize headless one-way acyclic list single list?

Operation on December 1
随机推荐
Recognize and install redis
Unity create FPS monitoring
Unity3D使用VRTK配置场景环境
Principle and implementation of Ping
Operation on December 1
FMETP Steam v2 使用方法(二)
Espressif 8266 at+mqtt connect AWS IOT
Digital twin demonstration project -- from the simple pendulum (1)
Code random notes_ Linked list_ 203 remove linked list elements
How to use fmetp steam V2 (I)
L'interface utilisateur 3D ou le modèle dans l'unit é fait toujours face à la caméra et tourne avec l'angle de vue de la caméra 丨 l'angle de vue suit 丨 l'angle de vue fixe
RPC-BDY(4)-nacos注册中心
Code random notes_ Array_ 59 spiral matrix II
关于 pycharm 中无法导入自定义库的解决办法
Espressif plays with high resolution timer
Form validation and regular expressions (I)
GAMES104 B1+B2 引擎的结构与开发分层
Exercise + floating point stored in memory
软件生命周期---W模型
day6_ Jigsaw puzzle follow-up - switch interface, random pictures and package exe































