IoTLink 0.5.0 开放

This commit is contained in:
sdyunze
2022-01-12 14:48:37 +08:00
parent 16b788ba3c
commit c72f52c2c8
849 changed files with 118576 additions and 0 deletions
+241
View File
@@ -0,0 +1,241 @@
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">IoTLink v0.5.0</h1>
<h4 align="center">基于 SpringBoot、Vue、Mybatis、RabbitMq、Mysql、Redis 的物联网卡管理系统</h4>
# 一、 关于 IoTLink
> 云则 物联网卡管理系统
## 1.1 项目介绍
IoTLink 一套全部开源的物联网管理平台,毫无保留给个人及企业免费使用。
基于[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)开发的物联网卡管理系统;
物联网卡管理系统基础功能:
同步物联网卡数据信息【用量】【状态】【激活时间】【在线信息】等,资费组、资费计划、订购历史、用量详情
API通道灵活管理、启动轮询任务同步分类针对不同的需求控制轮询启动间隔、通道轮询进度监控、RabbitMq独立控制轮询同步
物联网卡划分代理集团、卡信息变更记录查询、分组、备注、发货时间标签
基于我司自主研发的融合管理系统为企业客户提供全面的API接口开放能力
同时保障所有物联网卡的可溯源、可监管、可操作、可调配的能力
支持定制化流量及自主计费支撑,并通过调用流量运营有效合理进行用量管控,保障稳定性的同时成本最小化
山东云则期待与您携手共建物联网智能化项目生态环境!
特别鸣谢:[RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)[element](https://github.com/ElemeFE/element)[vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)[eladmin-web](https://github.com/elunez/eladmin-web)
## 1.2 [公司介绍](https://www.5iot.com/gongsijianjie.html) [山东云则](https://www.5iot.com)
一家专注于物联网行业通信模组、传感器、设备研究、研发、生产及销售于一体的新兴高新技术企业。公司聚集了一批朝气蓬勃、有梦想,有追求的物联网人,他们服务热忱,经验丰富,熟悉行业,用专业的技术和热情的态度做好产品技术支持。
公司自成立以来,先后通过ISO 9001质量管理体系认证、ISO27001信息安全管理体系认证、山东省物联网协会理事单位、深圳市物联网协会理事单位,公司拥有实用新型专利4项、作品著作权1项、软件著作权20余项。
公司以创新为动力,以应用促研发,为政府部门、企事业单位和行业客户提供专业的物联网解决方案。与通信运营商强强联合,赋予更多行业、更便捷、高质量、低成本的联网能力。并与多家知名硬件生产、方案商精诚合作。携手政府、金融、农业、环保、工业、能源、安防等产业伙伴们一起打造更高效率、更安全、更节能环保、更可持续发展的智慧产业,公司致力于成为您身边的物联网专家,助您快速接入物联网,让万物互联更简单。
公司通过“专业、及时、真诚”的服务,获得了广大用户及业界的认可,依靠多年的行业经验,与用户共同打造可持续发展企业,实现为客户持续创造价值的目标。
## 1.3 能力
整个系统共分为十一大模块:
![输入图片说明](yunze-ui/public/IoTLink%20(1).png)
* 山东云则
## 1.4 优势
IoTLink 基于RuoYI-Vue开发RabbitMq分离服务与执行优化业务与执行,可满足物联网用户对物联网卡、客户、合同、发货、仓库 多重管理
* 上游API集中管理一次对接直接配置 ,快速上手
* RabbitMq 分离执行任务快速响应满足多端部署
* 采用主流 Java 架构,具备高拓展性、灵活性
* 对外提供内部 API,低成本二次开发
* 基于 RuoYI-Vue 主流业务系统框架
## 1.4 愿景
IoTLink 通过开源让每个企业都能快速接入物联网成为自己的物联网专家:
* 集成 RuoYI-Vue 基础能力,拿来即用
* 针对垂直行业提供一站式物联网 营销、管理 解决方案
* 开放自身平台能力,让更多的开发者参与进来
* 携手政府、金融、农业、环保、工业、能源、安防等产业伙伴们一起打造更高效率、更安全、更节能环保、更可持续发展的智慧产业
# 二、关于项目
演示地址:[http://demo.5iot.cn/](http://demo.5iot.cn/)
演示账号/密码:5iot/123456
## 2.2 技术栈
本项目基于 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue?_from=gitee_search) 后台开发框架,感谢 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue?_from=gitee_search) 的开源。
| 技术栈 | 介绍 | 地址 |
|:-:|:-:|:-:|
| Vue | 渐进式 JavaScript 框架 | https://cn.vuejs.org/ |
| Vuex |专为 Vue.js 应用程序开发的状态管理模式 |https://vuex.vuejs.org/zh/ |
|Vue Router| Vue.js 官方的路由管理器| https://router.vuejs.org/zh/
|Vue CLI |基于 Vue.js 进行快速开发的完整系统 |https://cli.vuejs.org/zh/guide/
|Vant| 轻量、可靠的移动端 Vue 组件库 |https://vant-contrib.gitee.io/vant/#/zh-CN/
|Element-UI |基于 Vue 2.0 的桌面端组件库| https://element.eleme.io/#/zh-CN
|ES6| JavaScript 语言的下一代标准| https://es6.ruanyifeng.com/
**后端技术栈**
| 技术栈 | 介绍 | 地址 |
|:-:|:-:|:-:|
|Spring Boot |快捷创建基于 Spring 的生产级应用程序| https://spring.io/projects/spring-boot
|MyBatis-Plus| MyBatis 增强工具 |https://mp.baomidou.com/
|MyBatis| MyBatis 持久层框架 |https://mybatis.org/mybatis-3/zh/index.html
|JWT| 轻量级身份认证规范| https://jwt.io/introduction
|RabbitMq| 基于AMQP协议的消息中间件 | https://www.rabbitmq.com/
|Spring Security |基于 Spring 的强大且高度可定制的身份验证和访问控制框架 |https://spring.io/projects/spring-security/
## 2.3 项目结构
**后端结构**
```
com.yunze
├── common // 工具类
│ └── annotation // 自定义注解
│ └── config // 全局配置
│ └── constant // 通用常量
│ └── core // 核心控制
│ └── enums // 通用枚举
│ └── exception // 通用异常
│ └── filter // 过滤器处理
│ └── mapper // 数据持久化
│ └── utils // 通用类处理
├── framework // 框架核心
│ └── aspectj // 注解实现
│ └── config // 系统配置
│ └── datasource // 数据权限
│ └── interceptor // 拦截器
│ └── manager // 异步处理
│ └── security // 权限控制
│ └── web // 前端控制
├── cAdmin // 平台业务分离执行监听
│ └── system // 监听yunze-admin业务执行
├── yunze-generator // 代码生成
├── yunze-quartz // 定时任务
├── yunze-system // 系统代码
├── yunze-admin // 后台服务
├── yunze-ui // 页面前端代码
```
**前端结构**
```
├── build // 构建相关
├── bin // 执行脚本
├── public // 公共文件
│ ├── favicon.ico // favicon图标
│ └── index.html // html模板
├── src // 源代码
│ ├── api // 所有请求
│ ├── assets // 主题 字体等静态资源
│ ├── components // 全局公用组件
│ ├── directive // 全局指令
│ ├── layout // 布局
│ ├── router // 路由
│ ├── store // 全局 store管理
│ ├── utils // 全局公用方法
│ ├── views // view
│ ├── App.vue // 入口页面
│ ├── main.js // 入口 加载组件 初始化等
│ ├── permission.js // 权限管理
│ └── settings.js // 系统配置
├── .editorconfig // 编码格式
├── .env.development // 开发环境配置
├── .env.production // 生产环境配置
├── .env.staging // 测试环境配置
├── .eslintignore // 忽略语法检查
├── .eslintrc.js // eslint 配置项
├── .gitignore // git 忽略项
├── babel.config.js // babel.config.js
├── package.json // package.json
└── vue.config.js // vue.config.js
```
## 2.4 项目部署
点击下方链接进入官方语雀帮助手册查看项目部署方式:
[如何快速部署 IoTLink](https://doc.5iot.com)
建议服务器最低配置:
| 类型 | 配置 |
|:-:|:-:|
|操作系统|CentOS Stream 8 64位|
|CPU|4核|
|内存|16G|
|带宽|5M|
|硬盘|100G|
# 三、常见问题
**常见问题列表**
[1.有哪几种部署方式?](https://doc.5iot.com/help/bww8vd)
[2.数据库为什么 Group By 查询报错?](https://doc.5iot.com/help/babnva)
[3.项目每个分支的作用是什么?](https://doc.5iot.com/help/ztbre1)
[4、项目启动时为什么报错?](https://doc.5iot.com/help/cepvgv)
[5、目前支持哪些上游资源接口?](https://doc.5iot.com/help/ffi7bu)
# 四、最近规划
IoTLink 团队目前在完成 IoTLink V0.6 版本建设,主要围绕 营销管理、财务管理、发货管理、商品管理 等模块进行建设,预计 2022.03 月中旬上线。
V1.0版本主要功能如下
- [ ] 开放【营销管理】【财务管理】【发货管理】【商品管理】业务板块 2022.03;
- [ ] B端公众号web程序开放【公众号管理】【C端充值】【商品购买】业务板块 2022.06;
- [ ] 开放【对外API接口对接程序】【上游对接API核心jar】业务板块 2022.08
- [ ] 开放升级【自动化任务】业务板块 2022.11;
# 五、联系我们
如果你想加入我们的开源交流群,请扫码添加 IoTLink 项目作者,加入群聊:
如果你有任何 IoTLink 产品上的想法、意见或建议,或商务上的合作需求,请扫码添加 IoTLink 项目团队进一步沟通:
---
**<p align="center">如果您觉得我们的开源项目很有帮助,请点击 :star: Star 支持 IoTLink 开源团队 :heart: </p>**
---
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
# 目录说明
> `mnt\yunze\download\csv` 目录下的 xls 文件用于下载模板 将该文件夹复制到服务器根目录
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,514 @@
2022-01-12 09:40:50 [background-preinit] INFO org.hibernate.validator.internal.util.Version --> HV000001: Hibernate Validator 6.0.22.Final
2022-01-12 09:40:50 [restartedMain] INFO com.yunze.YunZeApplication --> Starting YunZeApplication on Dell with PID 26064 (H:\gitflie\sdyunze\yun-ze-iot\yunze-admin\target\classes started by 54655 in H:\gitflie\sdyunze\yun-ze-iot)
2022-01-12 09:40:50 [restartedMain] DEBUG com.yunze.YunZeApplication --> Running with Spring Boot v2.2.13.RELEASE, Spring v5.2.12.RELEASE
2022-01-12 09:40:50 [restartedMain] INFO com.yunze.YunZeApplication --> The following profiles are active: druid
2022-01-12 09:41:02 [restartedMain] INFO org.apache.coyote.http11.Http11NioProtocol --> Initializing ProtocolHandler ["http-nio-8080"]
2022-01-12 09:41:02 [restartedMain] INFO org.apache.catalina.core.StandardService --> Starting service [Tomcat]
2022-01-12 09:41:02 [restartedMain] INFO org.apache.catalina.core.StandardEngine --> Starting Servlet engine: [Apache Tomcat/9.0.41]
2022-01-12 09:41:02 [restartedMain] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] --> Initializing Spring embedded WebApplicationContext
2022-01-12 09:41:05 [restartedMain] DEBUG c.y.f.security.filter.JwtAuthenticationTokenFilter --> Filter 'jwtAuthenticationTokenFilter' configured for use
2022-01-12 09:41:12 [restartedMain] INFO com.alibaba.druid.pool.DruidDataSource --> {dataSource-1} inited
2022-01-12 09:41:12 [restartedMain] DEBUG c.y.system.mapper.SysConfigMapper.selectConfigList --> ==> Preparing: select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config
2022-01-12 09:41:12 [restartedMain] DEBUG c.y.system.mapper.SysConfigMapper.selectConfigList --> ==> Parameters:
2022-01-12 09:41:12 [restartedMain] DEBUG c.y.system.mapper.SysConfigMapper.selectConfigList --> <== Total: 13
2022-01-12 09:41:13 [restartedMain] INFO io.lettuce.core.EpollProvider --> Starting without optional epoll library
2022-01-12 09:41:13 [restartedMain] INFO io.lettuce.core.KqueueProvider --> Starting without optional kqueue library
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.mapper.SysDictTypeMapper.selectDictTypeAll --> ==> Preparing: select dict_id, dict_name, dict_type, status, create_by, create_time, remark from sys_dict_type
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.mapper.SysDictTypeMapper.selectDictTypeAll --> ==> Parameters:
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.mapper.SysDictTypeMapper.selectDictTypeAll --> <== Total: 128
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_user_sex(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_show_hide(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_normal_disable(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_job_status(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_job_group(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_yes_no(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_notice_type(String)
2022-01-12 09:41:16 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_notice_status(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_oper_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 9
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: sys_common_status(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: card_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_seltype(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_sel_timetype(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_deltype(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_operators_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_status_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 33
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_takeEffect_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_valid_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_pay_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_customize_whether(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_card_type(String)
2022-01-12 09:41:17 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_network_type(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_online_status(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_access_type(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_StartAndEnd_type(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_channel_selType(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: ORDER_BY_rule(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: channel_ORDER_BY_type(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: channel_status(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: channel_code(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: executionTask_selType(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: executionTask_ORDER_BY_type(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ExecutionTask_OutType(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 22
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_packet_valid_name(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_tariffGroup_selType(String)
2022-01-12 09:41:18 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_tariffPlan_selType(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_status(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_polling_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_task_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 13
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_seltype(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_creType(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_profitType(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_sel_timetype(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_order_StartAndEnd_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_packet_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_base_packet_type(String)
2022-01-12 09:41:19 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_syslogs_sel_timetype(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: dosage_details_flow_his(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_yz_card_flow_his(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_yz_passageway(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_passageway_polling(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_sorting_rules(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_flow(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Lifting_sequence(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_card_flow(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: system_yz_sys_logs_sysLog(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 6
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_sys_logs_project(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cardChange_type(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cardChange_sourceType(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 7
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cardConnection_type(String)
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:20 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cardChange_ExecutionStatus(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: cardNumber(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_trigger_type(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_execution_type(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_status(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_template(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_HisStatus(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_result(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_enabled_state(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_commodity_sell(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_check_state(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Stop_and_resume(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Disconnect_the_network(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_card_info_change(String)
2022-01-12 09:41:21 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_state(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_source(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_grade(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_grade_one(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_grade_tow(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_selType(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_customer_selTimeType(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_CustomerChange_type(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 6
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_CustomerSort_type(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Automation_time(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Automated_configuration(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 0
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_cc_condition(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: cc_query_criteria(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: prdCategory_timet(String)
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:22 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_task_sel_timetype(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: buttonyesno(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Warehousing_source(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 0
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Commodity_supplier(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Commodity_Operator(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Bcommodity_selType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Ccommodity_selType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_BcommoditySort_selType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Universal_delete(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_profit_sharingType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 8
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Invoicing_Type(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_Contract_status(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_ReceivePayment_type(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_SalesContract_selType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yz_SalesContract_selTimeType(String)
2022-01-12 09:41:23 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: cwgl_Deposit_type(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: cwgl_Deposit_state(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Ship_state(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: DepositSource_type(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: invoice_Nature(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: contract_nature(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_OrderDelivery_selType(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 1
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_OrderDelivery_timetype(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Delivery_selection_type(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Delivery_method(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Delivery_type(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: Shipping_method(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ShippingApplication_selType(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ShippingApplication_timetype(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ExpressInquiry_selType(String)
2022-01-12 09:41:24 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 4
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ExpressInquiry_timetype(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ExpressInquiry_SignFor(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ExpressInquiry_Evaluation(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 5
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_card_status_ShowId(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 8
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_InventoryDetails_selType(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 16
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_inventorydetails_timetype(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_inventorydetails_StartAndEnd_type(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 15
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_CustomerInquiries_selType(String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 2
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_ShippingApplication_OutboundStatus (String)
2022-01-12 09:41:25 [restartedMain] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 3
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.impl.StdSchedulerFactory --> Using default implementation for ThreadExecutor
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.core.SchedulerSignalerImpl --> Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.core.QuartzScheduler --> Quartz Scheduler v.2.3.2 created.
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.core.QuartzScheduler --> Scheduler meta-data: Quartz Scheduler (v2.3.2) 'RuoyiScheduler' with instanceId 'Dell1641951688467'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 20 threads.
Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is clustered.
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.impl.StdSchedulerFactory --> Quartz scheduler 'RuoyiScheduler' initialized from an externally provided properties instance.
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.impl.StdSchedulerFactory --> Quartz scheduler version: 2.3.2
2022-01-12 09:41:28 [restartedMain] INFO org.quartz.core.QuartzScheduler --> JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@54275e0e
2022-01-12 09:41:29 [restartedMain] DEBUG com.yunze.quartz.mapper.SysJobMapper.selectJobAll --> ==> Preparing: select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark from sys_job
2022-01-12 09:41:29 [restartedMain] DEBUG com.yunze.quartz.mapper.SysJobMapper.selectJobAll --> ==> Parameters:
2022-01-12 09:41:29 [restartedMain] DEBUG com.yunze.quartz.mapper.SysJobMapper.selectJobAll --> <== Total: 25
2022-01-12 09:41:48 [restartedMain] INFO s.d.s.w.PropertySourcedRequestMappingHandlerMapping --> Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)]
2022-01-12 09:41:53 [restartedMain] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper --> Context refreshed
2022-01-12 09:41:53 [restartedMain] INFO s.d.s.web.plugins.DocumentationPluginsBootstrapper --> Found 1 custom documentation plugin(s)
2022-01-12 09:41:53 [restartedMain] INFO s.d.spring.web.scanners.ApiListingReferenceScanner --> Scanning for api listing references
2022-01-12 09:41:54 [restartedMain] INFO org.apache.coyote.http11.Http11NioProtocol --> Starting ProtocolHandler ["http-nio-8080"]
2022-01-12 09:41:54 [restartedMain] INFO com.yunze.YunZeApplication --> Started YunZeApplication in 65.83 seconds (JVM running for 77.537)
2022-01-12 09:41:56 [Quartz Scheduler [RuoyiScheduler]] INFO org.quartz.core.QuartzScheduler --> Scheduler RuoyiScheduler_$_Dell1641951688467 started.
2022-01-12 09:44:09 [http-nio-8080-exec-24] INFO o.a.c.core.ContainerBase.[Tomcat].[localhost].[/] --> Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-01-12 09:44:16 [http-nio-8080-exec-26] WARN o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver --> Resolved [com.yunze.common.exception.user.CaptchaException: 验证码错误]
2022-01-12 09:44:16 [schedule-pool-1] INFO sys-user --> [127.0.0.1]XX XX[admin][Error][验证码错误]
2022-01-12 09:44:16 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Preparing: insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) values (?, ?, ?, ?, ?, ?, ?, sysdate())
2022-01-12 09:44:16 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Parameters: admin(String), 1(String), 127.0.0.1(String), XX XX(String), Chrome 9(String), Windows 10(String), 验证码错误(String)
2022-01-12 09:44:17 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> <== Updates: 1
2022-01-12 09:44:52 [http-nio-8080-exec-23] WARN o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver --> Resolved [com.yunze.common.exception.user.CaptchaException: 验证码错误]
2022-01-12 09:44:52 [schedule-pool-1] INFO sys-user --> [127.0.0.1]XX XX[admin][Error][验证码错误]
2022-01-12 09:44:52 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Preparing: insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) values (?, ?, ?, ?, ?, ?, ?, sysdate())
2022-01-12 09:44:52 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Parameters: admin(String), 1(String), 127.0.0.1(String), XX XX(String), Chrome 9(String), Windows 10(String), 验证码错误(String)
2022-01-12 09:44:52 [schedule-pool-1] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> <== Updates: 1
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG c.y.s.mapper.SysUserMapper.selectUserByUserName --> ==> Preparing: select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status from sys_user u left join sys_dept d on u.dept_id = d.dept_id left join sys_user_role ur on u.user_id = ur.user_id left join sys_role r on r.role_id = ur.role_id where u.user_name = ?
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG c.y.s.mapper.SysUserMapper.selectUserByUserName --> ==> Parameters: admin(String)
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG c.y.s.mapper.SysUserMapper.selectUserByUserName --> <== Total: 1
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG com.yunze.system.mapper.SysUserMapper.updateUser --> ==> Preparing: update sys_user SET dept_id = ?, user_name = ?, nick_name = ?, email = ?, phonenumber = ?, sex = ?, avatar = ?, password = ?, status = ?, login_ip = ?, login_date = ?, remark = ?, update_time = sysdate() where user_id = ?
2022-01-12 09:44:55 [schedule-pool-2] INFO sys-user --> [127.0.0.1]XX XX[admin][Success][登录成功]
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG com.yunze.system.mapper.SysUserMapper.updateUser --> ==> Parameters: 100(Long), admin(String), 管理员(String), (String), 15888888899(String), 0(String), /profile/avatar/2021/09/18/07019f5b-4ac2-4852-9c8d-ff104e376c44.jpeg(String), $2a$10$Aec8Mrw3PfMTErFL8PtxM.oX7Mb52rtOms9/0yd8lWhBZ1jik6tv2(String), 0(String), 127.0.0.1(String), 2022-01-12 09:44:55.356(Timestamp), 管理员(String), 1(Long)
2022-01-12 09:44:55 [http-nio-8080-exec-25] DEBUG com.yunze.system.mapper.SysUserMapper.updateUser --> <== Updates: 1
2022-01-12 09:44:55 [schedule-pool-2] WARN com.alibaba.druid.pool.DruidAbstractDataSource --> discard long time none received connection. , jdbcUrl : jdbc:mysql://127.0.0.1/iotdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8, version : 1.2.8, lastPacketReceivedIdleMillis : 119157
2022-01-12 09:44:55 [schedule-pool-2] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Preparing: insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) values (?, ?, ?, ?, ?, ?, ?, sysdate())
2022-01-12 09:44:55 [schedule-pool-2] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> ==> Parameters: admin(String), 0(String), 127.0.0.1(String), XX XX(String), Chrome 9(String), Windows 10(String), 登录成功(String)
2022-01-12 09:44:55 [schedule-pool-2] DEBUG c.y.s.mapper.SysLogininforMapper.insertLogininfor --> <== Updates: 1
2022-01-12 09:44:56 [http-nio-8080-exec-20] DEBUG c.y.system.mapper.SysMenuMapper.selectMenuTreeAll --> ==> Preparing: select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0 order by m.parent_id, m.order_num
2022-01-12 09:44:56 [http-nio-8080-exec-20] DEBUG c.y.system.mapper.SysMenuMapper.selectMenuTreeAll --> ==> Parameters:
2022-01-12 09:44:56 [http-nio-8080-exec-20] DEBUG c.y.system.mapper.SysMenuMapper.selectMenuTreeAll --> <== Total: 51
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.y.common.mapper.yunze.YzOrderMapper.updAutomatic --> ==> Preparing: update yz_order SET add_package = 1 WHERE id in ( SELECT b.id FROM yz_card_flow a, yz_order b where a.ord_no = b.ord_no and a.iccid = b.iccid and b.add_package = 0 )
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.y.common.mapper.yunze.YzOrderMapper.updAutomatic --> ==> Parameters:
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.y.c.mapper.yunze.YzOrderMapper.findAddPackage --> ==> Preparing: SELECT a.id, a.ord_no, a.iccid, a.add_parameter, a.validate_type, DATE_FORMAT( a.create_time, "%Y-%m-%d %H:%i:%S" ) AS create_time, b.id as Bid, b.activate_date FROM yz_order a, yz_card_info b WHERE a.ord_type = 2 and a.status = 1 and a.add_package = 0 and a.iccid = b.iccid AND a.validate_type != ?
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.y.c.mapper.yunze.YzOrderMapper.findAddPackage --> ==> Parameters: 4(String)
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.y.c.mapper.yunze.YzOrderMapper.findAddPackage --> <== Total: 0
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> ==> Preparing: insert into sys_job_log( job_name, job_group, invoke_target, job_message, status, create_time )values( ?, ?, ?, ?, ?, sysdate() )
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> ==> Parameters: 除 生效类型为 [激活生效] 外 所有加包 增加到生产任务中去(String), POLLING(String), orderAddPackageProductionTask.addPackageProduction(180)(String), 除 生效类型为 [激活生效] 外 所有加包 增加到生产任务中去 总共耗时:235毫秒(String), 0(String)
2022-01-12 09:45:00 [RuoyiScheduler_Worker-1] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> <== Updates: 1
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] WARN com.alibaba.druid.pool.DruidAbstractDataSource --> discard long time none received connection. , jdbcUrl : jdbc:mysql://127.0.0.1/iotdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8, version : 1.2.8, lastPacketReceivedIdleMillis : 229823
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] WARN com.alibaba.druid.pool.DruidAbstractDataSource --> discard long time none received connection. , jdbcUrl : jdbc:mysql://127.0.0.1/iotdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8, version : 1.2.8, lastPacketReceivedIdleMillis : 230250
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] WARN com.alibaba.druid.pool.DruidAbstractDataSource --> discard long time none received connection. , jdbcUrl : jdbc:mysql://127.0.0.1/iotdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8, version : 1.2.8, lastPacketReceivedIdleMillis : 230610
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.y.apiCommon.mapper.YzCardRouteMapper.findRouteID --> ==> Preparing: SELECT cd_id, cd_code, cd_name, cd_username, cd_pwd, cd_key, cd_status, cd_concurrency, cd_control_type FROM yz_card_route WHERE cd_lunxun = '1' and cd_status = '1'
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.y.apiCommon.mapper.YzCardRouteMapper.findRouteID --> ==> Parameters:
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.y.apiCommon.mapper.YzCardRouteMapper.findRouteID --> <== Total: 0
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> ==> Preparing: insert into sys_job_log( job_name, job_group, invoke_target, job_message, status, create_time )values( ?, ?, ?, ?, ?, sysdate() )
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> ==> Parameters: 达量停机(String), POLLING(String), cardStopTask.pollingCardStop(60)(String), 达量停机 总共耗时:186毫秒(String), 0(String)
2022-01-12 09:45:01 [RuoyiScheduler_Worker-2] DEBUG c.yunze.quartz.mapper.SysJobLogMapper.insertJobLog --> <== Updates: 1
2022-01-12 09:45:04 [http-nio-8080-exec-18] DEBUG c.y.c.m.yunze.YzCardFlowMapper.queryPackage_simple --> ==> Preparing: SELECT package_id, package_agentname FROM yz_card_package
2022-01-12 09:45:04 [http-nio-8080-exec-18] DEBUG c.y.c.m.yunze.YzCardFlowMapper.queryPackage_simple --> ==> Parameters:
2022-01-12 09:45:04 [http-nio-8080-exec-18] DEBUG c.y.c.m.yunze.YzCardFlowMapper.queryPackage_simple --> <== Total: 0
2022-01-12 09:45:05 [http-nio-8080-exec-12] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_sp --> ==> Preparing: SELECT cd_id, cd_alias FROM yz_card_route ORDER BY cd_alias ASC,cd_id
2022-01-12 09:45:05 [http-nio-8080-exec-12] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_sp --> ==> Parameters:
2022-01-12 09:45:05 [http-nio-8080-exec-8] DEBUG com.yunze.system.mapper.SysDeptMapper.getDeptName --> ==> Preparing: select dept_id,dname as 'dept_name' from sys_dept
2022-01-12 09:45:05 [http-nio-8080-exec-8] DEBUG com.yunze.system.mapper.SysDeptMapper.getDeptName --> ==> Parameters:
2022-01-12 09:45:05 [http-nio-8080-exec-12] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_sp --> <== Total: 1
2022-01-12 09:45:05 [http-nio-8080-exec-8] DEBUG com.yunze.system.mapper.SysDeptMapper.getDeptName --> <== Total: 1
2022-01-12 09:45:05 [http-nio-8080-exec-15] DEBUG c.y.c.mapper.yunze.YzCardMapper.getCardGrouping --> ==> Preparing: SELECT customize_grouping FROM yz_card_info WHERE ISNULL(customize_grouping )= 0 AND LENGTH( trim( customize_grouping ))> 0 GROUP BY customize_grouping
2022-01-12 09:45:05 [http-nio-8080-exec-15] DEBUG c.y.c.mapper.yunze.YzCardMapper.getCardGrouping --> ==> Parameters:
2022-01-12 09:45:05 [http-nio-8080-exec-15] DEBUG c.y.c.mapper.yunze.YzCardMapper.getCardGrouping --> <== Total: 0
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG c.y.common.mapper.yunze.YzCardMapper.selMapCount --> ==> Preparing: SELECT COUNT(iccid) FROM yz_card_info
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG c.y.common.mapper.yunze.YzCardMapper.selMapCount --> ==> Parameters:
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG c.y.common.mapper.yunze.YzCardMapper.selMapCount --> <== Total: 1
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG com.yunze.common.mapper.yunze.YzCardMapper.selMap --> ==> Preparing: SELECT id, vid, msisdn, iccid, imsi, open_date, activate_date, agent_id, channel_id, DATE_FORMAT( batch_date, "%Y-%m-%d" ) AS batch_date, DATE_FORMAT( syn_Time, "%Y-%m-%d %H:%i:%S" ) AS syn_Time, remarks, status_id, status_ShowId, package_id, used, customize_grouping, DATE_FORMAT( deliver_date, "%Y-%m-%d" ) AS deliver_date, DATE_FORMAT( due_expire_time, "%Y-%m-%d" ) AS due_expire_time ,remind_ratio, virtual_ratio, del_flag, connection_status, is_Disconnected FROM yz_card_info LIMIT ?,?
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG com.yunze.common.mapper.yunze.YzCardMapper.selMap --> ==> Parameters: 0(Integer), 10(Integer)
2022-01-12 09:45:05 [http-nio-8080-exec-29] DEBUG com.yunze.common.mapper.yunze.YzCardMapper.selMap --> <== Total: 1
2022-01-12 09:45:06 [http-nio-8080-exec-30] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> ==> Preparing: select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.dname from sys_dept d where d.del_flag = '0' order by d.parent_id, d.order_num
2022-01-12 09:45:06 [http-nio-8080-exec-30] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> ==> Parameters:
2022-01-12 09:45:06 [http-nio-8080-exec-30] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> <== Total: 1
2022-01-12 09:45:06 [http-nio-8080-exec-26] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> ==> Preparing: SELECT cd_id AS 'dictValue', CONCAT( cd_alias , "-",cd_name ) AS 'dictLabel' FROM yz_card_route WHERE cd_status = 1 ORDER BY dictLabel ASC, cd_id
2022-01-12 09:45:06 [http-nio-8080-exec-26] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> ==> Parameters:
2022-01-12 09:45:06 [http-nio-8080-exec-26] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> <== Total: 0
2022-01-12 09:45:09 [http-nio-8080-exec-28] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> ==> Preparing: SELECT cd_id AS 'dictValue', CONCAT( cd_alias , "-",cd_name ) AS 'dictLabel' FROM yz_card_route WHERE cd_status = 1 ORDER BY dictLabel ASC, cd_id
2022-01-12 09:45:09 [http-nio-8080-exec-28] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> ==> Parameters:
2022-01-12 09:45:09 [http-nio-8080-exec-28] DEBUG c.yunze.apiCommon.mapper.YzCardRouteMapper.find_cr --> <== Total: 0
2022-01-12 09:45:12 [http-nio-8080-exec-19] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Preparing: select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data where status = '0' and dict_type = ? order by dict_sort asc
2022-01-12 09:45:12 [http-nio-8080-exec-22] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> ==> Preparing: select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.dname from sys_dept d where d.del_flag = '0' order by d.parent_id, d.order_num
2022-01-12 09:45:12 [http-nio-8080-exec-22] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> ==> Parameters:
2022-01-12 09:45:12 [http-nio-8080-exec-19] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> ==> Parameters: yunze_packet_valid_time(String)
2022-01-12 09:45:12 [http-nio-8080-exec-19] DEBUG c.y.s.m.SysDictDataMapper.selectDictDataByType --> <== Total: 0
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.c.m.yunze.YzAgentPackageMapper.selMapCount --> ==> Preparing: SELECT a.id FROM yz_agent_package a LEFT JOIN sys_dept d ON a.dept_id = d.dept_id LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id LEFT JOIN sys_role r ON r.role_id = ur.role_id LEFT JOIN sys_user u ON a.user_id = u.user_id GROUP BY a.id
2022-01-12 09:45:12 [http-nio-8080-exec-22] DEBUG c.yunze.system.mapper.SysDeptMapper.selectDeptList --> <== Total: 1
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.c.m.yunze.YzAgentPackageMapper.selMapCount --> ==> Parameters:
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.c.m.yunze.YzAgentPackageMapper.selMapCount --> <== Total: 0
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.common.mapper.yunze.YzCardPackageMapper.selMap --> ==> Preparing: SELECT a.id, a.package_id, a.package_agentname, a.package_name, DATE_FORMAT( a.create_time, "%Y-%m-%d %H:%i:%S" ) AS create_time, a.error_so, d.dept_name, u.nick_name FROM yz_card_package a LEFT JOIN sys_dept d ON a.dept_id = d.dept_id LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id LEFT JOIN sys_role r ON r.role_id = ur.role_id LEFT JOIN sys_user u ON a.user_id = u.user_id GROUP BY a.id LIMIT ?,?
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.common.mapper.yunze.YzCardPackageMapper.selMap --> ==> Parameters: 0(Integer), 10(Integer)
2022-01-12 09:45:12 [http-nio-8080-exec-23] DEBUG c.y.common.mapper.yunze.YzCardPackageMapper.selMap --> <== Total: 0
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO org.quartz.core.QuartzScheduler --> Scheduler RuoyiScheduler_$_Dell1641951688467 paused.
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO org.quartz.core.QuartzScheduler --> Scheduler RuoyiScheduler_$_Dell1641951688467 shutting down.
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO org.quartz.core.QuartzScheduler --> Scheduler RuoyiScheduler_$_Dell1641951688467 paused.
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO org.quartz.core.QuartzScheduler --> Scheduler RuoyiScheduler_$_Dell1641951688467 shutdown complete.
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO sys-user --> ====关闭后台任务任务线程池====
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource --> {dataSource-1} closing ...
2022-01-12 09:45:31 [SpringContextShutdownHook] INFO com.alibaba.druid.pool.DruidDataSource --> {dataSource-1} closed
+3
View File
@@ -0,0 +1,3 @@
{
"lockfileVersion": 1
}
+291
View File
@@ -0,0 +1,291 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yunze</groupId>
<artifactId>yunze</artifactId>
<version>0.5.0</version>
<name>yunze</name>
<url>http://www.5iot.cn</url>
<description>IOT综合业务支撑平台</description>
<properties>
<yunze.version>0.5.0</yunze.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<druid.version>1.2.8</druid.version>
<bitwalker.version>1.21</bitwalker.version>
<swagger.version>2.9.2</swagger.version>
<kaptcha.version>2.3.2</kaptcha.version>
<mybatis-spring-boot.version>2.2.0</mybatis-spring-boot.version>
<pagehelper.boot.version>1.3.0</pagehelper.boot.version>
<fastjson.version>1.2.76</fastjson.version>
<oshi.version>5.6.0</oshi.version>
<jna.version>5.7.0</jna.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<commons.collections.version>3.2.2</commons.collections.version>
<poi.version>4.1.2</poi.version>
<velocity.version>1.7</velocity.version>
<jwt.version>0.9.1</jwt.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.2.13.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis-spring-boot.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>${jna.version}</version>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!--velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- collections工具类 -->
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>${commons.collections.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<!--验证码 -->
<dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-quartz</artifactId>
<version>${yunze.version}</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-generator</artifactId>
<version>${yunze.version}</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-framework</artifactId>
<version>${yunze.version}</version>
</dependency>
<!-- 系统模块-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-system</artifactId>
<version>${yunze.version}</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-common</artifactId>
<version>${yunze.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>yunze-admin</module>
<module>yunze-framework</module>
<module>yunze-system</module>
<module>yunze-quartz</module>
<module>yunze-generator</module>
<module>yunze-common</module>
<module>yunze-consumption-admin</module>
<module>yunze-consumption-car-activatedate</module>
<module>yunze-consumption-car-flow</module>
<module>yunze-consumption-car-status</module>
<module>yunze-consumption-car-stop</module>
<module>yunze-consumption-order</module>
<module>yunze-consumption-update</module>
<module>yunze-consumption-car-disconnected</module>
</modules>
<packaging>pom</packaging>
<dependencies>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
File diff suppressed because it is too large Load Diff
+111
View File
@@ -0,0 +1,111 @@
<?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>
<artifactId>yunze</artifactId>
<groupId>com.yunze</groupId>
<version>0.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>yunze-admin</artifactId>
<description>
web服务入口
</description>
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.21</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.5.21</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-framework</artifactId>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-generator</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.1.RELEASE</version>
<configuration>
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>${project.artifactId}</warName>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>
@@ -0,0 +1,43 @@
package com.yunze;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* 启动程序
*
* @author yunze
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
public class YunZeApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(YunZeApplication.class, args);
System.out.println(" IOT综合业务支撑平台 启动成功 \n" +
" ..,]. \n" +
" .,@\\`.]@@@@. \n" +
" ./@@@@@@@@@@@^ \n" +
" .. ...,@@@@@@@@@@@@@/. \n" +
" .=\\`..,]/@@@@@@@@@@/[.. .. \n" +
" ...[O@@@@@@@@@/`........ \n" +
" ../@@@@@/`..,]@@@@@@@@O`.. \n" +
" ../@@@@/.../@@@@@@@@@@@@@@@^ \n" +
" .=@@@@/..,@@@@@@@@[...,@@@@@@`. \n" +
" .=@@@@.../@@@@@@`. ..@@@@@^. \n" +
" .=@@@@..,@@@@@@`.. .=@@@@O.. \n" +
" .O@@@`..@@@@@@. ../@@@@/. ..\n" +
" ,@@@/ ./@@@@@. ...]@@@@@/`. .,/.\n" +
" ,@@@^..@@@@@^. ...[[[.... ../@`. \n" +
" .@@@^ =@@@@@\\. ../@@/.. \n" +
" ..\\@@ .@@@@@@^. ..]@@@@/.. \n" +
" ..\\..=@@@@@@@]... .....]/@@@@@@/.. \n" +
" .,@@@@@@@@@@@@@@@@@@@@@@@@/`. \n" +
" \\@@@@@@@@@@@@@@@@@@@[... \n" +
" ..[\\@@@@@@@@@/[`.. \n" +
" . .. ");
}
}
@@ -0,0 +1,18 @@
package com.yunze;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* web容器中进行部署
*
* @author yunze
*/
public class YunZeServletInitializer extends SpringBootServletInitializer
{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(YunZeApplication.class);
}
}
@@ -0,0 +1,86 @@
package com.yunze.web.controller.common;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.FastByteArrayOutputStream;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.google.code.kaptcha.Producer;
import com.yunze.common.constant.Constants;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.redis.RedisCache;
import com.yunze.common.utils.sign.Base64;
import com.yunze.common.utils.uuid.IdUtils;
/**
* 验证码操作处理
*
* @author yunze
*/
@RestController
public class CaptchaController
{
@Resource(name = "captchaProducer")
private Producer captchaProducer;
@Resource(name = "captchaProducerMath")
private Producer captchaProducerMath;
@Resource
private RedisCache redisCache;
// 验证码类型
@Value("${yunze.captchaType}")
private String captchaType;
/**
* 生成验证码
*/
@GetMapping("/captchaImage")
public AjaxResult getCode(HttpServletResponse response) throws IOException
{
// 保存验证码信息
String uuid = IdUtils.simpleUUID();
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
String capStr = null, code = null;
BufferedImage image = null;
// 生成验证码
if ("math".equals(captchaType))
{
String capText = captchaProducerMath.createText();
capStr = capText.substring(0, capText.lastIndexOf("@"));
code = capText.substring(capText.lastIndexOf("@") + 1);
image = captchaProducerMath.createImage(capStr);
}
else if ("char".equals(captchaType))
{
capStr = code = captchaProducer.createText();
image = captchaProducer.createImage(capStr);
}
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
// 转换流信息写出
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
try
{
ImageIO.write(image, "jpg", os);
}
catch (IOException e)
{
return AjaxResult.error(e.getMessage());
}
AjaxResult ajax = AjaxResult.success();
ajax.put("uuid", uuid);
ajax.put("img", Base64.encode(os.toByteArray()));
return ajax;
}
}
@@ -0,0 +1,118 @@
package com.yunze.web.controller.common;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yunze.common.config.YunZeConfig;
import com.yunze.common.constant.Constants;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.file.FileUploadUtils;
import com.yunze.common.utils.file.FileUtils;
import com.yunze.framework.config.ServerConfig;
/**
* 通用请求处理
*
* @author yunze
*/
@RestController
public class CommonController
{
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
@Autowired
private ServerConfig serverConfig;
/**
* 通用下载请求
*
* @param fileName 文件名称
* @param delete 是否删除
*/
@GetMapping("common/download")
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
{
try
{
if (!FileUtils.checkAllowDownload(fileName))
{
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String filePath = YunZeConfig.getDownloadPath() + fileName;
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName);
FileUtils.writeBytes(filePath, response.getOutputStream());
if (delete)
{
FileUtils.deleteFile(filePath);
}
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
/**
* 通用上传请求
*/
@PostMapping("/common/upload")
public AjaxResult uploadFile(MultipartFile file) throws Exception
{
try
{
// 上传文件路径
String filePath = YunZeConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName;
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
return ajax;
}
catch (Exception e)
{
return AjaxResult.error(e.getMessage());
}
}
/**
* 本地资源通用下载
*/
@GetMapping("/common/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
throws Exception
{
try
{
if (!FileUtils.checkAllowDownload(resource))
{
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
}
// 本地资源路径
String localPath = YunZeConfig.getProfile();
// 数据库资源地址
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
// 下载名称
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
}
catch (Exception e)
{
log.error("下载文件失败", e);
}
}
}
@@ -0,0 +1,53 @@
package com.yunze.web.controller.monitor;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.utils.StringUtils;
/**
* 缓存监控
*
* @author yunze
*/
@RestController
@RequestMapping("/monitor/cache")
public class CacheController
{
@Autowired
private RedisTemplate<String, String> redisTemplate;
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
@GetMapping()
public AjaxResult getInfo() throws Exception
{
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
Map<String, Object> result = new HashMap<>(3);
result.put("info", info);
result.put("dbSize", dbSize);
List<Map<String, String>> pieList = new ArrayList<>();
commandStats.stringPropertyNames().forEach(key -> {
Map<String, String> data = new HashMap<>(2);
String property = commandStats.getProperty(key);
data.put("name", StringUtils.removeStart(key, "cmdstat_"));
data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
pieList.add(data);
});
result.put("commandStats", pieList);
return AjaxResult.success(result);
}
}
@@ -0,0 +1,27 @@
package com.yunze.web.controller.monitor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.framework.web.domain.Server;
/**
* 服务器监控
*
* @author yunze
*/
@RestController
@RequestMapping("/monitor/server")
public class ServerController
{
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
@GetMapping()
public AjaxResult getInfo() throws Exception
{
Server server = new Server();
server.copyTo();
return AjaxResult.success(server);
}
}
@@ -0,0 +1,67 @@
package com.yunze.web.controller.monitor;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.domain.SysLogininfor;
import com.yunze.system.service.ISysLogininforService;
/**
* 系统访问记录
*
* @author yunze
*/
@RestController
@RequestMapping("/monitor/logininfor")
public class SysLogininforController extends BaseController
{
@Autowired
private ISysLogininforService logininforService;
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
@GetMapping("/list")
public TableDataInfo list(SysLogininfor logininfor)
{
startPage();
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
return getDataTable(list);
}
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
@GetMapping("/export")
public AjaxResult export(SysLogininfor logininfor)
{
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
return util.exportExcel(list, "登录日志");
}
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.DELETE)
@DeleteMapping("/{infoIds}")
public AjaxResult remove(@PathVariable Long[] infoIds)
{
return toAjax(logininforService.deleteLogininforByIds(infoIds));
}
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
@DeleteMapping("/clean")
public AjaxResult clean()
{
logininforService.cleanLogininfor();
return AjaxResult.success();
}
}
@@ -0,0 +1,67 @@
package com.yunze.web.controller.monitor;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.domain.SysOperLog;
import com.yunze.system.service.ISysOperLogService;
/**
* 操作日志记录
*
* @author yunze
*/
@RestController
@RequestMapping("/monitor/operlog")
public class SysOperlogController extends BaseController
{
@Autowired
private ISysOperLogService operLogService;
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
@GetMapping("/list")
public TableDataInfo list(SysOperLog operLog)
{
startPage();
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
return getDataTable(list);
}
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
@GetMapping("/export")
public AjaxResult export(SysOperLog operLog)
{
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
return util.exportExcel(list, "操作日志");
}
@Log(title = "操作日志", businessType = BusinessType.DELETE)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/{operIds}")
public AjaxResult remove(@PathVariable Long[] operIds)
{
return toAjax(operLogService.deleteOperLogByIds(operIds));
}
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
@DeleteMapping("/clean")
public AjaxResult clean()
{
operLogService.cleanOperLog();
return AjaxResult.success();
}
}
@@ -0,0 +1,94 @@
package com.yunze.web.controller.monitor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.Constants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.core.redis.RedisCache;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.StringUtils;
import com.yunze.system.domain.SysUserOnline;
import com.yunze.system.service.ISysUserOnlineService;
import javax.annotation.Resource;
/**
* 在线用户监控
*
* @author yunze
*/
@RestController
@RequestMapping("/monitor/online")
public class SysUserOnlineController extends BaseController
{
@Autowired
private ISysUserOnlineService userOnlineService;
@Resource
private RedisCache redisCache;
@PreAuthorize("@ss.hasPermi('monitor:online:list')")
@GetMapping("/list")
public TableDataInfo list(String ipaddr, String userName)
{
Collection<String> keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*");
List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
for (String key : keys)
{
LoginUser user = redisCache.getCacheObject(key);
if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
{
if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername()))
{
userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
}
}
else if (StringUtils.isNotEmpty(ipaddr))
{
if (StringUtils.equals(ipaddr, user.getIpaddr()))
{
userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
}
}
else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser()))
{
if (StringUtils.equals(userName, user.getUsername()))
{
userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
}
}
else
{
userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
}
}
Collections.reverse(userOnlineList);
userOnlineList.removeAll(Collections.singleton(null));
return getDataTable(userOnlineList);
}
/**
* 强退用户
*/
@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
@Log(title = "在线用户", businessType = BusinessType.FORCE)
@DeleteMapping("/{tokenId}")
public AjaxResult forceLogout(@PathVariable String tokenId)
{
redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId);
return AjaxResult.success();
}
}
@@ -0,0 +1,136 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.annotation.RepeatSubmit;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.domain.SysConfig;
import com.yunze.system.service.ISysConfigService;
/**
* 参数配置 信息操作处理
*
* @author yunze
*/
@RestController
@RequestMapping("/system/config")
public class SysConfigController extends BaseController
{
@Autowired
private ISysConfigService configService;
/**
* 获取参数配置列表
*/
@PreAuthorize("@ss.hasPermi('system:config:list')")
@GetMapping("/list")
public TableDataInfo list(SysConfig config)
{
startPage();
List<SysConfig> list = configService.selectConfigList(config);
return getDataTable(list);
}
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:config:export')")
@GetMapping("/export")
public AjaxResult export(SysConfig config)
{
List<SysConfig> list = configService.selectConfigList(config);
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
return util.exportExcel(list, "参数数据");
}
/**
* 根据参数编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:config:query')")
@GetMapping(value = "/{configId}")
public AjaxResult getInfo(@PathVariable Long configId)
{
return AjaxResult.success(configService.selectConfigById(configId));
}
/**
* 根据参数键名查询参数值
*/
@GetMapping(value = "/configKey/{configKey}")
public AjaxResult getConfigKey(@PathVariable String configKey)
{
return AjaxResult.success(configService.selectConfigByKey(configKey));
}
/**
* 新增参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:add')")
@Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping
@RepeatSubmit
public AjaxResult add(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setCreateBy(SecurityUtils.getUsername());
return toAjax(configService.insertConfig(config));
}
/**
* 修改参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:edit')")
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setUpdateBy(SecurityUtils.getUsername());
return toAjax(configService.updateConfig(config));
}
/**
* 删除参数配置
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
configService.deleteConfigByIds(configIds);
return success();
}
/**
* 刷新参数缓存
*/
@PreAuthorize("@ss.hasPermi('system:config:remove')")
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
configService.resetConfigCache();
return AjaxResult.success();
}
}
@@ -0,0 +1,163 @@
package com.yunze.web.controller.system;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysDept;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.system.service.ISysDeptService;
/**
* 部门信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/dept")
public class SysDeptController extends BaseController
{
@Autowired
private ISysDeptService deptService;
/**
* 获取部门列表
*/
@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list")
public AjaxResult list(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(depts);
}
/**
* 查询部门列表(排除节点)
*/
@PreAuthorize("@ss.hasPermi('system:dept:list')")
@GetMapping("/list/exclude/{deptId}")
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
Iterator<SysDept> it = depts.iterator();
while (it.hasNext())
{
SysDept d = (SysDept) it.next();
if (d.getDeptId().intValue() == deptId
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""))
{
it.remove();
}
}
return AjaxResult.success(depts);
}
/**
* 根据部门编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:dept:query')")
@GetMapping(value = "/{deptId}")
public AjaxResult getInfo(@PathVariable Long deptId)
{
return AjaxResult.success(deptService.selectDeptById(deptId));
}
/**
* 获取部门下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
}
/**
* 加载对应角色部门列表树
*/
@GetMapping(value = "/roleDeptTreeselect/{roleId}")
public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
ajax.put("depts", deptService.buildDeptTreeSelect(depts));
return ajax;
}
/**
* 新增部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:add')")
@Log(title = "部门管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
dept.setCreateBy(SecurityUtils.getUsername());
return toAjax(deptService.insertDept(dept));
}
/**
* 修改部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:edit')")
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
else if (dept.getParentId().equals(dept.getDeptId()))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
}
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus())
&& deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0)
{
return AjaxResult.error("该部门包含未停用的子部门!");
}
dept.setUpdateBy(SecurityUtils.getUsername());
return toAjax(deptService.updateDept(dept));
}
/**
* 删除部门
*/
@PreAuthorize("@ss.hasPermi('system:dept:remove')")
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptId}")
public AjaxResult remove(@PathVariable Long deptId)
{
if (deptService.hasChildByDeptId(deptId))
{
return AjaxResult.error("存在下级部门,不允许删除");
}
if (deptService.checkDeptExistUser(deptId))
{
return AjaxResult.error("部门存在用户,不允许删除");
}
return toAjax(deptService.deleteDeptById(deptId));
}
}
@@ -0,0 +1,121 @@
package com.yunze.web.controller.system;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysDictData;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.service.ISysDictDataService;
import com.yunze.system.service.ISysDictTypeService;
/**
* 数据字典信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/dict/data")
public class SysDictDataController extends BaseController
{
@Autowired
private ISysDictDataService dictDataService;
@Autowired
private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list")
public TableDataInfo list(SysDictData dictData)
{
startPage();
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return getDataTable(list);
}
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
return util.exportExcel(list, "字典数据");
}
/**
* 查询字典数据详细
*/
@PreAuthorize("@ss.hasPermi('system:dict:query')")
@GetMapping(value = "/{dictCode}")
public AjaxResult getInfo(@PathVariable Long dictCode)
{
return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
}
/**
* 根据字典类型查询字典数据信息
*/
@GetMapping(value = "/type/{dictType}")
public AjaxResult dictType(@PathVariable String dictType)
{
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
if (StringUtils.isNull(data))
{
data = new ArrayList<SysDictData>();
}
return AjaxResult.success(data);
}
/**
* 新增字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictData dict)
{
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.insertDictData(dict));
}
/**
* 修改保存字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictDataService.updateDictData(dict));
}
/**
* 删除字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictCodes}")
public AjaxResult remove(@PathVariable Long[] dictCodes)
{
dictDataService.deleteDictDataByIds(dictCodes);
return success();
}
}
@@ -0,0 +1,132 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysDictType;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.service.ISysDictTypeService;
/**
* 数据字典信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/dict/type")
public class SysDictTypeController extends BaseController
{
@Autowired
private ISysDictTypeService dictTypeService;
@PreAuthorize("@ss.hasPermi('system:dict:list')")
@GetMapping("/list")
public TableDataInfo list(SysDictType dictType)
{
startPage();
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
return getDataTable(list);
}
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:dict:export')")
@GetMapping("/export")
public AjaxResult export(SysDictType dictType)
{
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
return util.exportExcel(list, "字典类型");
}
/**
* 查询字典类型详细
*/
@PreAuthorize("@ss.hasPermi('system:dict:query')")
@GetMapping(value = "/{dictId}")
public AjaxResult getInfo(@PathVariable Long dictId)
{
return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
}
/**
* 新增字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:add')")
@Log(title = "字典类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.insertDictType(dict));
}
/**
* 修改字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.updateDictType(dict));
}
/**
* 删除字典类型
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictIds}")
public AjaxResult remove(@PathVariable Long[] dictIds)
{
dictTypeService.deleteDictTypeByIds(dictIds);
return success();
}
/**
* 刷新字典缓存
*/
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
dictTypeService.resetDictCache();
return AjaxResult.success();
}
/**
* 获取字典选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
return AjaxResult.success(dictTypes);
}
}
@@ -0,0 +1,94 @@
package com.yunze.web.controller.system;
import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.constant.Constants;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysMenu;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginBody;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.utils.ServletUtils;
import com.yunze.framework.web.service.SysLoginService;
import com.yunze.framework.web.service.SysPermissionService;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysMenuService;
/**
* 登录验证
*
* @author yunze
*/
@RestController
public class SysLoginController
{
@Autowired
private SysLoginService loginService;
@Autowired
private ISysMenuService menuService;
@Autowired
private SysPermissionService permissionService;
@Autowired
private TokenService tokenService;
/**
* 登录方法
*
* @param loginBody 登录信息
* @return 结果
*/
@PostMapping("/login")
public AjaxResult login(@RequestBody LoginBody loginBody)
{
AjaxResult ajax = AjaxResult.success();
// 生成令牌
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
loginBody.getUuid());
ajax.put(Constants.TOKEN, token);
return ajax;
}
/**
* 获取用户信息
*
* @return 用户信息
*/
@GetMapping("getInfo")
public AjaxResult getInfo()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(user);
AjaxResult ajax = AjaxResult.success();
ajax.put("user", user);
ajax.put("roles", roles);
ajax.put("permissions", permissions);
return ajax;
}
/**
* 获取路由信息
*
* @return 路由信息
*/
@GetMapping("getRouters")
public AjaxResult getRouters()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// 用户信息
SysUser user = loginUser.getUser();
List<SysMenu> menus = menuService.selectMenuTreeByUserId(user.getUserId());
return AjaxResult.success(menuService.buildMenus(menus));
}
}
@@ -0,0 +1,157 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.Constants;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysMenu;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysMenuService;
/**
* 菜单信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/menu")
public class SysMenuController extends BaseController
{
@Autowired
private ISysMenuService menuService;
@Autowired
private TokenService tokenService;
/**
* 获取菜单列表
*/
@PreAuthorize("@ss.hasPermi('system:menu:list')")
@GetMapping("/list")
public AjaxResult list(SysMenu menu)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menus);
}
/**
* 根据菜单编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:menu:query')")
@GetMapping(value = "/{menuId}")
public AjaxResult getInfo(@PathVariable Long menuId)
{
return AjaxResult.success(menuService.selectMenuById(menuId));
}
/**
* 获取菜单下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysMenu menu)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
Long userId = loginUser.getUser().getUserId();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
}
/**
* 加载对应角色菜单列表树
*/
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
List<SysMenu> menus = menuService.selectMenuList(loginUser.getUser().getUserId());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
return ajax;
}
/**
* 新增菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:add')")
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
menu.setCreateBy(SecurityUtils.getUsername());
return toAjax(menuService.insertMenu(menu));
}
/**
* 修改菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:edit')")
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame())
&& !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
else if (menu.getMenuId().equals(menu.getParentId()))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
}
menu.setUpdateBy(SecurityUtils.getUsername());
return toAjax(menuService.updateMenu(menu));
}
/**
* 删除菜单
*/
@PreAuthorize("@ss.hasPermi('system:menu:remove')")
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{menuId}")
public AjaxResult remove(@PathVariable("menuId") Long menuId)
{
if (menuService.hasChildByMenuId(menuId))
{
return AjaxResult.error("存在子菜单,不允许删除");
}
if (menuService.checkMenuExistRole(menuId))
{
return AjaxResult.error("菜单已分配,不允许删除");
}
return toAjax(menuService.deleteMenuById(menuId));
}
}
@@ -0,0 +1,92 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.system.domain.SysNotice;
import com.yunze.system.service.ISysNoticeService;
/**
* 公告 信息操作处理
*
* @author yunze
*/
@RestController
@RequestMapping("/system/notice")
public class SysNoticeController extends BaseController
{
@Autowired
private ISysNoticeService noticeService;
/**
* 获取通知公告列表
*/
@PreAuthorize("@ss.hasPermi('system:notice:list')")
@GetMapping("/list")
public TableDataInfo list(SysNotice notice)
{
startPage();
List<SysNotice> list = noticeService.selectNoticeList(notice);
return getDataTable(list);
}
/**
* 根据通知公告编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:notice:query')")
@GetMapping(value = "/{noticeId}")
public AjaxResult getInfo(@PathVariable Long noticeId)
{
return AjaxResult.success(noticeService.selectNoticeById(noticeId));
}
/**
* 新增通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:add')")
@Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysNotice notice)
{
notice.setCreateBy(SecurityUtils.getUsername());
return toAjax(noticeService.insertNotice(notice));
}
/**
* 修改通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
{
notice.setUpdateBy(SecurityUtils.getUsername());
return toAjax(noticeService.updateNotice(notice));
}
/**
* 删除通知公告
*/
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
@Log(title = "通知公告", businessType = BusinessType.DELETE)
@DeleteMapping("/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds)
{
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
}
}
@@ -0,0 +1,130 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.system.domain.SysPost;
import com.yunze.system.service.ISysPostService;
/**
* 岗位信息操作处理
*
* @author yunze
*/
@RestController
@RequestMapping("/system/post")
public class SysPostController extends BaseController
{
@Autowired
private ISysPostService postService;
/**
* 获取岗位列表
*/
@PreAuthorize("@ss.hasPermi('system:post:list')")
@GetMapping("/list")
public TableDataInfo list(SysPost post)
{
startPage();
List<SysPost> list = postService.selectPostList(post);
return getDataTable(list);
}
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:post:export')")
@GetMapping("/export")
public AjaxResult export(SysPost post)
{
List<SysPost> list = postService.selectPostList(post);
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
return util.exportExcel(list, "岗位数据");
}
/**
* 根据岗位编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:post:query')")
@GetMapping(value = "/{postId}")
public AjaxResult getInfo(@PathVariable Long postId)
{
return AjaxResult.success(postService.selectPostById(postId));
}
/**
* 新增岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:add')")
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setCreateBy(SecurityUtils.getUsername());
return toAjax(postService.insertPost(post));
}
/**
* 修改岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:edit')")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setUpdateBy(SecurityUtils.getUsername());
return toAjax(postService.updatePost(post));
}
/**
* 删除岗位
*/
@PreAuthorize("@ss.hasPermi('system:post:remove')")
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{postIds}")
public AjaxResult remove(@PathVariable Long[] postIds)
{
return toAjax(postService.deletePostByIds(postIds));
}
/**
* 获取岗位选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysPost> posts = postService.selectPostAll();
return AjaxResult.success(posts);
}
}
@@ -0,0 +1,139 @@
package com.yunze.web.controller.system;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yunze.common.annotation.Log;
import com.yunze.common.config.YunZeConfig;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.file.FileUploadUtils;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysUserService;
/**
* 个人信息 业务处理
*
* @author yunze
*/
@RestController
@RequestMapping("/system/user/profile")
public class SysProfileController extends BaseController
{
@Autowired
private ISysUserService userService;
@Autowired
private TokenService tokenService;
/**
* 个人信息
*/
@GetMapping
public AjaxResult profile()
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
AjaxResult ajax = AjaxResult.success(user);
ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
return ajax;
}
/**
* 修改用户
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult updateProfile(@RequestBody SysUser user)
{
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
if (userService.updateUserProfile(user) > 0)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
// 更新缓存用户信息
loginUser.getUser().setNickName(user.getNickName());
loginUser.getUser().setPhonenumber(user.getPhonenumber());
loginUser.getUser().setEmail(user.getEmail());
loginUser.getUser().setSex(user.getSex());
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改个人信息异常,请联系管理员");
}
/**
* 重置密码
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword)
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String userName = loginUser.getUsername();
String password = loginUser.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password))
{
return AjaxResult.error("修改密码失败,旧密码错误");
}
if (SecurityUtils.matchesPassword(newPassword, password))
{
return AjaxResult.error("新密码不能与旧密码相同");
}
if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
{
// 更新缓存用户密码
loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改密码异常,请联系管理员");
}
/**
* 头像上传
*/
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
@PostMapping("/avatar")
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException
{
if (!file.isEmpty())
{
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String avatar = FileUploadUtils.upload(YunZeConfig.getAvatarPath(), file);
if (userService.updateUserAvatar(loginUser.getUsername(), avatar))
{
AjaxResult ajax = AjaxResult.success();
ajax.put("imgUrl", avatar);
// 更新缓存用户头像
loginUser.getUser().setAvatar(avatar);
tokenService.setLoginUser(loginUser);
return ajax;
}
}
return AjaxResult.error("上传图片异常,请联系管理员");
}
}
@@ -0,0 +1,182 @@
package com.yunze.web.controller.system;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysRole;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.framework.web.service.SysPermissionService;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysRoleService;
import com.yunze.system.service.ISysUserService;
/**
* 角色信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/role")
public class SysRoleController extends BaseController
{
@Autowired
private ISysRoleService roleService;
@Autowired
private TokenService tokenService;
@Autowired
private SysPermissionService permissionService;
@Autowired
private ISysUserService userService;
@PreAuthorize("@ss.hasPermi('system:role:list')")
@GetMapping("/list")
public TableDataInfo list(SysRole role)
{
startPage();
List<SysRole> list = roleService.selectRoleList(role);
return getDataTable(list);
}
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:role:export')")
@GetMapping("/export")
public AjaxResult export(SysRole role)
{
List<SysRole> list = roleService.selectRoleList(role);
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
return util.exportExcel(list, "角色数据");
}
/**
* 根据角色编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:role:query')")
@GetMapping(value = "/{roleId}")
public AjaxResult getInfo(@PathVariable Long roleId)
{
return AjaxResult.success(roleService.selectRoleById(roleId));
}
/**
* 新增角色
*/
@PreAuthorize("@ss.hasPermi('system:role:add')")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
{
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setCreateBy(SecurityUtils.getUsername());
return toAjax(roleService.insertRole(role));
}
/**
* 修改保存角色
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setUpdateBy(SecurityUtils.getUsername());
if (roleService.updateRole(role) > 0)
{
// 更新缓存用户权限
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
{
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
tokenService.setLoginUser(loginUser);
}
return AjaxResult.success();
}
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
}
/**
* 修改保存数据权限
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
return toAjax(roleService.authDataScope(role));
}
/**
* 状态修改
*/
@PreAuthorize("@ss.hasPermi('system:role:edit')")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
role.setUpdateBy(SecurityUtils.getUsername());
return toAjax(roleService.updateRoleStatus(role));
}
/**
* 删除角色
*/
@PreAuthorize("@ss.hasPermi('system:role:remove')")
@Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
{
return toAjax(roleService.deleteRoleByIds(roleIds));
}
/**
* 获取角色选择框列表
*/
@PreAuthorize("@ss.hasPermi('system:role:query')")
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
return AjaxResult.success(roleService.selectRoleAll());
}
}
@@ -0,0 +1,205 @@
package com.yunze.web.controller.system;
import java.util.List;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysRole;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysPostService;
import com.yunze.system.service.ISysRoleService;
import com.yunze.system.service.ISysUserService;
/**
* 用户信息
*
* @author yunze
*/
@RestController
@RequestMapping("/system/user")
public class SysUserController extends BaseController
{
@Autowired
private ISysUserService userService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@Autowired
private TokenService tokenService;
/**
* 获取用户列表
*/
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping("/list")
public TableDataInfo list(SysUser user)
{
startPage();
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('system:user:export')")
@GetMapping("/export")
public AjaxResult export(SysUser user)
{
List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "用户数据");
}
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('system:user:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream());
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String operName = loginUser.getUsername();
String message = userService.importUser(userList, updateSupport, operName);
return AjaxResult.success(message);
}
@GetMapping("/importTemplate")
public AjaxResult importTemplate()
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.importTemplateExcel("用户数据");
}
/**
* 根据用户编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('system:user:query')")
@GetMapping(value = { "/", "/{userId}" })
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
{
AjaxResult ajax = AjaxResult.success();
List<SysRole> roles = roleService.selectRoleAll();
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
ajax.put("posts", postService.selectPostAll());
if (StringUtils.isNotNull(userId))
{
ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId));
ajax.put("postIds", postService.selectPostListByUserId(userId));
ajax.put("roleIds", roleService.selectRoleListByUserId(userId));
}
return ajax;
}
/**
* 新增用户
*/
@PreAuthorize("@ss.hasPermi('system:user:add')")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysUser user)
{
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
}
else if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setCreateBy(SecurityUtils.getUsername());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return toAjax(userService.insertUser(user));
}
/**
* 修改用户
*/
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysUser user)
{
userService.checkUserAllowed(user);
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUser(user));
}
/**
* 删除用户
*/
@PreAuthorize("@ss.hasPermi('system:user:remove')")
@Log(title = "用户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable Long[] userIds)
{
return toAjax(userService.deleteUserByIds(userIds));
}
/**
* 重置密码
*/
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/resetPwd")
public AjaxResult resetPwd(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.resetPwd(user));
}
/**
* 状态修改
*/
@PreAuthorize("@ss.hasPermi('system:user:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUserStatus(user));
}
}
@@ -0,0 +1,24 @@
package com.yunze.web.controller.tool;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.yunze.common.core.controller.BaseController;
/**
* swagger 接口
*
* @author yunze
*/
@Controller
@RequestMapping("/tool/swagger")
public class SwaggerController extends BaseController
{
@PreAuthorize("@ss.hasPermi('tool:swagger:view')")
@GetMapping()
public String index()
{
return redirect("/swagger-ui.html");
}
}
@@ -0,0 +1,181 @@
package com.yunze.web.controller.tool;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
/**
* swagger 用户测试方法
*
* @author yunze
*/
@Api("用户信息管理")
@RestController
@RequestMapping("/test/user")
public class TestController extends BaseController
{
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
{
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
}
@ApiOperation("获取用户列表")
@GetMapping("/list")
public AjaxResult userList()
{
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
return AjaxResult.success(userList);
}
@ApiOperation("获取用户详细")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
@GetMapping("/{userId}")
public AjaxResult getUser(@PathVariable Integer userId)
{
if (!users.isEmpty() && users.containsKey(userId))
{
return AjaxResult.success(users.get(userId));
}
else
{
return error("用户不存在");
}
}
@ApiOperation("新增用户")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer"),
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String"),
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String"),
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String")
})
@PostMapping("/save")
public AjaxResult save(UserEntity user)
{
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
return error("用户ID不能为空");
}
return AjaxResult.success(users.put(user.getUserId(), user));
}
@ApiOperation("更新用户")
@PutMapping("/update")
public AjaxResult update(@RequestBody UserEntity user)
{
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
{
return error("用户ID不能为空");
}
if (users.isEmpty() || !users.containsKey(user.getUserId()))
{
return error("用户不存在");
}
users.remove(user.getUserId());
return AjaxResult.success(users.put(user.getUserId(), user));
}
@ApiOperation("删除用户信息")
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
@DeleteMapping("/{userId}")
public AjaxResult delete(@PathVariable Integer userId)
{
if (!users.isEmpty() && users.containsKey(userId))
{
users.remove(userId);
return success();
}
else
{
return error("用户不存在");
}
}
}
@ApiModel(value = "UserEntity", description = "用户实体")
class UserEntity
{
@ApiModelProperty("用户ID")
private Integer userId;
@ApiModelProperty("用户名称")
private String username;
@ApiModelProperty("用户密码")
private String password;
@ApiModelProperty("用户手机")
private String mobile;
public UserEntity()
{
}
public UserEntity(Integer userId, String username, String password, String mobile)
{
this.userId = userId;
this.username = username;
this.password = password;
this.mobile = mobile;
}
public Integer getUserId()
{
return userId;
}
public void setUserId(Integer userId)
{
this.userId = userId;
}
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getMobile()
{
return mobile;
}
public void setMobile(String mobile)
{
this.mobile = mobile;
}
}
@@ -0,0 +1,61 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.service.yunze.IYPollingService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
/**
* 通道进度
* 2021-8-26
*/
@Api("通道进度")
@RestController
@RequestMapping("/yunze/polling")
public class PollingController extends BaseController {
@Autowired
private IYPollingService iyPollingService;
/**
* 执行通道查询
*/
@PreAuthorize("@ss.hasPermi('yunze:polling:list')")
@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(iyPollingService.getList(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> system:polling:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("通道进度 异常!");
}
}
@@ -0,0 +1,154 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzAgentPackageService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 代理资费组 管理
* 2021-06-22
* @author root
*/
@Api("代理资费组管理")
@RestController
@RequestMapping("/yunze/agentTariffGroup")
public class YzAgentPackageController extends BaseController
{
@Autowired
private IYzAgentPackageService agentPackageService;
/**
* 代理资费组 列表
*/
@PreAuthorize("@ss.hasPermi('yunze:agentTariffGroup:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Object agent_idObj = Parammap.get("agent_id");
if(agent_idObj==null){
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<String> agent_id = new ArrayList<>();
agent_id.add(currentUser.getDeptId().toString());
Parammap.put("agent_id",agent_id);
}
return MyRetunSuccess(agentPackageService.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffGroup:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取代理资费组列表 异常!");
}
/* *//**
* 代理资费组 新增
*//*
@Log(title = "代理资费组", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:agentTariffGroup:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=UTF-8" })
public String add(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(agentPackageService.add(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffGroup:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费组 新增 异常!");
}
*//**
* 代理资费组 详情
*//*
@PreAuthorize("@ss.hasPermi('yunze:agentTariffGroup:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=UTF-8" })
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(agentPackageService.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffGroup:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费组 详情 异常!");
}
*//**
* 代理资费组 修改
*//*
@Log(title = "代理资费组", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:agentTariffGroup:edit')")
@PostMapping(value = "/edit", produces = { "application/json;charset=UTF-8" })
public String edit(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
boolean bool = agentPackageService.update(Parammap);
String msg = bool?"修改 代理资费组成功!":"网络异常请稍后重试!!!";
return MyRetunSuccess(bool,msg);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffGroup:edit <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费组 修改 异常!");
}
*/
}
@@ -0,0 +1,144 @@
package com.yunze.web.controller.yunze;
import com.yunze.common.core.controller.BaseController;
import com.yunze.system.service.yunze.IYzAgentPacketService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* 代理代理资费计划 管理
* 2021-06-24
* @author root
*/
@Api("代理资费计划管理")
@RestController
@RequestMapping("/yunze/agentTariffPlan")
public class YzAgentPacketController extends BaseController
{
@Autowired
private IYzAgentPacketService agentPacketService;
/* *//**
* 代理资费计划 新增
*//*
@Log(title = "代理资费计划", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:agentTariffPlan:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=UTF-8" })
public String add(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double error_so = Double.parseDouble(Parammap.get("error_so").toString());
Double packet_flow = Double.parseDouble(Parammap.get("packet_flow").toString());
Double error_flow = Double.parseDouble(Parammap.get("error_flow").toString());
if(error_so>=1){
if(packet_flow>=error_flow) {
//校验计算 用量
Parammap.put("error_flow",Arith.div(packet_flow,error_so,0));
return MyRetunSuccess(agentPacketService.add(Parammap),null);
}else{
return Myerr("资费计划 流量 不能小于 资费计划 用量 !");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffPlan:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费计划 新增 异常!");
}
*//**
* 代理资费计划 详情
*//*
@PreAuthorize("@ss.hasPermi('yunze:agentTariffPlan:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=UTF-8" })
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
//校验计算 用量
return MyRetunSuccess(agentPacketService.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffPlan:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费计划 详情 异常!");
}
*//**
* 代理资费计划 编辑
*//*
@Log(title = "代理资费计划", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:agentTariffPlan:edit')")
@PostMapping(value = "/edit", produces = { "application/json;charset=UTF-8" })
public String edit(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double error_so = Double.parseDouble(Parammap.get("error_so").toString());
Double packet_flow = Double.parseDouble(Parammap.get("packet_flow").toString());
Double error_flow = Double.parseDouble(Parammap.get("error_flow").toString());
Double packet_price = Double.parseDouble(Parammap.get("packet_price").toString());
Double packet_cost = Double.parseDouble(Parammap.get("packet_cost").toString());
if(error_so>=1){
if(packet_flow>=error_flow) {
//校验计算 用量
if(packet_price>=packet_cost){
//售价大等于 成本
Parammap.put("error_flow",Arith.div(packet_flow,error_so,0));
return MyRetunSuccess(agentPacketService.update(Parammap),null);
}else{
return Myerr("售价 不能小于 成本 ");
}
}else{
return Myerr("资费计划 流量 不能小于 资费计划 用量 !");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:agentTariffPlan:edit <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("代理资费计划 编辑 异常!");
}
*/
}
@@ -0,0 +1,980 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.apiCommon.utils.InternalApiRequest;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.entity.YzCard;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.*;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysUserService;
import com.yunze.system.service.impl.yunze.YzCardServiceImpl;
import com.yunze.system.service.yunze.IYzCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 卡信息
* 2021-06-05
* @author root
*/
@Api("卡信息")
@RestController
@RequestMapping("/yunze/card")
public class YzCardController extends BaseController
{
@Resource
private YzCardServiceImpl yzCardServiceImpl;
@Resource
private ApiParamMap apiParamMap;
@Autowired
private ISysUserService userService;
@Resource
private TokenService tokenService;
@Resource
private CardFlowSyn cardFlowSyn;
@Resource
private GetShowStatIdArr getShowStatIdArr;
@Resource
private InternalApiRequest internalApiRequest;
/**
* 卡板信息列表
*/
@PreAuthorize("@ss.hasPermi('yunze:card:list')")
/* @PostMapping("/list", produces = { "application/json;charset=UTF-8" })*/
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
if(currentUser.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
}else{
agent_id.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id",agent_id);
}
}
return MyRetunSuccess(yzCardServiceImpl.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取卡板信息列表 异常!");
}
/**
* 获取 所属代理下 卡分组
*/
@PreAuthorize("@ss.hasPermi('yunze:card:list')")
@PostMapping(value = "/getCardGrouping", produces = { "application/json;charset=UTF-8" })
public String getCardGrouping(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
String StrAgent_id = currentUser.getDeptId().toString()+",";
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
for (int i = 0; i < P_agent_id.size(); i++) {
StrAgent_id += ""+P_agent_id.get(i)+",";
}
}
if(currentUser.getDeptId()==100){
if(Parammap.get("agent_id")!=null){
Parammap.put("agent_id",StrAgent_id);
}
}else{
Parammap.put("agent_id",StrAgent_id);
}
return MyRetunSuccess(yzCardServiceImpl.getCardGrouping(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> /yunze/card/getCardGrouping <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取 所属代理下 卡分组 异常!");
}
/**
* 查询卡板详情
*/
@PreAuthorize("@ss.hasPermi('yunze:card:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=utf-8" })//
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(yzCardServiceImpl.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询卡板详情 异常!");
}
/**
* 导入
* @param file
* @param updateSupport
* @return
*/
@Log(title = "卡列表", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:import')")
@PostMapping(value = "/importData", produces = { "application/json;charset=utf-8" })
public AjaxResult importData(MultipartFile file, boolean updateSupport)
{
try {
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
return AjaxResult.success(yzCardServiceImpl.uploadCard(file,updateSupport,User));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:import <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("导入卡列表 异常!");
}
/**
* 下载导入模板
* @return
*/
@GetMapping("/importTemplate")
public AjaxResult importTemplate()
{
ExcelUtil<YzCard> util = new ExcelUtil<YzCard>(YzCard.class);
return util.importTemplateExcel("卡列表数据");
}
/**
* 连接管理获取部门名称
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:card:list')")
@PostMapping(value = "/getDeptName", produces = { "application/json;charset=utf-8" })
public String getDeptName()
{
try {
return MyRetunSuccess(yzCardServiceImpl.getDeptName(),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:list " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("连接管理获取部门名称 异常!");
}
/**
* 导出
* @return
*/
@Log(title = "卡列表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:exportData')")
@PostMapping(value = "/exportData", produces = { "application/json;charset=utf-8" })
public String exportData(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
return MyRetunSuccess(yzCardServiceImpl.exportData(Parammap,currentUser),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:exportData <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("导出卡列表 异常!");
}
/**
* 查询 集团下所属人员
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:card:findDeptUser')")
@PostMapping(value = "/findDeptUser", produces = { "application/json;charset=utf-8" })
public String findDeptUser(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
String dept_id = Parammap.get("dept_id").toString();
if(dept_id!=null && dept_id!=""){
return MyRetunSuccess(userService.findDeptUser(Parammap),null);
}else{
return Myerr("参数不全请核对后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:findDeptUser " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 集团下所属人员 异常!");
}
/**
* 划分卡信息
* @return
*/
@Log(title = "划卡操作", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:card:divide')")
@PostMapping(value = "/divide", produces = { "application/json;charset=utf-8" })
public String divide(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Object set_dept_id = Parammap.get("set_dept_id");
Object set_user_id = Parammap.get("set_user_id");
Object set_dept_name = Parammap.get("set_dept_name");
Object set_user_name = Parammap.get("set_user_name");
if(set_dept_id!=null && set_dept_id.toString()!="" && set_user_id!=null && set_user_id.toString()!=""
&& set_dept_name!=null && set_dept_name.toString()!=""&& set_user_name!=null && set_user_name.toString()!=""){
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
String agent_id = currentUser.getDeptId().toString();
// if(!set_dept_id.equals(agent_id)){
//权限 管理 操作必须传入当前操作人 id
List<Integer> agent_idArr = new ArrayList<>();
if(currentUser.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_idArr.addAll(P_agent_id);
}else{
agent_idArr.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id",agent_idArr);
}
}
Parammap.put("TaskAgent_id",agent_id);
return MyRetunSuccess(yzCardServiceImpl.dividCard(Parammap),null);
/*}else{
return Myerr("不能操作!");
}*/
}else{
return Myerr("参数不全请核对后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:divide " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("划分卡信息 异常!");
}
/**
* 同步用量
* @param Pstr
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:card:SynFlow')")
@PostMapping(value = "/SynFlow", produces = { "application/json;charset=utf-8" })
public String SynFlow(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
if(Route!=null ){
String cd_status = Route.get("cd_status").toString();
if(cd_status!=null && cd_status!="" && cd_status.equals("1")){
Map<String,Object> Rmap = internalApiRequest.queryFlow(Parammap,Route);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
if(code.equals("200")){
//获取 卡用量 开卡日期 更新 card info
if(Rmap.get("Use")!=null && Rmap.get("Use")!="" && Rmap.get("Use").toString().trim().length()>0){
Double Use = Double.parseDouble(Rmap.get("Use").toString());
if(Use>=0){
try {
Map<String,Object> RMap = cardFlowSyn.CalculationFlow(Parammap.get("iccid").toString(),Use);
return MyRetunSuccess(RMap,"已成功同步用量!");
}catch (Exception e){
return Myerr("用量内部计算错误!"+e.getMessage().toString());
}
}else{
return Myerr("接口超频返回暂无数据返回,请稍后重试!");
}
}
}else{
return Myerr("网络繁忙稍后重试!"+Rmap.get("Message").toString());
}
}else{
String statusVal = cd_status.equals("2")?"已停用":cd_status.equals("3")?"已删除":"状态未知";
return Myerr("同步用量 异常!"+" 通道 ["+statusVal+"]");
}
}else{
return Myerr(" iccid ["+Parammap.get("iccid")+"] 未划分 API通道 !请划分通道后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:SynFlow " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("同步用量 异常!");
}
/**
* 同步卡状态
* @param Pstr
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:card:SynStatus')")
@PostMapping(value = "/SynStatus", produces = { "application/json;charset=utf-8" })
public String SynStatus(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
if(Route!=null ){
String cd_status = Route.get("cd_status").toString();
if(cd_status!=null && cd_status!="" && cd_status.equals("1")){
Map<String,Object> Rmap = internalApiRequest.queryCardStatus(Parammap,Route);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
if(code.equals("200")){
//获取 卡状态 开卡日期 更新 card info
if(Rmap.get("statusCode")!=null && Rmap.get("statusCode")!="" && Rmap.get("statusCode").toString().trim().length()>0){
String statusCode = Rmap.get("statusCode").toString().trim();
if(!statusCode.equals("0")){
Map<String,Object> Upd_Map = new HashMap<>();
Upd_Map.put("status_id",statusCode);
Upd_Map.put("status_ShowId",getShowStatIdArr.GetShowStatId(statusCode));
Upd_Map.put("iccid",Parammap.get("iccid").toString());
try {
boolean bool = yzCardServiceImpl.updStatusId(Upd_Map);//变更卡状态
if(bool){
return MyRetunSuccess("","已成功同步卡状态!");
}else{
return Myerr("保存状态异常:False");
}
}catch (Exception e){
return Myerr("DB保存状态异常!"+e.getMessage().toString());
}
}else{
return Myerr("接口超频返回暂无数据返回,请稍后重试!");
}
}
}else{
return Myerr("网络繁忙稍后重试!"+Rmap.get("Message").toString());
}
}else{
String statusVal = cd_status.equals("2")?"已停用":cd_status.equals("3")?"已删除":"状态未知";
return Myerr("同步卡状态 异常!"+" 通道 ["+statusVal+"]");
}
}else{
return Myerr(" iccid ["+Parammap.get("iccid")+"] 未划分 API通道 !请划分通道后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:SynStatus " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("同步卡状态 异常!");
}
/**
* 同步 激活时间
* @param Pstr
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:card:SynActivateDate')")
@PostMapping(value = "/SynActivateDate", produces = { "application/json;charset=utf-8" })
public String SynActivateDate(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
if(Route!=null ){
String cd_status = Route.get("cd_status").toString();
if(cd_status!=null && cd_status!="" && cd_status.equals("1")){
Map<String,Object> Rmap = internalApiRequest.queryCardActiveTime(Parammap,Route);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
if(code.equals("200")){
//获取 激活时间
if(Rmap.get("activateDate")!=null && Rmap.get("activateDate")!="" && Rmap.get("activateDate").toString().trim().length()>0){
String activateDate = Rmap.get("activateDate").toString().trim();
activateDate = activateDate.length()>10?activateDate.substring(0,10):activateDate;
Map<String,Object> Upd_Map = new HashMap<>();
Upd_Map.put("activate_date",activateDate);
Upd_Map.put("open_date",null);
Upd_Map.put("iccid",Parammap.get("iccid").toString());
try {
boolean bool = yzCardServiceImpl.updActivate(Upd_Map);//变更卡状态
if(bool){
return MyRetunSuccess("","已成功同步激活时间!");
}else{
return Myerr("保存激活时间异常:False");
}
}catch (Exception e){
return Myerr("DB保存状态异常!"+e.getMessage().toString());
}
}else{
System.out.println(Rmap);
return Myerr("上游接口返回数据异常,稍后重试!");
}
}else{
return Myerr("网络繁忙稍后重试!"+Rmap.get("Message").toString());
}
}else{
String statusVal = cd_status.equals("2")?"已停用":cd_status.equals("3")?"已删除":"状态未知";
return Myerr("同步激活时间 异常!"+" 通道 ["+statusVal+"]");
}
}else{
return Myerr(" iccid ["+Parammap.get("iccid")+"] 未划分 API通道 !请划分通道后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> SynActivateDate " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("同步激活时间 异常!");
}
/**
* 查询在线信息
* @param Pstr
* @return
*/
@ApiOperation("查询在线信息")
@PreAuthorize("@ss.hasPermi('yunze:card:queryOnlineStatus')")
@PostMapping(value = "/queryOnlineStatus", produces = { "application/json;charset=utf-8" })
public String queryOnlineStatus(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
if(Route!=null ){
String cd_status = Route.get("cd_status").toString();
if(cd_status!=null && cd_status!="" && cd_status.equals("1")){
Map<String, Object> Rmap = internalApiRequest.queryOnlineStatus(Parammap,Route);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
if(code.equals("200")){
return MyRetunSuccess(Rmap,"查询在线信息成功!");
}else{
return Myerr("暂未查询到在线信息!");
}
}else{
String statusVal = cd_status.equals("2")?"已停用":cd_status.equals("3")?"已删除":"状态未知";
return Myerr("查询在线信息 异常!"+" 通道 ["+statusVal+"]");
}
}else{
return Myerr(" iccid ["+Parammap.get("iccid")+"] 未划分 API通道 !请划分通道后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:queryOnlineStatus " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询在线信息 异常!");
}
/**
* 机卡重绑
* @param Pstr
* @return
*/
@ApiOperation("机卡重绑")
@PreAuthorize("@ss.hasPermi('yunze:card:CardBinding')")
@PostMapping(value = "/CardBinding", produces = { "application/json;charset=utf-8" })
public String CardBinding(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Map<String, Object> Route = yzCardServiceImpl.findRoute(Parammap);
if(Route!=null ){
String cd_status = Route.get("cd_status").toString();
if(cd_status!=null && cd_status!="" && cd_status.equals("1")){
Map<String, Object> Rmap = internalApiRequest.unbundling(Parammap,Route);
String code = Rmap.get("code").toString();
if(code.equals("200")){
return MyRetunSuccess(Rmap.get("Message"),"操作完成!");
}else{
return Myerr(Rmap.get("Message").toString());
}
}else{
String statusVal = cd_status.equals("2")?"已停用":cd_status.equals("3")?"已删除":"状态未知";
return Myerr("机卡重绑 异常!"+" 通道 ["+statusVal+"]");
}
}else{
return Myerr(" iccid ["+Parammap.get("iccid")+"] 未划分 API通道 !请划分通道后重试!");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:CardBinding " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("机卡重绑 异常!");
}
/**
* 连接管理设置
* @param file
* @return
*/
@Log(title = "连接管理设置", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:card:importSet')")
@PostMapping(value = "/importSet", produces = { "application/json;charset=utf-8" })
public AjaxResult importSet(MultipartFile file, @RequestParam Map<String,String> map)
{
String Pstr = map.get("Pstr").toString();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
Parammap.put("agent_id",User.getDeptId());
return AjaxResult.success(yzCardServiceImpl.importSet(file,Parammap));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:import <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("连接管理设置 异常!");
}
/**
* 特殊操作查询IMEI
* @param file
* @return
*/
@Log(title = "特殊操作查询IMEI", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:importSelImei')")
@PostMapping(value = "/importSelImei", produces = { "application/json;charset=utf-8" })
public AjaxResult importSelImei(MultipartFile file)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
Parammap.put("agent_id",User.getDeptId());
return AjaxResult.success(yzCardServiceImpl.importSelImei(file,Parammap));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:importSelImei <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("特殊操作查询IMEI 异常!");
}
/**
* 特殊操作 变更卡分组、备注
* @param file
* @return
*/
@Log(title = "特殊操作变更卡分组、备注", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:importSetCardInfo')")
@PostMapping(value = "/importSetCardInfo", produces = { "application/json;charset=utf-8" })
public AjaxResult importSetCardInfo(MultipartFile file)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
Parammap.put("agent_id",User.getDeptId());
return AjaxResult.success(yzCardServiceImpl.importSetCardInfo(file,Parammap));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:importSetCardInfo <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("特殊操作 变更卡分组、备注 异常!");
}
/**
* 导入查询、卡号类别
* @param file
* @return
*/
@Log(title = "卡号导入查询", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:ImportQuery')")
@PostMapping(value = "/cardNumber", produces = { "application/json;charset=utf-8" })
public AjaxResult CardNumberImport(MultipartFile file, @RequestParam Map<String,String> map)
{
String Pstr = map.get("Pstr").toString();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
List<Integer> agent_id = new ArrayList<>();
if(User.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
}else{
agent_id.add(Integer.parseInt(User.getDeptId().toString()));
Parammap.put("agent_id",agent_id);
}
}
try {
return AjaxResult.success(AesEncryptUtil.encrypt(JSON.toJSONString(yzCardServiceImpl.CardNumberImport(file,Parammap))));
}catch (Exception e){
return AjaxResult.error(AesEncryptUtil.encrypt(JSON.toJSONString("返回数据加密异常")));
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:ImportQuery <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("卡号导入查询 异常!");
}
/**
* 批量停复机、断开网
* @param file
* @return
*/
@Log(title = "批量停复机、断开网 ", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:ApiUpdBatch')")
@PostMapping(value = "/status", produces = { "application/json;charset=utf-8" })
public AjaxResult importSelImei(MultipartFile file,@RequestParam Map<String,String> map)
{
String Pstr = map.get("Pstr").toString();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
Parammap.put("agent_id",User.getDeptId());
return AjaxResult.success(yzCardServiceImpl.status(file,Parammap));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:ApiUpdBatch <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("批量停复机、断开网 异常!");
}
/**修改 备注 分组*/
@PreAuthorize("@ss.hasPermi('yunze:card:importSetCardInfo')")
@PostMapping(value = "/updatefill", produces = {"application/json;charset=UTF-8"})
public String Update(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.UpdateFill(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:updatefill <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("修改 备注 分组 异常!");
}
/**
* 下面是 操作
* */
/**停机*/
@PreAuthorize("@ss.hasPermi('yunze:card:Stopped')")
@PostMapping(value = "/stopped", produces = {"application/json;charset=UTF-8"})
public String StoppedArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.stoppedarr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:Stopped <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【停机】 异常!");
}
/**复机*/
@PreAuthorize("@ss.hasPermi('yunze:card:MachineArr')")
@PostMapping(value = "/machine", produces = {"application/json;charset=UTF-8"})
public String MachineArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.machinearr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:machine <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【复机】 异常!");
}
/**断网*/
@PreAuthorize("@ss.hasPermi('yunze:card:DisconnectNetworkArr')")
@PostMapping(value = "/disconnectNetwork", produces = {"application/json;charset=UTF-8"})
public String DisconnectNetworkArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.disconnectNetworkarr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:disconnectNetwork <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【断网】 异常!");
}
/**开网*/
@PreAuthorize("@ss.hasPermi('yunze:card:OpenNetworkArr')")
@PostMapping(value = "/openNetwork", produces = {"application/json;charset=UTF-8"})
public String OpenNetworkArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.openNetworkarr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:OpenNetworkArr <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【开网】 异常!");
}
/**同步流量*/
@PreAuthorize("@ss.hasPermi('yunze:card:ConsumptionArr')")
@PostMapping(value = "/consumption", produces = {"application/json;charset=UTF-8"})
public String ConsumptionArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.consumptionarr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:ConsumptionArr <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【同步流量】 异常!");
}
/**同步状态*/
@PreAuthorize("@ss.hasPermi('yunze:card:PublicMethodArr')")
@PostMapping(value = "/publicmethod", produces = {"application/json;charset=UTF-8"})
public String PublicMethodArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.publicmethodarr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:PublicMethodArr <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【同步状态】 异常!");
}
/**同步状态和用量*/
@PreAuthorize("@ss.hasPermi('yunze:card:ConsumptionAndStateArr')")
@PostMapping(value = "/consumptionandstate", produces = {"application/json;charset=UTF-8"})
public String ConsumptionAndStateArr(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCardServiceImpl.consumptionandstatearr(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:card:ConsumptionAndStateArr <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("批量 【同步状态和用量】 异常!");
}
}
@@ -0,0 +1,215 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzCardFlowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 资费信息
* 2021-06-09
* @author root
*/
@RestController
@RequestMapping("/yunze/cardFlow")
public class YzCardFlowController extends BaseController
{
@Autowired
private IYzCardFlowService cardFlowService;
/**
* 查询套餐信息
*/
@PreAuthorize("@ss.hasPermi('yunze:cardFlow:queryflow')")
@PostMapping(value = "/queryflow", produces = { "application/json;charset=utf-8" })
public String queryflow(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(cardFlowService.queryflow(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
System.err.println(e);
}
return Myerr("查询套餐信息 异常!");
}
/**
* 查询当前套餐简要信息
*/
@PreAuthorize("@ss.hasPermi('yunze:cardFlow:queryflowSimple')")
@PostMapping(value = "/queryflowSimple", produces = { "application/json;charset=utf-8" })
public String queryflowSimple(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
Parammap.put("agent_id",currentUser.getDeptId());
return MyRetunSuccess(cardFlowService.queryflow_simple(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardFlow:queryflowSimple <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询当前套餐简要信息 异常!");
}
/**
* 查询 简要 资费计划 名称
*/
@PreAuthorize("@ss.hasPermi('yunze:cardFlow:queryPackageSimple')")
@PostMapping(value = "/queryPackageSimple", produces = { "application/json;charset=utf-8" })
public String queryPackageSimple()
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
Parammap.put("agent_id",currentUser.getDeptId());
return MyRetunSuccess(cardFlowService.queryPackage_simple(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardFlow:queryPackageSimple " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询套餐信息 异常!");
}
/**
* 查询单条 资费计划 简要
* @return
*/
@PreAuthorize("@ss.hasPermi('yunze:cardFlow:FindPacket')")
@PostMapping(value = "/FindPacket", produces = { "application/json;charset=utf-8" })
public String FindPacket(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
Parammap.put("agent_id",currentUser.getDeptId());
return MyRetunSuccess(cardFlowService.FindPacket(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardFlow:FindPacket " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询单条 资费计划 简要 异常!");
}
/**
* 订购资费查询
* */
@PreAuthorize("@ss.hasPermi('yunze:flow:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String SynFlow(@RequestBody String Pstr){
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
if(currentUser.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
}else{
agent_id.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id",agent_id);
}
}
return MyRetunSuccess(cardFlowService.getList(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> system:flow:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("订购资费查询 异常!");
}
/**
* 订购资费导出
* */
@Log(title = "订购资费导出", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:flow:exportflow')")
@PostMapping(value = "/exportflow", produces = { "application/json;charset=utf-8" })
public String exportFlow(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
return MyRetunSuccess(cardFlowService.exportflow(Parammap,currentUser),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:flow:exportflow <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("订购资费导出 异常!");
}
}
@@ -0,0 +1,126 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.YzCardFlowHisService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 用量详情
* 2021-8-25
*/
@Api("用量详情")
@RestController
@RequestMapping("/yunze/flowhis")
public class YzCardFlowHisController extends BaseController {
@Autowired
private YzCardFlowHisService yrootlowHisService;
/**
* 执行用量详情
*/
@PreAuthorize("@ss.hasPermi('yunze:flowhis:list')")
@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
if (currentUser.getDeptId() != 100) {
if (Parammap.get("agent_id") != null) {
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
} else {
agent_id.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id", agent_id);
}
}
return MyRetunSuccess(yrootlowHisService.ListHis(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> system:flowhis:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("获取卡板信息列表 异常!");
}
/**
* 根据id查询
*/
@PreAuthorize("@ss.hasPermi('/yunze/flowhis/find')")
@PostMapping(value = "/find", produces = {"application/json;charset=UTF-8"})
public String find(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(yrootlowHisService.getById(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:flowhis:YrootlowHisController.java <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("查询 【订单详情】 异常!");
}
/**
* 用量详情导出 (同步导出 分组 、备注、发货时间)
*/
@Log(title = "用量详情导出", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:flowhis:exportflowhis')")
@PostMapping(value = "/exportflowhis", produces = {"application/json;charset=utf-8"})
public String exportFlowHis(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
String dept_id = currentUser.getDeptId().toString();
Parammap.put("dept_id",dept_id );
return MyRetunSuccess(yrootlowHisService.FlowHis(Parammap,currentUser), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:flowhis:exportflowhis <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("用量详情导出 异常!");
}
}
@@ -0,0 +1,284 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzCardPackageService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 资费组 管理
* 2021-06-22
* @author root
*/
@Api("资费组管理")
@RestController
@RequestMapping("/yunze/tariffGroup")
public class YzCardPackageController extends BaseController
{
@Autowired
private IYzCardPackageService cardPackageService;
/**
* 平台资费组 列表
*/
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(cardPackageService.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取平台资费组列表 异常!");
}
/**
* 平台资费组 新增
*/
@Log(title = "平台资费组", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=UTF-8" })
public String add(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(cardPackageService.add(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费组 新增 异常!");
}
/**
* 平台资费组 详情
*/
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=UTF-8" })
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(cardPackageService.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费组 详情 异常!");
}
/**
* 平台资费组 修改
*/
@Log(title = "平台资费组", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:edit')")
@PostMapping(value = "/edit", produces = { "application/json;charset=UTF-8" })
public String edit(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
boolean bool = cardPackageService.update(Parammap);
String msg = bool?"修改 平台资费组成功!":"网络异常请稍后重试!!!";
return MyRetunSuccess(bool,msg);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:edit <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费组 修改 异常!");
}
/**
* 划分资费组查询
*/
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:findPackage')")
@PostMapping(value = "/findPackage", produces = { "application/json;charset=UTF-8" })
public String findPackage(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<String> agent_id = new ArrayList<>();
agent_id.add(currentUser.getDeptId().toString());
Parammap.put("agent_id",agent_id);
return MyRetunSuccess(cardPackageService.findPackage(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:findPackage <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("划分资费组查询 异常!");
}
/**
* 平台资费组 划分
*/
@Log(title = "平台资费组>划分资费", businessType = BusinessType.OTHER)
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:tariffDivision')")
@PostMapping(value = "/tariffDivision", produces = { "application/json;charset=UTF-8" })
public String tariffDivision(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double set_error_so = 0.0,set_packet_cost = 0.0,set_packet_price = 0.0;
try {
set_error_so = Double.parseDouble(Parammap.get("set_error_so").toString());
set_packet_cost = Double.parseDouble(Parammap.get("set_packet_cost").toString());
set_packet_price = Double.parseDouble(Parammap.get("set_packet_price").toString());
}catch (Exception e){
return Myerr("平台资费组 划分 参数数据 异常!");
}
if(set_error_so>=1.0){
if(set_packet_price>=set_packet_cost){
//售价大等于 成本
//不能设置平台的数据
String dept_id = Parammap.get("dept_id").toString();
if(!dept_id.equals("100")){
//判断为总部管理才能操作划分资费计划
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
String ParentDept_id = currentUser.getDeptId().toString();
if(ParentDept_id.equals("100")){
Parammap.put("ParentDept_id",ParentDept_id);//复制 来源 父类 编号
return MyRetunSuccess(true,cardPackageService.tariffDivision(Parammap));
}else{
return Myerr("非平台总集团不可操作集团资费划分 !请联系管理员先变更所属集团!");
}
}else{
return Myerr("无需划分资费到总平台 ");
}
}else{
return Myerr("售价 不能小于 成本 ");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:tariffDivision <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费组 划分 异常!");
}
/**
* 集团 资费组 划分
*/
@Log(title = "集团资费组>划分资费", businessType = BusinessType.OTHER)
@PreAuthorize("@ss.hasPermi('yunze:tariffGroup:agentTariffDivision')")
@PostMapping(value = "/agentTariffDivision", produces = { "application/json;charset=UTF-8" })
public String agentTariffDivision(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double set_error_so = 0.0,set_packet_cost = 0.0,set_packet_price = 0.0;
try {
set_error_so = Double.parseDouble(Parammap.get("set_error_so").toString());
set_packet_cost = Double.parseDouble(Parammap.get("set_packet_cost").toString());
set_packet_price = Double.parseDouble(Parammap.get("set_packet_price").toString());
}catch (Exception e){
return Myerr("平台资费组 划分 参数数据 异常!");
}
if(set_error_so>=1.0){
//售价大等于 成本
if(set_packet_price>=set_packet_cost){
//不能设置平台的数据
String dept_id = Parammap.get("dept_id").toString();
if(!dept_id.equals("100")){
//不能划分到所属集团名下
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
String ParentDept_id = currentUser.getDeptId().toString();
if(!ParentDept_id.equals(dept_id)){
if(!ParentDept_id.equals("100")){
Parammap.put("ParentDept_id",ParentDept_id);//复制 来源 父类 编号
return MyRetunSuccess(true,cardPackageService.tariffDivision(Parammap));
}else{
return Myerr("总集团 不能直接 划分 用户 资费 !!");
}
}else{
return Myerr("不能划分所属集团资费 ");
}
}else{
return Myerr("无需划分资费到总平台 ");
}
}else{
return Myerr("售价 不能小于 成本 ");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffGroup:agentTariffDivision <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("集团 资费组 划分 异常!");
}
}
@@ -0,0 +1,189 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.Arith;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzCardPacketService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* 平台资费计划 管理
* 2021-06-24
* @author root
*/
@Api("平台资费计划管理")
@RestController
@RequestMapping("/yunze/tariffPlan")
public class YzCardPacketController extends BaseController
{
@Autowired
private IYzCardPacketService cardPacketService;
/**
* 平台资费计划 新增
*/
@Log(title = "平台资费计划", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:tariffPlan:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=UTF-8" })
public String add(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double error_so = Double.parseDouble(Parammap.get("error_so").toString());
Double packet_flow = Double.parseDouble(Parammap.get("packet_flow").toString());
Double error_flow = Double.parseDouble(Parammap.get("error_flow").toString());
if(error_so>=1){
if(packet_flow>=error_flow) {
//校验计算 用量
Parammap.put("error_flow",Arith.div(packet_flow,error_so,0));
return MyRetunSuccess(cardPacketService.add(Parammap),null);
}else{
return Myerr("资费计划 流量 不能小于 资费计划 用量 !");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffPlan:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费计划 新增 异常!");
}
/**
* 平台资费计划 详情
*/
@PreAuthorize("@ss.hasPermi('yunze:tariffPlan:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=UTF-8" })
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
//校验计算 用量
return MyRetunSuccess(cardPacketService.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffPlan:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费计划 详情 异常!");
}
/**
* 平台资费计划 编辑
*/
@Log(title = "平台资费计划", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:tariffPlan:edit')")
@PostMapping(value = "/edit", produces = { "application/json;charset=UTF-8" })
public String edit(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
Double error_so = Double.parseDouble(Parammap.get("error_so").toString());
Double packet_flow = Double.parseDouble(Parammap.get("packet_flow").toString());
Double error_flow = Double.parseDouble(Parammap.get("error_flow").toString());
Double packet_price = Double.parseDouble(Parammap.get("packet_price").toString());
Double packet_cost = Double.parseDouble(Parammap.get("packet_cost").toString());
if(error_so>=1){
if(packet_flow>=error_flow) {
//校验计算 用量
if(packet_price>=packet_cost){
//售价大等于 成本
Parammap.put("error_flow",Arith.div(packet_flow,error_so,0));
return MyRetunSuccess(cardPacketService.update(Parammap),null);
}else{
return Myerr("售价 不能小于 成本 ");
}
}else{
return Myerr("资费计划 流量 不能小于 资费计划 用量 !");
}
}else{
return Myerr("资费计划系数不能 小于 1 ");
}
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffPlan:edit <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台资费计划 编辑 异常!");
}
/**
* 平台 划分资费计划 查询
*/
@PreAuthorize("@ss.hasPermi('yunze:tariffPlan:findPacket')")
@PostMapping(value = "/findPacket", produces = { "application/json;charset=UTF-8" })
public String findPacket(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
Parammap.put("agent_idStr",currentUser.getDeptId());
return MyRetunSuccess(cardPacketService.findPacket(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:tariffPlan:findPacket <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.toString());
}
return Myerr("平台 划分资费计划 查询 异常!");
}
}
@@ -0,0 +1,278 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysDictData;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzCardRouteService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 通道 管理
* 2021-06-19
* @author root
*/
@Api("上游通道管理")
@RestController
@RequestMapping("/yunze/cardRoute")
public class YzCardRouteController extends BaseController
{
@Resource
private IYzCardRouteService iYzCardRouteService;
/**
* 查询简要 通道信息
*/
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:findSp')")
@PostMapping(value = "/findSp", produces = { "application/json;charset=utf-8" })
public String findSp()
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
return MyRetunSuccess(iYzCardRouteService.find_sp(),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:findSp " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询简要 通道信息 异常!");
}
/**
* 查询 通道简要信息 状态为 正常 划分通道用
*/
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:findCr')")
@PostMapping(value = "/findCr", produces = { "application/json;charset=utf-8" })
public String findCr()
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
return MyRetunSuccess(iYzCardRouteService.find_cr(),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:findSp " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 通道简要信息 状态为 正常 划分通道用 异常!");
}
/**
* API通道信息列表
*/
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(iYzCardRouteService.sel_Map(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取API通道信息列表 异常!");
}
/**
* 查询API通道详情
*/
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:find')")
@PostMapping(value = "/find", produces = { "application/json;charset=utf-8" })//
public String find(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(iYzCardRouteService.find(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:find <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询API通道详情 异常!");
}
/**
* 新增 API通道信息
*/
@Log(title = "上游通道", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=utf-8" })
public String add(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("cd_agent_id",User.getDeptId());
boolean bool = iYzCardRouteService.add(Parammap);
String msg = bool?"新增 上游通道成功!":"网络异常请稍后重试!!!";
return MyRetunSuccess(bool,msg);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("新增 API通道信息 异常!");
}
/**
* 编辑 API通道信息
*/
@Log(title = "上游通道", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:edit')")
@PostMapping(value = "/edit", produces = { "application/json;charset=utf-8" })
public String edit(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("cd_agent_id",User.getDeptId());
boolean bool = iYzCardRouteService.update(Parammap);
String msg = bool?"编辑 上游通道成功!":"网络异常请稍后重试!!!";
return MyRetunSuccess(bool,msg);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:edit <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("编辑 API通道信息 异常!");
}
/**
* 删除 API通道信息 (改为 删除 状态)
*/
@Log(title = "上游通道", businessType = BusinessType.UPDATE)
@PreAuthorize("@ss.hasPermi('yunze:cardRoute:delRoute')")
@PostMapping(value = "/delRoute", produces = { "application/json;charset=utf-8" })
public String delRoute(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("cd_agent_id",User.getDeptId());
boolean bool = iYzCardRouteService.update_cd_status(Parammap);
String msg = bool?"删除 上游通道成功!":"网络异常请稍后重试!!!";
return MyRetunSuccess(bool,msg);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:delRoute <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("删除 API通道信息 异常!");
}
/**
* 导出
* @return
*/
@Log(title = "上游通道", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:card:exportData')")
@PostMapping(value = "/exportData", produces = { "application/json;charset=utf-8" })
public String exportData(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
return MyRetunSuccess(iYzCardRouteService.exportData(Parammap,currentUser),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cardRoute:exportData <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("导出上游通道 异常!");
}
/**
* 通道进度查询
* */
}
@@ -0,0 +1,53 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.mapper.yunze.YzCategoryMapper;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.service.yunze.YzCategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* 商品分类
* 2021-10-21
*/
@Api("商品分类")
@RestController
@RequestMapping("/yunze/shop")
public class YzCategoryController extends BaseController {
@Autowired
private YzCategoryService YzCategoryService;
/**
* 执行商品分类
*/
@PreAuthorize("@ss.hasPermi('yunze:shop:prdCategory')")
@PostMapping(value = "/prdCategory", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(YzCategoryService.CategoryList(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:shop:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("商品分类 异常!");
}
}
@@ -0,0 +1,157 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.domain.SysPost;
import com.yunze.system.service.yunze.IYzLogsService;
import com.yunze.system.service.yunze.YzCcService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
/**
* 自动化
* 2021-10-19
*/
@Api("自动化")
@RestController
@RequestMapping("/yunze/cc")
public class YzCcController extends BaseController{
@Autowired
private YzCcService YzCcService;
/**
* 执行自动化
*/
@PreAuthorize("@ss.hasPermi('yunze:cc:list')")
@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(YzCcService.ListCc(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cc:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("自动化 异常!");
}
/**
* 自动化新增
*/
@Log(title = "自动化新增", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:cc:add')")
@PostMapping(value = "/add", produces = { "application/json;charset=UTF-8" })
public String add(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(YzCcService.YzCcAdd(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cc:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.toString());
}
return Myerr(" 异常!");
}
/**
* 查询 对应自动化规则表 名字 对应 自动化管理抄送名字
*/
@PreAuthorize("@ss.hasPermi('yunze:cc:nameadd')")
@PostMapping(value = "/nameadd", produces = { "application/json;charset=utf-8" })
public String findCr()
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
return MyRetunSuccess(YzCcService.NameAdd(),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cc:nameadd " + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 对应自动化规则表 名字 正常 自动化管理抄送名字 异常!");
}
/**
* 修改自动化
*/
@PreAuthorize("@ss.hasPermi('yunze:cc:ccupdate')")
@PostMapping(value = "/ccupdate", produces = {"application/json;charset=UTF-8"})
public String Update(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(YzCcService.UpdateCc(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cc:update <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("配置自动化 异常!");
}
}
@@ -0,0 +1,52 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.service.yunze.YzCcHisService;
import com.yunze.system.service.yunze.YzCcService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
/**
* 自动化配置
* 2021-10-19
*/
@Api("自动化配置")
@RestController
@RequestMapping("/yunze/cchis")
public class YzCcHisController extends BaseController {
@Autowired
private YzCcHisService yzCcHisService;
/**
* 执行 自动化配置
*/
@PreAuthorize("@ss.hasPermi('yunze:cchis:list')")
@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCcHisService.ListCcHis(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:cchis:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("自动化配置 异常!");
}
}
@@ -0,0 +1,180 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysDictData;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.service.yunze.YzCcService;
import com.yunze.system.service.yunze.YzCcUrlService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
/**
* 自动化
* 2021-10-19
*/
@Api("自动化推送")
@RestController
@RequestMapping("/yunze/ccurl")
public class YzCcUrlController extends BaseController {
@Autowired
private YzCcUrlService yzCcUrlService;
/**
* 执行配置
*/
@PreAuthorize("@ss.hasPermi('yunze:ccurl:list')")
@PostMapping(value = "/list", produces = {"application/json;charset=UTF-8"})
public String SynFlow(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCcUrlService.ListCcUrl(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ccurl:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("自动化配置 异常!");
}
/**
* 新增
*/
@Log(title = "推送", businessType = BusinessType.INSERT)
@PreAuthorize("@ss.hasPermi('yunze:ccurl:add')")
@PostMapping(value = "/add", produces = {"application/json;charset=UTF-8"})
public String add(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(yzCcUrlService.insertCcUrl(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ccurl:add <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.toString());
}
return Myerr(" 异常!");
}
/**
* 修改配置
*/
@PreAuthorize("@ss.hasPermi('yunze:ccurl:update')")
@PostMapping(value = "/update", produces = {"application/json;charset=UTF-8"})
public String Update(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(yzCcUrlService.updateCcUrl(Parammap), null);
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ccurl:update <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("配置修改 异常!");
}
/**
* 删除 只留最后一位
*/
@PreAuthorize("@ss.hasPermi('yunze:ccurl:deleteurl')")
@PostMapping(value = "/deleteurl", produces = {"application/json;charset=UTF-8"})
public String Delete(@RequestBody String Pstr) {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
Map<String,Object> Rmap = yzCcUrlService.DeleteCcUrl(Parammap);
boolean bool = (boolean) Rmap.get("bool");
String Msg = Rmap.get("Msg").toString();
if(bool){
return MyRetunSuccess(Msg,null);
}else{
return Myerr(Msg);
}
} catch (Exception e) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ccurl:deleteurl <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
return Myerr("删除配置条数 异常!");
}
}
@@ -0,0 +1,215 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.common.utils.poi.ExcelWrite;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.common.utils.yunze.FileConverter;
import com.yunze.framework.web.service.TokenService;
import com.yunze.quartz.domain.SysJob;
import com.yunze.system.service.yunze.IYzExecutionTaskService;
import org.apache.commons.csv.CSVFormat;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 执行任务信息
* 2021-06-21
* @author root
*/
@RestController
@RequestMapping("/yunze/ExecutionTask")
public class YzExecutionTaskController extends BaseController
{
@Resource
private IYzExecutionTaskService iYzExecutionTaskService;
@Resource
private ExcelWrite excelWrite;
@Resource
private FileConverter fileConverter;
/**
* 执行任务列表
*/
@PreAuthorize("@ss.hasPermi('yunze:ExecutionTask:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
Object agent_id = Parammap.get("agent_id");
if(agent_id==null ){
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<String> agent_idArr = new ArrayList<String>();
agent_idArr.add(""+currentUser.getDeptId());
Parammap.put("agent_id",agent_idArr);
}
return MyRetunSuccess(iYzExecutionTaskService.sel_Map(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ExecutionTask:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取API通道信息列表 异常!");
}
/**
* 下载执行任务
* @param Pstr
* @param response
* @return
*/
@GetMapping(value = "/download" )
public void download(@RequestParam String Pstr, HttpServletResponse response, HttpServletRequest request) {
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
try {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
Pstr = Pstr.replace(" ", "+");//转义 [ ] 》 +
}
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
if(Parammap.get("path")!=null && Parammap.get("token")!=null ){
String path = Parammap.get("path").toString();
String token = Parammap.get("token").toString();
LoginUser loginUser = null;
try {
loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(token);
}catch (Exception e){
logger.error("<br/> yunze:ExecutionTask:download token获取用户异常 <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
if(loginUser!=null){
SysUser User = loginUser.getUser();
logger.info("<br/> "+" 公司 "+User.getDept().getDeptName()+" 用户名 "+User.getUserId()+" "+User.getUserName()+" <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ");
//获取当前文件下载 地址
File file2 = new File("");
String filePath = file2.getCanonicalPath();
filePath +="/mnt/yunze/download/csv/";
//切割出下载的地址请求头
String Prefix = path.split("/")[1];
path = path.substring(Prefix.length()+2,path.length());
//拼接下载地址
path = filePath+path;
excelWrite.download(path,response,"UTF-8",System.currentTimeMillis() + "_csv_");
}
}else{
logger.info("<br/> Pstr = " + Pstr + " ip = " + ip + " 下载文件参数缺失");
}
} catch (IOException ex) {
logger.error("<br/> yunze:ExecutionTask:download IOException <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",ex.getCause().toString());
}catch (Exception e){
logger.error("<br/> yunze:ExecutionTask:download Exception <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
}
/**
* 下载转换
*/
@GetMapping(value = "/downloadConversion" )
public void downloadConversion(@RequestParam String Pstr, HttpServletResponse response, HttpServletRequest request) {
{
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
try {
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if (Pstr != null) {
Pstr = Pstr.replace("%2F", "/");//转义 /
Pstr = Pstr.replace(" ", "+");//转义 [ ] 》 +
}
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
if (Parammap.get("path") != null && Parammap.get("token") != null) {
String path = Parammap.get("path").toString();
String token = Parammap.get("token").toString();
LoginUser loginUser = null;
try {
loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(token);
} catch (Exception e) {
logger.error("<br/> yunze:ExecutionTask:download token获取用户异常 <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
if (loginUser != null) {
SysUser User = loginUser.getUser();
logger.info("<br/> " + " 公司 " + User.getDept().getDeptName() + " 用户名 " + User.getUserId() + " " + User.getUserName() + " <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ");
CsvOrExcle(path,response);
}
} else {
logger.info("<br/> Pstr = " + Pstr + " ip = " + ip + " 下载文件参数缺失");
}
} catch (Exception e) {
logger.error("<br/> yunze:ExecutionTask:downloadConversion <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ", e.getCause().toString());
}
}
}
/**
* 下载 Csv Or Excle
* @param path
* @param response
* @throws IOException
*/
private void CsvOrExcle(String path,HttpServletResponse response) throws IOException {
//获取当前文件下载 地址
File file2 = new File("");
String filePath = file2.getCanonicalPath();
filePath += "/mnt/yunze/download/csv/";
//切割出下载的地址请求头
String Prefix = path.split("/")[1];
path = path.substring(Prefix.length() + 2, path.length());
//拼接下载地址
path = filePath + path;
// path是指欲下载的文件的路径。
String pathArr[] = path.split("\\.");
if(pathArr!=null && pathArr.length>0){
String downloadUrl = pathArr[0] + ".xls";
File file = new File(downloadUrl);
if (file!=null && file.exists()) {
// xls 文件 存在直接下载
excelWrite.download(downloadUrl, response, "UTF-8",System.currentTimeMillis() + "_xls_");
} else {
//cvs 文件 转换
fileConverter.generateExcel(fileConverter.CSVexcel(path), downloadUrl, "card",50000);
// 下载
excelWrite.download(downloadUrl, response, "UTF-8",System.currentTimeMillis() + "_xls_");
}
}
}
}
@@ -0,0 +1,213 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzCardFlowService;
import com.yunze.system.service.yunze.IYzOrderService;
import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 通道 管理
* 2021-06-19
* @author root
*/
@Api("订单管理")
@RestController
@RequestMapping("/yunze/order")
public class YzOrderController extends BaseController
{
@Resource
private IYzOrderService iYzOrderService;
@Resource
private IYzCardFlowService iYzCardFlowService;
/**
* 订单 列表
*/
@PreAuthorize("@ss.hasPermi('yunze:order:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
if(currentUser.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
}else{
agent_id.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id",agent_id);
}
}
return MyRetunSuccess(iYzOrderService.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:order:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取订单 列表信息列表 异常!");
}
/**
* 查询 资费计划 信息
*/
@PreAuthorize("@ss.hasPermi('yunze:order:list')")
@PostMapping(value = "/queryPacketSimple", produces = { "application/json;charset=UTF-8" })
public String queryPacketSimple()
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<String> agent_id = new ArrayList<>();
if(currentUser.getDeptId()!=100){
agent_id.add(currentUser.getDeptId().toString());
}else{
agent_id.add(currentUser.getDeptId().toString());
}
Parammap.put("agent_id",agent_id);
return MyRetunSuccess(iYzCardFlowService.queryPacket_simple(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:order:list <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取 【订单】 查询 资费计划 异常!");
}
/**
* 查询 订单详情
*/
@PreAuthorize("@ss.hasPermi('yunze:order:findOrder')")
@PostMapping(value = "/findOrder", produces = { "application/json;charset=UTF-8" })
public String findOrder(@RequestBody String Pstr)
{
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(iYzOrderService.findOrder(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:order:findOrder <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 【订单详情】 异常!");
}
/**
* 平台导入充值
* @param file
* @return
*/
@Log(title = "订单管理", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:order:importRecharge')")
@PostMapping(value = "/importRecharge", produces = { "application/json;charset=utf-8" })
public AjaxResult importRecharge(MultipartFile file,@RequestParam Map<String,String> map)
{
String Pstr = map.get("Pstr").toString();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
HashMap<String, Object> Parammap = new HashMap<String, Object>();
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser User = loginUser.getUser();
Parammap.put("User",User);
Parammap.put("agent_id",User.getDeptId());
return AjaxResult.success(iYzOrderService.importRecharge(file,Parammap));
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:order:importRecharge <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return AjaxResult.error("平台导入充值 异常!");
}
/**
* 导出
* @return
*/
@Log(title = "全部订单导出", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:order:outOrder')")
@PostMapping(value = "/outOrder", produces = { "application/json;charset=utf-8" })
public String exportData(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
return MyRetunSuccess(iYzOrderService.exportallorders(Parammap,currentUser),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:order:outOrder <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("全部订单导出 异常!");
}
}
@@ -0,0 +1,170 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.system.service.yunze.IYzLogsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
/**
* 菜单执行任务
* 2021-8-19
*/
@Api("菜单执行任务")
@RestController
@RequestMapping("/yunze/sysLog")
public class YzSysLogsController extends BaseController {
@Autowired
private IYzLogsService iYzLogsService;
/**
* 执行日志
* */
@PreAuthorize("@ss.hasPermi('yunze:sysLog:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String SynFlow(@RequestBody String Pstr){
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject(Pstr));
return MyRetunSuccess(iYzLogsService.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> system:sysLog:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取卡板信息列表 异常!");
}
/**
* 根据id查询
* */
@PreAuthorize("@ss.hasPermi('yunze:sysLog:findSys')")
@PostMapping(value = "/findSys", produces = { "application/json;charset=UTF-8" })
public String findSys(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(iYzLogsService.getById(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:sysLog:findSys <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 【订单详情】 异常!");
}
}
@@ -0,0 +1,228 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.annotation.Log;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.utils.SecurityUtils;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.poi.ExcelUtil;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.ISysPostService;
import com.yunze.system.service.ISysRoleService;
import com.yunze.system.service.ISysUserService;
import com.yunze.system.service.yunze.IYzUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.HashMap;
import java.util.List;
/**
* 执行任务信息
* 2021-06-21
* @author root
*/
@RestController
@RequestMapping("/yunze/agent")
public class YzUserController extends BaseController
{
@Autowired
private IYzUserService daoServer;
@Autowired
private ISysUserService userService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@Autowired
private TokenService tokenService;
/**
* 用户 列表
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
Parammap.put("deptId",currentUser.getDeptId());
return MyRetunSuccess(daoServer.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:ExecutionTask:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取用户信息列表 异常!");
}
/**
* 根据用户编号获取详细信息
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:query')")
@GetMapping(value = { "/", "/{userId}" })
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
{
AjaxResult ajax = AjaxResult.success();
//List<SysRole> roles = roleService.selectRoleAll();
//ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
ajax.put("posts", postService.selectPostAll());
if (StringUtils.isNotNull(userId))
{
ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId));
ajax.put("postIds", postService.selectPostListByUserId(userId));
ajax.put("roleIds", roleService.selectRoleListByUserId(userId));
}
return ajax;
}
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('yunze:agent:export')")
@GetMapping("/export")
public AjaxResult export(SysUser user)
{
List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "用户数据");
}
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
@PreAuthorize("@ss.hasPermi('yunze:agent:import')")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream());
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
String operName = loginUser.getUsername();
String message = userService.importUser(userList, updateSupport, operName);
return AjaxResult.success(message);
}
@GetMapping("/importTemplate")
public AjaxResult importTemplate()
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.importTemplateExcel("用户数据");
}
/**
* 新增用户
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:add')")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysUser user)
{
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
}
else if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setCreateBy(SecurityUtils.getUsername());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return toAjax(userService.insertUser(user));
}
/**
* 修改用户
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysUser user)
{
userService.checkUserAllowed(user);
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUser(user));
}
/**
* 删除用户
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:remove')")
@Log(title = "用户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable Long[] userIds)
{
return toAjax(userService.deleteUserByIds(userIds));
}
/**
* 重置密码
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:resetPwd')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/resetPwd")
public AjaxResult resetPwd(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.resetPwd(user));
}
/**
* 状态修改
*/
@PreAuthorize("@ss.hasPermi('yunze:agent:edit')")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUserStatus(user));
}
}
@@ -0,0 +1,179 @@
package com.yunze.web.controller.yunze;
import com.alibaba.fastjson.JSON;
import com.yunze.common.core.controller.BaseController;
import com.yunze.common.core.domain.entity.SysUser;
import com.yunze.common.core.domain.model.LoginUser;
import com.yunze.common.utils.ServletUtils;
import com.yunze.common.utils.ip.IpUtils;
import com.yunze.common.utils.spring.SpringUtils;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import com.yunze.framework.web.service.TokenService;
import com.yunze.system.service.yunze.IYzInfoChangeService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* 卡信息变更
* 2021-9-22
*/
@Api("卡信息变更")
@RestController
@RequestMapping("/yunze/change")
public class YzYzInfoChangeController extends BaseController {
@Autowired
private IYzInfoChangeService iYzInfoChangeService;
/**
* 获取卡信息变更列表
* */
@PreAuthorize("@ss.hasPermi('yunze:change:list')")
@PostMapping(value = "/list", produces = { "application/json;charset=UTF-8" })
public String list(@RequestBody String Pstr){
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
// System.out.println(map);
Parammap.putAll(JSON.parseObject((String) Pstr));
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
SysUser currentUser = loginUser.getUser();
List<Integer> agent_id = new ArrayList<>();
if(currentUser.getDeptId()!=100){
if(Parammap.get("agent_id")!=null){
List<Integer> P_agent_id = (List<Integer>) Parammap.get("agent_id");
agent_id.addAll(P_agent_id);
}else{
agent_id.add(Integer.parseInt(currentUser.getDeptId().toString()));
Parammap.put("agent_id",agent_id);
}
}
return MyRetunSuccess(iYzInfoChangeService.selMap(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> info:change:list <br/> Pstr = " + Pstr + " <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("获取卡信息变更列表 异常!");
}
/**
* 时间降序查询
* */
@PreAuthorize("@ss.hasPermi('yunze:change:list')")
@PostMapping(value = "/info", produces = { "application/json;charset=UTF-8" })
public String findSys(@RequestBody String Pstr)
{
HashMap<String, Object> Parammap = new HashMap<String, Object>();
if(Pstr!=null){
Pstr = Pstr.replace("%2F", "/");//转义 /
}
try {
Pstr = AesEncryptUtil.desEncrypt(Pstr);
Parammap.putAll(JSON.parseObject((String) Pstr));
return MyRetunSuccess(iYzInfoChangeService.selTime(Parammap),null);
}catch (Exception e){
String ip = IpUtils.getIpAddr(ServletUtils.getRequest());
logger.error("<br/> yunze:change:info <br/> ip = " + ip + " <br/> ",e.getCause().toString());
}
return Myerr("查询 【时间降序】 异常!");
}
}
@@ -0,0 +1,125 @@
package com.yunze.web.core.config;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.yunze.common.config.YunZeConfig;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.Contact;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* Swagger2的接口配置
*
* @author yunze
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig
{
/** 系统基础配置 */
@Autowired
private YunZeConfig yunzeConfig;
/** 是否开启swagger */
@Value("${swagger.enabled}")
private boolean enabled;
/** 设置请求的统一前缀 */
@Value("${swagger.pathMapping}")
private String pathMapping;
/**
* 创建API
*/
@Bean
public Docket createRestApi()
{
return new Docket(DocumentationType.SWAGGER_2)
// 是否启用Swagger
.enable(enabled)
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
.apiInfo(apiInfo())
// 设置哪些接口暴露给Swagger展示
.select()
// 扫描所有有注解的api,用这种方式更灵活
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解
// .apis(RequestHandlerSelectors.basePackage("com.yunze.project.tool.swagger"))
// 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
/* 设置安全模式,swagger可以设置访问token */
.securitySchemes(securitySchemes())
.securityContexts(securityContexts())
.pathMapping(pathMapping);
}
/**
* 安全模式,这里指定token通过Authorization头请求头传递
*/
private List<ApiKey> securitySchemes()
{
List<ApiKey> apiKeyList = new ArrayList<ApiKey>();
apiKeyList.add(new ApiKey("Authorization", "Authorization", "header"));
return apiKeyList;
}
/**
* 安全上下文
*/
private List<SecurityContext> securityContexts()
{
List<SecurityContext> securityContexts = new ArrayList<>();
securityContexts.add(
SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("^(?!auth).*$"))
.build());
return securityContexts;
}
/**
* 默认的安全上引用
*/
private List<SecurityReference> defaultAuth()
{
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
List<SecurityReference> securityReferences = new ArrayList<>();
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
return securityReferences;
}
/**
* 添加摘要信息
*/
private ApiInfo apiInfo()
{
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:IOT综合业务支撑平台_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息
.contact(new Contact(yunzeConfig.getName(), null, null))
// 版本
.version("版本号:" + yunzeConfig.getVersion())
.build();
}
}
@@ -0,0 +1 @@
restart.include.json=/com.alibaba.fastjson.*.jar
@@ -0,0 +1,59 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源
master:
url: jdbc:mysql://127.0.0.1/iotdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: iotdb
password: www.5iot.cn
#从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: false
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: admin
login-password: 20220107@yzIot
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true
@@ -0,0 +1,150 @@
# 项目相关配置
yunze:
# 名称
name: IoTLink
# 版本
version: 0.5.0
# 版权年份
copyrightYear: 2022v
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/yunze/uploadPathLinux配置 /home/yunze/uploadPath
profile: /mnt/yunze/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8080
port: 8080
servlet:
# 应用的访问路径
context-path: /
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
# tomcat最大线程数,默认为200
max-threads: 800
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
# 日志配置
logging:
level:
org.springframework: warn
com.yunze: debug
# Spring配置
spring:
# 资源信息
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
active: druid
# 文件上传
servlet:
multipart:
# 单个文件大小
max-file-size: 30MB
# 设置总上传的文件大小
max-request-size: 100MB
# 服务模块
devtools:
restart:
# 热部署开关
enabled: true
# redis 配置
redis:
# 地址
host: 127.0.0.1
# 端口,默认为6379
port: 6379
# 数据库索引
database: 0
# 密码
password: Rdis20220107
# 连接超时时间
timeout: 10s
lettuce:
pool:
# 连接池中的最小空闲连接
min-idle: 0
# 连接池中的最大空闲连接
max-idle: 8
# 连接池的最大数据库连接数
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
rabbitmq:
####连接地址
host: 127.0.0.1
####端口号
port: 5672
####账号
username: YunZeIotRabbitMq
## 心跳 请求的心跳超时,以秒为单位; 零表示没有
requested-heartbeat: 40
####密码
password: 20220107@yzIot
### 地址
virtual-host: /VirtualHosts
listener:
simple:
retry:
####开启消费者(程序出现异常的情况下会)进行重试
enabled: true
####最大重试次数
max-attempts: 1
####重试间隔时间
initial-interval: 3000
acknowledge-mode: manual
# token配置
token:
# 令牌自定义标识
header: Authorization
# 令牌密钥
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认180分钟)
expireTime: 180
# MyBatis配置
mybatis:
# 搜索指定包别名
typeAliasesPackage: com.yunze.**.domain
# 配置mapper的扫描,找到所有的mapper.xml映射文件
mapperLocations: classpath*:mapper/**/*Mapper.xml
# 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: false
params: count=countSql
# Swagger配置
swagger:
# 是否开启swagger
enabled: true
# 请求前缀
#pathMapping: /dev-api
pathMapping: /prod-api
# 防止XSS攻击
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice/*
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*,/yunze/*
+27
View File
@@ -0,0 +1,27 @@
Application Version: ${yunze.version}
Spring Boot Version: ${spring-boot.version}
................... ..
................... ..
............,@\... ..
....../@\`./@@@@\... ..
...................,@@@@@@@@@@@@@.... ... .........................................................................................................
................,/@@@@@@@@@@@@@@/.... .. ....,]]]]]]]]]]]]]]]]]]].....]]]]]]]]]`....`**.=@@@^...]]]@@@@@@@^.....@@@@^......@@@@^......=@@@^.......
....=`.......]@@@@@@@@@@@@@O[[...... ......[[[[[[[[[[[[[[[[[[`.....@@@/[[[[[@@@\*@@@^=@@@^...[*./@@@*...=@@\.@@@@^......@@@@^.@@@@@@@@@@@@@@^..
.....,@@@@@@@@@@@@@@@O[.......... . ..............................@@@^=@@@*@@@\*@@@^=@@@^..@@@@@@@@@@@@.\@@\@@@@^...,@@@@@@@/.....=@@@^.......
........*O@@@@@@@/`....,]]]]]`............ ..............................@@@^=@@@*@@@^*@@@^=@@@^...,]]@@@@]]].]]]*.@@@@^......@@@@^.,]]]]/@@@\]`.....
......./@@@@@@[...]@@@@@@@@@@@@@\`....... ...=@@@@@@@@@@@@@@@@@@@@@@^...@@@^=@@@*@@@^*@@@^=@@@^.../@@@@@@@@@*,@@@*@@@@^......@@@@^..[[[[[[[[\@@@@`..
...../@@@@@/.../@@@@@@@@@@@@@@@@@@^....... ........=@@@@@................@@@^=@@@*@@@^*@@@^=@@@^...@@@@@@@O@@^.=@@@@@@@^......@@@@\^.,@@@@`,@@@@/....
..,@@@@@^.../@@@@@@@@[.....\@@@@@@`...... ......,@@@@@....=@@@@........@@@\@@@@*@@@^*@@@^=@@@^...@@@O@@@=@@^*****@@@@^....]/@@@@@^...\@@@@@@@`.....
.........=@@@@@.../@@@@@@@[.........@@@@@@^..................,@@@@@......=@@@@.......[[\@@@@@@@[[`*@@@^=@@@^..=@@^O@@@*@@/[[[[[@@@@[[..=@@@@@@^.....=@@@@\.......
........=@@@@/...@@@@@@@^...........@@@@@@..................,@@@@@........\@@@@.......=@@@/=@@@\...@@@^=@@@^..=@@^@@@@*@@@.....@@@@^......@@@@^....@@@@@@@@\.....
........O@@@@...@@@@@@@`..........,@@@@@@...................[@@@@@]\]]]]]\/@@@@\...../@@@^..=@@@@....**/@@@^..O@@^@@@@*@@@.....@@@@^......@@@@^../@@@@`.,@@@@^..
.......=@@@@^..@@@@@@@..........]@@@@@@/................]...........................,[[[`....,[[[[...[[[[[[`..\[[.[[[[.,[\.....[[[[`...,[[[[[[`.[[[[[.....,[[[[..
.......=@@@@..=@@@@@@^......./@@@@@@/`...............,@/........................................................................................................
.......=@@@@..=@@@@@@............................../@@`..........................................................................................................
........@@@@..=@@@@@@`........................../@@@^............................................................................................................
.........\@@^.=@@@@@@@`.....................]@@@@@/........,@*//.=^..=^.@\\,@.......,@`.@^.........=^...@....=@....=@..=@.=@\.@^=@..=\.@....,@..=@.@^.....\^,@*..
..... ...\^..\@@@@@@@@`..............]@@@@@@@@[............@^..=^..=^.@*\@@......//...@/[[`......=^...@[[[.=@....=@[[\@.=^=@@^=@..=@.@....,@..=@.@^[[@...\@....
........\@@@@@@@@@@@@@@@@@@@@@@@@@@@@/...... .....@...,\OO@^.@..,@.....[OOOO.[OOO^......\^...\/OO.,\OOO`=/..,@.=^..\`,@OO@^.[OOO^,@OO@/.,OOO@...=/....
..........,@@@@@@@@@@@@@@@@@@@@@@@@/`......... ..........................................................................................................
............[@@@@@@@@@@@@@@@@@[........... ..............................................................................................................
......... . ....,[[[[[[......... ... ... . . .. ..................... ...... .... ... .. ... ..... ..... .. .. ............ ... ........... ... ..
@@ -0,0 +1,36 @@
#错误消息
not.null=* 必须填写
user.jcaptcha.error=验证码错误
user.jcaptcha.expire=验证码已失效
user.not.exists=用户不存在/密码错误
user.password.not.match=用户不存在/密码错误
user.password.retry.limit.count=密码输入错误{0}次
user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
user.password.delete=对不起,您的账号已被删除
user.blocked=用户已封禁,请联系管理员
role.blocked=角色已封禁,请联系管理员
user.logout.success=退出成功
length.not.valid=长度必须在{min}到{max}个字符之间
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
user.password.not.valid=* 5-50个字符
user.email.not.valid=邮箱格式错误
user.mobile.phone.number.not.valid=手机号格式错误
user.login.success=登录成功
user.notfound=请重新登录
user.forcelogout=管理员强制退出,请重新登录
user.unknown.error=未知错误,请重新登录
##文件上传消息
upload.exceed.maxSize=上传的文件大小超出限制的文件大小!<br/>允许的文件最大大小是:{0}MB!
upload.filename.exceed.length=上传的文件名最长{0}个字符
##权限
no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志文件名 -->
<property name="LOG_FILE" value="yunze-admin" />
<!-- 日志文件路径 -->
<property name="LOG_PATH" value="mnt/yunze/logs/yunze-admin" />
<!-- 控制台日志输出格式 -->
<property name="LOG_PATTERN_CONSOLE" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} --> %msg%n" />
<!-- 文件日志输出格式 -->
<property name="LOG_PATTERN_FILE" value="%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} --> %msg%n" />
<!--- 设置控制台日志 -->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
<encoder>
<pattern>${LOG_PATTERN_CONSOLE}</pattern>
</encoder>
</appender>
<!-- 设置日志文件 -->
<appender name="fileLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
<encoder>
<pattern>${LOG_PATTERN_FILE}</pattern>
</encoder>
<!-- 总文件日志 -->
<file>${LOG_PATH}/${LOG_FILE}/${LOG_FILE}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天的文件日志 -->
<fileNamePattern>${LOG_PATH}/${LOG_FILE}/${LOG_FILE}-%d{yyyy-MM-dd}.log</fileNamePattern>
<!-- 日志文件保存 60 天,超过 60 天的自动删除 -->
<maxHistory>60</maxHistory>
</rollingPolicy>
</appender>
<!-- 设置日志级别,及需要记录日志的类 -->
<root level="INFO">
<appender-ref ref="consoleLog" />
<appender-ref ref="fileLog" />
</root>
</configuration>
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="cacheEnabled" value="true" /> <!-- 全局映射器启用缓存 -->
<setting name="useGeneratedKeys" value="true" /> <!-- 允许 JDBC 支持自动生成主键 -->
<setting name="defaultExecutorType" value="REUSE" /> <!-- 配置默认的执行器 -->
<setting name="logImpl" value="SLF4J" /> <!-- 指定 MyBatis 所用日志的具体实现 -->
<!-- <setting name="mapUnderscoreToCamelCase" value="true"/> 驼峰式命名 -->
</settings>
</configuration>
+164
View File
@@ -0,0 +1,164 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Spring" name="Spring">
<configuration />
</facet>
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-devtools:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.19" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.21" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.21" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.5" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.9.2" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.22" level="project" />
<orderEntry type="module" module-name="yunze-framework" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.41" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.41" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.41" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.22.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.8" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.8" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
<orderEntry type="library" name="Maven: com.github.penggle:kaptcha:2.3.2" level="project" />
<orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235-1" level="project" />
<orderEntry type="library" name="Maven: com.github.oshi:oshi-core:5.6.0" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna:5.7.0" level="project" />
<orderEntry type="library" name="Maven: net.java.dev.jna:jna-platform:5.7.0" level="project" />
<orderEntry type="module" module-name="yunze-system" />
<orderEntry type="module" module-name="yunze-quartz" />
<orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.2" level="project" />
<orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.15" level="project" />
<orderEntry type="module" module-name="yunze-common" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.2.0" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.7" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.3.0" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.2.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.2" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.5.1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.76" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.58.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
<orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.21" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.14" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
<orderEntry type="library" name="Maven: org.json:json:20171018" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.2.13.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.12.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.2.14.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.7.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.2.14.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-csv:1.8" level="project" />
<orderEntry type="library" name="Maven: net.sourceforge.javacsv:javacsv:2.0" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.16" level="project" />
<orderEntry type="library" name="Maven: javax.mail:mail:1.5.0-b01" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
<orderEntry type="library" name="Maven: com.yunze:yunze-apiCommon:0.5.0" level="project" />
<orderEntry type="library" name="Maven: com.cu:api:2" level="project" />
<orderEntry type="module" module-name="yunze-generator" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
</component>
</module>
+207
View File
@@ -0,0 +1,207 @@
<?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>
<artifactId>yunze</artifactId>
<groupId>com.yunze</groupId>
<version>0.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yunze-common</artifactId>
<description>
common通用工具
</description>
<dependencies>
<!-- Spring框架基本的核心工具 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<!-- SpringWeb模块 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<!-- spring security 安全认证 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
</dependency>
<!-- 自定义验证注解 -->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!-- JSON工具类 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!-- 文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<!-- yml解析器 -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</dependency>
<!--Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
</dependency>
<!-- redis 缓存操作 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- pool 对象池 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
</dependency>
<!-- servlet包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<!-- http -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20171018</version>
</dependency>
<!-- 添加springboot对amqp的支持 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
</dependency>
<dependency>
<groupId>net.sourceforge.javacsv</groupId>
<artifactId>javacsv</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.mail/mail -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.5.0-b01</version>
</dependency>
<dependency>
<groupId>com.yunze</groupId>
<artifactId>yunze-apiCommon</artifactId>
<version>0.5.0</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,36 @@
package com.yunze.common.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 数据权限过滤注解
*
* @author yunze
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataScope
{
/**
* 部门表的别名
*/
public String deptAlias() default "";
/**
* 用户表的别名
*/
public String userAlias() default "";
/**
* 参数是否为Map 类型
*/
public boolean isMap() default false;
}
@@ -0,0 +1,28 @@
package com.yunze.common.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.yunze.common.enums.DataSourceType;
/**
* 自定义多数据源切换注解
*
* 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准
*
* @author yunze
*/
@Target({ ElementType.METHOD, ElementType.TYPE })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface DataSource
{
/**
* 切换数据源名称
*/
public DataSourceType value() default DataSourceType.MASTER;
}
@@ -0,0 +1,165 @@
package com.yunze.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.math.BigDecimal;
/**
* 自定义导出Excel数据注解
*
* @author yunze
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Excel
{
/**
* 导出时在excel中排序
*/
public int sort() default Integer.MAX_VALUE;
/**
* 导出到Excel中的名字.
*/
public String name() default "";
/**
* 日期格式, 如: yyyy-MM-dd
*/
public String dateFormat() default "";
/**
* 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
*/
public String dictType() default "";
/**
* 读取内容转表达式 (如: 0=男,1=女,2=未知)
*/
public String readConverterExp() default "";
/**
* 分隔符,读取字符串组内容
*/
public String separator() default ",";
/**
* BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化)
*/
public int scale() default -1;
/**
* BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN
*/
public int roundingMode() default BigDecimal.ROUND_HALF_EVEN;
/**
* 导出类型(0数字 1字符串)
*/
public ColumnType cellType() default ColumnType.STRING;
/**
* 导出时在excel中每个列的高度 单位为字符
*/
public double height() default 14;
/**
* 导出时在excel中每个列的宽 单位为字符
*/
public double width() default 16;
/**
* 文字后缀,如% 90 变成90%
*/
public String suffix() default "";
/**
* 当值为空时,字段的默认值
*/
public String defaultValue() default "";
/**
* 提示信息
*/
public String prompt() default "";
/**
* 设置只能选择不能输入的列内容.
*/
public String[] combo() default {};
/**
* 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写.
*/
public boolean isExport() default true;
/**
* 另一个类中的属性名称,支持多级获取,以小数点隔开
*/
public String targetAttr() default "";
/**
* 是否自动统计数据,在最后追加一行统计数据总和
*/
public boolean isStatistics() default false;
/**
* 导出字段对齐方式(0:默认;1:靠左;2:居中;3:靠右)
*/
Align align() default Align.AUTO;
public enum Align
{
AUTO(0), LEFT(1), CENTER(2), RIGHT(3);
private final int value;
Align(int value)
{
this.value = value;
}
public int value()
{
return this.value;
}
}
/**
* 字段类型(0:导出导入;1:仅导出;2:仅导入)
*/
Type type() default Type.ALL;
public enum Type
{
ALL(0), EXPORT(1), IMPORT(2);
private final int value;
Type(int value)
{
this.value = value;
}
public int value()
{
return this.value;
}
}
public enum ColumnType
{
NUMERIC(0), STRING(1), IMAGE(2);
private final int value;
ColumnType(int value)
{
this.value = value;
}
public int value()
{
return this.value;
}
}
}
@@ -0,0 +1,18 @@
package com.yunze.common.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Excel注解集
*
* @author yunze
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Excels
{
Excel[] value();
}
@@ -0,0 +1,41 @@
package com.yunze.common.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import com.yunze.common.enums.BusinessType;
import com.yunze.common.enums.OperatorType;
/**
* 自定义操作日志记录注解
*
* @author yunze
*
*/
@Target({ ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface Log
{
/**
* 模块
*/
public String title() default "";
/**
* 功能
*/
public BusinessType businessType() default BusinessType.OTHER;
/**
* 操作人类别
*/
public OperatorType operatorType() default OperatorType.MANAGE;
/**
* 是否保存请求的参数
*/
public boolean isSaveRequestData() default true;
}
@@ -0,0 +1,23 @@
package com.yunze.common.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 自定义注解防止表单重复提交
*
* @author yunze
*
*/
@Inherited
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RepeatSubmit
{
}
@@ -0,0 +1,160 @@
package com.yunze.common.config;
import com.yunze.apiCommon.config.RedisUtil;
import com.yunze.common.mapper.yunze.YzCardMapper;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* 字典类
* @Auther: zhang feng
* @Date: 2021/09/14/13:44
* @Description:
*/
@Component
public class MyDictionary {
@Resource
private RedisUtil redisUtil;
@Resource
private YzCardMapper yzCardMapper;
/**
* 获取字典数据
*
* @param dict_type
* @param dict_value
* @return
*/
public String getdictLabel(String dict_type, String dict_value) {
Map<String, Object> findDict = new HashMap<>();
findDict.put("dict_type", dict_type);
String dict_label = null;
List<Map<String, Object>> dict_dataArr = getDictDataArr(dict_type);
try {
Map<String, Object> KMap = getKey(dict_dataArr, dict_value);
dict_label = KMap.get("dict_label").toString();
} catch (Exception e) {
System.out.println("{getdictLabel 异常}" + e.getMessage());
}
return dict_label;
}
/**
* 获取字典数据 key
*
* @param dict_type
* @param dict_label
* @return
*/
public String getdictValue(String dict_type, String dict_label) {
Map<String, Object> findDict = new HashMap<>();
findDict.put("dict_type", dict_type);
String dict_value = null;
List<Map<String, Object>> dict_dataArr = getDictDataArr(dict_type);
try {
Map<String, Object> KMap = getVal(dict_dataArr, dict_label);
dict_value = KMap.get("dict_value").toString();
} catch (Exception e) {
System.out.println("{getdictValue 异常}" + e.getMessage());
}
return dict_value;
}
/**
* 获取字典 数组
* @param dict_type
* @return
*/
public List<Map<String, Object>> getDictDataArr(String dict_type) {
Map<String, Object> findDict = new HashMap<>();
findDict.put("dict_type", dict_type);
List<Map<String, Object>> dict_dataArr = null;
try {
Object obj = redisUtil.redisTemplate.opsForValue().get(dict_type);
if (obj != null) {
dict_dataArr = (List<Map<String, Object>>) obj;
if (dict_dataArr != null && dict_dataArr.size() > 0) {
} else {
dict_dataArr = yzCardMapper.findDict(findDict);
}
} else {
dict_dataArr = yzCardMapper.findDict(findDict);
if (dict_dataArr != null && dict_dataArr.size() > 0) {
redisUtil.redisTemplate.opsForValue().set(dict_type, dict_dataArr, 60 * 6 , TimeUnit.MINUTES);
}
}
} catch (Exception e) {
System.out.println("{getDictDataArr 异常}" + e.getMessage());
}
return dict_dataArr;
}
/**
* 获取list map 对应数据
* @param dict_dataArr
* @param dict_value
* @return
*/
public Map<String, Object> getKey(List<Map<String, Object>> dict_dataArr, String dict_value) {
if (dict_dataArr != null && dict_dataArr.size() > 0) {
for (int i = 0; i < dict_dataArr.size(); i++) {
Map<String, Object> obj = dict_dataArr.get(i);
if (obj != null && obj.get("dict_value") != null) {
if (obj.get("dict_value").toString().equals(dict_value)) {
return obj;
}
}
}
} else {
return null;
}
return null;
}
/**
* 获取list map 对应数据
* @param dict_dataArr
* @param dict_label
* @return
*/
public Map<String, Object> getVal(List<Map<String, Object>> dict_dataArr, String dict_label) {
if (dict_dataArr != null && dict_dataArr.size() > 0) {
for (int i = 0; i < dict_dataArr.size(); i++) {
Map<String, Object> obj = dict_dataArr.get(i);
if (obj != null && obj.get("dict_label") != null) {
if (obj.get("dict_label").toString().equals(dict_label)) {
return obj;
}
}
}
} else {
return null;
}
return null;
}
}
@@ -0,0 +1,201 @@
package com.yunze.common.config;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.BuiltinExchangeType;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.connection.Connection;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeoutException;
@Component
public class RabbitMQConfig {
public Connection connection ;
@Resource
private RabbitTemplate rabbitTemplate;
// org.springframework.amqp.rabbit.connection.CachingConnectionFactory$ChannelCachingConnectionProxy cannot be cast to com.rabbitmq.client.Connection
public Integer getCount(String EXCHANGE_NAME,String queue,String Key,String Type) throws IOException {
Integer queueCount = null;
ConnectionFactory connectionFactory = rabbitTemplate.getConnectionFactory();
try {
connection = connectionFactory.createConnection();
Channel channel = connection.createChannel(false);
// 通道关联交换机
channel.exchangeDeclare(EXCHANGE_NAME, Type);
AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queue);//直连交换机类型
//获取队列中的消息个数
queueCount = declareOk.getMessageCount();
channel.close();
}catch (Exception e){
System.out.println("==================================================================== creatExchangeQueue connection.getCount() [Start] ====================================================================");
System.out.println(e.getMessage());
System.out.println("==================================================================== creatExchangeQueue connection.getCount() [End] ====================================================================");
}
finally {
connection.close();
connection = null;
}
return queueCount;
}
/**
* 创建 队列绑定 路由器
* @param exchangeName
* @param queueName
* @param routingKey
* @param del_exchangeName
* @param del_queueName
* @param del_routingKey
* @param type 交换机类型
* @throws IOException
*/
public void creatExchangeQueue(String exchangeName, String queueName, String routingKey, String del_exchangeName, String del_queueName, String del_routingKey, BuiltinExchangeType type) throws IOException {
Channel channel = null;
com.rabbitmq.client.Connection connection = null;
try {
connection = connection!=null ?connection:RabbitMQConnection.getConnection();
////connection = RabbitMQConnection.getConnection();
}catch (Exception e){
System.out.println("==================================================================== creatExchangeQueue connection.getConnection() [Start] ====================================================================");
System.out.println(e.getMessage());
System.out.println("==================================================================== creatExchangeQueue connection.getConnection() [End] ====================================================================");
connection = RabbitMQConnection.getConnection();
}
try {
channel = connection.createChannel();
type = type!=null?type:BuiltinExchangeType.DIRECT;
}catch (Exception e){
System.out.println("==================================================================== creatExchangeQueue connection.createChannel() [Start] ====================================================================");
System.out.println(e.getMessage());
System.out.println("==================================================================== creatExchangeQueue connection.createChannel() [End] ====================================================================");
connection = RabbitMQConnection.getConnection();
channel = connection.createChannel();
}
// 首先声明一个Exchange
// String exchangeName = "JFK airport";
// String queueName = "New York city";
try {
AMQP.Exchange.DeclareOk exchangeDeclare = channel.exchangeDeclare(exchangeName,type );//直连交换机类型
}catch (IOException e){
System.out.println("以存在交换机"+exchangeName);
channel = connection.createChannel();//操作异常时 会断开本次连接 ,这里进行重连
}
if(del_exchangeName!=null){
try {
AMQP.Exchange.DeclareOk del_exchangeDeclare = channel.exchangeDeclare(del_exchangeName, type);//直连交换机类型
}catch (IOException e){
System.out.println("以存在死信交换机"+del_exchangeName);
channel = connection.createChannel();
}
}
//System.out.println(exchangeDeclare);
// 然后创建一个Queue
if(del_exchangeName!=null && del_queueName!=null && del_routingKey!=null ){
//创建死信队列 绑定到 信交换机
try {
com.rabbitmq.client.AMQP.Queue.DeclareOk del_queueDeclare = channel.queueDeclare(del_queueName, true, false, false,null);
com.rabbitmq.client.AMQP.Queue.BindOk del_queueBind = channel.queueBind(del_queueName, del_exchangeName, del_routingKey);
}catch (IOException e){
System.out.println("以存在死信 队列"+del_queueName);
channel = connection.createChannel();
}
}
try {
// 队列绑定 死信交换机 队列
if(del_exchangeName!=null && del_queueName!=null && del_routingKey!=null ){
Map<String, Object> arguments = new HashMap<>(2);
arguments.put("x-dead-letter-exchange", del_exchangeName);
arguments.put("x-dead-letter-routing-key", del_routingKey);
com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclare = channel.queueDeclare(queueName, true, false, false,arguments);
//这个才是将queue绑定到exchange上面,注意这里的routingKey不能为null
com.rabbitmq.client.AMQP.Queue.BindOk queueBind = channel.queueBind(queueName, exchangeName, routingKey);
}else{
com.rabbitmq.client.AMQP.Queue.DeclareOk queueDeclare = channel.queueDeclare(queueName, true, false, false,null);
com.rabbitmq.client.AMQP.Queue.BindOk queueBind = channel.queueBind(queueName, exchangeName, routingKey);
}
}catch (IOException e){
System.out.println("以存在 队列"+del_queueName);
channel = connection.createChannel();
}
//String queue = queueDeclare.getQueue();
//int messageCount = queueDeclare.getMessageCount();
//int consumerCount = queueDeclare.getConsumerCount();
//System.out.println("队列名称=" + queueName + ",当前队列的消息数量=" + messageCount + ",当前队列的消费者数量=" + consumerCount);
// 最后通过Bindings方式将Exchange 绑定到Queue上面
// 使用Exchange 绑定到Queue上面,destination 目的地,source来源第,routingKey 路由键null
//BindOk exchangeBind = channel.exchangeBind(exchangeName, queue, "");// 绑定一个exchange到另外一个exchange
//System.out.println(queueBind);
finally {
connection.close();
connection = null;
}
}
/**
* 获取连接 对象
* @return
*/
public Connection getConnection(){
try {
ConnectionFactory connectionFactory = rabbitTemplate.getConnectionFactory();
connection = connectionFactory.createConnection();
}catch (Exception e){
System.out.println("getConnection Exception "+e.getMessage());
}
return connection;
}
/**
* 手动发送消息
* @param EXCHANGE_NAME 交换机
* @param queue 队列
* @param Key 网线
* @param Type 交换机类型
* @param msg 发送消息
* @throws IOException
* @throws TimeoutException
*/
public void send(String EXCHANGE_NAME,String queue,String Key,String Type,String msg) throws IOException, TimeoutException {
// 创建Channel
ConnectionFactory connectionFactory = rabbitTemplate.getConnectionFactory();
connection = connectionFactory.createConnection();
try {
BindingBuilder.bind(new Queue(queue)).to(new DirectExchange(EXCHANGE_NAME)).with(Key);// 队列 绑定 交换机
Channel channel = connection.createChannel(false);
// 通道关联交换机
channel.exchangeDeclare(EXCHANGE_NAME, Type, true);
channel.basicPublish(EXCHANGE_NAME, Key, null, msg.getBytes("utf-8"));
channel.close();
} catch (Exception e) {
System.out.println("==================================================================== creatExchangeQueue connection.createChannel() [Start] ====================================================================");
System.out.println(e.getMessage());
System.out.println("==================================================================== creatExchangeQueue connection.createChannel() [End] ====================================================================");
} finally {
connection.close();
connection = null;
}
}
}
@@ -0,0 +1,80 @@
package com.yunze.common.config;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import java.io.IOException;
import java.util.concurrent.TimeoutException;
/**
* @ClassName RabbitMQConnection
* @Version V1.0
**/
public class RabbitMQConnection {
/**
* 创建连接
*
* @return
*/
public static Connection getConnection() {
int Reconnection = 10;//重连次数
int current = 1;//当前次数
try {
Connection con = CreateConnection();
if(con!=null){
return con;
}else{
for (int i = 0; i < Reconnection; i++) {
System.out.println("======================= RabbitMQConnection getConnection [重连次数("+current+"] ======================= ");
con = CreateConnection();
current +=1;
if(con!=null){
break;
}
}
}
if(con==null){
System.out.println("重连次数("+current+"con 还是 null ");
}
return con;
}catch (Exception e){
System.out.println("=============================[Connection getConnection() Exception 【Start】 ]==========================================");
System.out.println(e.getMessage());
System.out.println("=============================[Connection getConnection() Exception 【End】 ]==========================================");
return null;
}
}
/**
* 创建连接
* @return
*/
public static Connection CreateConnection() {
try {
//1.创建connectionFactory
ConnectionFactory connectionFactory = new ConnectionFactory();
//2.配置Host
connectionFactory.setHost("127.0.0.1");
//3.设置Port
connectionFactory.setPort(5672);
connectionFactory.setRequestedHeartbeat( 40 );
//4.设置账户和密码
connectionFactory.setUsername("YunZeIotRabbitMq");
connectionFactory.setPassword("20220107@yzIot");
//5.设置VirtualHost
connectionFactory.setVirtualHost("/VirtualHosts");
return connectionFactory.newConnection();
}catch (Exception e){
System.out.println("=============================[Connection CreateConnection() Exception 【Start】 ]==========================================");
System.out.println(e.getMessage());
System.out.println("=============================[Connection CreateConnection() Exception 【End】 ]==========================================");
return null;
}
}
}
@@ -0,0 +1,116 @@
package com.yunze.common.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 读取项目相关配置
*
* @author yunze
*/
@Component
@ConfigurationProperties(prefix = "yunze")
public class YunZeConfig
{
/** 项目名称 */
private String name;
/** 版本 */
private String version;
/** 版权年份 */
private String copyrightYear;
/** 实例演示开关 */
private boolean demoEnabled;
/** 上传路径 */
private static String profile;
/** 获取地址开关 */
private static boolean addressEnabled;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getVersion()
{
return version;
}
public void setVersion(String version)
{
this.version = version;
}
public String getCopyrightYear()
{
return copyrightYear;
}
public void setCopyrightYear(String copyrightYear)
{
this.copyrightYear = copyrightYear;
}
public boolean isDemoEnabled()
{
return demoEnabled;
}
public void setDemoEnabled(boolean demoEnabled)
{
this.demoEnabled = demoEnabled;
}
public static String getProfile()
{
return profile;
}
public void setProfile(String profile)
{
YunZeConfig.profile = profile;
}
public static boolean isAddressEnabled()
{
return addressEnabled;
}
public void setAddressEnabled(boolean addressEnabled)
{
YunZeConfig.addressEnabled = addressEnabled;
}
/**
* 获取头像上传路径
*/
public static String getAvatarPath()
{
return getProfile() + "/avatar";
}
/**
* 获取下载路径
*/
public static String getDownloadPath()
{
return getProfile() + "/download/";
}
/**
* 获取上传路径
*/
public static String getUploadPath()
{
return getProfile() + "/upload";
}
}
@@ -0,0 +1,129 @@
package com.yunze.common.constant;
/**
* 通用常量信息
*
* @author yunze
*/
public class Constants
{
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* GBK 字符集
*/
public static final String GBK = "GBK";
/**
* http请求
*/
public static final String HTTP = "http://";
/**
* https请求
*/
public static final String HTTPS = "https://";
/**
* 通用成功标识
*/
public static final String SUCCESS = "0";
/**
* 通用失败标识
*/
public static final String FAIL = "1";
/**
* 登录成功
*/
public static final String LOGIN_SUCCESS = "Success";
/**
* 注销
*/
public static final String LOGOUT = "Logout";
/**
* 登录失败
*/
public static final String LOGIN_FAIL = "Error";
/**
* 验证码 redis key
*/
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
/**
* 登录用户 redis key
*/
public static final String LOGIN_TOKEN_KEY = "login_tokens:";
/**
* 防重提交 redis key
*/
public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";
/**
* 验证码有效期(分钟)
*/
public static final Integer CAPTCHA_EXPIRATION = 2;
/**
* 令牌
*/
public static final String TOKEN = "token";
/**
* 令牌前缀
*/
public static final String TOKEN_PREFIX = "Bearer ";
/**
* 令牌前缀
*/
public static final String LOGIN_USER_KEY = "login_user_key";
/**
* 用户ID
*/
public static final String JWT_USERID = "userid";
/**
* 用户名称
*/
public static final String JWT_USERNAME = "sub";
/**
* 用户头像
*/
public static final String JWT_AVATAR = "avatar";
/**
* 创建时间
*/
public static final String JWT_CREATED = "created";
/**
* 用户权限
*/
public static final String JWT_AUTHORITIES = "authorities";
/**
* 参数管理 cache key
*/
public static final String SYS_CONFIG_KEY = "sys_config:";
/**
* 字典管理 cache key
*/
public static final String SYS_DICT_KEY = "sys_dict:";
/**
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
}
@@ -0,0 +1,114 @@
package com.yunze.common.constant;
/**
* 代码生成通用常量
*
* @author yunze
*/
public class GenConstants
{
/** 单表(增删改查) */
public static final String TPL_CRUD = "crud";
/** 树表(增删改查) */
public static final String TPL_TREE = "tree";
/** 主子表(增删改查) */
public static final String TPL_SUB = "sub";
/** 树编码字段 */
public static final String TREE_CODE = "treeCode";
/** 树父编码字段 */
public static final String TREE_PARENT_CODE = "treeParentCode";
/** 树名称字段 */
public static final String TREE_NAME = "treeName";
/** 上级菜单ID字段 */
public static final String PARENT_MENU_ID = "parentMenuId";
/** 上级菜单名称字段 */
public static final String PARENT_MENU_NAME = "parentMenuName";
/** 数据库字符串类型 */
public static final String[] COLUMNTYPE_STR = { "char", "varchar", "nvarchar", "varchar2" };
/** 数据库文本类型 */
public static final String[] COLUMNTYPE_TEXT = { "tinytext", "text", "mediumtext", "longtext" };
/** 数据库时间类型 */
public static final String[] COLUMNTYPE_TIME = { "datetime", "time", "date", "timestamp" };
/** 数据库数字类型 */
public static final String[] COLUMNTYPE_NUMBER = { "tinyint", "smallint", "mediumint", "int", "number", "integer",
"bit", "bigint", "float", "double", "decimal" };
/** 页面不需要编辑字段 */
public static final String[] COLUMNNAME_NOT_EDIT = { "id", "create_by", "create_time", "del_flag" };
/** 页面不需要显示的列表字段 */
public static final String[] COLUMNNAME_NOT_LIST = { "id", "create_by", "create_time", "del_flag", "update_by",
"update_time" };
/** 页面不需要查询字段 */
public static final String[] COLUMNNAME_NOT_QUERY = { "id", "create_by", "create_time", "del_flag", "update_by",
"update_time", "remark" };
/** Entity基类字段 */
public static final String[] BASE_ENTITY = { "createBy", "createTime", "updateBy", "updateTime", "remark" };
/** Tree基类字段 */
public static final String[] TREE_ENTITY = { "parentName", "parentId", "orderNum", "ancestors", "children" };
/** 文本框 */
public static final String HTML_INPUT = "input";
/** 文本域 */
public static final String HTML_TEXTAREA = "textarea";
/** 下拉框 */
public static final String HTML_SELECT = "select";
/** 单选框 */
public static final String HTML_RADIO = "radio";
/** 复选框 */
public static final String HTML_CHECKBOX = "checkbox";
/** 日期控件 */
public static final String HTML_DATETIME = "datetime";
/** 图片上传控件 */
public static final String HTML_IMAGE_UPLOAD = "imageUpload";
/** 文件上传控件 */
public static final String HTML_FILE_UPLOAD = "fileUpload";
/** 富文本控件 */
public static final String HTML_EDITOR = "editor";
/** 字符串类型 */
public static final String TYPE_STRING = "String";
/** 整型 */
public static final String TYPE_INTEGER = "Integer";
/** 长整型 */
public static final String TYPE_LONG = "Long";
/** 浮点型 */
public static final String TYPE_DOUBLE = "Double";
/** 高精度计算类型 */
public static final String TYPE_BIGDECIMAL = "BigDecimal";
/** 时间类型 */
public static final String TYPE_DATE = "Date";
/** 模糊查询 */
public static final String QUERY_LIKE = "LIKE";
/** 需要 */
public static final String REQUIRE = "1";
}
@@ -0,0 +1,89 @@
package com.yunze.common.constant;
/**
* 返回状态码
*
* @author yunze
*/
public class HttpStatus
{
/**
* 操作成功
*/
public static final int SUCCESS = 200;
/**
* 对象创建成功
*/
public static final int CREATED = 201;
/**
* 请求已经被接受
*/
public static final int ACCEPTED = 202;
/**
* 操作已经执行成功,但是没有返回数据
*/
public static final int NO_CONTENT = 204;
/**
* 资源已被移除
*/
public static final int MOVED_PERM = 301;
/**
* 重定向
*/
public static final int SEE_OTHER = 303;
/**
* 资源没有被修改
*/
public static final int NOT_MODIFIED = 304;
/**
* 参数列表错误(缺少,格式不匹配)
*/
public static final int BAD_REQUEST = 400;
/**
* 未授权
*/
public static final int UNAUTHORIZED = 401;
/**
* 访问受限,授权过期
*/
public static final int FORBIDDEN = 403;
/**
* 资源,服务未找到
*/
public static final int NOT_FOUND = 404;
/**
* 不允许的http方法
*/
public static final int BAD_METHOD = 405;
/**
* 资源冲突,或者资源被锁
*/
public static final int CONFLICT = 409;
/**
* 不支持的数据,媒体类型
*/
public static final int UNSUPPORTED_TYPE = 415;
/**
* 系统内部错误
*/
public static final int ERROR = 500;
/**
* 接口未实现
*/
public static final int NOT_IMPLEMENTED = 501;
}
@@ -0,0 +1,50 @@
package com.yunze.common.constant;
/**
* 任务调度通用常量
*
* @author yunze
*/
public class ScheduleConstants
{
public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME";
/** 执行目标key */
public static final String TASK_PROPERTIES = "TASK_PROPERTIES";
/** 默认 */
public static final String MISFIRE_DEFAULT = "0";
/** 立即触发执行 */
public static final String MISFIRE_IGNORE_MISFIRES = "1";
/** 触发一次执行 */
public static final String MISFIRE_FIRE_AND_PROCEED = "2";
/** 不触发立即执行 */
public static final String MISFIRE_DO_NOTHING = "3";
public enum Status
{
/**
* 正常
*/
NORMAL("0"),
/**
* 暂停
*/
PAUSE("1");
private String value;
private Status(String value)
{
this.value = value;
}
public String getValue()
{
return value;
}
}
}
@@ -0,0 +1,63 @@
package com.yunze.common.constant;
/**
* 用户常量信息
*
* @author yunze
*/
public class UserConstants
{
/**
* 平台内系统用户的唯一标志
*/
public static final String SYS_USER = "SYS_USER";
/** 正常状态 */
public static final String NORMAL = "0";
/** 异常状态 */
public static final String EXCEPTION = "1";
/** 用户封禁状态 */
public static final String USER_DISABLE = "1";
/** 角色封禁状态 */
public static final String ROLE_DISABLE = "1";
/** 部门正常状态 */
public static final String DEPT_NORMAL = "0";
/** 部门停用状态 */
public static final String DEPT_DISABLE = "1";
/** 字典正常状态 */
public static final String DICT_NORMAL = "0";
/** 是否为系统默认(是) */
public static final String YES = "Y";
/** 是否菜单外链(是) */
public static final String YES_FRAME = "0";
/** 是否菜单外链(否) */
public static final String NO_FRAME = "1";
/** 菜单类型(目录) */
public static final String TYPE_DIR = "M";
/** 菜单类型(菜单) */
public static final String TYPE_MENU = "C";
/** 菜单类型(按钮) */
public static final String TYPE_BUTTON = "F";
/** Layout组件标识 */
public final static String LAYOUT = "Layout";
/** ParentView组件标识 */
public final static String PARENT_VIEW = "ParentView";
/** 校验返回结果码 */
public final static String UNIQUE = "0";
public final static String NOT_UNIQUE = "1";
}
@@ -0,0 +1,300 @@
package com.yunze.common.core.card;
import com.alibaba.fastjson.JSON;
import com.rabbitmq.client.BuiltinExchangeType;
import com.yunze.common.config.RabbitMQConfig;
import com.yunze.common.mapper.yunze.YzCardFlowMapper;
import com.yunze.common.mapper.yunze.YzCardMapper;
import com.yunze.common.mapper.yunze.YzOrderMapper;
import com.yunze.common.utils.Arith;
import com.yunze.common.utils.yunze.VeDate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.lang.reflect.Array;
import java.text.ParseException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Auther: zhang feng
* @Date: 2021/08/03/16:22
* @Description:
*/
@Component
public class AddPacket {
@Resource
private YzOrderMapper yzOrderMapper;
@Resource
private YzCardFlowMapper yzCardFlowMapper;
@Resource
private YzCardMapper yzCardMapper;
@Resource
private RabbitMQConfig rabbitMQConfig;
@Resource
private RabbitTemplate rabbitTemplate;
/**
* 直接添加folw 表 不生成订单
* @param ord_no
* @param iccid
* @param add_parameter
* @return
*/
public Map<String,Object> addFlow(String ord_no,String iccid,Map<String,Object> add_parameter, String validate_type,String create_time,String activate_date){
//1.查询 需要加包 订单号 与卡号是否已经在数据库中 如果已经在库中 不执行操作
Map<String,Object> R_Map = new HashMap<>();
Map<String,Object> findExistence_Map = new HashMap<>();
findExistence_Map.put("ord_no",ord_no);
findExistence_Map.put("iccid",iccid);
Integer Existence = yzCardFlowMapper.findExistence(findExistence_Map);
Existence =Existence!=null?Existence:0;
String code = "200",message = "批量加包成功";
//2.加包
if(Existence==0){
try {
//加包执行flow
Map<String,Object> SaveFlowExecuteMap = SaveFlowExecute(add_parameter,validate_type,create_time,ord_no,activate_date,iccid);
if(SaveFlowExecuteMap.get("SuccessCount")!=null){
int SuccessCount = Integer.parseInt(SaveFlowExecuteMap.get("SuccessCount").toString());
String info = "";
if(SaveFlowExecuteMap.get("Message")!=null){
info = SaveFlowExecuteMap.get("Message").toString();
}else {
info = SuccessCount>0?"执行加包成功 条数【"+SuccessCount+"":"执行加包失败【】";
}
info = info.length()>1500?info.substring(0,1500):info;//切割多余的 错误信息
//3.插入flow成功后 变更 订单状态
Map<String,Object> updAddPackageInfo_Map = new HashMap<>();
updAddPackageInfo_Map.put("iccid",iccid);
updAddPackageInfo_Map.put("ord_no",ord_no);
updAddPackageInfo_Map.put("info",info);
int updOrder = yzOrderMapper.updAddPackageInfo(updAddPackageInfo_Map);
System.out.println("变更订单执行加包 执行 状态 "+updOrder);
}
}catch (Exception e){
System.out.println("加包执行 【SaveFlowExecute】 异常 " +e.getMessage());
}
}else{
code = "201";
message = "资费计划以存在";
}
R_Map.put("code",code);
R_Map.put("message",message);
return R_Map;
}
/**
* 加包执行flow
* @param add_parameter
* @param validate_type
* @param create_time
* @param ord_no
* @param activate_date
* @param iccid
* @return
*/
public Map<String,Object> SaveFlowExecute(Map<String,Object> add_parameter, String validate_type,String create_time,String ord_no,String activate_date,String iccid){
Map<String,Object> R_Map = new HashMap<>();
String Message = "";
List<Map<String,Object>> add_flow = new ArrayList<Map<String,Object>>();
String start_time = "",end_time = "";
int Size = 1;
int SuccessCount = 0;
//sdate = sdate.substring(0, 8) + "01";
Integer is_month = Integer.parseInt(add_parameter.get("is_month").toString());//是否拆分 0 否 1 是
boolean monthBool = is_month==1?true:false;
Integer packet_valid_time = Integer.parseInt(add_parameter.get("packet_valid_time").toString());//加包 时间规格值
String packet_valid_name = add_parameter.get("packet_valid_name").toString();//加包 时间规格
//0. 根据 是否拆分 到账 获取加包 条数
if(monthBool){
Size = packet_valid_time;
}
List<Map<String,Object>> AddFlow = null;
Map<String,Object> setFlow =null;//加包设置数据
if(Size>0){
//1.判断加包类型 1 当月生效 2 次月生效 3 周期延顺 4 激活生效 获取 订单创建时间
int validate_type_int = Integer.parseInt(validate_type);
Map<String,Object> Pmap = new HashMap<String,Object>();
Pmap.put("iccid",iccid);
try {
switch (validate_type_int){
case 1://1 当月生效
start_time = create_time;
break;
case 2:
start_time = VeDate.getFirstDayOfGivenMonth(VeDate.getMonthDate(create_time,1),"yyyy-MM-dd")+" 00:00:00";
break;
case 3:
//查询最后一个包的到期时间 +1
String eTime = yzCardFlowMapper.findEndTime(Pmap);
if(eTime!=null){
start_time = VeDate.getNextSecond(eTime,1);
}else{
start_time = create_time;
}
break;
case 4:
//激活时间为空时查询激活时间
if(activate_date==null){
String ActivateDate = yzCardMapper.findActivateDate(Pmap);
start_time = ActivateDate;
}else{
start_time = VeDate.dateToStrLong(VeDate.strToDate(activate_date));
}
break;
}
}catch (Exception e){
Message ="加包 设置 开始时间异常 "+e.getMessage();
System.out.println(Message);
}
if(start_time!=null && start_time.length()>0){
try {
setFlow = setFlow(monthBool,add_parameter,packet_valid_time,packet_valid_name,start_time,Size,ord_no,iccid);
if(setFlow.get("Rlist")!=null){
AddFlow = (List<Map<String, Object>>) setFlow.get("Rlist");
}
}catch (Exception e){
Message = "【 获取 加包 flwo setFlow 异常 】"+e.getMessage();
System.out.println(Message);
}
try {
//同步主表数据 如果开始 时间 和 当前 月 时间 一致 剩余用量 += 包用量
String Ym = start_time.substring(0,7);
String yearM = VeDate.getStringDateShort().substring(0,7);
if(yearM.equals(Ym)){
Map<String,Object> addInfoRemaining_Map = new HashMap<>();
addInfoRemaining_Map.put("flow",add_parameter.get("packet_flow"));
addInfoRemaining_Map.put("iccid",iccid);
//1.创建路由 绑定 生产队列 发送消息
String card_exchangeName = "admin_card_exchange", card_queueName = "admin_CardUpd_queue", card_routingKey = "admin.CardUpd.queue",
card_del_exchangeName = "dlx_"+card_exchangeName,card_del_queueName = "dlx_"+card_queueName, card_del_routingKey = "dlx_"+card_routingKey;
try {
rabbitMQConfig.creatExchangeQueue(card_exchangeName, card_queueName, card_routingKey, card_del_exchangeName, card_del_queueName, card_del_routingKey,null);
addInfoRemaining_Map.put("queueTypeName","admin_CardAddInfoRemaining_queue");
rabbitTemplate.convertAndSend(card_exchangeName, card_routingKey, JSON.toJSONString(addInfoRemaining_Map), message -> {
// 设置消息过期时间 30 分钟 过期
message.getMessageProperties().setExpiration("" + (30 * 1000 * 60));
return message;
});
System.out.println("发送 修改剩余 指令成功 ");
} catch (Exception e) {
System.out.println("发送 修改剩余 创建 失败 " + e.getMessage().toString());
}
}
}catch (Exception e){
Message = "加包 同步主表 Remaining 失败 iccid : "+iccid+" , "+e.getMessage();
System.out.println(Message);
}
}else{
System.out.println(" 加包取消 start_time = "+start_time);
}
}
if(AddFlow!=null){
Map<String,Object> save_Map = new HashMap<>();
save_Map.put("flow_arrs",AddFlow);
SuccessCount = yzCardFlowMapper.saveFlow(save_Map);
Message = "加包成功 iccid : "+iccid+" SuccessCount "+SuccessCount;
System.out.println(Message);
}else{
Message = "未找到加包数据 iccid : "+iccid+" , add_parameter : "+ JSON.toJSONString(add_parameter);
System.out.println(Message);
}
R_Map.put("SuccessCount",SuccessCount);
R_Map.put("Message",Message);
return R_Map;
}
/**
* 设置flow
* @param add_parameter
* @param packet_valid_time
* @param packet_valid_name
* @param start_time
* @param Size
* @param ord_no
* @return
* @throws ParseException
*/
public Map<String,Object> setFlow(boolean monthBool,Map<String,Object> add_parameter,Integer packet_valid_time, String packet_valid_name, String start_time,int Size,String ord_no,String iccid ) throws ParseException {
Map<String,Object> R_map = new HashMap<>();
List<Map<String,Object>> Rlist = new ArrayList<>();
int valid_time = 0;
Double FlowSize = 0.0;
//判断 时间规格
String ord_type = "";
if(packet_valid_name.equals("")){
ord_type = "1";
valid_time = packet_valid_time;
}else if(packet_valid_name.equals("")){
ord_type = "2";
valid_time = packet_valid_time;
}
int month = 1;
if(ord_type.equals("2")){//年包
if(monthBool){//年包拆分为 1年 单位
month = 1*12;
}else{
month = valid_time*12;
}
}
String sTime = start_time,eTime = null;
for (int i = 0; i < Size; i++) {
eTime = VeDate.getMonthDate(sTime,month-1);// 如 周期 1 月 = 当前时间 至 本月月底 所以 -1
eTime = VeDate.getEndDateOfMonth_yyyy_MM_DD(eTime.split(" ")[0])+" 23:59:59";//获取月底 日
Map<String,Object> FlowMap = new HashMap<>();
FlowMap.put("package_id",add_parameter.get("package_id"));
FlowMap.put("packet_id",add_parameter.get("packet_id"));
FlowMap.put("ord_no",ord_no);
FlowMap.put("true_flow",add_parameter.get("packet_flow"));
FlowMap.put("error_flow",add_parameter.get("error_flow"));
FlowMap.put("start_time",sTime);
FlowMap.put("end_time",eTime);
FlowMap.put("ord_type",ord_type);
FlowMap.put("status","1");
//解决老数据缺少加包参数加包失败问题
String packet_type = null;
if(add_parameter.get("packet_type")!=null && add_parameter.get("packet_type").toString().length()>0){
packet_type = add_parameter.get("packet_type").toString() ;
}else{
Map<String,Object> FindPacketTypeMap = yzCardFlowMapper.findPacketType(add_parameter);
packet_type = FindPacketTypeMap.get("packet_type").toString();
}
FlowMap.put("packet_type",packet_type);
FlowMap.put("error_time",add_parameter.get("error_so"));
Object validate_type = add_parameter.get("validate_type");
validate_type = validate_type!=null?validate_type:"1";
FlowMap.put("validate_type",validate_type);
FlowMap.put("iccid",iccid);
Rlist.add(FlowMap);
//重新赋值 sTime 下个包的开始时间 等于 当前包 往后 推一秒
sTime = VeDate.getNextSecond(eTime,1);
/* if(add_parameter.get("packet_flow")!=null){
FlowSize = Arith.add(FlowSize,Double.parseDouble(add_parameter.get("packet_flow").toString()));
}*/
}
R_map.put("Rlist",Rlist);
//R_map.put("FlowSize",FlowSize);
return R_map;
}
}
@@ -0,0 +1,119 @@
package com.yunze.common.core.card;
import com.yunze.apiCommon.utils.InternalApiRequest;
import com.yunze.common.config.MyDictionary;
import com.yunze.common.mapper.yunze.YzCardInfoChangeMapper;
import com.yunze.common.mapper.yunze.YzCardMapper;
import com.yunze.common.utils.yunze.GetShowStatIdArr;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Map;
/**
* 卡信息 变更 操作记录 日志 输出
* @Auther: zhang feng
* @Date: 2021/09/15/8:21
* @Description:
*/
@Slf4j
@Component
public class CardChange {
@Resource
private MyDictionary myDictionary;
@Resource
private YzCardInfoChangeMapper yzCardInfoChangeMapper;
@Resource
private InternalApiRequest internalApiRequest;
@Resource
private YzCardMapper yzCardMapper;
@Resource
private GetShowStatIdArr getShowStatIdArr;
/**
* 停 开 机
* @param Parammap
* @param map
* @param Add_Map 新增变更记录
* @param Upd_Map 卡状态 变更Map
*/
public void OnOff (Map<String,Object> Parammap, Map<String,Object> map,Map<String,Object> Add_Map,Map<String,Object> Upd_Map){
boolean bool = false;
String remark = "";
String execution_status = "2";
try {
Map<String,Object> Rmap = internalApiRequest.changeCardStatus(Parammap,map);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
String iccid = Upd_Map.get("iccid").toString();
if(code.equals("200")){
//更新 card info
Object status_id = Upd_Map.get("status_id");
String status_ShowId = getShowStatIdArr.GetShowStatId(status_id.toString());
Upd_Map.put("status_ShowId",status_ShowId);
bool = yzCardMapper.updStatusId(Upd_Map)>0;
if(bool){
remark = "执行成功!";
execution_status = "1";
}else{
log.error(">>DB - 达量停机轮序消费者 同步达量停机失败:{} | {}<<",iccid,Upd_Map);
}
}else{
if(Rmap.get("Message")!=null){
remark = Rmap.get("Message").toString().length()>100?Rmap.get("Message").toString().substring(0,100):Rmap.get("Message").toString();
}
log.info(">>API - CardChange OnOff 操作失败 :{} | {}<<",iccid,Rmap);
}
}catch (Exception e){
remark = e.getMessage().length()>100?e.getMessage().substring(0,100):e.getMessage();
}
Add_Map.put("remark",remark);
Add_Map.put("execution_status",execution_status);
boolean addBool = yzCardInfoChangeMapper.save(Add_Map)>0;
log.info(map.get("iccid")+" yzCardMapper.updStatusId bool "+bool+" 新增卡信息变更记录 addBool :"+addBool);
}
/**
* 断 开 网
* @param Parammap
* @param map
* @param Add_Map 新增变更记录
* @param Upd_Map 断开网 变更Map
*/
public void ChangeConnection (Map<String,Object> Parammap, Map<String,Object> map,Map<String,Object> Add_Map,Map<String,Object> Upd_Map){
boolean bool = false;
String remark = "";
String execution_status = "2";
try {
Map<String,Object> Rmap = internalApiRequest.FunctionApnStatus(Parammap,map);
String code = Rmap.get("code")!=null?Rmap.get("code").toString():"500";
String iccid = Upd_Map.get("iccid").toString();
if(code.equals("200")){
//更新 card info
bool = yzCardMapper.updConnectionStatus(Upd_Map)>0;
if(bool){
remark = "执行成功!";
execution_status = "1";
}else{
log.error(">>DB - 达量停机轮序消费者 同步达量停机失败:{} | {}<<",iccid,Upd_Map);
}
}else{
if(Rmap.get("Message")!=null){
remark = Rmap.get("Message").toString().length()>100?Rmap.get("Message").toString().substring(0,100):Rmap.get("Message").toString();
}
log.info(">>API - CardChange ChangeConnection 操作失败 :{} | {}<<",iccid,Rmap);
}
}catch (Exception e){
remark = e.getMessage().length()>100?e.getMessage().substring(0,100):e.getMessage();
}
Add_Map.put("remark",remark);
Add_Map.put("execution_status",execution_status);
boolean addBool = yzCardInfoChangeMapper.save(Add_Map)>0;
log.info(map.get("iccid")+" yzCardMapper.updConnectionStatus bool "+bool+" 新增卡信息变更记录 addBool :"+addBool);
}
}
@@ -0,0 +1,190 @@
package com.yunze.common.core.controller;
import java.beans.PropertyEditorSupport;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.yunze.common.utils.yunze.AesEncryptUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yunze.common.constant.HttpStatus;
import com.yunze.common.core.domain.AjaxResult;
import com.yunze.common.core.page.PageDomain;
import com.yunze.common.core.page.TableDataInfo;
import com.yunze.common.core.page.TableSupport;
import com.yunze.common.utils.DateUtils;
import com.yunze.common.utils.StringUtils;
import com.yunze.common.utils.sql.SqlUtil;
/**
* web层通用数据处理
*
* @author yunze
*/
public class BaseController
{
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
/**
* 将前台传递过来的日期格式的字符串,自动转化为Date类型
*/
@InitBinder
public void initBinder(WebDataBinder binder)
{
// Date 类型转换
binder.registerCustomEditor(Date.class, new PropertyEditorSupport()
{
@Override
public void setAsText(String text)
{
setValue(DateUtils.parseDate(text));
}
});
}
/**
* 设置请求分页数据
*/
protected void startPage()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
PageHelper.startPage(pageNum, pageSize, orderBy);
}
}
/**
* my 成功返回函数
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected String MyRetunSuccess(Object obj,String msg)
{
msg = msg!=null?msg:"操作成功";
Map<String, Object> Rmap = new HashMap<String, Object>();
Rmap.put("code",HttpStatus.SUCCESS);
Rmap.put("msg",msg);
Rmap.put("Data",obj);
try {
return AesEncryptUtil.encrypt(JSON.toJSONString(Rmap));
}catch (Exception e){
System.err.println(e);
return "数据返回加密失败……";
}
}
protected String Myerr(String Msg)
{
Map<String ,Object> map = new HashMap<>();
map.put("code",HttpStatus.ERROR);
map.put("msg",Msg);
try {
return AesEncryptUtil.encrypt(JSON.toJSONString(map));
//return JSON.toJSONString(map);
}catch (Exception e){
System.err.println(e);
return "数据返回加密失败……";
}
}
/**
* 设置请求排序数据
*/
protected void startOrderBy()
{
PageDomain pageDomain = TableSupport.buildPageRequest();
if (StringUtils.isNotEmpty(pageDomain.getOrderBy()))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
PageHelper.orderBy(orderBy);
}
}
/**
* 响应请求分页数据
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list)
{
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
rspData.setRows(list);
rspData.setTotal(new PageInfo(list).getTotal());
return rspData;
}
/**
* 响应返回结果
*
* @param rows 影响行数
* @return 操作结果
*/
protected AjaxResult toAjax(int rows)
{
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
}
/**
* 响应返回结果
*
* @param result 结果
* @return 操作结果
*/
protected AjaxResult toAjax(boolean result)
{
return result ? success() : error();
}
/**
* 返回成功
*/
public AjaxResult success()
{
return AjaxResult.success();
}
/**
* 返回失败消息
*/
public AjaxResult error()
{
return AjaxResult.error();
}
/**
* 返回成功消息
*/
public AjaxResult success(String message)
{
return AjaxResult.success(message);
}
/**
* 返回失败消息
*/
public AjaxResult error(String message)
{
return AjaxResult.error(message);
}
/**
* 页面跳转
*/
public String redirect(String url)
{
return StringUtils.format("redirect:{}", url);
}
}
@@ -0,0 +1,148 @@
package com.yunze.common.core.domain;
import java.util.HashMap;
import com.yunze.common.constant.HttpStatus;
import com.yunze.common.utils.StringUtils;
/**
* 操作消息提醒
*
* @author yunze
*/
public class AjaxResult extends HashMap<String, Object>
{
private static final long serialVersionUID = 1L;
/** 状态码 */
public static final String CODE_TAG = "code";
/** 返回内容 */
public static final String MSG_TAG = "msg";
/** 数据对象 */
public static final String DATA_TAG = "data";
/**
* 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。
*/
public AjaxResult()
{
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
*/
public AjaxResult(int code, String msg)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
}
/**
* 初始化一个新创建的 AjaxResult 对象
*
* @param code 状态码
* @param msg 返回内容
* @param data 数据对象
*/
public AjaxResult(int code, String msg, Object data)
{
super.put(CODE_TAG, code);
super.put(MSG_TAG, msg);
if (StringUtils.isNotNull(data))
{
super.put(DATA_TAG, data);
}
}
/**
* 返回成功消息
*
* @return 成功消息
*/
public static AjaxResult success()
{
return AjaxResult.success("操作成功");
}
/**
* 返回成功数据
*
* @return 成功消息
*/
public static AjaxResult success(Object data)
{
return AjaxResult.success("操作成功", data);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @return 成功消息
*/
public static AjaxResult success(String msg)
{
return AjaxResult.success(msg, null);
}
/**
* 返回成功消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 成功消息
*/
public static AjaxResult success(String msg, Object data)
{
return new AjaxResult(HttpStatus.SUCCESS, msg, data);
}
/**
* 返回错误消息
*
* @return
*/
public static AjaxResult error()
{
return AjaxResult.error("操作失败");
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @return 警告消息
*/
public static AjaxResult error(String msg)
{
return AjaxResult.error(msg, null);
}
/**
* 返回错误消息
*
* @param msg 返回内容
* @param data 数据对象
* @return 警告消息
*/
public static AjaxResult error(String msg, Object data)
{
return new AjaxResult(HttpStatus.ERROR, msg, data);
}
/**
* 返回错误消息
*
* @param code 状态码
* @param msg 返回内容
* @return 警告消息
*/
public static AjaxResult error(int code, String msg)
{
return new AjaxResult(code, msg, null);
}
}
@@ -0,0 +1,114 @@
package com.yunze.common.core.domain;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
/**
* Entity基类
*
* @author yunze
*/
public class BaseEntity implements Serializable
{
private static final long serialVersionUID = 1L;
/** 搜索值 */
private String searchValue;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/** 更新者 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 备注 */
private String remark;
/** 请求参数 */
private Map<String, Object> params;
public String getSearchValue()
{
return searchValue;
}
public void setSearchValue(String searchValue)
{
this.searchValue = searchValue;
}
public String getCreateBy()
{
return createBy;
}
public void setCreateBy(String createBy)
{
this.createBy = createBy;
}
public Date getCreateTime()
{
return createTime;
}
public void setCreateTime(Date createTime)
{
this.createTime = createTime;
}
public String getUpdateBy()
{
return updateBy;
}
public void setUpdateBy(String updateBy)
{
this.updateBy = updateBy;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime)
{
this.updateTime = updateTime;
}
public String getRemark()
{
return remark;
}
public void setRemark(String remark)
{
this.remark = remark;
}
public Map<String, Object> getParams()
{
if (params == null)
{
params = new HashMap<>();
}
return params;
}
public void setParams(Map<String, Object> params)
{
this.params = params;
}
}
@@ -0,0 +1,79 @@
package com.yunze.common.core.domain;
import java.util.ArrayList;
import java.util.List;
/**
* Tree基类
*
* @author yunze
*/
public class TreeEntity extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private Integer orderNum;
/** 祖级列表 */
private String ancestors;
/** 子部门 */
private List<?> children = new ArrayList<>();
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
public List<?> getChildren()
{
return children;
}
public void setChildren(List<?> children)
{
this.children = children;
}
}
@@ -0,0 +1,77 @@
package com.yunze.common.core.domain;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunze.common.core.domain.entity.SysDept;
import com.yunze.common.core.domain.entity.SysMenu;
/**
* Treeselect树结构实体类
*
* @author yunze
*/
public class TreeSelect implements Serializable
{
private static final long serialVersionUID = 1L;
/** 节点ID */
private Long id;
/** 节点名称 */
private String label;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
public TreeSelect()
{
}
public TreeSelect(SysDept dept)
{
this.id = dept.getDeptId();
this.label = dept.getDname();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysMenu menu)
{
this.id = menu.getMenuId();
this.label = menu.getMenuName();
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getLabel()
{
return label;
}
public void setLabel(String label)
{
this.label = label;
}
public List<TreeSelect> getChildren()
{
return children;
}
public void setChildren(List<TreeSelect> children)
{
this.children = children;
}
}
@@ -0,0 +1,220 @@
package com.yunze.common.core.domain.entity;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yunze.common.core.domain.BaseEntity;
/**
* 部门表 sys_dept
*
* @author yunze
*/
public class SysDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private String orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 部门简称 */
private String dname;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
public String getAncestors()
{
return ancestors;
}
public void setAncestors(String ancestors)
{
this.ancestors = ancestors;
}
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
public String getDeptName()
{
return deptName;
}
public void setDeptName(String deptName)
{
this.deptName = deptName;
}
@NotBlank(message = "显示顺序不能为空")
public String getOrderNum()
{
return orderNum;
}
public void setOrderNum(String orderNum)
{
this.orderNum = orderNum;
}
public String getLeader()
{
return leader;
}
public void setLeader(String leader)
{
this.leader = leader;
}
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
public String getPhone()
{
return phone;
}
public void setPhone(String phone)
{
this.phone = phone;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public String getDname()
{
return dname;
}
public void setDname(String dname)
{
this.dname = dname;
}
public List<SysDept> getChildren()
{
return children;
}
public void setChildren(List<SysDept> children)
{
this.children = children;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("deptId", getDeptId())
.append("parentId", getParentId())
.append("ancestors", getAncestors())
.append("deptName", getDeptName())
.append("orderNum", getOrderNum())
.append("leader", getLeader())
.append("phone", getPhone())
.append("email", getEmail())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("dname", getDname())
.toString();
}
}
@@ -0,0 +1,176 @@
package com.yunze.common.core.domain.entity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yunze.common.annotation.Excel;
import com.yunze.common.annotation.Excel.ColumnType;
import com.yunze.common.constant.UserConstants;
import com.yunze.common.core.domain.BaseEntity;
/**
* 字典数据表 sys_dict_data
*
* @author yunze
*/
public class SysDictData extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 字典编码 */
@Excel(name = "字典编码", cellType = ColumnType.NUMERIC)
private Long dictCode;
/** 字典排序 */
@Excel(name = "字典排序", cellType = ColumnType.NUMERIC)
private Long dictSort;
/** 字典标签 */
@Excel(name = "字典标签")
private String dictLabel;
/** 字典键值 */
@Excel(name = "字典键值")
private String dictValue;
/** 字典类型 */
@Excel(name = "字典类型")
private String dictType;
/** 样式属性(其他样式扩展) */
private String cssClass;
/** 表格字典样式 */
private String listClass;
/** 是否默认(Y是 N否) */
@Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
private String isDefault;
/** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
public Long getDictCode()
{
return dictCode;
}
public void setDictCode(Long dictCode)
{
this.dictCode = dictCode;
}
public Long getDictSort()
{
return dictSort;
}
public void setDictSort(Long dictSort)
{
this.dictSort = dictSort;
}
@NotBlank(message = "字典标签不能为空")
@Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符")
public String getDictLabel()
{
return dictLabel;
}
public void setDictLabel(String dictLabel)
{
this.dictLabel = dictLabel;
}
@NotBlank(message = "字典键值不能为空")
@Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符")
public String getDictValue()
{
return dictValue;
}
public void setDictValue(String dictValue)
{
this.dictValue = dictValue;
}
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符")
public String getDictType()
{
return dictType;
}
public void setDictType(String dictType)
{
this.dictType = dictType;
}
@Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符")
public String getCssClass()
{
return cssClass;
}
public void setCssClass(String cssClass)
{
this.cssClass = cssClass;
}
public String getListClass()
{
return listClass;
}
public void setListClass(String listClass)
{
this.listClass = listClass;
}
public boolean getDefault()
{
return UserConstants.YES.equals(this.isDefault) ? true : false;
}
public String getIsDefault()
{
return isDefault;
}
public void setIsDefault(String isDefault)
{
this.isDefault = isDefault;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dictCode", getDictCode())
.append("dictSort", getDictSort())
.append("dictLabel", getDictLabel())
.append("dictValue", getDictValue())
.append("dictType", getDictType())
.append("cssClass", getCssClass())
.append("listClass", getListClass())
.append("isDefault", getIsDefault())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,128 @@
package com.yunze.common.core.domain.entity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yunze.common.annotation.Excel;
import com.yunze.common.annotation.Excel.ColumnType;
import com.yunze.common.core.domain.BaseEntity;
/**
* 字典类型表 sys_dict_type
*
* @author yunze
*/
public class SysDictType extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 字典主键 */
@Excel(name = "字典主键", cellType = ColumnType.NUMERIC)
private Long dictId;
/** 字典名称 */
@Excel(name = "字典名称")
private String dictName;
/** 字典类型 */
@Excel(name = "字典类型")
private String dictType;
// /**推送 API*/
// @Excel(name = "推送 API")
// private String url;
//
// /**推送邮件*/
// @Excel(name = "推送邮件")
// private String email;
/** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
public Long getDictId()
{
return dictId;
}
public void setDictId(Long dictId)
{
this.dictId = dictId;
}
@NotBlank(message = "字典名称不能为空")
@Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符")
public String getDictName()
{
return dictName;
}
public void setDictName(String dictName)
{
this.dictName = dictName;
}
@NotBlank(message = "字典类型不能为空")
@Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符")
public String getDictType()
{
return dictType;
}
public void setDictType(String dictType)
{
this.dictType = dictType;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
// @NotBlank(message = "推送API名称不能为空")
// @Size(min = 0, max = 100, message = "推送API名称长度不能超过100个字符")
// public String getCcUrlName()
// {
// return url;
// }
// public void setCcUrlName(String url)
// {
// this.url = url;
// }
//
// @NotBlank(message = "邮件不能为空")
// @Size(min = 0, max = 100, message = "邮件长度不能超过100个字符")
// public String getCcUrlType()
// {
// return email;
// }
// public void setCcUrlType(String email)
// {
// this.email = email;
// }
// .append("url", getCcUrlName())
// .append("email", getCcUrlType())
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("dictId", getDictId())
.append("dictName", getDictName())
.append("dictType", getDictType())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,245 @@
package com.yunze.common.core.domain.entity;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yunze.common.core.domain.BaseEntity;
/**
* 菜单权限表 sys_menu
*
* @author yunze
*/
public class SysMenu extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 菜单ID */
private Long menuId;
/** 菜单名称 */
private String menuName;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private String orderNum;
/** 路由地址 */
private String path;
/** 组件路径 */
private String component;
/** 是否为外链(0是 1否) */
private String isFrame;
/** 是否缓存(0缓存 1不缓存) */
private String isCache;
/** 类型(M目录 C菜单 F按钮) */
private String menuType;
/** 显示状态(0显示 1隐藏) */
private String visible;
/** 菜单状态(0显示 1隐藏) */
private String status;
/** 权限字符串 */
private String perms;
/** 菜单图标 */
private String icon;
/** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>();
public Long getMenuId()
{
return menuId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
public String getMenuName()
{
return menuName;
}
public void setMenuName(String menuName)
{
this.menuName = menuName;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
@NotBlank(message = "显示顺序不能为空")
public String getOrderNum()
{
return orderNum;
}
public void setOrderNum(String orderNum)
{
this.orderNum = orderNum;
}
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getIsFrame()
{
return isFrame;
}
public void setIsFrame(String isFrame)
{
this.isFrame = isFrame;
}
public String getIsCache()
{
return isCache;
}
public void setIsCache(String isCache)
{
this.isCache = isCache;
}
@NotBlank(message = "菜单类型不能为空")
public String getMenuType()
{
return menuType;
}
public void setMenuType(String menuType)
{
this.menuType = menuType;
}
public String getVisible()
{
return visible;
}
public void setVisible(String visible)
{
this.visible = visible;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
public String getPerms()
{
return perms;
}
public void setPerms(String perms)
{
this.perms = perms;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public List<SysMenu> getChildren()
{
return children;
}
public void setChildren(List<SysMenu> children)
{
this.children = children;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("menuId", getMenuId())
.append("menuName", getMenuName())
.append("parentId", getParentId())
.append("orderNum", getOrderNum())
.append("path", getPath())
.append("component", getComponent())
.append("isFrame", getIsFrame())
.append("IsCache", getIsCache())
.append("menuType", getMenuType())
.append("visible", getVisible())
.append("status ", getStatus())
.append("perms", getPerms())
.append("icon", getIcon())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,226 @@
package com.yunze.common.core.domain.entity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yunze.common.annotation.Excel;
import com.yunze.common.annotation.Excel.ColumnType;
import com.yunze.common.core.domain.BaseEntity;
/**
* 角色表 sys_role
*
* @author yunze
*/
public class SysRole extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 角色ID */
@Excel(name = "角色序号", cellType = ColumnType.NUMERIC)
private Long roleId;
/** 角色名称 */
@Excel(name = "角色名称")
private String roleName;
/** 角色权限 */
@Excel(name = "角色权限")
private String roleKey;
/** 角色排序 */
@Excel(name = "角色排序")
private String roleSort;
/** 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) */
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
private String dataScope;
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
private boolean menuCheckStrictly;
/** 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) */
private boolean deptCheckStrictly;
/** 角色状态(0正常 1停用) */
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
/** 用户是否存在此角色标识 默认不存在 */
private boolean flag = false;
/** 菜单组 */
private Long[] menuIds;
/** 部门组(数据权限) */
private Long[] deptIds;
public SysRole()
{
}
public SysRole(Long roleId)
{
this.roleId = roleId;
}
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public boolean isAdmin()
{
return isAdmin(this.roleId);
}
public static boolean isAdmin(Long roleId)
{
return roleId != null && 1L == roleId;
}
@NotBlank(message = "角色名称不能为空")
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
public String getRoleName()
{
return roleName;
}
public void setRoleName(String roleName)
{
this.roleName = roleName;
}
@NotBlank(message = "权限字符不能为空")
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
public String getRoleKey()
{
return roleKey;
}
public void setRoleKey(String roleKey)
{
this.roleKey = roleKey;
}
@NotBlank(message = "显示顺序不能为空")
public String getRoleSort()
{
return roleSort;
}
public void setRoleSort(String roleSort)
{
this.roleSort = roleSort;
}
public String getDataScope()
{
return dataScope;
}
public void setDataScope(String dataScope)
{
this.dataScope = dataScope;
}
public boolean isMenuCheckStrictly()
{
return menuCheckStrictly;
}
public void setMenuCheckStrictly(boolean menuCheckStrictly)
{
this.menuCheckStrictly = menuCheckStrictly;
}
public boolean isDeptCheckStrictly()
{
return deptCheckStrictly;
}
public void setDeptCheckStrictly(boolean deptCheckStrictly)
{
this.deptCheckStrictly = deptCheckStrictly;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public boolean isFlag()
{
return flag;
}
public void setFlag(boolean flag)
{
this.flag = flag;
}
public Long[] getMenuIds()
{
return menuIds;
}
public void setMenuIds(Long[] menuIds)
{
this.menuIds = menuIds;
}
public Long[] getDeptIds()
{
return deptIds;
}
public void setDeptIds(Long[] deptIds)
{
this.deptIds = deptIds;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("roleId", getRoleId())
.append("roleName", getRoleName())
.append("roleKey", getRoleKey())
.append("roleSort", getRoleSort())
.append("dataScope", getDataScope())
.append("menuCheckStrictly", isMenuCheckStrictly())
.append("deptCheckStrictly", isDeptCheckStrictly())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,328 @@
package com.yunze.common.core.domain.entity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yunze.common.annotation.Excel;
import com.yunze.common.annotation.Excel.ColumnType;
import com.yunze.common.annotation.Excel.Type;
import com.yunze.common.annotation.Excels;
import com.yunze.common.core.domain.BaseEntity;
/**
* 用户对象 sys_user
*
* @author yunze
*/
public class SysUser extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 用户ID */
@Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
private Long userId;
/** 部门ID */
@Excel(name = "部门编号", type = Type.IMPORT)
private Long deptId;
/** 用户账号 */
@Excel(name = "登录名称")
private String userName;
/** 用户昵称 */
@Excel(name = "用户名称")
private String nickName;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
private String email;
/** 手机号码 */
@Excel(name = "手机号码")
private String phonenumber;
/** 用户性别 */
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
private String sex;
/** 用户头像 */
private String avatar;
/** 密码 */
private String password;
/** 盐加密 */
private String salt;
/** 帐号状态(0正常 1停用) */
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
/** 最后登录IP */
@Excel(name = "最后登录IP", type = Type.EXPORT)
private String loginIp;
/** 最后登录时间 */
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
private Date loginDate;
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
@Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
})
private SysDept dept;
/** 角色对象 */
private List<SysRole> roles;
/** 角色组 */
private Long[] roleIds;
/** 岗位组 */
private Long[] postIds;
public SysUser()
{
}
public SysUser(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public boolean isAdmin()
{
return isAdmin(this.userId);
}
public static boolean isAdmin(Long userId)
{
return userId != null && 1L == userId;
}
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
public String getNickName()
{
return nickName;
}
public void setNickName(String nickName)
{
this.nickName = nickName;
}
@NotBlank(message = "用户账号不能为空")
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email = email;
}
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
public String getPhonenumber()
{
return phonenumber;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getSex()
{
return sex;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getAvatar()
{
return avatar;
}
public void setAvatar(String avatar)
{
this.avatar = avatar;
}
@JsonIgnore
@JsonProperty
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getSalt()
{
return salt;
}
public void setSalt(String salt)
{
this.salt = salt;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public String getDelFlag()
{
return delFlag;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getLoginIp()
{
return loginIp;
}
public void setLoginIp(String loginIp)
{
this.loginIp = loginIp;
}
public Date getLoginDate()
{
return loginDate;
}
public void setLoginDate(Date loginDate)
{
this.loginDate = loginDate;
}
public SysDept getDept()
{
return dept;
}
public void setDept(SysDept dept)
{
this.dept = dept;
}
public List<SysRole> getRoles()
{
return roles;
}
public void setRoles(List<SysRole> roles)
{
this.roles = roles;
}
public Long[] getRoleIds()
{
return roleIds;
}
public void setRoleIds(Long[] roleIds)
{
this.roleIds = roleIds;
}
public Long[] getPostIds()
{
return postIds;
}
public void setPostIds(Long[] postIds)
{
this.postIds = postIds;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("deptId", getDeptId())
.append("userName", getUserName())
.append("nickName", getNickName())
.append("email", getEmail())
.append("phonenumber", getPhonenumber())
.append("sex", getSex())
.append("avatar", getAvatar())
.append("password", getPassword())
.append("salt", getSalt())
.append("status", getStatus())
.append("delFlag", getDelFlag())
.append("loginIp", getLoginIp())
.append("loginDate", getLoginDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.append("dept", getDept())
.toString();
}
}
@@ -0,0 +1,87 @@
package com.yunze.common.core.domain.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yunze.common.annotation.Excel;
import com.yunze.common.annotation.Excel.ColumnType;
import com.yunze.common.annotation.Excel.Type;
import com.yunze.common.annotation.Excels;
import com.yunze.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
/**
* 用户对象 yz_card_info
*
* @author root
*/
public class YzCard extends BaseEntity
{
@Excel(name = "msisdn", cellType = ColumnType.STRING, prompt = "SIM 号码")
private String msisdn ;
@Excel(name = "iccid", cellType = ColumnType.STRING, prompt = "SIM 卡号")
private String iccid;
@Excel(name = "imsi", cellType = ColumnType.STRING, prompt = "SIM 识别码")
private String imsi ;
@Excel(name = "open_date", cellType = ColumnType.STRING, prompt = "开卡日期 yyyy-MM-dd")
private String open_date ;
@Excel(name = "activate_date", cellType = ColumnType.STRING, prompt = "激活日期 yyyy-MM-dd")
private String activate_date;
@Excel(name = "agent_id", cellType = ColumnType.STRING, prompt = "代理编号")
private String agent_id ;
@Excel(name = "channel_id", cellType = ColumnType.STRING, prompt = "通道编号")
private String channel_id ;
@Excel(name = "is_pool", cellType = ColumnType.STRING, prompt = "是否流量池 0 否 1 是")
private String is_pool;
@Excel(name = "batch_date", cellType = ColumnType.STRING, prompt = "入库日期 yyyy-MM-dd")
private String batch_date ;
@Excel(name = "remarks", cellType = ColumnType.STRING, prompt = "备注信息")
private String remarks ;
@Excel(name = "status_id", cellType = ColumnType.STRING, prompt = "卡状态")
private String status_id;
@Excel(name = "package_id", cellType = ColumnType.STRING, prompt = "资费组 编号")
private String package_id ;
@Excel(name = "imei", cellType = ColumnType.STRING, prompt = "IMEI")
private String imei ;
@Excel(name = "type", cellType = ColumnType.STRING, prompt = "卡类型")
private String type;
@Excel(name = "network_type", cellType = ColumnType.STRING, prompt = "网络类型 ")
private String network_type;
@Excel(name = "is_sms", cellType = ColumnType.STRING, prompt = "是否支持短信发送 0 否 1 是")
private String is_sms ;
@Excel(name = "sms_number", cellType = ColumnType.STRING, prompt = "短信服务号码")
private String sms_number;
@Excel(name = "gprs", cellType = ColumnType.STRING, prompt = "GPRS是否开启 0 否 1 是")
private String gprs;
@Excel(name = "user_id", cellType = ColumnType.STRING, prompt = "系统登录账户id ")
private String user_id ;
}
@@ -0,0 +1,69 @@
package com.yunze.common.core.domain.model;
/**
* 用户登录对象
*
* @author yunze
*/
public class LoginBody
{
/**
* 用户名
*/
private String username;
/**
* 用户密码
*/
private String password;
/**
* 验证码
*/
private String code;
/**
* 唯一标识
*/
private String uuid = "";
public String getUsername()
{
return username;
}
public void setUsername(String username)
{
this.username = username;
}
public String getPassword()
{
return password;
}
public void setPassword(String password)
{
this.password = password;
}
public String getCode()
{
return code;
}
public void setCode(String code)
{
this.code = code;
}
public String getUuid()
{
return uuid;
}
public void setUuid(String uuid)
{
this.uuid = uuid;
}
}
@@ -0,0 +1,228 @@
package com.yunze.common.core.domain.model;
import java.util.Collection;
import java.util.Set;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yunze.common.core.domain.entity.SysUser;
/**
* 登录用户身份权限
*
* @author yunze
*/
public class LoginUser implements UserDetails
{
private static final long serialVersionUID = 1L;
/**
* 用户唯一标识
*/
private String token;
/**
* 登录时间
*/
private Long loginTime;
/**
* 过期时间
*/
private Long expireTime;
/**
* 登录IP地址
*/
private String ipaddr;
/**
* 登录地点
*/
private String loginLocation;
/**
* 浏览器类型
*/
private String browser;
/**
* 操作系统
*/
private String os;
/**
* 权限列表
*/
private Set<String> permissions;
/**
* 用户信息
*/
private SysUser user;
public String getToken()
{
return token;
}
public void setToken(String token)
{
this.token = token;
}
public LoginUser()
{
}
public LoginUser(SysUser user, Set<String> permissions)
{
this.user = user;
this.permissions = permissions;
}
@JsonIgnore
@Override
public String getPassword()
{
return user.getPassword();
}
@Override
public String getUsername()
{
return user.getUserName();
}
/**
* 账户是否未过期,过期无法验证
*/
@JsonIgnore
@Override
public boolean isAccountNonExpired()
{
return true;
}
/**
* 指定用户是否解锁,锁定的用户无法进行身份验证
*
* @return
*/
@JsonIgnore
@Override
public boolean isAccountNonLocked()
{
return true;
}
/**
* 指示是否已过期的用户的凭据(密码),过期的凭据防止认证
*
* @return
*/
@JsonIgnore
@Override
public boolean isCredentialsNonExpired()
{
return true;
}
/**
* 是否可用 ,禁用的用户不能身份验证
*
* @return
*/
@JsonIgnore
@Override
public boolean isEnabled()
{
return true;
}
public Long getLoginTime()
{
return loginTime;
}
public void setLoginTime(Long loginTime)
{
this.loginTime = loginTime;
}
public String getIpaddr()
{
return ipaddr;
}
public void setIpaddr(String ipaddr)
{
this.ipaddr = ipaddr;
}
public String getLoginLocation()
{
return loginLocation;
}
public void setLoginLocation(String loginLocation)
{
this.loginLocation = loginLocation;
}
public String getBrowser()
{
return browser;
}
public void setBrowser(String browser)
{
this.browser = browser;
}
public String getOs()
{
return os;
}
public void setOs(String os)
{
this.os = os;
}
public Long getExpireTime()
{
return expireTime;
}
public void setExpireTime(Long expireTime)
{
this.expireTime = expireTime;
}
public Set<String> getPermissions()
{
return permissions;
}
public void setPermissions(Set<String> permissions)
{
this.permissions = permissions;
}
public SysUser getUser()
{
return user;
}
public void setUser(SysUser user)
{
this.user = user;
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities()
{
return null;
}
}
@@ -0,0 +1,72 @@
package com.yunze.common.core.page;
import com.yunze.common.utils.StringUtils;
/**
* 分页数据
*
* @author yunze
*/
public class PageDomain
{
/** 当前记录起始索引 */
private Integer pageNum;
/** 每页显示记录数 */
private Integer pageSize;
/** 排序列 */
private String orderByColumn;
/** 排序的方向desc或者asc */
private String isAsc = "asc";
public String getOrderBy()
{
if (StringUtils.isEmpty(orderByColumn))
{
return "";
}
return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc;
}
public Integer getPageNum()
{
return pageNum;
}
public void setPageNum(Integer pageNum)
{
this.pageNum = pageNum;
}
public Integer getPageSize()
{
return pageSize;
}
public void setPageSize(Integer pageSize)
{
this.pageSize = pageSize;
}
public String getOrderByColumn()
{
return orderByColumn;
}
public void setOrderByColumn(String orderByColumn)
{
this.orderByColumn = orderByColumn;
}
public String getIsAsc()
{
return isAsc;
}
public void setIsAsc(String isAsc)
{
this.isAsc = isAsc;
}
}
@@ -0,0 +1,85 @@
package com.yunze.common.core.page;
import java.io.Serializable;
import java.util.List;
/**
* 表格分页数据对象
*
* @author yunze
*/
public class TableDataInfo implements Serializable
{
private static final long serialVersionUID = 1L;
/** 总记录数 */
private long total;
/** 列表数据 */
private List<?> rows;
/** 消息状态码 */
private int code;
/** 消息内容 */
private String msg;
/**
* 表格数据对象
*/
public TableDataInfo()
{
}
/**
* 分页
*
* @param list 列表数据
* @param total 总记录数
*/
public TableDataInfo(List<?> list, int total)
{
this.rows = list;
this.total = total;
}
public long getTotal()
{
return total;
}
public void setTotal(long total)
{
this.total = total;
}
public List<?> getRows()
{
return rows;
}
public void setRows(List<?> rows)
{
this.rows = rows;
}
public int getCode()
{
return code;
}
public void setCode(int code)
{
this.code = code;
}
public String getMsg()
{
return msg;
}
public void setMsg(String msg)
{
this.msg = msg;
}
}
@@ -0,0 +1,49 @@
package com.yunze.common.core.page;
import com.yunze.common.utils.ServletUtils;
/**
* 表格数据处理
*
* @author yunze
*/
public class TableSupport
{
/**
* 当前记录起始索引
*/
public static final String PAGE_NUM = "pageNum";
/**
* 每页显示记录数
*/
public static final String PAGE_SIZE = "pageSize";
/**
* 排序列
*/
public static final String ORDER_BY_COLUMN = "orderByColumn";
/**
* 排序的方向 "desc" 或者 "asc".
*/
public static final String IS_ASC = "isAsc";
/**
* 封装分页对象
*/
public static PageDomain getPageDomain()
{
PageDomain pageDomain = new PageDomain();
pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM));
pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE));
pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
return pageDomain;
}
public static PageDomain buildPageRequest()
{
return getPageDomain();
}
}
@@ -0,0 +1,274 @@
package com.yunze.common.core.redis;
import java.util.*;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
/**
* spring redis 工具类
*
* @author yunze
**/
@SuppressWarnings(value = { "unchecked", "rawtypes" })
@Component
public class RedisCache
{
@Autowired
public RedisTemplate redisTemplate;
/**
* 缓存基本的对象,Integer、String、实体类等
*
* @param key 缓存的键值
* @param value 缓存的值
*/
public <T> void setCacheObject(final String key, final T value)
{
redisTemplate.opsForValue().set(key, value);
}
/**
* 缓存基本的对象,Integer、String、实体类等
*
* @param key 缓存的键值
* @param value 缓存的值
* @param timeout 时间
* @param timeUnit 时间颗粒度
*/
public <T> void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit)
{
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
}
/**
* 设置有效时间
*
* @param key Redis键
* @param timeout 超时时间
* @return true=设置成功;false=设置失败
*/
public boolean expire(final String key, final long timeout)
{
return expire(key, timeout, TimeUnit.SECONDS);
}
/**
* 设置有效时间
*
* @param key Redis键
* @param timeout 超时时间
* @param unit 时间单位
* @return true=设置成功;false=设置失败
*/
public boolean expire(final String key, final long timeout, final TimeUnit unit)
{
return redisTemplate.expire(key, timeout, unit);
}
/**
* 获得缓存的基本对象。
*
* @param key 缓存键值
* @return 缓存键值对应的数据
*/
public <T> T getCacheObject(final String key)
{
ValueOperations<String, T> operation = (ValueOperations<String, T>) redisTemplate.opsForValue();
return operation.get(key);
}
/**
* 删除单个对象
*
* @param key
*/
public boolean deleteObject(final String key)
{
return redisTemplate.delete(key);
}
/**
* 删除集合对象
*
* @param collection 多个对象
* @return
*/
public long deleteObject(final Collection collection)
{
return redisTemplate.delete(collection);
}
/**
* 缓存List数据
*
* @param key 缓存的键值
* @param dataList 待缓存的List数据
* @return 缓存的对象
*/
public <T> long setCacheList(final String key, final List<T> dataList)
{
Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
return count == null ? 0 : count;
}
/**
* 获得缓存的list对象
*
* @param key 缓存的键值
* @return 缓存键值对应的数据
*/
public <T> List<T> getCacheList(final String key)
{
return (List<T>) redisTemplate.opsForList().range(key, 0, -1);
}
/**
* 缓存Set
*
* @param key 缓存键值
* @param dataSet 缓存的数据
* @return 缓存数据的对象
*/
public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet)
{
BoundSetOperations<String, T> setOperation = (BoundSetOperations<String, T>) redisTemplate.boundSetOps(key);
Iterator<T> it = dataSet.iterator();
while (it.hasNext())
{
setOperation.add(it.next());
}
return setOperation;
}
/**
* 获得缓存的set
*
* @param key
* @return
*/
public <T> Set<T> getCacheSet(final String key)
{
return (Set<T>) redisTemplate.opsForSet().members(key);
}
/**
* 缓存Map
*
* @param key
* @param dataMap
*/
public <T> void setCacheMap(final String key, final Map<String, T> dataMap)
{
if (dataMap != null) {
redisTemplate.opsForHash().putAll(key, dataMap);
}
}
/**
* 获得缓存的Map
*
* @param key
* @return
*/
public <T> Map<Object, Object> getCacheMap(final String key)
{
return redisTemplate.opsForHash().entries(key);
}
/**
* 往Hash中存入数据
*
* @param key Redis键
* @param hKey Hash键
* @param value 值
*/
public <T> void setCacheMapValue(final String key, final String hKey, final T value)
{
redisTemplate.opsForHash().put(key, hKey, value);
}
/**
* 获取Hash中的数据
*
* @param key Redis键
* @param hKey Hash键
* @return Hash中的对象
*/
public <T> T getCacheMapValue(final String key, final String hKey)
{
HashOperations<String, String, T> opsForHash = redisTemplate.opsForHash();
return opsForHash.get(key, hKey);
}
/**
* 获取多个Hash中的数据
*
* @param key Redis键
* @param hKeys Hash键集合
* @return Hash对象集合
*/
public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys)
{
return (List<T>) redisTemplate.opsForHash().multiGet(key, hKeys);
}
/**
* 获得缓存的基本对象列表
*
* @param pattern 字符串前缀
* @return 对象列表
*/
public Collection<String> keys(final String pattern)
{
return redisTemplate.keys(pattern);
}
/**
* 获取指定前缀的一系列key
* 使用scan命令代替keys, Redis是单线程处理,keys命令在KEY数量较多时,
* 操作效率极低【时间复杂度为O(N)】,该命令一旦执行会严重阻塞线上其它命令的正常请求
* @param keyPrefix
* @return
*/
public Collection<String> scanKeys(String keyPrefix) {
String realKey = "*" + keyPrefix + "*";
try {
return (Collection<String>) redisTemplate.execute((RedisCallback<Set<String>>) connection -> {
Set<String> binaryKeys = new HashSet<>();
Cursor<byte[]> cursor = connection.scan(new ScanOptions.ScanOptionsBuilder().match(realKey).count(Integer.MAX_VALUE).build());
while (cursor.hasNext()) {
binaryKeys.add(new String(cursor.next()));
}
return binaryKeys;
});
} catch (Throwable e) {
e.printStackTrace();
}
return null;
}
/**
* 删除指定前缀的一系列key
* @param keyPrefix
*/
public void removeAll(String keyPrefix) {
try {
Collection<String> keys = scanKeys(keyPrefix);
redisTemplate.delete(keys);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
@@ -0,0 +1,86 @@
package com.yunze.common.core.text;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import com.yunze.common.utils.StringUtils;
/**
* 字符集工具类
*
* @author yunze
*/
public class CharsetKit
{
/** ISO-8859-1 */
public static final String ISO_8859_1 = "ISO-8859-1";
/** UTF-8 */
public static final String UTF_8 = "UTF-8";
/** GBK */
public static final String GBK = "GBK";
/** ISO-8859-1 */
public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1);
/** UTF-8 */
public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8);
/** GBK */
public static final Charset CHARSET_GBK = Charset.forName(GBK);
/**
* 转换为Charset对象
*
* @param charset 字符集,为空则返回默认字符集
* @return Charset
*/
public static Charset charset(String charset)
{
return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset);
}
/**
* 转换字符串的字符集编码
*
* @param source 字符串
* @param srcCharset 源字符集,默认ISO-8859-1
* @param destCharset 目标字符集,默认UTF-8
* @return 转换后的字符集
*/
public static String convert(String source, String srcCharset, String destCharset)
{
return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset));
}
/**
* 转换字符串的字符集编码
*
* @param source 字符串
* @param srcCharset 源字符集,默认ISO-8859-1
* @param destCharset 目标字符集,默认UTF-8
* @return 转换后的字符集
*/
public static String convert(String source, Charset srcCharset, Charset destCharset)
{
if (null == srcCharset)
{
srcCharset = StandardCharsets.ISO_8859_1;
}
if (null == destCharset)
{
destCharset = StandardCharsets.UTF_8;
}
if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset))
{
return source;
}
return new String(source.getBytes(srcCharset), destCharset);
}
/**
* @return 系统字符集编码
*/
public static String systemCharset()
{
return Charset.defaultCharset().name();
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,92 @@
package com.yunze.common.core.text;
import com.yunze.common.utils.StringUtils;
/**
* 字符串格式化
*
* @author yunze
*/
public class StrFormatter
{
public static final String EMPTY_JSON = "{}";
public static final char C_BACKSLASH = '\\';
public static final char C_DELIM_START = '{';
public static final char C_DELIM_END = '}';
/**
* 格式化字符串<br>
* 此方法只是简单将占位符 {} 按照顺序替换为参数<br>
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
* 例:<br>
* 通常使用:format("this is {} for {}", "a", "b") -> this is a for b<br>
* 转义{} format("this is \\{} for {}", "a", "b") -> this is \{} for a<br>
* 转义\ format("this is \\\\{} for {}", "a", "b") -> this is \a for b<br>
*
* @param strPattern 字符串模板
* @param argArray 参数列表
* @return 结果
*/
public static String format(final String strPattern, final Object... argArray)
{
if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray))
{
return strPattern;
}
final int strPatternLength = strPattern.length();
// 初始化定义好的长度以获得更好的性能
StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
int handledPosition = 0;
int delimIndex;// 占位符所在位置
for (int argIndex = 0; argIndex < argArray.length; argIndex++)
{
delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition);
if (delimIndex == -1)
{
if (handledPosition == 0)
{
return strPattern;
}
else
{ // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果
sbuf.append(strPattern, handledPosition, strPatternLength);
return sbuf.toString();
}
}
else
{
if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH)
{
if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH)
{
// 转义符之前还有一个转义符,占位符依旧有效
sbuf.append(strPattern, handledPosition, delimIndex - 1);
sbuf.append(Convert.utf8Str(argArray[argIndex]));
handledPosition = delimIndex + 2;
}
else
{
// 占位符被转义
argIndex--;
sbuf.append(strPattern, handledPosition, delimIndex - 1);
sbuf.append(C_DELIM_START);
handledPosition = delimIndex + 1;
}
}
else
{
// 正常占位符
sbuf.append(strPattern, handledPosition, delimIndex);
sbuf.append(Convert.utf8Str(argArray[argIndex]));
handledPosition = delimIndex + 2;
}
}
}
// 加入最后一个占位符后所有的字符
sbuf.append(strPattern, handledPosition, strPattern.length());
return sbuf.toString();
}
}

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