Pre Merge pull request !164 from 老唐解忧铺/hs-mall-colod

pull/164/MERGE
老唐解忧铺 2025-01-03 08:26:13 +00:00 committed by Gitee
commit fa93f8a436
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
309 changed files with 15429 additions and 651 deletions

400
README.md
View File

@ -1,376 +1,26 @@
<p align="center">
<img src="https://img.shields.io/badge/Spring%20Cloud-2024-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-3.4.1-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Vue-3.2-blue.svg" alt="Downloads">
<img src="https://img.shields.io/github/license/YunaiV/yudao-cloud" alt="Downloads" />
</p>
**严肃声明:现在、未来都不会有商业版本,所有代码全部开源!**
**「我喜欢写代码,乐此不疲」**
**「我喜欢做开源,以此为乐」**
我 🐶 在上海艰苦奋斗,早中晚在 top3 大厂认真搬砖,夜里为开源做贡献。
如果这个项目让你有所收获,记得 Star 关注哦,这对我是非常不错的鼓励与支持。
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
## 🐶 新手必读
* 演示地址【Vue3 + element-plus】<http://dashboard-vue3.yudao.iocoder.cn>
* 演示地址【Vue3 + vben(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
* 演示地址【Vue2 + element-ui】<http://dashboard.yudao.iocoder.cn>
* 启动文档:<https://cloud.iocoder.cn/quick-start/>
* 视频教程:<https://cloud.iocoder.cn/video/>
## 🐰 版本说明
| 版本 | JDK 8 + Spring Boot 2.7 | JDK 17/21 + Spring Boot 3.2 |
|-----------------------------------------------------------------------|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| 【完整版】[yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [`master`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/zhijiantianya/yudao-cloud/tree/master-jdk17/) 分支 |
| 【精简版】[yudao-cloud-mini](https://gitee.com/yudaocode/yudao-cloud-mini) | [`master`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master/) 分支 | [`master-jdk17`](https://gitee.com/yudaocode/yudao-cloud-mini/tree/master-jdk17/) 分支 |
* 【完整版】包括系统功能、基础设施、会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
* 【精简版】只包括系统功能、基础设施功能不包括会员中心、数据报表、工作流程、商城系统、微信公众号、CRM、ERP 等功能
可参考 [《迁移文档》](https://cloud.iocoder.cn/migrate-module/) ,只需要 5-10 分钟,即可将【完整版】按需迁移到【精简版】
## 🐯 平台简介
**芋道**,以开发者为中心,打造中国第一流的快速开发平台,全部开源,个人与企业可 100% 免费使用。
> 有任何问题,或者想要的功能,可以在 _Issues_ 中提给艿艿。
>
> 😜 给项目点点 Star 吧,这对我们真的很重要!
![架构图](/.image/common/yudao-cloud-architecture.png)
* Java 后端:`master` 分支为 JDK 8 + Spring Boot 2.7`master-jdk17` 分支为 JDK 17/21 + Spring Boot 3.2
* 管理后台的电脑端Vue3 提供 [element-plus](https://gitee.com/yudaocode/yudao-ui-admin-vue3)、[vben(ant-design-vue)](https://gitee.com/yudaocode/yudao-ui-admin-vben) 两个版本Vue2 提供 [element-ui](https://gitee.com/zhijiantianya/ruoyi-vue-pro/tree/master/yudao-ui-admin) 版本
* 管理后台的移动端:采用 [uni-app](https://github.com/dcloudio/uni-app) 方案,一份代码多终端适配,同时支持 APP、小程序、H5
* 后端采用 Spring Cloud Alibaba 微服务架构,注册中心 + 配置中心 Nacos定时任务 XXL-Job服务保障 Sentinel服务网关 Gateway分布式事务 Seata
* 数据库可使用 MySQL、Oracle、PostgreSQL、SQL Server、MariaDB、国产达梦 DM、TiDB 等,基于 MyBatis Plus、Redis + Redisson 操作
* 消息队列可使用 Event、Redis、RabbitMQ、Kafka、RocketMQ 等
* 权限认证使用 Spring Security & Token & Redis支持多终端、多种用户的认证系统支持 SSO 单点登录
* 支持加载动态权限菜单按钮级别权限控制Redis 缓存提升性能
* 支持 SaaS 多租户,可自定义每个租户的权限,提供透明化的多租户底层封装
* 工作流使用 Flowable支持动态表单、在线设计流程、会签 / 或签、多种任务分配方式
* 高效率开发,使用代码生成器可以一键生成 Java、Vue 前后端代码、SQL 脚本、接口文档,支持单表、树表、主子表
* 实时通信,采用 Spring WebSocket 实现,内置 Token 身份校验,支持 WebSocket 集群
* 集成微信小程序、微信公众号、企业微信、钉钉等三方登陆,集成支付宝、微信等支付与退款
* 集成阿里云、腾讯云等短信渠道,集成 MinIO、阿里云、腾讯云、七牛云等云存储服务
* 集成报表设计器、大屏设计器,通过拖拽即可生成酷炫的报表与大屏
## 🐳 项目关系
![架构演进](/.image/common/yudao-roadmap.png)
三个项目的功能对比,可见社区共同整理的 [国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn) 表格。
### 后端项目
| 项目 | Star | 简介 |
|-----------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| [ruoyi-vue-pro](https://gitee.com/zhijiantianya/ruoyi-vue-pro) | [![Gitee star](https://gitee.com/zhijiantianya/ruoyi-vue-pro/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/ruoyi-vue-pro) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/ruoyi-vue-pro.svg?style=social&label=Stars)](https://github.com/YunaiV/ruoyi-vue-pro) | 基于 Spring Boot 多模块架构 |
| [yudao-cloud](https://gitee.com/zhijiantianya/yudao-cloud) | [![Gitee star](https://gitee.com/zhijiantianya/yudao-cloud/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yudao-cloud) [![GitHub stars](https://img.shields.io/github/stars/YunaiV/yudao-cloud.svg?style=social&label=Stars)](https://github.com/YunaiV/yudao-cloud) | 基于 Spring Cloud 微服务架构 |
| [Spring-Boot-Labs](https://gitee.com/yudaocode/SpringBoot-Labs) | [![Gitee star](https://gitee.com/yudaocode/SpringBoot-Labs/badge/star.svg?theme=white)](https://gitee.com/zhijiantianya/yudao-cloud) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/SpringBoot-Labs.svg?style=social&label=Stars)](https://github.com/yudaocode/SpringBoot-Labs) | 系统学习 Spring Boot & Cloud 专栏 |
### 前端项目
| 项目 | Star | 简介 |
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------|
| [yudao-ui-admin-vue3](https://gitee.com/yudaocode/yudao-ui-admin-vue3) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vue3/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vue3) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vue3.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vue3) | 基于 Vue3 + element-plus 实现的管理后台 |
| [yudao-ui-admin-vben](https://gitee.com/yudaocode/yudao-ui-admin-vben) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vben/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vben) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vben.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vben) | 基于 Vue3 + vben(ant-design-vue) 实现的管理后台 |
| [yudao-mall-uniapp](https://gitee.com/yudaocode/yudao-mall-uniapp) | [![Gitee star](https://gitee.com/yudaocode/yudao-mall-uniapp/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-mall-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-mall-uniapp.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-mall-uniapp) | 基于 uni-app 实现的商城小程序 |
| [yudao-ui-admin-vue2](https://gitee.com/yudaocode/yudao-ui-admin-vue2) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-vue2/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-vue2) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-vue2.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-vue2) | 基于 Vue2 + element-ui 实现的管理后台 |
| [yudao-ui-admin-uniapp](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-admin-uniapp/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-admin-uniapp) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-admin-uniapp.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-admin-uniapp) | 基于 Vue2 + element-ui 实现的管理后台 |
| [yudao-ui-go-view](https://gitee.com/yudaocode/yudao-ui-go-view) | [![Gitee star](https://gitee.com/yudaocode/yudao-ui-go-view/badge/star.svg?theme=white)](https://gitee.com/yudaocode/yudao-ui-go-view) [![GitHub stars](https://img.shields.io/github/stars/yudaocode/yudao-ui-go-view.svg?style=social&label=Stars)](https://github.com/yudaocode/yudao-ui-go-view) | 基于 Vue3 + naive-ui 实现的大屏报表 |
## 😎 开源协议
**为什么推荐使用本项目?**
① 本项目采用比 Apache 2.0 更宽松的 [MIT License](https://gitee.com/zhijiantianya/ruoyi-vue-pro/blob/master/LICENSE) 开源协议,个人与企业可 100% 免费使用不用保留类作者、Copyright 信息。
② 代码全部开源,不会像其他项目一样,只开源部分代码,让你无法了解整个项目的架构设计。[国产开源项目对比](https://www.yuque.com/xiatian-bsgny/lm0ec1/wqf8mn)
![开源项目对比](/.image/common/project-vs.png)
③ 代码整洁、架构整洁,遵循《阿里巴巴 Java 开发手册》规范代码注释详细113770 行 Java 代码42462 行代码注释。
## 🤝 项目外包
我们也是接外包滴,如果你有项目想要外包,可以微信联系【**Aix9975**】。
团队包含专业的项目经理、架构师、前端工程师、后端工程师、测试工程师、运维工程师,可以提供全流程的外包服务。
项目可以是商城、SCRM 系统、OA 系统、物流系统、ERP 系统、CMS 系统、HIS 系统、支付系统、IM 聊天、微信公众号、微信小程序等等。
## 🐼 内置功能
系统内置多种多种业务功能,可以用于快速你的业务系统:
![功能分层](/.image/common/ruoyi-vue-pro-biz.png)
* 通用模块(必选):系统功能、基础设施
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
* 业务系统按需ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
> 友情提示:本项目基于 RuoYi-Vue 修改,**重构优化**后端的代码,**美化**前端的界面。
>
> * 额外新增的功能,我们使用 🚀 标记。
> * 重新实现的功能,我们使用 ⭐️ 标记。
🙂 所有功能,都通过 **单元测试** 保证高质量。
### 系统功能
| | 功能 | 描述 |
|-----|-------|---------------------------------|
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
| ⭐️ | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
| | 岗位管理 | 配置系统用户所属担任职务 |
| 🚀 | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
| 🚀 | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
| 🚀 | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
| 🚀 | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
| 🚀 | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
| 🚀 | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
| ⭐️ | 登录日志 | 系统登录日志记录查询,包含登录异常 |
| 🚀 | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
| | 通知公告 | 系统通知公告信息发布维护 |
| 🚀 | 敏感词 | 配置系统敏感词,支持标签分组 |
| 🚀 | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
| 🚀 | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |
![功能图](/.image/common/system-feature.png)
### 工作流程
| | 功能 | 描述 |
|----|-------|-----------------------------------------|
| 🚀 | 流程模型 | 配置工作流的流程模型,支持 BPMN 和仿钉钉/飞书设计器 |
| 🚀 | 流程表单 | 拖动表单元素生成相应的工作流表单,覆盖 Element UI 所有的表单组件 |
| 🚀 | 用户分组 | 自定义用户分组,可用于工作流的审批分组 |
| 🚀 | 我的流程 | 查看我发起的工作流程,支持新建、取消流程等操作,高亮流程图、审批时间线 |
| 🚀 | 待办任务 | 查看自己【未】审批的工作任务,支持通过、不通过、转派、委派、退回、加减签等操作 |
| 🚀 | 已办任务 | 查看自己【已】审批的工作任务,支持流程预测,展示未来审批人信息 |
| 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 |
![功能图](/.image/common/bpm-feature.png)
| BPMN 设计器 | 钉钉/飞书设计器 |
|------------------------------|--------------------------------|
| ![](/.image/工作流设计器-bpmn.jpg) | ![](/.image/工作流设计器-simple.jpg) |
### 支付系统
| | 功能 | 描述 |
|-----|------|---------------------------|
| 🚀 | 应用信息 | 配置商户的应用信息,对接支付宝、微信等多个支付渠道 |
| 🚀 | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单 |
| 🚀 | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单 |
| 🚀 | 回调通知 | 查看支付回调业务的【支付】【退款】的通知结果 |
| 🚀 | 接入示例 | 提供接入支付系统的【支付】【退款】的功能实战 |
### 基础设施
| | 功能 | 描述 |
|-----|-----------|----------------------------------------------|
| 🚀 | 代码生成 | 前后端代码的生成Java、Vue、SQL、单元测试支持 CRUD 下载 |
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
| 🚀 | 文件服务 | 支持将文件存储到 S3MinIO、阿里云、腾讯云、七牛云、本地、FTP、数据库等 |
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
| | MySQL 监控 | 监视当前系统数据库连接池状态可进行分析SQL找出系统性能瓶颈 |
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
| 🚀 | 消息队列 | 基于 Redis 实现消息队列Stream 提供集群消费Pub/Sub 提供广播消费 |
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
![功能图](/.image/common/infra-feature.png)
### 数据报表
| | 功能 | 描述 |
|-----|-------|--------------------|
| 🚀 | 报表设计器 | 支持数据报表、图形报表、打印设计等 |
| 🚀 | 大屏设计器 | 拖拽生成数据大屏,内置几十种图表组件 |
### 微信公众号
| | 功能 | 描述 |
|-----|--------|-------------------------------|
| 🚀 | 账号管理 | 配置接入的微信公众号,可支持多个公众号 |
| 🚀 | 数据统计 | 统计公众号的用户增减、累计用户、消息概况、接口分析等数据 |
| 🚀 | 粉丝管理 | 查看已关注、取关的粉丝列表,可对粉丝进行同步、打标签等操作 |
| 🚀 | 消息管理 | 查看粉丝发送的消息列表,可主动回复粉丝消息 |
| 🚀 | 自动回复 | 自动回复粉丝发送的消息,支持关注回复、消息回复、关键字回复 |
| 🚀 | 标签管理 | 对公众号的标签进行创建、查询、修改、删除等操作 |
| 🚀 | 菜单管理 | 自定义公众号的菜单,也可以从公众号同步菜单 |
| 🚀 | 素材管理 | 管理公众号的图片、语音、视频等素材,支持在线播放语音、视频 |
| 🚀 | 图文草稿箱 | 新增常用的图文素材到草稿箱,可发布到公众号 |
| 🚀 | 图文发表记录 | 查看已发布成功的图文素材,支持删除操作 |
### 商城系统
演示地址:<https://cloud.iocoder.cn/mall-preview/>
![功能图](/.image/common/mall-feature.png)
![功能图](/.image/common/mall-preview.png)
### 会员中心
| | 功能 | 描述 |
|-----|------|----------------------------------|
| 🚀 | 会员管理 | 会员是 C 端的消费者,该功能用于会员的搜索与管理 |
| 🚀 | 会员标签 | 对会员的标签进行创建、查询、修改、删除等操作 |
| 🚀 | 会员等级 | 对会员的等级、成长值进行管理,可用于订单折扣等会员权益 |
| 🚀 | 会员分组 | 对会员进行分组,用于用户画像、内容推送等运营手段 |
| 🚀 | 积分签到 | 回馈给签到、消费等行为的积分,会员可订单抵现、积分兑换等途径消耗 |
### ERP 系统
演示地址:<https://cloud.iocoder.cn/erp-preview/>
![功能图](/.image/common/erp-feature.png)
### CRM 系统
演示地址:<https://cloud.iocoder.cn/crm-preview/>
![功能图](/.image/common/crm-feature.png)
### AI 大模型
演示地址:<https://cloud.iocoder.cn/ai-preview/>
![功能图](/.image/common/ai-feature.png)
![功能图](/.image/common/ai-preview.gif)
## 🐨 技术栈
### 微服务
| 项目 | 说明 |
|-----------------------|--------------------|
| `yudao-dependencies` | Maven 依赖版本管理 |
| `yudao-framework` | Java 框架拓展 |
| `yudao-server` | 管理后台 + 用户 APP 的服务端 |
| `yudao-module-system` | 系统功能的 Module 模块 |
| `yudao-module-member` | 会员中心的 Module 模块 |
| `yudao-module-infra` | 基础设施的 Module 模块 |
| `yudao-module-bpm` | 工作流程的 Module 模块 |
| `yudao-module-pay` | 支付系统的 Module 模块 |
| `yudao-module-mall` | 商城系统的 Module 模块 |
| `yudao-module-erp` | ERP 系统的 Module 模块 |
| `yudao-module-crm` | CRM 系统的 Module 模块 |
| `yudao-module-ai` | AI 大模型的 Module 模块 |
| `yudao-module-mp` | 微信公众号的 Module 模块 |
| `yudao-module-report` | 大屏报表 Module 模块 |
### 框架
| 框架 | 说明 | 版本 | 学习指南 |
|---------------------------------------------------------------------------------------------|------------------|------------|---------------------------------------------------------------------|
| [Spring Cloud Alibaba](https://github.com/alibaba/spring-cloud-alibaba) | 微服务框架 | 2023.0.1 | [文档](https://github.com/YunaiV/SpringBoot-Labs) |
| [Nacos](https://github.com/alibaba/nacos) | 配置中心 & 注册中心 | 2.3.2 | [文档](https://www.iocoder.cn/categories/Nacos/?yudao) |
| [RocketMQ](https://github.com/apache/rocketmq) | 消息队列 | 5.2.0 | [文档](https://www.iocoder.cn/categories/RocketMQ/?yudao) |
| [Sentinel](https://github.com/alibaba/sentinel) | 服务保障 | 1.8.6 | [文档](https://www.iocoder.cn/categories/Sentinel/?yudao) |
| [XXL Job](https://github.com/xuxueli/xxl-job) | 定时任务 | 2.4.0 | [文档](https://www.iocoder.cn/XXL-JOB/good-collection/?yudao) |
| [Spring Cloud Gateway](https://github.com/spring-cloud/spring-cloud-gateway) | 服务网关 | 4.1.0 | [文档](https://www.iocoder.cn/categories/Spring-Cloud-Gateway/?yudao) |
| [Seata](https://github.com/seata/seata) | 分布式事务 | 1.6.1 | [文档](https://www.iocoder.cn/categories/Seata/?yudao) |
| [MySQL](https://www.mysql.com/cn/) | 数据库服务器 | 5.7 / 8.0+ | |
| [Druid](https://github.com/alibaba/druid) | JDBC 连接池、监控组件 | 1.2.23 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [MyBatis Plus](https://mp.baomidou.com/) | MyBatis 增强工具包 | 3.5.7 | [文档](http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao) |
| [Dynamic Datasource](https://dynamic-datasource.com/) | 动态数据源 | 4.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao) |
| [Redis](https://redis.io/) | key-value 数据库 | 5.0 / 6.0 | |
| [Redisson](https://github.com/redisson/redisson) | Redis 客户端 | 3.32.0 | [文档](http://www.iocoder.cn/Spring-Boot/Redis/?yudao) |
| [Spring MVC](https://github.com/spring-projects/spring-framework/tree/master/spring-webmvc) | MVC 框架 | 6.1.10 | [文档](http://www.iocoder.cn/SpringMVC/MVC/?yudao) |
| [Spring Security](https://github.com/spring-projects/spring-security) | Spring 安全框架 | 6.3.1 | [文档](http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao) |
| [Hibernate Validator](https://github.com/hibernate/hibernate-validator) | 参数校验组件 | 8.0.1 | [文档](http://www.iocoder.cn/Spring-Boot/Validation/?yudao) |
| [Flowable](https://github.com/flowable/flowable-engine) | 工作流引擎 | 7.0.0 | [文档](https://doc.iocoder.cn/bpm/) |
| [Knife4j](https://gitee.com/xiaoym/knife4j) | Swagger 增强 UI 实现 | 4.5.0 | [文档](http://www.iocoder.cn/Spring-Boot/Swagger/?yudao) |
| [SkyWalking](https://skywalking.apache.org/) | 分布式应用追踪系统 | 9.0.0 | [文档](http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao) |
| [Spring Boot Admin](https://github.com/codecentric/spring-boot-admin) | Spring Boot 监控平台 | 3.6.1 | [文档](http://www.iocoder.cn/Spring-Boot/Admin/?yudao) |
| [Jackson](https://github.com/FasterXML/jackson) | JSON 工具库 | 2.17.1 | |
| [MapStruct](https://mapstruct.org/) | Java Bean 转换 | 1.6.3 | [文档](http://www.iocoder.cn/Spring-Boot/MapStruct/?yudao) |
| [Lombok](https://projectlombok.org/) | 消除冗长的 Java 代码 | 1.18.34 | [文档](http://www.iocoder.cn/Spring-Boot/Lombok/?yudao) |
| [JUnit](https://junit.org/junit5/) | Java 单元测试框架 | 5.10.1 | - |
| [Mockito](https://github.com/mockito/mockito) | Java Mock 框架 | 5.7.0 | - |
## 🐷 演示图
### 系统功能
| 模块 | biu | biu | biu |
|----------|-----------------------------|---------------------------|--------------------------|
| 登录 & 首页 | ![登录](/.image/登录.jpg) | ![首页](/.image/首页.jpg) | ![个人中心](/.image/个人中心.jpg) |
| 用户 & 应用 | ![用户管理](/.image/用户管理.jpg) | ![令牌管理](/.image/令牌管理.jpg) | ![应用管理](/.image/应用管理.jpg) |
| 租户 & 套餐 | ![租户管理](/.image/租户管理.jpg) | ![租户套餐](/.image/租户套餐.png) | - |
| 部门 & 岗位 | ![部门管理](/.image/部门管理.jpg) | ![岗位管理](/.image/岗位管理.jpg) | - |
| 菜单 & 角色 | ![菜单管理](/.image/菜单管理.jpg) | ![角色管理](/.image/角色管理.jpg) | - |
| 审计日志 | ![操作日志](/.image/操作日志.jpg) | ![登录日志](/.image/登录日志.jpg) | - |
| 短信 | ![短信渠道](/.image/短信渠道.jpg) | ![短信模板](/.image/短信模板.jpg) | ![短信日志](/.image/短信日志.jpg) |
| 字典 & 敏感词 | ![字典类型](/.image/字典类型.jpg) | ![字典数据](/.image/字典数据.jpg) | ![敏感词](/.image/敏感词.jpg) |
| 错误码 & 通知 | ![错误码管理](/.image/错误码管理.jpg) | ![通知公告](/.image/通知公告.jpg) | - |
### 工作流程
| 模块 | biu | biu | biu |
|---------|---------------------------------|---------------------------------|---------------------------------|
| 流程模型 | ![流程模型-列表](/.image/流程模型-列表.jpg) | ![流程模型-设计](/.image/流程模型-设计.jpg) | ![流程模型-定义](/.image/流程模型-定义.jpg) |
| 表单 & 分组 | ![流程表单](/.image/流程表单.jpg) | ![用户分组](/.image/用户分组.jpg) | - |
| 我的流程 | ![我的流程-列表](/.image/我的流程-列表.jpg) | ![我的流程-发起](/.image/我的流程-发起.jpg) | ![我的流程-详情](/.image/我的流程-详情.jpg) |
| 待办 & 已办 | ![任务列表-审批](/.image/任务列表-审批.jpg) | ![任务列表-待办](/.image/任务列表-待办.jpg) | ![任务列表-已办](/.image/任务列表-已办.jpg) |
| OA 请假 | ![OA请假-列表](/.image/OA请假-列表.jpg) | ![OA请假-发起](/.image/OA请假-发起.jpg) | ![OA请假-详情](/.image/OA请假-详情.jpg) |
### 基础设施
| 模块 | biu | biu | biu |
|---------------|-------------------------------|-----------------------------|---------------------------|
| 代码生成 | ![代码生成](/.image/代码生成.jpg) | ![生成效果](/.image/生成效果.jpg) | - |
| 文档 | ![系统接口](/.image/系统接口.jpg) | ![数据库文档](/.image/数据库文档.jpg) | - |
| 文件 & 配置 | ![文件配置](/.image/文件配置.jpg) | ![文件管理](/.image/文件管理2.jpg) | ![配置管理](/.image/配置管理.jpg) |
| 定时任务 | ![定时任务](/.image/定时任务.jpg) | ![任务日志](/.image/任务日志.jpg) | - |
| API 日志 | ![访问日志](/.image/访问日志.jpg) | ![错误日志](/.image/错误日志.jpg) | - |
| MySQL & Redis | ![MySQL](/.image/MySQL.jpg) | ![Redis](/.image/Redis.jpg) | - |
| 监控平台 | ![Java监控](/.image/Java监控.jpg) | ![链路追踪](/.image/链路追踪.jpg) | ![日志中心](/.image/日志中心.jpg) |
### 支付系统
| 模块 | biu | biu | biu |
|---------|---------------------------|---------------------------------|---------------------------------|
| 商家 & 应用 | ![商户信息](/.image/商户信息.jpg) | ![应用信息-列表](/.image/应用信息-列表.jpg) | ![应用信息-编辑](/.image/应用信息-编辑.jpg) |
| 支付 & 退款 | ![支付订单](/.image/支付订单.jpg) | ![退款订单](/.image/退款订单.jpg) | --- |
### 数据报表
| 模块 | biu | biu | biu |
|-------|---------------------------------|---------------------------------|---------------------------------------|
| 报表设计器 | ![数据报表](/.image/报表设计器-数据报表.jpg) | ![图形报表](/.image/报表设计器-图形报表.jpg) | ![报表设计器-打印设计](/.image/报表设计器-打印设计.jpg) |
| 大屏设计器 | ![大屏列表](/.image/大屏设计器-列表.jpg) | ![大屏预览](/.image/大屏设计器-预览.jpg) | ![大屏编辑](/.image/大屏设计器-编辑.jpg) |
### 移动端(管理后台)
| biu | biu | biu |
|----------------------------------|----------------------------------|----------------------------------|
| ![](/.image/admin-uniapp/01.png) | ![](/.image/admin-uniapp/02.png) | ![](/.image/admin-uniapp/03.png) |
| ![](/.image/admin-uniapp/04.png) | ![](/.image/admin-uniapp/05.png) | ![](/.image/admin-uniapp/06.png) |
| ![](/.image/admin-uniapp/07.png) | ![](/.image/admin-uniapp/08.png) | ![](/.image/admin-uniapp/09.png) |
目前已经实现登录、我的、工作台、编辑资料、头像修改、密码修改、常见问题、关于我们等基础功能。
### 系统功能代码结构
```lua
| | 功能 | 描述 |
|-|----------------------------------------|
| | 用户管理 | 用户是系统操作者,该功能主要完成系统用户配置 |
| | 在线用户 | 当前系统中活跃用户状态监控,支持手动踢下线 |
| | 角色管理 | 角色菜单权限分配、设置角色按机构进行数据范围权限划分 |
| | 菜单管理 | 配置系统菜单、操作权限、按钮权限标识等,本地缓存提供性能 |
| | 部门管理 | 配置系统组织机构(公司、部门、小组),树结构展现支持数据权限 |
| | 岗位管理 | 配置系统用户所属担任职务 |
| | 租户管理 | 配置系统租户,支持 SaaS 场景下的多租户功能 |
| | 租户套餐 | 配置租户套餐,自定每个租户的菜单、操作、按钮的权限 |
| | 字典管理 | 对系统中经常使用的一些较为固定的数据进行维护 |
| | 短信管理 | 短信渠道、短息模板、短信日志,对接阿里云、腾讯云等主流短信平台 |
| | 邮件管理 | 邮箱账号、邮件模版、邮件发送日志,支持所有邮件平台 |
| | 站内信 | 系统内的消息通知,提供站内信模版、站内信消息 |
| | 操作日志 | 系统正常操作日志记录和查询,集成 Swagger 生成日志内容 |
| | 登录日志 | 系统登录日志记录查询,包含登录异常 |
| | 错误码管理 | 系统所有错误码的管理,可在线修改错误提示,无需重启服务 |
| | 通知公告 | 系统通知公告信息发布维护 |
| | 敏感词 | 配置系统敏感词,支持标签分组 |
| | 应用管理 | 管理 SSO 单点登录的应用,支持多种 OAuth2 授权方式 |
| | 地区管理 | 展示省份、城市、区镇等城市信息,支持 IP 对应城市 |

View File

@ -23,6 +23,7 @@
<module>yudao-module-crm</module>
<module>yudao-module-erp</module>
<module>yudao-module-ai</module>
<module>yudao-module-hrmrg</module>
</modules>
<name>${project.artifactId}</name>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Validation/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Job/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Async-Job/?yudao>

View File

@ -1 +0,0 @@
<https://www.iocoder.cn/Spring-Boot/Admin/?yudao>

View File

@ -1 +0,0 @@
<https://www.iocoder.cn/Spring-Boot/Actuator/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/SkyWalking/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/RocketMQ/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Kafka/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/RabbitMQ/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/RocketMQ/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/MyBatis/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/dynamic-datasource/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/datasource-pool/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Cache/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Redis/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Feign/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Cloud/Feign/?yudao>

View File

@ -1,2 +0,0 @@
* 芋道 Spring Security 入门:<http://www.iocoder.cn/Spring-Boot/Spring-Security/?yudao>
* Spring Security 基本概念:<http://www.iocoder.cn/Fight/Spring-Security-4-1-0-Basic-concept-description/?yudao>

View File

@ -1 +0,0 @@
<https://www.iocoder.cn/Spring-Boot/Unit-Test/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/Swagger/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/SpringMVC/?yudao>

View File

@ -1 +0,0 @@
<http://www.iocoder.cn/Spring-Boot/WebSocket/?yudao>

View File

@ -20,35 +20,8 @@ public class BannerApplicationRunner implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) {
ThreadUtil.execute(() -> {
ThreadUtil.sleep(1, TimeUnit.SECONDS); // 延迟 1 秒,保证输出到结尾
log.info("\n----------------------------------------------------------\n\t" +
"项目启动成功!\n\t" +
"接口文档: \t{} \n\t" +
"开发文档: \t{} \n\t" +
"视频教程: \t{} \n" +
"----------------------------------------------------------",
"https://cloud.iocoder.cn/api-doc/",
"https://cloud.iocoder.cn",
"https://t.zsxq.com/02Yf6M7Qn");
// 数据报表
System.out.println("[报表模块 yudao-module-report 教程][参考 https://cloud.iocoder.cn/report/ 开启]");
// 工作流
System.out.println("[工作流模块 yudao-module-bpm 教程][参考 https://cloud.iocoder.cn/bpm/ 开启]");
// 商城系统
System.out.println("[商城系统 yudao-module-mall 教程][参考 https://cloud.iocoder.cn/mall/build/ 开启]");
// ERP 系统
System.out.println("[ERP 系统 yudao-module-erp - 教程][参考 https://cloud.iocoder.cn/erp/build/ 开启]");
// CRM 系统
System.out.println("[CRM 系统 yudao-module-crm - 教程][参考 https://cloud.iocoder.cn/crm/build/ 开启]");
// 微信公众号
System.out.println("[微信公众号 yudao-module-mp 教程][参考 https://cloud.iocoder.cn/mp/build/ 开启]");
// 支付平台
System.out.println("[支付系统 yudao-module-pay - 教程][参考 https://doc.iocoder.cn/pay/build/ 开启]");
// AI 大模型
System.out.println("[AI 大模型 yudao-module-ai - 教程][参考 https://cloud.iocoder.cn/ai/build/ 开启]");
// IOT 物联网
System.out.println("[IOT 物联网 yudao-module-iot - 教程][参考 https://doc.iocoder.cn/iot/build/ 开启]");
//ThreadUtil.sleep(1, TimeUnit.SECONDS); // 延迟 1 秒,保证输出到结尾
log.info("Yudao-Gateway 启动成功");
});
}

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP

View File

@ -0,0 +1,14 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP

View File

@ -18,6 +18,45 @@ spring:
gateway:
# 路由配置项,对应 RouteDefinition 数组
routes:
## hsfx-server 服务
- id: hsfx-admin-api # 路由的编号
uri: grayLb://hsfx-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/hsfx/**
filters:
- RewritePath=/admin-api/hsfx/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v2/api-docs
- id: hsfx-app-api # 路由的编号
uri: grayLb://hsfx-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/app-api/hsfx/**
filters:
- RewritePath=/app-api/hsfx/v3/api-docs, /v3/api-docs
## hshy-server 服务
- id: hshy-admin-api # 路由的编号
uri: grayLb://hshy-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/hshy/**
filters:
- RewritePath=/admin-api/hshy/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v2/api-docs
- id: hshy-app-api # 路由的编号
uri: grayLb://hshy-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/app-api/hshy/**
filters:
- RewritePath=/app-api/hshy/v3/api-docs, /v3/api-docs
## hrmrg-server 服务
- id: hrmrg-admin-api # 路由的编号
uri: grayLb://hrmrg-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/admin-api/hrmrg/**
filters:
- RewritePath=/admin-api/hrmrg/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v2/api-docs
- id: hrmrg-app-api # 路由的编号
uri: grayLb://hrmrg-server
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
- Path=/app-api/hrmrg/**
filters:
- RewritePath=/app-api/hrmrg/v3/api-docs, /v3/api-docs
## system-server 服务
- id: system-admin-api # 路由的编号
uri: grayLb://system-server
@ -185,6 +224,15 @@ knife4j:
gateway:
enabled: true
routes:
- name: hsfx-server
service-name: hsfx-server
url: /admin-api/hsfx/v3/api-docs
- name: hshy-server
service-name: hshy-server
url: /admin-api/hshy/v3/api-docs
- name: hrmrg-server
service-name: hrmrg-server
url: /admin-api/hrmrg/v3/api-docs
- name: system-server
service-name: system-server
url: /admin-api/system/v3/api-docs
@ -224,7 +272,6 @@ knife4j:
- name: ai-server
service-name: ai-server
url: /admin-api/ai/v3/api-docs
--- #################### 芋道相关配置 ####################
yudao:

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -67,7 +67,7 @@ spring:
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
@ -76,15 +76,15 @@ spring:
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
name-server: 192.168.1.128:9876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类
rabbitmq:
host: 127.0.0.1 # RabbitMQ 服务的地址
host: 192.168.1.128 # RabbitMQ 服务的地址
port: 5672 # RabbitMQ 服务的端口
username: guest # RabbitMQ 服务的账号
password: guest # RabbitMQ 服务的密码
username: admin # RabbitMQ
password: hsrabbitmq # 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
@ -93,7 +93,7 @@ spring:
xxl:
job:
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -89,7 +89,7 @@ spring:
xxl:
job:
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -55,19 +55,19 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
@ -78,7 +78,7 @@ spring:
xxl:
job:
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -56,28 +56,19 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 127.0.0.1 # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
@ -90,7 +81,7 @@ xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -0,0 +1,128 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
autoconfigure:
exclude:
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.1.128:3306/hs-bpm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
--- #################### 定时任务相关配置 ####################
xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# Spring Boot Admin 配置项
spring:
boot:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.bpm.dal.mysql: debug
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: false

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -55,19 +55,19 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-crm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -56,23 +56,14 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-crm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
url: jdbc:mysql://192.168.1.128:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
@ -89,7 +80,7 @@ xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -0,0 +1,128 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
autoconfigure:
exclude:
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:mysql://192.168.1.128:3306/hs-crm-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.1.128:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
--- #################### 定时任务相关配置 ####################
xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# Spring Boot Admin 配置项
spring:
boot:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.crm.dal.mysql: debug
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: false
demo: false # 关闭演示模式

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -67,7 +67,7 @@ spring:
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -89,7 +89,7 @@ xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao</artifactId>
<version>${revision}</version>
</parent>
<modules>
<module>yudao-module-hrmrg-api</module>
<module>yudao-module-hrmrg-biz</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-hrmrg</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>
hr 包下人力资源管理Human Resource Management
</description>
</project>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-module-hrmrg</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-hrmrg-api</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
erp 模块 API暴露给其它模块调用
</description>
<dependencies>
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-common</artifactId>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,24 @@
package cn.iocoder.yudao.module.hrmrg.enums;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
/**
* HR
*
* HR 使 1-100-000-000
*/
public interface ErrorCodeConstants {
// ========== 考勤打卡 TODO 补充编号 ==========
ErrorCode ADMIN_ATMK_NOT_EXISTS = new ErrorCode(1-100-000-000, "考勤打卡不存在");
ErrorCode ADMIN_ATMK_FACE_NOT_EXISTS = new ErrorCode(1-200-000-000, "人脸识别库不存在");
// ========== 绩效考核配置 TODO 补充编号 ==========
ErrorCode ADMIN_PERF_CFG_NOT_EXISTS = new ErrorCode(1-300-000-000, "绩效考核配置不存在");
// ========== 考勤组设置 TODO 补充编号 ==========
ErrorCode ADMIN_ATMK_GROUT_CFG_NOT_EXISTS = new ErrorCode(1-400-000-000, "考勤组设置不存在");
// ========== 岗位人员薪资计算配置 TODO 补充编号 ==========
ErrorCode ADMIN_POST_CFG_NOT_EXISTS = new ErrorCode(1-500-000-000, "岗位人员薪资计算配置不存在");
}

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-module-hrmrg</artifactId>
<version>${revision}</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yudao-module-hrmrg-biz</artifactId>
<packaging>jar</packaging>
<name>${project.artifactId}</name>
<description>
HR 模块 BIZ主要提供 HR 相关的业务功能。
</description>
<dependencies>
<!-- Spring Cloud 基础 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-env</artifactId>
</dependency>
<!-- 依赖服务 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-module-system-api</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-module-hrmrg-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-biz-tenant</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-websocket</artifactId>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId> <!-- 代码生成器,使用它解析表结构 -->
</dependency>
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-redis</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-rpc</artifactId>
</dependency>
<!-- Registry 注册中心相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- Config 配置中心相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Job 定时任务相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-job</artifactId>
</dependency>
<!-- 消息队列相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-mq</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId> <!-- 实现代码生成 -->
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>cn.iocoder.cloud</groupId>
<artifactId>yudao-spring-boot-starter-monitor</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
</dependency>
<!-- 三方云服务相关 -->
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId> <!-- 文件客户端:解决 ftp 连接 -->
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId> <!-- 文件客户端:解决 sftp 连接 -->
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId><!-- 文件客户端解决阿里云、腾讯云、minio 等 S3 连接 -->
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId> <!-- 文件客户端:文件类型的识别 -->
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,18 @@
package cn.iocoder.yudao.module.hrmrg;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
*
*
* @author
*/
@SpringBootApplication
public class HrmrgServerApplication {
public static void main(String[] args) {
SpringApplication.run(HrmrgServerApplication.class, args);
System.out.println("HrmrgServerApplication 启动成功");
}
}

View File

@ -0,0 +1,97 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
import cn.iocoder.yudao.module.hrmrg.service.adminatmk.AdminAtmkService;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
@Tag(name = "管理后台 - 考勤打卡")
@RestController
@RequestMapping("/hrmrg/admin-atmk")
@Validated
public class AdminAtmkController {
@Resource
private AdminAtmkService adminAtmkService;
@PostMapping("/create")
@Operation(summary = "创建考勤打卡")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:create')")
public CommonResult<Integer> createAdminAtmk(@Valid @RequestBody AdminAtmkSaveReqVO createReqVO) {
return success(adminAtmkService.createAdminAtmk(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新考勤打卡")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:update')")
public CommonResult<Boolean> updateAdminAtmk(@Valid @RequestBody AdminAtmkSaveReqVO updateReqVO) {
adminAtmkService.updateAdminAtmk(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除考勤打卡")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:delete')")
public CommonResult<Boolean> deleteAdminAtmk(@RequestParam("id") Integer id) {
adminAtmkService.deleteAdminAtmk(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得考勤打卡")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:query')")
public CommonResult<AdminAtmkRespVO> getAdminAtmk(@RequestParam("id") Integer id) {
AdminAtmkDO adminAtmk = adminAtmkService.getAdminAtmk(id);
return success(BeanUtils.toBean(adminAtmk, AdminAtmkRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得考勤打卡分页")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:query')")
public CommonResult<PageResult<AdminAtmkRespVO>> getAdminAtmkPage(@Valid AdminAtmkPageReqVO pageReqVO) {
PageResult<AdminAtmkDO> pageResult = adminAtmkService.getAdminAtmkPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AdminAtmkRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出考勤打卡 Excel")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportAdminAtmkExcel(@Valid AdminAtmkPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<AdminAtmkDO> list = adminAtmkService.getAdminAtmkPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "考勤打卡.xls", "数据", AdminAtmkRespVO.class,
BeanUtils.toBean(list, AdminAtmkRespVO.class));
}
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 考勤打卡分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AdminAtmkPageReqVO extends PageParam {
@Schema(description = "类型1用户2会员3其他")
private String typeBiz;
@Schema(description = "岗位或人员ID", example = "5147")
private Long userId;
@Schema(description = "上班时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTime;
@Schema(description = "下班时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "迟到时间")
private Integer lateTimeLimit;
@Schema(description = "早退时间")
private Integer earlyLeavingTimeLimit;
@Schema(description = "定位打卡范围的名称", example = "张三")
private String areaName;
@Schema(description = "经度")
private String latitude;
@Schema(description = "维度")
private String longitude;
@Schema(description = "打卡位置经度")
private String checkInLocation;
@Schema(description = "离岗位置维度")
private String checkOutLocation;
@Schema(description = "人脸识别结果")
private String faceRecognitionResult;
@Schema(description = "打卡人脸照")
private byte[] checkInPhoto;
@Schema(description = "离岗人脸照")
private byte[] checkOutPhoto;
@Schema(description = "人脸识别库")
private byte[] faceData;
@Schema(description = "状态0正常 1停用", example = "1")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,94 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 考勤打卡 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AdminAtmkRespVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23083")
@ExcelProperty("岗位ID")
private Integer id;
@Schema(description = "类型1用户2会员3其他")
@ExcelProperty(value = "类型1用户2会员3其他", converter = DictConvert.class)
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String typeBiz;
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5147")
@ExcelProperty("岗位或人员ID")
private Long userId;
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("上班时间")
private LocalDateTime startTime;
@Schema(description = "下班时间")
@ExcelProperty("下班时间")
private LocalDateTime endTime;
@Schema(description = "迟到时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("迟到时间")
private Integer lateTimeLimit;
@Schema(description = "早退时间")
@ExcelProperty("早退时间")
private Integer earlyLeavingTimeLimit;
@Schema(description = "定位打卡范围的名称", example = "张三")
@ExcelProperty("定位打卡范围的名称")
private String areaName;
@Schema(description = "经度")
@ExcelProperty("经度")
private String latitude;
@Schema(description = "维度")
@ExcelProperty("维度")
private String longitude;
@Schema(description = "打卡位置经度")
@ExcelProperty("打卡位置经度")
private String checkInLocation;
@Schema(description = "离岗位置维度")
@ExcelProperty("离岗位置维度")
private String checkOutLocation;
@Schema(description = "人脸识别结果")
@ExcelProperty("人脸识别结果")
private String faceRecognitionResult;
@Schema(description = "打卡人脸照")
@ExcelProperty("打卡人脸照")
private byte[] checkInPhoto;
@Schema(description = "离岗人脸照")
@ExcelProperty("离岗人脸照")
private byte[] checkOutPhoto;
@Schema(description = "人脸识别库")
@ExcelProperty("人脸识别库")
private byte[] faceData;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态0正常 1停用")
private Integer status;
@Schema(description = "备注", example = "随便")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,73 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 考勤打卡新增/修改 Request VO")
@Data
public class AdminAtmkSaveReqVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23083")
private Integer id;
@Schema(description = "类型1用户2会员3其他")
private String typeBiz;
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5147")
@NotNull(message = "岗位或人员ID不能为空")
private Long userId;
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "上班时间不能为空")
private LocalDateTime startTime;
@Schema(description = "下班时间")
private LocalDateTime endTime;
@Schema(description = "迟到时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "迟到时间不能为空")
private Integer lateTimeLimit;
@Schema(description = "早退时间")
private Integer earlyLeavingTimeLimit;
@Schema(description = "定位打卡范围的名称", example = "张三")
private String areaName;
@Schema(description = "经度")
private String latitude;
@Schema(description = "维度")
private String longitude;
@Schema(description = "打卡位置经度")
private String checkInLocation;
@Schema(description = "离岗位置维度")
private String checkOutLocation;
@Schema(description = "人脸识别结果")
private String faceRecognitionResult;
@Schema(description = "打卡人脸照")
private byte[] checkInPhoto;
@Schema(description = "离岗人脸照")
private byte[] checkOutPhoto;
@Schema(description = "人脸识别库")
private byte[] faceData;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态0正常 1停用不能为空")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
}

View File

@ -0,0 +1,99 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
import cn.iocoder.yudao.module.hrmrg.service.adminatmkface.AdminAtmkFaceService;
@Tag(name = "管理后台 - 人脸识别库")
@RestController
@RequestMapping("/hrmrg/admin-atmk-face")
@Validated
public class AdminAtmkFaceController {
@Resource
private AdminAtmkFaceService adminAtmkFaceService;
@PostMapping("/create")
@Operation(summary = "创建人脸识别库")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:create')")
public CommonResult<Integer> createAdminAtmkFace(@Valid @RequestBody AdminAtmkFaceSaveReqVO createReqVO) {
return success(adminAtmkFaceService.createAdminAtmkFace(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新人脸识别库")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:update')")
public CommonResult<Boolean> updateAdminAtmkFace(@Valid @RequestBody AdminAtmkFaceSaveReqVO updateReqVO) {
adminAtmkFaceService.updateAdminAtmkFace(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除人脸识别库")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:delete')")
public CommonResult<Boolean> deleteAdminAtmkFace(@RequestParam("id") Integer id) {
adminAtmkFaceService.deleteAdminAtmkFace(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得人脸识别库")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:query')")
public CommonResult<AdminAtmkFaceRespVO> getAdminAtmkFace(@RequestParam("id") Integer id) {
AdminAtmkFaceDO adminAtmkFace = adminAtmkFaceService.getAdminAtmkFace(id);
return success(BeanUtils.toBean(adminAtmkFace, AdminAtmkFaceRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得人脸识别库分页")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:query')")
public CommonResult<PageResult<AdminAtmkFaceRespVO>> getAdminAtmkFacePage(@Valid AdminAtmkFacePageReqVO pageReqVO) {
PageResult<AdminAtmkFaceDO> pageResult = adminAtmkFaceService.getAdminAtmkFacePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AdminAtmkFaceRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出人脸识别库 Excel")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-face:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportAdminAtmkFaceExcel(@Valid AdminAtmkFacePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<AdminAtmkFaceDO> list = adminAtmkFaceService.getAdminAtmkFacePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "人脸识别库.xls", "数据", AdminAtmkFaceRespVO.class,
BeanUtils.toBean(list, AdminAtmkFaceRespVO.class));
}
}

View File

@ -0,0 +1,49 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 人脸识别库分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AdminAtmkFacePageReqVO extends PageParam {
@Schema(description = "类型1员工2会员4其他")
private String typeBiz;
@Schema(description = "部门id", example = "17318")
private Long deptId;
@Schema(description = "岗位或人员ID", example = "1025")
private Long userId;
@Schema(description = "身份证号")
private String userNo;
@Schema(description = "名字", example = "赵六")
private String userName;
@Schema(description = "人脸数据")
private byte[] faceData;
@Schema(description = "显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", example = "2")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,62 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 人脸识别库 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AdminAtmkFaceRespVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15439")
@ExcelProperty("岗位ID")
private Integer id;
@Schema(description = "类型1员工2会员4其他")
@ExcelProperty(value = "类型1员工2会员4其他", converter = DictConvert.class)
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String typeBiz;
@Schema(description = "部门id", example = "17318")
@ExcelProperty("部门id")
private Long deptId;
@Schema(description = "岗位或人员ID", example = "1025")
@ExcelProperty("岗位或人员ID")
private Long userId;
@Schema(description = "身份证号")
@ExcelProperty("身份证号")
private String userNo;
@Schema(description = "名字", example = "赵六")
@ExcelProperty("名字")
private String userName;
@Schema(description = "人脸数据", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("人脸数据")
private byte[] faceData;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("状态0正常 1停用")
private Integer status;
@Schema(description = "备注", example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,47 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.*;
@Schema(description = "管理后台 - 人脸识别库新增/修改 Request VO")
@Data
public class AdminAtmkFaceSaveReqVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15439")
private Integer id;
@Schema(description = "类型1员工2会员4其他")
private String typeBiz;
@Schema(description = "部门id", example = "17318")
private Long deptId;
@Schema(description = "岗位或人员ID", example = "1025")
private Long userId;
@Schema(description = "身份证号")
private String userNo;
@Schema(description = "名字", example = "赵六")
private String userName;
@Schema(description = "人脸数据", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "人脸数据不能为空")
private byte[] faceData;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "显示顺序不能为空")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态0正常 1停用不能为空")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
}

View File

@ -0,0 +1,95 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
import cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg.AdminAtmkGroutCfgService;
@Tag(name = "管理后台 - 考勤组设置")
@RestController
@RequestMapping("/hrmrg/admin-atmk-grout-cfg")
@Validated
public class AdminAtmkGroutCfgController {
@Resource
private AdminAtmkGroutCfgService adminAtmkGroutCfgService;
@PostMapping("/create")
@Operation(summary = "创建考勤组设置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:create')")
public CommonResult<Integer> createAdminAtmkGroutCfg(@Valid @RequestBody AdminAtmkGroutCfgSaveReqVO createReqVO) {
return success(adminAtmkGroutCfgService.createAdminAtmkGroutCfg(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新考勤组设置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:update')")
public CommonResult<Boolean> updateAdminAtmkGroutCfg(@Valid @RequestBody AdminAtmkGroutCfgSaveReqVO updateReqVO) {
adminAtmkGroutCfgService.updateAdminAtmkGroutCfg(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除考勤组设置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:delete')")
public CommonResult<Boolean> deleteAdminAtmkGroutCfg(@RequestParam("id") Integer id) {
adminAtmkGroutCfgService.deleteAdminAtmkGroutCfg(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得考勤组设置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:query')")
public CommonResult<AdminAtmkGroutCfgRespVO> getAdminAtmkGroutCfg(@RequestParam("id") Integer id) {
AdminAtmkGroutCfgDO adminAtmkGroutCfg = adminAtmkGroutCfgService.getAdminAtmkGroutCfg(id);
return success(BeanUtils.toBean(adminAtmkGroutCfg, AdminAtmkGroutCfgRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得考勤组设置分页")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:query')")
public CommonResult<PageResult<AdminAtmkGroutCfgRespVO>> getAdminAtmkGroutCfgPage(@Valid AdminAtmkGroutCfgPageReqVO pageReqVO) {
PageResult<AdminAtmkGroutCfgDO> pageResult = adminAtmkGroutCfgService.getAdminAtmkGroutCfgPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AdminAtmkGroutCfgRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出考勤组设置 Excel")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-atmk-grout-cfg:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportAdminAtmkGroutCfgExcel(@Valid AdminAtmkGroutCfgPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<AdminAtmkGroutCfgDO> list = adminAtmkGroutCfgService.getAdminAtmkGroutCfgPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "考勤组设置.xls", "数据", AdminAtmkGroutCfgRespVO.class,
BeanUtils.toBean(list, AdminAtmkGroutCfgRespVO.class));
}
}

View File

@ -0,0 +1,57 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 考勤组设置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AdminAtmkGroutCfgPageReqVO extends PageParam {
@Schema(description = "类型1员工2其他")
private Long typeBiz;
@Schema(description = "部门id", example = "3928")
private Long deptId;
@Schema(description = "考勤组编码")
private String groupCode;
@Schema(description = "考勤组名称", example = "芋艿")
private String groupName;
@Schema(description = "上班时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTime;
@Schema(description = "下班时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "定位打卡范围的名称", example = "李四")
private String areaName;
@Schema(description = "经度")
private String latitude;
@Schema(description = "维度")
private String longitude;
@Schema(description = "状态0正常 1停用", example = "2")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 考勤组设置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AdminAtmkGroutCfgRespVO {
@Schema(description = "考勤组id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027")
@ExcelProperty("考勤组id")
private Integer id;
@Schema(description = "类型1员工2其他")
@ExcelProperty("类型1员工2其他")
private Long typeBiz;
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3928")
@ExcelProperty("部门id")
private Long deptId;
@Schema(description = "考勤组编码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "考勤组编码", converter = DictConvert.class)
@DictFormat("hr_att_punch_group") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String groupCode;
@Schema(description = "考勤组名称", example = "芋艿")
@ExcelProperty("考勤组名称")
private String groupName;
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("上班时间")
private LocalDateTime startTime;
@Schema(description = "下班时间")
@ExcelProperty("下班时间")
private LocalDateTime endTime;
@Schema(description = "定位打卡范围的名称", example = "李四")
@ExcelProperty("定位打卡范围的名称")
private String areaName;
@Schema(description = "经度")
@ExcelProperty("经度")
private String latitude;
@Schema(description = "维度")
@ExcelProperty("维度")
private String longitude;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("状态0正常 1停用")
private Integer status;
@Schema(description = "备注", example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 考勤组设置新增/修改 Request VO")
@Data
public class AdminAtmkGroutCfgSaveReqVO {
@Schema(description = "考勤组id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9027")
private Integer id;
@Schema(description = "类型1员工2其他")
private Long typeBiz;
@Schema(description = "部门id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3928")
@NotNull(message = "部门id不能为空")
private Long deptId;
@Schema(description = "考勤组编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "考勤组编码不能为空")
private String groupCode;
@Schema(description = "考勤组名称", example = "芋艿")
private String groupName;
@Schema(description = "上班时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "上班时间不能为空")
private LocalDateTime startTime;
@Schema(description = "下班时间")
private LocalDateTime endTime;
@Schema(description = "定位打卡范围的名称", example = "李四")
private String areaName;
@Schema(description = "经度")
private String latitude;
@Schema(description = "维度")
private String longitude;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态0正常 1停用不能为空")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
}

View File

@ -0,0 +1,97 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
import cn.iocoder.yudao.module.hrmrg.service.adminperfcfg.AdminPerfCfgService;
@Tag(name = "管理后台 - 绩效考核配置")
@RestController
@RequestMapping("/hrmrg/admin-perf-cfg")
@Validated
public class AdminPerfCfgController {
@Resource
private AdminPerfCfgService adminPerfCfgService;
@PostMapping("/create")
@Operation(summary = "创建绩效考核配置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:create')")
public CommonResult<Integer> createAdminPerfCfg(@Valid @RequestBody AdminPerfCfgSaveReqVO createReqVO) {
return success(adminPerfCfgService.createAdminPerfCfg(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新绩效考核配置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:update')")
public CommonResult<Boolean> updateAdminPerfCfg(@Valid @RequestBody AdminPerfCfgSaveReqVO updateReqVO) {
adminPerfCfgService.updateAdminPerfCfg(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除绩效考核配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:delete')")
public CommonResult<Boolean> deleteAdminPerfCfg(@RequestParam("id") Integer id) {
adminPerfCfgService.deleteAdminPerfCfg(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得绩效考核配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:query')")
public CommonResult<AdminPerfCfgRespVO> getAdminPerfCfg(@RequestParam("id") Integer id) {
AdminPerfCfgDO adminPerfCfg = adminPerfCfgService.getAdminPerfCfg(id);
return success(BeanUtils.toBean(adminPerfCfg, AdminPerfCfgRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得绩效考核配置分页")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:query')")
public CommonResult<PageResult<AdminPerfCfgRespVO>> getAdminPerfCfgPage(@Valid AdminPerfCfgPageReqVO pageReqVO) {
PageResult<AdminPerfCfgDO> pageResult = adminPerfCfgService.getAdminPerfCfgPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AdminPerfCfgRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出绩效考核配置 Excel")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-perf-cfg:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportAdminPerfCfgExcel(@Valid AdminPerfCfgPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<AdminPerfCfgDO> list = adminPerfCfgService.getAdminPerfCfgPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "绩效考核配置.xls", "数据", AdminPerfCfgRespVO.class,
BeanUtils.toBean(list, AdminPerfCfgRespVO.class));
}
}

View File

@ -0,0 +1,57 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 绩效考核配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AdminPerfCfgPageReqVO extends PageParam {
@Schema(description = "类型1部门2会员3其他")
private String typeBiz;
@Schema(description = "部门ID或员工id", example = "10265")
private Long deptOrUserId;
@Schema(description = "标题")
private String title;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] starTime;
@Schema(description = "结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "分数")
private Integer sorce;
@Schema(description = "考核说明")
private String evg;
@Schema(description = "考核项目")
private String evgItem;
@Schema(description = "显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", example = "1")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,70 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 绩效考核配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AdminPerfCfgRespVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23965")
@ExcelProperty("岗位ID")
private Integer id;
@Schema(description = "类型1部门2会员3其他")
@ExcelProperty(value = "类型1部门2会员3其他", converter = DictConvert.class)
@DictFormat("hr_att_punch_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String typeBiz;
@Schema(description = "部门ID或员工id", example = "10265")
@ExcelProperty("部门ID或员工id")
private Long deptOrUserId;
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("标题")
private String title;
@Schema(description = "开始时间")
@ExcelProperty("开始时间")
private LocalDateTime starTime;
@Schema(description = "结束时间")
@ExcelProperty("结束时间")
private LocalDateTime endTime;
@Schema(description = "分数")
@ExcelProperty("分数")
private Integer sorce;
@Schema(description = "考核说明")
@ExcelProperty("考核说明")
private String evg;
@Schema(description = "考核项目", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("考核项目")
private String evgItem;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态0正常 1停用")
private Integer status;
@Schema(description = "备注", example = "随便")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,57 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 绩效考核配置新增/修改 Request VO")
@Data
public class AdminPerfCfgSaveReqVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23965")
private Integer id;
@Schema(description = "类型1部门2会员3其他")
private String typeBiz;
@Schema(description = "部门ID或员工id", example = "10265")
private Long deptOrUserId;
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "标题不能为空")
private String title;
@Schema(description = "开始时间")
private LocalDateTime starTime;
@Schema(description = "结束时间")
private LocalDateTime endTime;
@Schema(description = "分数")
private Integer sorce;
@Schema(description = "考核说明")
private String evg;
@Schema(description = "考核项目", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "考核项目不能为空")
private String evgItem;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "显示顺序不能为空")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态0正常 1停用不能为空")
private Integer status;
@Schema(description = "备注", example = "随便")
private String remark;
}

View File

@ -0,0 +1,97 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import java.io.IOException;
import java.util.List;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
import cn.iocoder.yudao.module.hrmrg.service.adminpostcfg.AdminPostCfgService;
@Tag(name = "管理后台 - 岗位人员薪资计算配置")
@RestController
@RequestMapping("/hrmrg/admin-post-cfg")
@Validated
public class AdminPostCfgController {
@Resource
private AdminPostCfgService adminPostCfgService;
@PostMapping("/create")
@Operation(summary = "创建岗位人员薪资计算配置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:create')")
public CommonResult<Integer> createAdminPostCfg(@Valid @RequestBody AdminPostCfgSaveReqVO createReqVO) {
return success(adminPostCfgService.createAdminPostCfg(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新岗位人员薪资计算配置")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:update')")
public CommonResult<Boolean> updateAdminPostCfg(@Valid @RequestBody AdminPostCfgSaveReqVO updateReqVO) {
adminPostCfgService.updateAdminPostCfg(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除岗位人员薪资计算配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:delete')")
public CommonResult<Boolean> deleteAdminPostCfg(@RequestParam("id") Integer id) {
adminPostCfgService.deleteAdminPostCfg(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得岗位人员薪资计算配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:query')")
public CommonResult<AdminPostCfgRespVO> getAdminPostCfg(@RequestParam("id") Integer id) {
AdminPostCfgDO adminPostCfg = adminPostCfgService.getAdminPostCfg(id);
return success(BeanUtils.toBean(adminPostCfg, AdminPostCfgRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得岗位人员薪资计算配置分页")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:query')")
public CommonResult<PageResult<AdminPostCfgRespVO>> getAdminPostCfgPage(@Valid AdminPostCfgPageReqVO pageReqVO) {
PageResult<AdminPostCfgDO> pageResult = adminPostCfgService.getAdminPostCfgPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AdminPostCfgRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出岗位人员薪资计算配置 Excel")
@PreAuthorize("@ss.hasPermission('hrmrg:admin-post-cfg:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportAdminPostCfgExcel(@Valid AdminPostCfgPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<AdminPostCfgDO> list = adminPostCfgService.getAdminPostCfgPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "岗位人员薪资计算配置.xls", "数据", AdminPostCfgRespVO.class,
BeanUtils.toBean(list, AdminPostCfgRespVO.class));
}
}

View File

@ -0,0 +1,51 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 岗位人员薪资计算配置分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AdminPostCfgPageReqVO extends PageParam {
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
private String typeBiz;
@Schema(description = "项目1增减2扣减3不变", example = "1")
private String itemType;
@Schema(description = "岗位或人员ID", example = "25542")
private Long postOrUserId;
@Schema(description = "上下班时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] checkInOutTime;
@Schema(description = "薪资")
private Integer salary;
@Schema(description = "系数")
private BigDecimal coef;
@Schema(description = "显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", example = "1")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -0,0 +1,64 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 岗位人员薪资计算配置 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AdminPostCfgRespVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30426")
@ExcelProperty("岗位ID")
private Integer id;
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
@ExcelProperty(value = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资", converter = DictConvert.class)
@DictFormat("hr_admin_post_cfg_biz_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String typeBiz;
@Schema(description = "项目1增减2扣减3不变", example = "1")
@ExcelProperty(value = "项目1增减2扣减3不变", converter = DictConvert.class)
@DictFormat("hr_admin_post_cfg_biz_item") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String itemType;
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25542")
@ExcelProperty("岗位或人员ID")
private Long postOrUserId;
@Schema(description = "上下班时间")
@ExcelProperty("上下班时间")
private LocalDateTime checkInOutTime;
@Schema(description = "薪资", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("薪资")
private Integer salary;
@Schema(description = "系数")
@ExcelProperty("系数")
private BigDecimal coef;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("显示顺序")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态0正常 1停用")
private Integer status;
@Schema(description = "备注", example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

View File

@ -0,0 +1,50 @@
package cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 岗位人员薪资计算配置新增/修改 Request VO")
@Data
public class AdminPostCfgSaveReqVO {
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30426")
private Integer id;
@Schema(description = "类型1岗位2用户3迟到4早退5旷工6加班7基本工资")
private String typeBiz;
@Schema(description = "项目1增减2扣减3不变", example = "1")
private String itemType;
@Schema(description = "岗位或人员ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25542")
@NotNull(message = "岗位或人员ID不能为空")
private Long postOrUserId;
@Schema(description = "上下班时间")
private LocalDateTime checkInOutTime;
@Schema(description = "薪资", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "薪资不能为空")
private Integer salary;
@Schema(description = "系数")
private BigDecimal coef;
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "显示顺序不能为空")
private Integer sort;
@Schema(description = "状态0正常 1停用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态0正常 1停用不能为空")
private Integer status;
@Schema(description = "备注", example = "你猜")
private String remark;
}

View File

@ -0,0 +1,103 @@
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk;
import lombok.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("hr_admin_atmk")
@KeySequence("hr_admin_atmk_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminAtmkDO extends BaseDO {
/**
* ID
*/
@TableId
private Integer id;
/**
* 123
*
* {@link TODO hr_att_punch_biz_type }
*/
private String typeBiz;
/**
* ID
*/
private Long userId;
/**
*
*/
private LocalDateTime startTime;
/**
*
*/
private LocalDateTime endTime;
/**
*
*/
private Integer lateTimeLimit;
/**
* 退
*/
private Integer earlyLeavingTimeLimit;
/**
*
*/
private String areaName;
/**
*
*/
private String latitude;
/**
*
*/
private String longitude;
/**
*
*/
private String checkInLocation;
/**
*
*/
private String checkOutLocation;
/**
*
*/
private String faceRecognitionResult;
/**
*
*/
private byte[] checkInPhoto;
/**
*
*/
private byte[] checkOutPhoto;
/**
*
*/
private byte[] faceData;
/**
* 0 1
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,69 @@
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface;
import lombok.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("hr_admin_atmk_face")
@KeySequence("hr_admin_atmk_face_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminAtmkFaceDO extends BaseDO {
/**
* ID
*/
@TableId
private Integer id;
/**
* 124
*
* {@link TODO hr_att_punch_biz_type }
*/
private String typeBiz;
/**
* id
*/
private Long deptId;
/**
* ID
*/
private Long userId;
/**
*
*/
private String userNo;
/**
*
*/
private String userName;
/**
*
*/
private byte[] faceData;
/**
*
*/
private Integer sort;
/**
* 0 1
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,79 @@
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg;
import lombok.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("hr_admin_atmk_grout_cfg")
@KeySequence("hr_admin_atmk_grout_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminAtmkGroutCfgDO extends BaseDO {
/**
* id
*/
@TableId
private Integer id;
/**
* 12
*/
private Long typeBiz;
/**
* id
*/
private Long deptId;
/**
*
*
* {@link TODO hr_att_punch_group }
*/
private String groupCode;
/**
*
*/
private String groupName;
/**
*
*/
private LocalDateTime startTime;
/**
*
*/
private LocalDateTime endTime;
/**
*
*/
private String areaName;
/**
*
*/
private String latitude;
/**
*
*/
private String longitude;
/**
* 0 1
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,79 @@
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg;
import lombok.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("hr_admin_perf_cfg")
@KeySequence("hr_admin_perf_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminPerfCfgDO extends BaseDO {
/**
* ID
*/
@TableId
private Integer id;
/**
* 123
*
* {@link TODO hr_att_punch_biz_type }
*/
private String typeBiz;
/**
* IDid
*/
private Long deptOrUserId;
/**
*
*/
private String title;
/**
*
*/
private LocalDateTime starTime;
/**
*
*/
private LocalDateTime endTime;
/**
*
*/
private Integer sorce;
/**
*
*/
private String evg;
/**
*
*/
private String evgItem;
/**
*
*/
private Integer sort;
/**
* 0 1
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,73 @@
package cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg;
import lombok.*;
import java.time.LocalDateTime;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("hr_admin_post_cfg")
@KeySequence("hr_admin_post_cfg_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AdminPostCfgDO extends BaseDO {
/**
* ID
*/
@TableId
private Integer id;
/**
* 1234退567
*
* {@link TODO hr_admin_post_cfg_biz_type }
*/
private String typeBiz;
/**
* 123
*
* {@link TODO hr_admin_post_cfg_biz_item }
*/
private String itemType;
/**
* ID
*/
private Long postOrUserId;
/**
*
*/
private LocalDateTime checkInOutTime;
/**
*
*/
private Integer salary;
/**
*
*/
private BigDecimal coef;
/**
*
*/
private Integer sort;
/**
* 0 1
*/
private Integer status;
/**
*
*/
private String remark;
}

View File

@ -0,0 +1,43 @@
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmk;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface AdminAtmkMapper extends BaseMapperX<AdminAtmkDO> {
default PageResult<AdminAtmkDO> selectPage(AdminAtmkPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkDO>()
.eqIfPresent(AdminAtmkDO::getTypeBiz, reqVO.getTypeBiz())
.eqIfPresent(AdminAtmkDO::getUserId, reqVO.getUserId())
.betweenIfPresent(AdminAtmkDO::getStartTime, reqVO.getStartTime())
.betweenIfPresent(AdminAtmkDO::getEndTime, reqVO.getEndTime())
.eqIfPresent(AdminAtmkDO::getLateTimeLimit, reqVO.getLateTimeLimit())
.eqIfPresent(AdminAtmkDO::getEarlyLeavingTimeLimit, reqVO.getEarlyLeavingTimeLimit())
.likeIfPresent(AdminAtmkDO::getAreaName, reqVO.getAreaName())
.eqIfPresent(AdminAtmkDO::getLatitude, reqVO.getLatitude())
.eqIfPresent(AdminAtmkDO::getLongitude, reqVO.getLongitude())
.eqIfPresent(AdminAtmkDO::getCheckInLocation, reqVO.getCheckInLocation())
.eqIfPresent(AdminAtmkDO::getCheckOutLocation, reqVO.getCheckOutLocation())
.eqIfPresent(AdminAtmkDO::getFaceRecognitionResult, reqVO.getFaceRecognitionResult())
.eqIfPresent(AdminAtmkDO::getCheckInPhoto, reqVO.getCheckInPhoto())
.eqIfPresent(AdminAtmkDO::getCheckOutPhoto, reqVO.getCheckOutPhoto())
.eqIfPresent(AdminAtmkDO::getFaceData, reqVO.getFaceData())
.eqIfPresent(AdminAtmkDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminAtmkDO::getRemark, reqVO.getRemark())
.betweenIfPresent(AdminAtmkDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AdminAtmkDO::getId));
}
}

View File

@ -0,0 +1,35 @@
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkface;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface AdminAtmkFaceMapper extends BaseMapperX<AdminAtmkFaceDO> {
default PageResult<AdminAtmkFaceDO> selectPage(AdminAtmkFacePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkFaceDO>()
.eqIfPresent(AdminAtmkFaceDO::getTypeBiz, reqVO.getTypeBiz())
.eqIfPresent(AdminAtmkFaceDO::getDeptId, reqVO.getDeptId())
.eqIfPresent(AdminAtmkFaceDO::getUserId, reqVO.getUserId())
.eqIfPresent(AdminAtmkFaceDO::getUserNo, reqVO.getUserNo())
.likeIfPresent(AdminAtmkFaceDO::getUserName, reqVO.getUserName())
.eqIfPresent(AdminAtmkFaceDO::getFaceData, reqVO.getFaceData())
.eqIfPresent(AdminAtmkFaceDO::getSort, reqVO.getSort())
.eqIfPresent(AdminAtmkFaceDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminAtmkFaceDO::getRemark, reqVO.getRemark())
.betweenIfPresent(AdminAtmkFaceDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AdminAtmkFaceDO::getId));
}
}

View File

@ -0,0 +1,37 @@
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkgroutcfg;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface AdminAtmkGroutCfgMapper extends BaseMapperX<AdminAtmkGroutCfgDO> {
default PageResult<AdminAtmkGroutCfgDO> selectPage(AdminAtmkGroutCfgPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AdminAtmkGroutCfgDO>()
.eqIfPresent(AdminAtmkGroutCfgDO::getTypeBiz, reqVO.getTypeBiz())
.eqIfPresent(AdminAtmkGroutCfgDO::getDeptId, reqVO.getDeptId())
.eqIfPresent(AdminAtmkGroutCfgDO::getGroupCode, reqVO.getGroupCode())
.likeIfPresent(AdminAtmkGroutCfgDO::getGroupName, reqVO.getGroupName())
.betweenIfPresent(AdminAtmkGroutCfgDO::getStartTime, reqVO.getStartTime())
.betweenIfPresent(AdminAtmkGroutCfgDO::getEndTime, reqVO.getEndTime())
.likeIfPresent(AdminAtmkGroutCfgDO::getAreaName, reqVO.getAreaName())
.eqIfPresent(AdminAtmkGroutCfgDO::getLatitude, reqVO.getLatitude())
.eqIfPresent(AdminAtmkGroutCfgDO::getLongitude, reqVO.getLongitude())
.eqIfPresent(AdminAtmkGroutCfgDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminAtmkGroutCfgDO::getRemark, reqVO.getRemark())
.betweenIfPresent(AdminAtmkGroutCfgDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AdminAtmkGroutCfgDO::getId));
}
}

View File

@ -0,0 +1,37 @@
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminperfcfg;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface AdminPerfCfgMapper extends BaseMapperX<AdminPerfCfgDO> {
default PageResult<AdminPerfCfgDO> selectPage(AdminPerfCfgPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AdminPerfCfgDO>()
.eqIfPresent(AdminPerfCfgDO::getTypeBiz, reqVO.getTypeBiz())
.eqIfPresent(AdminPerfCfgDO::getDeptOrUserId, reqVO.getDeptOrUserId())
.eqIfPresent(AdminPerfCfgDO::getTitle, reqVO.getTitle())
.betweenIfPresent(AdminPerfCfgDO::getStarTime, reqVO.getStarTime())
.betweenIfPresent(AdminPerfCfgDO::getEndTime, reqVO.getEndTime())
.eqIfPresent(AdminPerfCfgDO::getSorce, reqVO.getSorce())
.eqIfPresent(AdminPerfCfgDO::getEvg, reqVO.getEvg())
.eqIfPresent(AdminPerfCfgDO::getEvgItem, reqVO.getEvgItem())
.eqIfPresent(AdminPerfCfgDO::getSort, reqVO.getSort())
.eqIfPresent(AdminPerfCfgDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminPerfCfgDO::getRemark, reqVO.getRemark())
.betweenIfPresent(AdminPerfCfgDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AdminPerfCfgDO::getId));
}
}

View File

@ -0,0 +1,35 @@
package cn.iocoder.yudao.module.hrmrg.dal.mysql.adminpostcfg;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
/**
* Mapper
*
* @author
*/
@Mapper
public interface AdminPostCfgMapper extends BaseMapperX<AdminPostCfgDO> {
default PageResult<AdminPostCfgDO> selectPage(AdminPostCfgPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<AdminPostCfgDO>()
.eqIfPresent(AdminPostCfgDO::getTypeBiz, reqVO.getTypeBiz())
.eqIfPresent(AdminPostCfgDO::getItemType, reqVO.getItemType())
.eqIfPresent(AdminPostCfgDO::getPostOrUserId, reqVO.getPostOrUserId())
.betweenIfPresent(AdminPostCfgDO::getCheckInOutTime, reqVO.getCheckInOutTime())
.eqIfPresent(AdminPostCfgDO::getSalary, reqVO.getSalary())
.eqIfPresent(AdminPostCfgDO::getCoef, reqVO.getCoef())
.eqIfPresent(AdminPostCfgDO::getSort, reqVO.getSort())
.eqIfPresent(AdminPostCfgDO::getStatus, reqVO.getStatus())
.eqIfPresent(AdminPostCfgDO::getRemark, reqVO.getRemark())
.betweenIfPresent(AdminPostCfgDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(AdminPostCfgDO::getId));
}
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmk;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import jakarta.validation.Valid;
/**
* Service
*
* @author
*/
public interface AdminAtmkService {
/**
*
*
* @param createReqVO
* @return
*/
Integer createAdminAtmk(@Valid AdminAtmkSaveReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateAdminAtmk(@Valid AdminAtmkSaveReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteAdminAtmk(Integer id);
/**
*
*
* @param id
* @return
*/
AdminAtmkDO getAdminAtmk(Integer id);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AdminAtmkDO> getAdminAtmkPage(AdminAtmkPageReqVO pageReqVO);
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmk;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmk.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmk.AdminAtmkDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmk.AdminAtmkMapper;
import jakarta.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class AdminAtmkServiceImpl implements AdminAtmkService {
@Resource
private AdminAtmkMapper adminAtmkMapper;
@Override
public Integer createAdminAtmk(AdminAtmkSaveReqVO createReqVO) {
// 插入
AdminAtmkDO adminAtmk = BeanUtils.toBean(createReqVO, AdminAtmkDO.class);
adminAtmkMapper.insert(adminAtmk);
// 返回
return adminAtmk.getId();
}
@Override
public void updateAdminAtmk(AdminAtmkSaveReqVO updateReqVO) {
// 校验存在
validateAdminAtmkExists(updateReqVO.getId());
// 更新
AdminAtmkDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkDO.class);
adminAtmkMapper.updateById(updateObj);
}
@Override
public void deleteAdminAtmk(Integer id) {
// 校验存在
validateAdminAtmkExists(id);
// 删除
adminAtmkMapper.deleteById(id);
}
private void validateAdminAtmkExists(Integer id) {
if (adminAtmkMapper.selectById(id) == null) {
throw exception(ADMIN_ATMK_NOT_EXISTS);
}
}
@Override
public AdminAtmkDO getAdminAtmk(Integer id) {
return adminAtmkMapper.selectById(id);
}
@Override
public PageResult<AdminAtmkDO> getAdminAtmkPage(AdminAtmkPageReqVO pageReqVO) {
return adminAtmkMapper.selectPage(pageReqVO);
}
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmkface;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import jakarta.validation.Valid;
/**
* Service
*
* @author
*/
public interface AdminAtmkFaceService {
/**
*
*
* @param createReqVO
* @return
*/
Integer createAdminAtmkFace(@Valid AdminAtmkFaceSaveReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateAdminAtmkFace(@Valid AdminAtmkFaceSaveReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteAdminAtmkFace(Integer id);
/**
*
*
* @param id
* @return
*/
AdminAtmkFaceDO getAdminAtmkFace(Integer id);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AdminAtmkFaceDO> getAdminAtmkFacePage(AdminAtmkFacePageReqVO pageReqVO);
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmkface;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkface.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkface.AdminAtmkFaceDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkface.AdminAtmkFaceMapper;
import jakarta.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class AdminAtmkFaceServiceImpl implements AdminAtmkFaceService {
@Resource
private AdminAtmkFaceMapper adminAtmkFaceMapper;
@Override
public Integer createAdminAtmkFace(AdminAtmkFaceSaveReqVO createReqVO) {
// 插入
AdminAtmkFaceDO adminAtmkFace = BeanUtils.toBean(createReqVO, AdminAtmkFaceDO.class);
adminAtmkFaceMapper.insert(adminAtmkFace);
// 返回
return adminAtmkFace.getId();
}
@Override
public void updateAdminAtmkFace(AdminAtmkFaceSaveReqVO updateReqVO) {
// 校验存在
validateAdminAtmkFaceExists(updateReqVO.getId());
// 更新
AdminAtmkFaceDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkFaceDO.class);
adminAtmkFaceMapper.updateById(updateObj);
}
@Override
public void deleteAdminAtmkFace(Integer id) {
// 校验存在
validateAdminAtmkFaceExists(id);
// 删除
adminAtmkFaceMapper.deleteById(id);
}
private void validateAdminAtmkFaceExists(Integer id) {
if (adminAtmkFaceMapper.selectById(id) == null) {
throw exception(ADMIN_ATMK_FACE_NOT_EXISTS);
}
}
@Override
public AdminAtmkFaceDO getAdminAtmkFace(Integer id) {
return adminAtmkFaceMapper.selectById(id);
}
@Override
public PageResult<AdminAtmkFaceDO> getAdminAtmkFacePage(AdminAtmkFacePageReqVO pageReqVO) {
return adminAtmkFaceMapper.selectPage(pageReqVO);
}
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import jakarta.validation.Valid;
/**
* Service
*
* @author
*/
public interface AdminAtmkGroutCfgService {
/**
*
*
* @param createReqVO
* @return
*/
Integer createAdminAtmkGroutCfg(@Valid AdminAtmkGroutCfgSaveReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateAdminAtmkGroutCfg(@Valid AdminAtmkGroutCfgSaveReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteAdminAtmkGroutCfg(Integer id);
/**
*
*
* @param id
* @return
*/
AdminAtmkGroutCfgDO getAdminAtmkGroutCfg(Integer id);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AdminAtmkGroutCfgDO> getAdminAtmkGroutCfgPage(AdminAtmkGroutCfgPageReqVO pageReqVO);
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.service.adminatmkgroutcfg;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminatmkgroutcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminatmkgroutcfg.AdminAtmkGroutCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkgroutcfg.AdminAtmkGroutCfgMapper;
import jakarta.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class AdminAtmkGroutCfgServiceImpl implements AdminAtmkGroutCfgService {
@Resource
private AdminAtmkGroutCfgMapper adminAtmkGroutCfgMapper;
@Override
public Integer createAdminAtmkGroutCfg(AdminAtmkGroutCfgSaveReqVO createReqVO) {
// 插入
AdminAtmkGroutCfgDO adminAtmkGroutCfg = BeanUtils.toBean(createReqVO, AdminAtmkGroutCfgDO.class);
adminAtmkGroutCfgMapper.insert(adminAtmkGroutCfg);
// 返回
return adminAtmkGroutCfg.getId();
}
@Override
public void updateAdminAtmkGroutCfg(AdminAtmkGroutCfgSaveReqVO updateReqVO) {
// 校验存在
validateAdminAtmkGroutCfgExists(updateReqVO.getId());
// 更新
AdminAtmkGroutCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminAtmkGroutCfgDO.class);
adminAtmkGroutCfgMapper.updateById(updateObj);
}
@Override
public void deleteAdminAtmkGroutCfg(Integer id) {
// 校验存在
validateAdminAtmkGroutCfgExists(id);
// 删除
adminAtmkGroutCfgMapper.deleteById(id);
}
private void validateAdminAtmkGroutCfgExists(Integer id) {
if (adminAtmkGroutCfgMapper.selectById(id) == null) {
throw exception(ADMIN_ATMK_GROUT_CFG_NOT_EXISTS);
}
}
@Override
public AdminAtmkGroutCfgDO getAdminAtmkGroutCfg(Integer id) {
return adminAtmkGroutCfgMapper.selectById(id);
}
@Override
public PageResult<AdminAtmkGroutCfgDO> getAdminAtmkGroutCfgPage(AdminAtmkGroutCfgPageReqVO pageReqVO) {
return adminAtmkGroutCfgMapper.selectPage(pageReqVO);
}
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.service.adminperfcfg;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import jakarta.validation.Valid;
/**
* Service
*
* @author
*/
public interface AdminPerfCfgService {
/**
*
*
* @param createReqVO
* @return
*/
Integer createAdminPerfCfg(@Valid AdminPerfCfgSaveReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateAdminPerfCfg(@Valid AdminPerfCfgSaveReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteAdminPerfCfg(Integer id);
/**
*
*
* @param id
* @return
*/
AdminPerfCfgDO getAdminPerfCfg(Integer id);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AdminPerfCfgDO> getAdminPerfCfgPage(AdminPerfCfgPageReqVO pageReqVO);
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.service.adminperfcfg;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminperfcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminperfcfg.AdminPerfCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminperfcfg.AdminPerfCfgMapper;
import jakarta.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class AdminPerfCfgServiceImpl implements AdminPerfCfgService {
@Resource
private AdminPerfCfgMapper adminPerfCfgMapper;
@Override
public Integer createAdminPerfCfg(AdminPerfCfgSaveReqVO createReqVO) {
// 插入
AdminPerfCfgDO adminPerfCfg = BeanUtils.toBean(createReqVO, AdminPerfCfgDO.class);
adminPerfCfgMapper.insert(adminPerfCfg);
// 返回
return adminPerfCfg.getId();
}
@Override
public void updateAdminPerfCfg(AdminPerfCfgSaveReqVO updateReqVO) {
// 校验存在
validateAdminPerfCfgExists(updateReqVO.getId());
// 更新
AdminPerfCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminPerfCfgDO.class);
adminPerfCfgMapper.updateById(updateObj);
}
@Override
public void deleteAdminPerfCfg(Integer id) {
// 校验存在
validateAdminPerfCfgExists(id);
// 删除
adminPerfCfgMapper.deleteById(id);
}
private void validateAdminPerfCfgExists(Integer id) {
if (adminPerfCfgMapper.selectById(id) == null) {
throw exception(ADMIN_PERF_CFG_NOT_EXISTS);
}
}
@Override
public AdminPerfCfgDO getAdminPerfCfg(Integer id) {
return adminPerfCfgMapper.selectById(id);
}
@Override
public PageResult<AdminPerfCfgDO> getAdminPerfCfgPage(AdminPerfCfgPageReqVO pageReqVO) {
return adminPerfCfgMapper.selectPage(pageReqVO);
}
}

View File

@ -0,0 +1,56 @@
package cn.iocoder.yudao.module.hrmrg.service.adminpostcfg;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import jakarta.validation.Valid;
/**
* Service
*
* @author
*/
public interface AdminPostCfgService {
/**
*
*
* @param createReqVO
* @return
*/
Integer createAdminPostCfg(@Valid AdminPostCfgSaveReqVO createReqVO);
/**
*
*
* @param updateReqVO
*/
void updateAdminPostCfg(@Valid AdminPostCfgSaveReqVO updateReqVO);
/**
*
*
* @param id
*/
void deleteAdminPostCfg(Integer id);
/**
*
*
* @param id
* @return
*/
AdminPostCfgDO getAdminPostCfg(Integer id);
/**
*
*
* @param pageReqVO
* @return
*/
PageResult<AdminPostCfgDO> getAdminPostCfgPage(AdminPostCfgPageReqVO pageReqVO);
}

View File

@ -0,0 +1,75 @@
package cn.iocoder.yudao.module.hrmrg.service.adminpostcfg;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import cn.iocoder.yudao.module.hrmrg.controller.admin.adminpostcfg.vo.*;
import cn.iocoder.yudao.module.hrmrg.dal.dataobject.adminpostcfg.AdminPostCfgDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.module.hrmrg.dal.mysql.adminpostcfg.AdminPostCfgMapper;
import jakarta.annotation.Resource;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.module.hrmrg.enums.ErrorCodeConstants.*;
/**
* Service
*
* @author
*/
@Service
@Validated
public class AdminPostCfgServiceImpl implements AdminPostCfgService {
@Resource
private AdminPostCfgMapper adminPostCfgMapper;
@Override
public Integer createAdminPostCfg(AdminPostCfgSaveReqVO createReqVO) {
// 插入
AdminPostCfgDO adminPostCfg = BeanUtils.toBean(createReqVO, AdminPostCfgDO.class);
adminPostCfgMapper.insert(adminPostCfg);
// 返回
return adminPostCfg.getId();
}
@Override
public void updateAdminPostCfg(AdminPostCfgSaveReqVO updateReqVO) {
// 校验存在
validateAdminPostCfgExists(updateReqVO.getId());
// 更新
AdminPostCfgDO updateObj = BeanUtils.toBean(updateReqVO, AdminPostCfgDO.class);
adminPostCfgMapper.updateById(updateObj);
}
@Override
public void deleteAdminPostCfg(Integer id) {
// 校验存在
validateAdminPostCfgExists(id);
// 删除
adminPostCfgMapper.deleteById(id);
}
private void validateAdminPostCfgExists(Integer id) {
if (adminPostCfgMapper.selectById(id) == null) {
throw exception(ADMIN_POST_CFG_NOT_EXISTS);
}
}
@Override
public AdminPostCfgDO getAdminPostCfg(Integer id) {
return adminPostCfgMapper.selectById(id);
}
@Override
public PageResult<AdminPostCfgDO> getAdminPostCfgPage(AdminPostCfgPageReqVO pageReqVO) {
return adminPostCfgMapper.selectPage(pageReqVO);
}
}

View File

@ -0,0 +1,138 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
autoconfigure:
exclude:
#- com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure # 排除 Druid 的自动配置,使用 dynamic-datasource-spring-boot-starter 配置多数据源
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:mysql://192.168.1.128/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://192.168.1.128/hs-mall-cloud?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
username: root
password: hs-rootadmin
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.1.128/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
--- #################### 定时任务相关配置 ####################
xxl:
job:
enabled: true # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# Spring Boot Admin 配置项
spring:
boot:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.hrmrg.dal.mysql: debug
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: false

View File

@ -0,0 +1,159 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
autoconfigure:
exclude:
#- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
#- de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
# - de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:mysql://192.168.1.128:3306/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
username: root
password: hs-rootadmin
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.1.128:3306/hs-hr-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 192.168.1.128:9876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类
rabbitmq:
host: 192.168.1.128 # RabbitMQ 服务的地址
port: 5672 # RabbitMQ 服务的端口
username: admin # RabbitMQ
password: hsrabbitmq # 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
--- #################### 定时任务相关配置 ####################
xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# Spring Boot Admin 配置项
spring:
boot:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# Spring Boot Admin Server 服务端的相关配置
context-path: /admin # 配置 Spring
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.hrmrg.dal.mysql: debug
cn.iocoder.yudao.module.hrmrg.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info避免和 GlobalExceptionHandler 重复打印
cn.iocoder.yudao.module.hrmrg.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: false

View File

@ -0,0 +1,127 @@
spring:
application:
name: hrmrg-server
profiles:
active: local
main:
allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。
allow-bean-definition-overriding: true # 允许 Bean 覆盖,例如说 Feign 等会存在重复定义的服务
config:
import:
- optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置
- optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置
# Servlet 配置
servlet:
# 文件上传相关配置项
multipart:
max-file-size: 16MB # 单个文件大小
max-request-size: 32MB # 设置总上传的文件大小
# Jackson 配置项
jackson:
serialization:
write-dates-as-timestamps: true # 设置 LocalDateTime 的格式,使用时间戳
write-date-timestamps-as-nanoseconds: false # 设置不使用 nanoseconds 的格式。例如说 1611460870.401,而是直接 1611460870401
write-durations-as-timestamps: true # 设置 Duration 的格式,使用时间戳
fail-on-empty-beans: false # 允许序列化无属性的 Bean
# Cache 配置项
cache:
type: REDIS
redis:
time-to-live: 1h # 设置过期时间为 1 小时
server:
port: 48200
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
--- #################### 接口文档配置 ####################
springdoc:
api-docs:
enabled: true # 1. 是否开启 Swagger 接文档的元数据
path: /v3/api-docs
swagger-ui:
enabled: true # 2.1 是否开启 Swagger 文档的官方 UI 界面
path: /swagger-ui
default-flat-param-object: true # 参见 https://doc.xiaominfo.com/docs/faq/v4/knife4j-parameterobject-flat-param 文档
knife4j:
enable: true # 2.2 是否开启 Swagger 文档的 Knife4j UI 界面
setting:
language: zh_cn
# MyBatis Plus 的配置项
mybatis-plus:
configuration:
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
global-config:
db-config:
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
# id-type: AUTO # 自增 ID适合 MySQL 等直接自增的数据库
# id-type: INPUT # 用户输入 ID适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
# id-type: ASSIGN_ID # 分配 ID默认使用雪花算法。注意Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
banner: false # 关闭控制台的 Banner 打印
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
encryptor:
password: XDV71a+xqStEA3WH # 加解密的秘钥,可使用 https://www.imaegoo.com/2020/aes-key-generator/ 网站生成
mybatis-plus-join:
banner: false # 关闭控制台的 Banner 打印
# Spring Data Redis 配置
spring:
data:
redis:
repositories:
enabled: false # 项目未使用到 Spring Data Redis 的 Repository所以直接禁用保证启动速度
# VO 转换(数据翻译)相关
easy-trans:
is-enable-global: true # 启用全局翻译(拦截所有 SpringMVC ResponseBody 进行自动翻译 )。如果对于性能要求很高可关闭此配置,或通过 @IgnoreTrans 忽略某个接口
--- #################### RPC 远程调用相关配置 ####################
--- #################### MQ 消息队列相关配置 ####################
--- #################### 定时任务相关配置 ####################
xxl:
job:
executor:
appname: ${spring.application.name} # 执行器 AppName
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
accessToken: default_token # 执行器通讯TOKEN
--- #################### 芋道相关配置 ####################
yudao:
info:
version: 1.0.0
base-package: cn.iocoder.yudao.module.hrmrg
web:
admin-ui:
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
xss:
enable: false
exclude-urls: # 如下 url仅仅是为了演示去掉配置也没关系
- ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
swagger:
title: 管理后台
description: 提供管理员管理的所有功能
version: ${yudao.info.version}
tenant: # 多租户相关配置项
enable: true
ignore-urls:
ignore-tables:
debug: false

View File

@ -0,0 +1,76 @@
<configuration>
<!-- 引用 Spring Boot 的 logback 基础配置 -->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<!-- 变量 yudao.info.base-package基础业务包 -->
<springProperty scope="context" name="yudao.info.base-package" source="yudao.info.base-package"/>
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level级别从左显示 5 个字符宽度,%msg日志消息%n是换行符 -->
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<!-- 控制台 Appender -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">     
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
</appender>
<!-- 文件 Appender -->
<!-- 参考 Spring Boot 的 file-appender.xml 编写 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
<!-- 日志文件名 -->
<file>${LOG_FILE}</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- 滚动后的日志文件名 -->
<fileNamePattern>${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz}</fileNamePattern>
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
<!-- 日志文件,到达多少容量,进行滚动 -->
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
<!-- 日志文件的总大小0 表示不限制 -->
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
<!-- 日志文件的保留天数 -->
<maxHistory>${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30}</maxHistory>
</rollingPolicy>
</appender>
<!-- 异步写入日志,提升性能 -->
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志。默认的,如果队列的 80% 已满,则会丢弃 TRACT、DEBUG、INFO 级别的日志 -->
<discardingThreshold>0</discardingThreshold>
<!-- 更改默认的队列的深度,该值会影响性能。默认值为 256 -->
<queueSize>256</queueSize>
<appender-ref ref="FILE"/>
</appender>
<!-- SkyWalking GRPC 日志收集实现日志中心。注意SkyWalking 8.4.0 版本开始支持 -->
<appender name="GRPC" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<pattern>${PATTERN_DEFAULT}</pattern>
</layout>
</encoder>
</appender>
<!-- 本地环境 -->
<springProfile name="local">
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
</root>
</springProfile>
<!-- 其它环境 -->
<springProfile name="dev,test,stage,prod,default">
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ASYNC"/>
<appender-ref ref="GRPC"/>
</root>
</springProfile>
</configuration>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmk.AdminAtmkMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkface.AdminAtmkFaceMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.hrmrg.dal.mysql.adminatmkgroutcfg.AdminAtmkGroutCfgMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.hrmrg.dal.mysql.adminperfcfg.AdminPerfCfgMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.iocoder.yudao.module.hrmrg.dal.mysql.adminpostcfg.AdminPostCfgMapper">
<!--
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
</mapper>

View File

@ -0,0 +1,48 @@
spring:
main:
lazy-initialization: true # 开启懒加载,加快速度
banner-mode: off # 单元测试,禁用 Banner
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
datasource:
name: ruoyi-vue-pro
url: jdbc:h2:mem:testdb;MODE=MYSQL;DATABASE_TO_UPPER=false;NON_KEYWORDS=value; # MODE 使用 MySQL 模式DATABASE_TO_UPPER 配置表和字段使用小写
driver-class-name: org.h2.Driver
username: sa
password:
druid:
async-init: true # 单元测试,异步初始化 Druid 连接池,提升启动速度
initial-size: 1 # 单元测试,配置为 1提升启动速度
sql:
init:
schema-locations: classpath:/sql/create_tables.sql
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis:
host: 127.0.0.1 # 地址
port: 16379 # 端口(单元测试,使用 16379 端口)
database: 0 # 数据库索引
mybatis-plus:
lazy-initialization: true # 单元测试,设置 MyBatis Mapper 延迟加载,加速每个单元测试
type-aliases-package: ${yudao.info.base-package}.dal.dataobject
--- #################### 定时任务相关配置 ####################
--- #################### 配置中心相关配置 ####################
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项(单元测试,禁用 Lock4j
--- #################### 监控相关配置 ####################
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
info:
base-package: cn.iocoder.yudao.module.product

View File

@ -0,0 +1,4 @@
<configuration>
<!-- 引用 Spring Boot 的 logback 基础配置 -->
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
</configuration>

View File

@ -0,0 +1 @@
delete from hr_admin_atmk

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -55,19 +55,19 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 400-infra.server.iocoder.cn # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 1 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
@ -76,15 +76,15 @@ spring:
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
name-server: 192.168.1.128:9876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类
rabbitmq:
host: 127.0.0.1 # RabbitMQ 服务的地址
host: 192.168.1.128 # RabbitMQ 服务的地址
port: 5672 # RabbitMQ 服务的端口
username: guest # RabbitMQ 服务的账号
password: guest # RabbitMQ 服务的密码
username: admin # RabbitMQ
password: hsrabbitmq # 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
@ -93,7 +93,7 @@ spring:
xxl:
job:
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -3,9 +3,9 @@
spring:
cloud:
nacos:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
username: # Nacos 账号
password: # Nacos 密码
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
@ -60,28 +60,28 @@ spring:
primary: master
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
username: root
password: 123456
password: hs-rootadmin
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: 123456
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 127.0.0.1 # 地址
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
@ -90,15 +90,15 @@ spring:
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
name-server: 192.168.1.128:9876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类
rabbitmq:
host: 127.0.0.1 # RabbitMQ 服务的地址
host: 192.168.1.128 # RabbitMQ 服务的地址
port: 5672 # RabbitMQ 服务的端口
username: guest # RabbitMQ 服务的账号
password: guest # RabbitMQ 服务的密码
username: admin # RabbitMQ
password: hsrabbitmq # 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
@ -108,7 +108,7 @@ xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://127.0.0.1:9090/xxl-job-admin # 调度中心部署跟地址
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################

View File

@ -0,0 +1,159 @@
--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: 192.168.1.128:8848 # Nacos 服务器地址
username: nacos # Nacos 账号
password: nacos # Nacos 密码
discovery: # 【配置中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
metadata:
version: 1.0.0 # 服务实例的版本号,可用于灰度发布
config: # 【注册中心】配置项
namespace: dev # 命名空间。这里使用 dev 开发环境
group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP
--- #################### 数据库相关配置 ####################
spring:
# 数据源配置项
autoconfigure:
exclude:
- de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
- de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration # 禁用 Spring Boot Admin 的 Server 的自动配置
- de.codecentric.boot.admin.server.ui.config.AdminServerUiAutoConfiguration # 禁用 Spring Boot Admin 的 Server UI 的自动配置
- de.codecentric.boot.admin.client.config.SpringBootAdminClientAutoConfiguration # 禁用 Spring Boot Admin 的 Client 的自动配置
datasource:
druid: # Druid 【监控】相关的全局配置
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
allow: # 设置白名单,不填则允许所有访问
url-pattern: /druid/*
login-username: # 控制台管理用户名和密码
login-password:
filter:
stat:
enabled: true
log-slow-sql: true # 慢 SQL 记录
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic: # 多数据源配置
druid: # Druid 【连接池】相关的全局配置
initial-size: 1 # 初始连接数
min-idle: 1 # 最小连接池数量
max-active: 20 # 最大连接池数量
max-wait: 600000 # 配置获取连接等待超时的时间,单位:毫秒
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
test-while-idle: true
test-on-borrow: false
test-on-return: false
primary: master
datasource:
master:
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true # MySQL Connector/J 8.X 连接的示例
# url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true # MySQL Connector/J 5.X 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 连接的示例
# url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 连接的示例
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=ruoyi-vue-pro # SQLServer 连接的示例
# url: jdbc:dm://10.211.55.4:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
username: root
password: hs-rootadmin
# username: sa # SQL Server 连接的示例
# password: JSm:g(*%lU4ZAkz06cd52KqT3)i1?H7W # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
# password: SYSDBA # DM 连接的示例
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://192.168.1.128:3306/hs-admin-cloud?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root
password: hs-rootadmin
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:
redis:
host: 192.168.1.128 # 地址
port: 6379 # 端口
database: 0 # 数据库索引
# password: 123456 # 密码,建议生产环境开启
--- #################### MQ 消息队列相关配置 ####################
# rocketmq 配置项,对应 RocketMQProperties 配置类
rocketmq:
name-server: 192.168.1.128:9876 # RocketMQ Namesrv
spring:
# RabbitMQ 配置项,对应 RabbitProperties 配置类
rabbitmq:
host: 192.168.1.128 # RabbitMQ 服务的地址
port: 5672 # RabbitMQ 服务的端口
username: admin # RabbitMQ
password: hsrabbitmq # 服务的密码
# Kafka 配置项,对应 KafkaProperties 配置类
kafka:
bootstrap-servers: 127.0.0.1:9092 # 指定 Kafka Broker 地址,可以设置多个,以逗号分隔
--- #################### 定时任务相关配置 ####################
xxl:
job:
enabled: false # 是否开启调度中心,默认为 true 开启
admin:
addresses: http://192.168.1.128:9090/xxl-job-admin # 调度中心部署跟地址
--- #################### 服务保障相关配置 ####################
# Lock4j 配置项
lock4j:
acquire-timeout: 3000 # 获取分布式锁超时时间,默认为 3000 毫秒
expire: 30000 # 分布式锁的超时时间,默认为 30 毫秒
--- #################### 监控相关配置 ####################
# Actuator 监控端点的配置项
management:
endpoints:
web:
base-path: /actuator # Actuator 提供的 API 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
# Spring Boot Admin 配置项
spring:
boot:
admin:
# Spring Boot Admin Client 客户端的相关配置
client:
instance:
service-host-type: IP # 注册实例时,优先使用 IP [IP, HOST_NAME, CANONICAL_HOST_NAME]
# Spring Boot Admin Server 服务端的相关配置
context-path: /admin # 配置 Spring
# 日志文件配置
logging:
level:
# 配置自己写的 MyBatis Mapper 打印日志
cn.iocoder.yudao.module.infra.dal.mysql: debug
cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper: INFO # 配置 ApiErrorLogMapper 的日志级别为 info避免和 GlobalExceptionHandler 重复打印
cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper: INFO # 配置 FileConfigMapper 的日志级别为 info
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR # TODO 芋艿先禁用Spring Boot 3.X 存在部分错误的 WARN 提示
--- #################### 芋道相关配置 ####################
# 芋道配置项,设置当前项目所有自定义的配置
yudao:
env: # 多环境的配置项
tag: ${HOSTNAME}
security:
mock-enable: true
access-log: # 访问日志的配置项
enable: false

Some files were not shown because too many files have changed in this diff Show More