# hospitalmsback **Repository Path**: hospital-java/hospitalmsback ## Basic Information - **Project Name**: hospitalmsback - **Description**: 医院管理系统后端仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-02-05 - **Last Updated**: 2021-04-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hospitalmsback #### 介绍 医院管理系统后端仓库 #### 软件架构 软件架构说明 #### 新建数据源与Redis配置 **`datasource.yaml` 与 `redis.yaml` 已在 `.gitignore` 中设置为忽略,不会上传到云端仓库** 1. 创建自己的数据库配置 `src/main/resources/datasource.yaml` ``` yaml spring: datasource: driver-class-name: org.mariadb.jdbc.Driver username: root password: 123456 url: jdbc:mariadb://localhost:3306/hospital ``` 2. 创建自己的 Redis 配置 `src/main/resources/redis.yaml` ``` yaml spring: redis: host: localhost port: 6379 ``` #### 批量操作多行数据 (循环里面调 DAO 效率低怎么办?) 1. JDBC url 中添加参数 `allowMultiQueries=true` 例如: `jdbc:mariadb://localhost:3306/hospital?allowMultiQueries=true` 2. 通过 `` 生成多条 sql 语句: ``` xml update hospital.medicine set water_mark = water_mark + #{quantity} where id = #{medicine_id} ``` ``` java /** * 批量入库 * @param a medicineQuantityMap * @return 影响行数 */ int batchImport(@Param("medicineQuantityMap") Map a); ``` #### Swagger 1. Swagger 后台 URL [http://localhost:8080/swagger-ui/](http://localhost:8080/swagger-ui/) #### pom.xml文件前面没有m图标的解决方法 3.如果发现pom.xml文件前面没有m图标,可以进入 File -> Project Structure -> Modules 点"+"号 -> import Module -> 就在默认的选择下点"ok" -> 最后选maven **yaml 文件缩进敏感** #### 安装教程 1. xxxx 2. xxxx 3. xxxx #### 使用说明 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/)