diff --git a/LICENSE b/LICENSE index 02258e34d664cccea2f515346015ceed1258818f..3462706c121e78c43e264a2d0ee9df1c3749fd3c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,165 @@ -MIT License - -Copyright (c) 2017 https://github.com/jmdhappy/xxpay-master - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. \ No newline at end of file diff --git a/README.md b/README.md index e660ece8290df320e4a78d1a585b0ab1dc9bca87..0809a71fda2dd6bf0fc553cf925b158a03fc290f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,120 @@ -### 郑重声明 +

+ +

+

+ 适合互联网企业使用的开源支付系统 +

+

+ 👉 https://www.jeepay.vip 👈 +

+ +

+ + + + + + + + + + + star + + + github star + +

+ +
+

+ + + +

+ +------------------------------------------------------------------------------- + +## 📚 项目介绍 + +Jeepay是一套适合互联网企业使用的开源支付系统,支持多渠道服务商和普通商户模式。已对接`微信支付`,`支付宝`,`云闪付`官方接口,支持聚合码支付。 + +Jeepay使用`Spring Boot`和`Ant Design Vue`开发,集成`Spring Security`实现权限管理功能,是一套非常实用的web开发框架。 + +### 🎁 名称的由来 + +Jeepay = Jee + pay,是由原XxPay支付系统作者带领团队开发,“Jee”是公司计全科技名称的表示,pay表示支付。中文名称为计全支付,释为:计出万全、支付安全,让支付更加方便安全。 + + +### 🍟 项目体验 + +- Jeepay支付流程体验:[https://www.jeequan.com/demo/jeepay_cashier.html](https://www.jeequan.com/demo/jeepay_cashier.html "Jeepay支付体验") +- Jeepay运营平台和商户系统演体验:[https://www.jeequan.com/doc/detail_84.html](https://www.jeequan.com/doc/detail_84.html "Jeepay支付系统体验") +- Jeepay项目文档:[https://www.jeepay.vip](https://www.jeepay.vip "Jeepay项目文档") + +### 🍎 项目特点 + +* 支持多渠道对接,支付网关自动路由 +* 已对接`微信`服务商和普通商户接口,支持`V2`和`V3`接口 +* 已对接`支付宝`服务商和普通商户接口,支持RSA和RSA2签名 +* 已对接`云闪付`服务商接口,可选择多家支付机构 +* 提供http形式接口,提供各语言的`sdk`实现,方便对接 +* 接口请求和响应数据采用签名机制,保证交易安全可靠 +* 系统安全,支持`分布式`部署,`高并发` +* 管理端包括`运营平台`和`商户系统` +* 管理平台操作界面简洁、易用 +* 支付平台到商户系统的订单通知使用MQ实现,保证了高可用,消息可达 +* 支付渠道的接口参数配置界面自动化生成 +* 使用`spring security`实现权限管理 +* 前后端分离架构,方便二次开发 +* 由原`XxPay`团队开发,有着多年支付系统开发经验 + +## 🥞 系统架构 + +> Jeepay计全支付系统架构图 ![Jeepay系统架构图](https://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/jeepay_framework.png "Jeepay系统架构图") -> 原`XxPay聚合支付`项目已更名为Jeepay,由原XxPay团队开发维护。目前`Jeepay`开发已经进入收尾阶段,最晚6月初会发布源码到Github和码云上。 - -> 新版Jeepay支付系统,使用SpringBoot + Ant Vue开发,适合互联网企业搭建内部支付系统。支持普通商户和服务商模式,已对接微信、支付宝、云闪付官方通道。统一的下单接口,实现主扫/被扫(聚合)。 - -> 请关注官方网站[www.jeequan.com](https://www.jeequan.com "计全科技官网")或官方公众号(微信搜索:计全科技),获取Jeepay最新发布消息,如果您喜欢该项目,不妨随手Star下。 - -> 待发布源码时,会更公布官方qq或微信技术交流群,同时会发布使用文档及演示地址。 - -### 功能列表 +> 核心技术栈 + +| 软件名称 | 描述 | 版本 +|---|---|--- +|Jdk | Java环境 | 1.8 +|Spring Boot | 开发框架 | 2.4.5 +|Redis | 分布式缓存 | 3.2.8 或 高版本 +|MySQL | 数据库 | 5.7.X +|ActiveMQ | 消息中间件 | 5.15.8 或 高版本 +|[Ant Design Vue](https://www.antdv.com/docs/vue/introduce-cn/) | Ant Design的Vue实现,前端开发使用 | 2.1.2 +|[MyBatis-Plus](https://mp.baomidou.com/) | MyBatis增强工具 | 3.4.2 +|[WxJava](https://gitee.com/binary/weixin-java-tools) | 微新开发Java SDK | 4.0.0 +|[Hutool](https://www.hutool.cn/) | Java工具类库 | 5.6.6 + +> 项目结构 + +```lua +jeepay-ui -- https://gitee.com/jeequan/jeepay-ui + +jeepay +├── conf -- 存放系统部署使用的.yml文件 +└── docs -- 存放项目相关文档说明 + ├── script -- 项目启动shell脚本 + └── sql -- 初始化sql文件 +├── jeepay-core -- 核心依赖包 +├── jeepay-manager -- 运营平台服务端[9217] +├── jeepay-merchant -- 商户系统服务端[9218] +├── jeepay-payment -- 支付网关[9216] +├── jeepay-service -- 业务层代码 +└── jeepay-z-codegen -- mybatis代码生成 +``` + +> 开发部署 + +- 系统开发:[https://www.jeepay.vip/#/develop/dev_serv](https://www.jeepay.vip/#/develop/dev_serv) +- 通道对接:[https://www.jeepay.vip/#/develop/dev_channel](https://www.jeepay.vip/#/develop/dev_channel) +- 线上部署:[https://www.jeepay.vip/#/develop/deploy](https://www.jeepay.vip/#/develop/deploy) +- 接口文档:[https://www.jeepay.vip/#/interface/payment_api](https://www.jeepay.vip/#/interface/payment_api) + +## 🍿 功能模块 > Jeepay运营平台功能 @@ -20,7 +124,7 @@ ![Jeepay商户系统功能](https://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/jeepay_mch.png "Jeepay商户系统功能") -### 功能预览 +## 🍯 系统截图 `以下截图是从实际已完成功能界面截取,截图时间为:2021-05-29 02:05` @@ -28,18 +132,10 @@ ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/002.png "Jeepay演示界面") -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/003.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/004.png "Jeepay演示界面") - ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/005.png "Jeepay演示界面") ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/006.png "Jeepay演示界面") -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/007.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/008.png "Jeepay演示界面") - ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/009.png "Jeepay演示界面") ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/010.png "Jeepay演示界面") @@ -54,21 +150,9 @@ ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/015.png "Jeepay演示界面") -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/016.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/017.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/018.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/019.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/020.png "Jeepay演示界面") - -![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/021.png "Jeepay演示界面") - ![Jeepay演示界面](http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/yanshi/022.png "Jeepay演示界面") -### 关于我们 +## 🥪 关于我们 *** 微信扫描下面二维码,关注官方公众号:计全科技,获取更多精彩内容。 diff --git a/conf/manager/application.yml b/conf/manager/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..b97ff675f0098446671d86d5f43c9c96dd9031a1 --- /dev/null +++ b/conf/manager/application.yml @@ -0,0 +1,45 @@ +################################# +# spring boot支持外部application.yml 读取优先级为: +# 1、file:./config/(当前目录下的config文件夹) +# 2、file:./(当前目录) +# 3、classpath:/config/(classpath下的config目录) +# 4、classpath:/(classpath根目录) +# 建议: 如果是jar则放置到与jar相同的目录下, 如果解压文件放置到classpath: config目录下。 (需要将文件重命名为 application.yml ) +# +# 该yml文件只配置与环境相关的参数, 其他配置读取项目下的配置项 +# +################################# + +server: + port: 9217 #设置端口为 9217 +spring: + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: jeepay + password: 123456 + redis: + host: 127.0.0.1 + port: 6379 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + + #日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: ./logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: false #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + jwt-secret: t7w3P8X6472qWc3u #生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) diff --git a/conf/merchant/application.yml b/conf/merchant/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..029965f58860336ffbfabea1930b2aa11e7c5637 --- /dev/null +++ b/conf/merchant/application.yml @@ -0,0 +1,45 @@ +################################# +# spring boot支持外部application.yml 读取优先级为: +# 1、file:./config/(当前目录下的config文件夹) +# 2、file:./(当前目录) +# 3、classpath:/config/(classpath下的config目录) +# 4、classpath:/(classpath根目录) +# 建议: 如果是jar则放置到与jar相同的目录下, 如果解压文件放置到classpath: config目录下。 (需要将文件重命名为 application.yml ) +# +# 该yml文件只配置与环境相关的参数, 其他配置读取项目下的配置项 +# +################################# + +server: + port: 9218 # 设置端口为 9218 +spring: + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: jeepay + password: 123456 + redis: + host: 127.0.0.1 + port: 6379 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + + #日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: ./logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: false #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + jwt-secret: ARNXp4MzjOOQqxtv #生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) \ No newline at end of file diff --git a/conf/payment/application.yml b/conf/payment/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..177bcfea4b0bf7fc0002873b91d8bf81f2b41b08 --- /dev/null +++ b/conf/payment/application.yml @@ -0,0 +1,44 @@ +################################# +# spring boot支持外部application.yml 读取优先级为: +# 1、file:./config/(当前目录下的config文件夹) +# 2、file:./(当前目录) +# 3、classpath:/config/(classpath下的config目录) +# 4、classpath:/(classpath根目录) +# 建议: 如果是jar则放置到与jar相同的目录下, 如果解压文件放置到classpath: config目录下。 (需要将文件重命名为 application.yml ) +# +# 该yml文件只配置与环境相关的参数, 其他配置读取项目下的配置项 +# +################################# + +server: + port: 9216 #设置端口为 9216 +spring: + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepaydb?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: jeepay + password: 123456 + redis: + host: 127.0.0.1 + port: 6379 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + + #日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: ./logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: false #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: /home/jeepay/upload #存储根路径 ( 无需以‘/’结尾 ) \ No newline at end of file diff --git a/docs/script/app.sh b/docs/script/app.sh new file mode 100644 index 0000000000000000000000000000000000000000..5514ef05484325a6e6d320d2b9686f59103e08f8 --- /dev/null +++ b/docs/script/app.sh @@ -0,0 +1,135 @@ +#!/bin/sh +#功能简介:启动 xxx.jar 文件 +#请先cd到项目下执行 +#注意:在sh文件中=赋值,左右两侧不能有空格 +# .Power by terrfly + +#当前所在目录 +PROJECT_PATH=$(cd `dirname $0`; pwd) + +#当前所在文件夹名 +PROJECT_NAME="${PROJECT_PATH##*/}" + +#jar名称 +APP_NAME='jeepay-'$PROJECT_NAME'.jar' + +#======================================================================= + +#当前应用进行的变量标识 +APP_PID='' + + +# 重新获取APPID +function refAppPID(){ + + APP_PID=`ps -ef|grep $APP_NAME|grep -v grep|grep -v kill|awk '{print $2}'` +} + + +# 获取运行程序的pid 进程号 +function getAppPID(){ + + if [ ! $APP_PID ]; then #未获取过 + refAppPID + fi +} + + +# 启动 +function start(){ + + refAppPID #获取进程PID, 需重新获取, 避免restart时无法正确启动。 + + if [ $APP_PID ]; then + echo " [$APP_NAME] App is running. this start fail. " + return 0 + fi + + nohup java -jar $APP_NAME >/dev/null 2>start.log & + # tail -200f start.log + + echo " [$APP_NAME] App starting ... " +} + +# 停止 +function stop(){ + + getAppPID #获取进程PID + + + if [ ! $APP_PID ]; then + echo " [$APP_NAME] App is NOT running. " + return 0 + fi + + echo " [$APP_NAME] [pid=$APP_PID] [kill -15] stop process... " + kill -15 $APP_PID # kill-15 :正常退出程序 + + sleep 5 #等待5s + + # 重新获取PID + refAppPID + + #仍然存在 需要kill -9 + if [ $APP_PID ]; then + forcekill + fi + + echo " [$APP_NAME] Stop Success! " + +} + +# 检查 +function check(){ + + getAppPID #获取进程PID + + if [ $APP_PID ]; then + echo " [$APP_NAME] App is running. PID:[$APP_PID] " + else + echo " [$APP_NAME] App is NOT running. " + fi + +} + +# 强制kill进程 +function forcekill(){ + + getAppPID #获取进程PID + + if [ $APP_PID ]; then + echo " [$APP_NAME] [pid=$APP_PID] [kill -9] Kill ing ... " + kill -9 $APP_PID + echo " [$APP_NAME] [pid=$APP_PID] [kill -9] Kill Success! " + else + echo " [$APP_NAME] App is NOT running. " + fi + +} + +echo '' + +command=$1 + +if [ "${command}" == "start" ]; then + start + +elif [ "${command}" == "stop" ]; then + stop + +elif [ "${command}" == "restart" ]; then + stop + start + +elif [ "${command}" == "check" ]; then + check + +elif [ "${command}" == "kill" ]; then + forcekill + +else + echo "Usage: $0 {start|stop|restart|check|kill|}" +fi + +echo '' + diff --git a/docs/sql/init.sql b/docs/sql/init.sql new file mode 100644 index 0000000000000000000000000000000000000000..e058d44428e58ce9b97f2c2f1afdd03df8f994b7 --- /dev/null +++ b/docs/sql/init.sql @@ -0,0 +1,567 @@ +# +# * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). +# *

+# * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; +# * you may not use this file except in compliance with the License. +# * You may obtain a copy of the License at +# *

+# * http://www.gnu.org/licenses/lgpl.html +# *

+# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# +##### ↓↓↓↓↓↓↓↓↓↓ 表结构DDL ↓↓↓↓↓↓↓↓↓↓ ##### + +-- RBAC设计思路: [用户] 1<->N [角色] 1<->N [权限] + +-- 权限表 +DROP TABLE IF EXISTS `t_sys_entitlement`; +CREATE TABLE `t_sys_entitlement` ( + `ent_id` VARCHAR(32) NOT NULL COMMENT '权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD', + `ent_name` VARCHAR(32) NOT NULL COMMENT '权限名称', + `menu_icon` VARCHAR(32) COMMENT '菜单图标', + `menu_uri` VARCHAR(128) COMMENT '菜单uri/路由地址', + `component_name` VARCHAR(32) COMMENT '组件Name(前后端分离使用)', + `ent_type` CHAR(2) NOT NULL COMMENT '权限类型 ML-左侧显示菜单, MO-其他菜单, PB-页面/按钮', + `quick_jump` TINYINT(6) NOT NULL DEFAULT 0 COMMENT '快速开始菜单 0-否, 1-是', + `state` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '状态 0-停用, 1-启用', + `pid` VARCHAR(32) NOT NULL COMMENT '父ID', + `ent_sort` INT(11) NOT NULL DEFAULT 0 COMMENT '排序字段, 规则:正序', + `system` VARCHAR(8) NOT NULL COMMENT '所属系统: MGR-运营平台, MCH-商户中心', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`ent_id`, `system`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统权限表'; + +-- 角色表 +DROP TABLE IF EXISTS `t_sys_role`; +CREATE TABLE `t_sys_role` ( + `role_id` VARCHAR(32) NOT NULL COMMENT '角色ID, ROLE_开头', + `role_name` VARCHAR(32) NOT NULL COMMENT '角色名称', + `system` VARCHAR(8) NOT NULL COMMENT '所属系统: MGR-运营平台, MCH-商户中心', + `belong_info_id` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '所属商户ID / 0(平台)', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统角色表'; + +-- 角色<->权限 关联表 +DROP TABLE IF EXISTS `t_sys_role_ent_rela`; +CREATE TABLE `t_sys_role_ent_rela` ( + `role_id` VARCHAR(32) NOT NULL COMMENT '角色ID', + `ent_id` VARCHAR(32) NOT NULL COMMENT '权限ID' , + PRIMARY KEY (`role_id`, `ent_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统角色权限关联表'; + +-- 系统用户表 +DROP TABLE IF EXISTS `t_sys_user`; +CREATE TABLE `t_sys_user` ( + `sys_user_id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '系统用户ID', + `login_username` VARCHAR(32) NOT NULL COMMENT '登录用户名', + `realname` VARCHAR(32) NOT NULL COMMENT '真实姓名', + `telphone` VARCHAR(32) NOT NULL COMMENT '手机号', + `sex` TINYINT(6) NOT NULL DEFAULT 0 COMMENT '性别 0-未知, 1-男, 2-女', + `avatar_url` VARCHAR(128) COMMENT '头像地址', + `user_no` VARCHAR(32) COMMENT '员工编号', + `is_admin` TINYINT(6) NOT NULL DEFAULT 0 COMMENT '是否超管(超管拥有全部权限) 0-否 1-是', + `state` TINYINT(6) NOT NULL DEFAULT 0 COMMENT '状态 0-停用 1-启用', + `system` VARCHAR(8) NOT NULL COMMENT '所属系统: MGR-运营平台, MCH-商户中心', + `belong_info_id` VARCHAR(64) NOT NULL DEFAULT '0' COMMENT '所属商户ID / 0(平台)', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`sys_user_id`), + UNIQUE KEY(`system`,`login_username`), + UNIQUE KEY(`system`,`telphone`), + UNIQUE KEY(`system`, `user_no`) +) ENGINE=InnoDB AUTO_INCREMENT=100001 DEFAULT CHARSET=utf8mb4 COMMENT='系统用户表'; + +-- 系统用户认证表 +DROP TABLE IF EXISTS `t_sys_user_auth`; +CREATE TABLE `t_sys_user_auth` ( + `auth_id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `user_id` BIGINT(20) NOT NULL COMMENT 'user_id', + `identity_type` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '登录类型 1-登录账号 2-手机号 3-邮箱 10-微信 11-QQ 12-支付宝 13-微博', + `identifier` VARCHAR(128) NOT NULL COMMENT '认证标识 ( 用户名 | open_id )', + `credential` VARCHAR(128) NOT NULL COMMENT '密码凭证', + `salt` VARCHAR(128) NOT NULL COMMENT 'salt', + `system` VARCHAR(8) NOT NULL COMMENT '所属系统: MGR-运营平台, MCH-商户中心', + PRIMARY KEY (`auth_id`) +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='系统用户认证表'; + +-- 操作员<->角色 关联表 +DROP TABLE IF EXISTS `t_sys_user_role_rela`; +CREATE TABLE `t_sys_user_role_rela` ( + `user_id` BIGINT(20) NOT NULL COMMENT '用户ID', + `role_id`VARCHAR(32) NOT NULL COMMENT '角色ID', + PRIMARY KEY (`user_id`, `role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='操作员<->角色 关联表'; + + +-- 系统配置表 +DROP TABLE IF EXISTS `t_sys_config`; +CREATE TABLE `t_sys_config` ( + `config_key` VARCHAR(50) NOT NULL COMMENT '配置KEY', + `config_name` VARCHAR(50) NOT NULL COMMENT '配置名称', + `config_desc` VARCHAR(200) NOT NULL COMMENT '描述信息', + `group_key` VARCHAR(50) NOT NULL COMMENT '分组key', + `group_name` VARCHAR(50) NOT NULL COMMENT '分组名称', + `config_val` TEXT NOT NULL COMMENT '配置内容项', + `type` VARCHAR(20) NOT NULL DEFAULT 'text' COMMENT '类型: text-输入框, textarea-多行文本, uploadImg-上传图片, switch-开关', + `sort_num` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '显示顺序', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`config_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统配置表'; + +-- 系统操作日志表 +DROP TABLE IF EXISTS `t_sys_log`; +CREATE TABLE `t_sys_log` ( + `sys_log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id', + `user_id` bigint(20) DEFAULT NULL COMMENT '系统用户ID', + `user_name` varchar(32) DEFAULT NULL COMMENT '用户姓名', + `user_ip` varchar(128) NOT NULL DEFAULT '' COMMENT '用户IP', + `system` varchar(8) NOT NULL COMMENT '所属系统: MGR-运营平台, MCH-商户中心', + `method_name` varchar(128) NOT NULL DEFAULT '' COMMENT '方法名', + `method_remark` varchar(128) NOT NULL DEFAULT '' COMMENT '方法描述', + `req_url` varchar(256) NOT NULL DEFAULT '' COMMENT '请求地址', + `opt_req_param` varchar(2048) NOT NULL DEFAULT '' COMMENT '操作请求参数', + `opt_res_info` varchar(2048) NOT NULL DEFAULT '' COMMENT '操作响应结果', + `created_at` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + PRIMARY KEY (`sys_log_id`) +) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COMMENT = '系统操作日志表'; + +-- 1.商户信息表 +DROP TABLE IF EXISTS t_mch_info; +CREATE TABLE `t_mch_info` ( + `mch_no` VARCHAR(64) NOT NULL COMMENT '商户号', + `mch_name` VARCHAR(64) NOT NULL COMMENT '商户名称', + `mch_short_name` VARCHAR(32) NOT NULL COMMENT '商户简称', + `type` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '类型: 1-普通商户, 2-特约商户(服务商模式)', + `isv_no` VARCHAR(64) COMMENT '服务商号', + `contact_name` VARCHAR(32) COMMENT '联系人姓名', + `contact_tel` VARCHAR(32) COMMENT '联系人手机号', + `contact_email` VARCHAR(32) COMMENT '联系人邮箱', + `private_key` VARCHAR(128) COMMENT '私钥', + `state` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '商户状态: 0-停用, 1-正常', + `remark` VARCHAR(128) COMMENT '商户备注', + `init_user_id` BIGINT(20) DEFAULT NULL COMMENT '初始用户ID(创建商户时,允许商户登录的用户)', + `created_uid` BIGINT(20) COMMENT '创建者用户ID', + `created_by` VARCHAR(64) COMMENT '创建者姓名', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`mch_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户信息表'; + +-- 2.服务商信息表 +DROP TABLE IF EXISTS t_isv_info; +CREATE TABLE `t_isv_info` ( + `isv_no` VARCHAR(64) NOT NULL COMMENT '服务商号', + `isv_name` VARCHAR(64) NOT NULL COMMENT '服务商名称', + `isv_short_name` VARCHAR(32) NOT NULL COMMENT '服务商简称', + `contact_name` VARCHAR(32) COMMENT '联系人姓名', + `contact_tel` VARCHAR(32) COMMENT '联系人手机号', + `contact_email` VARCHAR(32) COMMENT '联系人邮箱', + `state` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '状态: 0-停用, 1-正常', + `remark` VARCHAR(128) DEFAULT NULL COMMENT '备注', + `created_uid` BIGINT(20) COMMENT '创建者用户ID', + `created_by` VARCHAR(64) COMMENT '创建者姓名', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`isv_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='服务商信息表'; + +-- 3.支付方式表 pay_way +DROP TABLE IF EXISTS t_pay_way; +CREATE TABLE `t_pay_way` ( + `way_code` VARCHAR(20) NOT NULL COMMENT '支付方式代码 例如: wxpay_jsapi', + `way_name` VARCHAR(20) NOT NULL COMMENT '支付方式名称', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`way_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付方式表'; + +-- 4.支付接口定义表 +DROP TABLE IF EXISTS t_pay_interface_define; +CREATE TABLE `t_pay_interface_define` ( + `if_code` VARCHAR(20) NOT NULL COMMENT '接口代码 全小写 wxpay alipay ', + `if_name` VARCHAR(20) NOT NULL COMMENT '接口名称', + `is_mch_mode` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '是否支持普通商户模式: 0-不支持, 1-支持', + `is_isv_mode` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '是否支持服务商子商户模式: 0-不支持, 1-支持', + `isv_params` VARCHAR(4096) DEFAULT NULL COMMENT 'ISV接口配置定义描述,json字符串', + `isvsub_mch_params` VARCHAR(4096) DEFAULT NULL COMMENT '特约商户接口配置定义描述,json字符串', + `normal_mch_params` VARCHAR(4096) DEFAULT NULL COMMENT '普通商户接口配置定义描述,json字符串', + `way_codes` JSON NOT NULL COMMENT '支持的支付方式 ["wxpay_jsapi", "wxpay_bar"]', + `icon` VARCHAR(256) DEFAULT NULL COMMENT '页面展示:卡片-图标', + `bg_color` VARCHAR(20) DEFAULT NULL COMMENT '页面展示:卡片-背景色', + `state` TINYINT(6) NOT NULL DEFAULT 1 COMMENT '状态: 0-停用, 1-启用', + `remark` VARCHAR(128) DEFAULT NULL COMMENT '备注', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`if_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付接口定义表'; + +-- 5.支付接口配置参数表 +DROP TABLE IF EXISTS t_pay_interface_config; +CREATE TABLE `t_pay_interface_config` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `info_type` TINYINT(6) NOT NULL COMMENT '账号类型:1-服务商 2-商户', + `info_id` VARCHAR(64) NOT NULL COMMENT '服务商或商户No', + `if_code` VARCHAR(20) NOT NULL COMMENT '支付接口代码', + `if_params` VARCHAR(4096) NOT NULL COMMENT '接口配置参数,json字符串', + `if_rate` DECIMAL(20,6) DEFAULT NULL COMMENT '支付接口费率', + `state` TINYINT(6) NOT NULL default 1 COMMENT '状态: 0-停用, 1-启用', + `remark` VARCHAR(128) DEFAULT NULL COMMENT '备注', + `created_uid` BIGINT(20) COMMENT '创建者用户ID', + `created_by` VARCHAR(64) COMMENT '创建者姓名', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_uid` BIGINT(20) COMMENT '更新者用户ID', + `updated_by` VARCHAR(64) COMMENT '更新者姓名', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `Uni_InfoType_InfoId_IfCode` (`info_type`, `info_id`, `if_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付接口配置参数表'; + + +-- 6.商户支付通道表 (允许商户 支付方式 对应多个支付接口的配置) +DROP TABLE IF EXISTS t_mch_pay_passage; +CREATE TABLE `t_mch_pay_passage` ( + `id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `mch_no` VARCHAR(64) NOT NULL COMMENT '商户号', + `if_code` VARCHAR(20) NOT NULL COMMENT '支付接口', + `way_code` VARCHAR(20) NOT NULL COMMENT '支付方式', + `rate` DECIMAL(20,6) NOT NULL COMMENT '支付方式费率', + `risk_config` JSON DEFAULT NULL COMMENT '风控数据', + `state` TINYINT(6) NOT NULL COMMENT '状态: 0-停用, 1-启用', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `Uni_MchNo_WayCode` (`mch_no`,`if_code`, `way_code`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户支付通道表'; + + +-- 轮询表 +-- mch_no, way_code, 轮询策略。 + + +-- 7.支付订单表 +DROP TABLE IF EXISTS t_pay_order; +CREATE TABLE `t_pay_order` ( + `pay_order_id` VARCHAR(30) NOT NULL COMMENT '支付订单号', + `mch_no` VARCHAR(64) NOT NULL COMMENT '商户号', + `isv_no` VARCHAR(64) DEFAULT NULL COMMENT '服务商号', + `mch_name` VARCHAR(30) NOT NULL COMMENT '商户名称', + `mch_type` TINYINT(6) NOT NULL COMMENT '类型: 1-普通商户, 2-特约商户(服务商模式)', + `mch_order_no` VARCHAR(64) NOT NULL COMMENT '商户订单号', + `if_code` VARCHAR(20) COMMENT '支付接口代码', + `way_code` VARCHAR(20) NOT NULL COMMENT '支付方式代码', + `amount` BIGINT(20) NOT NULL COMMENT '支付金额,单位分', + `currency` VARCHAR(3) NOT NULL DEFAULT 'cny' COMMENT '三位货币代码,人民币:cny', + `state` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '支付状态: 0-订单生成, 1-支付中, 2-支付成功, 3-支付失败, 4-已撤销, 5-已退款, 6-订单关闭', + `notify_state` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '向下游回调状态, 0-未发送, 1-已发送', + `client_ip` VARCHAR(32) DEFAULT NULL COMMENT '客户端IP', + `subject` VARCHAR(64) NOT NULL COMMENT '商品标题', + `body` VARCHAR(256) NOT NULL COMMENT '商品描述信息', + `channel_extra` VARCHAR(512) DEFAULT NULL COMMENT '特定渠道发起额外参数', + `channel_user` VARCHAR(64) DEFAULT NULL COMMENT '渠道用户标识,如微信openId,支付宝账号', + `channel_order_no` VARCHAR(64) DEFAULT NULL COMMENT '渠道订单号', + `refund_times` INT NOT NULL DEFAULT 0 COMMENT '退款次数', + `refund_amount` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '退款总金额,单位分', + `division_flag` TINYINT(6) DEFAULT 0 COMMENT '订单分账标志:0-否 1-是', + `division_time` DATETIME COMMENT '预计分账发起时间', + `err_code` VARCHAR(64) DEFAULT NULL COMMENT '渠道支付错误码', + `err_msg` VARCHAR(128) DEFAULT NULL COMMENT '渠道支付错误描述', + `ext_param` VARCHAR(128) DEFAULT NULL COMMENT '商户扩展参数', + `notify_url` VARCHAR(128) NOT NULL default '' COMMENT '异步通知地址', + `return_url` VARCHAR(128) DEFAULT '' COMMENT '页面跳转地址', + `expired_time` DATETIME DEFAULT NULL COMMENT '订单失效时间', + `success_time` DATETIME DEFAULT NULL COMMENT '订单支付成功时间', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`pay_order_id`), + UNIQUE KEY `Uni_MchNo_MchOrderNo` (`mch_no`, `mch_order_no`), + INDEX(`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付订单表'; + + +-- 8.商户通知记录表 +DROP TABLE IF EXISTS t_mch_notify_record; +CREATE TABLE `t_mch_notify_record` ( + `notify_id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '商户通知记录ID', + `order_id` VARCHAR(64) NOT NULL COMMENT '订单ID', + `order_type` TINYINT(6) NOT NULL COMMENT '订单类型:1-支付,2-退款', + `mch_order_no` VARCHAR(64) NOT NULL COMMENT '商户订单号', + `mch_no` VARCHAR(64) NOT NULL COMMENT '商户号', + `isv_no` VARCHAR(64) COMMENT '服务商号', + `notify_url` TEXT NOT NULL COMMENT '通知地址', + `res_result` TEXT DEFAULT NULL COMMENT '通知响应结果', + `notify_count` INT(11) NOT NULL DEFAULT '0' COMMENT '通知次数', + `state` TINYINT(6) NOT NULL DEFAULT '1' COMMENT '通知状态,1-通知中,2-通知成功,3-通知失败', + `last_notify_time` DATETIME DEFAULT NULL COMMENT '最后一次通知时间', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`notify_id`), + UNIQUE KEY `Uni_OrderId_Type` (`order_id`, `order_type`) +) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COMMENT='商户通知记录表'; + + +-- 9.订单接口数据快照(加密存储) +DROP TABLE IF EXISTS `t_order_snapshot`; +CREATE TABLE `t_order_snapshot` ( + `order_id` VARCHAR(64) NOT NULL COMMENT '订单ID', + `order_type` TINYINT(6) NOT NULL COMMENT '订单类型: 1-支付, 2-退款', + `mch_req_data` TEXT DEFAULT NULL COMMENT '下游请求数据', + `mch_req_time` DATETIME DEFAULT NULL COMMENT '下游请求时间', + `mch_resp_data` TEXT DEFAULT NULL COMMENT '向下游响应数据', + `mch_resp_time` DATETIME DEFAULT NULL COMMENT '向下游响应时间', + `channel_req_data` TEXT DEFAULT NULL COMMENT '向上游请求数据', + `channel_req_time` DATETIME DEFAULT NULL COMMENT '向上游请求时间', + `channel_resp_data` TEXT DEFAULT NULL COMMENT '上游响应数据', + `channel_resp_time` DATETIME DEFAULT NULL COMMENT '上游响应时间', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`order_id`, `order_type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单接口数据快照'; + + +-- 10.退款订单表 +DROP TABLE IF EXISTS t_refund_order; +CREATE TABLE `t_refund_order` ( + `refund_order_id` VARCHAR(30) NOT NULL COMMENT '退款订单号', + `pay_order_id` VARCHAR(30) NOT NULL COMMENT '支付订单号', + `channel_pay_order_no` VARCHAR(64) DEFAULT NULL COMMENT '渠道支付单号', + `mch_no` VARCHAR(64) NOT NULL COMMENT '商户号', + `mch_type` TINYINT(6) NOT NULL COMMENT '类型: 1-普通商户, 2-特约商户(服务商模式)', + `mch_refund_no` VARCHAR(64) NOT NULL COMMENT '商户退款单号', + `isv_no` VARCHAR(64) DEFAULT NULL COMMENT '服务商号', + `way_code` VARCHAR(20) NOT NULL COMMENT '支付方式代码', + `if_code` VARCHAR(20) NOT NULL COMMENT '支付接口代码', + `pay_amount` BIGINT(20) NOT NULL COMMENT '支付金额,单位分', + `refund_amount` BIGINT(20) NOT NULL COMMENT '退款金额,单位分', + `currency` VARCHAR(3) NOT NULL DEFAULT 'cny' COMMENT '三位货币代码,人民币:cny', + `state` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败', + `result` TINYINT(6) NOT NULL DEFAULT '0' COMMENT '退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败', + `client_ip` VARCHAR(32) DEFAULT NULL COMMENT '客户端IP', + `remark` VARCHAR(256) DEFAULT NULL COMMENT '备注', + `channel_order_no` VARCHAR(32) DEFAULT NULL COMMENT '渠道订单号', + `channel_err_code` VARCHAR(128) DEFAULT NULL COMMENT '渠道错误码', + `channel_err_msg` VARCHAR(128) DEFAULT NULL COMMENT '渠道错误描述', + `channel_extra` VARCHAR(512) DEFAULT NULL COMMENT '特定渠道发起时额外参数', + `notify_url` VARCHAR(128) DEFAULT NULL COMMENT '通知地址', + `ext_param` VARCHAR(64) DEFAULT NULL COMMENT '扩展参数', + `success_time` DATETIME DEFAULT NULL COMMENT '订单退款成功时间', + `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) COMMENT '创建时间', + `updated_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6) COMMENT '更新时间', + PRIMARY KEY (`refund_order_id`), + UNIQUE KEY `Uni_MchNo_MchRefundNo` (`mch_no`, `mch_refund_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='退款订单表'; + + +##### ↑↑↑↑↑↑↑↑↑↑ 表结构DDL ↑↑↑↑↑↑↑↑↑↑ ##### + +##### ↓↓↓↓↓↓↓↓↓↓ 初始化DML ↓↓↓↓↓↓↓↓↓↓ ##### + +-- 权限表数据 ( 不包含根目录 ) +insert into t_sys_entitlement values('ENT_COMMONS', '系统通用菜单', 'no-icon', '', 'RouteView', 'MO', 0, 1, 'ROOT', '-1', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_C_USERINFO', '个人中心', 'no-icon', '/current/userinfo', 'CurrentUserInfo', 'MO', 0, 1, 'ENT_COMMONS', '-1', 'MGR', now(), now()); + +insert into t_sys_entitlement values('ENT_C_MAIN', '主页', 'home', '/main', 'MainPage', 'ML', 0, 1, 'ROOT', '1', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_C_MAIN_PAY_AMOUNT_WEEK', '主页周支付统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_C_MAIN', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_C_MAIN_NUMBER_COUNT', '主页数量总统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_C_MAIN', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_C_MAIN_PAY_COUNT', '主页交易统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_C_MAIN', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_C_MAIN_PAY_TYPE_COUNT', '主页交易方式统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_C_MAIN', '0', 'MGR', now(), now()); + +-- 商户管理 +insert into t_sys_entitlement values('ENT_MCH_INFO', '商户管理', 'shop', '', 'RouteView', 'ML', 0, 1, 'ROOT', '30', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_INFO_LIST', '商户列表', 'profile', '/mch', 'MchListPage', 'ML', 0, 1, 'ENT_MCH_INFO', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_INFO_ADD', '按钮:新增', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_INFO_EDIT', '按钮:编辑', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_INFO_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_INFO_DEL', '按钮:删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_LIST', '商户支付参数配置列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_ADD', '商户支付参数配置', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_CONFIG_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_VIEW', '商户支付参数配置详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_CONFIG_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_LIST', '商户支付通道配置列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_CONFIG', '商户支付通道配置入口', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_PASSAGE_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_ADD', '商户支付通道配置保存', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_PASSAGE_LIST', '0', 'MGR', now(), now()); + +-- 服务商管理 +insert into t_sys_entitlement values('ENT_ISV_INFO', '服务商管理', 'block', '', 'RouteView', 'ML', 0, 1, 'ROOT', '40', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_INFO_LIST', '服务商列表', 'profile', '/isv', 'IsvListPage', 'ML', 0, 1, 'ENT_ISV_INFO', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_INFO_ADD', '按钮:新增', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_INFO_EDIT', '按钮:编辑', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_INFO_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_INFO_DEL', '按钮:删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_PAY_CONFIG_LIST', '服务商支付参数配置列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_INFO_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_PAY_CONFIG_ADD', '服务商支付参数配置', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_PAY_CONFIG_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_ISV_PAY_CONFIG_VIEW', '服务商支付参数配置详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_ISV_PAY_CONFIG_LIST', '0', 'MGR', now(), now()); + +-- 订单管理 +insert into t_sys_entitlement values('ENT_ORDER', '订单管理', 'transaction', '', 'RouteView', 'ML', 0, 1, 'ROOT', '50', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PAY_ORDER_LIST', '支付订单', 'account-book', '/pay', 'PayOrderListPage', 'ML', 0, 1, 'ENT_ORDER', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PAY_ORDER_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PAY_ORDER_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_REFUND_ORDER_LIST', '退款订单', 'exception', '/refund', 'RefundOrderListPage', 'ML', 0, 1, 'ENT_ORDER', '20', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_REFUND_ORDER_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_REFUND_ORDER_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_NOTIFY_LIST', '商户通知', 'notification', '/notify', 'MchNotifyListPage', 'ML', 0, 1, 'ENT_ORDER', '30', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_NOTIFY_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_NOTIFY_LIST', '0', 'MGR', now(), now()); + +-- 支付配置菜单 +insert into t_sys_entitlement values('ENT_PC', '支付配置', 'file-done', '', 'RouteView', 'ML', 0, 1, 'ROOT', '60', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE', '支付接口', 'interaction', '/ifdefines', 'IfDefinePage', 'ML', 0, 1, 'ENT_PC', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_LIST', '页面:支付接口定义列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_SEARCH', '页面:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_ADD', '按钮:新增', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_EDIT', '按钮:修改', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_IF_DEFINE_DEL', '按钮:删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_IF_DEFINE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY', '支付方式', 'appstore', '/payways', 'PayWayPage', 'ML', 0, 1, 'ENT_PC', '20', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_LIST', '页面:支付方式列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_SEARCH', '页面:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_ADD', '按钮:新增', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_EDIT', '按钮:修改', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_PC_WAY_DEL', '按钮:删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PC_WAY', '0', 'MGR', now(), now()); + +-- 系统管理 +insert into t_sys_entitlement values('ENT_SYS_CONFIG', '系统管理', 'setting', '', 'RouteView', 'ML', 0, 1, 'ROOT', '200', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR', '用户角色管理', 'team', '', 'RouteView', 'ML', 0, 1, 'ENT_SYS_CONFIG', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER', '操作员管理', 'contacts', '/users', 'SysUserPage', 'ML', 0, 1, 'ENT_UR', '10', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_LIST', '页面:操作员列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_SEARCH', '按钮:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_ADD', '按钮:添加操作员', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_VIEW', '按钮: 详情', '', 'no-icon', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_EDIT', '按钮: 修改基本信息', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_UPD_ROLE', '按钮: 角色分配', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MGR', now(), now()); + + insert into t_sys_entitlement values('ENT_UR_ROLE', '角色管理', 'user', '/roles', 'RolePage', 'ML', 0, 1, 'ENT_UR', '20', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_LIST', '页面:角色列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_SEARCH', '页面:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_ADD', '按钮:添加角色', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_DIST', '按钮: 分配权限', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_EDIT', '按钮: 修改基本信息', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_DEL', '按钮: 删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MGR', now(), now()); + + insert into t_sys_entitlement values('ENT_UR_ROLE_ENT', '权限管理', 'apartment', '/ents', 'EntPage', 'ML', 0, 1, 'ENT_UR', '30', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_ENT_LIST', '页面: 权限列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE_ENT', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_ENT_EDIT', '按钮: 权限变更', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE_ENT', '0', 'MGR', now(), now()); + + insert into t_sys_entitlement values('ENT_SYS_CONFIG_INFO', '系统配置', 'setting', '/config', 'SysConfigPage', 'ML', 0, 1, 'ENT_SYS_CONFIG', '15', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_SYS_CONFIG_EDIT', '按钮: 修改', 'no-icon', '', '', 'PB', 0, 1, 'ENT_SYS_CONFIG_INFO', '0', 'MGR', now(), now()); + + insert into t_sys_entitlement values('ENT_SYS_LOG_LIST', '系统日志', 'file-text', '/log', 'SysLogPage', 'ML', 0, 1, 'ENT_SYS_CONFIG', '20', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_SYS_LOG_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_SYS_LOG_LIST', '0', 'MGR', now(), now()); + insert into t_sys_entitlement values('ENT_SYS_LOG_DEL', '按钮:删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_SYS_LOG_LIST', '0', 'MGR', now(), now()); + + +-- 【商户系统】 主页 +insert into t_sys_entitlement values('ENT_COMMONS', '系统通用菜单', 'no-icon', '', 'RouteView', 'MO', 0, 1, 'ROOT', '-1', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_C_USERINFO', '个人中心', 'no-icon', '/current/userinfo', 'CurrentUserInfo', 'MO', 0, 1, 'ENT_COMMONS', '-1', 'MCH', now(), now()); + +insert into t_sys_entitlement values('ENT_MCH_MAIN', '主页', 'home', '/main', 'MainPage', 'ML', 0, 1, 'ROOT', '1', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_MAIN_PAY_AMOUNT_WEEK', '主页周支付统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_MAIN', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_MAIN_NUMBER_COUNT', '主页数量总统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_MAIN', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_MAIN_PAY_COUNT', '主页交易统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_MAIN', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_MAIN_PAY_TYPE_COUNT', '主页交易方式统计', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_MAIN', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_MAIN_USER_INFO', '主页用户信息', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_MAIN', '0', 'MCH', now(), now()); + +-- 【商户系统】 商户中心 +-- insert into t_sys_entitlement values('ENT_MCH_CENTER', '商户中心', 'team', '', 'RouteView', 'ML', 0, 'ROOT', '10', 'MCH', now(), now()); +-- insert into t_sys_entitlement values('ENT_MCH_INFO', '商户信息', 'user', '/mch', 'MchInfoPage', 'ML', 0, 'ENT_MCH_CENTER', '10', 'MCH', now(), now()); +-- insert into t_sys_entitlement values('ENT_MCH_INFO_EDIT', '按钮:修改商户信息', 'no-icon', '', '', 'PB', 0, 'ENT_MCH_INFO', '0', 'MCH', now(), now()); + +-- 【商户系统】 订单管理 +insert into t_sys_entitlement values('ENT_ORDER', '订单中心', 'transaction', '', 'RouteView', 'ML', 0, 1, 'ROOT', '20', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_PAY_ORDER_LIST', '订单管理', 'account-book', '/pay', 'PayOrderListPage', 'ML', 0, 1, 'ENT_ORDER', '10', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_PAY_ORDER_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_PAY_ORDER_LIST', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_REFUND_ORDER_LIST', '退款记录', 'exception', '/refund', 'RefundOrderListPage', 'ML', 0, 1, 'ENT_ORDER', '20', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_REFUND_ORDER_VIEW', '按钮:详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_REFUND_ORDER_LIST', '0', 'MCH', now(), now()); + +-- 【商户系统】 支付配置 +insert into t_sys_entitlement values('ENT_MCH_PC', '支付配置', 'file-done', '', 'RouteView', 'ML', 0, 1, 'ROOT', '30', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_LIST', '支付参数', 'interaction', '/pay/config', 'PayConfigPage', 'ML', 0, 1, 'ENT_MCH_PC', '10', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_ADD', '商户支付参数配置', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_CONFIG_LIST', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_CONFIG_VIEW', '商户支付参数配置详情', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_CONFIG_LIST', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_LIST', '支付通道', 'appstore', '/pay/passage', 'PayPassagePage', 'ML', 0, 1, 'ENT_MCH_PC', '20', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_CONFIG', '商户支付通道配置入口', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_PASSAGE_LIST', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_MCH_PAY_PASSAGE_ADD', '商户支付通道配置保存', 'no-icon', '', '', 'PB', 0, 1, 'ENT_MCH_PAY_PASSAGE_LIST', '0', 'MCH', now(), now()); + + +-- 【商户系统】 系统管理 +insert into t_sys_entitlement values('ENT_SYS_CONFIG', '系统管理', 'setting', '', 'RouteView', 'ML', 0, 1, 'ROOT', '200', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR', '用户角色管理', 'team', '', 'RouteView', 'ML', 0, 1, 'ENT_SYS_CONFIG', '10', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER', '操作员管理', 'contacts', '/users', 'SysUserPage', 'ML', 0, 1, 'ENT_UR', '10', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_LIST', '页面:操作员列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_SEARCH', '按钮:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_ADD', '按钮:添加操作员', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_VIEW', '按钮: 详情', '', 'no-icon', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_EDIT', '按钮: 修改基本信息', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_USER_UPD_ROLE', '按钮: 角色分配', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_USER', '0', 'MCH', now(), now()); + + insert into t_sys_entitlement values('ENT_UR_ROLE', '角色管理', 'user', '/roles', 'RolePage', 'ML', 0, 1, 'ENT_UR', '20', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_LIST', '页面:角色列表', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_SEARCH', '页面:搜索', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_ADD', '按钮:添加角色', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_DIST', '按钮: 分配权限', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_EDIT', '按钮: 修改名称', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + insert into t_sys_entitlement values('ENT_UR_ROLE_DEL', '按钮: 删除', 'no-icon', '', '', 'PB', 0, 1, 'ENT_UR_ROLE', '0', 'MCH', now(), now()); + +-- 默认角色 +insert into t_sys_role values ('ROLE_ADMIN', '系统管理员', 'MGR', '0', '2021-05-01'); +insert into t_sys_role values ('ROLE_OP', '普通操作员', 'MGR', '0', '2021-05-01'); +-- 角色权限关联, [超管]用户 拥有所有权限 +-- insert into t_sys_role_ent_rela select '801', ent_id from t_sys_entitlement; + +-- 超管用户: jeepay / jeepay123 +insert into t_sys_user values (801, 'jeepay', '超管', '13000000001', '1', 'https://edu-system.oss-cn-beijing.aliyuncs.com/1/img/z/avatar_1.jpg', 'D0001', 1, 1, 'MGR', '0', '2020-06-13', '2020-06-13'); +insert into t_sys_user_auth values (801, '801', '1', 'jeepay', '$2a$10$WKuPJKE1XhX15ibqDM745eOCaZZVUiRitUjEyX6zVNd9k.cQXfzGa', 'testkey', 'MGR'); + +-- insert into t_sys_user_role_rela values (801, 801); + +INSERT INTO `t_sys_config` VALUES ('mgrSiteUrl', '运营平台网址(不包含结尾/)', '运营平台网址(不包含结尾/)', 'applicationConfig', '系统应用配置', 'http://127.0.0.1:9217', 'text', 0, '2021-5-18 14:46:10'); +INSERT INTO `t_sys_config` VALUES ('mchSiteUrl', '商户平台网址(不包含结尾/)', '商户平台网址(不包含结尾/)', 'applicationConfig', '系统应用配置', 'http://127.0.0.1:9218', 'text', 0, '2021-5-18 14:46:10'); +INSERT INTO `t_sys_config` VALUES ('paySiteUrl', '支付网关地址(不包含结尾/)', '支付网关地址(不包含结尾/)', 'applicationConfig', '系统应用配置', 'http://127.0.0.1:9216', 'text', 0, '2021-5-18 14:46:10'); +INSERT INTO `t_sys_config` VALUES ('ossPublicSiteUrl', '公共oss访问地址(不包含结尾/)', '公共oss访问地址(不包含结尾/)', 'applicationConfig', '系统应用配置', 'http://127.0.0.1:9217/api/anon/localOssFiles', 'text', 0, '2021-5-18 14:46:10'); + + +-- 初始化支付方式 +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_BAR', '支付宝条码'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_JSAPI', '支付宝生活号'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_APP', '支付宝APP'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_WAP', '支付宝WAP'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_PC', '支付宝PC网站'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('ALI_QR', '支付宝二维码'); + +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_BAR', '微信条码'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_JSAPI', '微信公众号'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_APP', '微信APP'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_H5', '微信H5'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_NATIVE', '微信扫码'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('WX_LITE', '微信小程序'); + +INSERT INTO t_pay_way (way_code, way_name) VALUES ('YSF_BAR', '云闪付条码'); +INSERT INTO t_pay_way (way_code, way_name) VALUES ('YSF_JSAPI', '云闪付jsapi'); + +-- 初始化支付接口定义 +INSERT INTO t_pay_interface_define (if_code, if_name, is_mch_mode, is_isv_mode, isv_params, isvsub_mch_params, normal_mch_params, way_codes, icon, bg_color, state, remark) +VALUES ('alipay', '支付宝官方', 1, 1, + '[{"name":"sandbox","desc":"环境配置","type":"radio","verify":"","values":"1,0","titles":"沙箱环境,生产环境","verify":"required"},{"name":"pid","desc":"合作伙伴身份(PID)","type":"text","verify":"required"},{"name":"appId","desc":"应用App ID","type":"text","verify":"required"},{"name":"privateKey", "desc":"应用私钥", "type": "textarea","verify":"required"},{"name":"alipayPublicKey", "desc":"支付宝公钥(不使用证书时必填)", "type": "textarea"},{"name":"signType","desc":"接口签名方式(推荐使用RSA2)","type":"radio","verify":"","values":"RSA,RSA2","titles":"RSA,RSA2","verify":"required"},{"name":"useCert","desc":"公钥证书","type":"radio","verify":"","values":"1,0","titles":"使用证书(请使用RSA2私钥),不使用证书"},{"name":"appPublicCert","desc":"应用公钥证书(.crt格式)","type":"file","verify":""},{"name":"alipayPublicCert","desc":"支付宝公钥证书(.crt格式)","type":"file","verify":""},{"name":"alipayRootCert","desc":"支付宝根证书(.crt格式)","type":"file","verify":""}]', + '[{"name":"appAuthToken", "desc":"子商户app_auth_token", "type": "text","readonly":"readonly"},{"name":"refreshToken", "desc":"子商户刷新token", "type": "hidden","readonly":"readonly"},{"name":"expireTimestamp", "desc":"authToken有效期(13位时间戳)", "type": "hidden","readonly":"readonly"}]', + '[{"name":"sandbox","desc":"环境配置","type":"radio","verify":"","values":"1,0","titles":"沙箱环境,生产环境","verify":"required"},{"name":"appId","desc":"应用App ID","type":"text","verify":"required"},{"name":"privateKey", "desc":"应用私钥", "type": "textarea","verify":"required"},{"name":"alipayPublicKey", "desc":"支付宝公钥(不使用证书时必填)", "type": "textarea"},{"name":"signType","desc":"接口签名方式(推荐使用RSA2)","type":"radio","verify":"","values":"RSA,RSA2","titles":"RSA,RSA2","verify":"required"},{"name":"useCert","desc":"公钥证书","type":"radio","verify":"","values":"1,0","titles":"使用证书(请使用RSA2私钥),不使用证书"},{"name":"appPublicCert","desc":"应用公钥证书(.crt格式)","type":"file","verify":""},{"name":"alipayPublicCert","desc":"支付宝公钥证书(.crt格式)","type":"file","verify":""},{"name":"alipayRootCert","desc":"支付宝根证书(.crt格式)","type":"file","verify":""}]', + '[{"wayCode": "ALI_JSAPI"}, {"wayCode": "ALI_WAP"}, {"wayCode": "ALI_BAR"}, {"wayCode": "ALI_APP"}, {"wayCode": "ALI_PC"}, {"wayCode": "ALI_QR"}]', + 'http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/alipay.png', '#1779FF', 1, '支付宝官方通道'); + +INSERT INTO t_pay_interface_define (if_code, if_name, is_mch_mode, is_isv_mode, isv_params, isvsub_mch_params, normal_mch_params, way_codes, icon, bg_color, state, remark) +VALUES ('wxpay', '微信支付官方', 1, 1, + '[{"name":"mchId", "desc":"微信支付商户号", "type": "text","verify":"required"},{"name":"appId","desc":"应用App ID","type":"text","verify":"required"},{"name":"appSecret","desc":"应用AppSecret","type":"text","verify":"required"},{"name":"oauth2Url", "desc":"oauth2地址(置空将使用官方)", "type": "text"},{"name":"key", "desc":"API密钥", "type": "textarea","verify":"required"},{"name":"apiVersion", "desc":"微信支付API版本", "type": "radio","values":"V2,V3","titles":"V2,V3","verify":"required"},{"name":"apiV3Key", "desc":"API V3秘钥(V3接口必填)", "type": "textarea","verify":""},{"name":"serialNo", "desc":"序列号(V3接口必填)", "type": "textarea","verify":""},{"name":"cert", "desc":"API证书(.p12格式)", "type": "file","verify":""},{"name":"apiClientKey", "desc":"私钥文件(.pem格式)", "type": "file","verify":""}]', + '[{"name":"subMchId","desc":"子商户ID","type":"text","verify":"required"},{"name":"subMchAppId","desc":"子账户appID(线上支付必填)","type":"text","verify":""}]', + '[{"name":"mchId", "desc":"微信支付商户号", "type": "text","verify":"required"},{"name":"appId","desc":"应用App ID","type":"text","verify":"required"},{"name":"appSecret","desc":"应用AppSecret","type":"text","verify":"required"},{"name":"oauth2Url", "desc":"oauth2地址(置空将使用官方)", "type": "text"},{"name":"key", "desc":"API密钥", "type": "textarea","verify":"required"},{"name":"apiVersion", "desc":"微信支付API版本", "type": "radio","values":"V2,V3","titles":"V2,V3","verify":"required"},{"name":"apiV3Key", "desc":"API V3秘钥(V3接口必填)", "type": "textarea","verify":""},{"name":"serialNo", "desc":"序列号(V3接口必填)", "type": "textarea","verify":""},{"name":"cert", "desc":"API证书(.p12格式)", "type": "file","verify":""},{"name":"apiClientKey", "desc":"私钥文件(.pem格式)", "type": "file","verify":""}]', + '[{"wayCode": "WX_APP"}, {"wayCode": "WX_H5"}, {"wayCode": "WX_NATIVE"}, {"wayCode": "WX_JSAPI"}, {"wayCode": "WX_BAR"}, {"wayCode": "WX_LITE"}]', + 'http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/wxpay.png', '#04BE02', 1, '微信官方通道'); + +INSERT INTO t_pay_interface_define (if_code, if_name, is_mch_mode, is_isv_mode, isv_params, isvsub_mch_params, normal_mch_params, way_codes, icon, bg_color, state, remark) +VALUES ('ysfpay', '云闪付官方', 0, 1, + '[{"name":"sandbox","desc":"环境配置","type":"radio","verify":"","values":"1,0","titles":"沙箱环境,生产环境","verify":"required"},{"name":"serProvId","desc":"服务商开发ID[serProvId]","type":"text","verify":"required"},{"name":"isvPrivateCertFile","desc":"服务商私钥文件(.pfx格式)","type":"file","verify":"required"},{"name":"isvPrivateCertPwd","desc":"服务商私钥文件密码","type":"text","verify":"required"},{"name":"ysfpayPublicKey","desc":"云闪付开发公钥(证书管理页面可查询)","type":"textarea","verify":"required"},{"name":"acqOrgCode","desc":"可用支付机构编号","type":"text","verify":"required"}]', + '[{"name":"merId","desc":"商户编号","type":"text","verify":"required"}]', + NULL, + '[{"wayCode": "YSF_BAR"}, {"wayCode": "ALI_JSAPI"}, {"wayCode": "WX_JSAPI"}, {"wayCode": "ALI_BAR"}, {"wayCode": "WX_BAR"}]', + 'http://jeequan.oss-cn-beijing.aliyuncs.com/jeepay/img/ysfpay.png', 'red', 1, '云闪付官方通道'); diff --git a/init_db.sql b/init_db.sql deleted file mode 100644 index 13d25f9ce78e268aa923a56a3a0cd56ef44f0b2d..0000000000000000000000000000000000000000 --- a/init_db.sql +++ /dev/null @@ -1,169 +0,0 @@ - -/* 支付中心相关表结构 */ - -CREATE TABLE `t_mch_info` ( - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `Name` varchar(30) NOT NULL COMMENT '名称', - `Type` varchar(24) NOT NULL COMMENT '类型', - `ReqKey` varchar(128) NOT NULL COMMENT '请求私钥', - `ResKey` varchar(128) NOT NULL COMMENT '响应私钥', - `State` tinyint(6) NOT NULL DEFAULT '1' COMMENT '商户状态,0-停止使用,1-使用中', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`MchId`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户信息表'; - -CREATE TABLE `t_pay_channel` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '渠道主键ID', - `ChannelId` varchar(24) NOT NULL COMMENT '渠道ID', - `ChannelName` varchar(30) NOT NULL COMMENT '渠道名称,如:alipay,wechat', - `ChannelMchId` varchar(32) NOT NULL COMMENT '渠道商户ID', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `State` tinyint(6) NOT NULL DEFAULT '1' COMMENT '渠道状态,0-停止使用,1-使用中', - `Param` varchar(4096) NOT NULL COMMENT '配置参数,json字符串', - `Remark` varchar(128) DEFAULT NULL COMMENT '备注', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`ID`), - UNIQUE KEY `IDX_MchId_MchOrderNo` (`ChannelId`, `MchId`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付渠道表'; - -CREATE TABLE `t_pay_order` ( - `PayOrderId` varchar(30) NOT NULL COMMENT '支付订单号', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `MchOrderNo` varchar(30) NOT NULL COMMENT '商户订单号', - `ChannelId` varchar(24) NOT NULL COMMENT '渠道ID', - `Amount` bigint(20) NOT NULL COMMENT '支付金额,单位分', - `Currency` varchar(3) NOT NULL DEFAULT 'cny' COMMENT '三位货币代码,人民币:cny', - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成', - `ClientIp` varchar(32) DEFAULT NULL COMMENT '客户端IP', - `Device` varchar(64) DEFAULT NULL COMMENT '设备', - `Subject` varchar(64) NOT NULL COMMENT '商品标题', - `Body` varchar(256) NOT NULL COMMENT '商品描述信息', - `Extra` varchar(512) DEFAULT NULL COMMENT '特定渠道发起时额外参数', - `ChannelMchId` varchar(32) NOT NULL COMMENT '渠道商户ID', - `ChannelOrderNo` varchar(64) DEFAULT NULL COMMENT '渠道订单号', - `ErrCode` varchar(64) DEFAULT NULL COMMENT '渠道支付错误码', - `ErrMsg` varchar(128) DEFAULT NULL COMMENT '渠道支付错误描述', - `Param1` varchar(64) DEFAULT NULL COMMENT '扩展参数1', - `Param2` varchar(64) DEFAULT NULL COMMENT '扩展参数2', - `NotifyUrl` varchar(128) NOT NULL COMMENT '通知地址', - `NotifyCount` tinyint(6) NOT NULL DEFAULT 0 COMMENT '通知次数', - `LastNotifyTime` bigint(20) DEFAULT NULL COMMENT '最后一次通知时间', - `ExpireTime` bigint(20) DEFAULT NULL COMMENT '订单失效时间', - `PaySuccTime` bigint(20) DEFAULT NULL COMMENT '订单支付成功时间', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`PayOrderId`), - UNIQUE KEY `IDX_MchId_MchOrderNo` (`MchId`, MchOrderNo) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='支付订单表'; - -CREATE TABLE `t_iap_receipt` ( - `PayOrderId` varchar(30) NOT NULL COMMENT '支付订单号', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `TransactionId` varchar(24) NOT NULL COMMENT 'IAP业务号', - `ReceiptData` TEXT NOT NULL COMMENT '渠道ID', - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '处理状态:0-未处理,1-处理成功,-1-处理失败', - `HandleCount` tinyint(6) NOT NULL DEFAULT 0 COMMENT '处理次数', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`PayOrderId`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='苹果支付凭据表'; - -CREATE TABLE `t_trans_order` ( - `TransOrderId` varchar(30) NOT NULL COMMENT '转账订单号', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `MchTransNo` varchar(30) NOT NULL COMMENT '商户转账单号', - `ChannelId` varchar(24) NOT NULL COMMENT '渠道ID', - `Amount` bigint(20) NOT NULL COMMENT '转账金额,单位分', - `Currency` varchar(3) NOT NULL DEFAULT 'cny' COMMENT '三位货币代码,人民币:cny', - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '转账状态:0-订单生成,1-转账中,2-转账成功,3-转账失败,4-业务处理完成', - `Result` tinyint(6) NOT NULL DEFAULT '0' COMMENT '转账结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败', - `ClientIp` varchar(32) DEFAULT NULL COMMENT '客户端IP', - `Device` varchar(64) DEFAULT NULL COMMENT '设备', - `RemarkInfo` varchar(256) DEFAULT NULL COMMENT '备注', - `ChannelUser` varchar(32) DEFAULT NULL COMMENT '渠道用户标识,如微信openId,支付宝账号', - `UserName` varchar(24) DEFAULT NULL COMMENT '用户姓名', - `ChannelMchId` varchar(32) NOT NULL COMMENT '渠道商户ID', - `ChannelOrderNo` varchar(32) DEFAULT NULL COMMENT '渠道订单号', - `ChannelErrCode` varchar(128) DEFAULT NULL COMMENT '渠道错误码', - `ChannelErrMsg` varchar(128) DEFAULT NULL COMMENT '渠道错误描述', - `Extra` varchar(512) DEFAULT NULL COMMENT '特定渠道发起时额外参数', - `NotifyUrl` varchar(128) NOT NULL COMMENT '通知地址', - `Param1` varchar(64) DEFAULT NULL COMMENT '扩展参数1', - `Param2` varchar(64) DEFAULT NULL COMMENT '扩展参数2', - `ExpireTime` datetime DEFAULT NULL COMMENT '订单失效时间', - `TransSuccTime` datetime DEFAULT NULL COMMENT '订单转账成功时间', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`TransOrderId`), - UNIQUE KEY `IDX_MchId_MchOrderNo` (`MchId`, MchTransNo) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='转账订单表'; - -CREATE TABLE `t_refund_order` ( - `RefundOrderId` varchar(30) NOT NULL COMMENT '退款订单号', - `PayOrderId` varchar(30) NOT NULL COMMENT '支付订单号', - `ChannelPayOrderNo` varchar(64) DEFAULT NULL COMMENT '渠道支付单号', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `MchRefundNo` varchar(30) NOT NULL COMMENT '商户退款单号', - `ChannelId` varchar(24) NOT NULL COMMENT '渠道ID', - `PayAmount` bigint(20) NOT NULL COMMENT '支付金额,单位分', - `RefundAmount` bigint(20) NOT NULL COMMENT '退款金额,单位分', - `Currency` varchar(3) NOT NULL DEFAULT 'cny' COMMENT '三位货币代码,人民币:cny', - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成', - `Result` tinyint(6) NOT NULL DEFAULT '0' COMMENT '退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败', - `ClientIp` varchar(32) DEFAULT NULL COMMENT '客户端IP', - `Device` varchar(64) DEFAULT NULL COMMENT '设备', - `RemarkInfo` varchar(256) DEFAULT NULL COMMENT '备注', - `ChannelUser` varchar(32) DEFAULT NULL COMMENT '渠道用户标识,如微信openId,支付宝账号', - `UserName` varchar(24) DEFAULT NULL COMMENT '用户姓名', - `ChannelMchId` varchar(32) NOT NULL COMMENT '渠道商户ID', - `ChannelOrderNo` varchar(32) DEFAULT NULL COMMENT '渠道订单号', - `ChannelErrCode` varchar(128) DEFAULT NULL COMMENT '渠道错误码', - `ChannelErrMsg` varchar(128) DEFAULT NULL COMMENT '渠道错误描述', - `Extra` varchar(512) DEFAULT NULL COMMENT '特定渠道发起时额外参数', - `NotifyUrl` varchar(128) NOT NULL COMMENT '通知地址', - `Param1` varchar(64) DEFAULT NULL COMMENT '扩展参数1', - `Param2` varchar(64) DEFAULT NULL COMMENT '扩展参数2', - `ExpireTime` datetime DEFAULT NULL COMMENT '订单失效时间', - `RefundSuccTime` datetime DEFAULT NULL COMMENT '订单退款成功时间', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`RefundOrderId`), - UNIQUE KEY `IDX_MchId_MchOrderNo` (`MchId`, MchRefundNo) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='退款订单表'; - -CREATE TABLE `t_mch_notify` ( - `OrderId` varchar(24) NOT NULL COMMENT '订单ID', - `MchId` varchar(30) NOT NULL COMMENT '商户ID', - `MchOrderNo` varchar(30) NOT NULL COMMENT '商户订单号', - `OrderType` varchar(8) NOT NULL COMMENT '订单类型:1-支付,2-转账,3-退款', - `NotifyUrl` varchar(2048) NOT NULL COMMENT '通知地址', - `NotifyCount` tinyint(6) NOT NULL DEFAULT 0 COMMENT '通知次数', - `Result` varchar(2048) DEFAULT NULL COMMENT '通知响应结果', - `Status` tinyint(6) NOT NULL DEFAULT '1' COMMENT '通知状态,1-通知中,2-通知成功,3-通知失败', - `LastNotifyTime` datetime DEFAULT NULL COMMENT '最后一次通知时间', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`OrderId`), - UNIQUE KEY `IDX_MchId_OrderType_MchOrderNo` (`MchId`, `OrderType`, `MchOrderNo`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商户通知表'; - - -/* 支付演示商城相关表 */ - -CREATE TABLE `t_goods_order` ( - `GoodsOrderId` varchar(30) NOT NULL COMMENT '商品订单ID', - `GoodsId` varchar(30) NOT NULL COMMENT '商品ID', - `GoodsName` varchar(64) NOT NULL DEFAULT '' COMMENT '商品名称', - `Amount` bigint(20) NOT NULL COMMENT '金额,单位分', - `UserId` varchar(30) NOT NULL COMMENT '用户ID', - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '订单状态,订单生成(0),支付成功(1),处理完成(2),处理失败(-1)', - `PayOrderId` varchar(30) DEFAULT NULL COMMENT '支付订单号', - `ChannelId` varchar(24) DEFAULT NULL COMMENT '渠道ID', - `ChannelUserId` varchar(64) DEFAULT NULL COMMENT '支付渠道用户ID(微信openID或支付宝账号等第三方支付账号)', - `CreateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `UpdateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - PRIMARY KEY (`GoodsOrderId`), - UNIQUE KEY `IDX_PayOrderId` (PayOrderId) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商品订单表'; \ No newline at end of file diff --git a/jeepay-core/pom.xml b/jeepay-core/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..81f52965e20a9a40e2d5dc084baee0f5b06d437a --- /dev/null +++ b/jeepay-core/pom.xml @@ -0,0 +1,98 @@ + + + 4.0.0 + + com.jeequan + jeepay-core + jar + ${isys.version} + Jeepay计全支付系统 [jeepay-core] + https://www.jeequan.com + + + com.jeequan + jeepay + 1.0.0 + + + + + + + + org.springframework + spring-context + provided + + + + + org.springframework.boot + spring-boot-starter-data-redis + provided + + + + + org.springframework + spring-webmvc + provided + + + + javax.servlet + javax.servlet-api + provided + + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis.plus.starter.version} + provided + + + + + io.jsonwebtoken + jjwt + provided + + + + + org.springframework.security + spring-security-core + provided + + + + + com.alibaba + fastjson + + + + + org.apache.commons + commons-lang3 + + + + + + + + src/main/resources + + + src/main/java + **/*.xml + + + + + + diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/aop/MethodLog.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/aop/MethodLog.java new file mode 100644 index 0000000000000000000000000000000000000000..f14245f1bc80d48e15f510d59d24a8dc95712f81 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/aop/MethodLog.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.aop; + +import java.lang.annotation.*; + +/* +* 方法级日志切面注解 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 18:00 +*/ +@Target({ ElementType.METHOD, ElementType.TYPE }) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface MethodLog { + String remark() default ""; +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/beans/RequestKitBean.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/beans/RequestKitBean.java new file mode 100644 index 0000000000000000000000000000000000000000..5ec9e6d88a9ff18731b922bd2180735f56519b54 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/beans/RequestKitBean.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.beans; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.exception.BizException; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; + +import javax.servlet.http.HttpServletRequest; +import java.util.Iterator; +import java.util.Map; + +/* +* 基于spring的 req 工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/7 12:16 +*/ +@Slf4j +@Component +public class RequestKitBean { + + @Autowired(required = false) + protected HttpServletRequest request; //自动注入request + + /** reqContext对象中的key: 转换好的json对象 */ + private static final String REQ_CONTEXT_KEY_PARAMJSON = "REQ_CONTEXT_KEY_PARAMJSON"; + + + /**request.getParameter 获取参数 并转换为JSON格式 **/ + public JSONObject reqParam2JSON() { + + JSONObject returnObject = new JSONObject(); + + if(isConvertJSON()){ + + String body = ""; + try { + String str; + while((str = request.getReader().readLine()) != null){ + body += str; + } + + if(StringUtils.isEmpty(body)) return returnObject; + return JSONObject.parseObject(body); + + } catch (Exception e) { + log.error("请求参数转换异常! params=[{}]", body); + throw new BizException(ApiCodeEnum.PARAMS_ERROR, "转换异常"); + } + } + + // 参数Map + Map properties = request.getParameterMap(); + + // 返回值Map + Iterator entries = properties.entrySet().iterator(); + Map.Entry entry; + String name; + String value = ""; + while (entries.hasNext()) { + entry = (Map.Entry) entries.next(); + name = (String) entry.getKey(); + Object valueObj = entry.getValue(); + if(null == valueObj){ + value = ""; + }else if(valueObj instanceof String[]){ + String[] values = (String[])valueObj; + for(int i=0;i= 0 + && !request.getMethod().equalsIgnoreCase("GET") + ){ //application/json 需要转换为json格式; + return true; + } + + return false; + } + + /** 获取客户端ip地址 **/ + public String getClientIp() { + String ipAddress = null; + ipAddress = request.getHeader("x-forwarded-for"); + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + } + + // 对于通过多个代理的情况,第一个IP为客户端真实IP,多个IP按照','分割 + if (ipAddress != null && ipAddress.length() > 15) { + if (ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + } + return ipAddress; + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/ITokenService.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/ITokenService.java new file mode 100644 index 0000000000000000000000000000000000000000..ccd14b1fc888e5233828e9fcf715415855367bcf --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/ITokenService.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.cache; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; + +/* +* token service +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/24 09:06 +*/ +public class ITokenService { + + /** 处理token信息 + * 1. 如果不允许多用户则踢掉之前的所有用户信息 + * 2. 更新token 缓存时间信息 + * 3. 更新用户token列表 + * **/ + public static void processTokenCache(JeeUserDetails userDetail, String cacheKey){ + + userDetail.setCacheKey(cacheKey); //设置cacheKey + + //当前用户的所有登录token 集合 +// if(!PropKit.isAllowMultiUser()){ //不允许多用户登录 +// +// List allTokenList = new ArrayList<>(); +// for (String token : allTokenList) { +// if(!cacheKey.equalsIgnoreCase(token)){ +// RedisUtil.del(token); +// } +// } +// } + + //保存token + RedisUtil.set(cacheKey, userDetail, CS.TOKEN_TIME); //缓存时间2小时, 保存具体信息而只是uid, 因为很多场景需要得到信息, 例如验证接口权限, 每次请求都需要获取。 将信息封装在一起减少磁盘请求次数, 如果放置多个key会增加非顺序读取。 + } + + + /** 退出时,清除token信息 */ + public static void removeIToken(String iToken, Long currentUID){ + + //1. 清除token的信息 + RedisUtil.del(iToken); + } + + /** + * 刷新数据 + * **/ + public static void refData(JeeUserDetails currentUserInfo){ + + //保存token 和 tokenList信息 + RedisUtil.set(currentUserInfo.getCacheKey(), currentUserInfo, CS.TOKEN_TIME); //缓存时间2小时, 保存具体信息而只是uid, 因为很多场景需要得到信息, 例如验证接口权限, 每次请求都需要获取。 将信息封装在一起减少磁盘请求次数, 如果放置多个key会增加非顺序读取。 + + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/RedisUtil.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/RedisUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..e5b3d0e0f4baccd11d1d7c63b7bfb01b84b39298 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/cache/RedisUtil.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.cache; + +import com.alibaba.fastjson.JSON; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.concurrent.TimeUnit; + +/* +* Redis工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/24 17:58 +*/ +public class RedisUtil { + + private static StringRedisTemplate stringRedisTemplate = null; + + /** 获取RedisTemplate对象, 默认使用 StringRedisTemplate, 客户端可查询 **/ + private static final RedisTemplate getStringRedisTemplate(){ + + if(stringRedisTemplate == null){ + + if(SpringBeansUtil.getApplicationContext().containsBean("defaultStringRedisTemplate")){ + stringRedisTemplate = SpringBeansUtil.getBean("defaultStringRedisTemplate", StringRedisTemplate.class); + }else{ + stringRedisTemplate = SpringBeansUtil.getBean(StringRedisTemplate.class); + } + } + return stringRedisTemplate; + } + + /** 获取缓存数据, String类型 */ + public static String getString(String key) { + if(key == null) return null; + return (String)getStringRedisTemplate().opsForValue().get(key); + } + + /** 获取缓存数据对象 */ + public static T getObject(String key, Class cls) { + + String val = getString(key); + return JSON.parseObject(val, cls); + } + + /** 放置缓存对象 */ + public static void setString(String key, String value) { + getStringRedisTemplate().opsForValue().set(key, value); + } + + /** 普通缓存放入并设置时间, 默认单位:秒 */ + public static void setString(String key, String value, long time) { + getStringRedisTemplate().opsForValue().set(key, value, time, TimeUnit.SECONDS); + } + + /** 普通缓存放入并设置时间 */ + public static void setString(String key, String value, long time, TimeUnit timeUnit) { + getStringRedisTemplate().opsForValue().set(key, value, time, timeUnit); + } + + /** 放置缓存对象 */ + public static void set(String key, Object value) { + setString(key, JSON.toJSONString(value)); + } + + /** 普通缓存放入并设置时间, 默认单位:秒 */ + public static void set(String key, Object value, long time) { + setString(key, JSON.toJSONString(value), time); + } + + /** 普通缓存放入并设置时间 */ + public static void set(String key, Object value, long time, TimeUnit timeUnit) { + setString(key, JSON.toJSONString(value), time, timeUnit); + } + + /** 指定缓存失效时间 */ + public static void expire(String key, long time) { + getStringRedisTemplate().expire(key, time, TimeUnit.SECONDS); + } + + /** 指定缓存失效时间 */ + public static void expire(String key, long time, TimeUnit timeUnit) { + getStringRedisTemplate().expire(key, time, timeUnit); + } + + /** + * 根据key 获取过期时间 + * @param key 键 不能为null + * @return 时间(秒) 返回0代表为永久有效 + */ + public static long getExpire(String key) { + return getStringRedisTemplate().getExpire(key, TimeUnit.SECONDS); + } + + /** 判断key是否存在 */ + public static boolean hasKey(String key) { + return getStringRedisTemplate().hasKey(key); + } + + /** 删除缓存 **/ + public static void del(String... key) { + if (key != null && key.length > 0) { + if (key.length == 1) { + getStringRedisTemplate().delete(key[0]); + } else { + getStringRedisTemplate().delete(CollectionUtils.arrayToList(key)); + } + } + } + + /** 查询keys */ + public static Collection keys(String pattern) { + return getStringRedisTemplate().keys(pattern); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/ApiCodeEnum.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/ApiCodeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..5d3387483f8fb119d3502cf03e1ae01fa09fe537 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/ApiCodeEnum.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.constants; + +/* +* 接口返回码 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/24 17:07 +*/ +public enum ApiCodeEnum{ + + SUCCESS(0, "SUCCESS"), //请求成功 + + CUSTOM_FAIL(9999, "自定义业务异常"), //自定义业务异常 + + SYSTEM_ERROR(10, "系统异常[%s]"), + PARAMS_ERROR(11, "参数有误[%s]"), + DB_ERROR(12, "数据库服务异常"), + + SYS_OPERATION_FAIL_CREATE(5000, "新增失败"), + SYS_OPERATION_FAIL_DELETE(5001, "删除失败"), + SYS_OPERATION_FAIL_UPDATE(5002, "修改失败"), + SYS_OPERATION_FAIL_SELETE(5003, "记录不存在"), + SYS_PERMISSION_ERROR(5004, "权限错误,当前用户不支持此操作"); + + + private int code; + + private String msg; + + ApiCodeEnum(int code, String msg) { + this.code = code; + this.msg = msg; + } + + public int getCode(){ + return this.code; + } + + public String getMsg() { + return this.msg; + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/CS.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/CS.java new file mode 100644 index 0000000000000000000000000000000000000000..09547916a2c201ae2a99be76699b0a9834c7647a --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/constants/CS.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.constants; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * @Author terrfly + * @Date 2019/11/16 15:09 + * @Description Constants 常量对象 + **/ +public class CS { + + /** 系统类型定义 **/ + public interface SYS_TYPE{ + String MCH = "MCH"; + String MGR = "MGR"; + Map SYS_TYPE_MAP = new HashMap<>(); + } + static { + SYS_TYPE.SYS_TYPE_MAP.put(SYS_TYPE.MCH, "商户系统"); + SYS_TYPE.SYS_TYPE_MAP.put(SYS_TYPE.MGR, "运营平台"); + } + + /** yes or no **/ + public static final byte NO = 0; + public static final byte YES = 1; + + /** 通用 可用 / 禁用 **/ + public static final int PUB_USABLE = 1; + public static final int PUB_DISABLE = 0; + + public static final Map PUB_USABLE_MAP = new HashMap<>(); + static { + PUB_USABLE_MAP.put(PUB_USABLE, "正常"); + PUB_USABLE_MAP.put(PUB_DISABLE, "停用"); + } + + /** + * 账号类型:1-服务商 2-商户 + */ + public static final byte INFO_TYPE_ISV = 1; + public static final byte INFO_TYPE_MCH = 2; + + + /** + * 商户类型:1-普通商户 2-特约商户 + */ + public static final byte MCH_TYPE_NORMAL = 1; + public static final byte MCH_TYPE_ISVSUB = 2; + + /** + * 性别 1- 男, 2-女 + */ + public static final byte SEX_UNKNOWN = 0; + public static final byte SEX_MALE = 1; + public static final byte SEX_FEMALE = 2; + + /** 默认密码 */ + public static final String DEFAULT_PWD = "jeepay666"; + + + /** + * 允许上传的的图片文件格式,需要与 WebSecurityConfig对应 + */ + public static final Set ALLOW_UPLOAD_IMG_SUFFIX = new HashSet<>(); + static{ + ALLOW_UPLOAD_IMG_SUFFIX.add("jpg"); + ALLOW_UPLOAD_IMG_SUFFIX.add("png"); + ALLOW_UPLOAD_IMG_SUFFIX.add("jpeg"); + ALLOW_UPLOAD_IMG_SUFFIX.add("gif"); + ALLOW_UPLOAD_IMG_SUFFIX.add("mp4"); + } + + + public static final long TOKEN_TIME = 60 * 60 * 2; //单位:s, 两小时 + + + //access_token 名称 + public static final String ACCESS_TOKEN_NAME = "iToken"; + + /** !!不同系统请放置不同的redis库 !! **/ + /** 缓存key: 当前用户所有用户的token集合 example: TOKEN_1001_HcNheNDqHzhTIrT0lUXikm7xU5XY4Q */ + public static final String CACHE_KEY_TOKEN = "TOKEN_%s_%s"; + public static String getCacheKeyToken(Long sysUserId, String uuid){ + return String.format(CACHE_KEY_TOKEN, sysUserId, uuid); + } + + /** 图片验证码 缓存key **/ + public static final String CACHE_KEY_IMG_CODE = "img_code_%s"; + public static String getCacheKeyImgCode(String imgToken){ + return String.format(CACHE_KEY_IMG_CODE, imgToken); + } + + + /** 登录认证类型 **/ + public interface AUTH_TYPE{ + + byte LOGIN_USER_NAME = 1; //登录用户名 + byte TELPHONE = 2; //手机号 + byte EMAIL = 3; //邮箱 + + byte WX_UNION_ID = 10; //微信unionId + byte WX_MINI = 11; //微信小程序 + byte WX_MP = 12; //微信公众号 + + byte QQ = 20; //QQ + } + + + public interface MQ{ + + /** 更新配置的通知消息 **/ + String TOPIC_MODIFY_SYS_CONFIG = "topic.modify.sys.config"; + + /** 更新商户配置信息 **/ + String TOPIC_MODIFY_MCH_INFO = "topic.modify.mch.info"; + + /** 更新服务商配置信息 **/ + String TOPIC_MODIFY_ISV_INFO = "topic.modify.isv.info"; + + /** 支付订单 商户通知MQ **/ + String QUEUE_PAYORDER_MCH_NOTIFY = "queue.payorder.mch.notify"; + + /** 轮询查单 MQ **/ + String QUEUE_CHANNEL_ORDER_QUERY = "queue.channel.order.query"; + + /** 清除商户登录用户信息 **/ + String QUEUE_MODIFY_MCH_USER_REMOVE = "queue.modify.mch.user.remove"; + + } + + + //菜单类型 + public interface ENT_TYPE{ + + String MENU_LEFT = "ML"; //左侧显示菜单 + String MENU_OTHER = "MO"; //其他菜单 + String PAGE_OR_BTN = "PB"; //页面 or 按钮 + + } + + //接口类型 + public interface IF_CODE{ + + String ALIPAY = "alipay"; //支付宝官方支付 + String WXPAY = "wxpay"; //微信官方支付 + String YSFPAY = "ysfpay"; //云闪付开放平台 + + } + + + //支付方式代码 + public interface PAY_WAY_CODE{ + + // 特殊支付方式 + String QR_CASHIER = "QR_CASHIER"; // ( 通过二维码跳转到收银台完成支付, 已集成获取用户ID的实现。 ) + String AUTO_BAR = "AUTO_BAR"; // 条码聚合支付(自动分类条码类型) + + String ALI_BAR = "ALI_BAR"; //支付宝条码支付 + String ALI_JSAPI = "ALI_JSAPI"; //支付宝服务窗支付 + String ALI_APP = "ALI_APP"; //支付宝 app支付 + String ALI_PC = "ALI_PC"; //支付宝 电脑网站支付 + String ALI_WAP = "ALI_WAP"; //支付宝 wap支付 + String ALI_QR = "ALI_QR"; //支付宝 二维码付款 + + String YSF_BAR = "YSF_BAR"; //云闪付条码支付 + String YSF_JSAPI = "YSF_JSAPI"; //云闪付服务窗支付 + + String WX_JSAPI = "WX_JSAPI"; //微信jsapi支付 + String WX_LITE = "WX_LITE"; //微信小程序支付 + String WX_BAR = "WX_BAR"; //微信条码支付 + String WX_H5 = "WX_H5"; //微信H5支付 + String WX_NATIVE = "WX_NATIVE"; //微信扫码支付 + } + + //支付数据包 类型 + public interface PAY_DATA_TYPE { + String PAY_URL = "payurl"; //跳转链接的方式 redirectUrl + String FORM = "form"; //表单提交 + String WX_APP = "wxapp"; //微信app参数 + String ALI_APP = "aliapp"; //支付宝app参数 + String YSF_APP = "ysfapp"; //云闪付app参数 + String CODE_URL = "codeUrl"; //二维码URL + String CODE_IMG_URL = "codeImgUrl"; //二维码图片显示URL + String NONE = "none"; //无参数 +// String QR_CONTENT = "qrContent"; //二维码实际内容 + } + + + //接口版本 + public interface PAY_IF_VERSION{ + String WX_V2 = "V2"; //微信接口版本V2 + String WX_V3 = "V3"; //微信接口版本V3 + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/ctrls/AbstractCtrl.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/ctrls/AbstractCtrl.java new file mode 100644 index 0000000000000000000000000000000000000000..8393f1efb1b80f877ae31a877b80109e782c0f12 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/ctrls/AbstractCtrl.java @@ -0,0 +1,304 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.ctrls; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jeequan.jeepay.core.beans.RequestKitBean; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.BaseModel; +import com.jeequan.jeepay.core.utils.DateKit; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.MutablePair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.ObjectUtils; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.math.BigDecimal; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/* +* 抽象公共Ctrl +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2020/02/18 17:28 +*/ +public abstract class AbstractCtrl { + + protected static final Logger logger = LoggerFactory.getLogger(AbstractCtrl.class); + + private static final String PAGE_INDEX_PARAM_NAME = "pageNumber"; //分页页码 参数名 + private static final String PAGE_SIZE_PARAM_NAME = "pageSize"; //分页条数 参数名 + private static final int DEFAULT_PAGE_INDEX = 1; // 默认页码: 第一页 + private static final int DEFAULT_PAGE_SIZE = 20; // 默认条数: 20 + + private static final String SORT_FIELD_PARAM_NAME = "sortField"; //排序字段 + private static final String SORT_ORDER_FLAG_PARAM_NAME = "sortOrder"; // 排序正序, 倒序标志 + + @Autowired + protected HttpServletRequest request; //自动注入request + + @Autowired + protected HttpServletResponse response; //自动注入response + + @Autowired + protected RequestKitBean requestKitBean; + + /** 获取json格式的请求参数 **/ + protected JSONObject getReqParamJSON(){ + return requestKitBean.getReqParamJSON(); + } + + /** 获取页码 **/ + protected int getPageIndex() { + Integer pageIndex = getReqParamJSON().getInteger(PAGE_INDEX_PARAM_NAME); + if(pageIndex == null) return DEFAULT_PAGE_INDEX; + return pageIndex; + } + + /** 获取条数, 默认不允许查询全部数据 **/ + protected int getPageSize() { + return getPageSize(false); + } + + /** 获取条数, 加入条件:是否允许获取全部数据 **/ + protected int getPageSize(boolean allowQueryAll) { + Integer pageSize = getReqParamJSON().getInteger(PAGE_SIZE_PARAM_NAME); + + if(allowQueryAll && pageSize != null && pageSize == -1) return Integer.MAX_VALUE; // -1代表获取全部数据,查询int最大值的数据 + if(pageSize == null || pageSize < 0) return DEFAULT_PAGE_SIZE; + return pageSize; + } + + /** 获取Ipage分页信息, 默认不允许获取全部数据 **/ + protected IPage getIPage(){ + return new Page(getPageIndex(), getPageSize()); + } + + /** 获取Ipage分页信息, 加入条件:是否允许获取全部数据 **/ + protected IPage getIPage(boolean allowQueryAll){ + return new Page(getPageIndex(), getPageSize(allowQueryAll)); + } + + /** 获取排序字段 MutablePair<是否正序, 排序字段> **/ + protected MutablePair getSortInfo() { + + String sortField = getReqParamJSON().getString(SORT_FIELD_PARAM_NAME); + String sortOrderFlag = getReqParamJSON().getString(SORT_ORDER_FLAG_PARAM_NAME); + if(StringUtils.isAllEmpty(sortField, sortField)){ + return null; + } + + return MutablePair.of("ascend".equalsIgnoreCase(sortOrderFlag), StrUtil.toUnderlineCase(sortField).toLowerCase()); + } + + + /** 获取请求参数值 [ T 类型 ], [ 非必填 ] **/ + protected T getVal(String key, Class cls) { + return getReqParamJSON().getObject(key, cls); + } + + /** 获取请求参数值 [ T 类型 ], [ 必填 ] **/ + protected T getValRequired(String key, Class cls) { + T value = getVal(key, cls); + if(ObjectUtils.isEmpty(value)) { + throw new BizException(ApiCodeEnum.PARAMS_ERROR, genParamRequiredMsg(key)); + } + return value; + } + + /** 获取请求参数值 [ T 类型 ], [ 如为null返回默认值 ] **/ + protected T getValDefault(String key, T defaultValue, Class cls) { + T value = getVal(key, cls); + if(value == null) return defaultValue; + return value; + } + + /** 获取请求参数值 String 类型相关函数 **/ + protected String getValString(String key) { + return getVal(key, String.class); + } + protected String getValStringRequired(String key) { + return getValRequired(key, String.class); + } + protected String getValStringDefault(String key, String defaultValue) { + return getValDefault(key, defaultValue, String.class); + } + + /** 获取请求参数值 Byte 类型相关函数 **/ + protected Byte getValByte(String key) { + return getVal(key, Byte.class); + } + protected Byte getValByteRequired(String key) { + return getValRequired(key, Byte.class); + } + protected Byte getValByteDefault(String key, Byte defaultValue) { + return getValDefault(key, defaultValue, Byte.class); + } + + /** 获取请求参数值 Integer 类型相关函数 **/ + protected Integer getValInteger(String key) { + return getVal(key, Integer.class); + } + protected Integer getValIntegerRequired(String key) { + return getValRequired(key, Integer.class); + } + protected Integer getValIntegerDefault(String key, Integer defaultValue) { + return getValDefault(key, defaultValue, Integer.class); + } + + /** 获取请求参数值 Long 类型相关函数 **/ + protected Long getValLong(String key) { + return getVal(key, Long.class); + } + protected Long getValLongRequired(String key) { + return getValRequired(key, Long.class); + } + protected Long getValLongDefault(String key, Long defaultValue) { + return getValDefault(key, defaultValue, Long.class); + } + + /** 获取请求参数值 BigDecimal 类型相关函数 **/ + protected BigDecimal getValBigDecimal(String key) { + return getVal(key, BigDecimal.class); + } + protected BigDecimal getValBigDecimalRequired(String key) { + return getValRequired(key, BigDecimal.class); + } + protected BigDecimal getValBigDecimalDefault(String key, BigDecimal defaultValue) { + return getValDefault(key, defaultValue, BigDecimal.class); + } + + /** 获取对象类型 **/ + protected T getObject(Class clazz) { + + JSONObject params = getReqParamJSON(); + T result = params.toJavaObject(clazz); + + if(result instanceof BaseModel){ //如果属于BaseModel, 处理apiExtVal + JSONObject resultTemp = (JSONObject) JSON.toJSON(result); + for (String key : params.keySet()) { //遍历原始参数 + if(!resultTemp.containsKey(key)){ + ((BaseModel) result).addExt(key, params.get(key)); + } + } + } + + return result; + } + + /** 生成参数必填错误信息 **/ + private String genParamRequiredMsg(String key) { + return "参数" + key + "必填"; + } + + /** 校验参数值不能为空 */ + protected void checkRequired(String... keys) { + + for(String key : keys) { + String value = getReqParamJSON().getString(key); + if(StringUtils.isEmpty(value)) throw new BizException(ApiCodeEnum.PARAMS_ERROR, genParamRequiredMsg(key)); + } + } + + /** 得到前端传入的金额元,转换成长整型分 **/ + public Long getRequiredAmountL(String name) { + String amountStr = getValStringRequired(name); // 前端填写的为元,可以为小数点2位 + Long amountL = new BigDecimal(amountStr.trim()).multiply(new BigDecimal(100)).longValue(); // // 转成分 + return amountL; + } + + /** 得到前端传入的金额元,转换成长整型分 (非必填) **/ + public Long getAmountL(String name) { + String amountStr = getValString(name); // 前端填写的为元,可以为小数点2位 + if(StringUtils.isEmpty(amountStr)) return null; + Long amountL = new BigDecimal(amountStr.trim()).multiply(new BigDecimal(100)).longValue(); // // 转成分 + return amountL; + } + + /** + * 处理参数中的金额(将前端传入金额元转成分) + * modify: 20181206 添加JSON对象中的对象属性转换为分 格式[xxx.xxx] + * @param names + */ + public void handleParamAmount(String... names) { + for(String name : names) { + String amountStr = getValString(name); // 前端填写的为元,可以为小数点2位 + if(StringUtils.isNotBlank(amountStr)) { + Long amountL = new BigDecimal(amountStr.trim()).multiply(new BigDecimal(100)).longValue(); // // 转成分 + if(name.indexOf(".") < 0 ){ + getReqParamJSON().put(name, amountL); + continue; + } + getReqParamJSON().getJSONObject(name.substring(0, name.indexOf("."))).put(name.substring(name.indexOf(".")+1), amountL); + } + } + } + + /** + * 获取查询的时间范围 + * @return + */ + protected Date[] getQueryDateRange(){ + return DateKit.getQueryDateRange(getReqParamJSON().getString("queryDateRange")); //默认参数为 queryDateRange + } + + /** 请求参数转换为map格式 **/ + public Map request2payResponseMap(HttpServletRequest request, String[] paramArray) { + Map responseMap = new HashMap<>(); + for (int i = 0;i < paramArray.length; i++) { + String key = paramArray[i]; + String v = request.getParameter(key); + if (v != null) { + responseMap.put(key, v); + } + } + return responseMap; + } + + /** 将上传的文件进行保存 - 公共函数 **/ + protected void saveFile(MultipartFile file, String savePath) throws Exception { + + File saveFile = new File(savePath); + + //如果文件夹不存在则创建文件夹 + File dir = saveFile.getParentFile(); + if(!dir.exists()) dir.mkdirs(); + file.transferTo(saveFile); + } + + /** 获取客户端ip地址 **/ + public String getClientIp() { + return requestKitBean.getClientIp(); + } + + public String getUserAgent(){ + String userAgent = request.getHeader("User-Agent"); + return StringUtils.isNotEmpty(userAgent) ? userAgent: "未知"; + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/IsvInfo.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/IsvInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..588fa8387b40c6110834d752187f014a07674cd4 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/IsvInfo.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 服务商信息表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_isv_info") +public class IsvInfo extends BaseModel implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 服务商号 + */ + @TableId(value = "isv_no", type = IdType.INPUT) + private String isvNo; + + /** + * 服务商名称 + */ + private String isvName; + + /** + * 服务商简称 + */ + private String isvShortName; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人手机号 + */ + private String contactTel; + + /** + * 联系人邮箱 + */ + private String contactEmail; + + /** + * 状态: 0-停用, 1-正常 + */ + private Byte state; + + /** + * 备注 + */ + private String remark; + + /** + * 创建者用户ID + */ + private Long createdUid; + + /** + * 创建者姓名 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchInfo.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..9fe342a7a1c90fca852f70ecfdd0af426f5fa129 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchInfo.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 商户信息表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_mch_info") +public class MchInfo extends BaseModel implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + public static final byte TYPE_NORMAL = 1; //商户类型: 1-普通商户 + public static final byte TYPE_ISVSUB = 2; //商户类型: 2-特约商户 + + + /** + * 商户号 + */ + @TableId(value = "mch_no", type = IdType.INPUT) + private String mchNo; + + /** + * 商户名称 + */ + private String mchName; + + /** + * 商户简称 + */ + private String mchShortName; + + /** + * 类型: 1-普通商户, 2-特约商户(服务商模式) + */ + private Byte type; + + /** + * 服务商号 + */ + private String isvNo; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人手机号 + */ + private String contactTel; + + /** + * 联系人邮箱 + */ + private String contactEmail; + + /** + * 私钥 + */ + private String privateKey; + + /** + * 商户状态: 0-停用, 1-正常 + */ + private Byte state; + + /** + * 商户备注 + */ + private String remark; + + /** + * 初始用户ID(创建商户时,允许商户登录的用户) + */ + private Long initUserId; + + /** + * 创建者用户ID + */ + private Long createdUid; + + /** + * 创建者姓名 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchNotifyRecord.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchNotifyRecord.java new file mode 100644 index 0000000000000000000000000000000000000000..4f570f2cbc42f9fad678774255a662b13238ad18 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchNotifyRecord.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 商户通知记录表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_mch_notify_record") +public class MchNotifyRecord extends BaseModel implements Serializable { + + //订单类型:1-支付,2-退款 + public static final Byte TYPE_PAY_ORDER = 1; + public static final Byte TYPE_REFUND_ORDER = 2; + + //通知状态 + public static final Byte STATE_ING = 1; + public static final Byte STATE_SUCCESS = 2; + public static final Byte STATE_FAIL = 3; + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 商户通知记录ID + */ + @TableId(value = "notify_id", type = IdType.AUTO) + private Long notifyId; + + /** + * 订单ID + */ + private String orderId; + + /** + * 订单类型:1-支付,2-退款 + */ + private Byte orderType; + + /** + * 商户订单号 + */ + private String mchOrderNo; + + /** + * 商户号 + */ + private String mchNo; + + /** + * 服务商号 + */ + private String isvNo; + + /** + * 通知地址 + */ + private String notifyUrl; + + /** + * 通知响应结果 + */ + private String resResult; + + /** + * 通知次数 + */ + private Integer notifyCount; + + /** + * 通知状态,1-通知中,2-通知成功,3-通知失败 + */ + private Byte state; + + /** + * 最后一次通知时间 + */ + private Date lastNotifyTime; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchPayPassage.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchPayPassage.java new file mode 100644 index 0000000000000000000000000000000000000000..033ff2e650ce2fa86847671399e31208adb997b6 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/MchPayPassage.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 商户支付通道表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_mch_pay_passage") +public class MchPayPassage extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 商户号 + */ + private String mchNo; + + /** + * 支付接口 + */ + private String ifCode; + + /** + * 支付方式 + */ + private String wayCode; + + /** + * 支付方式费率 + */ + private BigDecimal rate; + + /** + * 风控数据 + */ + private String riskConfig; + + /** + * 状态: 0-停用, 1-启用 + */ + private Byte state; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..e36b05b665038c86bbec034ee6ba902175a0c95e --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceConfig.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 支付接口配置参数表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_pay_interface_config") +public class PayInterfaceConfig extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * ID + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 账号类型:1-服务商 2-商户 + */ + private Byte infoType; + + /** + * 服务商或商户No + */ + private String infoId; + + /** + * 支付接口代码 + */ + private String ifCode; + + /** + * 接口配置参数,json字符串 + */ + private String ifParams; + + /** + * 支付接口费率 + */ + private BigDecimal ifRate; + + /** + * 状态: 0-停用, 1-启用 + */ + private Byte state; + + /** + * 备注 + */ + private String remark; + + /** + * 创建者用户ID + */ + private Long createdUid; + + /** + * 创建者姓名 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新者用户ID + */ + private Long updatedUid; + + /** + * 更新者姓名 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceDefine.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceDefine.java new file mode 100644 index 0000000000000000000000000000000000000000..ba39465b3d8da32f63001927b6b7f28a1a441587 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayInterfaceDefine.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 支付接口定义表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName(value = "t_pay_interface_define", autoResultMap = true) +public class PayInterfaceDefine extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 接口代码 全小写 wxpay alipay + */ + @TableId + private String ifCode; + + /** + * 接口名称 + */ + private String ifName; + + /** + * 是否支持普通商户模式: 0-不支持, 1-支持 + */ + private Byte isMchMode; + + /** + * 是否支持服务商子商户模式: 0-不支持, 1-支持 + */ + private Byte isIsvMode; + + /** + * ISV接口配置定义描述,json字符串 + */ + private String isvParams; + + /** + * 特约商户接口配置定义描述,json字符串 + */ + private String isvsubMchParams; + + /** + * 普通商户接口配置定义描述,json字符串 + */ + private String normalMchParams; + + /** + * 支持的支付方式 ["wxpay_jsapi", "wxpay_bar"] + */ + @TableField(typeHandler = FastjsonTypeHandler.class) + private JSONArray wayCodes; + + /** + * 页面展示:卡片-图标 + */ + private String icon; + + /** + * 页面展示:卡片-背景色 + */ + private String bgColor; + + /** + * 状态: 0-停用, 1-启用 + */ + private Byte state; + + /** + * 备注 + */ + private String remark; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayOrder.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayOrder.java new file mode 100644 index 0000000000000000000000000000000000000000..b68ae9cad5eace667414514426581bd1dbf6c1c9 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayOrder.java @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 支付订单表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_pay_order") +public class PayOrder extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + + public static final byte STATE_INIT = 0; //订单生成 + public static final byte STATE_ING = 1; //支付中 + public static final byte STATE_SUCCESS = 2; //支付成功 + public static final byte STATE_FAIL = 3; //支付失败 + public static final byte STATE_CANCEL = 4; //已撤销 + public static final byte STATE_REFUND = 5; //已退款 + public static final byte STATE_CLOSED = 6; //订单关闭 + + + /** + * 支付订单号 + */ + @TableId + private String payOrderId; + + /** + * 商户号 + */ + private String mchNo; + + /** + * 服务商号 + */ + private String isvNo; + + /** + * 商户名称 + */ + private String mchName; + + /** + * 类型: 1-普通商户, 2-特约商户(服务商模式) + */ + private Byte mchType; + + /** + * 商户订单号 + */ + private String mchOrderNo; + + /** + * 支付接口代码 + */ + private String ifCode; + + /** + * 支付方式代码 + */ + private String wayCode; + + /** + * 支付金额,单位分 + */ + private Long amount; + + /** + * 三位货币代码,人民币:cny + */ + private String currency; + + /** + * 支付状态: 0-订单生成, 1-支付中, 2-支付成功, 3-支付失败, 4-已撤销, 5-已退款, 6-订单关闭 + */ + private Byte state; + + /** + * 向下游回调状态, 0-未发送, 1-已发送 + */ + private Byte notifyState; + + /** + * 客户端IP + */ + private String clientIp; + + /** + * 商品标题 + */ + private String subject; + + /** + * 商品描述信息 + */ + private String body; + + /** + * 特定渠道发起额外参数 + */ + private String channelExtra; + + /** + * 渠道用户标识,如微信openId,支付宝账号 + */ + private String channelUser; + + /** + * 渠道订单号 + */ + private String channelOrderNo; + + /** + * 退款次数 + */ + private Integer refundTimes; + + /** + * 退款总金额,单位分 + */ + private Long refundAmount; + + /** + * 订单分账标志:0-否 1-是 + */ + private Byte divisionFlag; + + /** + * 预计分账发起时间 + */ + private Date divisionTime; + + /** + * 渠道支付错误码 + */ + private String errCode; + + /** + * 渠道支付错误描述 + */ + private String errMsg; + + /** + * 商户扩展参数 + */ + private String extParam; + + /** + * 异步通知地址 + */ + private String notifyUrl; + + /** + * 页面跳转地址 + */ + private String returnUrl; + + /** + * 订单失效时间 + */ + private Date expiredTime; + + /** + * 订单支付成功时间 + */ + private Date successTime; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayWay.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayWay.java new file mode 100644 index 0000000000000000000000000000000000000000..41704a90f4ff568f1fa6a727aee6a33dc60dbc6b --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/PayWay.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 支付方式表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_pay_way") +public class PayWay extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 支付方式代码 例如: wxpay_jsapi + */ + @TableId + private String wayCode; + + /** + * 支付方式名称 + */ + private String wayName; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/RefundOrder.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/RefundOrder.java new file mode 100644 index 0000000000000000000000000000000000000000..ae159f9d276862e6a99a17f2359ec46f9e3c20ef --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/RefundOrder.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 退款订单表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_refund_order") +public class RefundOrder extends BaseModel implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 退款订单号 + */ + @TableId + private String refundOrderId; + + /** + * 支付订单号 + */ + private String payOrderId; + + /** + * 渠道支付单号 + */ + private String channelPayOrderNo; + + /** + * 商户号 + */ + private String mchNo; + + /** + * 类型: 1-普通商户, 2-特约商户(服务商模式) + */ + private Byte mchType; + + /** + * 商户退款单号 + */ + private String mchRefundNo; + + /** + * 服务商号 + */ + private String isvNo; + + /** + * 支付方式代码 + */ + private String wayCode; + + /** + * 支付接口代码 + */ + private String ifCode; + + /** + * 支付金额,单位分 + */ + private Long payAmount; + + /** + * 退款金额,单位分 + */ + private Long refundAmount; + + /** + * 三位货币代码,人民币:cny + */ + private String currency; + + /** + * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败 + */ + private Byte state; + + /** + * 退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败 + */ + private Byte result; + + /** + * 客户端IP + */ + private String clientIp; + + /** + * 备注 + */ + private String remark; + + /** + * 渠道订单号 + */ + private String channelOrderNo; + + /** + * 渠道错误码 + */ + private String channelErrCode; + + /** + * 渠道错误描述 + */ + private String channelErrMsg; + + /** + * 特定渠道发起时额外参数 + */ + private String channelExtra; + + /** + * 通知地址 + */ + private String notifyUrl; + + /** + * 扩展参数 + */ + private String extParam; + + /** + * 订单退款成功时间 + */ + private Date successTime; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..5290dead75857d9c6c2de2cc21997a459a1c2f07 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysConfig.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 系统配置表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_config") +public class SysConfig extends BaseModel implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 配置KEY + */ + @TableId(value = "config_key", type = IdType.INPUT) + private String configKey; + + /** + * 配置名称 + */ + private String configName; + + /** + * 描述信息 + */ + private String configDesc; + + /** + * 分组key + */ + private String groupKey; + + /** + * 分组名称 + */ + private String groupName; + + /** + * 配置内容项 + */ + private String configVal; + + /** + * 类型: text-输入框, textarea-多行文本, uploadImg-上传图片, switch-开关 + */ + private String type; + + /** + * 显示顺序 + */ + private Long sortNum; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysEntitlement.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysEntitlement.java new file mode 100644 index 0000000000000000000000000000000000000000..494021880f7cb96da6b2194099c5be00f16b67d6 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysEntitlement.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + *

+ * 系统权限表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_entitlement") +public class SysEntitlement extends BaseModel { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 权限ID[ENT_功能模块_子模块_操作], eg: ENT_ROLE_LIST_ADD + */ + @TableId + private String entId; + + /** + * 权限名称 + */ + private String entName; + + /** + * 菜单图标 + */ + private String menuIcon; + + /** + * 菜单uri/路由地址 + */ + private String menuUri; + + /** + * 组件Name(前后端分离使用) + */ + private String componentName; + + /** + * 权限类型 ML-左侧显示菜单, MO-其他菜单, PB-页面/按钮 + */ + private String entType; + + /** + * 快速开始菜单 0-否, 1-是 + */ + private Byte quickJump; + + /** + * 状态 0-停用, 1-启用 + */ + private Byte state; + + /** + * 父ID + */ + private String pid; + + /** + * 排序字段, 规则:正序 + */ + private Integer entSort; + + /** + * 所属系统: MGR-运营平台, MCH-商户中心 + */ + private String system; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysLog.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysLog.java new file mode 100644 index 0000000000000000000000000000000000000000..4a71e13779925d03ef1ec9cccf4ef1d4d73705fb --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysLog.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 系统操作日志表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_log") +public class SysLog implements Serializable { + + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * id + */ + @TableId(value = "sys_log_id", type = IdType.AUTO) + private Integer sysLogId; + + /** + * 系统用户ID + */ + private Long userId; + + /** + * 用户姓名 + */ + private String userName; + + /** + * 用户IP + */ + private String userIp; + + /** + * 所属系统: MGR-运营平台, MCH-商户中心 + */ + private String system; + + /** + * 方法名 + */ + private String methodName; + + /** + * 方法描述 + */ + private String methodRemark; + + /** + * 请求地址 + */ + private String reqUrl; + + /** + * 操作请求参数 + */ + private String optReqParam; + + /** + * 操作响应结果 + */ + private String optResInfo; + + /** + * 创建时间 + */ + private Date createdAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRole.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRole.java new file mode 100644 index 0000000000000000000000000000000000000000..5e15a5f41f39a8bb9ca40fca29413d5e3297404a --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRole.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 系统角色表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_role") +public class SysRole implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 角色ID, ROLE_开头 + */ + @TableId + private String roleId; + + /** + * 角色名称 + */ + private String roleName; + + /** + * 所属系统: MGR-运营平台, MCH-商户中心 + */ + private String system; + + /** + * 所属商户ID / 0(平台) + */ + private String belongInfoId; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRoleEntRela.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRoleEntRela.java new file mode 100644 index 0000000000000000000000000000000000000000..7ca508e86f1082e7bf44864c6d1ab7fd0595dc0b --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysRoleEntRela.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 系统角色权限关联表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_role_ent_rela") +public class SysRoleEntRela implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 角色ID + */ + private String roleId; + + /** + * 权限ID + */ + private String entId; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUser.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUser.java new file mode 100644 index 0000000000000000000000000000000000000000..2c3be4b4b32dd8f370f491b048271bcfdae53cf5 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUser.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.model.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.util.Date; + +/** + *

+ * 系统用户表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_user") +public class SysUser extends BaseModel { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 系统用户ID + */ + @TableId(value = "sys_user_id", type = IdType.AUTO) + private Long sysUserId; + + /** + * 登录用户名 + */ + private String loginUsername; + + /** + * 真实姓名 + */ + private String realname; + + /** + * 手机号 + */ + private String telphone; + + /** + * 性别 0-未知, 1-男, 2-女 + */ + private Byte sex; + + /** + * 头像地址 + */ + private String avatarUrl; + + /** + * 员工编号 + */ + private String userNo; + + /** + * 是否超管(超管拥有全部权限) 0-否 1-是 + */ + private Byte isAdmin; + + /** + * 状态 0-停用 1-启用 + */ + private Byte state; + + /** + * 所属系统: MGR-运营平台, MCH-商户中心 + */ + private String system; + + /** + * 所属商户ID / 0(平台) + */ + private String belongInfoId; + + /** + * 创建时间 + */ + private Date createdAt; + + /** + * 更新时间 + */ + private Date updatedAt; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserAuth.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserAuth.java new file mode 100644 index 0000000000000000000000000000000000000000..4c9857a3a3d4d87ba62f57e53ef89e0634d1b0e1 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserAuth.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 系统用户认证表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_user_auth") +public class SysUserAuth implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * ID + */ + @TableId(value = "auth_id", type = IdType.AUTO) + private Long authId; + + /** + * user_id + */ + private Long userId; + + /** + * 登录类型 1-昵称 2-手机号 3-邮箱 10-微信 11-QQ 12-支付宝 13-微博 + */ + private Byte identityType; + + /** + * 认证标识 ( 用户名 | open_id ) + */ + private String identifier; + + /** + * 密码凭证 + */ + private String credential; + + /** + * salt + */ + private String salt; + + /** + * 所属系统: MGR-运营平台, MCH-商户中心 + */ + private String system; + + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserRoleRela.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserRoleRela.java new file mode 100644 index 0000000000000000000000000000000000000000..5b15b0c017ef64ca5e3c55ca9e0be6b7795a0005 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/entity/SysUserRoleRela.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + *

+ * 操作员<->角色 关联表 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("t_sys_user_role_rela") +public class SysUserRoleRela implements Serializable { + + //gw + public static final LambdaQueryWrapper gw(){ + return new LambdaQueryWrapper<>(); + } + + private static final long serialVersionUID=1L; + + /** + * 用户ID + */ + private Long userId; + + /** + * 角色ID + */ + private String roleId; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizException.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizException.java new file mode 100644 index 0000000000000000000000000000000000000000..a6cb8d206f83ce1db02d6d3b4b584f2194654ca4 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizException.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.exception; + +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.model.ApiRes; +import lombok.Getter; +/* +* 自定义业务异常 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:33 +*/ +@Getter +public class BizException extends RuntimeException{ + + private static final long serialVersionUID = 1L; + + private ApiRes apiRes; + + /** 业务自定义异常 **/ + public BizException(String msg) { + super(msg); + this.apiRes = ApiRes.customFail(msg); + } + + public BizException(ApiCodeEnum apiCodeEnum, String... params) { + super(); + apiRes = ApiRes.fail(apiCodeEnum, params); + } + + public BizException(ApiRes apiRes) { + super(apiRes.getMsg()); + this.apiRes = apiRes; + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizExceptionResolver.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizExceptionResolver.java new file mode 100644 index 0000000000000000000000000000000000000000..8339603272ae61ad135117bca38674c9804751ec --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/BizExceptionResolver.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.exception; + +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.model.ApiRes; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.context.annotation.Configuration; +import org.springframework.dao.DataAccessException; +import org.springframework.web.servlet.HandlerExceptionResolver; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/* +* 异常信息自定义返回数据 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:30 +*/ +@Configuration +public class BizExceptionResolver implements HandlerExceptionResolver { + + private Logger logger = LogManager.getLogger(BizExceptionResolver.class); + + @Override + public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, + Exception ex) { + + + // 是否包含ss框架 + boolean hasSpringSecurity = false; + try { + hasSpringSecurity = Class.forName("org.springframework.security.access.AccessDeniedException") != null; + } catch (Exception e) { + } + + String outPutJson; + + //业务异常 + if(ex instanceof BizException) { + logger.error("公共捕捉[Biz]异常:{}",ex.getMessage()); + outPutJson = ((BizException) ex).getApiRes().toJSONString(); + }else if(ex instanceof DataAccessException){ + logger.error("公共捕捉[DataAccessException]异常:",ex); + outPutJson = ApiRes.fail(ApiCodeEnum.DB_ERROR).toJSONString(); + }else if(hasSpringSecurity && ex instanceof org.springframework.security.access.AccessDeniedException) { + logger.error("公共捕捉[AccessDeniedException]异常:", ex); + outPutJson = ApiRes.fail(ApiCodeEnum.SYS_PERMISSION_ERROR, ex.getMessage()).toJSONString(); + }else{ + logger.error("公共捕捉[Exception]异常:",ex); + outPutJson = ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, ex.getMessage()).toJSONString(); + } + + try { + this.outPutJson(response, outPutJson); + } catch (IOException e) { + logger.error("输出错误信息异常:", e); + } + + return new ModelAndView(); + } + + + public void outPutJson(HttpServletResponse res, String jsonStr) throws IOException { + res.setContentType("text/json;charset=utf-8"); + res.getWriter().write(jsonStr); + res.getWriter().flush(); + res.getWriter().close(); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/ResponseException.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/ResponseException.java new file mode 100644 index 0000000000000000000000000000000000000000..89fbfb639a3044a7a21069fa3c3f4afa2e04f4cd --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/exception/ResponseException.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.exception; + +import lombok.Getter; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +/* +* 响应异常, 一般用于支付接口回调函数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:31 +*/ +@Getter +public class ResponseException extends RuntimeException{ + + private static final long serialVersionUID = 1L; + + private ResponseEntity responseEntity; + + /** 业务自定义异常 **/ + public ResponseException(ResponseEntity resp) { + super(); + this.responseEntity = resp; + } + + /** 生成文本类型的响应 **/ + public static ResponseException buildText(String text){ + + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.TEXT_HTML); + ResponseEntity entity = new ResponseEntity(text, httpHeaders, HttpStatus.OK); + return new ResponseException(entity); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTPayload.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTPayload.java new file mode 100644 index 0000000000000000000000000000000000000000..4801d9769382f1ef7bfe7c58e7a8a617c7ba95bf --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTPayload.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.jwt; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import lombok.Data; + +import java.util.Map; + +/* +* JWT payload 载体 +* 格式: + { + "sysUserId": "10001", + "created": "1568250147846", + "cacheKey": "KEYKEYKEYKEY", + } +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 18:01 +*/ +@Data +public class JWTPayload { + + private Long sysUserId; //登录用户ID + private Long created; //创建时间, 格式:13位时间戳 + private String cacheKey; //redis保存的key + + protected JWTPayload(){} + + public JWTPayload(JeeUserDetails jeeUserDetails){ + + this.setSysUserId(jeeUserDetails.getSysUser().getSysUserId()); + this.setCreated(System.currentTimeMillis()); + this.setCacheKey(jeeUserDetails.getCacheKey()); + } + + + /** toMap **/ + public Map toMap(){ + JSONObject json = (JSONObject)JSONObject.toJSON(this); + return json.toJavaObject(Map.class); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTUtils.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..62addeab4c53e893afc386f4a2cec4cdfbaeb9f9 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/jwt/JWTUtils.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.jwt; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; + +/* +* JWT工具包 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:32 +*/ +public class JWTUtils { + + /** 生成token **/ + public static String generateToken(JWTPayload jwtPayload, String jwtSecret) { + return Jwts.builder() + .setClaims(jwtPayload.toMap()) + //过期时间 = 当前时间 + (设置过期时间[单位 :s ] ) token放置redis 过期时间无意义 + //.setExpiration(new Date(System.currentTimeMillis() + (jwtExpiration * 1000) )) + .signWith(SignatureAlgorithm.HS512, jwtSecret) + .compact(); + } + + /** 根据token与秘钥 解析token并转换为 JWTPayload **/ + public static JWTPayload parseToken(String token, String secret){ + try { + Claims claims = Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody(); + + JWTPayload result = new JWTPayload(); + result.setSysUserId(claims.get("sysUserId", Long.class)); + result.setCreated(claims.get("created", Long.class)); + result.setCacheKey(claims.get("cacheKey", String.class)); + return result; + + + } catch (Exception e) { + return null; //解析失败 + } + } + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/ApiRes.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/ApiRes.java new file mode 100644 index 0000000000000000000000000000000000000000..be728b459ebd61ecad6d2216c9ab2abc6a2754b6 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/ApiRes.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.core.utils.JsonKit; +import lombok.AllArgsConstructor; +import lombok.Data; + +/* +* 接口返回对象 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:35 +*/ +@Data +@AllArgsConstructor +public class ApiRes { + + /** 业务响应码 **/ + private Integer code; + + /** 业务响应信息 **/ + private String msg; + + /** 数据对象 **/ + private Object data; + + /** 签名值 **/ + private String sign; + + /** 输出json格式字符串 **/ + public String toJSONString(){ + return JSON.toJSONString(this); + } + + /** 业务处理成功 **/ + public static ApiRes ok(){ + return ok(null); + } + + /** 业务处理成功 **/ + public static ApiRes ok(Object data){ + return new ApiRes(ApiCodeEnum.SUCCESS.getCode(), ApiCodeEnum.SUCCESS.getMsg(), data, null); + } + + /** 业务处理成功, 自动签名 **/ + public static ApiRes okWithSign(Object data, String mchKey){ + + if(data == null){ + return new ApiRes(ApiCodeEnum.SUCCESS.getCode(), ApiCodeEnum.SUCCESS.getMsg(), null, null); + } + + JSONObject jsonObject = (JSONObject)JSONObject.toJSON(data); + String sign = JeepayKit.getSign(jsonObject, mchKey); + return new ApiRes(ApiCodeEnum.SUCCESS.getCode(), ApiCodeEnum.SUCCESS.getMsg(), data, sign); + } + + /** 业务处理成功, 返回简单json格式 **/ + public static ApiRes ok4newJson(String key, Object val){ + return ok(JsonKit.newJson(key, val)); + } + + /** 业务处理成功, 封装分页数据, 仅返回必要参数 **/ + public static ApiRes page(IPage iPage){ + + JSONObject result = new JSONObject(); + result.put("records", iPage.getRecords()); //记录明细 + result.put("total", iPage.getTotal()); //总条数 + result.put("current", iPage.getCurrent()); //当前页码 + result.put("hasNext", iPage.getPages() > iPage.getCurrent() ); //是否有下一页 + return ok(result); + } + + /** 业务处理失败 **/ + public static ApiRes fail(ApiCodeEnum apiCodeEnum, String... params){ + + if(params == null || params.length <= 0){ + return new ApiRes(apiCodeEnum.getCode(), apiCodeEnum.getMsg(), null, null); + } + return new ApiRes(apiCodeEnum.getCode(), String.format(apiCodeEnum.getMsg(), params), null, null); + } + + /** 自定义错误信息, 原封不用的返回输入的错误信息 **/ + public static ApiRes customFail(String customMsg){ + return new ApiRes(ApiCodeEnum.CUSTOM_FAIL.getCode(), customMsg, null, null); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/BaseModel.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/BaseModel.java new file mode 100644 index 0000000000000000000000000000000000000000..654c2a694a98d4ee5b0c1ad0d549c9cbb26bc7fb --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/BaseModel.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.annotation.TableField; + +import java.io.Serializable; + +/* +* BaseModel 封装公共处理函数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:49 +*/ +public class BaseModel implements Serializable{ + + private static final long serialVersionUID = 1L; + + /** ext参数, 用作扩展参数, 会在转换为api数据时自动将ext全部属性放置在对象的主属性上, 并且不包含ext属性 **/ + + /** api接口扩展字段, 当包含该字段时 将自动填充到实体对象属性中如{id:1, ext:{abc:222}} 则自动转换为: {id:1, abc:222}, + * 需配合ResponseBodyAdvice使用 + * **/ + @TableField(exist = false) + private JSONObject ext; + + //获取的时候设置默认值 + public JSONObject getExt() { + return ext; + } + + //设置扩展字段 + public BaseModel addExt(String key, Object val) { + + if(ext == null) ext = new JSONObject(); + ext.put(key,val); + return this; + } + + /** get ext value 可直接使用JSONObject对象的函数 **/ + public JSONObject extv() { + return ext == null ? new JSONObject() : ext; + } + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/DBApplicationConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/DBApplicationConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..627565aa5351aa0c36ca0113d8ed81e1434f3ea2 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/DBApplicationConfig.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model; + +import cn.hutool.core.util.URLUtil; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.utils.JeepayKit; +import lombok.Data; + +import java.io.Serializable; + +/* +* 系统应用配置项定义Bean +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:35 +*/ +@Data +public class DBApplicationConfig implements Serializable { + + /** 运营系统地址 **/ + private String mgrSiteUrl; + + /** 商户系统地址 **/ + private String mchSiteUrl; + + /** 支付网关地址 **/ + private String paySiteUrl; + + /** oss公共读文件地址 **/ + private String ossPublicSiteUrl; + + /** 生成 【jsapi统一收银台跳转地址】 **/ + public String genUniJsapiPayUrl(String payOrderId){ + return getPaySiteUrl() + "/cashier/index.html#/hub/" + JeepayKit.aesEncode(payOrderId); + } + + /** 生成 【jsapi统一收银台】oauth2获取用户ID回调地址 **/ + public String genOauth2RedirectUrlEncode(String payOrderId){ + return URLUtil.encode(getPaySiteUrl() + "/cashier/index.html#/oauth2Callback/" + JeepayKit.aesEncode(payOrderId)); + } + + /** 生成 【商户获取渠道用户ID接口】oauth2获取用户ID回调地址 **/ + public String genMchChannelUserIdApiOauth2RedirectUrlEncode(JSONObject param){ + return URLUtil.encode(getPaySiteUrl() + "/api/channelUserId/oauth2Callback/" + JeepayKit.aesEncode(param.toJSONString())); + } + + /** 生成 【jsapi统一收银台二维码图片地址】 **/ + public String genScanImgUrl(String url){ + return getPaySiteUrl() + "/api/scan/imgs/" + JeepayKit.aesEncode(url) + ".png"; + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OriginalRes.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OriginalRes.java new file mode 100644 index 0000000000000000000000000000000000000000..8918e303423096ed5a363f60a766e95db5cf5ebe --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OriginalRes.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/* +* 返回原始数据 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:37 +*/ +@Data +@AllArgsConstructor +public class OriginalRes { + + /** 返回数据 **/ + private Object data; + + public static OriginalRes ok(Object data){ + return new OriginalRes(data); + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OssFileConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OssFileConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..ca95db8198d540ce35cad01d83a37243bc549735 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/OssFileConfig.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model; + +import lombok.AllArgsConstructor; +import lombok.Data; +import org.apache.commons.lang3.StringUtils; + +import java.util.*; + +/* +* 定义文件上传的配置信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:38 +*/ +@Data +@AllArgsConstructor +public class OssFileConfig { + + /** 用户头像 **/ + interface BIZ_TYPE { + String AVATAR = "avatar"; /** 用户头像 **/ + String IF_BG = "ifBG"; /** 接口类型卡片背景图片 **/ + String CERT = "cert"; /** 接口参数 **/ + } + + /** 图片类型后缀格式 **/ + public static final Set IMG_SUFFIX = new HashSet(Arrays.asList("jpg", "png", "jpeg", "gif")); + + /** 全部后缀格式的文件标识符 **/ + public static final String ALL_SUFFIX_FLAG = "*"; + + /** 不校验文件大小标识符 **/ + public static final Long ALL_MAX_SIZE = -1L; + + /** 允许上传的最大文件大小的默认值 **/ + public static final Long DEFAULT_MAX_SIZE = 5 * 1024 * 1024L; + + private static final Map ALL_BIZ_TYPE_MAP = new HashMap<>(); + static{ + ALL_BIZ_TYPE_MAP.put(BIZ_TYPE.AVATAR, new OssFileConfig(true, IMG_SUFFIX, DEFAULT_MAX_SIZE) ); + ALL_BIZ_TYPE_MAP.put(BIZ_TYPE.IF_BG, new OssFileConfig(true, IMG_SUFFIX, DEFAULT_MAX_SIZE) ); + ALL_BIZ_TYPE_MAP.put(BIZ_TYPE.CERT, new OssFileConfig(false, new HashSet<>(Arrays.asList(ALL_SUFFIX_FLAG)), DEFAULT_MAX_SIZE) ); + } + + /** 是否允许公共读 **/ + private boolean allowPublicRead = false; + + /** 允许的文件后缀, 默认全部类型 **/ + private Set allowFileSuffix = new HashSet<>(Arrays.asList(ALL_SUFFIX_FLAG)); + + /** 允许的文件大小, 单位: Byte **/ + private Long maxSize = DEFAULT_MAX_SIZE; + + + /** 是否在允许的文件类型后缀内 **/ + public boolean isAllowFileSuffix(String fixSuffix){ + + if(this.allowFileSuffix.contains(ALL_SUFFIX_FLAG)){ //允许全部 + return true; + } + + return this.allowFileSuffix.contains(StringUtils.defaultIfEmpty(fixSuffix, "").toLowerCase()); + } + + /** 是否在允许的大小范围内 **/ + public boolean isMaxSizeLimit(Long fileSize){ + + if(ALL_MAX_SIZE.equals(this.maxSize)){ //允许全部大小 + return true; + } + + return this.maxSize >= ( fileSize == null ? 0L : fileSize); + } + + + public static OssFileConfig getOssFileConfigByBizType(String bizType){ + return ALL_BIZ_TYPE_MAP.get(bizType); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvParams.java new file mode 100644 index 0000000000000000000000000000000000000000..2165224d1b6d3709d03526b973ec61b2b796e760 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvParams.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvParams; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayIsvParams; + +/* + * 抽象类 isv参数定义 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 16:33 + */ +public abstract class IsvParams { + + public static IsvParams factory(String ifCode, String paramsStr){ + + if(CS.IF_CODE.WXPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, WxpayIsvParams.class); + }else if(CS.IF_CODE.ALIPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, AlipayIsvParams.class); + }else if(CS.IF_CODE.YSFPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, YsfpayIsvParams.class); + } + return null; + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvsubMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvsubMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..b6b43d1595c2051527209965ebb9d2e79a218b4b --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/IsvsubMchParams.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvsubMchParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvsubMchParams; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayIsvsubMchParams; + +/* + * 抽象类 特约商户参数定义 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 16:33 + */ +public abstract class IsvsubMchParams { + + public static IsvsubMchParams factory(String ifCode, String paramsStr){ + + if(CS.IF_CODE.WXPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, WxpayIsvsubMchParams.class); + }else if(CS.IF_CODE.ALIPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, AlipayIsvsubMchParams.class); + }else if(CS.IF_CODE.YSFPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, YsfpayIsvsubMchParams.class); + } + return null; + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/NormalMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/NormalMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..f292e8fe7347cc6489d2e249b76a20f89fbb3ca6 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/NormalMchParams.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; + +/* + * 抽象类 普通商户参数定义 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 16:33 + */ +public abstract class NormalMchParams { + + public static NormalMchParams factory(String ifCode, String paramsStr){ + + if(CS.IF_CODE.WXPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, WxpayNormalMchParams.class); + }else if(CS.IF_CODE.ALIPAY.equals(ifCode)){ + return JSONObject.parseObject(paramsStr, AlipayNormalMchParams.class); + } + return null; + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..5038bacceb92428c5fc45f3d689f0e27042e0fe7 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayConfig.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.alipay; + +import lombok.Data; + +/* +* 支付宝, 通用配置信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:32 +*/ +@Data +public class AlipayConfig{ + + public static final String SIGN_TYPE_RSA = "RSA"; + public static final String SIGN_TYPE_RSA2 = "RSA2"; + + + /** 网关地址 */ + public static String PROD_SERVER_URL = "https://openapi.alipay.com/gateway.do"; + public static String SANDBOX_SERVER_URL = "https://openapi.alipaydev.com/gateway.do"; + + public static String PROD_OAUTH_URL = "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=auth_base&state=&redirect_uri=%s"; + public static String SANDBOX_OAUTH_URL = "https://openauth.alipaydev.com/oauth2/publicAppAuthorize.htm?app_id=%s&scope=auth_base&state=&redirect_uri=%s"; + + public static String FORMAT = "json"; + + public static String CHARSET = "UTF-8"; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvParams.java new file mode 100644 index 0000000000000000000000000000000000000000..105075d2cf8ddd0006291234c0e51d1e7a19a859 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvParams.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.alipay; + +import com.jeequan.jeepay.core.model.params.IsvParams; +import lombok.Data; + +/* +* 支付宝 isv参数定义 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:34 +*/ +@Data +public class AlipayIsvParams extends IsvParams { + + /** 是否沙箱环境 */ + private Byte sandbox; + + /** pid */ + private String pid; + + /** appId */ + private String appId; + + /** privateKey */ + private String privateKey; + + /** alipayPublicKey */ + private String alipayPublicKey; + + /** 签名方式 **/ + private String signType; + + /** 是否使用证书方式 **/ + private Byte useCert; + + /** app 证书 **/ + private String appPublicCert; + + /** 支付宝公钥证书(.crt格式) **/ + private String alipayPublicCert; + + /** 支付宝根证书 **/ + private String alipayRootCert; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvsubMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvsubMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..13d7cd736ba8a9f40bc51e1fd2de31487f202649 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayIsvsubMchParams.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.alipay; + +import com.jeequan.jeepay.core.model.params.IsvsubMchParams; +import lombok.Data; + +/* + * 支付宝 特约商户参数定义 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 16:33 + */ +@Data +public class AlipayIsvsubMchParams extends IsvsubMchParams { + + private String appAuthToken; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayNormalMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayNormalMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..2f54099386b941f4032d4a3c2eecf32853443dd1 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/alipay/AlipayNormalMchParams.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.alipay; + +import com.jeequan.jeepay.core.model.params.NormalMchParams; +import lombok.Data; + +/* + * 支付宝 普通商户参数定义 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 16:33 + */ +@Data +public class AlipayNormalMchParams extends NormalMchParams { + + /** 是否沙箱环境 */ + private Byte sandbox; + + /** appId */ + private String appId; + + /** privateKey */ + private String privateKey; + + /** alipayPublicKey */ + private String alipayPublicKey; + + /** 签名方式 **/ + private String signType; + + /** 是否使用证书方式 **/ + private Byte useCert; + + /** app 证书 **/ + private String appPublicCert; + + /** 支付宝公钥证书(.crt格式) **/ + private String alipayPublicCert; + + /** 支付宝根证书 **/ + private String alipayRootCert; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvParams.java new file mode 100644 index 0000000000000000000000000000000000000000..45775e6be1b3b11801a99e18b6e1f502e3c81e60 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvParams.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.wxpay; + +import com.jeequan.jeepay.core.model.params.IsvParams; +import lombok.Data; + +/* +* 微信官方支付 配置参数 +* +* @author zhuxiao +* @site https://www.jeepay.vip +* @date 2021/6/8 18:02 +*/ +@Data +public class WxpayIsvParams extends IsvParams { + + /** 应用App ID */ + private String appId; + + /** 应用AppSecret */ + private String appSecret; + + /** 微信支付商户号 */ + private String mchId; + + /** oauth2地址 */ + private String oauth2Url; + + /** API密钥 */ + private String key; + + /** 签名方式 **/ + private String signType; + + /** 微信支付API版本 **/ + private String apiVersion; + + /** API V3秘钥 **/ + private String apiV3Key; + + /** 序列号 **/ + private String serialNo; + + /** API证书(.p12格式)**/ + private String cert; + + /** 私钥文件(.pem格式) **/ + private String apiClientKey; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvsubMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvsubMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..f6f29a5a99c40680e5a041c014307713141ccecb --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayIsvsubMchParams.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.wxpay; + +import com.jeequan.jeepay.core.model.params.IsvsubMchParams; +import lombok.Data; + +/* + * 微信官方支付 配置参数 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:02 + */ +@Data +public class WxpayIsvsubMchParams extends IsvsubMchParams { + + /** 子商户ID **/ + private String subMchId; + + /** 子账户appID **/ + private String subMchAppId; + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayNormalMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayNormalMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..ca58ff95c5b3669c5190cc53ad499b99ad6d9ed6 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/wxpay/WxpayNormalMchParams.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.wxpay; + +import com.jeequan.jeepay.core.model.params.NormalMchParams; +import lombok.Data; + +/* + * 微信官方支付 配置参数 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:02 + */ +@Data +public class WxpayNormalMchParams extends NormalMchParams { + + /** 应用App ID */ + private String appId; + + /** 应用AppSecret */ + private String appSecret; + + /** 微信支付商户号 */ + private String mchId; + + /** oauth2地址 */ + private String oauth2Url; + + /** API密钥 */ + private String key; + + /** 微信支付API版本 **/ + private String apiVersion; + + /** API V3秘钥 **/ + private String apiV3Key; + + /** 序列号 **/ + private String serialNo; + + /** API证书(.p12格式)**/ + private String cert; + + /** 私钥文件(.pem格式) **/ + private String apiClientKey; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayConfig.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..a5fafbcd6f7b7c18b26591b0062b2b35e64309cd --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayConfig.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.ysf; + +import lombok.Data; + +/* + * 云闪付 通用配置信息 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:02 + */ +@Data +public class YsfpayConfig { + + + /** 网关地址 */ + public static String PROD_SERVER_URL = "https://partner.95516.com"; + public static String SANDBOX_SERVER_URL = "http://ysf.bcbip.cn:10240"; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvParams.java new file mode 100644 index 0000000000000000000000000000000000000000..86f893461938bf3d7d0d88470be2b973d5a7c07e --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvParams.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.ysf; + +import com.jeequan.jeepay.core.model.params.IsvParams; +import lombok.Data; + +/* + * 云闪付 配置信息 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:02 + */ +@Data +public class YsfpayIsvParams extends IsvParams { + + /** 是否沙箱环境 */ + private Byte sandbox; + + /** serProvId **/ + private String serProvId; + + /** isvPrivateCertFile 证书 **/ + private String isvPrivateCertFile; + + /** isvPrivateCertPwd **/ + private String isvPrivateCertPwd; + + /** ysfpayPublicKey **/ + private String ysfpayPublicKey; + + /** acqOrgCodeList 支付机构号 **/ + private String acqOrgCode; + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvsubMchParams.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvsubMchParams.java new file mode 100644 index 0000000000000000000000000000000000000000..3bae96ff6235565cd09dcc6205eeb212fe62c58d --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/params/ysf/YsfpayIsvsubMchParams.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.params.ysf; + +import com.jeequan.jeepay.core.model.params.IsvsubMchParams; +import lombok.Data; + +/* + * 云闪付 配置信息 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:02 + */ +@Data +public class YsfpayIsvsubMchParams extends IsvsubMchParams { + + private String merId; // 商户编号 + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/security/JeeUserDetails.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/security/JeeUserDetails.java new file mode 100644 index 0000000000000000000000000000000000000000..0d4cca2d6e0991a931f8cb4590dd618c3d2c0003 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/model/security/JeeUserDetails.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.model.security; + +import com.jeequan.jeepay.core.entity.SysUser; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; + +import java.util.ArrayList; +import java.util.Collection; + +/* +* 实现Spring Security的UserDetails接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:34 +*/ +@Slf4j +@Data +public class JeeUserDetails implements UserDetails { + + /** 系统用户信息 **/ + private SysUser sysUser; + + /** 密码 **/ + private String credential; + + /** 角色+权限 集合 (角色必须以: ROLE_ 开头) **/ + private Collection authorities = new ArrayList<>(); + + /** 缓存标志 **/ + private String cacheKey; + + /** 登录IP **/ + private String loginIp; + + //此处的无参构造,为json反序列化提供 + public JeeUserDetails() { + } + + public JeeUserDetails(SysUser sysUser, String credential) { + + this.setSysUser(sysUser); + this.setCredential(credential); + + //TODO .... + //做一些初始化操作 + } + + /** spring-security 需要验证的密码 **/ + @Override + public String getPassword() { + return getCredential(); + } + + /** spring-security 登录名 **/ + @Override + public String getUsername() { + return getSysUser().getSysUserId() + ""; + } + + /** 账户是否过期 **/ + @Override + public boolean isAccountNonExpired() { + return true; + } + + /** 账户是否已解锁 **/ + @Override + public boolean isAccountNonLocked() { + return true; + } + + /** 密码是否过期 **/ + @Override + public boolean isCredentialsNonExpired() { + return true; + } + + /** 账户是否开启 **/ + @Override + public boolean isEnabled() { + return true; + } + + /** 获取权限集合 **/ + @Override + public Collection getAuthorities() { + return authorities; + } + + public static JeeUserDetails getCurrentUserDetails() { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + if (authentication == null) return null; + + try { + return (JeeUserDetails) authentication.getPrincipal(); + }catch (Exception e) { + return null; + } + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/AmountUtil.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/AmountUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..f56e88504a9d15f4664eb6c674a3312b5b66bda7 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/AmountUtil.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import java.math.BigDecimal; +import java.text.DecimalFormat; +import java.text.FieldPosition; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @Description: 金额工具类 + * @author dingzhiwei jmdhappy@126.com + * @date 2017-07-05 + * @version V1.0 + * @Copyright: www.xxpay.org + */ +public class AmountUtil { + + /** + * 将字符串"元"转换成"分" + * @param str + * @return + */ + public static String convertDollar2Cent(String str) { + DecimalFormat df = new DecimalFormat("0.00"); + StringBuffer sb = df.format(Double.parseDouble(str), + new StringBuffer(), new FieldPosition(0)); + int idx = sb.toString().indexOf("."); + sb.deleteCharAt(idx); + for (; sb.length() != 1;) { + if(sb.charAt(0) == '0') { + sb.deleteCharAt(0); + } else { + break; + } + } + return sb.toString(); + } + + /** + * 将字符串"分"转换成"元"(长格式),如:100分被转换为1.00元。 + * @param s + * @return + */ + public static String convertCent2Dollar(String s) { + if("".equals(s) || s ==null){ + return ""; + } + long l; + if(s.length() != 0) { + if(s.charAt(0) == '+') { + s = s.substring(1); + } + l = Long.parseLong(s); + } else { + return ""; + } + boolean negative = false; + if(l < 0) { + negative = true; + l = Math.abs(l); + } + s = Long.toString(l); + if(s.length() == 1) + return(negative ? ("-0.0" + s) : ("0.0" + s)); + if(s.length() == 2) + return(negative ? ("-0." + s) : ("0." + s)); + else + return(negative ? ("-" + s.substring(0, s.length() - 2) + "." + s + .substring(s.length() - 2)) : (s.substring(0, + s.length() - 2) + + "." + s.substring(s.length() - 2))); + } + + + + /** + * 将Long "分"转换成"元"(长格式),如:100分被转换为1.00元。 + * @param s + * @return + */ + public static String convertCent2Dollar(Long s){ + if(s == null) return ""; + return new BigDecimal(s).divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toString(); + } + + /** + * 将字符串"分"转换成"元"(短格式),如:100分被转换为1元。 + * @param s + * @return + */ + public static String convertCent2DollarShort(String s) { + String ss = convertCent2Dollar(s); + ss = "" + Double.parseDouble(ss); + if(ss.endsWith(".0")) + return ss.substring(0, ss.length() - 2); + if(ss.endsWith(".00")) + return ss.substring(0, ss.length() - 3); + else + return ss; + } + + /** + * 判断金额为2位小数 + * @param str + * @return + */ + public static boolean isAmount(String str){ + if(str == null) return false; + Pattern pattern = Pattern.compile("^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$"); // 判断小数点后2位的数字的正则表达式 + Matcher match = pattern.matcher(str); + return match.matches(); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/ApiResBodyAdviceKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/ApiResBodyAdviceKit.java new file mode 100644 index 0000000000000000000000000000000000000000..51fc27cb83ffea121232dfe8b7d1a8dd89a251a5 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/ApiResBodyAdviceKit.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.model.OriginalRes; +import com.jeequan.jeepay.core.model.ApiRes; +import org.springframework.core.io.InputStreamResource; + +import java.util.Collection; + +/* +* 自定义springMVC的controller的返回值 + * 功能: + * 1. 自动添加ApiRes.ok(); + * 2. 处理model的扩展字段 (只需要在model中设置[ext]参数, 可以实现json自动转换为外层字段。 ) + * 比如 model为 {id:1, ext:{abc:222}} 则自动转换为: {id:1, abc:222} +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:49 +*/ +public class ApiResBodyAdviceKit { + + /** 扩展字段的key名称 **/ + private static final String API_EXTEND_FIELD_NAME = "ext"; + + public static Object beforeBodyWrite(Object body) { + + //空的情况 不处理 + if(body == null ) return null; + + if(body instanceof OriginalRes){ + return ((OriginalRes) body).getData(); + } + + //返回文件流不处理 + if(body instanceof InputStreamResource){ + return body; + } + + //返回二进制文件不处理 + if(body instanceof byte[]){ + return body; + } + + //如果为ApiRes类型则仅处理扩展字段 + if(body instanceof ApiRes) { + return procAndConvertJSON(body); + }else{ + + //ctrl返回其他非[ApiRes]认为处理成功, 先转换为成功状态, 在处理字段 + return procAndConvertJSON(ApiRes.ok(body)); + } + } + + /** 处理扩展字段 and 转换为json格式 **/ + private static Object procAndConvertJSON(Object object){ + + Object json = JSON.toJSON(object); //转换为JSON格式 + + if(json instanceof JSONObject){ //对象类型 + processExtFieldByJSONObject((JSONObject) json); + return json; + } + + if(json instanceof Collection){ //数组类型 + + JSONArray result = new JSONArray(); + for (Object itemObj : (Collection) json) { + result.add(procAndConvertJSON(itemObj)); + } + return result; + } + + return json; + } + + + /** 处理jsonObject格式 **/ + private static void processExtFieldByJSONObject(JSONObject jsonObject){ + + //如果包含字段, 则赋值到外层然后删除该字段 + if(jsonObject.containsKey(API_EXTEND_FIELD_NAME)){ + JSONObject exFieldMap = jsonObject.getJSONObject(API_EXTEND_FIELD_NAME); + if(exFieldMap != null){ //包含字段 + for (String s : exFieldMap.keySet()) { //遍历赋值到外层 + jsonObject.put(s, exFieldMap.get(s)); + } + } + jsonObject.remove(API_EXTEND_FIELD_NAME); //删除字段 + } + + //处理所有值 + for (String key : jsonObject.keySet()) { + jsonObject.put(key, procAndConvertJSON(jsonObject.get(key))); + } + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/DateKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/DateKit.java new file mode 100644 index 0000000000000000000000000000000000000000..1145d2c27c56712b57d1ecfb2c4e74e9bb131c6d --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/DateKit.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import cn.hutool.core.date.DateUtil; +import com.jeequan.jeepay.core.exception.BizException; +import org.apache.commons.lang3.StringUtils; + +import java.util.Date; + +/* +* 时间工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:58 +*/ +public class DateKit { + + /** 获取参数时间当天的开始时间 **/ + public static Date getBegin(Date date){ + + if(date == null) return null; + return DateUtil.beginOfDay(date).toJdkDate(); + } + + /** 获取参数时间当天的结束时间 **/ + public static Date getEnd(Date date){ + if(date == null) return null; + return DateUtil.endOfDay(date).toJdkDate(); + } + + + /** + * 获取自定义查询时间 + * today|0 -- 今天 + * yesterday|0 -- 昨天 + * near2now|7 -- 近xx天, 到今天 + * near2yesterday|30 -- 近xx天, 到昨天 + * customDate|2020-01-01,N -- 自定义日期格式 N表示为空, 占位使用 + * customDateTime|2020-01-01 23:00:00,2020-01-01 23:00:00 -- 自定义日期时间格式 + * + * @return + */ + public static Date[] getQueryDateRange(String queryParamVal){ + + //查询全部 + if(StringUtils.isEmpty(queryParamVal)){ + return new Date[]{null, null}; + } + + //根据 | 分割 + String[] valArray = queryParamVal.split("\\|"); + if(valArray.length != 2){ //参数有误 + throw new BizException("查询时间参数有误"); + } + String dateType = valArray[0]; //时间类型 + String dateVal = valArray[1]; //搜索时间值 + + Date nowDateTime = new Date(); //当前时间 + + if("today".equals(dateType)){ //今天 + + return new Date[]{getBegin(nowDateTime), getEnd(nowDateTime)}; + + }else if("yesterday".equals(dateType)){ //昨天 + + Date yesterdayDateTime = DateUtil.offsetDay(nowDateTime, -1).toJdkDate(); //昨天 + return new Date[]{getBegin(yesterdayDateTime), getEnd(yesterdayDateTime)}; + + }else if("near2now".equals(dateType)){ //近xx天, xx天之前 ~ 当前时间 + + Integer offsetDay = 1 - Integer.parseInt(dateVal); //获取时间偏移量 + Date offsetDayDate = DateUtil.offsetDay(nowDateTime, offsetDay).toJdkDate(); + return new Date[]{getBegin(offsetDayDate), getEnd(nowDateTime)}; + + }else if("near2yesterday".equals(dateType)){ //近xx天, xx天之前 ~ 昨天 + + Date yesterdayDateTime = DateUtil.offsetDay(nowDateTime, -1).toJdkDate(); //昨天 + + Integer offsetDay = 1 - Integer.parseInt(dateVal); //获取时间偏移量 + Date offsetDayDate = DateUtil.offsetDay(yesterdayDateTime, offsetDay).toJdkDate(); + return new Date[]{getBegin(offsetDayDate), getEnd(yesterdayDateTime)}; + + }else if("customDate".equals(dateType) || "customDateTime".equals(dateType)){ //自定义格式 + + String[] timeArray = dateVal.split(","); //以逗号分割 + if(timeArray.length != 2) throw new BizException("查询自定义时间参数有误"); + + String timeStr1 = "N".equalsIgnoreCase(timeArray[0]) ? null : timeArray[0] ; //开始时间, + String timeStr2 = "N".equalsIgnoreCase(timeArray[1]) ? null : timeArray[1]; //结束时间, N表示为空, 占位使用 + + Date time1 = null; + Date time2 = null; + + if(StringUtils.isNotEmpty(timeStr1)){ + time1 = DateUtil.parseDateTime("customDate".equals(dateType) ? (timeStr1 + " 00:00:00" ) : timeStr1); + } + if(StringUtils.isNotEmpty(timeStr2)){ + time2 = DateUtil.parseDateTime("customDate".equals(dateType) ? (timeStr2 + " 23:59:59" ) : timeStr2); + } + return new Date[]{time1, time2}; + + }else{ + throw new BizException("查询时间参数有误"); + } + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/FileKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/FileKit.java new file mode 100644 index 0000000000000000000000000000000000000000..6a83153859d848665236dfe6b1481535ea9c7d53 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/FileKit.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.exception.BizException; + +/* +* 文件工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:50 +*/ +public class FileKit { + + + /** + * 获取文件的后缀名 + * @param appendDot 是否拼接. + * @return + */ + public static String getFileSuffix(String fullFileName, boolean appendDot){ + if(fullFileName == null || fullFileName.indexOf(".") < 0 || fullFileName.length() <= 1) return ""; + return (appendDot? "." : "") + fullFileName.substring(fullFileName.lastIndexOf(".") + 1); + } + + + /** 获取有效的图片格式, 返回null: 不支持的图片类型 **/ + public static String getImgSuffix(String filePath){ + + String suffix = getFileSuffix(filePath, false).toLowerCase(); + if(CS.ALLOW_UPLOAD_IMG_SUFFIX.contains(suffix)){ + return suffix; + } + throw new BizException("不支持的图片类型"); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JeepayKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JeepayKit.java new file mode 100644 index 0000000000000000000000000000000000000000..05d4ca3e12c2f80cef656ece2136fee92d268b60 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JeepayKit.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import cn.hutool.crypto.SecureUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.exception.BizException; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import sun.misc.BASE64Decoder; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +/* +* jeepay工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:50 +*/ +@Slf4j +public class JeepayKit { + + public static byte[] AES_KEY = null; + static{ + try { + AES_KEY = new BASE64Decoder().decodeBuffer("4ChT08phkz59hquD795X7w=="); + } catch (IOException e) { + } + } + + /** 加密 **/ + public static String aesEncode(String str){ + return SecureUtil.aes(JeepayKit.AES_KEY).encryptHex(str); + } + + public static String aesDecode(String str){ + return SecureUtil.aes(JeepayKit.AES_KEY).decryptStr(str); + } + + + + private static String encodingCharset = "UTF-8"; + + /** + *

Description: 计算签名摘要 + *

2018年9月30日 上午11:32:46 + * @param map 参数Map + * @param key 商户秘钥 + * @return + */ + public static String getSign(Map map, String key){ + ArrayList list = new ArrayList(); + for(Map.Entry entry:map.entrySet()){ + if(null != entry.getValue() && !"".equals(entry.getValue())){ + list.add(entry.getKey() + "=" + entry.getValue() + "&"); + } + } + int size = list.size(); + String [] arrayToSort = list.toArray(new String[size]); + Arrays.sort(arrayToSort, String.CASE_INSENSITIVE_ORDER); + StringBuilder sb = new StringBuilder(); + for(int i = 0; i < size; i ++) { + sb.append(arrayToSort[i]); + } + String result = sb.toString(); + result += "key=" + key; + log.info("signStr:{}", result); + result = md5(result, encodingCharset).toUpperCase(); + log.info("sign:{}", result); + return result; + } + + + /** + *

Description: MD5 + *

2018年9月30日 上午11:33:19 + * @param value + * @param charset + * @return + */ + public static String md5(String value, String charset) { + MessageDigest md = null; + try { + byte[] data = value.getBytes(charset); + md = MessageDigest.getInstance("MD5"); + byte[] digestData = md.digest(data); + return toHex(digestData); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + return null; + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + return null; + } + } + + public static String toHex(byte input[]) { + if (input == null) + return null; + StringBuffer output = new StringBuffer(input.length * 2); + for (int i = 0; i < input.length; i++) { + int current = input[i] & 0xff; + if (current < 16) + output.append("0"); + output.append(Integer.toString(current, 16)); + } + + return output.toString(); + } + + /** map 转换为 url参数 **/ + public static String genUrlParams(Map paraMap) { + if(paraMap == null || paraMap.isEmpty()) return ""; + StringBuffer urlParam = new StringBuffer(); + Set keySet = paraMap.keySet(); + int i = 0; + for(String key:keySet) { + urlParam.append(key).append("=").append( paraMap.get(key) == null ? "" : paraMap.get(key) ); + if(++i == keySet.size()) break; + urlParam.append("&"); + } + return urlParam.toString(); + } + + /** 校验微信/支付宝二维码是否符合规范, 并根据支付类型返回对应的支付方式 **/ + public static String getPayWayCodeByBarCode(String barCode){ + + if(StringUtils.isEmpty(barCode)) throw new BizException("条码为空"); + + //微信 : 用户付款码条形码规则:18位纯数字,以10、11、12、13、14、15开头 + //文档: https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=5_1 + if(barCode.length() == 18 && Pattern.matches("^(10|11|12|13|14|15)(.*)", barCode)){ + return CS.PAY_WAY_CODE.WX_BAR; + } + //支付宝: 25~30开头的长度为16~24位的数字 + //文档: https://docs.open.alipay.com/api_1/alipay.trade.pay/ + else if(barCode.length() >= 16 && barCode.length() <= 24 && Pattern.matches("^(25|26|27|28|29|30)(.*)", barCode)){ + return CS.PAY_WAY_CODE.ALI_BAR; + } + //云闪付: 二维码标准: 19位 + 62开头 + //文档:https://wenku.baidu.com/view/b2eddcd09a89680203d8ce2f0066f5335a8167fa.html + else if(barCode.length() == 19 && Pattern.matches("^(62)(.*)", barCode)){ + return CS.PAY_WAY_CODE.YSF_BAR; + } + else{ //暂时不支持的条码类型 + throw new BizException("不支持的条码"); + } + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JsonKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JsonKit.java new file mode 100644 index 0000000000000000000000000000000000000000..04bb2b2f8755eee46dc243709340fef782cb22d0 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/JsonKit.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import com.alibaba.fastjson.JSONObject; + +/* +* json工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:51 +*/ +public class JsonKit { + + public static JSONObject newJson(String key, Object val){ + + JSONObject result = new JSONObject(); + result.put(key, val); + return result; + } + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/RegKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/RegKit.java new file mode 100644 index 0000000000000000000000000000000000000000..fe7894da853feba21e00944acf254e123f5b00b3 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/RegKit.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +/* +* +* 正则验证kit +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:56 +*/ +public class RegKit { + + public static final String REG_MOBILE = "^1\\d{10}$"; //判断是否是手机号 + public static boolean isMobile(String str){ + return match(str, REG_MOBILE); + } + + + /** 正则验证 */ + public static boolean match(String text, String reg){ + if(text == null) return false; + return text.matches(reg); + } + + + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SeqKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SeqKit.java new file mode 100644 index 0000000000000000000000000000000000000000..2c9bb78288a7098d0dba952964264d3b19682f45 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SeqKit.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import cn.hutool.core.date.DatePattern; +import cn.hutool.core.date.DateUtil; + +import java.util.Date; +import java.util.concurrent.atomic.AtomicLong; + +/* +* 序列号生成 工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:56 +*/ +public class SeqKit { + + private static final AtomicLong BUY_ORDER_SEQ = new AtomicLong(0L); + private static final String BUY_ORDER_SEQ_PREFIX = "P"; + + /** 生成购买订单ID **/ + public static String genPayOrderId() { + + return String.format("%s%s%04d",BUY_ORDER_SEQ_PREFIX, + DateUtil.format(new Date(), DatePattern.PURE_DATETIME_MS_PATTERN), + (int) BUY_ORDER_SEQ.getAndIncrement() % 10000); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SpringBeansUtil.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SpringBeansUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..6efdfde0497a510bf8e697970cf80e2f5f5cf624 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/SpringBeansUtil.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +/** + * @description: Spring 框架下, 获取Beans静态函数方法。 + * @Author terrfly + * @Date 2019/12/31 13:57 + */ +@Component +public class SpringBeansUtil implements ApplicationContextAware { + + private static ApplicationContext applicationContext = null; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + if(SpringBeansUtil.applicationContext == null){ + SpringBeansUtil.applicationContext = applicationContext; + } + } + + /** 获取applicationContext */ + public static ApplicationContext getApplicationContext() { + return applicationContext; + } + + /** 通过name获取 Bean. */ + public static Object getBean(String name){ + + if(!getApplicationContext().containsBean(name)){ + return null; + } + + return getApplicationContext().getBean(name); + + } + + /** 通过class获取Bean. */ + public static T getBean(Class clazz){ + try { + return getApplicationContext().getBean(clazz); + } catch (BeansException e) { + return null; + } + } + + /** 通过name,以及Clazz返回指定的Bean */ + public static T getBean(String name, Class clazz){ + if(!getApplicationContext().containsBean(name)){ + return null; + } + return getApplicationContext().getBean(name, clazz); + } + +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/StringKit.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/StringKit.java new file mode 100644 index 0000000000000000000000000000000000000000..095dd16144950ce63f64c2af79902888f3800f59 --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/StringKit.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import java.util.UUID; + +/* +* String 工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 16:58 +*/ +public class StringKit { + + public static String getUUID(){ + return UUID.randomUUID().toString().replace("-", "") + Thread.currentThread().getId(); + } + + public static String getUUID(int endAt){ + return getUUID().substring(0, endAt); + } +} diff --git a/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/TreeDataBuilder.java b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/TreeDataBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..24db437cc233a1f1852d9543d9c518c39815346d --- /dev/null +++ b/jeepay-core/src/main/java/com/jeequan/jeepay/core/utils/TreeDataBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.core.utils; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/* + * [ 通用树状结构构造器 ] + * 解决: 将数据库查询到的多行List, 转换为层级关系的树状结构。 + * 使用方式: + * 1. 先将查询的到对象List转换为JSONObject List, + * 在转换过程中JSONObject中必须包含 [id, pid](字段名称可自定义) 【!!必须是String类型!!】 ; + * 2. 使用构造函数创建对象,参数为转换好的对象, 如果自定义字段key 则将字段名称一并传入; + * 3. 使用buildTreeString() 或者 buildTreeObject() 生成所需对象; + * +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2019/12/8 06:37 +*/ +public class TreeDataBuilder { + + + /** 私有构造器 + 指定参数构造器 **/ + private TreeDataBuilder(){} + public TreeDataBuilder(Collection nodes) { + super(); + this.nodes = nodes; + } + + public TreeDataBuilder(Collection nodes, String idName, String pidName, String childrenName) { + super(); + this.nodes = nodes; + this.idName = idName; + this.sortName = idName; //排序字段,按照idName + this.pidName = pidName; + this.childrenName = childrenName; + } + + /** 自定义字段 + 排序标志 **/ + public TreeDataBuilder(Collection nodes, String idName, String pidName, String childrenName, String sortName, boolean isAscSort) { + super(); + this.nodes = nodes; + this.idName = idName; + this.pidName = pidName; + this.childrenName = childrenName; + this.sortName = sortName; + this.isAscSort = isAscSort; + } + + /** 所有数据集合 **/ + private Collection nodes; + + /** 默认数据中的主键key */ + private String idName = "id"; + + /** 默认数据中的父级id的key */ + private String pidName = "pid"; + + /** 默认数据中的子类对象key */ + private String childrenName = "children"; + + /** 排序字段, 默认按照ID排序 **/ + private String sortName = idName; + + /** 默认按照升序排序 **/ + private boolean isAscSort = true; + + // 构建JSON树形结构 + public String buildTreeString() { + List nodeTree = buildTreeObject(); + JSONArray jsonArray = new JSONArray(); + nodeTree.stream().forEach(item -> jsonArray.add(item)); + return jsonArray.toString(); + } + + // 构建树形结构 + public List buildTreeObject() { + + //定义待返回的对象 + List resultNodes = new ArrayList<>(); + + //获取所有的根节点 (考虑根节点有多个的情况, 将根节点单独处理) + List rootNodes = getRootNodes(); + + listSort(rootNodes); //排序 + + //遍历根节点对象 + for (JSONObject rootNode : rootNodes) { + + buildChildNodes(rootNode); //递归查找子节点并设置 + + resultNodes.add(rootNode); //添加到对象信息 + } + return resultNodes; + } + + /** 递归查找并赋值子节点 **/ + private void buildChildNodes(JSONObject node) { + List children = getChildNodes(node); + if (!children.isEmpty()) { + for (JSONObject child : children) { + buildChildNodes(child); + } + + listSort(children); //排序 + node.put(childrenName, children); + } + } + + /** 查找当前节点的子节点 */ + private List getChildNodes(JSONObject currentNode) { + List childNodes = new ArrayList<>(); + for (JSONObject n : nodes) { + if (currentNode.getString(idName).equals(n.getString(pidName))) { + childNodes.add(n); + } + } + return childNodes; + } + + /** 判断是否为根节点 */ + private boolean isRootNode(JSONObject node) { + boolean isRootNode = true; + for (JSONObject n : nodes) { + if (node.getString(pidName) != null && node.getString(pidName).equals(n.getString(idName))) { + isRootNode = false; + break; + } + } + return isRootNode; + } + + /** 获取集合中所有的根节点 */ + private List getRootNodes() { + List rootNodes = new ArrayList<>(); + for (JSONObject n : nodes) { + if (isRootNode(n)) { + rootNodes.add(n); + } + } + return rootNodes; + } + + /** 将list进行排序 */ + private void listSort(List list){ + Collections.sort(list, (o1, o2) -> { + + int result; + if(o1.get(sortName) instanceof Integer){ + result = o1.getInteger(sortName).compareTo(o2.getInteger(sortName)); + }else{ + result = o1.get(sortName).toString().compareTo(o2.get(sortName).toString()); + } + + if(!isAscSort){ //倒序, 取反数 + return -result; + } + + return result; + }); + } + +} diff --git a/jeepay-core/src/test/java/com/.gitkeep b/jeepay-core/src/test/java/com/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-core/src/test/resources/.gitkeep b/jeepay-core/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-manager/pom.xml b/jeepay-manager/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..9dfc058640a9ae28bb0ac9d277f30ddfea262a88 --- /dev/null +++ b/jeepay-manager/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + com.jeequan + jeepay-manager + jar + ${isys.version} + Jeepay计全支付系统 [运营后台管理端] + https://www.jeequan.com + + + com.jeequan + jeepay + 1.0.0 + + + + + + + com.jeequan + jeepay-service + ${isys.version} + + + + + org.springframework.boot + spring-boot-starter-web + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-parameter-names + + + org.hibernate.validator + hibernate-validator + + + + + + + org.springframework.boot + spring-boot-starter-security + + + + + io.jsonwebtoken + jjwt + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + org.springframework.boot + spring-boot-starter-freemarker + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.springframework.boot + spring-boot-starter-activemq + + + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + maven-resources-plugin + + + + + + + diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/aop/MethodLogAop.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/aop/MethodLogAop.java new file mode 100644 index 0000000000000000000000000000000000000000..acbe253243e834cc7c40c3ec272f92af6008f941 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/aop/MethodLogAop.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.aop; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.beans.RequestKitBean; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysLog; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.service.impl.SysLogService; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.Date; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; + +/** + * 方法级日志切面组件 + * + * @author terrfly + * @modify pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Component +@Aspect +public class MethodLogAop { + + private static final Logger logger = LoggerFactory.getLogger(MethodLogAop.class); + + @Autowired + private SysLogService sysLogService; + + @Autowired private RequestKitBean requestKitBean; + + /** + * 异步处理线程池 + */ + private final static ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(10); + + /** + * 切点 + */ + @Pointcut("@annotation(com.jeequan.jeepay.core.aop.MethodLog)") + public void methodCachePointcut() { } + + /** + * 切面 + * @param point + * @return + * @throws Throwable + */ + @Around("methodCachePointcut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + + final SysLog sysLog = new SysLog(); + // 基础日志信息 + setBaseLogInfo(point, sysLog); + //处理切面任务 发生异常将向外抛出 不记录日志 + Object result = point.proceed(); + + try { + sysLog.setUserId(JeeUserDetails.getCurrentUserDetails().getSysUser().getSysUserId()); + sysLog.setUserName(JeeUserDetails.getCurrentUserDetails().getSysUser().getRealname()); + sysLog.setSystem(JeeUserDetails.getCurrentUserDetails().getSysUser().getSystem()); + sysLog.setOptResInfo(JSONObject.toJSON(result).toString()); + + scheduledThreadPool.execute(() -> sysLogService.save(sysLog)); + } catch (Exception e) { + logger.error("methodLogError", e); + } + + return result; + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 14:04 + * @describe: 记录异常操作请求信息 + */ + @AfterThrowing(pointcut = "methodCachePointcut()", throwing="e") + public void doException(JoinPoint joinPoint, Throwable e) throws Exception{ + final SysLog sysLog = new SysLog(); + // 基础日志信息 + setBaseLogInfo(joinPoint, sysLog); + sysLog.setOptResInfo("请求异常"); + scheduledThreadPool.execute(() -> sysLogService.save(sysLog)); + } + + /** + * 获取方法中的中文备注 + * @param joinPoint + * @return + * @throws Exception + */ + public static String getAnnotationRemark(JoinPoint joinPoint) throws Exception { + + Signature sig = joinPoint.getSignature(); + Method m = joinPoint.getTarget().getClass().getMethod(joinPoint.getSignature().getName(), ((MethodSignature) sig).getParameterTypes()); + + MethodLog methodCache = m.getAnnotation(MethodLog.class); + if (methodCache != null) { + return methodCache.remark(); + } + return ""; + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 14:12 + * @describe: 日志基本信息 公共方法 + */ + private void setBaseLogInfo(JoinPoint joinPoint, SysLog sysLog) throws Exception { + // 使用point.getArgs()可获取request,仅限于spring MVC参数包含request,改为通过contextHolder获取。 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + //请求参数 + sysLog.setOptReqParam( requestKitBean.getReqParamJSON().toJSONString() ); + + //注解备注 + sysLog.setMethodRemark(getAnnotationRemark(joinPoint)); + //包名 方法名 + String methodName = joinPoint.getSignature().getName(); + String packageName = joinPoint.getThis().getClass().getName(); + if (packageName.indexOf("$$EnhancerByCGLIB$$") > -1 || packageName.indexOf("$$EnhancerBySpringCGLIB$$") > -1) { // 如果是CGLIB动态生成的类 + packageName = packageName.substring(0, packageName.indexOf("$$")); + } + sysLog.setMethodName(packageName + "." + methodName); + sysLog.setReqUrl(request.getRequestURL().toString()); + sysLog.setUserIp(requestKitBean.getClientIp()); + sysLog.setCreatedAt(new Date()); + sysLog.setSystem(CS.SYS_TYPE.MGR); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/InitRunner.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/InitRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..efb0b8b2d49f88c472692589504eb6348b1b8317 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/InitRunner.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.bootstrap; + +import cn.hutool.core.date.DatePattern; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/* + * 项目初始化操作 + * 比如初始化配置文件, 读取基础数据, 资源初始化等。 避免在Main函数中写业务代码。 + * CommandLineRunner / ApplicationRunner都可以达到要求, 只是调用参数有所不同。 + * +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:04 +*/ +@Component +public class InitRunner implements CommandLineRunner { + + + @Override + public void run(String... args) throws Exception { + + //初始化处理fastjson格式 + SerializeConfig serializeConfig = SerializeConfig.getGlobalInstance(); + serializeConfig.put(Date.class, new SimpleDateFormatSerializer(DatePattern.NORM_DATETIME_PATTERN)); + + //解决json 序列化时候的 $ref:问题 + JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask(); + + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/JeepayMgrApplication.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/JeepayMgrApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..d735c42eaec74ca2a71341649e1f0e0ce497ff53 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/JeepayMgrApplication.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.bootstrap; + +import com.alibaba.fastjson.support.config.FastJsonConfig; +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.scheduling.annotation.EnableScheduling; + +import java.util.Arrays; + +/* +* spring-boot 主启动程序 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2019/11/7 15:19 +*/ +@SpringBootApplication +@EnableScheduling +@MapperScan("com.jeequan.jeepay.service.mapper") //Mybatis mapper接口路径 +@ComponentScan(basePackages = "com.jeequan.jeepay.*") //由于MainApplication没有在项目根目录, 需要配置basePackages属性使得成功扫描所有Spring组件; +@Configuration +public class JeepayMgrApplication { + + /** main启动函数 **/ + public static void main(String[] args) { + + //启动项目 + SpringApplication.run(JeepayMgrApplication.class, args); + + } + + + /** fastJson 配置信息 **/ + @Bean + public HttpMessageConverters fastJsonConfig(){ + + //新建fast-json转换器 + FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); + + //fast-json 配置信息 + FastJsonConfig config = new FastJsonConfig(); + config.setDateFormat("yyyy-MM-dd HH:mm:ss"); + converter.setFastJsonConfig(config); + + //设置响应的 Content-Type + converter.setSupportedMediaTypes(Arrays.asList(new MediaType[]{MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8})); + return new HttpMessageConverters(converter); + } + + /** Mybatis plus 分页插件 **/ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + // 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false + // paginationInterceptor.setOverflow(false); + // 设置最大单页限制数量,默认 500 条,-1 不受限制 + // paginationInterceptor.setLimit(500); + return paginationInterceptor; + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/RedisConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/RedisConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..59ab340d785798d566b3d959a40152f6ab7b0139 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/RedisConfig.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.config; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; + +/* +* Redis配置类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:05 +*/ +@Configuration +public class RedisConfig { + + @Value("${spring.redis.host}") + private String host; + + @Value("${spring.redis.port}") + private Integer port; + + @Value("${spring.redis.timeout}") + private Integer timeout; + + @Value("${spring.redis.database}") + private Integer defaultDatabase; + + @Value("${spring.redis.password}") + private String password; + + /** 当前系统的redis缓存操作对象 (主对象) **/ + @Primary + @Bean(name = "defaultStringRedisTemplate") + public StringRedisTemplate sysStringRedisTemplate() { + StringRedisTemplate template = new StringRedisTemplate(); + + LettuceConnectionFactory jedisConnectionFactory = new LettuceConnectionFactory(); + jedisConnectionFactory.setHostName(host); + jedisConnectionFactory.setPort(port); + jedisConnectionFactory.setTimeout(timeout); + + if (!StringUtils.isEmpty(password)) { + jedisConnectionFactory.setPassword(password); + } + + if (defaultDatabase != 0) { + jedisConnectionFactory.setDatabase(defaultDatabase); + } + + jedisConnectionFactory.afterPropertiesSet(); + + template.setConnectionFactory(jedisConnectionFactory); + return template; + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/SystemYmlConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/SystemYmlConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..d5a769ec346795ccdd72f41511696425fae853d0 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/config/SystemYmlConfig.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; +import org.springframework.stereotype.Component; + +/** + * 系统Yml配置参数定义Bean + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Data +@Component +@ConfigurationProperties(prefix="isys") +public class SystemYmlConfig { + + /** 是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] **/ + private Boolean allowCors; + + /** 生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 **/ + private String jwtSecret; + + @NestedConfigurationProperty //指定该属性为嵌套值, 否则默认为简单值导致对象为空(外部类不存在该问题, 内部static需明确指定) + private OssFile ossFile; + + /** 系统oss配置信息 **/ + @Data + public static class OssFile{ + + /** 存储根路径 **/ + private String rootPath; + + /** 公共读取块 **/ + private String publicPath; + + /** 私有读取块 **/ + private String privatePath; + + } +} + + + diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CommonCtrl.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CommonCtrl.java new file mode 100644 index 0000000000000000000000000000000000000000..5cd29d6a681424b3e776fe54b8a0310422076e44 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CommonCtrl.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl; + +import com.jeequan.jeepay.core.ctrls.AbstractCtrl; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.mgr.config.SystemYmlConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.context.SecurityContextHolder; + +/* +* 定义通用CommonCtrl +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:09 +*/ +public abstract class CommonCtrl extends AbstractCtrl { + + @Autowired + protected SystemYmlConfig mainConfig; + + /** 获取当前用户ID */ + protected JeeUserDetails getCurrentUser(){ + + return (JeeUserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal(); + } + + /** + * 获取当前用户登录IP + * @return + */ + protected String getIp() { + return getClientIp(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java new file mode 100644 index 0000000000000000000000000000000000000000..2ff90047ec7c0522fc0695bdfee08553418e2837 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.cache.ITokenService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.TreeDataBuilder; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.service.impl.SysEntitlementService; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; + +/* +* 当前登录者的信息相关接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:10 +*/ +@RestController +@RequestMapping("api/current") +public class CurrentUserController extends CommonCtrl{ + + @Autowired private SysEntitlementService sysEntitlementService; + @Autowired private SysUserService sysUserService; + @Autowired private SysUserAuthService sysUserAuthService; + + @RequestMapping(value="/user", method = RequestMethod.GET) + public ApiRes currentUserInfo() { + + ///当前用户信息 + JeeUserDetails jeeUserDetails = getCurrentUser(); + SysUser user = jeeUserDetails.getSysUser(); + + //1. 当前用户所有权限ID集合 + List entIdList = new ArrayList<>(); + jeeUserDetails.getAuthorities().stream().forEach(r->entIdList.add(r.getAuthority())); + + List allMenuList = new ArrayList<>(); //所有菜单集合 + + //2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 ) + if(entIdList != null && !entIdList.isEmpty()){ + allMenuList = sysEntitlementService.list(SysEntitlement.gw() + .in(SysEntitlement::getEntId, entIdList) + .in(SysEntitlement::getEntType, Arrays.asList(CS.ENT_TYPE.MENU_LEFT, CS.ENT_TYPE.MENU_OTHER)) + .eq(SysEntitlement::getSystem, CS.SYS_TYPE.MGR) + .eq(SysEntitlement::getState, CS.PUB_USABLE)); + } + + //4. 转换为json树状结构 + JSONArray jsonArray = (JSONArray) JSONArray.toJSON(allMenuList); + List allMenuRouteTree = new TreeDataBuilder(jsonArray, + "entId", "pid", "children", "entSort", true) + .buildTreeObject(); + + //1. 所有权限ID集合 + user.addExt("entIdList", entIdList); + user.addExt("allMenuRouteTree", allMenuRouteTree); + return ApiRes.ok(getCurrentUser().getSysUser()); + } + + + /** 修改个人信息 */ + @RequestMapping(value="/user", method = RequestMethod.PUT) + @MethodLog(remark = "修改信息") + public ApiRes modifyCurrentUserInfo() { + + //修改头像 + String avatarUrl = getValString("avatarUrl"); + String realname = getValString("realname"); + Byte sex = getValByte("sex"); + SysUser updateRecord = new SysUser(); + updateRecord.setSysUserId(getCurrentUser().getSysUser().getSysUserId()); + if (StringUtils.isNotEmpty(avatarUrl)) updateRecord.setAvatarUrl(avatarUrl); + if (StringUtils.isNotEmpty(realname)) updateRecord.setRealname(realname); + if (sex != null) updateRecord.setSex(sex); + sysUserService.updateById(updateRecord); + + + //保存redis最新数据 + JeeUserDetails currentUser = getCurrentUser(); + currentUser.setSysUser(sysUserService.getById(getCurrentUser().getSysUser().getSysUserId())); + ITokenService.refData(currentUser); + + return ApiRes.ok(); + } + + + /** 修改密码 */ + @RequestMapping(value="modifyPwd", method = RequestMethod.PUT) + @MethodLog(remark = "修改密码") + public ApiRes modifyPwd() throws BizException{ + + //更改密码, 验证当前用户信息 + String currentUserPwd = getValStringRequired("originalPwd"); //当前用户登录密码 + //验证当前密码是否正确 + if(!sysUserAuthService.validateCurrentUserPwd(currentUserPwd)){ + throw new BizException("原密码验证失败!"); + } + + String opUserPwd = getValStringRequired("confirmPwd"); + + // 验证原密码与新密码是否相同 + if (opUserPwd.equals(currentUserPwd)) { + throw new BizException("新密码与原密码不能相同!"); + } + + sysUserAuthService.resetAuthInfo(getCurrentUser().getSysUser().getSysUserId(), null, null, opUserPwd, CS.SYS_TYPE.MGR); + //调用登出接口 + return logout(); + } + +// /** 登出 */ +// @RequestMapping(value="logout", method = RequestMethod.POST) +// @MethodLog(remark = "登出") + public ApiRes logout() throws BizException{ + + ITokenService.removeIToken(getCurrentUser().getCacheKey(), getCurrentUser().getSysUser().getSysUserId()); + return ApiRes.ok(); + } + + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/anon/AuthController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/anon/AuthController.java new file mode 100644 index 0000000000000000000000000000000000000000..82a1507d6923e6d742c181fbbec60796ae91da91 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/anon/AuthController.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.anon; + +import cn.hutool.captcha.CaptchaUtil; +import cn.hutool.captcha.LineCaptcha; +import cn.hutool.core.codec.Base64; +import cn.hutool.core.lang.UUID; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.service.AuthService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/* +* 认证接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:09 +*/ +@RestController +@RequestMapping("/api/anon/auth") +public class AuthController extends CommonCtrl { + + @Autowired private AuthService authService; + + /** 用户信息认证 获取iToken **/ + @RequestMapping(value = "/validate", method = RequestMethod.POST) + @MethodLog(remark = "登录认证") + public ApiRes validate() throws BizException { + + + String account = Base64.decodeStr(getValStringRequired("ia")); //用户名 i account, 已做base64处理 + String ipassport = Base64.decodeStr(getValStringRequired("ip")); //密码 i passport, 已做base64处理 + String vercode = Base64.decodeStr(getValStringRequired("vc")); //验证码 vercode, 已做base64处理 + String vercodeToken = Base64.decodeStr(getValStringRequired("vt")); //验证码token, vercode token , 已做base64处理 + + String cacheCode = RedisUtil.getString(CS.getCacheKeyImgCode(vercodeToken)); + if(StringUtils.isEmpty(cacheCode) || !cacheCode.equalsIgnoreCase(vercode)){ + throw new BizException("验证码有误!"); + } + + // 返回前端 accessToken + String accessToken = authService.auth(account, ipassport); + + // 删除图形验证码缓存数据 + RedisUtil.del(CS.getCacheKeyImgCode(vercodeToken)); + + return ApiRes.ok4newJson(CS.ACCESS_TOKEN_NAME, accessToken); + } + + /** 图片验证码 **/ + @RequestMapping(value = "/vercode", method = RequestMethod.GET) + public ApiRes vercode() throws BizException { + + //定义图形验证码的长和宽 // 4位验证码 + LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(137, 40, 4, 80); + lineCaptcha.createCode(); //生成code + + //redis + String vercodeToken = UUID.fastUUID().toString(); + RedisUtil.setString(CS.getCacheKeyImgCode(vercodeToken), lineCaptcha.getCode(), 60 ); //图片验证码缓存时间: 1分钟 + + JSONObject result = new JSONObject(); + result.put("imageBase64Data", lineCaptcha.getImageBase64Data()); + result.put("vercodeToken", vercodeToken); + + return ApiRes.ok(result); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/OssFileController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/OssFileController.java new file mode 100644 index 0000000000000000000000000000000000000000..837e5918041c806b87f70ef70d807b247f5e4ea2 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/OssFileController.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.common; + +import cn.hutool.core.lang.UUID; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.model.OssFileConfig; +import com.jeequan.jeepay.core.utils.FileKit; +import com.jeequan.jeepay.mgr.config.SystemYmlConfig; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; + +/* +* 统一文件上传接口(ossFile) +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:07 +*/ +@RestController +@RequestMapping("/api/ossFiles") +public class OssFileController extends CommonCtrl { + + @Autowired private SystemYmlConfig systemYmlConfig; + @Autowired private SysConfigService sysConfigService; + + /** 上传文件 (单文件上传) */ + @PostMapping("/{bizType}") + public ApiRes singleFileUpload(@RequestParam("file") MultipartFile file, @PathVariable("bizType") String bizType) { + + if( file == null ) return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, "选择文件不存在"); + try { + + + OssFileConfig ossFileConfig = OssFileConfig.getOssFileConfigByBizType(bizType); + + //1. 判断bizType 是否可用 + if(ossFileConfig == null){ + throw new BizException("类型有误"); + } + + // 2. 判断文件是否支持 + String fileSuffix = FileKit.getFileSuffix(file.getOriginalFilename(), false); + if( !ossFileConfig.isAllowFileSuffix(fileSuffix) ){ + throw new BizException("上传文件格式不支持!"); + } + + // 3. 判断文件大小是否超限 + if( !ossFileConfig.isMaxSizeLimit(file.getSize()) ){ + throw new BizException("上传大小请限制在["+ossFileConfig.getMaxSize() / 1024 / 1024 +"M]以内!"); + } + + + boolean isAllowPublicRead = ossFileConfig.isAllowPublicRead(); //是否允许公共读, true:公共读, false:私有文件 + + //公共读 & 是否上传到oss + boolean isYunOss = false; //TODO 暂时不支持云oss方式 + if(isAllowPublicRead && isYunOss){ + return null; + } + + //以下为文件上传到本地 + + // 新文件地址 + String newFileName = UUID.fastUUID() + "." + fileSuffix; + + // 保存的文件夹名称 + String saveFilePath = isAllowPublicRead ? systemYmlConfig.getOssFile().getPublicPath() : systemYmlConfig.getOssFile().getPrivatePath(); + saveFilePath = saveFilePath + File.separator + bizType + File.separator + newFileName; + + + //保存文件 + saveFile(file, saveFilePath); + + //返回响应结果 + String resultUrl = bizType + "/" + newFileName; + if(isAllowPublicRead){ //允许公共读取 + resultUrl = sysConfigService.getDBApplicationConfig().getOssPublicSiteUrl() + "/" + resultUrl; + } + + return ApiRes.ok(resultUrl); + + } catch (BizException biz) { + throw biz; + } catch (Exception e) { + logger.error("upload error, fileName = {}", file == null ? null :file.getOriginalFilename(), e); + throw new BizException(ApiCodeEnum.SYSTEM_ERROR); + } + } + +} \ No newline at end of file diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/StaticController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/StaticController.java new file mode 100644 index 0000000000000000000000000000000000000000..45b5d21d2162f0b897e1339ea6570775bc9ea160 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/common/StaticController.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.common; + +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import org.springframework.core.io.InputStreamResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; + +/* +* 静态文件下载/预览 ctrl +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:08 +*/ +@Controller +public class StaticController extends CommonCtrl { + + /** 图片预览 **/ + @GetMapping("/api/anon/localOssFiles/**/*.*") + public ResponseEntity imgView() { + + try { + + //查找图片文件 + File imgFile = new File(mainConfig.getOssFile().getPublicPath() + File.separator + request.getRequestURI().substring(24)); + if(!imgFile.isFile() || !imgFile.exists()) return new ResponseEntity<>(HttpStatus.NOT_FOUND); + + //输出文件流(图片格式) + HttpHeaders httpHeaders = new HttpHeaders(); +// httpHeaders.setContentType(MediaType.IMAGE_JPEG); //图片格式 + InputStream inputStream = new FileInputStream(imgFile); + return new ResponseEntity<>(new InputStreamResource(inputStream), httpHeaders, HttpStatus.OK); + + } catch (FileNotFoundException e) { + logger.error("static file error", e); + return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); + } + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/MainChartController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/MainChartController.java new file mode 100644 index 0000000000000000000000000000000000000000..04fc86ff1013774f250b53dfb78bde419313d69b --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/MainChartController.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.config; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 首页统计类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Slf4j +@RestController +@RequestMapping("api/mainChart") +public class MainChartController extends CommonCtrl { + + @Autowired private PayOrderService payOrderService; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:18 + * @describe: 周交易总金额 + */ + @PreAuthorize("hasAuthority('ENT_C_MAIN_PAY_AMOUNT_WEEK')") + @RequestMapping(value="/payAmountWeek", method = RequestMethod.GET) + public ApiRes payAmountWeek() { + return ApiRes.ok(payOrderService.mainPageWeekCount(null)); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:18 + * @describe: 商户总数量、服务商总数量、总交易金额、总交易笔数 + */ + @PreAuthorize("hasAuthority('ENT_C_MAIN_NUMBER_COUNT')") + @RequestMapping(value="/numCount", method = RequestMethod.GET) + public ApiRes numCount() { + JSONObject json = payOrderService.mainPageNumCount(null); + //返回数据 + return ApiRes.ok(json); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:18 + * @describe: 交易统计 + */ + @PreAuthorize("hasAuthority('ENT_C_MAIN_PAY_COUNT')") + @RequestMapping(value="/payCount", method = RequestMethod.GET) + public ApiRes payCount() { + // 获取传入参数 + JSONObject paramJSON = getReqParamJSON(); + String createdStart = paramJSON.getString("createdStart"); + String createdEnd = paramJSON.getString("createdEnd"); + List mapList = payOrderService.mainPagePayCount(null, createdStart, createdEnd); + //返回数据 + return ApiRes.ok(mapList); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:18 + * @describe: 支付方式统计 + */ + @PreAuthorize("hasAuthority('ENT_C_MAIN_PAY_TYPE_COUNT')") + @RequestMapping(value="/payTypeCount", method = RequestMethod.GET) + public ApiRes payWayCount() { + JSONObject paramJSON = getReqParamJSON(); + // 开始、结束时间 + String createdStart = paramJSON.getString("createdStart"); + String createdEnd = paramJSON.getString("createdEnd"); + ArrayList arrayResult = payOrderService.mainPagePayTypeCount(null, createdStart, createdEnd); + return ApiRes.ok(arrayResult); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/SysConfigController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/SysConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..9739c2670220a6fc40414c154315f6b40682673f --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/config/SysConfigController.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.config; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.SysConfig; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.mq.topic.MqTopic4ModifySysConfig; +import com.jeequan.jeepay.service.impl.SysConfigService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 系统配置信息类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Slf4j +@RestController +@RequestMapping("api/sysConfigs") +public class SysConfigController extends CommonCtrl { + + @Autowired private SysConfigService sysConfigService; + @Autowired private MqTopic4ModifySysConfig mqTopic4ModifySysConfig; + + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:19 + * @describe: 分组下的配置 + */ + @PreAuthorize("hasAuthority('ENT_SYS_CONFIG_INFO')") + @RequestMapping(value="/{groupKey}", method = RequestMethod.GET) + public ApiRes getConfigs(@PathVariable("groupKey") String groupKey) { + LambdaQueryWrapper condition = SysConfig.gw(); + condition.orderByAsc(SysConfig::getSortNum); + if(StringUtils.isNotEmpty(groupKey)){ + condition.eq(SysConfig::getGroupKey, groupKey); + } + List configList = sysConfigService.list(condition); + //返回数据 + return ApiRes.ok(configList); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:19 + * @describe: 系统配置修改 + */ + @PreAuthorize("hasAuthority('ENT_SYS_CONFIG_EDIT')") + @MethodLog(remark = "系统配置修改") + @RequestMapping(value="/{groupKey}", method = RequestMethod.PUT) + public ApiRes update(@PathVariable("groupKey") String groupKey) { + JSONObject paramJSON = getReqParamJSON(); + Map updateMap = JSONObject.toJavaObject(paramJSON, Map.class); + int update = sysConfigService.updateByConfigKey(updateMap); + if(update <= 0) return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, "更新失败"); + + mqTopic4ModifySysConfig.push(groupKey); + return ApiRes.ok(); + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvInfoController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvInfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..d59719a22f48908c8f7dee4b3b545ad37fa5036c --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvInfoController.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.isv; + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.IsvInfo; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.mq.topic.MqTopic4ModifyIsvInfo; +import com.jeequan.jeepay.service.impl.IsvInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务商管理类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("/api/isvInfo") +public class IsvInfoController extends CommonCtrl { + + @Autowired private IsvInfoService isvInfoService; + @Autowired private MqTopic4ModifyIsvInfo mqTopic4ModifyIsvInfo; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:12 + * @describe: 查询服务商信息列表 + */ + @PreAuthorize("hasAuthority('ENT_ISV_INFO_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + IsvInfo isvInfo = getObject(IsvInfo.class); + LambdaQueryWrapper wrapper = IsvInfo.gw(); + if (StringUtils.isNotEmpty(isvInfo.getIsvNo())) wrapper.eq(IsvInfo::getIsvNo, isvInfo.getIsvNo()); + if (StringUtils.isNotEmpty(isvInfo.getIsvName())) wrapper.eq(IsvInfo::getIsvName, isvInfo.getIsvName()); + if (isvInfo.getState() != null) wrapper.eq(IsvInfo::getState, isvInfo.getState()); + wrapper.orderByDesc(IsvInfo::getCreatedAt); + IPage pages = isvInfoService.page(getIPage(true), wrapper); + + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:13 + * @describe: 新增服务商信息 + */ + @PreAuthorize("hasAuthority('ENT_ISV_INFO_ADD')") + @MethodLog(remark = "新增服务商") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + IsvInfo isvInfo = getObject(IsvInfo.class); + String isvNo = "V" + DateUtil.currentSeconds(); + isvInfo.setIsvNo(isvNo); + isvInfo.setCreatedUid(getCurrentUser().getSysUser().getSysUserId()); + isvInfo.setCreatedBy(getCurrentUser().getSysUser().getRealname()); + boolean result = isvInfoService.save(isvInfo); + if (!result) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_CREATE); + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:13 + * @describe: 删除服务商信息 + */ + @PreAuthorize("hasAuthority('ENT_ISV_INFO_DEL')") + @MethodLog(remark = "删除服务商") + @RequestMapping(value="/{isvNo}", method = RequestMethod.DELETE) + public ApiRes delete(@PathVariable("isvNo") String isvNo) { + isvInfoService.removeByIsvNo(isvNo); + mqTopic4ModifyIsvInfo.push(isvNo); // 推送mq到目前节点进行更新数据 + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:13 + * @describe: 更新服务商信息 + */ + @PreAuthorize("hasAuthority('ENT_ISV_INFO_EDIT')") + @MethodLog(remark = "更新服务商信息") + @RequestMapping(value="/{isvNo}", method = RequestMethod.PUT) + public ApiRes update(@PathVariable("isvNo") String isvNo) { + IsvInfo isvInfo = getObject(IsvInfo.class); + isvInfo.setIsvNo(isvNo); + boolean result = isvInfoService.updateById(isvInfo); + mqTopic4ModifyIsvInfo.push(isvNo); // 推送mq到目前节点进行更新数据 + if (!result) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_UPDATE); + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:13 + * @describe: 查看服务商信息 + */ + @PreAuthorize("hasAnyAuthority('ENT_ISV_INFO_VIEW', 'ENT_ISV_INFO_EDIT')") + @RequestMapping(value="/{isvNo}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("isvNo") String isvNo) { + IsvInfo isvInfo = isvInfoService.getById(isvNo); + if (isvInfo == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(isvInfo); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvPayInterfaceConfigController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvPayInterfaceConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..6c6c969820b7e1d912e51d159e90e405d80ac5fb --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/isv/IsvPayInterfaceConfigController.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.isv; + +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.mq.topic.MqTopic4ModifyIsvInfo; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 服务商支付接口管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/isv/payConfigs") +public class IsvPayInterfaceConfigController extends CommonCtrl { + + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private MqTopic4ModifyIsvInfo mqTopic4ModifyIsvInfo; + + /** + * @Author: ZhuXiao + * @Description: 查询服务商支付接口配置列表 + * @Date: 16:45 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_ISV_PAY_CONFIG_LIST')") + @GetMapping + public ApiRes list() { + + List list = payInterfaceConfigService.selectAllPayIfConfigListByInfoId(CS.INFO_TYPE_ISV, getValStringRequired("isvNo")); + return ApiRes.ok(list); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 服务商号、接口类型 获取商户参数配置 + * @Date: 17:03 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_ISV_PAY_CONFIG_VIEW')") + @GetMapping("/{isvNo}/{ifCode}") + public ApiRes getByMchNo(@PathVariable(value = "isvNo") String isvNo, @PathVariable(value = "ifCode") String ifCode) { + PayInterfaceConfig payInterfaceConfig = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_ISV, isvNo, ifCode); + if (payInterfaceConfig != null && payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().multiply(new BigDecimal("100"))); + } + return ApiRes.ok(payInterfaceConfig); + } + + /** + * @Author: ZhuXiao + * @Description: 服务商支付接口参数配置 + * @Date: 16:45 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_ISV_PAY_CONFIG_ADD')") + @PostMapping + @MethodLog(remark = "更新服务商支付参数") + public ApiRes saveOrUpdate() { + + String infoId = getValStringRequired("infoId"); + String ifCode = getValStringRequired("ifCode"); + + PayInterfaceConfig payInterfaceConfig = getObject(PayInterfaceConfig.class); + payInterfaceConfig.setInfoType(CS.INFO_TYPE_ISV); + + // 存入真实费率 + if (payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP)); + } + + //添加更新者信息 + Long userId = getCurrentUser().getSysUser().getSysUserId(); + String realName = getCurrentUser().getSysUser().getRealname(); + payInterfaceConfig.setUpdatedUid(userId); + payInterfaceConfig.setUpdatedBy(realName); + + //根据 服务商号、接口类型 获取商户参数配置 + PayInterfaceConfig dbRecoed = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_ISV, infoId, ifCode); + //若配置存在,为saveOrUpdate添加ID,第一次配置添加创建者 + if (dbRecoed != null) { + payInterfaceConfig.setId(dbRecoed.getId()); + }else { + payInterfaceConfig.setCreatedUid(userId); + payInterfaceConfig.setCreatedBy(realName); + } + + boolean result = payInterfaceConfigService.saveOrUpdate(payInterfaceConfig); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, "配置失败"); + } + mqTopic4ModifyIsvInfo.push(infoId); // 推送mq到目前节点进行更新数据 + return ApiRes.ok(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchInfoController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchInfoController.java new file mode 100644 index 0000000000000000000000000000000000000000..2f5a1f8cf5eac19e421353fabcdb6e563f18d6f5 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchInfoController.java @@ -0,0 +1,177 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.merchant; + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.mq.queue.MqQueue4ModifyMchUserRemove; +import com.jeequan.jeepay.mgr.mq.topic.MqTopic4ModifyMchInfo; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +/** + * 商户管理类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("/api/mchInfo") +public class MchInfoController extends CommonCtrl { + + @Autowired private MchInfoService mchInfoService; + @Autowired private SysUserService sysUserService; + @Autowired private MqTopic4ModifyMchInfo mqTopic4ModifyMchInfo; + @Autowired private MqQueue4ModifyMchUserRemove mqQueue4ModifyMchUserRemove; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 商户信息列表 + */ + @PreAuthorize("hasAuthority('ENT_MCH_INFO_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + MchInfo mchInfo = getObject(MchInfo.class); + + LambdaQueryWrapper wrapper = MchInfo.gw(); + if (StringUtils.isNotEmpty(mchInfo.getMchNo())) wrapper.eq(MchInfo::getMchNo, mchInfo.getMchNo()); + if (StringUtils.isNotEmpty(mchInfo.getIsvNo())) wrapper.eq(MchInfo::getIsvNo, mchInfo.getIsvNo()); + if (StringUtils.isNotEmpty(mchInfo.getMchName())) wrapper.eq(MchInfo::getMchName, mchInfo.getMchName()); + if (mchInfo.getType() != null) wrapper.eq(MchInfo::getType, mchInfo.getType()); + if (mchInfo.getState() != null) wrapper.eq(MchInfo::getState, mchInfo.getState()); + wrapper.orderByDesc(MchInfo::getCreatedAt); + + IPage pages = mchInfoService.page(getIPage(), wrapper); + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 新增商户信息 + */ + @PreAuthorize("hasAuthority('ENT_MCH_INFO_ADD')") + @MethodLog(remark = "新增商户") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + MchInfo mchInfo = getObject(MchInfo.class); + // 获取传入的商户登录名 + String loginUserName = getValStringRequired("loginUserName"); + mchInfo.setMchNo("M" + DateUtil.currentSeconds()); + // 当前登录用户信息 + SysUser sysUser = getCurrentUser().getSysUser(); + mchInfo.setCreatedUid(sysUser.getSysUserId()); + mchInfo.setCreatedBy(sysUser.getRealname()); + + mchInfoService.addMch(mchInfo, loginUserName); + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 删除商户信息 + */ + @PreAuthorize("hasAuthority('ENT_MCH_INFO_DEL')") + @MethodLog(remark = "删除商户") + @RequestMapping(value="/{mchNo}", method = RequestMethod.DELETE) + public ApiRes delete(@PathVariable("mchNo") String mchNo) { + List userIdList = mchInfoService.removeByMchNo(mchNo); + // 推送mq删除redis用户缓存 + mqQueue4ModifyMchUserRemove.push(StringUtils.join(userIdList, ",")); + // 推送mq到目前节点进行更新数据 + mqTopic4ModifyMchInfo.push(mchNo); + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 更新商户信息 + */ + @PreAuthorize("hasAuthority('ENT_MCH_INFO_EDIT')") + @MethodLog(remark = "更新商户信息") + @RequestMapping(value="/{mchNo}", method = RequestMethod.PUT) + public ApiRes update(@PathVariable("mchNo") String mchNo) { + MchInfo mchInfo = getObject(MchInfo.class); + mchInfo.setMchNo(mchNo); + // 校验该商户是否为特邀商户 + MchInfo dbMchInfo = mchInfoService.getById(mchNo); + if (dbMchInfo == null) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + } + // 如果为特邀商户则不允许修改服务商及商户类型 + if (dbMchInfo.getType() == CS.MCH_TYPE_ISVSUB) { + mchInfo.setType(dbMchInfo.getType()); + mchInfo.setIsvNo(dbMchInfo.getIsvNo()); + } + // 如果商户状态为禁用状态,清除该商户用户登录信息 + if (mchInfo.getState() == CS.NO) { + List userIdList = new ArrayList<>(); + List userList = sysUserService.list(SysUser.gw() + .eq(SysUser::getBelongInfoId, mchNo) + .eq(SysUser::getSystem, CS.SYS_TYPE.MCH) + ); + if (userList.size() > 0) { + for (SysUser user:userList) { + userIdList.add(user.getSysUserId()); + } + } + // 推送mq删除redis用户缓存 + mqQueue4ModifyMchUserRemove.push(StringUtils.join(userIdList, ",")); + } + boolean result = mchInfoService.updateById(mchInfo); + mqTopic4ModifyMchInfo.push(mchNo); // 推送mq到目前节点进行更新数据 + if (!result) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_UPDATE); + return ApiRes.ok(); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 查询商户信息 + */ + @PreAuthorize("hasAnyAuthority('ENT_MCH_INFO_VIEW', 'ENT_MCH_INFO_EDIT')") + @RequestMapping(value="/{mchNo}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("mchNo") String mchNo) { + MchInfo mchInfo = mchInfoService.getById(mchNo); + if (mchInfo == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + SysUser sysUser = sysUserService.getById(mchInfo.getInitUserId()); + if (sysUser != null) mchInfo.addExt("loginUserName", sysUser.getLoginUsername()); + return ApiRes.ok(mchInfo); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayInterfaceConfigController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayInterfaceConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..67a7d785f6543294de3076329f3f2096bc98e962 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayInterfaceConfigController.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.merchant; + +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.mq.topic.MqTopic4ModifyMchInfo; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 商户支付接口管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/mch/payConfigs") +public class MchPayInterfaceConfigController extends CommonCtrl { + + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private MqTopic4ModifyMchInfo mqTopic4ModifyMchInfo; + + /** + * @Author: ZhuXiao + * @Description: 查询商户支付接口配置列表 + * @Date: 15:50 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_LIST')") + @GetMapping + public ApiRes list() { + + List list = payInterfaceConfigService.selectAllPayIfConfigListByInfoId(CS.INFO_TYPE_MCH, getValStringRequired("mchNo")); + return ApiRes.ok(list); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 商户号、接口类型 获取商户参数配置 + * @Date: 17:03 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_VIEW')") + @GetMapping("/{mchNo}/{ifCode}") + public ApiRes getByMchNo(@PathVariable(value = "mchNo") String mchNo, @PathVariable(value = "ifCode") String ifCode) { + PayInterfaceConfig payInterfaceConfig = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, mchNo, ifCode); + if (payInterfaceConfig != null && payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().multiply(new BigDecimal("100"))); + } + return ApiRes.ok(payInterfaceConfig); + } + + /** + * @Author: ZhuXiao + * @Description: 商户支付接口配置 + * @Date: 16:13 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_ADD')") + @PostMapping + @MethodLog(remark = "更新商户支付参数") + public ApiRes saveOrUpdate() { + + String infoId = getValStringRequired("infoId"); + String ifCode = getValStringRequired("ifCode"); + + PayInterfaceConfig payInterfaceConfig = getObject(PayInterfaceConfig.class); + payInterfaceConfig.setInfoType(CS.INFO_TYPE_MCH); + + // 存入真实费率 + if (payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP)); + } + + //添加更新者信息 + Long userId = getCurrentUser().getSysUser().getSysUserId(); + String realName = getCurrentUser().getSysUser().getRealname(); + payInterfaceConfig.setUpdatedUid(userId); + payInterfaceConfig.setUpdatedBy(realName); + + //根据 商户号、接口类型 获取商户参数配置 + PayInterfaceConfig dbRecoed = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, infoId, ifCode); + //若配置存在,为saveOrUpdate添加ID,第一次配置添加创建者 + if (dbRecoed != null) { + payInterfaceConfig.setId(dbRecoed.getId()); + }else { + payInterfaceConfig.setCreatedUid(userId); + payInterfaceConfig.setCreatedBy(realName); + } + + boolean result = payInterfaceConfigService.saveOrUpdate(payInterfaceConfig); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, "配置失败"); + } + + mqTopic4ModifyMchInfo.push(infoId); // 推送mq到目前节点进行更新数据 + + return ApiRes.ok(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayPassageConfigController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayPassageConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..92bee72d5566c01a99cb60e4616ce21cf92b50cc --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/merchant/MchPayPassageConfigController.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.merchant; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.MchPayPassage; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.MchPayPassageService; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.LinkedList; +import java.util.List; + +/** + * 商户支付通道管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:30 + */ +@RestController +@RequestMapping("/api/mch/payPassages") +public class MchPayPassageConfigController extends CommonCtrl { + + @Autowired private MchPayPassageService mchPayPassageService; + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private PayWayService payWayService; + @Autowired private MchInfoService mchInfoService; + + + /** + * @Author: ZhuXiao + * @Description: 查询支付方式列表,并添加是否配置支付通道状态 + * @Date: 15:31 2021/5/10 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_LIST')") + @GetMapping + public ApiRes list() { + + String mchNo = getValStringRequired("mchNo"); + String wayCode = getValString("wayCode"); + String wayName = getValString("wayName"); + + //支付方式集合 + LambdaQueryWrapper wrapper = PayWay.gw(); + if (StrUtil.isNotBlank(wayCode)) wrapper.eq(PayWay::getWayCode, wayCode); + if (StrUtil.isNotBlank(wayName)) wrapper.like(PayWay::getWayName, wayName); + IPage payWayPage = payWayService.page(getIPage(), wrapper); + + if (!CollectionUtils.isEmpty(payWayPage.getRecords())) { + + // 支付方式代码集合 + List wayCodeList = new LinkedList<>(); + payWayPage.getRecords().stream().forEach(payWay -> wayCodeList.add(payWay.getWayCode())); + + // 商户支付通道集合 + List mchPayPassageList = mchPayPassageService.list(MchPayPassage.gw() + .select(MchPayPassage::getWayCode, MchPayPassage::getState) + .eq(MchPayPassage::getMchNo, mchNo) + .in(MchPayPassage::getWayCode, wayCodeList)); + + for (PayWay payWay : payWayPage.getRecords()) { + payWay.addExt("passageState", CS.NO); + for (MchPayPassage mchPayPassage : mchPayPassageList) { + // 某种支付方式多个通道的情况下,只要有一个通道状态为开启,则该支付方式对应为开启状态 + if (payWay.getWayCode().equals(mchPayPassage.getWayCode()) && mchPayPassage.getState() == CS.YES) { + payWay.addExt("passageState", CS.YES); + break; + } + } + } + } + + return ApiRes.page(payWayPage); + } + + /** + * @Author: ZhuXiao + * @Description: 根据商户号、支付方式查询可用的支付接口列表 + * @Date: 17:55 2021/5/8 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_CONFIG')") + @GetMapping("/availablePayInterface/{mchNo}/{wayCode}") + public ApiRes availablePayInterface(@PathVariable("mchNo") String mchNo, @PathVariable("wayCode") String wayCode) { + + MchInfo mchInfo = mchInfoService.getById(mchNo); + if (mchInfo == null || mchInfo.getState() != CS.YES) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + } + + // 根据支付方式查询可用支付接口列表 + List list = mchPayPassageService.selectAvailablePayInterfaceList(wayCode, mchNo, CS.INFO_TYPE_MCH, mchInfo.getType()); + + return ApiRes.ok(list); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 商户号、接口类型 获取商户参数配置 + * @Date: 17:03 2021/4/27 + */ + @GetMapping("/{mchNo}/{ifCode}") + public ApiRes getByMchNo(@PathVariable(value = "mchNo") String mchNo, @PathVariable(value = "ifCode") String ifCode) { + PayInterfaceConfig payInterfaceConfig = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, mchNo, ifCode); + if (payInterfaceConfig != null && payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().multiply(new BigDecimal("100"))); + } + return ApiRes.ok(payInterfaceConfig); + } + + /** + * @Author: ZhuXiao + * @Description: 商户支付通道配置 + * @Date: 17:36 2021/5/8 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_ADD')") + @PostMapping + @MethodLog(remark = "更新商户支付通道") + public ApiRes saveOrUpdate() { + + String reqParams = getValStringRequired("reqParams"); + + try { + List mchPayPassageList = JSONArray.parseArray(reqParams, MchPayPassage.class); + mchPayPassageService.saveOrUpdateBatchSelf(mchPayPassageList); + return ApiRes.ok(); + }catch (Exception e) { + return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR); + } + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/MchNotifyController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/MchNotifyController.java new file mode 100644 index 0000000000000000000000000000000000000000..9f8bef6ecf2b0a785f5774e4e0b8873e2733e74a --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/MchNotifyController.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.order; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.MchNotifyRecord; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchNotifyRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * 商户通知类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("/api/mchNotify") +public class MchNotifyController extends CommonCtrl { + + @Autowired private MchNotifyRecordService mchNotifyService; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 商户通知列表 + */ + @PreAuthorize("hasAuthority('ENT_MCH_NOTIFY_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + MchNotifyRecord mchNotify = getObject(MchNotifyRecord.class); + JSONObject paramJSON = getReqParamJSON(); + LambdaQueryWrapper wrapper = MchNotifyRecord.gw(); + if (StringUtils.isNotEmpty(mchNotify.getOrderId())) wrapper.eq(MchNotifyRecord::getOrderId, mchNotify.getOrderId()); + if (StringUtils.isNotEmpty(mchNotify.getMchNo())) wrapper.eq(MchNotifyRecord::getMchNo, mchNotify.getMchNo()); + if (StringUtils.isNotEmpty(mchNotify.getIsvNo())) wrapper.eq(MchNotifyRecord::getIsvNo, mchNotify.getIsvNo()); + if (StringUtils.isNotEmpty(mchNotify.getMchOrderNo())) wrapper.eq(MchNotifyRecord::getMchOrderNo, mchNotify.getMchOrderNo()); + if (mchNotify.getOrderType() != null) wrapper.eq(MchNotifyRecord::getOrderType, mchNotify.getOrderType()); + if (mchNotify.getState() != null) wrapper.eq(MchNotifyRecord::getState, mchNotify.getState()); + + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) wrapper.ge(MchNotifyRecord::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) wrapper.le(MchNotifyRecord::getCreatedAt, paramJSON.getString("createdEnd")); + } + wrapper.orderByDesc(MchNotifyRecord::getCreatedAt); + IPage pages = mchNotifyService.page(getIPage(), wrapper); + + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:14 + * @describe: 商户通知信息 + */ + @PreAuthorize("hasAuthority('ENT_MCH_NOTIFY_VIEW')") + @RequestMapping(value="/{notifyId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("notifyId") String notifyId) { + MchNotifyRecord mchNotify = mchNotifyService.getById(notifyId); + if (mchNotify == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(mchNotify); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/PayOrderController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/PayOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..f4557bfd185e2e922f9caef1e8e302a2e93c28fa --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/PayOrderController.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.order; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 支付订单类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("/api/payOrder") +public class PayOrderController extends CommonCtrl { + + @Autowired private PayOrderService payOrderService; + @Autowired private PayWayService payWayService; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:15 + * @describe: 订单信息列表 + */ + @PreAuthorize("hasAuthority('ENT_PAY_ORDER_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + PayOrder payOrder = getObject(PayOrder.class); + JSONObject paramJSON = getReqParamJSON(); + LambdaQueryWrapper wrapper = PayOrder.gw(); + if (StringUtils.isNotEmpty(payOrder.getPayOrderId())) wrapper.eq(PayOrder::getPayOrderId, payOrder.getPayOrderId()); + if (StringUtils.isNotEmpty(payOrder.getMchNo())) wrapper.eq(PayOrder::getMchNo, payOrder.getMchNo()); + if (StringUtils.isNotEmpty(payOrder.getIsvNo())) wrapper.eq(PayOrder::getIsvNo, payOrder.getIsvNo()); + if (payOrder.getMchType() != null) wrapper.eq(PayOrder::getMchType, payOrder.getMchType()); + if (StringUtils.isNotEmpty(payOrder.getWayCode())) wrapper.eq(PayOrder::getWayCode, payOrder.getWayCode()); + if (StringUtils.isNotEmpty(payOrder.getMchOrderNo())) wrapper.eq(PayOrder::getMchOrderNo, payOrder.getMchOrderNo()); + if (payOrder.getState() != null) wrapper.eq(PayOrder::getState, payOrder.getState()); + if (payOrder.getNotifyState() != null) wrapper.eq(PayOrder::getNotifyState, payOrder.getNotifyState()); + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) wrapper.ge(PayOrder::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) wrapper.le(PayOrder::getCreatedAt, paramJSON.getString("createdEnd")); + } + wrapper.orderByDesc(PayOrder::getCreatedAt); + IPage pages = payOrderService.page(getIPage(), wrapper); + // 得到所有支付方式 + Map payWayNameMap = new HashMap<>(); + List payWayList = payWayService.list(); + for (PayWay payWay:payWayList) { + payWayNameMap.put(payWay.getWayCode(), payWay.getWayName()); + } + for (PayOrder order:pages.getRecords()) { + // 存入支付方式名称 + if (StringUtils.isNotEmpty(payWayNameMap.get(order.getWayCode()))) { + order.addExt("wayName", payWayNameMap.get(order.getWayCode())); + }else { + order.addExt("wayName", order.getWayCode()); + } + } + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:15 + * @describe: 支付订单信息 + */ + @PreAuthorize("hasAuthority('ENT_PAY_ORDER_VIEW')") + @RequestMapping(value="/{payOrderId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("payOrderId") String payOrderId) { + PayOrder payOrder = payOrderService.getById(payOrderId); + if (payOrder == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(payOrder); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/RefundOrderController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/RefundOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..6fbf06e899e6cad293a99f5caf36929be022d9f3 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/order/RefundOrderController.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.order; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.RefundOrder; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.RefundOrderService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * 退款订单类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("/api/refundOrder") +public class RefundOrderController extends CommonCtrl { + + @Autowired private RefundOrderService refundOrderService; + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:15 + * @describe: 退款订单信息列表 + */ + @PreAuthorize("hasAuthority('ENT_REFUND_ORDER_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + RefundOrder refundOrder = getObject(RefundOrder.class); + JSONObject paramJSON = getReqParamJSON(); + LambdaQueryWrapper wrapper = RefundOrder.gw(); + if (StringUtils.isNotEmpty(refundOrder.getRefundOrderId())) wrapper.eq(RefundOrder::getRefundOrderId, refundOrder.getRefundOrderId()); + if (StringUtils.isNotEmpty(refundOrder.getPayOrderId())) wrapper.eq(RefundOrder::getPayOrderId, refundOrder.getPayOrderId()); + if (StringUtils.isNotEmpty(refundOrder.getChannelPayOrderNo())) wrapper.eq(RefundOrder::getChannelPayOrderNo, refundOrder.getChannelPayOrderNo()); + if (StringUtils.isNotEmpty(refundOrder.getMchNo())) wrapper.eq(RefundOrder::getMchNo, refundOrder.getMchNo()); + if (StringUtils.isNotEmpty(refundOrder.getIsvNo())) wrapper.eq(RefundOrder::getIsvNo, refundOrder.getIsvNo()); + if (refundOrder.getMchType() != null) wrapper.eq(RefundOrder::getMchType, refundOrder.getMchType()); + if (StringUtils.isNotEmpty(refundOrder.getMchRefundNo())) wrapper.eq(RefundOrder::getMchRefundNo, refundOrder.getMchRefundNo()); + if (refundOrder.getState() != null) wrapper.eq(RefundOrder::getState, refundOrder.getState()); + if (StringUtils.isNotEmpty(refundOrder.getChannelPayOrderNo())) wrapper.eq(RefundOrder::getChannelPayOrderNo, refundOrder.getChannelPayOrderNo()); + if (refundOrder.getResult() != null) wrapper.eq(RefundOrder::getResult, refundOrder.getResult()); + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) wrapper.ge(RefundOrder::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) wrapper.le(RefundOrder::getCreatedAt, paramJSON.getString("createdEnd")); + } + wrapper.orderByDesc(RefundOrder::getCreatedAt); + IPage pages = refundOrderService.page(getIPage(), wrapper); + + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:15 + * @describe: 退款订单信息 + */ + @PreAuthorize("hasAuthority('ENT_REFUND_ORDER_VIEW')") + @RequestMapping(value="/{refundOrderId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("refundOrderId") String refundOrderId) { + RefundOrder refundOrder = refundOrderService.getById(refundOrderId); + if (refundOrder == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(refundOrder); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayInterfaceDefineController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayInterfaceDefineController.java new file mode 100644 index 0000000000000000000000000000000000000000..c8cc2e6e9145c1503c9677287a512ef137b794cf --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayInterfaceDefineController.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.payconfig; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import com.jeequan.jeepay.service.impl.PayInterfaceDefineService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 支付接口定义管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/payIfDefines") +public class PayInterfaceDefineController extends CommonCtrl { + + @Autowired private PayInterfaceDefineService payInterfaceDefineService; + @Autowired private PayOrderService payOrderService; + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + + /** + * @Author: ZhuXiao + * @Description: list + * @Date: 15:51 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_IF_DEFINE_LIST')") + @GetMapping + public ApiRes list() { + + List list = payInterfaceDefineService.list(PayInterfaceDefine.gw() + .orderByAsc(PayInterfaceDefine::getCreatedAt) + ); + return ApiRes.ok(list); + } + + + /** + * @Author: ZhuXiao + * @Description: detail + * @Date: 15:51 2021/4/27 + */ + @PreAuthorize("hasAnyAuthority('ENT_PC_IF_DEFINE_VIEW', 'ENT_PC_IF_DEFINE_EDIT')") + @GetMapping("/{ifCode}") + public ApiRes detail(@PathVariable("ifCode") String ifCode) { + return ApiRes.ok(payInterfaceDefineService.getById(ifCode)); + } + + /** + * @Author: ZhuXiao + * @Description: add + * @Date: 15:51 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_IF_DEFINE_ADD')") + @PostMapping + @MethodLog(remark = "新增支付接口") + public ApiRes add() { + PayInterfaceDefine payInterfaceDefine = getObject(PayInterfaceDefine.class); + + JSONArray jsonArray = new JSONArray(); + String[] wayCodes = getValStringRequired("wayCodeStrs").split(","); + for (String wayCode : wayCodes) { + JSONObject object = new JSONObject(); + object.put("wayCode", wayCode); + jsonArray.add(object); + } + payInterfaceDefine.setWayCodes(jsonArray); + + boolean result = payInterfaceDefineService.save(payInterfaceDefine); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_CREATE); + } + return ApiRes.ok(); + } + + /** + * @Author: ZhuXiao + * @Description: update + * @Date: 15:51 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_IF_DEFINE_EDIT')") + @PutMapping("/{ifCode}") + @MethodLog(remark = "更新支付接口") + public ApiRes update(@PathVariable("ifCode") String ifCode) { + PayInterfaceDefine payInterfaceDefine = getObject(PayInterfaceDefine.class); + payInterfaceDefine.setIfCode(ifCode); + + JSONArray jsonArray = new JSONArray(); + String[] wayCodes = getValStringRequired("wayCodeStrs").split(","); + for (String wayCode : wayCodes) { + JSONObject object = new JSONObject(); + object.put("wayCode", wayCode); + jsonArray.add(object); + } + payInterfaceDefine.setWayCodes(jsonArray); + + boolean result = payInterfaceDefineService.updateById(payInterfaceDefine); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_UPDATE); + } + return ApiRes.ok(); + } + + /** + * @Author: ZhuXiao + * @Description: delete + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_IF_DEFINE_DEL')") + @DeleteMapping("/{ifCode}") + @MethodLog(remark = "删除支付接口") + public ApiRes delete(@PathVariable("ifCode") String ifCode) { + + // 校验该支付方式是否有服务商或商户配置参数或者已有订单 + if (payInterfaceConfigService.count(PayInterfaceConfig.gw().eq(PayInterfaceConfig::getIfCode, ifCode)) > 0 + || payOrderService.count(PayOrder.gw().eq(PayOrder::getIfCode, ifCode)) > 0) { + throw new BizException("该支付接口已有服务商或商户配置参数或已发生交易,无法删除!"); + } + + boolean result = payInterfaceDefineService.removeById(ifCode); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_DELETE); + } + return ApiRes.ok(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayWayController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayWayController.java new file mode 100644 index 0000000000000000000000000000000000000000..539487653fad3803f1b814b4031d002bdf93ac4e --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/payconfig/PayWayController.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.payconfig; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.MchPayPassage; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchPayPassageService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +/** + * 支付方式管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/payWays") +public class PayWayController extends CommonCtrl { + + @Autowired PayWayService payWayService; + @Autowired MchPayPassageService mchPayPassageService; + @Autowired PayOrderService payOrderService; + + /** + * @Author: ZhuXiao + * @Description: list + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_WAY_LIST')") + @GetMapping + public ApiRes list() { + + PayWay queryObject = getObject(PayWay.class); + + LambdaQueryWrapper condition = PayWay.gw(); + if(StringUtils.isNotEmpty(queryObject.getWayCode())){ + condition.like(PayWay::getWayCode, queryObject.getWayCode()); + } + if(StringUtils.isNotEmpty(queryObject.getWayName())){ + condition.like(PayWay::getWayName, queryObject.getWayName()); + } + condition.orderByAsc(PayWay::getWayCode); + + IPage pages = payWayService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + + + /** + * @Author: ZhuXiao + * @Description: detail + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAnyAuthority('ENT_PC_WAY_VIEW', 'ENT_PC_WAY_EDIT')") + @GetMapping("/{wayCode}") + public ApiRes detail(@PathVariable("wayCode") String wayCode) { + return ApiRes.ok(payWayService.getById(wayCode)); + } + + /** + * @Author: ZhuXiao + * @Description: add + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_WAY_ADD')") + @PostMapping + @MethodLog(remark = "新增支付方式") + public ApiRes add() { + PayWay payWay = getObject(PayWay.class); + + if (payWayService.count(PayWay.gw().eq(PayWay::getWayCode, payWay.getWayCode())) > 0) { + throw new BizException("支付方式代码已存在"); + } + payWay.setWayCode(payWay.getWayCode().toUpperCase()); + + boolean result = payWayService.save(payWay); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_CREATE); + } + return ApiRes.ok(); + } + + /** + * @Author: ZhuXiao + * @Description: update + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_WAY_EDIT')") + @PutMapping("/{wayCode}") + @MethodLog(remark = "更新支付方式") + public ApiRes update(@PathVariable("wayCode") String wayCode) { + PayWay payWay = getObject(PayWay.class); + payWay.setWayCode(wayCode); + boolean result = payWayService.updateById(payWay); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_UPDATE); + } + return ApiRes.ok(); + } + + /** + * @Author: ZhuXiao + * @Description: delete + * @Date: 15:52 2021/4/27 + */ + @PreAuthorize("hasAuthority('ENT_PC_WAY_DEL')") + @DeleteMapping("/{wayCode}") + @MethodLog(remark = "删除支付方式") + public ApiRes delete(@PathVariable("wayCode") String wayCode) { + + // 校验该支付方式是否有商户已配置通道或者已有订单 + if (mchPayPassageService.count(MchPayPassage.gw().eq(MchPayPassage::getWayCode, wayCode)) > 0 + || payOrderService.count(PayOrder.gw().eq(PayOrder::getWayCode, wayCode)) > 0) { + throw new BizException("该支付方式已有商户配置通道或已发生交易,无法删除!"); + } + + boolean result = payWayService.removeById(wayCode); + if (!result) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_DELETE); + } + return ApiRes.ok(); + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysEntController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysEntController.java new file mode 100644 index 0000000000000000000000000000000000000000..6b5444abea6843a9fb211b0008ab2656ded9b608 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysEntController.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import com.jeequan.jeepay.service.impl.SysEntitlementService; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.TreeDataBuilder; + +import java.util.List; + +/* +* 权限 菜单 管理 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@RestController +@RequestMapping("api/sysEnts") +public class SysEntController extends CommonCtrl { + + @Autowired SysEntitlementService sysEntitlementService; + + + /** getOne */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_ENT_LIST' )") + @RequestMapping(value="/bySystem", method = RequestMethod.GET) + public ApiRes bySystem() { + + return ApiRes.ok(sysEntitlementService.getOne(SysEntitlement.gw() + .eq(SysEntitlement::getEntId, getValStringRequired("entId")) + .eq(SysEntitlement::getSystem, getValStringRequired("system"))) + ); + } + + /** updateById */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_ENT_EDIT')") + @MethodLog(remark = "更新资源权限") + @RequestMapping(value="/{entId}", method = RequestMethod.PUT) + public ApiRes updateById(@PathVariable("entId") String entId) { + + SysEntitlement queryObject = getObject(SysEntitlement.class); + sysEntitlementService.update(queryObject, SysEntitlement.gw().eq(SysEntitlement::getEntId, entId).eq(SysEntitlement::getSystem, queryObject.getSystem())); + return ApiRes.ok(); + } + + + /** 查询权限集合 */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_ENT_LIST', 'ENT_UR_ROLE_DIST' )") + @RequestMapping(value="/showTree", method = RequestMethod.GET) + public ApiRes showTree() { + + //查询全部数据 + List list = sysEntitlementService.list(SysEntitlement.gw().eq(SysEntitlement::getSystem, getValStringRequired("system"))); + + //转换为json树状结构 + JSONArray jsonArray = (JSONArray) JSONArray.toJSON(list); + List leftMenuTree = new TreeDataBuilder(jsonArray, + "entId", "pid", "children", "entSort", true) + .buildTreeObject(); + + return ApiRes.ok(leftMenuTree); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysLogController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysLogController.java new file mode 100644 index 0000000000000000000000000000000000000000..b5701c86f8eb61033283d0836e52d34bf067ec4d --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysLogController.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.SysLog; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.SysLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.LinkedList; +import java.util.List; + +/** + * 系统日志记录类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@RestController +@RequestMapping("api/sysLog") +public class SysLogController extends CommonCtrl { + + @Autowired SysLogService sysLogService; + + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:15 + * @describe: 日志记录列表 + */ + @PreAuthorize("hasAuthority('ENT_SYS_LOG_LIST')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + SysLog sysLog = getObject(SysLog.class); + JSONObject paramJSON = getReqParamJSON(); + // 查询列表 + LambdaQueryWrapper condition = SysLog.gw(); + condition.orderByDesc(SysLog::getCreatedAt); + if (sysLog.getUserId() != null) condition.eq(SysLog::getUserId, sysLog.getUserId()); + if (sysLog.getUserName() != null) condition.eq(SysLog::getUserName, sysLog.getUserName()); + if (StringUtils.isNotEmpty(sysLog.getSystem())) condition.eq(SysLog::getSystem, sysLog.getSystem()); + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) condition.ge(SysLog::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) condition.le(SysLog::getCreatedAt, paramJSON.getString("createdEnd")); + } + IPage pages = sysLogService.page(getIPage(), condition); + return ApiRes.page(pages); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:16 + * @describe: 查看日志信息 + */ + @PreAuthorize("hasAuthority('ENT_SYS_LOG_VIEW')") + @RequestMapping(value="/{sysLogId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("sysLogId") String sysLogId) { + SysLog sysLog = sysLogService.getById(sysLogId); + if (sysLog == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(sysLog); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:16 + * @describe: 删除日志信息 + */ + @PreAuthorize("hasAuthority('ENT_SYS_LOG_DEL')") + @MethodLog(remark = "删除日志信息") + @RequestMapping(value="/{selectedIds}", method = RequestMethod.DELETE) + public ApiRes delete(@PathVariable("selectedIds") String selectedIds) { + String[] ids = selectedIds.split(","); + List idsList = new LinkedList<>(); + for (String id : ids) { + idsList.add(Long.valueOf(id)); + } + boolean result = sysLogService.removeByIds(idsList); + if (!result) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_DELETE); + return ApiRes.ok(); + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleController.java new file mode 100644 index 0000000000000000000000000000000000000000..db5dbfc3e5992092eece13b6697eb375b805baab --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleController.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysRole; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.mgr.service.AuthService; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysRoleService; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +/* +* 角色管理 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@RestController +@RequestMapping("api/sysRoles") +public class SysRoleController extends CommonCtrl { + + @Autowired SysRoleService sysRoleService; + @Autowired SysUserRoleRelaService sysUserRoleRelaService; + @Autowired private AuthService authService; + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + + + /** list */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_LIST', 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysRole queryObject = getObject(SysRole.class); + + QueryWrapper condition = new QueryWrapper<>(); + LambdaQueryWrapper lambdaCondition = condition.lambda(); + lambdaCondition.eq(SysRole::getSystem, CS.SYS_TYPE.MGR); + lambdaCondition.eq(SysRole::getBelongInfoId, 0); + + if(StringUtils.isNotEmpty(queryObject.getRoleName())){ + lambdaCondition.like(SysRole::getRoleName, queryObject.getRoleName()); + } + + if(StringUtils.isNotEmpty(queryObject.getRoleId())){ + lambdaCondition.like(SysRole::getRoleId, queryObject.getRoleId()); + } + + //是否有排序字段 + MutablePair orderInfo = getSortInfo(); + if(orderInfo != null){ + condition.orderBy(true, orderInfo.getLeft(), orderInfo.getRight()); + }else{ + lambdaCondition.orderByDesc(SysRole::getUpdatedAt); + } + + IPage pages = sysRoleService.page(getIPage(true), condition); + return ApiRes.page(pages); + } + + + /** detail */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("recordId") String recordId) { + return ApiRes.ok(sysRoleService.getById(recordId)); + } + + /** add */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_ADD' )") + @MethodLog(remark = "添加角色信息") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + SysRole SysRole = getObject(SysRole.class); + String roleId = "ROLE_" + StringKit.getUUID(6); + SysRole.setRoleId(roleId); + SysRole.setSystem(CS.SYS_TYPE.MGR); //后台系统 + sysRoleService.save(SysRole); + + //权限信息集合 + String entIdListStr = getValString("entIdListStr"); + + //如果包含: 可分配权限的权限 && entIdListStr 不为空 + if(getCurrentUser().getAuthorities().contains(new SimpleGrantedAuthority("ENT_UR_ROLE_DIST")) + && StringUtils.isNotEmpty(entIdListStr)){ + List entIdList = JSONArray.parseArray(entIdListStr, String.class); + + sysRoleEntRelaService.resetRela(roleId, entIdList); + } + + return ApiRes.ok(); + } + + /** update */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.PUT) + @MethodLog(remark = "更新角色信息") + public ApiRes update(@PathVariable("recordId") String recordId) { + SysRole SysRole = getObject(SysRole.class); + SysRole.setRoleId(recordId); + sysRoleService.updateById(SysRole); + + //权限信息集合 + String entIdListStr = getValString("entIdListStr"); + + //如果包含: 可分配权限的权限 && entIdListStr 不为空 + if(getCurrentUser().getAuthorities().contains(new SimpleGrantedAuthority("ENT_UR_ROLE_DIST")) + && StringUtils.isNotEmpty(entIdListStr)){ + List entIdList = JSONArray.parseArray(entIdListStr, String.class); + + sysRoleEntRelaService.resetRela(recordId, entIdList); + + List sysUserIdList = new ArrayList<>(); + sysUserRoleRelaService.list(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, recordId)).stream().forEach(item -> sysUserIdList.add(item.getUserId())); + + //查询到该角色的人员, 将redis更新 + authService.refAuthentication(sysUserIdList); + } + + return ApiRes.ok(); + } + + /** delete */ + @PreAuthorize("hasAuthority('ENT_UR_ROLE_DEL')") + @MethodLog(remark = "删除角色") + @RequestMapping(value="/{recordId}", method = RequestMethod.DELETE) + public ApiRes del(@PathVariable("recordId") String recordId) { + + if(sysUserRoleRelaService.count(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, recordId)) > 0){ + throw new BizException("当前角色已分配到用户, 不可删除!"); + } + sysRoleService.removeRole(recordId); + return ApiRes.ok(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleEntRelaController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleEntRelaController.java new file mode 100644 index 0000000000000000000000000000000000000000..6445030de27e25588cc94556b6921c28b0eb2f50 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysRoleEntRelaController.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.entity.SysRoleEntRela; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.service.AuthService; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/* +* 角色 权限管理 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@RestController +@RequestMapping("api/sysRoleEntRelas") +public class SysRoleEntRelaController extends CommonCtrl { + + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + + /** list */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_ADD', 'ENT_UR_ROLE_DIST' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysRoleEntRela queryObject = getObject(SysRoleEntRela.class); + + LambdaQueryWrapper condition = SysRoleEntRela.gw(); + + if(queryObject.getRoleId() != null){ + condition.eq(SysRoleEntRela::getRoleId, queryObject.getRoleId()); + } + + IPage pages = sysRoleEntRelaService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserController.java new file mode 100644 index 0000000000000000000000000000000000000000..03b189cade9911d55bf53215ef32015a13a8bb48 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserController.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.service.AuthService; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Arrays; + +/* +* 操作员列表 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@RestController +@RequestMapping("api/sysUsers") +public class SysUserController extends CommonCtrl { + + @Autowired private SysUserService sysUserService; + @Autowired private SysUserAuthService sysUserAuthService; + @Autowired private AuthService authService; + + /** list */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_LIST' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysUser queryObject = getObject(SysUser.class); + + LambdaQueryWrapper condition = SysUser.gw(); + condition.eq(SysUser::getSystem, CS.SYS_TYPE.MGR); + + if(StringUtils.isNotEmpty(queryObject.getRealname())){ + condition.like(SysUser::getRealname, queryObject.getRealname()); + } + + if(queryObject.getSysUserId() != null){ + condition.eq(SysUser::getSysUserId, queryObject.getSysUserId()); + } + + condition.orderByDesc(SysUser::getCreatedAt); //时间: 降序 + + IPage pages = sysUserService.page(getIPage(), condition); + + return ApiRes.page(pages); + } + + + /** detail */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("recordId") Integer recordId) { + return ApiRes.ok(sysUserService.getById(recordId)); + } + + /** add */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_ADD' )") + @MethodLog(remark = "添加管理员") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + SysUser sysUser = getObject(SysUser.class); + sysUser.setBelongInfoId("0"); + + sysUserService.addSysUser(sysUser, CS.SYS_TYPE.MGR); + return ApiRes.ok(); + } + + + /** 修改操作员 登录认证信息 */ +// @RequestMapping(value="/modifyPwd", method = RequestMethod.PUT) +// @MethodLog(remark = "修改操作员密码") + public ApiRes authInfo() { + + Long opSysUserId = getValLongRequired("recordId"); //操作员ID + + //更改密码, 验证当前用户信息 + String currentUserPwd = getValStringRequired("originalPwd"); //当前用户登录密码 + //验证当前密码是否正确 + if(!sysUserAuthService.validateCurrentUserPwd(currentUserPwd)){ + throw new BizException("原密码验证失败!"); + } + + String opUserPwd = getValStringRequired("confirmPwd"); + + // 验证原密码与新密码是否相同 + if (opUserPwd.equals(currentUserPwd)) { + throw new BizException("新密码与原密码相同!"); + } + + sysUserAuthService.resetAuthInfo(opSysUserId, null, null, opUserPwd, CS.SYS_TYPE.MGR); + return ApiRes.ok(); + } + + + /** update */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.PUT) + @MethodLog(remark = "修改操作员信息") + public ApiRes update(@PathVariable("recordId") Long recordId) { + SysUser sysUser = getObject(SysUser.class); + sysUser.setSysUserId(recordId); + + //判断是否自己禁用自己 + if(recordId.equals(getCurrentUser().getSysUser().getSysUserId()) && sysUser.getState() != null && sysUser.getState() == CS.PUB_DISABLE){ + throw new BizException("系统不允许禁用当前登陆用户!"); + } + + sysUserService.updateSysUser(sysUser); + + //如果用户被禁用,需要更新redis数据 + if(sysUser.getState() != null && sysUser.getState() == CS.PUB_DISABLE){ + authService.refAuthentication(Arrays.asList(recordId)); + } + + return ApiRes.ok(); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserRoleRelaController.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserRoleRelaController.java new file mode 100644 index 0000000000000000000000000000000000000000..ca816058aaa452092aa2b4020901f37e3374af7a --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/sysuser/SysUserRoleRelaController.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mgr.ctrl.CommonCtrl; +import com.jeequan.jeepay.mgr.service.AuthService; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Arrays; +import java.util.List; + +/* +* 用户角色关联关系 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@RestController +@RequestMapping("api/sysUserRoleRelas") +public class SysUserRoleRelaController extends CommonCtrl { + + @Autowired private SysUserRoleRelaService sysUserRoleRelaService; + @Autowired private SysUserService sysUserService; + @Autowired private AuthService authService; + + /** list */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysUserRoleRela queryObject = getObject(SysUserRoleRela.class); + + LambdaQueryWrapper condition = SysUserRoleRela.gw(); + + if(queryObject.getUserId() != null){ + condition.eq(SysUserRoleRela::getUserId, queryObject.getUserId()); + } + + IPage pages = sysUserRoleRelaService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + + /** 重置用户角色关联信息 */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="relas/{sysUserId}", method = RequestMethod.POST) + @MethodLog(remark = "更改用户角色信息") + public ApiRes relas(@PathVariable("sysUserId") Long sysUserId) { + + List roleIdList = JSONArray.parseArray(getValStringRequired("roleIdListStr"), String.class); + + sysUserService.saveUserRole(sysUserId, roleIdList); + + authService.refAuthentication(Arrays.asList(sysUserId)); + + return ApiRes.ok(); + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/queue/MqQueue4ModifyMchUserRemove.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/queue/MqQueue4ModifyMchUserRemove.java new file mode 100644 index 0000000000000000000000000000000000000000..ad2ac75f8223d23810bfc24da7712e204eeb886c --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/queue/MqQueue4ModifyMchUserRemove.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.mq.queue; + +import com.jeequan.jeepay.core.constants.CS; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQQueue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.stereotype.Component; + +/** + * 商户用户信息清除 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Slf4j +@Component +public class MqQueue4ModifyMchUserRemove extends ActiveMQQueue{ + + @Autowired private JmsTemplate jmsTemplate; + + public MqQueue4ModifyMchUserRemove(){ + super(CS.MQ.QUEUE_MODIFY_MCH_USER_REMOVE); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:16 + * @describe: 推送消息到各个节点 + */ + public void push(String userIdStr) { + this.jmsTemplate.convertAndSend(this, userIdStr); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/JMSConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/JMSConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..8dee6e66d469439174bd1832854ca9e0be343f10 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/JMSConfig.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.mq.topic; + +import org.springframework.context.annotation.Bean; +import org.springframework.jms.config.DefaultJmsListenerContainerFactory; +import org.springframework.jms.config.JmsListenerContainerFactory; +import org.springframework.stereotype.Component; + +import javax.jms.ConnectionFactory; + +/* +* JMS消息配置项 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:10 +*/ +@Component +public class JMSConfig { + + /** 新增jmsListenerContainer, 用于接收topic类型的消息 **/ + @Bean + public JmsListenerContainerFactory jmsListenerContainer(ConnectionFactory factory){ + DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); + bean.setPubSubDomain(true); + bean.setConnectionFactory(factory); + return bean; + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyIsvInfo.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyIsvInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..dda13c2a400bc94d0a7d6e7972f286d2e9403ecf --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyIsvInfo.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.stereotype.Component; + +/* +* 更改ISV信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:10 +*/ +@Slf4j +@Component +public class MqTopic4ModifyIsvInfo extends ActiveMQTopic{ + + @Autowired private JmsTemplate jmsTemplate; + + public MqTopic4ModifyIsvInfo(){ + super(CS.MQ.TOPIC_MODIFY_ISV_INFO); + } + + /** 推送消息到各个节点 **/ + public void push(String isvNo) { + this.jmsTemplate.convertAndSend(this, isvNo); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyMchInfo.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyMchInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..e4c0955ea3f86af7d657308e5924de38793a43b2 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifyMchInfo.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.stereotype.Component; + +/* +* 更改商户信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:10 +*/ +@Slf4j +@Component +public class MqTopic4ModifyMchInfo extends ActiveMQTopic{ + + @Autowired private JmsTemplate jmsTemplate; + + public MqTopic4ModifyMchInfo(){ + super(CS.MQ.TOPIC_MODIFY_MCH_INFO); + } + + /** 推送消息到各个节点 **/ + public void push(String mchNo) { + this.jmsTemplate.convertAndSend(this, mchNo); + } + + + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifySysConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifySysConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..e7419515159d27c95e6c68ceb7ca1f59c76e7824 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/mq/topic/MqTopic4ModifySysConfig.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.service.impl.SysConfigService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.stereotype.Component; + +/* +* 更改系统配置参数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@Slf4j +@Component +public class MqTopic4ModifySysConfig extends ActiveMQTopic{ + + @Autowired private JmsTemplate jmsTemplate; + @Autowired private SysConfigService sysConfigService; + + public MqTopic4ModifySysConfig(){ + super(CS.MQ.TOPIC_MODIFY_SYS_CONFIG); + } + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.TOPIC_MODIFY_SYS_CONFIG, containerFactory = "jmsListenerContainer") + public void receive(String msg) { + + log.info("成功接收更新系统配置的订阅通知, msg={}", msg); + sysConfigService.initDBConfig(msg); + log.info("系统配置静态属性已重置"); + } + + /** 推送消息到各个节点 **/ + public void push(String msg) { + this.jmsTemplate.convertAndSend(this, msg); + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationEntryPoint.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationEntryPoint.java new file mode 100644 index 0000000000000000000000000000000000000000..9ef1a72bd2476b98d03719448d1a70ce58e1e753 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationEntryPoint.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.secruity; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.Serializable; + +/* +* 用户身份认证失败处理类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:11 +*/ +@Component +public class JeeAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { + + @Override + public void commence(HttpServletRequest request, + HttpServletResponse response, + AuthenticationException authException) throws IOException { + // This is invoked when user tries to access a secured REST resource without supplying any credentials + // We should just send a 401 Unauthorized response because there is no 'login page' to redirect to + + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); + + //返回json形式的错误信息 +// response.setCharacterEncoding("UTF-8"); +// response.setContentType("application/json"); +// response.getWriter().println("{\"code\":1001, \"msg\":\"Unauthorized\"}"); + response.getWriter().flush(); + + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationTokenFilter.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationTokenFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..cfc5cb455b9216bca930c06b322e176cc2d5860b --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeAuthenticationTokenFilter.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.secruity; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.jwt.JWTPayload; +import com.jeequan.jeepay.core.jwt.JWTUtils; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.mgr.config.SystemYmlConfig; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + *

Title: JeeAuthenticationTokenFilter.java + *

Description: + * spring security框架中验证组件的前置过滤器; + * 用于验证token有效期,并放置ContextAuthentication信息,为后续spring security框架验证提供数据; + * 避免使用@Component等bean自动装配注解:@Component会将filter被spring实例化为web容器的全局filter,导致重复过滤。 + * @modify terrfly + * @version V1.0 + *

+ */ +public class JeeAuthenticationTokenFilter extends OncePerRequestFilter { + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + + JeeUserDetails jeeUserDetails = commonFilter(request); + + if(jeeUserDetails == null){ + chain.doFilter(request, response); + return; + } + + //将信息放置到Spring-security context中 + UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(jeeUserDetails, null, jeeUserDetails.getAuthorities()); + authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); + SecurityContextHolder.getContext().setAuthentication(authentication); + chain.doFilter(request, response); + } + + + private JeeUserDetails commonFilter(HttpServletRequest request){ + + + String authToken = request.getHeader(CS.ACCESS_TOKEN_NAME); + if(StringUtils.isEmpty(authToken)){ + authToken = request.getParameter(CS.ACCESS_TOKEN_NAME); + } + if(StringUtils.isEmpty(authToken)){ + return null; //放行,并交给UsernamePasswordAuthenticationFilter进行验证,返回公共错误信息. + } + + JWTPayload jwtPayload = JWTUtils.parseToken(authToken, SpringBeansUtil.getBean(SystemYmlConfig.class).getJwtSecret()); //反解析token信息 + //token字符串解析失败 + if( jwtPayload == null || StringUtils.isEmpty(jwtPayload.getCacheKey())) { + return null; + } + + //根据用户名查找数据库 + JeeUserDetails jwtBaseUser = RedisUtil.getObject(jwtPayload.getCacheKey(), JeeUserDetails.class); + if(jwtBaseUser == null){ + RedisUtil.del(jwtPayload.getCacheKey()); + return null; //数据库查询失败,删除redis + } + + //续签时间 + RedisUtil.expire(jwtPayload.getCacheKey(), CS.TOKEN_TIME); + + return jwtBaseUser; + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeUserDetailsServiceImpl.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeUserDetailsServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a5a8b4343f06d41f2d167540de49df7e748ea971 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/JeeUserDetailsServiceImpl.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.secruity; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.entity.SysUserAuth; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import com.jeequan.jeepay.core.utils.RegKit; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +/* +* 实现UserDetailsService 接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@Service +public class JeeUserDetailsServiceImpl implements UserDetailsService { + + @Autowired + private SysUserService sysUserService; + + @Autowired + private SysUserAuthService sysUserAuthService; + + /** + * + * 此函数为: authenticationManager.authenticate(upToken) 内部调用 ; + * 需返回 用户信息载体 / 用户密码 。 + * 用户角色+权限的封装集合 (暂时不查询, 在验证通过后再次查询,避免用户名密码输入有误导致查询资源浪费) + * + * **/ + @Override + public UserDetails loadUserByUsername(String loginUsernameStr) throws UsernameNotFoundException { + + //登录方式, 默认为账号密码登录 + Byte identityType = CS.AUTH_TYPE.LOGIN_USER_NAME; + if(RegKit.isMobile(loginUsernameStr)){ + identityType = CS.AUTH_TYPE.TELPHONE; //手机号登录 + } + + //首先根据登录类型 + 用户名得到 信息 + SysUserAuth auth = sysUserAuthService.selectByLogin(loginUsernameStr, identityType, CS.SYS_TYPE.MGR); + + if(auth == null){ //没有该用户信息 + throw new BizException("用户名/密码错误!"); + } + + //用户ID + Long userId = auth.getUserId(); + + SysUser sysUser = sysUserService.getById(userId); + + if (sysUser == null) { + throw new BizException("用户名/密码错误!"); + } + + if(CS.PUB_USABLE != sysUser.getState()){ //状态不合法 + throw new BizException("用户状态不可登录,请联系管理员!"); + } + + return new JeeUserDetails(sysUser, auth.getCredential()); + + } +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/WebSecurityConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/WebSecurityConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..41a0f853ada730e9db4b7011abdeb8f760818a09 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/secruity/WebSecurityConfig.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.secruity; + +import com.jeequan.jeepay.mgr.config.SystemYmlConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +/* +* Spring Security 配置项 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:11 +*/ +@Configuration +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) //开启@PreAuthorize @PostAuthorize 等前置后置安全校验注解 +public class WebSecurityConfig extends WebSecurityConfigurerAdapter{ + + @Autowired private UserDetailsService userDetailsService; + @Autowired private JeeAuthenticationEntryPoint unauthorizedHandler; + @Autowired private SystemYmlConfig systemYmlConfig; + + @Bean + @Override + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + + + /** + * 使用BCrypt强哈希函数 实现PasswordEncoder + * **/ + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } + + @Autowired + public void configureAuthentication(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception { + authenticationManagerBuilder + .userDetailsService(this.userDetailsService) + .passwordEncoder(passwordEncoder()); + } + + /** 允许跨域请求 **/ + @Bean + public CorsFilter corsFilter() { + + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + if(systemYmlConfig.getAllowCors()){ + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); //带上cookie信息 +// config.addAllowedOrigin(CorsConfiguration.ALL); //允许跨域的域名, *表示允许任何域名使用 + config.addAllowedOriginPattern(CorsConfiguration.ALL); //使用addAllowedOriginPattern 避免出现 When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead. + config.addAllowedHeader(CorsConfiguration.ALL); //允许任何请求头 + config.addAllowedMethod(CorsConfiguration.ALL); //允许任何方法(post、get等) + source.registerCorsConfiguration("/**", config); // CORS 配置对所有接口都有效 + } + return new CorsFilter(source); + } + + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception { + httpSecurity + // 由于使用的是JWT,我们这里不需要csrf + .csrf().disable() + + .cors().and() + + // 认证失败处理方式 + .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() + + // 基于token,所以不需要session + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() + + .authorizeRequests() + + // 除上面外的所有请求全部需要鉴权认证 + .anyRequest().authenticated(); + + // 添加JWT filter + httpSecurity.addFilterBefore(new JeeAuthenticationTokenFilter(), UsernamePasswordAuthenticationFilter.class); + + // 禁用缓存 + httpSecurity.headers().cacheControl(); + } + + @Override + public void configure(WebSecurity web) throws Exception { + //ignore文件 : 无需进入spring security 框架 + // 1.允许对于网站静态资源的无授权访问 + // 2.对于获取token的rest api要允许匿名访问 + web.ignoring().antMatchers( + HttpMethod.GET, + "/", + "/*.html", + "/favicon.ico", + "/**/*.html", + "/**/*.css", + "/**/*.js", + "/**/*.png", + "/**/*.jpg", + "/**/*.jpeg", + "/**/*.svg", + "/**/*.ico", + "/**/*.webp", + "/*.txt", + "/**/*.xls", + "/**/*.mp4" //支持mp4格式的文件匿名访问 + ) + .antMatchers( + "/api/anon/**" //匿名访问接口 + ); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/service/AuthService.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/service/AuthService.java new file mode 100644 index 0000000000000000000000000000000000000000..2a740615b23bd1a70d5db8d4f44f665e1d3c7104 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/service/AuthService.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.service; + +import cn.hutool.core.util.IdUtil; +import com.jeequan.jeepay.core.cache.ITokenService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.jwt.JWTPayload; +import com.jeequan.jeepay.core.jwt.JWTUtils; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.mgr.config.SystemYmlConfig; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysRoleService; +import com.jeequan.jeepay.service.impl.SysUserService; +import com.jeequan.jeepay.service.mapper.SysEntitlementMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.*; + +/* +* 认证Service +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:12 +*/ +@Service +public class AuthService { + + @Resource + private AuthenticationManager authenticationManager; + + @Autowired private SysUserService sysUserService; + @Autowired private SysRoleService sysRoleService; + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + @Autowired private SysEntitlementMapper sysEntitlementMapper; + @Autowired private SystemYmlConfig systemYmlConfig; + + /** + * 认证 + * **/ + public String auth(String username, String password){ + + //1. 生成spring-security usernamePassword类型对象 + UsernamePasswordAuthenticationToken upToken = new UsernamePasswordAuthenticationToken(username, password); + + //spring-security 自动认证过程; + // 1. 进入 JeeUserDetailsServiceImpl.loadUserByUsername 获取用户基本信息; + //2. SS根据UserDetails接口验证是否用户可用; + //3. 最后返回loadUserByUsername 封装的对象信息; + Authentication authentication = null; + try { + authentication = authenticationManager.authenticate(upToken); + } catch (AuthenticationException e) { + throw new BizException("用户名或密码有误!"); + } + JeeUserDetails jeeUserDetails = (JeeUserDetails) authentication.getPrincipal(); + + //验证通过后 再查询用户角色和权限信息集合 + + SysUser sysUser = jeeUserDetails.getSysUser(); + + //非超级管理员 && 不包含左侧菜单 进行错误提示 + if(sysUser.getIsAdmin() != CS.YES && sysEntitlementMapper.userHasLeftMenu(sysUser.getSysUserId(), CS.SYS_TYPE.MGR) <= 0){ + throw new BizException("当前用户未分配任何菜单权限,请联系管理员进行分配后再登录!"); + } + + // 放置权限集合 + jeeUserDetails.setAuthorities(getUserAuthority(sysUser)); + + //生成token + String cacheKey = CS.getCacheKeyToken(sysUser.getSysUserId(), IdUtil.fastUUID()); + + //生成iToken 并放置到缓存 + ITokenService.processTokenCache(jeeUserDetails, cacheKey); //处理token 缓存信息 + + //将信息放置到Spring-security context中 + UsernamePasswordAuthenticationToken authenticationRest = new UsernamePasswordAuthenticationToken(jeeUserDetails, null, jeeUserDetails.getAuthorities()); + SecurityContextHolder.getContext().setAuthentication(authenticationRest); + + //返回JWTToken + return JWTUtils.generateToken(new JWTPayload(jeeUserDetails), systemYmlConfig.getJwtSecret()); + } + + /** 根据用户ID 更新缓存中的权限集合, 使得分配实时生效 **/ + public void refAuthentication(List sysUserIdList){ + + if(sysUserIdList == null || sysUserIdList.isEmpty()){ + return ; + } + + Map sysUserMap = new HashMap<>(); + + // 查询 sysUserId 和 state + sysUserService.list( + SysUser.gw() + .select(SysUser::getSysUserId, SysUser::getState) + .in(SysUser::getSysUserId, sysUserIdList) + ).stream().forEach(item -> sysUserMap.put(item.getSysUserId(), item)); + + for (Long sysUserId : sysUserIdList) { + + Collection cacheKeyList = RedisUtil.keys(CS.getCacheKeyToken(sysUserId, "*")); + if(cacheKeyList == null || cacheKeyList.isEmpty()){ + continue; + } + + for (String cacheKey : cacheKeyList) { + + //用户不存在 || 已禁用 需要删除Redis + if(sysUserMap.get(sysUserId) == null || sysUserMap.get(sysUserId).getState() == CS.PUB_DISABLE){ + RedisUtil.del(cacheKey); + continue; + } + + JeeUserDetails jwtBaseUser = RedisUtil.getObject(cacheKey, JeeUserDetails.class); + if(jwtBaseUser == null){ + continue; + } + + // 重新放置sysUser对象 + jwtBaseUser.setSysUser(sysUserService.getById(sysUserId)); + + //查询放置权限数据 + jwtBaseUser.setAuthorities(getUserAuthority(jwtBaseUser.getSysUser())); + + //保存token 失效时间不变 + RedisUtil.set(cacheKey, jwtBaseUser); + } + } + + } + + public List getUserAuthority(SysUser sysUser){ + + //用户拥有的角色集合 需要以ROLE_ 开头, 用户拥有的权限集合 + List roleList = sysRoleService.findListByUser(sysUser.getSysUserId()); + List entList = sysRoleEntRelaService.selectEntIdsByUserId(sysUser.getSysUserId(), sysUser.getIsAdmin(), sysUser.getSystem()); + + List grantedAuthorities = new LinkedList<>(); + roleList.stream().forEach(role -> grantedAuthorities.add(new SimpleGrantedAuthority(role))); + entList.stream().forEach(ent -> grantedAuthorities.add(new SimpleGrantedAuthority(ent))); + return grantedAuthorities; + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResBodyAdvice.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResBodyAdvice.java new file mode 100644 index 0000000000000000000000000000000000000000..720a0e9de7738cd4fa49e73dd81c16f3befcfaa2 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResBodyAdvice.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.web; + +import com.jeequan.jeepay.core.utils.ApiResBodyAdviceKit; +import org.springframework.core.MethodParameter; +import org.springframework.http.MediaType; +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; + +/* +* 功能: 自定义springMVC返回数据格式 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:12 +*/ +@ControllerAdvice +public class ApiResBodyAdvice implements ResponseBodyAdvice { + + /** 判断哪些需要拦截 **/ + @Override + public boolean supports(MethodParameter returnType, Class converterType) { + return true; + } + + /** 拦截返回数据处理 */ + @Override + public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, + Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { + + //处理扩展字段 + return ApiResBodyAdviceKit.beforeBodyWrite(body); + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResInterceptor.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..067d9cfce809ee2da1c36249a9006e8ef98d9670 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApiResInterceptor.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.web; + +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/* +* 数据响应拦截器 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:12 +*/ +@Component +public class ApiResInterceptor implements HandlerInterceptor { + + /** postHandler是在请求结束之后, 视图渲染之前执行的,但只有preHandle方法返回true的时候才会执行 + * 如果ctrl使用了@RestController或者@ResponseBody注解 则ModelAndView = null, 因为不走视图转换器, 而是走的RequestResponseBodyMethodProcessor。 + * ———————————————— + * + * **/ + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + + //do + } + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApplicationContextKit.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApplicationContextKit.java new file mode 100644 index 0000000000000000000000000000000000000000..a7232cd0745010fb59e4771d06174dfd42bac1a3 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/ApplicationContextKit.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.web; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.stereotype.Service; +import org.springframework.web.context.ServletContextAware; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; + +/* +* 读取servletContext 上下文工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:13 +*/ +@Service +public class ApplicationContextKit implements ServletContextAware,InitializingBean{ + + private ServletContext servletContext ; + @Override + public void setServletContext(ServletContext servletContext) { + + this.servletContext = servletContext; + } + + /** + * afterPropertiesSet 是在什么之后执行? 启动顺序是? + * 调用PropKit(SpringBeansUtil.getBean获取方式) 会不会出现找不到bean的问题? + * + * */ + @Override + public void afterPropertiesSet() throws Exception { + + } + + /** + * 仅在项目启动完成,并且在req请求中使用!! + * @param key + * @return + */ + public static Object getReqSession(String key){ + + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + return request.getSession().getAttribute(key); + + } + + /** + * 仅在项目启动完成,并且在req请求中使用!! + * @param key + * @return + */ + public static void clearSession(String key){ + + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + request.getSession().removeAttribute(key); + + } + + +} diff --git a/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/WebmvcConfig.java b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/WebmvcConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..6432ebeb08cfcdbc2973ae12be5806b9f0ca4053 --- /dev/null +++ b/jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/web/WebmvcConfig.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mgr.web; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/* +* webmvc配置 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:12 +*/ +@Configuration +public class WebmvcConfig implements WebMvcConfigurer { + + @Autowired + private ApiResInterceptor apiResInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(apiResInterceptor); + } +} diff --git a/jeepay-manager/src/main/resources/application.yml b/jeepay-manager/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..5daf840a80a4bc0df9bb5ebb47a67c199932f0ac --- /dev/null +++ b/jeepay-manager/src/main/resources/application.yml @@ -0,0 +1,75 @@ +server: + port: 9217 #设置端口为 9217 + servlet: + context-path: / #设置应用的目录. 前缀需要带/, 无需设置后缀, 示例 【 /xxx 】 or 【 / 】 +spring: + mvc: + servlet: + multipart: + enabled: true #是否启用http上传处理 + max-request-size: 10MB #最大请求文件的大小 + max-file-size: 10MB #设置单个文件最大长度 + resources: + static-locations: classpath:/static #项目静态资源路径 (可直接通过http访问) + freemarker: + template-loader-path: classpath:/templates #freemarker模板目录 + template-encoding: UTF-8 + suffix: .ftl + settings: + classic_compatible: true # 如果变量为null,转化为空字符串,比如做比较的时候按照空字符做比较 + number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: root + password: root + druid: + # 连接池配置项 + initial-size: 5 #初始化时建立物理连接的个数 + min-idle: 5 #最小连接池数量 + max-active: 30 #最大连接池数量 + max-wait: 60000 #获取连接时最大等待时间,单位毫秒 + # 检测相关 + test-while-idle: true # 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 + test-on-borrow: false # 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + test-on-return: false # 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + min-evictable-idle-time-millis: 300000 #连接保持空闲而不被驱逐的最小时间 + validation-query: SELECT 1 FROM DUAL + # 是否缓存preparedStatement + pool-prepared-statements: false # 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 + max-pool-prepared-statement-per-connection-size: 20 # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。 + # 配置监控统计拦截的filters,去掉后监控界面sql无法统计 通过connectProperties属性来打开mergeSql功能;慢SQL记录 + filters: stat,wall + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + cache: + type: redis + redis: + host: 127.0.0.1 + port: 6379 + timeout: 1000 + database: 1 #1库:运营平台 #2库:商户系统 #3库:支付网关 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + +#日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: E:/logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: true #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + jwt-secret: t7w3P8X6472qWc3u #生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + public-path: ${isys.oss-file.root-path}/pubic #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) + private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) diff --git a/jeepay-manager/src/main/resources/banner.txt b/jeepay-manager/src/main/resources/banner.txt new file mode 100644 index 0000000000000000000000000000000000000000..629cbe91ada8fbde685f2ec570ee8a13a14fee42 --- /dev/null +++ b/jeepay-manager/src/main/resources/banner.txt @@ -0,0 +1,8 @@ + __ + / /___ ___ ____ ____ ___ __ + __ / // _ \/ _ \/ __ \/ __ `/ / / / +/ /_/ // __/ __/ /_/ / /_/ / /_/ / +\____/ \___/\___/ .___/\__,_/\__, / + /_/ /____/ + :: Jeepay :: (v1.0.0.RELEASE) + 适合互联网企业使用的开源支付系统 : https://www.jeepay.vip diff --git a/jeepay-manager/src/main/resources/logback-spring.xml b/jeepay-manager/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000000000000000000000000000000000..27c8b1e17a3f12d522a6e0da1d84dc64649a9bfb --- /dev/null +++ b/jeepay-manager/src/main/resources/logback-spring.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + ${currentLoggerPattern} + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.%d{yyyy-MM-dd}.log + 10 + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.%d{yyyy-MM-dd}.log + 20 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + diff --git a/jeepay-manager/src/main/resources/static/index.html b/jeepay-manager/src/main/resources/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..7879e1ce9fd77d4d90054013725af5137e8ef31a --- /dev/null +++ b/jeepay-manager/src/main/resources/static/index.html @@ -0,0 +1,4 @@ + + + + diff --git a/jeepay-manager/src/test/java/.gitkeep b/jeepay-manager/src/test/java/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-manager/src/test/resources/.gitkeep b/jeepay-manager/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-merchant/pom.xml b/jeepay-merchant/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..578834921c4e5513db593e6e038487fc670d0529 --- /dev/null +++ b/jeepay-merchant/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + + com.jeequan + jeepay-merchant + jar + ${isys.version} + Jeepay计全支付系统 [商户后台管理端] + https://www.jeequan.com + + + com.jeequan + jeepay + 1.0.0 + + + + + + + com.jeequan + jeepay-service + ${isys.version} + + + + + org.springframework.boot + spring-boot-starter-web + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-parameter-names + + + org.hibernate.validator + hibernate-validator + + + + + + + org.springframework.boot + spring-boot-starter-security + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + io.jsonwebtoken + jjwt + + + + + org.springframework.boot + spring-boot-starter-freemarker + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.springframework.boot + spring-boot-starter-activemq + + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + maven-resources-plugin + + + + + + + diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/aop/MethodLogAop.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/aop/MethodLogAop.java new file mode 100644 index 0000000000000000000000000000000000000000..f1f0182c712f6c3bfa672e40894cfe14f7eb0156 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/aop/MethodLogAop.java @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.aop; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.beans.RequestKitBean; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysLog; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.service.impl.SysLogService; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.Signature; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; +import java.lang.reflect.Method; +import java.util.Date; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; + +/** + * 方法级日志切面组件 + * + * @author terrfly + * @modify pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +@Aspect +public class MethodLogAop{ + + private static final Logger logger = LoggerFactory.getLogger(MethodLogAop.class); + + @Autowired private SysLogService sysLogService; + + @Autowired private RequestKitBean requestKitBean; + + /** + * 异步处理线程池 + */ + private final static ScheduledExecutorService scheduledThreadPool = Executors.newScheduledThreadPool(10); + + /** + * 切点 + */ + @Pointcut("@annotation(com.jeequan.jeepay.core.aop.MethodLog)") + public void methodCachePointcut() { } + + /** + * 切面 + * @param point + * @return + * @throws Throwable + */ + @Around("methodCachePointcut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + + final SysLog sysLog = new SysLog(); + // 基础日志信息 + setBaseLogInfo(point, sysLog); + + //处理切面任务 发生异常将向外抛出 不记录日志 + Object result = point.proceed(); + + try { + sysLog.setUserId(JeeUserDetails.getCurrentUserDetails().getSysUser().getSysUserId()); + sysLog.setUserName(JeeUserDetails.getCurrentUserDetails().getSysUser().getRealname()); + sysLog.setSystem(JeeUserDetails.getCurrentUserDetails().getSysUser().getSystem()); + sysLog.setOptResInfo(JSONObject.toJSON(result).toString()); + + scheduledThreadPool.execute(new Runnable() { + @Override + public void run() { + sysLogService.save(sysLog); + } + }); + } catch (Exception e) { + logger.error("methodLogError", e); + } + + return result; + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 14:04 + * @describe: 记录异常操作请求信息 + */ + @AfterThrowing(pointcut = "methodCachePointcut()", throwing="e") + public void doException(JoinPoint joinPoint, Throwable e) throws Exception{ + final SysLog sysLog = new SysLog(); + // 基础日志信息 + setBaseLogInfo(joinPoint, sysLog); + sysLog.setOptResInfo("请求异常"); + scheduledThreadPool.execute(() -> sysLogService.save(sysLog)); + } + + /** + * 获取方法中的中文备注 + * @param joinPoint + * @return + * @throws Exception + */ + public static String getAnnotationRemark(JoinPoint joinPoint) throws Exception { + + Signature sig = joinPoint.getSignature(); + Method m = joinPoint.getTarget().getClass().getMethod(joinPoint.getSignature().getName(), ((MethodSignature) sig).getParameterTypes()); + + MethodLog methodCache = m.getAnnotation(MethodLog.class); + if (methodCache != null) { + return methodCache.remark(); + } + return ""; + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 14:12 + * @describe: 日志基本信息 公共方法 + */ + private void setBaseLogInfo(JoinPoint joinPoint, SysLog sysLog) throws Exception { + // 使用point.getArgs()可获取request,仅限于spring MVC参数包含request,改为通过contextHolder获取。 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + //请求参数 + sysLog.setOptReqParam( requestKitBean.getReqParamJSON().toJSONString() ); + + //注解备注 + sysLog.setMethodRemark(getAnnotationRemark(joinPoint)); + //包名 方法名 + String methodName = joinPoint.getSignature().getName(); + String packageName = joinPoint.getThis().getClass().getName(); + if (packageName.indexOf("$$EnhancerByCGLIB$$") > -1 || packageName.indexOf("$$EnhancerBySpringCGLIB$$") > -1) { // 如果是CGLIB动态生成的类 + packageName = packageName.substring(0, packageName.indexOf("$$")); + } + sysLog.setMethodName(packageName + "." + methodName); + sysLog.setReqUrl(request.getRequestURL().toString()); + sysLog.setUserIp(requestKitBean.getClientIp()); + sysLog.setCreatedAt(new Date()); + sysLog.setSystem(CS.SYS_TYPE.MCH); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/InitRunner.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/InitRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..637abc903bc1bf5b4319bd68775740731a94f69f --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/InitRunner.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.bootstrap; + +import cn.hutool.core.date.DatePattern; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; +import com.jeequan.jeepay.core.utils.DateKit; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/** + * 项目初始化操作 + * 比如初始化配置文件, 读取基础数据, 资源初始化等。 避免在Main函数中写业务代码。 + * CommandLineRunner / ApplicationRunner都可以达到要求, 只是调用参数有所不同。 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +public class InitRunner implements CommandLineRunner { + + + @Override + public void run(String... args) throws Exception { + + //初始化处理fastjson格式 + SerializeConfig serializeConfig = SerializeConfig.getGlobalInstance(); + serializeConfig.put(Date.class, new SimpleDateFormatSerializer(DatePattern.NORM_DATETIME_PATTERN)); + + //解决json 序列化时候的 $ref:问题 + JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask(); + + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/JeepayMchApplication.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/JeepayMchApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..a81b90ea60fb7991cdd75c44731c82cc74f4d256 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/JeepayMchApplication.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.bootstrap; + +import com.alibaba.fastjson.support.config.FastJsonConfig; +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.scheduling.annotation.EnableScheduling; + +import java.util.Arrays; + +/** + * spring-boot 主启动程序 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@SpringBootApplication +@EnableScheduling +@MapperScan("com.jeequan.jeepay.service.mapper") //Mybatis mapper接口路径 +@ComponentScan(basePackages = "com.jeequan.jeepay.*") //由于MainApplication没有在项目根目录, 需要配置basePackages属性使得成功扫描所有Spring组件; +@Configuration +public class JeepayMchApplication { + + /** main启动函数 **/ + public static void main(String[] args) { + + //启动项目 + SpringApplication.run(JeepayMchApplication.class, args); + + } + + + /** fastJson 配置信息 **/ + @Bean + public HttpMessageConverters fastJsonConfig(){ + + //新建fast-json转换器 + FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); + + //fast-json 配置信息 + FastJsonConfig config = new FastJsonConfig(); + config.setDateFormat("yyyy-MM-dd HH:mm:ss"); + converter.setFastJsonConfig(config); + + //设置响应的 Content-Type + converter.setSupportedMediaTypes(Arrays.asList(new MediaType[]{MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8})); + return new HttpMessageConverters(converter); + } + + /** Mybatis plus 分页插件 **/ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + // 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false + // paginationInterceptor.setOverflow(false); + // 设置最大单页限制数量,默认 500 条,-1 不受限制 + // paginationInterceptor.setLimit(500); + return paginationInterceptor; + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/RedisConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/RedisConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..7025e4978cb3402a13ec8bead8e9e0e2340c7c00 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/RedisConfig.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.config; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; + +/** + * redis管理类 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Configuration +public class RedisConfig { + + @Value("${spring.redis.host}") + private String host; + + @Value("${spring.redis.port}") + private Integer port; + + @Value("${spring.redis.timeout}") + private Integer timeout; + + @Value("${spring.redis.database}") + private Integer defaultDatabase; + + @Value("${spring.redis.password}") + private String password; + + /** 当前系统的redis缓存操作对象 (主对象) **/ + @Primary + @Bean(name = "defaultStringRedisTemplate") + public StringRedisTemplate sysStringRedisTemplate() { + StringRedisTemplate template = new StringRedisTemplate(); + + LettuceConnectionFactory jedisConnectionFactory = new LettuceConnectionFactory(); + jedisConnectionFactory.setHostName(host); + jedisConnectionFactory.setPort(port); + jedisConnectionFactory.setTimeout(timeout); + + if (!StringUtils.isEmpty(password)) { + jedisConnectionFactory.setPassword(password); + } + + if (defaultDatabase != 0) { + jedisConnectionFactory.setDatabase(defaultDatabase); + } + + jedisConnectionFactory.afterPropertiesSet(); + + template.setConnectionFactory(jedisConnectionFactory); + return template; + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/SystemYmlConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/SystemYmlConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..2fd585b27d3332fdc1141571c972b45b6f73ba92 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/config/SystemYmlConfig.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; +import org.springframework.stereotype.Component; + +/** + * 系统Yml配置参数定义Bean + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +@ConfigurationProperties(prefix="isys") +@Data +public class SystemYmlConfig { + + /** 是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] **/ + private Boolean allowCors; + + /** 生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 **/ + private String jwtSecret; + + @NestedConfigurationProperty //指定该属性为嵌套值, 否则默认为简单值导致对象为空(外部类不存在该问题, 内部static需明确指定) + private OssFile ossFile; + + /** 系统oss配置信息 **/ + @Data + public static class OssFile{ + + /** 存储根路径 **/ + private String rootPath; + + /** 公共读取块 **/ + private String publicPath; + + /** 私有读取块 **/ + private String privatePath; + + } +} \ No newline at end of file diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CommonCtrl.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CommonCtrl.java new file mode 100644 index 0000000000000000000000000000000000000000..b22354cc75b60dbd6ba38908d8777dda7345a764 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CommonCtrl.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl; + +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.ctrls.AbstractCtrl; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.mch.config.SystemYmlConfig; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.context.SecurityContextHolder; + +/** + * 通用ctrl类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +public abstract class CommonCtrl extends AbstractCtrl { + + @Autowired + protected SystemYmlConfig mainConfig; + + @Autowired + private SysConfigService sysConfigService; + + /** 获取当前用户ID */ + protected JeeUserDetails getCurrentUser(){ + + return (JeeUserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal(); + } + + /** 获取当前商户ID **/ + protected String getCurrentMchNo() { + return getCurrentUser().getSysUser().getBelongInfoId(); + } + + /** + * 获取当前用户登录IP + * @return + */ + protected String getIp() { + return getClientIp(); + } + + /** + * 校验当前用户是否为超管 + * @return + */ + protected ApiRes checkIsAdmin() { + SysUser sysUser = getCurrentUser().getSysUser(); + if (sysUser.getIsAdmin() != CS.YES) { + return ApiRes.fail(ApiCodeEnum.SYS_PERMISSION_ERROR); + }else { + return null; + } + + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java new file mode 100644 index 0000000000000000000000000000000000000000..b46b7b03847e5e856b051dbc7b383082ecf3dbd4 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.cache.ITokenService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.core.utils.TreeDataBuilder; +import com.jeequan.jeepay.service.impl.SysEntitlementService; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * 当前登录者的信息相关接口 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/current") +public class CurrentUserController extends CommonCtrl{ + + @Autowired private SysEntitlementService sysEntitlementService; + @Autowired private SysUserService sysUserService; + @Autowired private SysUserAuthService sysUserAuthService; + + @RequestMapping(value="/user", method = RequestMethod.GET) + public ApiRes currentUserInfo() { + + ///当前用户信息 + JeeUserDetails jeeUserDetails = getCurrentUser(); + SysUser user = jeeUserDetails.getSysUser(); + + //1. 当前用户所有权限ID集合 + List entIdList = new ArrayList<>(); + jeeUserDetails.getAuthorities().stream().forEach(r->entIdList.add(r.getAuthority())); + + List allMenuList = new ArrayList<>(); //所有菜单集合 + + //2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 ) + if(entIdList != null && !entIdList.isEmpty()){ + allMenuList = sysEntitlementService.list(SysEntitlement.gw() + .in(SysEntitlement::getEntId, entIdList) + .in(SysEntitlement::getEntType, Arrays.asList(CS.ENT_TYPE.MENU_LEFT, CS.ENT_TYPE.MENU_OTHER)) + .eq(SysEntitlement::getSystem, CS.SYS_TYPE.MCH) + .eq(SysEntitlement::getState, CS.PUB_USABLE)); + } + + //4. 转换为json树状结构 + JSONArray jsonArray = (JSONArray) JSONArray.toJSON(allMenuList); + List allMenuRouteTree = new TreeDataBuilder(jsonArray, + "entId", "pid", "children", "entSort", true) + .buildTreeObject(); + + //1. 所有权限ID集合 + user.addExt("entIdList", entIdList); + user.addExt("allMenuRouteTree", allMenuRouteTree); + + return ApiRes.ok(getCurrentUser().getSysUser()); + } + + + /** 修改个人信息 */ + @MethodLog(remark = "修改个人信息") + @RequestMapping(value="/user", method = RequestMethod.PUT) + public ApiRes modifyCurrentUserInfo() { + + //修改头像 + String avatarUrl = getValString("avatarUrl"); + String realname = getValString("realname"); + Byte sex = getValByte("sex"); + SysUser updateRecord = new SysUser(); + updateRecord.setSysUserId(getCurrentUser().getSysUser().getSysUserId()); + if (StringUtils.isNotEmpty(avatarUrl)) updateRecord.setAvatarUrl(avatarUrl); + if (StringUtils.isNotEmpty(realname)) updateRecord.setRealname(realname); + if (sex != null) updateRecord.setSex(sex); + sysUserService.updateById(updateRecord); + + + //保存redis最新数据 + JeeUserDetails currentUser = getCurrentUser(); + currentUser.setSysUser(sysUserService.getById(getCurrentUser().getSysUser().getSysUserId())); + ITokenService.refData(currentUser); + + return ApiRes.ok(); + } + + + /** modifyPwd */ + @MethodLog(remark = "修改密码") + @RequestMapping(value="modifyPwd", method = RequestMethod.PUT) + public ApiRes modifyPwd() throws BizException{ + + Long opSysUserId = getValLongRequired("recordId"); //操作员ID + + //更改密码, 验证当前用户信息 + String currentUserPwd = getValStringRequired("originalPwd"); //当前用户登录密码 + //验证当前密码是否正确 + if(!sysUserAuthService.validateCurrentUserPwd(currentUserPwd)){ + throw new BizException("原密码验证失败!"); + } + + String opUserPwd = getValStringRequired("confirmPwd"); + + // 验证原密码与新密码是否相同 + if (opUserPwd.equals(currentUserPwd)) { + throw new BizException("新密码与原密码不能相同!"); + } + + sysUserAuthService.resetAuthInfo(opSysUserId, null, null, opUserPwd, CS.SYS_TYPE.MGR); + //调用登出接口 + return logout(); + } + + /** 登出 */ + @MethodLog(remark = "退出") + @RequestMapping(value="logout", method = RequestMethod.POST) + public ApiRes logout() throws BizException{ + + ITokenService.removeIToken(getCurrentUser().getCacheKey(), getCurrentUser().getSysUser().getSysUserId()); + return ApiRes.ok(); + } + + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/anon/AuthController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/anon/AuthController.java new file mode 100644 index 0000000000000000000000000000000000000000..04b440ef120cac622061686a12598892514f4dc6 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/anon/AuthController.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.anon; + +import cn.hutool.captcha.CaptchaUtil; +import cn.hutool.captcha.LineCaptcha; +import cn.hutool.core.codec.Base64; +import cn.hutool.core.lang.UUID; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.mch.service.AuthService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +/** + * 登录鉴权 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/anon/auth") +public class AuthController extends CommonCtrl { + + @Autowired private AuthService authService; + + /** 用户信息认证 获取iToken **/ + @RequestMapping(value = "/validate", method = RequestMethod.POST) + @MethodLog(remark = "登录认证") + public ApiRes validate() throws BizException { + + + String account = Base64.decodeStr(getValStringRequired("ia")); //用户名 i account, 已做base64处理 + String ipassport = Base64.decodeStr(getValStringRequired("ip")); //密码 i passport, 已做base64处理 + String vercode = Base64.decodeStr(getValStringRequired("vc")); //验证码 vercode, 已做base64处理 + String vercodeToken = Base64.decodeStr(getValStringRequired("vt")); //验证码token, vercode token , 已做base64处理 + + String cacheCode = RedisUtil.getString(CS.getCacheKeyImgCode(vercodeToken)); + if(StringUtils.isEmpty(cacheCode) || !cacheCode.equalsIgnoreCase(vercode)){ + throw new BizException("验证码有误!"); + } + + // 返回前端 accessToken + String accessToken = authService.auth(account, ipassport); + + // 删除图形验证码缓存数据 + RedisUtil.del(CS.getCacheKeyImgCode(vercodeToken)); + + return ApiRes.ok4newJson(CS.ACCESS_TOKEN_NAME, accessToken); + } + + /** 图片验证码 **/ + @RequestMapping(value = "/vercode", method = RequestMethod.GET) + public ApiRes vercode() throws BizException { + + //定义图形验证码的长和宽 // 4位验证码 + LineCaptcha lineCaptcha = CaptchaUtil.createLineCaptcha(137, 40, 4, 80); + lineCaptcha.createCode(); //生成code + + //redis + String vercodeToken = UUID.fastUUID().toString(); + RedisUtil.setString(CS.getCacheKeyImgCode(vercodeToken), lineCaptcha.getCode(), 60 ); //图片验证码缓存时间: 1分钟 + + JSONObject result = new JSONObject(); + result.put("imageBase64Data", lineCaptcha.getImageBase64Data()); + result.put("vercodeToken", vercodeToken); + + return ApiRes.ok(result); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/common/OssFileController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/common/OssFileController.java new file mode 100644 index 0000000000000000000000000000000000000000..d92300fad3e5c355657b4401615e05205952d7a4 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/common/OssFileController.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.common; + +import cn.hutool.core.lang.UUID; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.model.OssFileConfig; +import com.jeequan.jeepay.core.utils.FileKit; +import com.jeequan.jeepay.mch.config.SystemYmlConfig; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; + +/* + * 统一文件上传接口(ossFile) + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:07 + */ +@RestController +@RequestMapping("/api/ossFiles") +public class OssFileController extends CommonCtrl { + + @Autowired private SystemYmlConfig systemYmlConfig; + @Autowired private SysConfigService sysConfigService; + + /** 上传文件 (单文件上传) */ + @PostMapping("/{bizType}") + public ApiRes singleFileUpload(@RequestParam("file") MultipartFile file, @PathVariable("bizType") String bizType) { + + if( file == null ) return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR, "选择文件不存在"); + try { + + + OssFileConfig ossFileConfig = OssFileConfig.getOssFileConfigByBizType(bizType); + + //1. 判断bizType 是否可用 + if(ossFileConfig == null){ + throw new BizException("类型有误"); + } + + // 2. 判断文件是否支持 + String fileSuffix = FileKit.getFileSuffix(file.getOriginalFilename(), false); + if( !ossFileConfig.isAllowFileSuffix(fileSuffix) ){ + throw new BizException("上传文件格式不支持!"); + } + + // 3. 判断文件大小是否超限 + if( !ossFileConfig.isMaxSizeLimit(file.getSize()) ){ + throw new BizException("上传大小请限制在["+ossFileConfig.getMaxSize() / 1024 / 1024 +"M]以内!"); + } + + + boolean isAllowPublicRead = ossFileConfig.isAllowPublicRead(); //是否允许公共读, true:公共读, false:私有文件 + + //公共读 & 是否上传到oss + boolean isYunOss = false; //TODO 暂时不支持云oss方式 + if(isAllowPublicRead && isYunOss){ + return null; + } + + //以下为文件上传到本地 + + // 新文件地址 + String newFileName = UUID.fastUUID() + "." + fileSuffix; + + // 保存的文件夹名称 + String saveFilePath = isAllowPublicRead ? systemYmlConfig.getOssFile().getPublicPath() : systemYmlConfig.getOssFile().getPrivatePath(); + saveFilePath = saveFilePath + File.separator + bizType + File.separator + newFileName; + + + //保存文件 + saveFile(file, saveFilePath); + + //返回响应结果 + String resultUrl = bizType + "/" + newFileName; + if(isAllowPublicRead){ //允许公共读取 + resultUrl = sysConfigService.getDBApplicationConfig().getOssPublicSiteUrl() + "/" + resultUrl; + } + + return ApiRes.ok(resultUrl); + + } catch (BizException biz) { + throw biz; + } catch (Exception e) { + logger.error("upload error, fileName = {}", file == null ? null :file.getOriginalFilename(), e); + throw new BizException(ApiCodeEnum.SYSTEM_ERROR); + } + } + +} \ No newline at end of file diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MainChartController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MainChartController.java new file mode 100644 index 0000000000000000000000000000000000000000..c537ed440ecfdddb873805578cd345c4c9f9d17a --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MainChartController.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.merchant; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.SysUserService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * 主页数据类 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Slf4j +@RestController +@RequestMapping("api/mainChart") +public class MainChartController extends CommonCtrl { + + @Autowired private PayOrderService payOrderService; + + @Autowired private SysUserService sysUserService; + + @Autowired private MchInfoService mchInfoService; + + + /** 周交易总金额 */ + @PreAuthorize("hasAuthority('ENT_MCH_MAIN_PAY_AMOUNT_WEEK')") + @RequestMapping(value="/payAmountWeek", method = RequestMethod.GET) + public ApiRes payAmountWeek() { + return ApiRes.ok(payOrderService.mainPageWeekCount(getCurrentMchNo())); + } + + /** + * 商户总数量、服务商总数量、总交易金额、总交易笔数 + * @return + */ + @PreAuthorize("hasAuthority('ENT_MCH_MAIN_NUMBER_COUNT')") + @RequestMapping(value="/numCount", method = RequestMethod.GET) + public ApiRes numCount() { + return ApiRes.ok(payOrderService.mainPageNumCount(getCurrentMchNo())); + } + + /** 交易统计 */ + @PreAuthorize("hasAuthority('ENT_MCH_MAIN_PAY_COUNT')") + @RequestMapping(value="/payCount", method = RequestMethod.GET) + public ApiRes payCount() { + // 获取传入参数 + JSONObject paramJSON = getReqParamJSON(); + String createdStart = paramJSON.getString("createdStart"); + String createdEnd = paramJSON.getString("createdEnd"); + + List mapList = payOrderService.mainPagePayCount(getCurrentMchNo(), createdStart, createdEnd); + //返回数据 + return ApiRes.ok(mapList); + } + + /** 支付方式统计 */ + @PreAuthorize("hasAuthority('ENT_MCH_MAIN_PAY_TYPE_COUNT')") + @RequestMapping(value="/payTypeCount", method = RequestMethod.GET) + public ApiRes payWayCount() { + JSONObject paramJSON = getReqParamJSON(); + // 开始、结束时间 + String createdStart = paramJSON.getString("createdStart"); + String createdEnd = paramJSON.getString("createdEnd"); + ArrayList arrayResult = payOrderService.mainPagePayTypeCount(getCurrentMchNo(), createdStart, createdEnd); + return ApiRes.ok(arrayResult); + } + + /** 商户基本信息、用户基本信息 **/ + @PreAuthorize("hasAuthority('ENT_MCH_MAIN_USER_INFO')") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes userDetail() { + SysUser sysUser = sysUserService.getById(getCurrentUser().getSysUser().getSysUserId()); + MchInfo mchInfo = mchInfoService.getById(getCurrentMchNo()); + JSONObject json = (JSONObject) JSON.toJSON(mchInfo); + json.put("loginUsername", sysUser.getLoginUsername()); + json.put("realname", sysUser.getRealname()); + return ApiRes.ok(json); + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayInterfaceConfigController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayInterfaceConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..e1d1b12ffae6d4d7fa0fd6dba44699ef6f8606ec --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayInterfaceConfigController.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.merchant; + +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.List; + +/** + * 商户支付接口配置类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/mch/payConfigs") +public class MchPayInterfaceConfigController extends CommonCtrl { + + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private MchInfoService mchInfoService; + + /** + * @Author: ZhuXiao + * @Description: 查询商户支付接口配置列表 + * @Date: 10:51 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_LIST')") + @GetMapping + public ApiRes list() { + MchInfo mchInfo = mchInfoService.getById(getCurrentUser().getSysUser().getBelongInfoId()); + List list = payInterfaceConfigService.selectAllPayIfConfigListByInfoId(CS.INFO_TYPE_MCH, getCurrentUser().getSysUser().getBelongInfoId()); + + for (PayInterfaceDefine define : list) { + define.addExt("mchParams", mchInfo.getType() == CS.MCH_TYPE_NORMAL ? define.getNormalMchParams() : define.getIsvsubMchParams()); + define.setNormalMchParams(null); + define.setIsvsubMchParams(null); + } + return ApiRes.ok(list); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 商户号、接口类型 获取商户参数配置 + * @Date: 10:54 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_VIEW')") + @GetMapping("/{ifCode}") + public ApiRes getByMchNo(@PathVariable(value = "ifCode") String ifCode) { + PayInterfaceConfig payInterfaceConfig = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, getCurrentUser().getSysUser().getBelongInfoId(), ifCode); + if (payInterfaceConfig != null && payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().multiply(new BigDecimal("100"))); + } + return ApiRes.ok(payInterfaceConfig); + } + + /** + * @Author: ZhuXiao + * @Description: 更新商户支付参数 + * @Date: 10:56 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_CONFIG_ADD')") + @PostMapping + @MethodLog(remark = "更新商户支付参数") + public ApiRes saveOrUpdate() { + + String mchNo = getCurrentUser().getSysUser().getBelongInfoId(); + String ifCode = getValStringRequired("ifCode"); + + PayInterfaceConfig payInterfaceConfig = getObject(PayInterfaceConfig.class); + payInterfaceConfig.setInfoType(CS.INFO_TYPE_MCH); + payInterfaceConfig.setInfoId(mchNo); + + // 存入真实费率 + if (payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP)); + } + + //添加更新者信息 + Long userId = getCurrentUser().getSysUser().getSysUserId(); + String realName = getCurrentUser().getSysUser().getRealname(); + payInterfaceConfig.setUpdatedUid(userId); + payInterfaceConfig.setUpdatedBy(realName); + + //根据 商户号、接口类型 获取商户参数配置 + PayInterfaceConfig dbRecoed = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, mchNo, ifCode); + //若配置存在,为saveOrUpdate添加ID,第一次配置添加创建者 + if (dbRecoed != null) { + payInterfaceConfig.setId(dbRecoed.getId()); + }else { + payInterfaceConfig.setCreatedUid(userId); + payInterfaceConfig.setCreatedBy(realName); + } + + boolean result = payInterfaceConfigService.saveOrUpdate(payInterfaceConfig); + if (!result) { + throw new BizException("配置失败"); + } + return ApiRes.ok(); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayPassageConfigController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayPassageConfigController.java new file mode 100644 index 0000000000000000000000000000000000000000..02630119c9bd4a0452321ab427df9ced29b69961 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/merchant/MchPayPassageConfigController.java @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.merchant; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.aop.MethodLog; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.MchPayPassage; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.MchPayPassageService; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.LinkedList; +import java.util.List; + +/** + * 商户支付通道配置类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/mch/payPassages") +public class MchPayPassageConfigController extends CommonCtrl { + + @Autowired private MchPayPassageService mchPayPassageService; + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private PayWayService payWayService; + @Autowired private MchInfoService mchInfoService; + + /** + * @Author: ZhuXiao + * @Description: 查询支付方式列表,并添加是否配置支付通道状态 + * @Date: 10:58 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_LIST')") + @GetMapping + public ApiRes list() { + + String mchNo = getCurrentUser().getSysUser().getBelongInfoId(); + String wayCode = getValString("wayCode"); + String wayName = getValString("wayName"); + + //支付方式集合 + LambdaQueryWrapper wrapper = PayWay.gw(); + if (StrUtil.isNotBlank(wayCode)) wrapper.eq(PayWay::getWayCode, wayCode); + if (StrUtil.isNotBlank(wayName)) wrapper.like(PayWay::getWayName, "%" + wayName + "%"); + IPage payWayPage = payWayService.page(getIPage(), wrapper); + + if (!CollectionUtils.isEmpty(payWayPage.getRecords())) { + + // 支付方式代码集合 + List wayCodeList = new LinkedList<>(); + payWayPage.getRecords().stream().forEach(payWay -> wayCodeList.add(payWay.getWayCode())); + + // 商户支付通道集合 + List mchPayPassageList = mchPayPassageService.list(MchPayPassage.gw() + .select(MchPayPassage::getWayCode, MchPayPassage::getState) + .eq(MchPayPassage::getMchNo, mchNo) + .in(MchPayPassage::getWayCode, wayCodeList)); + + for (PayWay payWay : payWayPage.getRecords()) { + payWay.addExt("passageState", CS.NO); + for (MchPayPassage mchPayPassage : mchPayPassageList) { + // 某种支付方式多个通道的情况下,只要有一个通道状态为开启,则该支付方式对应为开启状态 + if (payWay.getWayCode().equals(mchPayPassage.getWayCode()) && mchPayPassage.getState() == CS.YES) { + payWay.addExt("passageState", CS.YES); + break; + } + } + } + } + + return ApiRes.page(payWayPage); + } + + /** + * @Author: ZhuXiao + * @Description: 根据商户号、支付方式查询可用的支付接口列表 + * @Date: 11:05 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_CONFIG')") + @GetMapping("/availablePayInterface/{wayCode}") + public ApiRes availablePayInterface(@PathVariable("wayCode") String wayCode) { + + String mchNo = getCurrentUser().getSysUser().getBelongInfoId(); + MchInfo mchInfo = mchInfoService.getById(mchNo); + if (mchInfo == null || mchInfo.getState() != CS.YES) { + return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + } + + // 根据支付方式查询可用支付接口列表 + List list = mchPayPassageService.selectAvailablePayInterfaceList(wayCode, mchNo, CS.INFO_TYPE_MCH, mchInfo.getType()); + + return ApiRes.ok(list); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 商户号、接口类型 获取商户参数配置 + * @Date: 11:05 2021/5/13 + */ + @GetMapping("/{ifCode}") + public ApiRes getByMchNo(@PathVariable(value = "ifCode") String ifCode) { + String mchNo = getCurrentUser().getSysUser().getBelongInfoId(); + PayInterfaceConfig payInterfaceConfig = payInterfaceConfigService.getByInfoIdAndIfCode(CS.INFO_TYPE_MCH, mchNo, ifCode); + if (payInterfaceConfig != null && payInterfaceConfig.getIfRate() != null) { + payInterfaceConfig.setIfRate(payInterfaceConfig.getIfRate().multiply(new BigDecimal("100"))); + } + return ApiRes.ok(payInterfaceConfig); + } + + /** + * @Author: ZhuXiao + * @Description: + * @Date: 11:05 2021/5/13 + */ + @GetMapping("/{id}") + public ApiRes detail(@PathVariable("id") Long id) { + MchPayPassage payPassage = mchPayPassageService.getById(id); + if (payPassage == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + if (!payPassage.getMchNo().equals(getCurrentUser().getSysUser().getBelongInfoId())) return ApiRes.fail(ApiCodeEnum.SYS_PERMISSION_ERROR); + payPassage.setRate(payPassage.getRate().multiply(new BigDecimal("100"))); + return ApiRes.ok(payPassage); + } + + /** + * @Author: ZhuXiao + * @Description: 商户支付通道配置 + * @Date: 11:05 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_MCH_PAY_PASSAGE_ADD')") + @PostMapping + @MethodLog(remark = "更新商户支付通道") + public ApiRes saveOrUpdate() { + + String reqParams = getValStringRequired("reqParams"); + + try { + List mchPayPassageList = JSONArray.parseArray(reqParams, MchPayPassage.class); + mchPayPassageService.saveOrUpdateBatchSelf(mchPayPassageList, getCurrentUser().getSysUser().getBelongInfoId()); + return ApiRes.ok(); + }catch (Exception e) { + return ApiRes.fail(ApiCodeEnum.SYSTEM_ERROR); + } + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/PayOrderController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/PayOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..8b06816b78231ce266bf41f85f52f0a7f7e7db4f --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/PayOrderController.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.order; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.CollectionUtils; +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 java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 支付订单管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/payOrder") +public class PayOrderController extends CommonCtrl { + + @Autowired private PayOrderService payOrderService; + + @Autowired private PayWayService payWayService; + + /** + * @Author: ZhuXiao + * @Description: 订单信息列表 + * @Date: 10:43 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_PAY_ORDER_LIST')") + @GetMapping + public ApiRes list() { + + PayOrder payOrder = getObject(PayOrder.class); + JSONObject paramJSON = getReqParamJSON(); + + LambdaQueryWrapper wrapper = PayOrder.gw(); + wrapper.eq(PayOrder::getMchNo, getCurrentUser().getSysUser().getBelongInfoId()); + if (StringUtils.isNotEmpty(payOrder.getPayOrderId())) wrapper.eq(PayOrder::getPayOrderId, payOrder.getPayOrderId()); + if (StringUtils.isNotEmpty(payOrder.getMchOrderNo())) wrapper.eq(PayOrder::getMchOrderNo, getCurrentMchNo()); + if (StringUtils.isNotEmpty(payOrder.getWayCode())) wrapper.eq(PayOrder::getWayCode, payOrder.getWayCode()); + if (payOrder.getState() != null) wrapper.eq(PayOrder::getState, payOrder.getState()); + if (payOrder.getNotifyState() != null) wrapper.eq(PayOrder::getNotifyState, payOrder.getNotifyState()); + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) wrapper.ge(PayOrder::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) wrapper.le(PayOrder::getCreatedAt, paramJSON.getString("createdEnd")); + } + wrapper.orderByDesc(PayOrder::getCreatedAt); + + IPage pages = payOrderService.page(getIPage(), wrapper); + + // 得到所有支付方式 + Map payWayNameMap = new HashMap<>(); + List payWayList = payWayService.list(); + if (!CollectionUtils.isEmpty(payWayList)) { + for (PayWay payWay:payWayList) { + payWayNameMap.put(payWay.getWayCode(), payWay.getWayName()); + } + for (PayOrder order:pages.getRecords()) { + // 存入支付方式名称 + if (StringUtils.isNotEmpty(payWayNameMap.get(order.getWayCode()))) { + order.addExt("wayName", payWayNameMap.get(order.getWayCode())); + }else { + order.addExt("wayName", order.getWayCode()); + } + } + } + + return ApiRes.page(pages); + } + + /** + * @Author: ZhuXiao + * @Description: 支付订单信息 + * @Date: 10:43 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_PAY_ORDER_VIEW')") + @GetMapping("/{payOrderId}") + public ApiRes detail(@PathVariable("payOrderId") String payOrderId) { + PayOrder payOrder = payOrderService.getById(payOrderId); + if (payOrder == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + if (!payOrder.getMchNo().equals(getCurrentMchNo())) { + return ApiRes.fail(ApiCodeEnum.SYS_PERMISSION_ERROR); + } + return ApiRes.ok(payOrder); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/RefundOrderController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/RefundOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..197ab19aa9b2de9452b8d3de534df9f487b27135 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/order/RefundOrderController.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.order; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.RefundOrder; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.RefundOrderService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +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; + +/** + * 退款订单管理类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("/api/refundOrder") +public class RefundOrderController extends CommonCtrl { + + @Autowired private RefundOrderService refundOrderService; + + /** + * @Author: ZhuXiao + * @Description: 退款订单信息列表 + * @Date: 10:44 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_REFUND_ORDER_LIST')") + @GetMapping + public ApiRes list() { + + RefundOrder refundOrder = getObject(RefundOrder.class); + JSONObject paramJSON = getReqParamJSON(); + LambdaQueryWrapper wrapper = RefundOrder.gw(); + wrapper.eq(RefundOrder::getMchNo, getCurrentUser().getSysUser().getBelongInfoId()); + if (StringUtils.isNotEmpty(refundOrder.getRefundOrderId())) wrapper.eq(RefundOrder::getRefundOrderId, refundOrder.getRefundOrderId()); + if (StringUtils.isNotEmpty(refundOrder.getPayOrderId())) wrapper.eq(RefundOrder::getPayOrderId, refundOrder.getPayOrderId()); + if (StringUtils.isNotEmpty(refundOrder.getChannelPayOrderNo())) wrapper.eq(RefundOrder::getChannelPayOrderNo, refundOrder.getChannelPayOrderNo()); + if (StringUtils.isNotEmpty(refundOrder.getMchRefundNo())) wrapper.eq(RefundOrder::getMchRefundNo, refundOrder.getMchRefundNo()); + if (refundOrder.getState() != null) wrapper.eq(RefundOrder::getState, refundOrder.getState()); + if (StringUtils.isNotEmpty(refundOrder.getChannelPayOrderNo())) wrapper.eq(RefundOrder::getChannelPayOrderNo, refundOrder.getChannelPayOrderNo()); + if (refundOrder.getResult() != null) wrapper.eq(RefundOrder::getResult, refundOrder.getResult()); + if (paramJSON != null) { + if (StringUtils.isNotEmpty(paramJSON.getString("createdStart"))) wrapper.ge(RefundOrder::getCreatedAt, paramJSON.getString("createdStart")); + if (StringUtils.isNotEmpty(paramJSON.getString("createdEnd"))) wrapper.le(RefundOrder::getCreatedAt, paramJSON.getString("createdEnd")); + } + wrapper.orderByDesc(RefundOrder::getCreatedAt); + IPage pages = refundOrderService.page(getIPage(), wrapper); + + return ApiRes.page(pages); + } + + /** + * @Author: ZhuXiao + * @Description: 退款订单信息 + * @Date: 10:44 2021/5/13 + */ + @PreAuthorize("hasAuthority('ENT_REFUND_ORDER_VIEW')") + @GetMapping("/{refundOrderId}") + public ApiRes detail(@PathVariable("refundOrderId") String refundOrderId) { + RefundOrder refundOrder = refundOrderService.getById(refundOrderId); + if (refundOrder == null) return ApiRes.fail(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + if (!refundOrder.getMchNo().equals(getCurrentUser().getSysUser().getBelongInfoId())) { + return ApiRes.fail(ApiCodeEnum.SYS_PERMISSION_ERROR); + } + return ApiRes.ok(refundOrder); + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/payconfig/PayWayController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/payconfig/PayWayController.java new file mode 100644 index 0000000000000000000000000000000000000000..2d228eaa94f3e1ef8d7823275ad8aab2ce954bea --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/payconfig/PayWayController.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.payconfig; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.MchPayPassageService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.PayWayService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 支付方式配置类 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/payWays") +public class PayWayController extends CommonCtrl { + + @Autowired PayWayService payWayService; + @Autowired MchPayPassageService mchPayPassageService; + @Autowired PayOrderService payOrderService; + + /** + * @Author: ZhuXiao + * @Description: list + * @Date: 15:52 2021/4/27 + */ +// @PreAuthorize("hasAuthority('ENT_PC_WAY_LIST')") + @GetMapping + public ApiRes list() { + + PayWay queryObject = getObject(PayWay.class); + + LambdaQueryWrapper condition = PayWay.gw(); + if(StringUtils.isNotEmpty(queryObject.getWayCode())){ + condition.like(PayWay::getWayCode, queryObject.getWayCode()); + } + if(StringUtils.isNotEmpty(queryObject.getWayName())){ + condition.like(PayWay::getWayName, queryObject.getWayName()); + } + condition.orderByAsc(PayWay::getWayCode); + + IPage pages = payWayService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysEntController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysEntController.java new file mode 100644 index 0000000000000000000000000000000000000000..5f6d86520e940093c0ef87bf53c4febce0b5be23 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysEntController.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.TreeDataBuilder; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.SysEntitlementService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 权限菜单管理类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/sysEnts") +public class SysEntController extends CommonCtrl { + + @Autowired SysEntitlementService sysEntitlementService; + + /** 查询权限集合 */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_ENT_LIST', 'ENT_UR_ROLE_DIST' )") + @RequestMapping(value="/showTree", method = RequestMethod.GET) + public ApiRes showTree() { + + //查询全部数据 + List list = sysEntitlementService.list(SysEntitlement.gw().eq(SysEntitlement::getSystem, CS.SYS_TYPE.MCH)); + + //4. 转换为json树状结构 + JSONArray jsonArray = (JSONArray) JSONArray.toJSON(list); + List leftMenuTree = new TreeDataBuilder(jsonArray, + "entId", "pid", "children", "entSort", true) + .buildTreeObject(); + + return ApiRes.ok(leftMenuTree); + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleController.java new file mode 100644 index 0000000000000000000000000000000000000000..756f63709ab0b74faca28a3187f000e18543d6f4 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleController.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysRole; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.mch.service.AuthService; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysRoleService; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +/** + * 角色管理类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/sysRoles") +public class SysRoleController extends CommonCtrl { + + @Autowired SysRoleService sysRoleService; + @Autowired SysUserRoleRelaService sysUserRoleRelaService; + @Autowired private AuthService authService; + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + + + /** list */ + @PreAuthorize("hasAnyAuthority( 'ENT_UR_ROLE_LIST', 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysRole queryObject = getObject(SysRole.class); + + LambdaQueryWrapper condition = SysRole.gw(); + condition.eq(SysRole::getSystem, CS.SYS_TYPE.MCH); + condition.eq(SysRole::getBelongInfoId, getCurrentMchNo()); + + if(StringUtils.isNotEmpty(queryObject.getRoleName())){ + condition.like(SysRole::getRoleName, queryObject.getRoleName()); + } + + if(StringUtils.isNotEmpty(queryObject.getRoleId())){ + condition.like(SysRole::getRoleId, queryObject.getRoleId()); + } + + condition.orderByDesc(SysRole::getUpdatedAt); //时间倒序 + + IPage pages = sysRoleService.page(getIPage(true), condition); + return ApiRes.page(pages); + } + + + /** detail */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("recordId") String recordId) { + SysRole sysRole = sysRoleService.getOne(SysRole.gw().eq(SysRole::getRoleId, recordId).eq(SysRole::getBelongInfoId, getCurrentMchNo())); + if (sysRole == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + return ApiRes.ok(sysRole); + } + + /** add */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_ADD' )") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + SysRole SysRole = getObject(SysRole.class); + String roleId = "ROLE_" + StringKit.getUUID(6); + SysRole.setRoleId(roleId); + SysRole.setSystem(CS.SYS_TYPE.MCH); //后台系统 + SysRole.setBelongInfoId(getCurrentUser().getSysUser().getBelongInfoId()); + sysRoleService.save(SysRole); + + //权限信息集合 + String entIdListStr = getValString("entIdListStr"); + + //如果包含: 可分配权限的权限 && entIdListStr 不为空 + if(getCurrentUser().getAuthorities().contains(new SimpleGrantedAuthority("ENT_UR_ROLE_DIST")) + && StringUtils.isNotEmpty(entIdListStr)){ + List entIdList = JSONArray.parseArray(entIdListStr, String.class); + + sysRoleEntRelaService.resetRela(roleId, entIdList); + } + + return ApiRes.ok(); + } + + /** update */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.PUT) + public ApiRes update(@PathVariable("recordId") String recordId) { + + SysRole sysRole = getObject(SysRole.class); + + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(SysRole::getRoleId, recordId); + updateWrapper.eq(SysRole::getBelongInfoId, getCurrentMchNo()); + sysRoleService.update(sysRole, updateWrapper); + + //权限信息集合 + String entIdListStr = getValString("entIdListStr"); + + //如果包含: 可分配权限的权限 && entIdListStr 不为空 + if(getCurrentUser().getAuthorities().contains(new SimpleGrantedAuthority("ENT_UR_ROLE_DIST")) + && StringUtils.isNotEmpty(entIdListStr)){ + List entIdList = JSONArray.parseArray(entIdListStr, String.class); + + sysRoleEntRelaService.resetRela(recordId, entIdList); + + List sysUserIdList = new ArrayList<>(); + sysUserRoleRelaService.list(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, recordId)).stream().forEach(item -> sysUserIdList.add(item.getUserId())); + + //查询到该角色的人员, 将redis更新 + authService.refAuthentication(sysUserIdList); + } + + return ApiRes.ok(); + } + + /** delete */ + @PreAuthorize("hasAuthority('ENT_UR_ROLE_DEL')") + @RequestMapping(value="/{recordId}", method = RequestMethod.DELETE) + public ApiRes del(@PathVariable("recordId") String recordId) { + SysRole sysRole = sysRoleService.getOne(SysRole.gw().eq(SysRole::getRoleId, recordId).eq(SysRole::getBelongInfoId, getCurrentMchNo())); + if (sysRole == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + if(sysUserRoleRelaService.count(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, recordId)) > 0){ + throw new BizException("当前角色已分配到用户, 不可删除!"); + } + sysRoleService.removeRole(recordId); + return ApiRes.ok(); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleEntRelaController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleEntRelaController.java new file mode 100644 index 0000000000000000000000000000000000000000..a6e708a40f90c5df5e7275f2653562cc16986645 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysRoleEntRelaController.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.SysRole; +import com.jeequan.jeepay.core.entity.SysRoleEntRela; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.service.AuthService; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysRoleService; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +/** + * 角色权限管理类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/sysRoleEntRelas") +public class SysRoleEntRelaController extends CommonCtrl { + + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + @Autowired private SysUserRoleRelaService sysUserRoleRelaService; + @Autowired private SysRoleService sysRoleService; + @Autowired private AuthService authService; + + /** list */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_DIST' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysRoleEntRela queryObject = getObject(SysRoleEntRela.class); + + LambdaQueryWrapper condition = SysRoleEntRela.gw(); + + if(queryObject.getRoleId() != null){ + condition.eq(SysRoleEntRela::getRoleId, queryObject.getRoleId()); + } + + IPage pages = sysRoleEntRelaService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + + /** 重置角色权限关联信息 */ + @PreAuthorize("hasAuthority( 'ENT_UR_ROLE_DIST' )") + @RequestMapping(value="relas/{roleId}", method = RequestMethod.POST) + public ApiRes relas(@PathVariable("roleId") String roleId) { + + SysRole sysRole = sysRoleService.getOne(SysRole.gw().eq(SysRole::getRoleId, roleId).eq(SysRole::getBelongInfoId, getCurrentMchNo())); + if (sysRole == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + List entIdList = JSONArray.parseArray(getValStringRequired("entIdListStr"), String.class); + + sysRoleEntRelaService.resetRela(roleId, entIdList); + + List sysUserIdList = new ArrayList<>(); + sysUserRoleRelaService.list(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, roleId)).stream().forEach(item -> sysUserIdList.add(item.getUserId())); + + //查询到该角色的人员, 将redis更新 + authService.refAuthentication(sysUserIdList); + + return ApiRes.ok(); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserController.java new file mode 100644 index 0000000000000000000000000000000000000000..704c02d1e744ca85a07c517d6d0176832a62aacc --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserController.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.sysuser; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import com.jeequan.jeepay.mch.service.AuthService; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Arrays; + +/** + * 用户管理类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/sysUsers") +public class SysUserController extends CommonCtrl { + + @Autowired SysUserService sysUserService; + @Autowired SysUserAuthService sysUserAuthService; + @Autowired private AuthService authService; + + + /** list */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_LIST' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysUser queryObject = getObject(SysUser.class); + + LambdaQueryWrapper condition = SysUser.gw(); + condition.eq(SysUser::getSystem, CS.SYS_TYPE.MCH); + condition.eq(SysUser::getBelongInfoId, getCurrentUser().getSysUser().getBelongInfoId()); + + if(StringUtils.isNotEmpty(queryObject.getRealname())){ + condition.like(SysUser::getRealname, queryObject.getRealname()); + } + + if(queryObject.getSysUserId() != null){ + condition.eq(SysUser::getSysUserId, queryObject.getSysUserId()); + } + + IPage pages = sysUserService.page(getIPage(), condition); + + return ApiRes.page(pages); + } + + + /** detail */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.GET) + public ApiRes detail(@PathVariable("recordId") Integer recordId) { + + SysUser sysUser = sysUserService.getById(recordId); + if (sysUser == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + if (!sysUser.getBelongInfoId().equals(getCurrentUser().getSysUser().getBelongInfoId())) { + throw new BizException(ApiCodeEnum.SYS_PERMISSION_ERROR); + } + return ApiRes.ok(sysUser); + } + + /** add */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_ADD' )") + @RequestMapping(value="", method = RequestMethod.POST) + public ApiRes add() { + SysUser sysUser = getObject(SysUser.class); + sysUser.setBelongInfoId(getCurrentUser().getSysUser().getBelongInfoId()); + sysUserService.addSysUser(sysUser, CS.SYS_TYPE.MCH); + return ApiRes.ok(); + } + + + /** 修改操作员 登录认证信息 */ +// @RequestMapping(value="/modifyPwd", method = RequestMethod.PUT) + public ApiRes authInfo() { + + Long opSysUserId = getValLongRequired("recordId"); //操作员ID + + //更改密码, 验证当前用户信息 + String currentUserPwd = getValStringRequired("originalPwd"); //当前用户登录密码 + //验证当前密码是否正确 + if(!sysUserAuthService.validateCurrentUserPwd(currentUserPwd)){ + throw new BizException("原密码验证失败!"); + } + + String opUserPwd = getValStringRequired("confirmPwd"); + + // 验证原密码与新密码是否相同 + if (opUserPwd.equals(currentUserPwd)) { + throw new BizException("新密码与原密码相同!"); + } + + sysUserAuthService.resetAuthInfo(opSysUserId, null, null, opUserPwd, CS.SYS_TYPE.MCH); + return ApiRes.ok(); + } + + + /** update */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_EDIT' )") + @RequestMapping(value="/{recordId}", method = RequestMethod.PUT) + public ApiRes update(@PathVariable("recordId") Long recordId) { + SysUser sysUser = getObject(SysUser.class); + sysUser.setSysUserId(recordId); + + SysUser dbRecord = sysUserService.getOne(SysUser.gw().eq(SysUser::getSysUserId, recordId).eq(SysUser::getBelongInfoId, getCurrentMchNo())); + if (dbRecord == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + //判断是否自己禁用自己 + if(recordId.equals(getCurrentUser().getSysUser().getSysUserId()) && sysUser.getState() != null && sysUser.getState() == CS.PUB_DISABLE){ + throw new BizException("系统不允许禁用当前登陆用户!"); + } + + sysUserService.updateSysUser(sysUser); + + //如果用户被禁用,需要更新redis数据 + if(sysUser.getState() != null && sysUser.getState() == CS.PUB_DISABLE){ + authService.refAuthentication(Arrays.asList(recordId)); + } + + return ApiRes.ok(); + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserRoleRelaController.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserRoleRelaController.java new file mode 100644 index 0000000000000000000000000000000000000000..b4d6a5dacd9707833c8037e75e715685ca80b281 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/sysuser/SysUserRoleRelaController.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.ctrl.sysuser; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.mch.service.AuthService; +import com.jeequan.jeepay.mch.ctrl.CommonCtrl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.service.impl.SysUserRoleRelaService; +import com.jeequan.jeepay.service.impl.SysUserService; +import com.jeequan.jeepay.core.model.ApiRes; + +import java.util.Arrays; +import java.util.List; + +/** + * 用户角色管理类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@RestController +@RequestMapping("api/sysUserRoleRelas") +public class SysUserRoleRelaController extends CommonCtrl { + + @Autowired private SysUserRoleRelaService sysUserRoleRelaService; + @Autowired private SysUserService sysUserService; + @Autowired private AuthService authService; + + /** list */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="", method = RequestMethod.GET) + public ApiRes list() { + + SysUserRoleRela queryObject = getObject(SysUserRoleRela.class); + + LambdaQueryWrapper condition = SysUserRoleRela.gw(); + + if(queryObject.getUserId() != null){ + condition.eq(SysUserRoleRela::getUserId, queryObject.getUserId()); + } + + IPage pages = sysUserRoleRelaService.page(getIPage(true), condition); + + return ApiRes.page(pages); + } + + /** 重置用户角色关联信息 */ + @PreAuthorize("hasAuthority( 'ENT_UR_USER_UPD_ROLE' )") + @RequestMapping(value="relas/{sysUserId}", method = RequestMethod.POST) + public ApiRes relas(@PathVariable("sysUserId") Long sysUserId) { + SysUser dbRecord = sysUserService.getOne(SysUser.gw().eq(SysUser::getSysUserId, sysUserId).eq(SysUser::getBelongInfoId, getCurrentMchNo())); + if (dbRecord == null) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + List roleIdList = JSONArray.parseArray(getValStringRequired("roleIdListStr"), String.class); + + sysUserService.saveUserRole(sysUserId, roleIdList); + + authService.refAuthentication(Arrays.asList(sysUserId)); + + return ApiRes.ok(); + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/queue/MqQueue4ModifyMchUserRemove.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/queue/MqQueue4ModifyMchUserRemove.java new file mode 100644 index 0000000000000000000000000000000000000000..4bf70397ec7a9c432114fc5f99dab958ec8624ee --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/queue/MqQueue4ModifyMchUserRemove.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.mq.queue; + +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.constants.CS; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQQueue; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 更新商户配置mq + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Slf4j +@Component +public class MqQueue4ModifyMchUserRemove extends ActiveMQQueue { + + public MqQueue4ModifyMchUserRemove(){ + super(CS.MQ.QUEUE_MODIFY_MCH_USER_REMOVE); + } + + /** + * @author: pangxiaoyu + * @date: 2021/6/7 16:17 + * @describe: 接收 更新系统配置项的消息 + */ + @JmsListener(destination = CS.MQ.QUEUE_MODIFY_MCH_USER_REMOVE) + public void receive(String userIdStr) { + + log.info("成功接收删除商户用户登录的订阅通知, msg={}", userIdStr); + // 字符串转List + List userIdList = Arrays.stream(userIdStr.split(",")).map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); + // 删除redis用户缓存 + if(userIdList == null || userIdList.isEmpty()){ + log.info("用户ID为空"); + return ; + } + for (Long sysUserId : userIdList) { + Collection cacheKeyList = RedisUtil.keys(CS.getCacheKeyToken(sysUserId, "*")); + if(cacheKeyList == null || cacheKeyList.isEmpty()){ + continue; + } + for (String cacheKey : cacheKeyList) { + // 删除用户Redis信息 + RedisUtil.del(cacheKey); + continue; + } + } + log.info("无权限登录用户信息已清除"); + } + + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/JMSConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/JMSConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..ee9e603b530833cb354bbd66eeba4852c80bf1e6 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/JMSConfig.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.mq.topic; + +import org.springframework.context.annotation.Bean; +import org.springframework.jms.config.DefaultJmsListenerContainerFactory; +import org.springframework.jms.config.JmsListenerContainerFactory; +import org.springframework.stereotype.Component; + +import javax.jms.ConnectionFactory; + +/** + * JMS消息配置项 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +public class JMSConfig { + + /** 新增jmsListenerContainer, 用于接收topic类型的消息 **/ + @Bean + public JmsListenerContainerFactory jmsListenerContainer(ConnectionFactory factory){ + DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); + bean.setPubSubDomain(true); + bean.setConnectionFactory(factory); + return bean; + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/MqTopic4ModifySysConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/MqTopic4ModifySysConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..9a59106cf42d290c04bbbf366ae6582b37b9ab9c --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/mq/topic/MqTopic4ModifySysConfig.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.service.impl.SysConfigService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +/** + * 更新系统配置mq + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Slf4j +@Component +public class MqTopic4ModifySysConfig extends ActiveMQTopic{ + + @Autowired private SysConfigService sysConfigService; + + public MqTopic4ModifySysConfig(){ + super(CS.MQ.TOPIC_MODIFY_SYS_CONFIG); + } + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.TOPIC_MODIFY_SYS_CONFIG, containerFactory = "jmsListenerContainer") + public void receive(String msg) { + + log.info("成功接收更新系统配置的订阅通知, msg={}", msg); + sysConfigService.initDBConfig(msg); + log.info("系统配置静态属性已重置"); + } + + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationEntryPoint.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationEntryPoint.java new file mode 100644 index 0000000000000000000000000000000000000000..496ecd4fb2acdd9b116aafb2df3a99740ef0d9d2 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationEntryPoint.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.secruity; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.Serializable; + +/* + * 用户身份认证失败处理类 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:11 + */ +@Component +public class JeeAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { + + @Override + public void commence(HttpServletRequest request, + HttpServletResponse response, + AuthenticationException authException) throws IOException { + // This is invoked when user tries to access a secured REST resource without supplying any credentials + // We should just send a 401 Unauthorized response because there is no 'login page' to redirect to + + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); + + //返回json形式的错误信息 +// response.setCharacterEncoding("UTF-8"); +// response.setContentType("application/json"); +// response.getWriter().println("{\"code\":1001, \"msg\":\"Unauthorized\"}"); + response.getWriter().flush(); + + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationTokenFilter.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationTokenFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..f0d0123e7a1879a0138b3e2d523002cab941cdd4 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeAuthenticationTokenFilter.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.secruity; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.jwt.JWTPayload; +import com.jeequan.jeepay.core.jwt.JWTUtils; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.mch.config.SystemYmlConfig; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.web.filter.OncePerRequestFilter; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + *

Title: JwtAuthenticationTokenFilter.java + *

Description: + * spring security框架中验证组件的前置过滤器; + * 用于验证token有效期,并放置ContextAuthentication信息,为后续spring security框架验证提供数据; + * 避免使用@Component等bean自动装配注解:@Component会将filter被spring实例化为web容器的全局filter,导致重复过滤。 + * @modify terrfly + * @version V1.0 + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + *

+ */ +public class JeeAuthenticationTokenFilter extends OncePerRequestFilter { + + @Override + protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { + + JeeUserDetails jeeUserDetails = commonFilter(request); + + if(jeeUserDetails == null){ + chain.doFilter(request, response); + return; + } + + //将信息放置到Spring-security context中 + UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(jeeUserDetails, null, jeeUserDetails.getAuthorities()); + authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); + SecurityContextHolder.getContext().setAuthentication(authentication); + chain.doFilter(request, response); + } + + + private JeeUserDetails commonFilter(HttpServletRequest request){ + + + String authToken = request.getHeader(CS.ACCESS_TOKEN_NAME); + if(StringUtils.isEmpty(authToken)){ + authToken = request.getParameter(CS.ACCESS_TOKEN_NAME); + } + if(StringUtils.isEmpty(authToken)){ + return null; //放行,并交给UsernamePasswordAuthenticationFilter进行验证,返回公共错误信息. + } + + JWTPayload jwtPayload = JWTUtils.parseToken(authToken, SpringBeansUtil.getBean(SystemYmlConfig.class).getJwtSecret()); //反解析token信息 + //token字符串解析失败 + if( jwtPayload == null || StringUtils.isEmpty(jwtPayload.getCacheKey())) { + return null; + } + + //根据用户名查找数据库 + JeeUserDetails jwtBaseUser = RedisUtil.getObject(jwtPayload.getCacheKey(), JeeUserDetails.class); + if(jwtBaseUser == null){ + RedisUtil.del(jwtPayload.getCacheKey()); + return null; //数据库查询失败,删除redis + } + + //续签时间 + RedisUtil.expire(jwtPayload.getCacheKey(), CS.TOKEN_TIME); + + return jwtBaseUser; + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeUserDetailsServiceImpl.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeUserDetailsServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..5e28698118afdb52b6cb532a3518cea4cb2ae184 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/JeeUserDetailsServiceImpl.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.secruity; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.entity.SysUserAuth; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.impl.SysUserAuthService; +import com.jeequan.jeepay.service.impl.SysUserService; +import com.jeequan.jeepay.core.utils.RegKit; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.stereotype.Service; + +/** + * UserDetailsService实现类 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Service +public class JeeUserDetailsServiceImpl implements UserDetailsService { + + @Autowired + private SysUserService sysUserService; + + @Autowired + private SysUserAuthService sysUserAuthService; + + /** + * + * 此函数为: authenticationManager.authenticate(upToken) 内部调用 ; + * 需返回 用户信息载体 / 用户密码 。 + * 用户角色+权限的封装集合 (暂时不查询, 在验证通过后再次查询,避免用户名密码输入有误导致查询资源浪费) + * + * **/ + @Override + public UserDetails loadUserByUsername(String loginUsernameStr) throws UsernameNotFoundException { + + //登录方式, 默认为账号密码登录 + Byte identityType = CS.AUTH_TYPE.LOGIN_USER_NAME; + if(RegKit.isMobile(loginUsernameStr)){ + identityType = CS.AUTH_TYPE.TELPHONE; //手机号登录 + } + + //首先根据登录类型 + 用户名得到 信息 + SysUserAuth auth = sysUserAuthService.selectByLogin(loginUsernameStr, identityType, CS.SYS_TYPE.MCH); + + if(auth == null){ //没有该用户信息 + throw new BizException("用户名/密码错误!"); + } + + //用户ID + Long userId = auth.getUserId(); + + SysUser sysUser = sysUserService.getById(userId); + + if (sysUser == null) { + throw new BizException("用户名/密码错误!"); + } + + if(CS.PUB_USABLE != sysUser.getState()){ //状态不合法 + throw new BizException("用户状态不可登录,请联系管理员!"); + } + + return new JeeUserDetails(sysUser, auth.getCredential()); + + } +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/WebSecurityConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/WebSecurityConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..3889a297db071a4a1cc3ad8a811386c8ef0f0216 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/secruity/WebSecurityConfig.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.secruity; + +import com.jeequan.jeepay.mch.config.SystemYmlConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +/* + * Spring Security 配置项 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:11 + */ +@Configuration +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) //开启@PreAuthorize @PostAuthorize 等前置后置安全校验注解 +public class WebSecurityConfig extends WebSecurityConfigurerAdapter{ + + @Autowired private UserDetailsService userDetailsService; + @Autowired private JeeAuthenticationEntryPoint unauthorizedHandler; + @Autowired private SystemYmlConfig systemYmlConfig; + + @Bean + @Override + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + + + /** + * 使用BCrypt强哈希函数 实现PasswordEncoder + * **/ + @Bean + public PasswordEncoder passwordEncoder() { + return new BCryptPasswordEncoder(); + } + + @Autowired + public void configureAuthentication(AuthenticationManagerBuilder authenticationManagerBuilder) throws Exception { + authenticationManagerBuilder + .userDetailsService(this.userDetailsService) + .passwordEncoder(passwordEncoder()); + } + + /** 允许跨域请求 **/ + @Bean + public CorsFilter corsFilter() { + + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + if(systemYmlConfig.getAllowCors()){ + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); //带上cookie信息 +// config.addAllowedOrigin(CorsConfiguration.ALL); //允许跨域的域名, *表示允许任何域名使用 + config.addAllowedOriginPattern(CorsConfiguration.ALL); //使用addAllowedOriginPattern 避免出现 When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead. + config.addAllowedHeader(CorsConfiguration.ALL); //允许任何请求头 + config.addAllowedMethod(CorsConfiguration.ALL); //允许任何方法(post、get等) + source.registerCorsConfiguration("/**", config); // CORS 配置对所有接口都有效 + } + return new CorsFilter(source); + } + + @Override + protected void configure(HttpSecurity httpSecurity) throws Exception { + httpSecurity + // 由于使用的是JWT,我们这里不需要csrf + .csrf().disable() + + .cors().and() + + // 认证失败处理方式 + .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() + + // 基于token,所以不需要session + .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() + + .authorizeRequests() + + // 除上面外的所有请求全部需要鉴权认证 + .anyRequest().authenticated(); + + // 添加JWT filter + httpSecurity.addFilterBefore(new JeeAuthenticationTokenFilter(), UsernamePasswordAuthenticationFilter.class); + + // 禁用缓存 + httpSecurity.headers().cacheControl(); + } + + @Override + public void configure(WebSecurity web) throws Exception { + //ignore文件 : 无需进入spring security 框架 + // 1.允许对于网站静态资源的无授权访问 + // 2.对于获取token的rest api要允许匿名访问 + web.ignoring().antMatchers( + HttpMethod.GET, + "/", + "/*.html", + "/favicon.ico", + "/**/*.html", + "/**/*.css", + "/**/*.js", + "/**/*.png", + "/**/*.jpg", + "/**/*.jpeg", + "/**/*.svg", + "/**/*.ico", + "/**/*.webp", + "/*.txt", + "/**/*.xls", + "/**/*.mp4" //支持mp4格式的文件匿名访问 + ) + .antMatchers( + "/api/anon/**" //匿名访问接口 + ); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/service/AuthService.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/service/AuthService.java new file mode 100644 index 0000000000000000000000000000000000000000..769677b7090d97a8e1b3f60de8684b22b8c95d5a --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/service/AuthService.java @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.service; + +import cn.hutool.core.util.IdUtil; +import com.jeequan.jeepay.core.cache.ITokenService; +import com.jeequan.jeepay.core.cache.RedisUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.jwt.JWTPayload; +import com.jeequan.jeepay.core.jwt.JWTUtils; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.mch.config.SystemYmlConfig; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.SysRoleEntRelaService; +import com.jeequan.jeepay.service.impl.SysRoleService; +import com.jeequan.jeepay.service.impl.SysUserService; +import com.jeequan.jeepay.service.mapper.SysEntitlementMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.*; + +/** + * 认证Service + * + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Service +public class AuthService { + + @Resource + private AuthenticationManager authenticationManager; + + @Autowired private SysUserService sysUserService; + @Autowired private SysRoleService sysRoleService; + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + @Autowired private MchInfoService mchInfoService; + @Autowired private SysEntitlementMapper sysEntitlementMapper; + @Autowired private SystemYmlConfig systemYmlConfig; + + /** + * 认证 + * **/ + public String auth(String username, String password){ + + //1. 生成spring-security usernamePassword类型对象 + UsernamePasswordAuthenticationToken upToken = new UsernamePasswordAuthenticationToken(username, password); + + //spring-security 自动认证过程; + // 1. 进入 JeeUserDetailsServiceImpl.loadUserByUsername 获取用户基本信息; + //2. SS根据UserDetails接口验证是否用户可用; + //3. 最后返回loadUserByUsername 封装的对象信息; + Authentication authentication = null; + try { + authentication = authenticationManager.authenticate(upToken); + } catch (AuthenticationException e) { + throw new BizException("用户名或密码有误!"); + } + JeeUserDetails jeeUserDetails = (JeeUserDetails) authentication.getPrincipal(); + + //验证通过后 再查询用户角色和权限信息集合 + + SysUser sysUser = jeeUserDetails.getSysUser(); + + //非超级管理员 && 不包含左侧菜单 进行错误提示 + if(sysUser.getIsAdmin() != CS.YES && sysEntitlementMapper.userHasLeftMenu(sysUser.getSysUserId(), CS.SYS_TYPE.MGR) <= 0){ + throw new BizException("当前用户未分配任何菜单权限,请联系管理员进行分配后再登录!"); + } + + // 查询当前用户的商户信息 + MchInfo mchInfo = mchInfoService.getById(sysUser.getBelongInfoId()); + if (mchInfo != null) { + // 判断当前商户状态是否可用 + if (mchInfo.getState() == CS.NO) { + throw new BizException("当前商户状态不可用!"); + } + } + // 放置权限集合 + jeeUserDetails.setAuthorities(getUserAuthority(sysUser)); + + //生成token + String cacheKey = CS.getCacheKeyToken(sysUser.getSysUserId(), IdUtil.fastUUID()); + + //生成iToken 并放置到缓存 + ITokenService.processTokenCache(jeeUserDetails, cacheKey); //处理token 缓存信息 + + //将信息放置到Spring-security context中 + UsernamePasswordAuthenticationToken authenticationRest = new UsernamePasswordAuthenticationToken(jeeUserDetails, null, jeeUserDetails.getAuthorities()); + SecurityContextHolder.getContext().setAuthentication(authenticationRest); + + //返回JWTToken + return JWTUtils.generateToken(new JWTPayload(jeeUserDetails), systemYmlConfig.getJwtSecret()); + } + + /** 根据用户ID 更新缓存中的权限集合, 使得分配实时生效 **/ + public void refAuthentication(List sysUserIdList){ + + if(sysUserIdList == null || sysUserIdList.isEmpty()){ + return ; + } + + Map sysUserMap = new HashMap<>(); + + // 查询 sysUserId 和 state + sysUserService.list( + SysUser.gw() + .select(SysUser::getSysUserId, SysUser::getState) + .in(SysUser::getSysUserId, sysUserIdList) + ).stream().forEach(item -> sysUserMap.put(item.getSysUserId(), item)); + + for (Long sysUserId : sysUserIdList) { + + Collection cacheKeyList = RedisUtil.keys(CS.getCacheKeyToken(sysUserId, "*")); + if(cacheKeyList == null || cacheKeyList.isEmpty()){ + continue; + } + + for (String cacheKey : cacheKeyList) { + + //用户不存在 || 已禁用 需要删除Redis + if(sysUserMap.get(sysUserId) == null || sysUserMap.get(sysUserId).getState() == CS.PUB_DISABLE){ + RedisUtil.del(cacheKey); + continue; + } + + JeeUserDetails jwtBaseUser = RedisUtil.getObject(cacheKey, JeeUserDetails.class); + if(jwtBaseUser == null){ + continue; + } + + // 重新放置sysUser对象 + jwtBaseUser.setSysUser(sysUserService.getById(sysUserId)); + + //查询放置权限数据 + jwtBaseUser.setAuthorities(getUserAuthority(jwtBaseUser.getSysUser())); + + //保存token 失效时间不变 + RedisUtil.set(cacheKey, jwtBaseUser); + } + } + + } + + public List getUserAuthority(SysUser sysUser){ + + //用户拥有的角色集合 需要以ROLE_ 开头, 用户拥有的权限集合 + List roleList = sysRoleService.findListByUser(sysUser.getSysUserId()); + List entList = sysRoleEntRelaService.selectEntIdsByUserId(sysUser.getSysUserId(), sysUser.getIsAdmin(), sysUser.getSystem()); + + List grantedAuthorities = new LinkedList<>(); + roleList.stream().forEach(role -> grantedAuthorities.add(new SimpleGrantedAuthority(role))); + entList.stream().forEach(ent -> grantedAuthorities.add(new SimpleGrantedAuthority(ent))); + return grantedAuthorities; + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResBodyAdvice.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResBodyAdvice.java new file mode 100644 index 0000000000000000000000000000000000000000..8302f75b71469a1b0cc346a579909fca6e6043f2 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResBodyAdvice.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.web; + +import com.jeequan.jeepay.core.utils.ApiResBodyAdviceKit; +import org.springframework.core.MethodParameter; +import org.springframework.http.MediaType; +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; + +/** + * 自定义springMVC返回数据格式 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@ControllerAdvice +public class ApiResBodyAdvice implements ResponseBodyAdvice { + + /** 判断哪些需要拦截 **/ + @Override + public boolean supports(MethodParameter returnType, Class converterType) { + return true; + } + + /** 拦截返回数据处理 */ + @Override + public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, + Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { + + //处理扩展字段 + return ApiResBodyAdviceKit.beforeBodyWrite(body); + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResInterceptor.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResInterceptor.java new file mode 100644 index 0000000000000000000000000000000000000000..44b1b181387350941b6d2ec41456b91506f06a3a --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApiResInterceptor.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.web; + +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * 数据响应拦截器 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +public class ApiResInterceptor implements HandlerInterceptor { + + /** postHandler是在请求结束之后, 视图渲染之前执行的,但只有preHandle方法返回true的时候才会执行 + * 如果ctrl使用了@RestController或者@ResponseBody注解 则ModelAndView = null, 因为不走视图转换器, 而是走的RequestResponseBodyMethodProcessor。 + * ———————————————— + * + * **/ + @Override + public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { + + //do + } + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApplicationContextKit.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApplicationContextKit.java new file mode 100644 index 0000000000000000000000000000000000000000..d4572ccd661070dcc45b5b247a9b8aec5226832a --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/ApplicationContextKit.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.web; + +import org.springframework.beans.factory.InitializingBean; +import org.springframework.stereotype.Service; +import org.springframework.web.context.ServletContextAware; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; + +/** + * 上下文配置 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Service +public class ApplicationContextKit implements ServletContextAware,InitializingBean{ + + private ServletContext servletContext ; + @Override + public void setServletContext(ServletContext servletContext) { + + this.servletContext = servletContext; + } + + /** + * afterPropertiesSet 是在什么之后执行? 启动顺序是? + * 调用PropKit(SpringBeansUtil.getBean获取方式) 会不会出现找不到bean的问题? + * + * */ + @Override + public void afterPropertiesSet() throws Exception { + + } + + /** + * 仅在项目启动完成,并且在req请求中使用!! + * @param key + * @return + */ + public static Object getReqSession(String key){ + + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + return request.getSession().getAttribute(key); + + } + + /** + * 仅在项目启动完成,并且在req请求中使用!! + * @param key + * @return + */ + public static void clearSession(String key){ + + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + + request.getSession().removeAttribute(key); + + } + + +} diff --git a/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/WebmvcConfig.java b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/WebmvcConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..c1225756344cfea9e5bfdef31d163f98d9e3d889 --- /dev/null +++ b/jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/web/WebmvcConfig.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.mch.web; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * webmvc配置 + * + * @author terrfly + * @modify zhuxiao + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Configuration +public class WebmvcConfig implements WebMvcConfigurer { + + @Autowired + private ApiResInterceptor apiResInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(apiResInterceptor); + } +} diff --git a/jeepay-merchant/src/main/resources/application.yml b/jeepay-merchant/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..f57e287be95e03c167a271783e944cdb8d078dd1 --- /dev/null +++ b/jeepay-merchant/src/main/resources/application.yml @@ -0,0 +1,76 @@ +server: + port: 9218 #设置端口为 9218 + servlet: + context-path: / #设置应用的目录. 前缀需要带/, 无需设置后缀, 示例 【 /xxx 】 or 【 / 】 +spring: + mvc: + servlet: + multipart: + enabled: true #是否启用http上传处理 + max-request-size: 10MB #最大请求文件的大小 + max-file-size: 10MB #设置单个文件最大长度 + resources: + static-locations: classpath:/static #项目静态资源路径 (可直接通过http访问) + freemarker: + template-loader-path: classpath:/templates #freemarker模板目录 + template-encoding: UTF-8 + suffix: .ftl + settings: + classic_compatible: true # 如果变量为null,转化为空字符串,比如做比较的时候按照空字符做比较 + number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: root + password: root + druid: + # 连接池配置项 + initial-size: 5 #初始化时建立物理连接的个数 + min-idle: 5 #最小连接池数量 + max-active: 30 #最大连接池数量 + max-wait: 60000 #获取连接时最大等待时间,单位毫秒 + # 检测相关 + test-while-idle: true # 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 + test-on-borrow: false # 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + test-on-return: false # 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + min-evictable-idle-time-millis: 300000 #连接保持空闲而不被驱逐的最小时间 + validation-query: SELECT 1 FROM DUAL + # 是否缓存preparedStatement + pool-prepared-statements: false # 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 + max-pool-prepared-statement-per-connection-size: 20 # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。 + # 配置监控统计拦截的filters,去掉后监控界面sql无法统计 通过connectProperties属性来打开mergeSql功能;慢SQL记录 + filters: stat,wall + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + cache: + type: redis + redis: + host: 127.0.0.1 + port: 6379 + timeout: 1000 + database: 2 #1库:运营平台 #2库:商户系统 #3库:支付网关 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + +#日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: E:/logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: true #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + jwt-secret: ARNXp4MzjOOQqxtv #生成jwt的秘钥。 要求每个系统有单独的秘钥管理机制。 + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + public-path: ${isys.oss-file.root-path}/pubic #公共读取块 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) + private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) + diff --git a/jeepay-merchant/src/main/resources/banner.txt b/jeepay-merchant/src/main/resources/banner.txt new file mode 100644 index 0000000000000000000000000000000000000000..3332e85c43819ca4183c57b3c15d45c760e63ed7 --- /dev/null +++ b/jeepay-merchant/src/main/resources/banner.txt @@ -0,0 +1,9 @@ + __ + / /___ ___ ____ ____ ___ __ + __ / // _ \/ _ \/ __ \/ __ `/ / / / +/ /_/ // __/ __/ /_/ / /_/ / /_/ / +\____/ \___/\___/ .___/\__,_/\__, / + /_/ /____/ + :: Jeepay :: (v1.0.0.RELEASE) + 适合互联网企业使用的开源支付系统 : https://www.jeepay.vip + \ No newline at end of file diff --git a/jeepay-merchant/src/main/resources/logback-spring.xml b/jeepay-merchant/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000000000000000000000000000000000..e9029375327df83c1bd56965945f6e7c610f6c9c --- /dev/null +++ b/jeepay-merchant/src/main/resources/logback-spring.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + ${currentLoggerPattern} + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.%d{yyyy-MM-dd}.log + 10 + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.%d{yyyy-MM-dd}.log + 20 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + diff --git a/jeepay-merchant/src/main/resources/static/index.html b/jeepay-merchant/src/main/resources/static/index.html new file mode 100644 index 0000000000000000000000000000000000000000..7879e1ce9fd77d4d90054013725af5137e8ef31a --- /dev/null +++ b/jeepay-merchant/src/main/resources/static/index.html @@ -0,0 +1,4 @@ + + + + diff --git a/jeepay-merchant/src/test/java/.gitkeep b/jeepay-merchant/src/test/java/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-merchant/src/test/resources/.gitkeep b/jeepay-merchant/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-payment/pom.xml b/jeepay-payment/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..3c95da334e2a0f7fef5ba97e6f5d680910c1740d --- /dev/null +++ b/jeepay-payment/pom.xml @@ -0,0 +1,123 @@ + + + 4.0.0 + + com.jeequan + jeepay-payment + jar + ${isys.version} + Jeepay计全支付系统 [统一支付网关] + https://www.jeequan.com + + + com.jeequan + jeepay + 1.0.0 + + + + + + + com.jeequan + jeepay-service + ${isys.version} + + + + + org.springframework.boot + spring-boot-starter-web + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + com.fasterxml.jackson.module + jackson-module-parameter-names + + + + + + + org.springframework.boot + spring-boot-starter-freemarker + + + + + org.hibernate.validator + hibernate-validator + + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + + org.springframework.boot + spring-boot-starter-activemq + + + + + com.github.binarywang + weixin-java-pay + + + + com.github.binarywang + weixin-java-mp + + + + + com.google.zxing + core + + + com.google.zxing + javase + + + + + com.alipay.sdk + alipay-sdk-java + + + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + maven-resources-plugin + + + + + + + diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/InitRunner.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/InitRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..20500d5849146722dd718be25fa27da30a8d1fbe --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/InitRunner.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.bootstrap; + +import cn.hutool.core.date.DatePattern; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.SerializeConfig; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.alibaba.fastjson.serializer.SimpleDateFormatSerializer; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/* + * 项目初始化操作 + * 比如初始化配置文件, 读取基础数据, 资源初始化等。 避免在Main函数中写业务代码。 + * CommandLineRunner / ApplicationRunner都可以达到要求, 只是调用参数有所不同。 + * +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:17 +*/ +@Component +public class InitRunner implements CommandLineRunner { + + + @Override + public void run(String... args) throws Exception { + + //初始化处理fastjson格式 + SerializeConfig serializeConfig = SerializeConfig.getGlobalInstance(); + serializeConfig.put(Date.class, new SimpleDateFormatSerializer(DatePattern.NORM_DATETIME_PATTERN)); + + //解决json 序列化时候的 $ref:问题 + JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask(); + + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/JeepayPayApplication.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/JeepayPayApplication.java new file mode 100644 index 0000000000000000000000000000000000000000..90090bce749e2fa2d5d59c9970fc7447cebd46b9 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/bootstrap/JeepayPayApplication.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.bootstrap; + +import com.alibaba.fastjson.support.config.FastJsonConfig; +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; +import com.jeequan.jeepay.pay.config.SystemYmlConfig; +import org.hibernate.validator.HibernateValidator; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.MediaType; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import javax.validation.Validation; +import javax.validation.Validator; +import javax.validation.ValidatorFactory; +import java.util.Arrays; + +/** + * @Author terrfly + * @Date 2019/11/7 15:19 + * @Description spring-boot 主启动程序 + **/ +@SpringBootApplication +@EnableScheduling +@MapperScan("com.jeequan.jeepay.service.mapper") //Mybatis mapper接口路径 +@ComponentScan(basePackages = "com.jeequan.jeepay.*") //由于MainApplication没有在项目根目录, 需要配置basePackages属性使得成功扫描所有Spring组件; +@Configuration +public class JeepayPayApplication { + + @Autowired private SystemYmlConfig systemYmlConfig; + + /** main启动函数 **/ + public static void main(String[] args) { + + //启动项目 + SpringApplication.run(JeepayPayApplication.class, args); + + } + + + /** fastJson 配置信息 **/ + @Bean + public HttpMessageConverters fastJsonConfig(){ + + //新建fast-json转换器 + FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); + + //fast-json 配置信息 + FastJsonConfig config = new FastJsonConfig(); + config.setDateFormat("yyyy-MM-dd HH:mm:ss"); + converter.setFastJsonConfig(config); + + //设置响应的 Content-Type + converter.setSupportedMediaTypes(Arrays.asList(new MediaType[]{MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON_UTF8})); + return new HttpMessageConverters(converter); + } + + /** Mybatis plus 分页插件 **/ + @Bean + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); + // 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false + // paginationInterceptor.setOverflow(false); + // 设置最大单页限制数量,默认 500 条,-1 不受限制 + // paginationInterceptor.setLimit(500); + return paginationInterceptor; + } + + /** 默认为 失败快速返回模式 **/ + @Bean + public Validator validator(){ + + ValidatorFactory validatorFactory = Validation.byProvider( HibernateValidator.class ) + .configure() + .failFast( true ) + .buildValidatorFactory(); + return validatorFactory.getValidator(); + } + + /** 允许跨域请求 **/ + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + + if(systemYmlConfig.getAllowCors()){ + CorsConfiguration config = new CorsConfiguration(); + config.setAllowCredentials(true); //带上cookie信息 +// config.addAllowedOrigin(CorsConfiguration.ALL); //允许跨域的域名, *表示允许任何域名使用 + config.addAllowedOriginPattern(CorsConfiguration.ALL); //使用addAllowedOriginPattern 避免出现 When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead. + config.addAllowedHeader(CorsConfiguration.ALL); //允许任何请求头 + config.addAllowedMethod(CorsConfiguration.ALL); //允许任何方法(post、get等) + source.registerCorsConfiguration("/**", config); // CORS 配置对所有接口都有效 + } + return new CorsFilter(source); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractChannelNoticeService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractChannelNoticeService.java new file mode 100644 index 0000000000000000000000000000000000000000..fe27a57bd2f15ad0516d2b92209a4b36cb6d03af --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractChannelNoticeService.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.beans.RequestKitBean; +import com.jeequan.jeepay.pay.util.ChannelCertConfigKitBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; + +import javax.servlet.http.HttpServletRequest; +import java.io.File; + +/* +* 实现回调接口抽象类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:18 +*/ +public abstract class AbstractChannelNoticeService implements IChannelNoticeService { + + @Autowired private RequestKitBean requestKitBean; + @Autowired private ChannelCertConfigKitBean channelCertConfigKitBean; + + @Override + public ResponseEntity doNotifyOrderNotExists(HttpServletRequest request) { + return textResp("order not exists"); + } + + @Override + public ResponseEntity doNotifyOrderStateUpdateFail(HttpServletRequest request) { + return textResp("update status error"); + } + + /** 文本类型的响应数据 **/ + protected ResponseEntity textResp(String text){ + + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.TEXT_HTML); + return new ResponseEntity(text, httpHeaders, HttpStatus.OK); + } + + /** json类型的响应数据 **/ + protected ResponseEntity jsonResp(Object body){ + + HttpHeaders httpHeaders = new HttpHeaders(); + httpHeaders.setContentType(MediaType.APPLICATION_JSON); + return new ResponseEntity(body, httpHeaders, HttpStatus.OK); + } + + + /**request.getParameter 获取参数 并转换为JSON格式 **/ + protected JSONObject getReqParamJSON() { + return requestKitBean.getReqParamJSON(); + } + + /** 获取文件路径 **/ + protected String getCertFilePath(String certFilePath) { + return channelCertConfigKitBean.getCertFilePath(certFilePath); + } + + /** 获取文件File对象 **/ + protected File getCertFile(String certFilePath) { + return channelCertConfigKitBean.getCertFile(certFilePath); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractPaymentService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractPaymentService.java new file mode 100644 index 0000000000000000000000000000000000000000..0fc9a0842f71052a913fed50f97669a0ba426e92 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/AbstractPaymentService.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + + +import com.jeequan.jeepay.pay.util.ChannelCertConfigKitBean; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.springframework.beans.factory.annotation.Autowired; + +/* +* 支付接口抽象类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:18 +*/ +public abstract class AbstractPaymentService implements IPaymentService{ + + @Autowired protected SysConfigService sysConfigService; + @Autowired protected ChannelCertConfigKitBean channelCertConfigKitBean; + + protected String getNotifyUrl(){ + return sysConfigService.getDBApplicationConfig().getPaySiteUrl() + "/api/pay/notify/" + getIfCode(); + } + + protected String getNotifyUrl(String payOrderId){ + return sysConfigService.getDBApplicationConfig().getPaySiteUrl() + "/api/pay/notify/" + getIfCode() + "/" + payOrderId; + } + + protected String getReturnUrl(){ + return sysConfigService.getDBApplicationConfig().getPaySiteUrl() + "/api/pay/return/" + getIfCode(); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelNoticeService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelNoticeService.java new file mode 100644 index 0000000000000000000000000000000000000000..faa42566c97b8b39df315206d8b1b8699fcecc1e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelNoticeService.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.http.ResponseEntity; + +import javax.servlet.http.HttpServletRequest; + +/* +* 渠道侧的通知解析实现 【分为同步跳转(doReturn)和异步回调(doNotify) 】 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/8 15:14 +*/ +public interface IChannelNoticeService { + + /** 通知类型 **/ + enum NoticeTypeEnum { + DO_RETURN, //同步跳转 + DO_NOTIFY //异步回调 + } + + /* 获取到接口code **/ + String getIfCode(); + + /** 解析参数: 订单号 和 请求参数 + * 异常需要自行捕捉,并返回null , 表示已响应数据。 + * **/ + MutablePair parseParams(HttpServletRequest request, String urlOrderId, NoticeTypeEnum noticeTypeEnum); + + /** 返回需要更新的订单状态 和响应数据 **/ + ChannelRetMsg doNotice(HttpServletRequest request, + Object params, PayOrder payOrder, MchConfigContext mchConfigContext, NoticeTypeEnum noticeTypeEnum); + + /** 数据库订单 状态更新异常 (仅异步通知使用) **/ + ResponseEntity doNotifyOrderStateUpdateFail(HttpServletRequest request); + + /** 数据库订单数据不存在 (仅异步通知使用) **/ + ResponseEntity doNotifyOrderNotExists(HttpServletRequest request); + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelUserService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..99f03b469f974eb738de15fd814149cc18bf0b0f --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IChannelUserService.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.pay.model.MchConfigContext; + +/* +* @Description: 301方式获取渠道侧用户ID, 如微信openId 支付宝的userId等 +* @author terrfly +* @date 2021/5/2 15:10 +*/ +public interface IChannelUserService { + + /* 获取到接口code **/ + String getIfCode(); + + /** 获取重定向地址 **/ + String buildUserRedirectUrl(String callbackUrlEncode, MchConfigContext mchConfigContext); + + /** 获取渠道用户ID **/ + String getChannelUserId(JSONObject reqParams, MchConfigContext mchConfigContext); + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPayOrderQueryService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPayOrderQueryService.java new file mode 100644 index 0000000000000000000000000000000000000000..6093a97f1ec0945803ccc97c3f313bd2c4ab99c6 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPayOrderQueryService.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.model.MchConfigContext; + +/* +* 查单(渠道侧)接口定义 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/19 15:16 +*/ +public interface IPayOrderQueryService { + + /* 获取到接口code **/ + String getIfCode(); + + /** 查询订单 **/ + ChannelRetMsg query(PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPaymentService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPaymentService.java new file mode 100644 index 0000000000000000000000000000000000000000..6e8cf9af3cd622e98a0fabbd9b327683c473d73b --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/IPaymentService.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel; + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.model.MchConfigContext; + +/* +* 调起上游渠道侧支付接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/5/8 15:13 +*/ +public interface IPaymentService { + + /* 获取到接口code **/ + String getIfCode(); + + /** 是否支持该支付方式 */ + boolean isSupport(String wayCode); + + /** 前置检查如参数等信息是否符合要求, 返回错误信息或直接抛出异常即可 */ + String preCheck(UnifiedOrderRQ bizRQ, PayOrder payOrder); + + /** 调起支付接口,并响应数据; 内部处理普通商户和服务商模式 **/ + AbstractRS pay(UnifiedOrderRQ bizRQ, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelNoticeService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelNoticeService.java new file mode 100644 index 0000000000000000000000000000000000000000..541da3a797e0ae935ece474f4c52eb7cb655807e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelNoticeService.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay; + +import com.alibaba.fastjson.JSONObject; +import com.alipay.api.internal.util.AlipaySignature; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.ResponseException; +import com.jeequan.jeepay.core.model.params.alipay.AlipayConfig; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; +import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; +import com.jeequan.jeepay.pay.channel.AbstractChannelNoticeService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; +import java.util.Map; + +/* +* 支付宝 回调接口实现类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:20 +*/ +@Service +@Slf4j +public class AlipayChannelNoticeService extends AbstractChannelNoticeService { + + + @Override + public String getIfCode() { + return CS.IF_CODE.ALIPAY; + } + + @Override + public MutablePair parseParams(HttpServletRequest request, String urlOrderId, NoticeTypeEnum noticeTypeEnum) { + + try { + + JSONObject params = getReqParamJSON(); + String payOrderId = params.getString("out_trade_no"); + return MutablePair.of(payOrderId, params); + + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + + + + @Override + public ChannelRetMsg doNotice(HttpServletRequest request, Object params, PayOrder payOrder, MchConfigContext mchConfigContext, NoticeTypeEnum noticeTypeEnum) { + try { + + //配置参数获取 + Byte useCert = null; + String alipaySignType, alipayPublicCert, alipayPublicKey = null; + if(mchConfigContext.isIsvsubMch()){ + + // 获取支付参数 + AlipayIsvParams alipayParams = mchConfigContext.getIsvConfigContext().getIsvParamsByIfCode(getIfCode(), AlipayIsvParams.class); + useCert = alipayParams.getUseCert(); + alipaySignType = alipayParams.getSignType(); + alipayPublicCert = alipayParams.getAlipayPublicCert(); + alipayPublicKey = alipayParams.getAlipayPublicKey(); + + }else{ + + // 获取支付参数 + AlipayNormalMchParams alipayParams = mchConfigContext.getNormalMchParamsByIfCode(getIfCode(), AlipayNormalMchParams.class); + useCert = alipayParams.getUseCert(); + alipaySignType = alipayParams.getSignType(); + alipayPublicCert = alipayParams.getAlipayPublicCert(); + alipayPublicKey = alipayParams.getAlipayPublicKey(); + } + + // 获取请求参数 + JSONObject jsonParams = (JSONObject) params; + + boolean verifyResult; + if(useCert != null && useCert == CS.YES){ //证书方式 + + verifyResult = AlipaySignature.rsaCertCheckV1(jsonParams.toJavaObject(Map.class), getCertFilePath(alipayPublicCert), + AlipayConfig.CHARSET, alipaySignType); + + }else{ + verifyResult = AlipaySignature.rsaCheckV1(jsonParams.toJavaObject(Map.class), alipayPublicKey, AlipayConfig.CHARSET, alipaySignType); + } + + //验签失败 + if(!verifyResult){ + throw ResponseException.buildText("ERROR"); + } + + //验签成功后判断上游订单状态 + ResponseEntity okResponse = textResp("SUCCESS"); + + ChannelRetMsg result = new ChannelRetMsg(); + result.setChannelOrderId(jsonParams.getString("trade_no")); //渠道订单号 + result.setChannelUserId(jsonParams.getString("buyer_id")); //支付用户ID + result.setResponseEntity(okResponse); //响应数据 + + result.setChannelState(ChannelRetMsg.ChannelState.WAITING); // 默认支付中 + + if("TRADE_SUCCESS".equals(jsonParams.getString("trade_status"))){ + result.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + + }else if("TRADE_CLOSED".equals(jsonParams.getString("trade_status"))){ + result.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + + } + + return result; + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelUserService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..457e74803ce256ed09a414dbd16ba801c1500d1c --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayChannelUserService.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay; + +import com.alibaba.fastjson.JSONObject; +import com.alipay.api.request.AlipaySystemOauthTokenRequest; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.alipay.AlipayConfig; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; +import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; +import com.jeequan.jeepay.pay.channel.IChannelUserService; +import com.jeequan.jeepay.pay.exception.ChannelException; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/* +* 支付宝: 获取用户ID实现类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:21 +*/ +@Service +@Slf4j +public class AlipayChannelUserService implements IChannelUserService { + + + @Override + public String getIfCode() { + return CS.IF_CODE.ALIPAY; + } + + @Override + public String buildUserRedirectUrl(String callbackUrlEncode, MchConfigContext mchConfigContext) { + + String oauthUrl = AlipayConfig.PROD_OAUTH_URL; + String appId = null; + + if(mchConfigContext.isIsvsubMch()){ + AlipayIsvParams isvParams = mchConfigContext.getIsvConfigContext().getIsvParamsByIfCode(getIfCode(), AlipayIsvParams.class); + appId = isvParams.getAppId(); + }else{ + //获取商户配置信息 + AlipayNormalMchParams normalMchParams = mchConfigContext.getNormalMchParamsByIfCode(getIfCode(), AlipayNormalMchParams.class); + appId = normalMchParams.getAppId(); + if(normalMchParams.getSandbox() != null && normalMchParams.getSandbox() == CS.YES){ + oauthUrl = AlipayConfig.SANDBOX_OAUTH_URL; + } + } + + return String.format(oauthUrl, appId, callbackUrlEncode); + } + + @Override + public String getChannelUserId(JSONObject reqParams, MchConfigContext mchConfigContext) { + + String authCode = reqParams.getString("auth_code"); + + //通过code 换取openId + AlipaySystemOauthTokenRequest request = new AlipaySystemOauthTokenRequest(); + request.setCode(authCode); request.setGrantType("authorization_code"); + try { + return mchConfigContext.getAlipayClientWrapper().execute(request).getUserId(); + } catch (ChannelException e) { + e.printStackTrace(); + return null; + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayKit.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayKit.java new file mode 100644 index 0000000000000000000000000000000000000000..6c72323d39d942e35024746602163ea55e66523f --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayKit.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay; + +import com.alipay.api.AlipayObject; +import com.alipay.api.AlipayRequest; +import com.alipay.api.domain.*; +import com.alipay.api.request.*; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvsubMchParams; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; + +/* +* 【支付宝】支付通道工具包 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:19 +*/ +public class AlipayKit { + + + /** 放置 isv特殊信息 **/ + public static void putApiIsvInfo(MchConfigContext mchConfigContext, AlipayRequest req, AlipayObject model){ + + //不是特约商户, 无需放置此值 + if(!mchConfigContext.isIsvsubMch()){ + return ; + } + + // 获取支付参数 + AlipayIsvParams isvParams = mchConfigContext.getIsvConfigContext().getIsvParamsByIfCode(CS.IF_CODE.ALIPAY, AlipayIsvParams.class); + AlipayIsvsubMchParams isvsubMchParams = mchConfigContext.getIsvsubMchParamsByIfCode(CS.IF_CODE.ALIPAY, AlipayIsvsubMchParams.class); + + // 子商户信息 + if(req instanceof AlipayTradePayRequest) ((AlipayTradePayRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradeAppPayRequest) ((AlipayTradeAppPayRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradeCreateRequest) ((AlipayTradeCreateRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradePagePayRequest) ((AlipayTradePagePayRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradePrecreateRequest) ((AlipayTradePrecreateRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradeWapPayRequest) ((AlipayTradeWapPayRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + else if(req instanceof AlipayTradeQueryRequest) ((AlipayTradeQueryRequest)req).putOtherTextParam("app_auth_token", isvsubMchParams.getAppAuthToken()); + + + // 服务商信息 + ExtendParams extendParams = new ExtendParams(); + extendParams.setSysServiceProviderId(isvParams.getPid()); + + if(model instanceof AlipayTradePayModel) ((AlipayTradePayModel)model).setExtendParams(extendParams); + else if(model instanceof AlipayTradeAppPayModel) ((AlipayTradeAppPayModel)model).setExtendParams(extendParams); + else if(model instanceof AlipayTradeCreateModel) ((AlipayTradeCreateModel)model).setExtendParams(extendParams); + else if(model instanceof AlipayTradePagePayModel) ((AlipayTradePagePayModel)model).setExtendParams(extendParams); + else if(model instanceof AlipayTradePrecreateModel) ((AlipayTradePrecreateModel)model).setExtendParams(extendParams); + else if(model instanceof AlipayTradeWapPayModel) ((AlipayTradeWapPayModel)model).setExtendParams(extendParams); + } + + + public static String appendErrCode(String code, String subCode){ + return StringUtils.defaultIfEmpty(subCode, code); //优先: subCode + } + + public static String appendErrMsg(String msg, String subMsg){ + + if(StringUtils.isNotEmpty(msg) && StringUtils.isNotEmpty(subMsg) ){ + return msg + "【" + subMsg + "】"; + } + return StringUtils.defaultIfEmpty(subMsg, msg); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPayOrderQueryService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPayOrderQueryService.java new file mode 100644 index 0000000000000000000000000000000000000000..cac4be0b75b9892e5baced2d3c7f4d01a39766bf --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPayOrderQueryService.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay; + +import com.alipay.api.domain.AlipayTradeQueryModel; +import com.alipay.api.request.AlipayTradeQueryRequest; +import com.alipay.api.response.AlipayTradeQueryResponse; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.IPayOrderQueryService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import org.springframework.stereotype.Service; + +/* +* 支付宝 查单接口实现类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:20 +*/ +@Service +public class AlipayPayOrderQueryService implements IPayOrderQueryService { + + @Override + public String getIfCode() { + return CS.IF_CODE.ALIPAY; + } + + @Override + public ChannelRetMsg query(PayOrder payOrder, MchConfigContext mchConfigContext){ + + AlipayTradeQueryRequest req = new AlipayTradeQueryRequest(); + + // 商户订单号,商户网站订单系统中唯一订单号,必填 + AlipayTradeQueryModel model = new AlipayTradeQueryModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + req.setBizModel(model); + + //通用字段 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + AlipayTradeQueryResponse resp = mchConfigContext.getAlipayClientWrapper().execute(req); + String result = resp.getTradeStatus(); + + if("TRADE_SUCCESS".equals(result)) { + return ChannelRetMsg.confirmSuccess(resp.getTradeNo()); //支付成功 + }else if("WAIT_BUYER_PAY".equals(result)) { + return ChannelRetMsg.waiting(); //支付中 + } + return ChannelRetMsg.waiting(); //支付中 + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPaymentService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPaymentService.java new file mode 100644 index 0000000000000000000000000000000000000000..027d7657b5aaade03e1bdee286686a740cb74899 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayPaymentService.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.AbstractPaymentService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.util.PaywayUtil; +import org.springframework.stereotype.Service; + +/* +* 支付接口: 支付宝官方 +* 支付方式: 自适应 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:19 +*/ +@Service +public class AlipayPaymentService extends AbstractPaymentService { + + @Override + public String getIfCode() { + return CS.IF_CODE.ALIPAY; + } + + @Override + public boolean isSupport(String wayCode) { + return true; + } + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).preCheck(rq, payOrder); + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).pay(rq, payOrder, mchConfigContext); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliApp.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliApp.java new file mode 100644 index 0000000000000000000000000000000000000000..ffc50f90c6bc795fffbb4187b23f0695e7841d76 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliApp.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.domain.AlipayTradeAppPayModel; +import com.alipay.api.request.AlipayTradeAppPayRequest; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.exception.ChannelException; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliAppOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* +* 支付宝 APP支付 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:20 +*/ +@Service("alipayPaymentByAliAppService") //Service Name需保持全局唯一性 +public class AliApp extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext){ + + AlipayTradeAppPayRequest req = new AlipayTradeAppPayRequest(); + AlipayTradeAppPayModel model = new AlipayTradeAppPayModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + + String payData = null; + + // sdk方式需自行拦截接口异常信息 + try { + payData = mchConfigContext.getAlipayClientWrapper().getAlipayClient().sdkExecute(req).getBody(); + } catch (AlipayApiException e) { + throw ChannelException.sysError(e.getMessage()); + } + + // 构造函数响应数据 + AliAppOrderRS res = ApiResBuilder.buildSuccess(AliAppOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelAttach(payData); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + res.setPayData(payData); + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliBar.java new file mode 100644 index 0000000000000000000000000000000000000000..3ad3db1325edf56abb44ffa6d0e6b3f0a0244e30 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliBar.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.domain.AlipayTradePayModel; +import com.alipay.api.request.AlipayTradePayRequest; +import com.alipay.api.response.AlipayTradePayResponse; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliBarOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliBarOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 支付宝 条码支付 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:20 + */ +@Service("alipayPaymentByAliBarService") //Service Name需保持全局唯一性 +public class AliBar extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + AliBarOrderRQ bizRQ = (AliBarOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getAuthCode())){ + throw new BizException("用户支付条码[authCode]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext){ + + AliBarOrderRQ bizRQ = (AliBarOrderRQ) rq; + + AlipayTradePayRequest req = new AlipayTradePayRequest(); + AlipayTradePayModel model = new AlipayTradePayModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setScene("bar_code"); //条码支付 bar_code ; 声波支付 wave_code + model.setAuthCode(bizRQ.getAuthCode()); //支付授权码 + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + //调起支付宝 (如果异常, 将直接跑出 ChannelException ) + AlipayTradePayResponse alipayResp = mchConfigContext.getAlipayClientWrapper().execute(req); + + // 构造函数响应数据 + AliBarOrderRS res = ApiResBuilder.buildSuccess(AliBarOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelAttach(alipayResp.getBody()); + channelRetMsg.setChannelOrderId(alipayResp.getTradeNo()); + + // ↓↓↓↓↓↓ 调起接口成功后业务判断务必谨慎!! 避免因代码编写bug,导致不能正确返回订单状态信息 ↓↓↓↓↓↓ + + //当条码重复发起时,支付宝返回的code = 10003, subCode = null [等待用户支付], 此时需要特殊判断 = = 。 + if("10000".equals(alipayResp.getCode()) && alipayResp.isSuccess()){ //支付成功, 更新订单成功 || 等待支付宝的异步回调接口 + + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + + + }else if("10003".equals(alipayResp.getCode())){ //10003 表示为 处理中, 例如等待用户输入密码 + + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + }else{ //其他状态, 表示下单失败 + + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(AlipayKit.appendErrCode(alipayResp.getCode(), alipayResp.getSubCode())); + channelRetMsg.setChannelErrMsg(AlipayKit.appendErrMsg(alipayResp.getMsg(), alipayResp.getSubMsg())); + } + + return res; + + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..8d002e127e6730488bf6d7b56e6b89207e8aafb9 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliJsapi.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.domain.AlipayTradeCreateModel; +import com.alipay.api.request.AlipayTradeCreateRequest; +import com.alipay.api.response.AlipayTradeCreateResponse; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 支付宝 jsapi支付 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:20 + */ +@Service("alipayPaymentByJsapiService") //Service Name需保持全局唯一性 +public class AliJsapi extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getBuyerUserId())){ + throw new BizException("[buyerUserId]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq; + + AlipayTradeCreateRequest req = new AlipayTradeCreateRequest(); + AlipayTradeCreateModel model = new AlipayTradeCreateModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + model.setBuyerId(bizRQ.getBuyerUserId()); + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + //调起支付宝 (如果异常, 将直接跑出 ChannelException ) + AlipayTradeCreateResponse alipayResp = mchConfigContext.getAlipayClientWrapper().execute(req); + + // 构造函数响应数据 + AliJsapiOrderRS res = ApiResBuilder.buildSuccess(AliJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelAttach(alipayResp.getBody()); + + // ↓↓↓↓↓↓ 调起接口成功后业务判断务必谨慎!! 避免因代码编写bug,导致不能正确返回订单状态信息 ↓↓↓↓↓↓ + res.setAlipayTradeNo(alipayResp.getTradeNo()); + + channelRetMsg.setChannelOrderId(alipayResp.getTradeNo()); + if(alipayResp.isSuccess()){ //业务处理成功 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(AlipayKit.appendErrCode(alipayResp.getCode(), alipayResp.getSubCode())); + channelRetMsg.setChannelErrMsg(AlipayKit.appendErrMsg(alipayResp.getMsg(), alipayResp.getSubMsg())); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliPc.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliPc.java new file mode 100644 index 0000000000000000000000000000000000000000..0dc9aadeb0e29072ec6ce3b1c0921b638a43c6cb --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliPc.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.domain.AlipayTradePagePayModel; +import com.alipay.api.request.AlipayTradePagePayRequest; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.exception.ChannelException; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliPcOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliPcOrderRS; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import org.springframework.stereotype.Service; + +/* +* 支付宝 PC支付 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:21 +*/ +@Service("alipayPaymentByAliPcService") //Service Name需保持全局唯一性 +public class AliPc extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext){ + + AliPcOrderRQ bizRQ = (AliPcOrderRQ) rq; + + AlipayTradePagePayRequest req = new AlipayTradePagePayRequest(); + AlipayTradePagePayModel model = new AlipayTradePagePayModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + model.setProductCode("FAST_INSTANT_TRADE_PAY"); + model.setQrPayMode("2"); //订单码-跳转模式 + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setReturnUrl(getReturnUrl()); // 同步跳转地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + // 构造函数响应数据 + AliPcOrderRS res = ApiResBuilder.buildSuccess(AliPcOrderRS.class); + + try { + if(CS.PAY_DATA_TYPE.FORM.equals(bizRQ.getPayDataType())){ + res.setFormContent(mchConfigContext.getAlipayClientWrapper().getAlipayClient().pageExecute(req).getBody()); + }else{ + res.setPayUrl(mchConfigContext.getAlipayClientWrapper().getAlipayClient().pageExecute(req, "GET").getBody()); + } + }catch (AlipayApiException e) { + throw ChannelException.sysError(e.getMessage()); + } + + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliQr.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliQr.java new file mode 100644 index 0000000000000000000000000000000000000000..ac2b4a7459253f0606dd56ad2212317d9e680a61 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliQr.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.domain.AlipayTradePrecreateModel; +import com.alipay.api.request.AlipayTradePrecreateRequest; +import com.alipay.api.response.AlipayTradePrecreateResponse; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliQrOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliQrOrderRS; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import org.springframework.stereotype.Service; + +/* +* 支付宝 QR支付 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:21 +*/ +@Service("alipayPaymentByAliQrService") //Service Name需保持全局唯一性 +public class AliQr extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext){ + + AliQrOrderRQ aliQrOrderRQ = (AliQrOrderRQ)rq; + + AlipayTradePrecreateRequest req = new AlipayTradePrecreateRequest(); + AlipayTradePrecreateModel model = new AlipayTradePrecreateModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + //调起支付宝 (如果异常, 将直接跑出 ChannelException ) + AlipayTradePrecreateResponse alipayResp = mchConfigContext.getAlipayClientWrapper().execute(req); + + // 构造函数响应数据 + AliQrOrderRS res = ApiResBuilder.buildSuccess(AliQrOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelAttach(alipayResp.getBody()); + + // ↓↓↓↓↓↓ 调起接口成功后业务判断务必谨慎!! 避免因代码编写bug,导致不能正确返回订单状态信息 ↓↓↓↓↓↓ + + if(alipayResp.isSuccess()){ //处理成功 + + if(CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(aliQrOrderRQ.getPayDataType())){ //二维码地址 + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(alipayResp.getQrCode())); + + }else{ //默认都为跳转地址方式 + res.setCodeUrl(alipayResp.getQrCode()); + } + + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + }else{ //其他状态, 表示下单失败 + res.setOrderState(PayOrder.STATE_FAIL); //支付失败 + channelRetMsg.setChannelErrCode(AlipayKit.appendErrCode(alipayResp.getCode(), alipayResp.getSubCode())); + channelRetMsg.setChannelErrMsg(AlipayKit.appendErrMsg(alipayResp.getMsg(), alipayResp.getSubMsg())); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliWap.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliWap.java new file mode 100644 index 0000000000000000000000000000000000000000..87e5f2f0f26ca9c941f9a7a842d18f75f48074ad --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/payway/AliWap.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.alipay.payway; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.domain.AlipayTradeWapPayModel; +import com.alipay.api.request.AlipayTradeWapPayRequest; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.AmountUtil; +import com.jeequan.jeepay.pay.channel.alipay.AlipayKit; +import com.jeequan.jeepay.pay.channel.alipay.AlipayPaymentService; +import com.jeequan.jeepay.pay.exception.ChannelException; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliWapOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliWapOrderRS; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import org.springframework.stereotype.Service; + +/* +* 支付宝 wap支付 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:21 +*/ +@Service("alipayPaymentByAliWapService") //Service Name需保持全局唯一性 +public class AliWap extends AlipayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext){ + + AliWapOrderRQ bizRQ = (AliWapOrderRQ)rq; + + AlipayTradeWapPayRequest req = new AlipayTradeWapPayRequest(); + AlipayTradeWapPayModel model = new AlipayTradeWapPayModel(); + model.setOutTradeNo(payOrder.getPayOrderId()); + model.setSubject(payOrder.getSubject()); //订单标题 + model.setBody(payOrder.getBody()); //订单描述信息 + model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); //支付金额 + model.setProductCode("QUICK_WAP_PAY"); + req.setNotifyUrl(getNotifyUrl()); // 设置异步通知地址 + req.setReturnUrl(getReturnUrl()); // 同步跳转地址 + req.setBizModel(model); + + //统一放置 isv接口必传信息 + AlipayKit.putApiIsvInfo(mchConfigContext, req, model); + + // 构造函数响应数据 + AliWapOrderRS res = ApiResBuilder.buildSuccess(AliWapOrderRS.class); + + try { + if(CS.PAY_DATA_TYPE.FORM.equals(bizRQ.getPayDataType())){ //表单方式 + res.setFormContent(mchConfigContext.getAlipayClientWrapper().getAlipayClient().pageExecute(req).getBody()); + + }else if (CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(bizRQ.getPayDataType())){ //二维码图片地址 + + String payUrl = mchConfigContext.getAlipayClientWrapper().getAlipayClient().pageExecute(req, "GET").getBody(); + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(payUrl)); + }else{ // 默认都为 payUrl方式 + + res.setPayUrl(mchConfigContext.getAlipayClientWrapper().getAlipayClient().pageExecute(req, "GET").getBody()); + } + }catch (AlipayApiException e) { + throw ChannelException.sysError(e.getMessage()); + } + + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + //放置 响应数据 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelNoticeService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelNoticeService.java new file mode 100644 index 0000000000000000000000000000000000000000..bd393474d1c1c12d8edc762391fbe59558fa7be8 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelNoticeService.java @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader; +import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; +import com.github.binarywang.wxpay.config.WxPayConfig; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.service.WxPayService; +import com.github.binarywang.wxpay.v3.auth.AutoUpdateCertificatesVerifier; +import com.github.binarywang.wxpay.v3.auth.PrivateKeySigner; +import com.github.binarywang.wxpay.v3.auth.WxPayCredentials; +import com.github.binarywang.wxpay.v3.util.AesUtils; +import com.github.binarywang.wxpay.v3.util.PemUtils; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.exception.ResponseException; +import com.jeequan.jeepay.pay.channel.AbstractChannelNoticeService; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; +import java.io.FileInputStream; +import java.math.BigDecimal; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; + +/* +* 微信回调 +* +* @author zhuxiao +* @site https://www.jeepay.vip +* @date 2021/6/8 18:10 +*/ +@Service +@Slf4j +public class WxpayChannelNoticeService extends AbstractChannelNoticeService { + + @Autowired private ConfigContextService configContextService; + + @Autowired private PayOrderService payOrderService; + + @Override + public String getIfCode() { + return CS.IF_CODE.WXPAY; + } + + @Override + public MutablePair parseParams(HttpServletRequest request, String urlOrderId, NoticeTypeEnum noticeTypeEnum) { + + try { + if(StringUtils.isNotBlank(urlOrderId)){ // V3接口回调 + + // 获取订单信息 + PayOrder payOrder = payOrderService.getById(urlOrderId); + if(payOrder == null){ + throw new BizException("订单不存在"); + } + + //获取支付参数 (缓存数据) 和 商户信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(payOrder.getMchNo()); + if(mchConfigContext == null){ + throw new BizException("获取商户信息失败"); + } + + // 验签 + if (!verifyNotifySign(request, mchConfigContext)) { + throw new BizException("验签失败"); + } + + // 获取加密信息 + JSONObject params = getReqParamJSON(); + JSONObject resource = params.getJSONObject("resource"); + String cipherText = resource.getString("cipherText"); + String associatedData = resource.getString("associatedData"); + String nonce = resource.getString("nonce"); + + // 解密 + String result = AesUtils.decryptToString(associatedData, nonce, cipherText, mchConfigContext.getWxServiceWrapper().getWxPayService().getConfig().getApiV3Key()); + JSONObject decryptJSON = JSONObject.parseObject(result); + return MutablePair.of(decryptJSON.getString("out_trade_no"), decryptJSON); + + } else { // V2接口回调 + String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding()); + if(StringUtils.isEmpty(xmlResult)) { + return null; + } + + WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlResult); + String payOrderId = result.getOutTradeNo(); + return MutablePair.of(payOrderId, result); + } + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + + @Override + public ChannelRetMsg doNotice(HttpServletRequest request, Object params, PayOrder payOrder, MchConfigContext mchConfigContext, NoticeTypeEnum noticeTypeEnum) { + try { + ChannelRetMsg channelResult = new ChannelRetMsg(); + channelResult.setChannelState(ChannelRetMsg.ChannelState.WAITING); // 默认支付中 + + if (CS.PAY_IF_VERSION.WX_V2.equals(mchConfigContext.getWxServiceWrapper().getApiVersion())) { // V2 + // 获取回调参数 + WxPayOrderNotifyResult result = (WxPayOrderNotifyResult) params; + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 验证参数 + verifyWxPayParams(wxPayService, result, payOrder); + + channelResult.setChannelOrderId(result.getTransactionId()); //渠道订单号 + channelResult.setChannelUserId(result.getOpenid()); //支付用户ID + channelResult.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + + }else if (CS.PAY_IF_VERSION.WX_V3.equals(mchConfigContext.getWxServiceWrapper().getApiVersion())) { // V3 + // 获取回调参数 + JSONObject resultJSON = (JSONObject) params; + + // 验证参数 + verifyWxPayParams(resultJSON, payOrder); + + String channelState = resultJSON.getString("trade_state"); + if ("SUCCESS".equals(channelState)) { + channelResult.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + }else if("CLOSED".equals(channelState) + || "REVOKED".equals(channelState) + || "PAYERROR".equals(channelState)){ //CLOSED—已关闭, REVOKED—已撤销, PAYERROR--支付失败 + channelResult.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); //支付失败 + } + + channelResult.setChannelOrderId(resultJSON.getString("transaction_id")); //渠道订单号 + JSONObject payer = resultJSON.getJSONObject("payer"); + if (payer != null) { + channelResult.setChannelUserId(StringUtils.isNotBlank(payer.getString("openid")) ? payer.getString("openid") : payer.getString("sp_openid")); //支付用户ID + } + + }else { + throw ResponseException.buildText("API_VERSION ERROR"); + } + + ResponseEntity okResponse = textResp("SUCCESS"); + channelResult.setResponseEntity(okResponse); //响应数据 + + return channelResult; + + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + + /** + * V2接口验证微信支付通知参数 + * @return + */ + public void verifyWxPayParams(WxPayService wxPayService, WxPayOrderNotifyResult result, PayOrder payOrder) { + + try { + result.checkResult(wxPayService, WxPayConstants.SignType.MD5, true); + + // 核对金额 + Integer total_fee = result.getTotalFee(); // 总金额 + long wxPayAmt = new BigDecimal(total_fee).longValue(); + long dbPayAmt = payOrder.getAmount().longValue(); + if (dbPayAmt != wxPayAmt) { + throw ResponseException.buildText("AMOUNT ERROR"); + } + } catch (Exception e) { + throw ResponseException.buildText("ERROR"); + } + } + + /** + * V3校验通知签名 + * @param request 请求信息 + * @param mchConfigContext 商户配置 + * @return true:校验通过 false:校验不通过 + */ + private boolean verifyNotifySign(HttpServletRequest request, MchConfigContext mchConfigContext) throws Exception { + SignatureHeader header = new SignatureHeader(); + header.setTimeStamp(request.getHeader("Wechatpay-Timestamp")); + header.setNonce(request.getHeader("Wechatpay-Nonce")); + header.setSerialNo(request.getHeader("Wechatpay-Serial")); + header.setSigned(request.getHeader("Wechatpay-Signature")); + + String beforeSign = String.format("%s\n%s\n%s\n", + header.getTimeStamp(), + header.getNonce(), + getReqParamJSON().toJSONString()); + + WxPayConfig wxPayConfig = mchConfigContext.getWxServiceWrapper().getWxPayService().getConfig(); + // 自动获取微信平台证书 + PrivateKey privateKey = PemUtils.loadPrivateKey(new FileInputStream(wxPayConfig.getPrivateKeyPath())); + AutoUpdateCertificatesVerifier verifier = new AutoUpdateCertificatesVerifier( + new WxPayCredentials(wxPayConfig.getMchId(), new PrivateKeySigner(wxPayConfig.getCertSerialNo(), privateKey)), + wxPayConfig.getApiV3Key().getBytes("utf-8")); + + return verifier.verify(header.getSerialNo(), + beforeSign.getBytes(StandardCharsets.UTF_8), header.getSigned()); + } + + /** + * V3接口验证微信支付通知参数 + * @return + */ + public void verifyWxPayParams(JSONObject result, PayOrder payOrder) { + + try { + // 核对金额 + Integer total_fee = result.getInteger("total"); // 总金额 + long wxPayAmt = new BigDecimal(total_fee).longValue(); + long dbPayAmt = payOrder.getAmount().longValue(); + if (dbPayAmt != wxPayAmt) { + throw ResponseException.buildText("AMOUNT ERROR"); + } + } catch (Exception e) { + throw ResponseException.buildText("ERROR"); + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..2a5275c0664b67cf14a807a26d075b2f27e2cee6 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayChannelUserService.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; +import com.jeequan.jeepay.pay.channel.IChannelUserService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.error.WxErrorException; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* +* 微信支付 获取微信openID实现类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:22 +*/ +@Service +@Slf4j +public class WxpayChannelUserService implements IChannelUserService { + + /** 默认官方跳转地址 **/ + private static final String DEFAULT_OAUTH_URL = "https://open.weixin.qq.com/connect/oauth2/authorize"; + + @Override + public String getIfCode() { + return CS.IF_CODE.WXPAY; + } + + @Override + public String buildUserRedirectUrl(String callbackUrlEncode, MchConfigContext mchConfigContext) { + + String appId = null; + String oauth2Url = ""; + if(mchConfigContext.isIsvsubMch()){ + WxpayIsvParams wxpayIsvParams = mchConfigContext.getIsvConfigContext().getIsvParamsByIfCode(CS.IF_CODE.WXPAY, WxpayIsvParams.class); + appId = wxpayIsvParams.getAppId(); + oauth2Url = wxpayIsvParams.getOauth2Url(); + }else{ + //获取商户配置信息 + WxpayNormalMchParams normalMchParams = mchConfigContext.getNormalMchParamsByIfCode(CS.IF_CODE.WXPAY, WxpayNormalMchParams.class); + appId = normalMchParams.getAppId(); + oauth2Url = normalMchParams.getOauth2Url(); + } + + if(StringUtils.isBlank(oauth2Url)){ + oauth2Url = DEFAULT_OAUTH_URL; + } + + return String.format(oauth2Url + "?appid=%s&scope=snsapi_base&state=&redirect_uri=%s", appId, callbackUrlEncode); + } + + @Override + public String getChannelUserId(JSONObject reqParams, MchConfigContext mchConfigContext) { + String code = reqParams.getString("code"); + try { + return mchConfigContext.getWxServiceWrapper().getWxMpService().getOAuth2Service().getAccessToken(code).getOpenId(); + } catch (WxErrorException e) { + e.printStackTrace(); + return null; + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPayOrderQueryService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPayOrderQueryService.java new file mode 100644 index 0000000000000000000000000000000000000000..41e024ac99545a54ca1c8f93d3c11c488edb4ae4 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPayOrderQueryService.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.request.WxPayOrderQueryRequest; +import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.IPayOrderQueryService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import org.springframework.stereotype.Service; + +/* +* 微信查单接口 +* +* @author zhuxiao +* @site https://www.jeepay.vip +* @date 2021/6/8 18:10 +*/ +@Service +public class WxpayPayOrderQueryService implements IPayOrderQueryService { + + @Override + public String getIfCode() { + return CS.IF_CODE.WXPAY; + } + + @Override + public ChannelRetMsg query(PayOrder payOrder, MchConfigContext mchConfigContext) { + + try { + + if (CS.PAY_IF_VERSION.WX_V2.equals(mchConfigContext.getWxServiceWrapper().getApiVersion())) { //V2 + + WxPayOrderQueryRequest req = new WxPayOrderQueryRequest(); + + //放置isv信息 + WxpayKit.putApiIsvInfo(mchConfigContext, req); + + req.setOutTradeNo(payOrder.getPayOrderId()); + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + WxPayOrderQueryResult result = wxPayService.queryOrder(req); + + if("SUCCESS".equals(result.getTradeState())){ //支付成功 + return ChannelRetMsg.confirmSuccess(result.getTransactionId()); + }else if("USERPAYING".equals(result.getTradeState())){ //支付中,等待用户输入密码 + return ChannelRetMsg.waiting(); //支付中 + }else if("CLOSED".equals(result.getTradeState()) + || "REVOKED".equals(result.getTradeState()) + || "PAYERROR".equals(result.getTradeState())){ //CLOSED—已关闭, REVOKED—已撤销(刷卡支付), PAYERROR--支付失败(其他原因,如银行返回失败) + return ChannelRetMsg.confirmFail(); //支付失败 + }else{ + return ChannelRetMsg.unknown(); + } + + }else if (CS.PAY_IF_VERSION.WX_V3.equals(mchConfigContext.getWxServiceWrapper().getApiVersion())) { //V3 + + JSONObject resultJSON = WxpayV3Util.queryOrderV3(payOrder.getPayOrderId(), mchConfigContext.getWxServiceWrapper().getWxPayService().getConfig()); + + String channelState = resultJSON.getString("trade_state"); + if ("SUCCESS".equals(channelState)) { + return ChannelRetMsg.confirmSuccess(resultJSON.getString("transaction_id")); + }else if("USERPAYING".equals(channelState)){ //支付中,等待用户输入密码 + return ChannelRetMsg.waiting(); //支付中 + }else if("CLOSED".equals(channelState) + || "REVOKED".equals(channelState) + || "PAYERROR".equals(channelState)){ //CLOSED—已关闭, REVOKED—已撤销(刷卡支付), PAYERROR--支付失败(其他原因,如银行返回失败) + return ChannelRetMsg.confirmFail(); //支付失败 + }else{ + return ChannelRetMsg.unknown(); + } + + }else { + return ChannelRetMsg.unknown(); + } + + } catch (WxPayException e) { + return ChannelRetMsg.sysError(e.getReturnMsg()); + } catch (Exception e) { + return ChannelRetMsg.sysError(e.getMessage()); + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPaymentService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPaymentService.java new file mode 100644 index 0000000000000000000000000000000000000000..9abaf433f63c0c5e2feed9ca424dc501998bb526 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/WxpayPaymentService.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvsubMchParams; +import com.jeequan.jeepay.pay.channel.AbstractPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.util.PaywayUtil; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* +* 支付接口: 微信官方 +* 支付方式: 自适应 +* +* @author zhuxiao +* @site https://www.jeepay.vip +* @date 2021/6/8 18:10 +*/ +@Service +public class WxpayPaymentService extends AbstractPaymentService { + + @Override + public String getIfCode() { + return CS.IF_CODE.WXPAY; + } + + @Override + public boolean isSupport(String wayCode) { + return true; + } + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).preCheck(rq, payOrder); + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + + // 微信API版本 + String apiVersion = mchConfigContext.getWxServiceWrapper().getApiVersion(); + if (CS.PAY_IF_VERSION.WX_V2.equals(apiVersion)) { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).pay(rq, payOrder, mchConfigContext); + } else if (CS.PAY_IF_VERSION.WX_V3.equals(apiVersion)) { + return PaywayUtil.getRealPaywayV3Service(this, payOrder.getWayCode()).pay(rq, payOrder, mchConfigContext); + } else { + throw new BizException("不支持的微信支付API版本"); + } + + } + + /** + * 构建微信统一下单请求数据 + * @param payOrder + * @return + */ + public WxPayUnifiedOrderRequest buildUnifiedOrderRequest(PayOrder payOrder, MchConfigContext mchConfigContext) { + String payOrderId = payOrder.getPayOrderId(); + + // 微信统一下单请求对象 + WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest(); + request.setOutTradeNo(payOrderId); + request.setBody(payOrder.getSubject()); + request.setDetail(payOrder.getBody()); + request.setFeeType("CNY"); + request.setTotalFee(payOrder.getAmount().intValue()); + request.setSpbillCreateIp(payOrder.getClientIp()); + request.setNotifyUrl(getNotifyUrl()); + request.setProductId(System.currentTimeMillis()+""); + + // 特约商户 + if(mchConfigContext.isIsvsubMch()){ + WxpayIsvsubMchParams isvsubMchParams = mchConfigContext.getIsvsubMchParamsByIfCode(getIfCode(), WxpayIsvsubMchParams.class); + request.setSubMchId(isvsubMchParams.getSubMchId()); + request.setSubAppId(isvsubMchParams.getSubMchAppId()); + } + + return request; + } + + /** + * 构建微信APIV3接口 统一下单请求数据 + * @param payOrder + * @return + */ + public JSONObject buildV3OrderRequest(PayOrder payOrder, MchConfigContext mchConfigContext) { + String payOrderId = payOrder.getPayOrderId(); + + // 微信统一下单请求对象 + JSONObject reqJSON = new JSONObject(); + reqJSON.put("out_trade_no", payOrderId); + reqJSON.put("description", payOrder.getSubject()); + reqJSON.put("notify_url", getNotifyUrl(payOrderId)); + + JSONObject amount = new JSONObject(); + amount.put("total", payOrder.getAmount().intValue()); + amount.put("currency", "CNY"); + reqJSON.put("amount", amount); + + JSONObject sceneInfo = new JSONObject(); + sceneInfo.put("payer_client_ip", payOrder.getClientIp()); + reqJSON.put("scene_info", sceneInfo); + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + WxpayIsvsubMchParams isvsubMchParams = mchConfigContext.getIsvsubMchParamsByIfCode(getIfCode(), WxpayIsvsubMchParams.class); + reqJSON.put("sp_appid", wxPayService.getConfig().getAppId()); + reqJSON.put("sp_mchid", wxPayService.getConfig().getMchId()); + reqJSON.put("sub_mchid", isvsubMchParams.getSubMchId()); + reqJSON.put("sub_appid", isvsubMchParams.getSubMchAppId()); + }else { // 普通商户 + reqJSON.put("appid", wxPayService.getConfig().getAppId()); + reqJSON.put("mchid", wxPayService.getConfig().getMchId()); + } + + return reqJSON; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayKit.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayKit.java new file mode 100644 index 0000000000000000000000000000000000000000..d33717690065aaec679d570f5e6bea9133da0bf7 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayKit.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.kits; + +import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvsubMchParams; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; + +/* +* 【微信支付】支付通道工具包 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:21 +*/ +public class WxpayKit { + + /** 放置 isv特殊信息 **/ + public static void putApiIsvInfo(MchConfigContext mchConfigContext, BaseWxPayRequest req){ + + //不是特约商户, 无需放置此值 + if(!mchConfigContext.isIsvsubMch()){ + return ; + } + + WxpayIsvsubMchParams isvsubMchParams = mchConfigContext.getIsvsubMchParamsByIfCode(CS.IF_CODE.WXPAY, WxpayIsvsubMchParams.class); + req.setSubMchId(isvsubMchParams.getSubMchId()); + req.setSubAppId(isvsubMchParams.getSubMchAppId()); + } + + public static String appendErrCode(String code, String subCode){ + return StringUtils.defaultIfEmpty(subCode, code); //优先: subCode + } + + public static String appendErrMsg(String msg, String subMsg){ + + if(StringUtils.isNotEmpty(msg) && StringUtils.isNotEmpty(subMsg) ){ + return msg + "【" + subMsg + "】"; + } + return StringUtils.defaultIfEmpty(subMsg, msg); + } + + public static void commonSetErrInfo(ChannelRetMsg channelRetMsg, WxPayException wxPayException){ + + channelRetMsg.setChannelErrCode(appendErrCode( wxPayException.getReturnCode(), wxPayException.getErrCode() )); + channelRetMsg.setChannelErrMsg(appendErrMsg( "OK".equalsIgnoreCase(wxPayException.getReturnMsg()) ? null : wxPayException.getReturnMsg(), wxPayException.getErrCodeDes() )); + + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java new file mode 100644 index 0000000000000000000000000000000000000000..515be2aee7e43fcc04900fc4511c1a619710990c --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/kits/WxpayV3Util.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.kits; + + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.config.WxPayConfig; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.v3.WxPayV3HttpClientBuilder; +import com.github.binarywang.wxpay.v3.auth.AutoUpdateCertificatesVerifier; +import com.github.binarywang.wxpay.v3.auth.PrivateKeySigner; +import com.github.binarywang.wxpay.v3.auth.WxPayCredentials; +import com.github.binarywang.wxpay.v3.auth.WxPayValidator; +import com.github.binarywang.wxpay.v3.util.PemUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpStatus; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.util.EntityUtils; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.UnsupportedEncodingException; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.util.HashMap; +import java.util.Map; + +/** + * @Author: ZhuXiao + * @Description: + * @Date: 15:22 2021/5/26 +*/ +@Slf4j +public class WxpayV3Util { + + private static final String PAY_BASE_URL = "https://api.mch.weixin.qq.com"; + public static final Map NORMALMCH_URL_MAP = new HashMap<>(); + static { + NORMALMCH_URL_MAP.put(WxPayConstants.TradeType.APP, "/v3/pay/transactions/app"); + NORMALMCH_URL_MAP.put(WxPayConstants.TradeType.JSAPI, "/v3/pay/transactions/jsapi"); + NORMALMCH_URL_MAP.put(WxPayConstants.TradeType.NATIVE, "/v3/pay/transactions/native"); + NORMALMCH_URL_MAP.put(WxPayConstants.TradeType.MWEB, "/v3/pay/transactions/h5"); + } + + public static final Map ISV_URL_MAP = new HashMap<>(); + static { + ISV_URL_MAP.put(WxPayConstants.TradeType.APP, "/v3/pay/partner/transactions/app"); + ISV_URL_MAP.put(WxPayConstants.TradeType.JSAPI, "/v3/pay/partner/transactions/jsapi"); + ISV_URL_MAP.put(WxPayConstants.TradeType.NATIVE, "/v3/pay/partner/transactions/native"); + ISV_URL_MAP.put(WxPayConstants.TradeType.MWEB, "/v3/pay/partner/transactions/h5"); + } + + public static JSONObject unifiedOrderV3(String url, JSONObject reqJSON, WxPayConfig wxPayConfig) throws WxPayException { + String response = postV3(PAY_BASE_URL + url, reqJSON.toJSONString(), wxPayConfig); + return JSON.parseObject(response); + } + + public static JSONObject queryOrderV3(String payOrderId, WxPayConfig wxPayConfig) throws WxPayException { + String url = String.format("%s/v3/pay/transactions/out-trade-no/%s", PAY_BASE_URL, payOrderId); + String response = getV3(url, wxPayConfig); + return JSON.parseObject(response); + } + + public static String postV3(String url, String requestStr, WxPayConfig wxPayConfig) throws WxPayException { + CloseableHttpClient httpClient = createApiV3HttpClient(wxPayConfig); + HttpPost httpPost = createHttpPost(url, requestStr); + httpPost.addHeader("Accept", "application/json"); + httpPost.addHeader("Content-Type", "application/json"); + try (CloseableHttpResponse response = httpClient.execute(httpPost)) { + //v3已经改为通过状态码判断200 204 成功 + int statusCode = response.getStatusLine().getStatusCode(); + //post方法有可能会没有返回值的情况 + String responseString; + if (response.getEntity() == null) { + responseString = null; + } else { + responseString = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8); + } + log.info("\n【请求地址】:{}\n【请求数据】:{}\n【响应数据】:{}", url, requestStr, responseString); + + if (HttpStatus.SC_OK == statusCode || HttpStatus.SC_NO_CONTENT == statusCode) { + return responseString; + } else { + //有错误提示信息返回 + JSONObject jsonObject = JSON.parseObject(responseString); + WxPayException wxPayException = new WxPayException(jsonObject.getString("message")); + wxPayException.setErrCode(jsonObject.getString("code")); + wxPayException.setErrCodeDes(jsonObject.getString("message")); + throw wxPayException; + } + } catch (Exception e) { + log.error("\n【异常信息】:{}", e.getMessage()); + throw (e instanceof WxPayException) ? (WxPayException) e : new WxPayException(e.getMessage(), e); + } finally { + httpPost.releaseConnection(); + } + + } + + public static String getV3(String url, WxPayConfig wxPayConfig) throws WxPayException { + HttpGet httpGet = new HttpGet(url); + httpGet.addHeader("Accept", "application/json"); + httpGet.addHeader("Content-Type", "application/json"); + + httpGet.setConfig(RequestConfig.custom() + .setConnectionRequestTimeout(5000) + .setConnectTimeout(5000) + .setSocketTimeout(10000) + .build()); + + CloseableHttpClient httpClient = createApiV3HttpClient(wxPayConfig); + try (CloseableHttpResponse response = httpClient.execute(httpGet)) { + //v3已经改为通过状态码判断200 204 成功 + int statusCode = response.getStatusLine().getStatusCode(); + //post方法有可能会没有返回值的情况 + String responseString; + if (response.getEntity() == null) { + responseString = null; + } else { + responseString = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8); + } + if (HttpStatus.SC_OK == statusCode || HttpStatus.SC_NO_CONTENT == statusCode) { + log.info("\n【请求地址】:{}\n【响应数据】:{}", url, responseString); + return responseString; + } else { + //有错误提示信息返回 + JSONObject jsonObject = JSON.parseObject(responseString); + WxPayException wxPayException = new WxPayException(jsonObject.getString("message")); + wxPayException.setErrCode(jsonObject.getString("code")); + wxPayException.setErrCodeDes(jsonObject.getString("message")); + throw wxPayException; + } + } catch (Exception e) { + log.error("\n【异常信息】:{}", url, e.getMessage()); + throw (e instanceof WxPayException) ? (WxPayException) e : new WxPayException(e.getMessage(), e); + } finally { + httpGet.releaseConnection(); + } + } + + private static CloseableHttpClient createApiV3HttpClient(WxPayConfig wxPayConfig) throws WxPayException { + + try { + // 自动获取微信平台证书 + PrivateKey privateKey = PemUtils.loadPrivateKey(new FileInputStream(wxPayConfig.getPrivateKeyPath())); + AutoUpdateCertificatesVerifier verifier = new AutoUpdateCertificatesVerifier( + new WxPayCredentials(wxPayConfig.getMchId(), new PrivateKeySigner(wxPayConfig.getCertSerialNo(), privateKey)), + wxPayConfig.getApiV3Key().getBytes("utf-8")); + + WxPayV3HttpClientBuilder builder = WxPayV3HttpClientBuilder.create() + .withMerchant(wxPayConfig.getMchId(), wxPayConfig.getCertSerialNo(), privateKey) + .withValidator(new WxPayValidator(verifier)); + + CloseableHttpClient apiV3HttpClient = builder.build(); + return apiV3HttpClient; + } catch (FileNotFoundException | UnsupportedEncodingException e) { + log.error("", e); + } + + CloseableHttpClient apiV3HttpClient = wxPayConfig.getApiV3HttpClient(); + if (null == apiV3HttpClient) { + return wxPayConfig.initApiV3HttpClient(); + } + return null; + } + + private static HttpPost createHttpPost(String url, String requestStr) { + HttpPost httpPost = new HttpPost(url); + httpPost.setEntity(new StringEntity(requestStr, ContentType.create("application/json", "utf-8"))); + + httpPost.setConfig(RequestConfig.custom() + .setConnectionRequestTimeout(5000) + .setConnectTimeout(5000) + .setSocketTimeout(10000) + .build()); + + return httpPost; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxApp.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxApp.java new file mode 100644 index 0000000000000000000000000000000000000000..1d9a6814c4047b79e3d33a3c0e6c0728317b0eb5 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxApp.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.order.WxPayAppOrderResult; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxAppOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* +* 微信 app支付 +* +* @author zhuxiao +* @site https://www.jeepay.vip +* @date 2021/6/8 18:08 +*/ +@Service("wxpayPaymentByAppService") //Service Name需保持全局唯一性 +public class WxApp extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxPayUnifiedOrderRequest req = buildUnifiedOrderRequest(payOrder, mchConfigContext); + req.setTradeType(WxPayConstants.TradeType.APP); + + // 构造函数响应数据 + WxAppOrderRS res = ApiResBuilder.buildSuccess(WxAppOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayAppOrderResult payResult = wxPayService.createOrder(req); + JSONObject resJSON = (JSONObject) JSON.toJSON(payResult); + resJSON.put("package", payResult.getPackageValue()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxBar.java new file mode 100644 index 0000000000000000000000000000000000000000..b1d28a9c488273f5ad76fb11ccb4f674da0da445 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxBar.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + + +import com.github.binarywang.wxpay.bean.request.WxPayMicropayRequest; +import com.github.binarywang.wxpay.bean.result.WxPayMicropayResult; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxBarOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxBarOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 微信 bar + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByBarService") //Service Name需保持全局唯一性 +public class WxBar extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + WxBarOrderRQ bizRQ = (WxBarOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getAuthCode())){ + throw new BizException("用户支付条码[authCode]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxBarOrderRQ bizRQ = (WxBarOrderRQ) rq; + + // 微信统一下单请求对象 + WxPayMicropayRequest request = new WxPayMicropayRequest(); + request.setOutTradeNo(payOrder.getPayOrderId()); + request.setBody(payOrder.getSubject()); + request.setDetail(payOrder.getBody()); + request.setFeeType("CNY"); + request.setTotalFee(payOrder.getAmount().intValue()); + request.setSpbillCreateIp(payOrder.getClientIp()); + request.setAuthCode(bizRQ.getAuthCode()); + + //放置isv信息 + WxpayKit.putApiIsvInfo(mchConfigContext, request); + + // 构造函数响应数据 + WxBarOrderRS res = ApiResBuilder.buildSuccess(WxBarOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayMicropayResult wxPayMicropayResult = wxPayService.micropay(request); + + channelRetMsg.setChannelOrderId(wxPayMicropayResult.getTransactionId()); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + + } catch (WxPayException e) { + //微信返回支付状态为【支付结果未知】, 需进行查单操作 + if("SYSTEMERROR".equals(e.getErrCode()) || "USERPAYING".equals(e.getErrCode()) || "BANKERROR".equals(e.getErrCode())){ + + //轮询查询订单 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + channelRetMsg.setNeedQuery(true); + }else { + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxH5.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxH5.java new file mode 100644 index 0000000000000000000000000000000000000000..508560dd980c624920b8fc53d7ff86e102052611 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxH5.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + +import com.github.binarywang.wxpay.bean.order.WxPayMwebOrderResult; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxH5OrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxH5OrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 H5 支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByH5Service") //Service Name需保持全局唯一性 +public class WxH5 extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) { + + WxH5OrderRQ bizRQ = (WxH5OrderRQ) rq; + + WxPayUnifiedOrderRequest req = buildUnifiedOrderRequest(payOrder, mchConfigContext); + req.setTradeType(WxPayConstants.TradeType.MWEB); + + // 构造函数响应数据 + WxH5OrderRS res = ApiResBuilder.buildSuccess(WxH5OrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayMwebOrderResult wxPayMwebOrderResult = wxPayService.createOrder(req); + + String payUrl = wxPayMwebOrderResult.getMwebUrl(); + if(CS.PAY_DATA_TYPE.FORM.equals(bizRQ.getPayDataType())){ //表单方式 + res.setFormContent(payUrl); + + }else if (CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(bizRQ.getPayDataType())){ //二维码图片地址 + + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(payUrl)); + }else{ // 默认都为 payUrl方式 + + res.setPayUrl(payUrl); + } + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..e6e502d986fd9a0e403e8a8b028fa73986a526aa --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxJsapi.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 微信 jsapi支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByJsapiService") //Service Name需保持全局唯一性 +@Slf4j +public class WxJsapi extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getOpenid())){ + throw new BizException("[openid]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + + WxPayUnifiedOrderRequest req = buildUnifiedOrderRequest(payOrder, mchConfigContext); + req.setTradeType(WxPayConstants.TradeType.JSAPI); + req.setOpenid(bizRQ.getOpenid()); + + // 构造函数响应数据 + WxJsapiOrderRS res = ApiResBuilder.buildSuccess(WxJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayMpOrderResult payResult = wxPayService.createOrder(req); + JSONObject resJSON = (JSONObject) JSON.toJSON(payResult); + resJSON.put("package", payResult.getPackageValue()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + log.error("WxPayException:", e); + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxLite.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxLite.java new file mode 100644 index 0000000000000000000000000000000000000000..39c581b2de00afdf396438289ab74d4f11d6f849 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxLite.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 微信 小程序支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByLiteService") //Service Name需保持全局唯一性 +public class WxLite extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getOpenid())){ + throw new BizException("[openid]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + + WxPayUnifiedOrderRequest req = buildUnifiedOrderRequest(payOrder, mchConfigContext); + req.setTradeType(WxPayConstants.TradeType.JSAPI); + req.setOpenid(bizRQ.getOpenid()); + + // 构造函数响应数据 + WxJsapiOrderRS res = ApiResBuilder.buildSuccess(WxJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayMpOrderResult payResult = wxPayService.createOrder(req); + JSONObject resJSON = (JSONObject) JSON.toJSON(payResult); + resJSON.put("package", payResult.getPackageValue()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxNative.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxNative.java new file mode 100644 index 0000000000000000000000000000000000000000..6f2c1296052e7214e909c28680bc44941c501bf1 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/payway/WxNative.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.payway; + +import com.github.binarywang.wxpay.bean.order.WxPayNativeOrderResult; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxNativeOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxNativeOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 native支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByNativeService") //Service Name需保持全局唯一性 +public class WxNative extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxNativeOrderRQ bizRQ = (WxNativeOrderRQ) rq; + + WxPayUnifiedOrderRequest req = buildUnifiedOrderRequest(payOrder, mchConfigContext); + req.setTradeType(WxPayConstants.TradeType.NATIVE); + + // 构造函数响应数据 + WxNativeOrderRS res = ApiResBuilder.buildSuccess(WxNativeOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + try { + WxPayNativeOrderResult wxPayNativeOrderResult = wxPayService.createOrder(req); + + String codeUrl = wxPayNativeOrderResult.getCodeUrl(); + if (CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(bizRQ.getPayDataType())){ //二维码图片地址 + + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(codeUrl)); + }else{ + + res.setCodeUrl(codeUrl); + } + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxApp.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxApp.java new file mode 100644 index 0000000000000000000000000000000000000000..480841b013a3d2596beadf18d23968daa44a0b67 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxApp.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxAppOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 app支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByAppV3Service") //Service Name需保持全局唯一性 +public class WxApp extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) { + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 构造请求数据 + JSONObject reqJSON = buildV3OrderRequest(payOrder, mchConfigContext); + + String reqUrl; // 请求地址 + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + reqUrl = WxpayV3Util.ISV_URL_MAP.get(WxPayConstants.TradeType.APP); + }else { + reqUrl = WxpayV3Util.NORMALMCH_URL_MAP.get(WxPayConstants.TradeType.APP); + } + + // 构造函数响应数据 + WxAppOrderRS res = ApiResBuilder.buildSuccess(WxAppOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + try { + JSONObject resJSON = WxpayV3Util.unifiedOrderV3(reqUrl, reqJSON, wxPayService.getConfig()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxBar.java new file mode 100644 index 0000000000000000000000000000000000000000..413bd1c6d760012c2a2f597921fd1b2ca75be133 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxBar.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/* + * 微信 条码支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByBarV3Service") //Service Name需保持全局唯一性 +public class WxBar extends WxpayPaymentService { + + @Autowired + private com.jeequan.jeepay.pay.channel.wxpay.payway.WxBar wxBar; + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return wxBar.preCheck(rq, payOrder); + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + return wxBar.pay(rq, payOrder, mchConfigContext); + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxH5.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxH5.java new file mode 100644 index 0000000000000000000000000000000000000000..b88e77f5f45b63d6a3b66bc2fbcc17085f4210c8 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxH5.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxH5OrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxH5OrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 H5支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByH5V3Service") //Service Name需保持全局唯一性 +public class WxH5 extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) { + + WxH5OrderRQ bizRQ = (WxH5OrderRQ) rq; + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 构造请求数据 + JSONObject reqJSON = buildV3OrderRequest(payOrder, mchConfigContext); + + JSONObject sceneInfo = reqJSON.getJSONObject("scene_info"); + + JSONObject h5Info = new JSONObject(); + h5Info.put("type", "iOS, Android, Wap"); + sceneInfo.put("h5_info", h5Info); + + reqJSON.put("scene_info", sceneInfo); + + String reqUrl; // 请求地址 + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + reqUrl = WxpayV3Util.ISV_URL_MAP.get(WxPayConstants.TradeType.MWEB); + }else { + reqUrl = WxpayV3Util.NORMALMCH_URL_MAP.get(WxPayConstants.TradeType.MWEB); + } + + // 构造函数响应数据 + WxH5OrderRS res = ApiResBuilder.buildSuccess(WxH5OrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + try { + JSONObject resJSON = WxpayV3Util.unifiedOrderV3(reqUrl, reqJSON, wxPayService.getConfig()); + + String payUrl = resJSON.getString("h5_url"); + if (CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(bizRQ.getPayDataType())){ //二维码图片地址 + + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(payUrl)); + }else{ // 默认都为 payUrl方式 + + res.setPayUrl(payUrl); + } + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..d2b20dd635e4786c5eceab951840f39957476e74 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxJsapi.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 jsapi支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByJsapiV3Service") //Service Name需保持全局唯一性 +public class WxJsapi extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + // 使用的是V2接口的预先校验 + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 构造请求数据 + JSONObject reqJSON = buildV3OrderRequest(payOrder, mchConfigContext); + + String reqUrl; // 请求地址 + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + reqUrl = WxpayV3Util.ISV_URL_MAP.get(WxPayConstants.TradeType.JSAPI); + + JSONObject payer = new JSONObject(); + payer.put("sp_openid", bizRQ.getOpenid()); + reqJSON.put("payer", payer); + }else { + reqUrl = WxpayV3Util.NORMALMCH_URL_MAP.get(WxPayConstants.TradeType.JSAPI); + + JSONObject payer = new JSONObject(); + payer.put("openid", bizRQ.getOpenid()); + reqJSON.put("payer", payer); + } + + // 构造函数响应数据 + WxJsapiOrderRS res = ApiResBuilder.buildSuccess(WxJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + try { + JSONObject resJSON = WxpayV3Util.unifiedOrderV3(reqUrl, reqJSON, wxPayService.getConfig()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxLite.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxLite.java new file mode 100644 index 0000000000000000000000000000000000000000..32b4c73ac678059645cf76679c45af80cf6f905c --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxLite.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.springframework.stereotype.Service; + +/* + * 微信 小程序 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByLiteV3Service") //Service Name需保持全局唯一性 +public class WxLite extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + // 使用的是V2接口的预先校验 + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception{ + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 构造请求数据 + JSONObject reqJSON = buildV3OrderRequest(payOrder, mchConfigContext); + + String reqUrl; // 请求地址 + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + reqUrl = WxpayV3Util.ISV_URL_MAP.get(WxPayConstants.TradeType.JSAPI); + + JSONObject payer = new JSONObject(); + payer.put("sp_openid", bizRQ.getOpenid()); + reqJSON.put("payer", payer); + }else { + reqUrl = WxpayV3Util.NORMALMCH_URL_MAP.get(WxPayConstants.TradeType.JSAPI); + + JSONObject payer = new JSONObject(); + payer.put("openid", bizRQ.getOpenid()); + reqJSON.put("payer", payer); + } + + // 构造函数响应数据 + WxJsapiOrderRS res = ApiResBuilder.buildSuccess(WxJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + try { + JSONObject resJSON = WxpayV3Util.unifiedOrderV3(reqUrl, reqJSON, wxPayService.getConfig()); + + res.setPayInfo(resJSON.toJSONString()); + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxNative.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxNative.java new file mode 100644 index 0000000000000000000000000000000000000000..f0d4a5083faa70e14c05d11b65142ef9420ea1ab --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/wxpay/paywayV3/WxNative.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.wxpay.paywayV3; + +import com.alibaba.fastjson.JSONObject; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.wxpay.WxpayPaymentService; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayKit; +import com.jeequan.jeepay.pay.channel.wxpay.kits.WxpayV3Util; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxNativeOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxNativeOrderRS; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import org.springframework.stereotype.Service; + +/* + * 微信 native支付 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 18:08 + */ +@Service("wxpayPaymentByNativeV3Service") //Service Name需保持全局唯一性 +public class WxNative extends WxpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) { + + WxNativeOrderRQ bizRQ = (WxNativeOrderRQ) rq; + + WxPayService wxPayService = mchConfigContext.getWxServiceWrapper().getWxPayService(); + + // 构造请求数据 + JSONObject reqJSON = buildV3OrderRequest(payOrder, mchConfigContext); + + String reqUrl; // 请求地址 + if(mchConfigContext.isIsvsubMch()){ // 特约商户 + reqUrl = WxpayV3Util.ISV_URL_MAP.get(WxPayConstants.TradeType.NATIVE); + }else { + reqUrl = WxpayV3Util.NORMALMCH_URL_MAP.get(WxPayConstants.TradeType.NATIVE); + } + + // 构造函数响应数据 + WxNativeOrderRS res = ApiResBuilder.buildSuccess(WxNativeOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 调起上游接口: + // 1. 如果抛异常,则订单状态为: 生成状态,此时没有查单处理操作。 订单将超时关闭 + // 2. 接口调用成功, 后续异常需进行捕捉, 如果 逻辑代码出现异常则需要走完正常流程,此时订单状态为: 支付中, 需要查单处理。 + try { + JSONObject resJSON = WxpayV3Util.unifiedOrderV3(reqUrl, reqJSON, wxPayService.getConfig()); + + String codeUrl = resJSON.getString("code_url"); + if (CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(bizRQ.getPayDataType())){ //二维码图片地址 + + res.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(codeUrl)); + }else{ + + res.setCodeUrl(codeUrl); + } + + // 支付中 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + + } catch (WxPayException e) { + //明确失败 + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + WxpayKit.commonSetErrInfo(channelRetMsg, e); + } + + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayChannelNoticeService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayChannelNoticeService.java new file mode 100644 index 0000000000000000000000000000000000000000..bb77c73b273e58606936dfe68704c74c3b7c523e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayChannelNoticeService.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.ResponseException; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayIsvParams; +import com.jeequan.jeepay.pay.channel.AbstractChannelNoticeService; +import com.jeequan.jeepay.pay.channel.ysfpay.utils.YsfSignUtils; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.model.IsvConfigContext; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import javax.servlet.http.HttpServletRequest; + +/** + * 云闪付回调 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Service +@Slf4j +public class YsfpayChannelNoticeService extends AbstractChannelNoticeService { + + @Override + public String getIfCode() { + return CS.IF_CODE.YSFPAY; + } + + @Override + public MutablePair parseParams(HttpServletRequest request, String urlOrderId, NoticeTypeEnum noticeTypeEnum) { + + try { + + JSONObject params = getReqParamJSON(); + String payOrderId = params.getString("orderNo"); + return MutablePair.of(payOrderId, params); + + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + + @Override + public ChannelRetMsg doNotice(HttpServletRequest request, Object params, PayOrder payOrder, MchConfigContext mchConfigContext, NoticeTypeEnum noticeTypeEnum) { + try { + + ChannelRetMsg result = ChannelRetMsg.confirmSuccess(null); + + String logPrefix = "【处理云闪付支付回调】"; + + // 获取请求参数 + JSONObject jsonParams = (JSONObject) params; + log.info("{} 回调参数, jsonParams:{}", logPrefix, jsonParams); + + // 校验支付回调 + boolean verifyResult = verifyParams(jsonParams, payOrder, mchConfigContext.getIsvConfigContext()); + // 验证参数失败 + if(!verifyResult){ + throw ResponseException.buildText("ERROR"); + } + log.info("{}验证支付通知数据及签名通过", logPrefix); + + //验签成功后判断上游订单状态 + ResponseEntity okResponse = textResp("success"); + result.setResponseEntity(okResponse); + result.setChannelOrderId(jsonParams.getString("transIndex")); + return result; + + } catch (Exception e) { + log.error("error", e); + throw ResponseException.buildText("ERROR"); + } + } + + /** + * 验证云闪付支付通知参数 + * @return + */ + public boolean verifyParams(JSONObject jsonParams, PayOrder payOrder, IsvConfigContext isvConfigContext) { + + String orderNo = jsonParams.getString("orderNo"); // 商户订单号 + String txnAmt = jsonParams.getString("txnAmt"); // 支付金额 + if (StringUtils.isEmpty(orderNo)) { + log.info("订单ID为空 [orderNo]={}", orderNo); + return false; + } + if (StringUtils.isEmpty(txnAmt)) { + log.info("金额参数为空 [txnAmt] :{}", txnAmt); + return false; + } + + YsfpayIsvParams isvParams = isvConfigContext.getIsvParamsByIfCode(getIfCode(), YsfpayIsvParams.class); + //验签 + String ysfpayPublicKey = isvParams.getYsfpayPublicKey(); + + //验签失败 + if(!YsfSignUtils.validate((JSONObject) JSONObject.toJSON(jsonParams), ysfpayPublicKey)) { + log.info("【云闪付回调】 验签失败! 回调参数:parameter = {}, ysfpayPublicKey={} ", jsonParams, ysfpayPublicKey); + return false; + } + + // 核对金额 + long dbPayAmt = payOrder.getAmount().longValue(); + if (dbPayAmt != Long.parseLong(txnAmt)) { + log.info("订单金额与参数金额不符。 dbPayAmt={}, txnAmt={}, payOrderId={}", dbPayAmt, txnAmt, orderNo); + return false; + } + return true; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPayOrderQueryService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPayOrderQueryService.java new file mode 100644 index 0000000000000000000000000000000000000000..98ac31b859e31b25fd0b03372edde2840b89fd48 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPayOrderQueryService.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.IPayOrderQueryService; +import com.jeequan.jeepay.pay.channel.ysfpay.utils.YsfHttpUtil; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * 云闪付查单 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Service +@Slf4j +public class YsfpayPayOrderQueryService implements IPayOrderQueryService { + + @Override + public String getIfCode() { + return CS.IF_CODE.YSFPAY; + } + + @Autowired + private YsfpayPaymentService ysfpayPaymentService; + + @Override + public ChannelRetMsg query(PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + JSONObject reqParams = new JSONObject(); + String orderType = YsfHttpUtil.getOrderTypeByCommon(payOrder.getWayCode()); + String logPrefix = "【云闪付("+orderType+")查单】"; + + try { + reqParams.put("orderNo", payOrder.getPayOrderId()); //订单号 + reqParams.put("orderType", orderType); //订单类型 + + //封装公共参数 & 签名 & 调起http请求 & 返回响应数据并包装为json格式。 + JSONObject resJSON = ysfpayPaymentService.packageParamAndReq("/gateway/api/pay/queryOrder", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + log.info("查询订单 payorderId:{}, 返回结果:{}", payOrder.getPayOrderId(), resJSON); + if(resJSON == null){ + return ChannelRetMsg.waiting(); //支付中 + } + + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String origRespCode = resJSON.getString("origRespCode"); //原交易应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + if(("00").equals(respCode)){//如果查询交易成功 + //00- 支付成功 01- 转入退款 02- 未支付 03- 已关闭 04- 已撤销(付款码支付) 05- 用户支付中 06- 支付失败 + if(("00").equals(origRespCode)){ + + //交易成功,更新商户订单状态 + return ChannelRetMsg.confirmSuccess(resJSON.getString("transIndex")); //支付成功 + + }else if( "02".equals(origRespCode) || "05".equals(origRespCode) ) { + + return ChannelRetMsg.waiting(); //支付中 + } + } + return ChannelRetMsg.waiting(); //支付中 + }catch (Exception e) { + return ChannelRetMsg.waiting(); //支付中 + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPaymentService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPaymentService.java new file mode 100644 index 0000000000000000000000000000000000000000..20e5c82ea08b642982365953e61fea743300ffe7 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/YsfpayPaymentService.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay; + +import cn.hutool.core.date.DatePattern; +import cn.hutool.core.date.DateUtil; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayConfig; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayIsvParams; +import com.jeequan.jeepay.core.model.params.ysf.YsfpayIsvsubMchParams; +import com.jeequan.jeepay.pay.channel.AbstractPaymentService; +import com.jeequan.jeepay.pay.channel.ysfpay.utils.YsfHttpUtil; +import com.jeequan.jeepay.pay.channel.ysfpay.utils.YsfSignUtils; +import com.jeequan.jeepay.pay.config.SystemYmlConfig; +import com.jeequan.jeepay.pay.model.IsvConfigContext; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.util.PaywayUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.File; +import java.util.Date; + +/** + * 云闪付下单 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +@Service +@Slf4j +public class YsfpayPaymentService extends AbstractPaymentService { + + @Autowired private SystemYmlConfig mainConfig; + + @Override + public String getIfCode() { + return CS.IF_CODE.YSFPAY; + } + + @Override + public boolean isSupport(String wayCode) { + return true; + } + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).preCheck(rq, payOrder); + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + return PaywayUtil.getRealPaywayService(this, payOrder.getWayCode()).pay(rq, payOrder, mchConfigContext); + } + + + /** 封装参数 & 统一请求 **/ + public JSONObject packageParamAndReq(String apiUri, JSONObject reqParams, String logPrefix, IsvConfigContext isvConfigContext, MchConfigContext mchConfigContext) throws Exception { + + YsfpayIsvParams isvParams = isvConfigContext.getIsvParamsByIfCode(getIfCode(), YsfpayIsvParams.class); + + if (isvParams.getSerProvId() == null) { + log.error("服务商配置为空:isvParams:{}", isvParams); + throw new BizException("服务商配置为空。"); + } + + reqParams.put("serProvId", isvParams.getSerProvId()); //云闪付服务商标识 + YsfpayIsvsubMchParams isvsubMchParams = mchConfigContext.getIsvsubMchParamsByIfCode(getIfCode(), YsfpayIsvsubMchParams.class); + reqParams.put("merId", isvsubMchParams.getMerId()); // 商户号 + + //签名 + String isvPrivateCertFile = channelCertConfigKitBean.getCertFilePath(isvParams.getIsvPrivateCertFile()); + String isvPrivateCertPwd = isvParams.getIsvPrivateCertPwd(); + reqParams.put("signature", YsfSignUtils.signBy256(reqParams, isvPrivateCertFile, isvPrivateCertPwd)); //RSA 签名串 + + // 调起上游接口 + log.info("{} reqJSON={}", logPrefix, reqParams); + String resText = YsfHttpUtil.doPostJson(getYsfpayHost4env(isvParams) + apiUri, null, reqParams); + log.info("{} resJSON={}", logPrefix, resText); + + if(StringUtils.isEmpty(resText)){ + return null; + } + return JSONObject.parseObject(resText); + } + + /** 获取云闪付正式环境/沙箱HOST地址 **/ + public static String getYsfpayHost4env(YsfpayIsvParams isvParams){ + return CS.YES == isvParams.getSandbox() ? YsfpayConfig.SANDBOX_SERVER_URL : YsfpayConfig.PROD_SERVER_URL; + } + + /** 云闪付 jsapi下单请求统一发送参数 **/ + public static void jsapiParamsSet(JSONObject reqParams, PayOrder payOrder, String notifyUrl, String returnUrl) { + String orderType = YsfHttpUtil.getOrderTypeByJSapi(payOrder.getWayCode()); + reqParams.put("orderType", orderType); //订单类型: alipayJs-支付宝, wechatJs-微信支付, upJs-银联二维码 + ysfPublicParams(reqParams, payOrder); + reqParams.put("backUrl", notifyUrl); //交易通知地址 + reqParams.put("frontUrl", returnUrl); //前台通知地址 + } + + /** 云闪付 bar下单请求统一发送参数 **/ + public static void barParamsSet(JSONObject reqParams, PayOrder payOrder) { + String orderType = YsfHttpUtil.getOrderTypeByBar(payOrder.getWayCode()); + reqParams.put("orderType", orderType); //订单类型: alipay-支付宝, wechat-微信支付, -unionpay银联二维码 + ysfPublicParams(reqParams, payOrder); + // TODO 终端编号暂时写死 + reqParams.put("termId", "01727367"); // 终端编号 + } + + /** 云闪付公共参数赋值 **/ + public static void ysfPublicParams(JSONObject reqParams, PayOrder payOrder) { + //获取订单类型 + reqParams.put("orderNo", payOrder.getPayOrderId()); //订单号 + reqParams.put("orderTime", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN)); //订单时间 如:20180702142900 + reqParams.put("txnAmt", payOrder.getAmount()); //交易金额 单位:分,不带小数点 + reqParams.put("currencyCode", "156"); //交易币种 不出现则默认为人民币-156 + reqParams.put("orderInfo", payOrder.getSubject()); //订单信息 订单描述信息,如:京东生鲜食品 + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliBar.java new file mode 100644 index 0000000000000000000000000000000000000000..b1be32d2d640bdb5921dab715d0f5162890e8cd7 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliBar.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliBarOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliBarOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* +* 云闪付 支付宝 条码支付 +* +* @author pangxiaoyu +* @site https://www.jeepay.vip +* @date 2021/6/8 18:11 +*/ +@Service("ysfPaymentByAliBarService") //Service Name需保持全局唯一性 +public class AliBar extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + AliBarOrderRQ bizRQ = (AliBarOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getAuthCode())){ + throw new BizException("用户支付条码[authCode]不可为空"); + } + + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付条码(alipay)支付】"; + AliBarOrderRQ bizRQ = (AliBarOrderRQ) rq; + AliBarOrderRS res = ApiResBuilder.buildSuccess(AliBarOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + JSONObject reqParams = new JSONObject(); + reqParams.put("authCode", bizRQ.getAuthCode()); //付款码: 用户 APP 展示的付款条码或二维码 + // 云闪付 bar 统一参数赋值 + barParamsSet(reqParams, payOrder); + + //客户端IP + reqParams.put("termInfo", "{\"ip\": \""+StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")+"\"}"); //终端信息 + + // 发送请求 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/micropay", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + try { + + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + res.setPayData(resJSON.getString("payData")); + }else if("02".equals(respCode) ||"12".equals(respCode) || "99".equals(respCode)){ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + channelRetMsg.setNeedQuery(true); // 开启轮询查单 + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..2d6f0f5225a6b67fc9a8d8fc5035b05cf133fecb --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliJsapi.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 云闪付 支付宝 jsapi + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:11 + */ +@Service("ysfpayPaymentByAliJsapiService") //Service Name需保持全局唯一性 +public class AliJsapi extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getBuyerUserId())){ + throw new BizException("[buyerUserId]不可为空"); + } + return null; + } + + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付(alipayJs)jsapi支付】"; + JSONObject reqParams = new JSONObject(); + AliJsapiOrderRS res = ApiResBuilder.buildSuccess(AliJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 请求参数赋值 + jsapiParamsSet(reqParams, payOrder, getNotifyUrl(), getReturnUrl()); + + AliJsapiOrderRQ bizRQ = (AliJsapiOrderRQ) rq; + //云闪付扫一扫支付, 需要传入buyerUserId参数 + reqParams.put("userId", bizRQ.getBuyerUserId()); // buyerUserId + + //客户端IP + reqParams.put("customerIp", StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")); + + // 发送请求并返回订单状态 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/unifiedorder", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + try { + + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + //付款信息 + JSONObject payDataJSON = JSONObject.parseObject(resJSON.getString("payData")); + String tradeNo = ""; + + if(StringUtils.isNotBlank(payDataJSON.getString("tradeNo"))){ + tradeNo = payDataJSON.getString("tradeNo"); + }else{ + String prepayId = payDataJSON.getString("prepayId"); + if(prepayId != null && prepayId.length() > 2){ + tradeNo = prepayId.substring(2); + } + } + res.setAlipayTradeNo(tradeNo); + res.setPayData(payDataJSON.toJSONString()); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxBar.java new file mode 100644 index 0000000000000000000000000000000000000000..12a29e3e67d9cc62643e51c8a9d88ed3f31d6d81 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxBar.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxBarOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxBarOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 云闪付 微信bar + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:11 + */ +@Service("ysfPaymentByWxBarService") //Service Name需保持全局唯一性 +public class WxBar extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + WxBarOrderRQ bizRQ = (WxBarOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getAuthCode())){ + throw new BizException("用户支付条码[authCode]不可为空"); + } + + return null; + } + + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付条码(wechat)支付】"; + + WxBarOrderRQ bizRQ = (WxBarOrderRQ) rq; + WxBarOrderRS res = ApiResBuilder.buildSuccess(WxBarOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + JSONObject reqParams = new JSONObject(); + reqParams.put("authCode", bizRQ.getAuthCode()); //付款码: 用户 APP 展示的付款条码或二维码 + + // 云闪付 bar 统一参数赋值 + barParamsSet(reqParams, payOrder); + + //客户端IP + reqParams.put("termInfo", "{\"ip\": \""+StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")+"\"}"); //终端信息 + + // 发送请求 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/micropay", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + try { + + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + res.setPayData(resJSON.getString("payData")); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + }else if("02".equals(respCode) || "12".equals(respCode) || "99".equals(respCode)){ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + channelRetMsg.setNeedQuery(true); // 开启轮询查单 + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..e3c3a50230c150b6b120789ebfa5a87714c80f6d --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/WxJsapi.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 云闪付 微信jsapi + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:11 + */ +@Service("ysfpayPaymentByWxJsapiService") //Service Name需保持全局唯一性 +public class WxJsapi extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getOpenid())){ + throw new BizException("[openId]不可为空"); + } + return null; + } + + @Override + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付(wechatJs)jsapi支付】"; + JSONObject reqParams = new JSONObject(); + WxJsapiOrderRS res = ApiResBuilder.buildSuccess(WxJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + // 请求参数赋值 + jsapiParamsSet(reqParams, payOrder, getNotifyUrl(), getReturnUrl()); + + WxJsapiOrderRQ bizRQ = (WxJsapiOrderRQ) rq; + //云闪付扫一扫支付, 需要传入openId参数 + reqParams.put("userId", bizRQ.getOpenid()); // openId + + //客户端IP + reqParams.put("customerIp", StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")); + + // 发送请求并返回订单状态 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/unifiedorder", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + + try { + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + //付款信息 + res.setPayInfo(resJSON.getString("payData")); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfBar.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfBar.java new file mode 100644 index 0000000000000000000000000000000000000000..166eca767ef20ce92f789fe2ece890212a57d740 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfBar.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfBarOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfBarOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 云闪付 云闪付条码支付 + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:11 + */ +@Service("ysfPaymentByYsfBarService") //Service Name需保持全局唯一性 +public class YsfBar extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + + YsfBarOrderRQ bizRQ = (YsfBarOrderRQ) rq; + if(StringUtils.isEmpty(bizRQ.getAuthCode())){ + throw new BizException("用户支付条码[authCode]不可为空"); + } + + return null; + } + + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付条码(unionpay)支付】"; + + YsfBarOrderRQ bizRQ = (YsfBarOrderRQ) rq; + YsfBarOrderRS res = ApiResBuilder.buildSuccess(YsfBarOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + JSONObject reqParams = new JSONObject(); + reqParams.put("authCode", bizRQ.getAuthCode()); //付款码: 用户 APP 展示的付款条码或二维码 + + // 云闪付 bar 统一参数赋值 + barParamsSet(reqParams, payOrder); + + //客户端IP + reqParams.put("termInfo", "{\"ip\": \""+StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")+"\"}"); //终端信息 + + // 发送请求 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/micropay", reqParams, logPrefix, mchConfigContext.getIsvConfigContext(), mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + + try { + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + res.setPayData(resJSON.getString("payData")); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS); + }else if("02".equals(respCode) ||"12".equals(respCode) || "99".equals(respCode)){ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + channelRetMsg.setNeedQuery(true); // 开启轮询查单 + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfJsapi.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfJsapi.java new file mode 100644 index 0000000000000000000000000000000000000000..8e8d84e9eca2897c22314fdb2432a9bb9f45f4eb --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/YsfJsapi.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.payway; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfJsapiOrderRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.util.ApiResBuilder; +import com.jeequan.jeepay.pay.model.IsvConfigContext; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +/* + * 云闪付 jsapi + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 18:11 + */ +@Service("ysfpayPaymentByJsapiService") //Service Name需保持全局唯一性 +public class YsfJsapi extends YsfpayPaymentService { + + @Override + public String preCheck(UnifiedOrderRQ rq, PayOrder payOrder) { + return null; + } + + public AbstractRS pay(UnifiedOrderRQ rq, PayOrder payOrder, IsvConfigContext isvConfigContext, MchConfigContext mchConfigContext) throws Exception { + String logPrefix = "【云闪付(unionpay)jsapi支付】"; + JSONObject reqParams = new JSONObject(); + YsfJsapiOrderRS res = ApiResBuilder.buildSuccess(YsfJsapiOrderRS.class); + ChannelRetMsg channelRetMsg = new ChannelRetMsg(); + res.setChannelRetMsg(channelRetMsg); + + YsfJsapiOrderRQ bizRQ = (YsfJsapiOrderRQ) rq; + + // 请求参数赋值 + jsapiParamsSet(reqParams, payOrder, getNotifyUrl(), getReturnUrl()); + //云闪付扫一扫支付, 需要传入termInfo参数 + reqParams.put("termInfo", "{\"ip\": \""+StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")+"\"}"); + + //客户端IP + reqParams.put("customerIp", StringUtils.defaultIfEmpty(payOrder.getClientIp(), "127.0.0.1")); + // 发送请求并返回订单状态 + JSONObject resJSON = packageParamAndReq("/gateway/api/pay/unifiedorder", reqParams, logPrefix, isvConfigContext, mchConfigContext); + //请求 & 响应成功, 判断业务逻辑 + String respCode = resJSON.getString("respCode"); //应答码 + String respMsg = resJSON.getString("respMsg"); //应答信息 + + try { + //00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败 + if("00".equals(respCode)){ + //付款信息 + res.setPayData(resJSON.getString("payData")); + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.WAITING); + }else{ + channelRetMsg.setChannelState(ChannelRetMsg.ChannelState.CONFIRM_FAIL); + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + }catch (Exception e) { + channelRetMsg.setChannelErrCode(respCode); + channelRetMsg.setChannelErrMsg(respMsg); + } + return res; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfHttpUtil.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfHttpUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..ad6c0f3259235c4ea881e7e7fd7a699d0bb735af --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfHttpUtil.java @@ -0,0 +1,451 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.utils; + +import com.alibaba.fastjson.JSON; +import com.jeequan.jeepay.core.constants.CS; + +import javax.activation.MimetypesFileTypeMap; +import javax.net.ssl.*; +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.security.SecureRandom; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +/* +* 参考云闪付demo实现的 httputils +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:25 +*/ +public class YsfHttpUtil { + + private static final String DEFAULT_CHARSET = "UTF-8"; + private static final int DEFAULT_TIMEOUT = 60 * 1000; // 60 秒超时 + + public static String doGet(String url) throws Exception { + return doGet(url, null); + } + + public static String doGet(String url, Map params) throws Exception { + return doGet(url, params, null); + } + + public static String doGet(String url, Map headers, Map params) throws Exception { + String getUrl = buildGetUrl(url, params); + return doRequest(getUrl, "GET", headers, null); + } + + public static String doPost(String url) throws Exception { + return doPost(url, null); + } + + public static String doPost(String url, Map params) throws Exception { + return doPost(url, null, params); + } + + public static String doPost(String url, Map headers, Map params) throws Exception { + return doPostStr(url, headers, buildQueryParams(params)); + } + + public static String doPostStr(String url, Map headers, String data) throws Exception { + return doRequest(url, "POST", headers, data); + } + + public static String doPostJson(String url, Map headers, Map params) throws Exception { + if (headers == null) { + headers = new HashMap(); + } + if (!headers.containsKey("Content-Type")) { + headers.put("Content-Type", "application/json; charset=" + DEFAULT_CHARSET); + } + return doPostStr(url, headers, JSON.toJSONString(params)); + } + + public static String doPostFile(String url, Map headers, Map params, Map fileParams) throws Exception { + HttpURLConnection http = null; + InputStream in = null; + OutputStream out = null; + try { + String boundary = String.valueOf(System.currentTimeMillis()); // 随机分隔线 + + http = getHttpConnection(url, "POST"); + http.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary + ";charset=" + DEFAULT_CHARSET); + + // 添加HTTP请求头 + if (headers != null && !headers.isEmpty()) { + for (Entry entry : headers.entrySet()) { + http.setRequestProperty(entry.getKey(), entry.getValue().toString()); + } + } + + out = http.getOutputStream(); + + // 组装文本请求参数 + byte[] entryBoundaryBytes = ("\r\n--" + boundary + "\r\n").getBytes(DEFAULT_CHARSET); + if (params != null && !params.isEmpty()) { + for (Entry textEntry : params.entrySet()) { + byte[] textBytes = getTextEntry(textEntry.getKey(), String.valueOf(textEntry.getValue())); + out.write(entryBoundaryBytes); + out.write(textBytes); + } + } + + // 组装文件请求参数 + if (fileParams != null && !fileParams.isEmpty()) { + for (Entry fileEntry : fileParams.entrySet()) { + FileItem fileItem = fileEntry.getValue(); + byte[] fileBytes = getFileEntry(fileEntry.getKey(), fileItem.getFileName(), fileItem.getMimeType()); + out.write(entryBoundaryBytes); + out.write(fileBytes); + out.write(fileItem.getContent()); + } + } + + // 添加请求结束标志 + byte[] endBoundaryBytes = ("\r\n--" + boundary + "--\r\n").getBytes(DEFAULT_CHARSET); + out.write(endBoundaryBytes); + out.flush(); + + in = http.getInputStream(); + return getStreamAsString(in); + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } + try { + if (out != null) { + out.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } + try { + if (http != null) { + http.disconnect(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + public static String doRequest(String url, String method, Map headers, String data) throws Exception { + HttpURLConnection http = null; + InputStream in = null; + OutputStream out = null; + try { + http = getHttpConnection(url, method); + if (headers != null && !headers.isEmpty()) { + for (Entry entry : headers.entrySet()) { + http.setRequestProperty(entry.getKey(), entry.getValue().toString()); + } + } + if (data != null && !data.trim().isEmpty()) { + out = http.getOutputStream(); + out.write(data.getBytes(DEFAULT_CHARSET)); + out.flush(); + } + in = http.getInputStream(); + return getStreamAsString(in); + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } + try { + if (out != null) { + out.close(); + } + } catch (Exception e) { + e.printStackTrace(); + } + try { + if (http != null) { + http.disconnect(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private static HttpURLConnection getHttpConnection(String url, String method) throws Exception { + boolean isSSL = url.startsWith("https"); + if (isSSL) { + SSLContext sslContext = SSLContext.getInstance("SSL"); + sslContext.init(new KeyManager[0], new TrustManager[] { new SimpleTrustManager() }, new SecureRandom()); + SSLSocketFactory sslf = sslContext.getSocketFactory(); + + HttpsURLConnection https = (HttpsURLConnection) new URL(url).openConnection(); + https.setHostnameVerifier(new SimpleHostnameVerifier()); + https.setSSLSocketFactory(sslf); + + https.setRequestMethod(method); + https.setDoOutput(true); + https.setDoInput(true); + https.setUseCaches(false); + + https.setConnectTimeout(DEFAULT_TIMEOUT); + https.setReadTimeout(DEFAULT_TIMEOUT); + + return https; + } else { + HttpURLConnection http = (HttpURLConnection) new URL(url).openConnection(); + http.setRequestMethod(method); + http.setDoOutput(true); + http.setDoInput(true); + http.setUseCaches(false); + + http.setConnectTimeout(DEFAULT_TIMEOUT); + http.setReadTimeout(DEFAULT_TIMEOUT); + + return http; + } + } + + private static String getStreamAsString(InputStream in) throws Exception { + BufferedReader reader = null; + try { + reader = new BufferedReader(new InputStreamReader(in, DEFAULT_CHARSET)); + StringBuilder buffer = new StringBuilder(); + String line = null; + while ((line = reader.readLine()) != null) { + buffer.append(line); + } + return buffer.toString(); + } finally { + if (reader != null) { + reader.close(); + } + } + } + + private static String buildGetUrl(String url, Map params) throws Exception { + String queryParams = buildQueryParams(params); + if (null == queryParams || queryParams.isEmpty()) { + return url; + } + StringBuilder sb = new StringBuilder(); + if (url.endsWith("?")) { + sb.append(url).append(queryParams); + } else { + sb.append(url).append("?").append(queryParams); + } + return sb.toString(); + } + + private static String buildQueryParams(Map params) throws Exception { + if (null == params || params.isEmpty()) { + return null; + } + StringBuilder query = new StringBuilder(); + boolean hasParam = false; + for (Entry entry : params.entrySet()) { + Object v = entry.getValue(); + if (v == null) { + continue; + } + if (hasParam) { + query.append("&"); + } else { + hasParam = true; + } + query.append(entry.getKey()).append("=").append(URLEncoder.encode(v.toString(), DEFAULT_CHARSET)); + } + return query.toString(); + } + + private static byte[] getTextEntry(String fieldName, String fieldValue) throws Exception { + StringBuilder entry = new StringBuilder(); + entry.append("Content-Disposition:form-data; name=\""); + entry.append(fieldName); + entry.append("\"\r\nContent-Type:text/plain\r\n\r\n"); + entry.append(fieldValue); + return entry.toString().getBytes(DEFAULT_CHARSET); + } + + private static byte[] getFileEntry(String fieldName, String fileName, String mimeType) throws Exception { + StringBuilder entry = new StringBuilder(); + entry.append("Content-Disposition:form-data; name=\""); + entry.append(fieldName); + entry.append("\"; filename=\""); + entry.append(fileName); + entry.append("\"\r\nContent-Type:"); + entry.append(mimeType); + entry.append("\r\n\r\n"); + return entry.toString().getBytes(DEFAULT_CHARSET); + } + + private static class SimpleHostnameVerifier implements HostnameVerifier { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + } + + private static class SimpleTrustManager implements X509TrustManager { + @Override + public X509Certificate[] getAcceptedIssuers() { + return null; + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + } + } + + + public static class FileItem { + + private String fileName; + private String mimeType; + private byte[] content; + + public FileItem() { + } + + public FileItem(String fileName, byte[] content) { + this.fileName = fileName; + this.content = content; + } + + public FileItem(String fileName, byte[] content, String mimeType) { + this.fileName = fileName; + this.content = content; + this.mimeType = mimeType; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public String getMimeType() { + if (mimeType == null) { + mimeType = getContentType(fileName); + } + return mimeType; + } + + public void setMimeType(String mimeType) { + this.mimeType = mimeType; + } + + public byte[] getContent() { + return content; + } + + public void setContent(byte[] content) { + this.content = content; + } + + private String getContentType(String fileName) { + String defaultType = "application/octet-stream"; + if (fileName == null || fileName.isEmpty()) { + return defaultType; + } + String contentType = null; + try { + Path path = Paths.get(fileName); + contentType = Files.probeContentType(path); + } catch (Exception e) { + e.printStackTrace(); + } + if (contentType == null || contentType.isEmpty()) { + contentType = new MimetypesFileTypeMap().getContentType(fileName); + } + return contentType; + } + } + + /** 云闪付条码付 封装参数,orderType **/ + public static String getOrderTypeByBar(String wayCode){ + + if(CS.PAY_WAY_CODE.ALI_BAR.equals(wayCode)){ + return "alipay"; + + }else if(CS.PAY_WAY_CODE.WX_BAR.equals(wayCode)){ + return "wechat"; + + }else if(CS.PAY_WAY_CODE.YSF_BAR.equals(wayCode)){ + return "unionpay"; + } + + return null; + } + + /** 云闪付jsapi对应的订单类型 **/ + public static String getOrderTypeByJSapi(String wayCode){ + + if(CS.PAY_WAY_CODE.ALI_JSAPI.equals(wayCode)){ + return "alipayJs"; + + }else if(CS.PAY_WAY_CODE.WX_JSAPI.equals(wayCode)){ + return "wechatJs"; + + }else if(CS.PAY_WAY_CODE.YSF_JSAPI.equals(wayCode)){ + return "upJs"; + } + + return null; + } + + /** 云闪付通用订单类型, 如查单 **/ + public static String getOrderTypeByCommon(String wayCode){ + + if(CS.PAY_WAY_CODE.ALI_JSAPI.equals(wayCode) || CS.PAY_WAY_CODE.ALI_BAR.equals(wayCode)){ + return "alipay"; + + }else if(CS.PAY_WAY_CODE.WX_JSAPI.equals(wayCode) || CS.PAY_WAY_CODE.WX_BAR.equals(wayCode)){ + return "wechat"; + + }else if(CS.PAY_WAY_CODE.YSF_JSAPI.equals(wayCode) || CS.PAY_WAY_CODE.YSF_BAR.equals(wayCode)){ + return "unionpay"; + } + return null; + } + + + +} \ No newline at end of file diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfSignUtils.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfSignUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..06cf448e5c9232b99c772c4784773b6319eade68 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/utils/YsfSignUtils.java @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.channel.ysfpay.utils; + +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.lang3.StringUtils; +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.FileInputStream; +import java.io.IOException; +import java.security.*; +import java.security.spec.X509EncodedKeySpec; +import java.util.Enumeration; +import java.util.TreeMap; + +/** + * 银联接口签名工具类 + * + * @author terrfly + * @modify pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021-06-07 07:15 + */ +public class YsfSignUtils { + + private static final String KEYSTORE_TYPE_PKCS12 = "PKCS12"; //私钥类型 + private static final String KEYSTORE_PROVIDER_BC = "BC"; //提供商 + private static final String ALGORITHM_SHA256WITHRSA = "SHA256withRSA"; //签名算法 sha256 + + private static final String CERTIFICATE_TYPE_X509 = "X.509"; //公钥证书类型 + + private static final Logger logger = LoggerFactory.getLogger(YsfSignUtils.class); + static { + try { + Security.addProvider(new BouncyCastleProvider()); + } catch (Exception e) { + logger.error("addProvider Error", e); + } + } + + /** 签名 + * 注意事项: 签名需商户申请 5.1.0版本证书; + * 文档: https://open.unionpay.com/tjweb/acproduct/list?apiSvcId=468&index=2 + * 1. 排序并拼接为[key=value]格式; + * 2. 对原始签名串使用SHA-256算法做摘要 + * 3. 使用商户私钥做签名(使用 SHA-256) + * 4. 进行Base64处理 + * **/ + public static String signBy256(JSONObject params, String privateKeyFilePath, String certPwd) { + + try { + + //0. 将请求参数 转换成key1=value1&key2=value2的形式 + String stringSign = convertSignString(params); + + //1. 通过SHA256进行摘要并转16进制 + byte[] signDigest = sha256X16(stringSign, "UTF-8"); + + //2. /获取私钥证书的key + PrivateKey privateKey = getSignCertPrivateKey(privateKeyFilePath, certPwd); + + //3. 使用 SHA-256算法 进行签名 + Signature st = Signature.getInstance(ALGORITHM_SHA256WITHRSA, KEYSTORE_PROVIDER_BC); + st.initSign(privateKey); + st.update(signDigest); + byte[] result = st.sign(); + + //4. 做base64 处理 + byte[] byteSign = Base64.encodeBase64(result); + return new String(byteSign); + + } catch (Exception e) { + logger.error("银联签名失败", e); + return null; + } + } + + + /** 验签 **/ + public static boolean validate(JSONObject params, String ysfpayPublicKey){ + + //签名串 + String signature = params.getString("signature"); + + // 将请求参数信息转换成key1=value1&key2=value2的形式 + String stringData = convertSignString(params); + try { + + //1. 通过SHA256进行摘要并转16进制 + byte[] signDigest = sha256X16(stringData, "UTF-8"); + + //构造公钥证书 + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + byte[] encodedKey = Base64.decodeBase64(ysfpayPublicKey); + PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey)); + + Signature st = Signature.getInstance(ALGORITHM_SHA256WITHRSA); + st.initVerify(pubKey); //公钥 + st.update(signDigest); + return st.verify(Base64.decodeBase64(signature.getBytes("UTF-8"))); + + } catch (Exception e) { + logger.error("验签失败!", e); + } + return false; + } + + /** 进件验签 **/ + public static boolean applyValidate(JSONObject params, String ysfpayPublicKey){ + + //签名串 + String signature = params.getString("signature"); + + // 将请求参数信息转换成key1=value1&key2=value2的形式 + String stringData = convertSignApplyNotifyString(params); + try { + + //1. 通过SHA256进行摘要并转16进制 + byte[] signDigest = sha256X16(stringData, "UTF-8"); + + //构造公钥证书 + KeyFactory keyFactory = KeyFactory.getInstance("RSA"); + byte[] encodedKey = Base64.decodeBase64(ysfpayPublicKey); + PublicKey pubKey = keyFactory.generatePublic(new X509EncodedKeySpec(encodedKey)); + + Signature st = Signature.getInstance(ALGORITHM_SHA256WITHRSA); + st.initVerify(pubKey); //公钥 + st.update(signDigest); + return st.verify(Base64.decodeBase64(signature.getBytes("UTF-8"))); + + } catch (Exception e) { + logger.error("验签失败!", e); + } + return false; + } + + /** 进件回调 将JSON中的数据转换成key1=value1&key2=value2的形式,忽略null内容 和 signature字段* */ + private static String convertSignApplyNotifyString(JSONObject params) { + TreeMap tree = new TreeMap<>(); + + //1. 所有参数进行排序 + params.keySet().stream().forEach( key -> tree.put(key, params.get(key))); + + //2. 拼接为 key=value&形式 + StringBuffer stringBuffer = new StringBuffer(); + tree.keySet().stream().forEach( key -> { + + if (tree.get(key) == null) { + return ; + } + if("signature".equals(key)){ //签名串, 不参与签名 + return ; + } + + stringBuffer.append(key).append("=").append(tree.get(key).toString()).append("&"); + }); + + //3. 去掉最后一个& + return stringBuffer.substring(0, stringBuffer.length() - 1); + } + + + /** 将JSON中的数据转换成key1=value1&key2=value2的形式, 忽略空内容 和 signature字段 **/ + private static String convertSignString(JSONObject params) { + TreeMap tree = new TreeMap<>(); + + //1. 所有参数进行排序 + params.keySet().stream().forEach( key -> tree.put(key, params.get(key))); + + //2. 拼接为 key=value&形式 + StringBuffer stringBuffer = new StringBuffer(); + tree.keySet().stream().forEach( key -> { + + if (tree.get(key) == null) { + return ; + } + if(StringUtils.isAnyEmpty(key, tree.get(key).toString())){ //空值, 不参与签名 + return ; + } + if("signature".equals(key)){ //签名串, 不参与签名 + return ; + } + + stringBuffer.append(key).append("=").append(tree.get(key).toString()).append("&"); + }); + + //3. 去掉最后一个& + return stringBuffer.substring(0, stringBuffer.length() - 1); + } + + /** 通过SHA256进行摘要并转16进制 **/ + private static byte[] sha256X16(String data, String encoding) throws Exception { + MessageDigest md = MessageDigest.getInstance("SHA-256"); + md.reset(); + md.update(data.getBytes(encoding)); + byte[] bytes = md.digest(); + + StringBuilder sha256StrBuff = new StringBuilder(); + for (int i = 0; i < bytes.length; i++) { + if (Integer.toHexString(0xFF & bytes[i]).length() == 1) { + sha256StrBuff.append("0").append(Integer.toHexString(0xFF & bytes[i])); + } else { + sha256StrBuff.append(Integer.toHexString(0xFF & bytes[i])); + } + } + return sha256StrBuff.toString().toLowerCase().getBytes(encoding); + } + + /** 获取证书私钥 **/ + private static PrivateKey getSignCertPrivateKey(String pfxkeyfile, String keypwd) { + FileInputStream fis = null; + + try { + KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE_PKCS12, KEYSTORE_PROVIDER_BC); + fis = new FileInputStream(pfxkeyfile); + char[] nPassword = null == keypwd || "".equals(keypwd.trim()) ? null: keypwd.toCharArray(); + if (null != keyStore) { + keyStore.load(fis, nPassword); + } + Enumeration aliasenum = keyStore.aliases(); + String keyAlias = null; + if (aliasenum.hasMoreElements()) { + keyAlias = aliasenum.nextElement(); + } + PrivateKey privateKey = (PrivateKey) keyStore.getKey(keyAlias, keypwd.toCharArray()); + return privateKey; + } catch (Exception e) { + logger.error("获取证书私钥失败!", e); + return null; + }finally { + if(null!=fis) { + try { + fis.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/RedisConfig.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/RedisConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..5220e7c4d4e6e2ca99b6b19f05c1d4d25347343b --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/RedisConfig.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.config; + +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; + +/* +* RedisConfig +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:25 +*/ +@Configuration +public class RedisConfig { + + @Value("${spring.redis.host}") + private String host; + + @Value("${spring.redis.port}") + private Integer port; + + @Value("${spring.redis.timeout}") + private Integer timeout; + + @Value("${spring.redis.database}") + private Integer defaultDatabase; + + @Value("${spring.redis.password}") + private String password; + + /** 当前系统的redis缓存操作对象 (主对象) **/ + @Primary + @Bean(name = "defaultStringRedisTemplate") + public StringRedisTemplate sysStringRedisTemplate() { + StringRedisTemplate template = new StringRedisTemplate(); + + LettuceConnectionFactory jedisConnectionFactory = new LettuceConnectionFactory(); + jedisConnectionFactory.setHostName(host); + jedisConnectionFactory.setPort(port); + jedisConnectionFactory.setTimeout(timeout); + + if (!StringUtils.isEmpty(password)) { + jedisConnectionFactory.setPassword(password); + } + + if (defaultDatabase != 0) { + jedisConnectionFactory.setDatabase(defaultDatabase); + } + + jedisConnectionFactory.afterPropertiesSet(); + + template.setConnectionFactory(jedisConnectionFactory); + return template; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/SystemYmlConfig.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/SystemYmlConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..b55747f92870ca95e703ca9b51256976cc172690 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/SystemYmlConfig.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; +import org.springframework.stereotype.Component; + +/** + * 系统Yml配置参数定义Bean + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021-04-27 15:50 + */ +@Component +@ConfigurationProperties(prefix="isys") +@Data +public class SystemYmlConfig { + + /** 是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] **/ + private Boolean allowCors; + + @NestedConfigurationProperty //指定该属性为嵌套值, 否则默认为简单值导致对象为空(外部类不存在该问题, 内部static需明确指定) + private OssFile ossFile; + + /** 系统oss配置信息 **/ + @Data + public static class OssFile{ + + /** 存储根路径 **/ + private String rootPath; + + /** 公共读取块 **/ + private String publicPath; + + /** 私有读取块 **/ + private String privatePath; + + } + +} \ No newline at end of file diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/ApiController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/ApiController.java new file mode 100644 index 0000000000000000000000000000000000000000..642d6b622820b10a2eb1b43dab01c1118ebe5498 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/ApiController.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.ctrls.AbstractCtrl; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.AbstractRQ; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.service.ValidateService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + +/* +* api 抽象接口, 公共函数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:28 +*/ +public abstract class ApiController extends AbstractCtrl { + + @Autowired private ValidateService validateService; + @Autowired private ConfigContextService configContextService; + + + /** 获取请求参数并转换为对象,通用验证 **/ + protected T getRQ(Class cls){ + + T bizRQ = getObject(cls); + + // [1]. 验证通用字段规则 + validateService.validate(bizRQ); + + return bizRQ; + } + + + /** 获取请求参数并转换为对象,商户通用验证 **/ + protected T getRQByWithMchSign(Class cls){ + + //获取请求RQ, and 通用验证 + T bizRQ = getRQ(cls); + + // 转换为 JSON + JSONObject bizReqJSON = (JSONObject)JSONObject.toJSON(bizRQ); + + // [2]. 业务校验, 包括: 验签, 商户状态是否可用, 是否支持该支付方式下单等。 + String mchNo = bizReqJSON.getString("mchNo"); + String sign = bizRQ.getSign(); + + if(StringUtils.isAnyEmpty(mchNo, sign)){ + throw new BizException("参数有误!"); + } + + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + + MchInfo mchInfo = mchConfigContext == null ? null : mchConfigContext.getMchInfo(); + if(mchInfo == null || mchInfo.getState() != CS.YES){ + throw new BizException("商户不存在或商户状态不可用"); + } + + // 验签 + String privateKey = mchInfo.getPrivateKey(); + + bizReqJSON.remove("sign"); + if(!sign.equalsIgnoreCase(JeepayKit.getSign(bizReqJSON, privateKey))){ + throw new BizException("验签失败"); + } + + return bizRQ; + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/AbstractPayOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/AbstractPayOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..167c00d4fbf039f1c9b22633a951725c5160874e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/AbstractPayOrderController.java @@ -0,0 +1,358 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder; + +import cn.hutool.core.date.DateUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.MchPayPassage; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.SeqKit; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.pay.channel.IPaymentService; +import com.jeequan.jeepay.pay.ctrl.ApiController; +import com.jeequan.jeepay.pay.exception.ChannelException; +import com.jeequan.jeepay.pay.model.IsvConfigContext; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.mq.queue.MqQueue4ChannelOrderQuery; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.QrCashierOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.QrCashierOrderRS; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.service.PayMchNotifyService; +import com.jeequan.jeepay.service.impl.MchPayPassageService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.SysConfigService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Date; + +/* +* 创建支付订单抽象类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:26 +*/ +@Slf4j +public abstract class AbstractPayOrderController extends ApiController { + + @Autowired private MchPayPassageService mchPayPassageService; + @Autowired private PayOrderService payOrderService; + @Autowired private ConfigContextService configContextService; + @Autowired private PayMchNotifyService payMchNotifyService; + @Autowired private SysConfigService sysConfigService; + @Autowired private MqQueue4ChannelOrderQuery mqChannelOrderQueryQueue; + + /** 统一下单 (新建订单模式) **/ + protected ApiRes unifiedOrder(String wayCode, UnifiedOrderRQ bizRQ){ + return unifiedOrder(wayCode, bizRQ, null); + } + + /** 统一下单 **/ + protected ApiRes unifiedOrder(String wayCode, UnifiedOrderRQ bizRQ, PayOrder payOrder){ + + // 响应数据 + UnifiedOrderRS bizRS = null; + + //是否新订单模式 [ 一般接口都为新订单模式, 由于QR_CASHIER支付方式,需要先 在DB插入一个新订单, 导致此处需要特殊判断下。 如果已存在则直接更新,否则为插入。 ] + boolean isNewOrder = payOrder == null; + + try { + + if(payOrder != null){ //当订单存在时,封装公共参数。 + + if(payOrder.getState() != PayOrder.STATE_INIT){ + throw new BizException("订单状态异常"); + } + + payOrder.setWayCode(wayCode); // 需要将订单更新 支付方式 + bizRQ.setMchNo(payOrder.getMchNo()); + bizRQ.setMchOrderNo(payOrder.getMchOrderNo()); + bizRQ.setWayCode(wayCode); + bizRQ.setAmount(payOrder.getAmount()); + bizRQ.setCurrency(payOrder.getCurrency()); + bizRQ.setClientIp(payOrder.getClientIp()); + bizRQ.setSubject(payOrder.getSubject()); + bizRQ.setNotifyUrl(payOrder.getNotifyUrl()); + bizRQ.setReturnUrl(payOrder.getReturnUrl()); + bizRQ.setChannelExtra(payOrder.getChannelExtra()); + bizRQ.setChannelUser(payOrder.getChannelUser()); + bizRQ.setExtParam(payOrder.getExtParam()); + } + + String mchNo = bizRQ.getMchNo(); + + // 只有新订单模式,进行校验 + if(isNewOrder && payOrderService.count(PayOrder.gw().eq(PayOrder::getMchNo, mchNo).eq(PayOrder::getMchOrderNo, bizRQ.getMchOrderNo())) > 0){ + throw new BizException("商户订单["+bizRQ.getMchOrderNo()+"]已存在"); + } + + //获取支付参数 (缓存数据) 和 商户信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + if(mchConfigContext == null){ + throw new BizException("获取商户信息失败"); + } + + MchInfo mchInfo = mchConfigContext.getMchInfo(); + + //收银台支付并且只有新订单需要走这里, 收银台二次下单的wayCode应该为实际支付方式。 + if(isNewOrder && CS.PAY_WAY_CODE.QR_CASHIER.equals(wayCode)){ + + //生成订单 + payOrder = genPayOrder(bizRQ, mchInfo, null); + String payOrderId = payOrder.getPayOrderId(); + //订单入库 订单状态: 生成状态 此时没有和任何上游渠道产生交互。 + payOrderService.save(payOrder); + + QrCashierOrderRS qrCashierOrderRS = new QrCashierOrderRS(); + QrCashierOrderRQ qrCashierOrderRQ = (QrCashierOrderRQ)bizRQ; + + String payUrl = sysConfigService.getDBApplicationConfig().genUniJsapiPayUrl(payOrderId); + if(CS.PAY_DATA_TYPE.CODE_IMG_URL.equals(qrCashierOrderRQ.getPayDataType())){ //二维码地址 + qrCashierOrderRS.setCodeImgUrl(sysConfigService.getDBApplicationConfig().genScanImgUrl(payUrl)); + + }else{ //默认都为跳转地址方式 + qrCashierOrderRS.setPayUrl(payUrl); + } + + return packageApiResByPayOrder(bizRQ, qrCashierOrderRS, payOrder); + } + + //获取支付接口 + IPaymentService paymentService = checkMchWayCodeAndGetService(mchConfigContext, wayCode); + String ifCode = paymentService.getIfCode(); + + //生成订单 + if(isNewOrder){ + payOrder = genPayOrder(bizRQ, mchInfo, ifCode); + }else{ + payOrder.setIfCode(ifCode); + } + + //预先校验 + String errMsg = paymentService.preCheck(bizRQ, payOrder); + if(StringUtils.isNotEmpty(errMsg)){ + throw new BizException(errMsg); + } + + if(isNewOrder){ + //订单入库 订单状态: 生成状态 此时没有和任何上游渠道产生交互。 + payOrderService.save(payOrder); + } + + //调起上游支付接口 + bizRS = (UnifiedOrderRS) paymentService.pay(bizRQ, payOrder, mchConfigContext); + + //处理上游返回数据 + this.processChannelMsg(bizRS.getChannelRetMsg(), payOrder); + + return packageApiResByPayOrder(bizRQ, bizRS, payOrder); + + } catch (BizException e) { + return ApiRes.customFail(e.getMessage()); + + } catch (ChannelException e) { + + //处理上游返回数据 + this.processChannelMsg(e.getChannelRetMsg(), payOrder); + + if(e.getChannelRetMsg().getChannelState() == ChannelRetMsg.ChannelState.SYS_ERROR ){ + return ApiRes.customFail(e.getMessage()); + } + + return this.packageApiResByPayOrder(bizRQ, bizRS, payOrder); + + + } catch (Exception e) { + log.error("系统异常:{}", e); + return ApiRes.customFail("系统异常"); + } + } + + private PayOrder genPayOrder(UnifiedOrderRQ rq, MchInfo mchInfo, String ifCode){ + + PayOrder payOrder = new PayOrder(); + payOrder.setPayOrderId(SeqKit.genPayOrderId()); //生成订单ID + payOrder.setMchNo(mchInfo.getMchNo()); //商户号 + payOrder.setIsvNo(mchInfo.getIsvNo()); //服务商号 + payOrder.setMchName(mchInfo.getMchShortName()); //商户名称(简称) + payOrder.setMchType(mchInfo.getType()); //商户类型 + payOrder.setMchOrderNo(rq.getMchOrderNo()); //商户订单号 + payOrder.setIfCode(ifCode); //接口代码 + payOrder.setWayCode(rq.getWayCode()); //支付方式 + payOrder.setAmount(rq.getAmount()); //订单金额 + payOrder.setCurrency(rq.getCurrency()); //币种 + payOrder.setState(PayOrder.STATE_INIT); //订单状态, 默认订单生成状态 + payOrder.setClientIp(StringUtils.defaultIfEmpty(rq.getClientIp(), getClientIp())); //客户端IP + payOrder.setSubject(rq.getSubject()); //商品标题 + payOrder.setBody(rq.getBody()); //商品描述信息 +// payOrder.setChannelExtra(rq.getChannelExtra()); //特殊渠道发起的附件额外参数, 是否应该删除该字段了?? 比如authCode不应该记录, 只是在传输阶段存在的吧? 之前的为了在payOrder对象需要传参。 + payOrder.setChannelUser(rq.getChannelUser()); //渠道用户标志 + payOrder.setDivisionFlag(CS.NO); //分账标志, 默认为: 0-否 + payOrder.setExtParam(rq.getExtParam()); //商户扩展参数 + payOrder.setNotifyUrl(rq.getNotifyUrl()); //异步通知地址 + payOrder.setReturnUrl(rq.getReturnUrl()); //页面跳转地址 + + Date nowDate = new Date(); + + payOrder.setExpiredTime(DateUtil.offsetHour(nowDate, 2)); //订单过期时间 默认两个小时 + payOrder.setCreatedAt(nowDate); //订单创建时间 + return payOrder; + } + + + /** + * 校验: 商户的支付方式是否可用 + * 返回: 支付接口 + * **/ + private IPaymentService checkMchWayCodeAndGetService(MchConfigContext mchConfigContext, String wayCode){ + + // 根据支付方式, 查询出 该商户 可用的支付接口 + MchPayPassage mchPayPassage = mchPayPassageService.findMchPayPassage(mchConfigContext.getMchNo(), wayCode); + if(mchPayPassage == null){ + throw new BizException("该支付方式商户未开通"); + } + + // 接口代码 + String ifCode = mchPayPassage.getIfCode(); + IPaymentService paymentService = SpringBeansUtil.getBean(ifCode + "PaymentService", IPaymentService.class); + if(paymentService == null){ + throw new BizException("无此支付通道接口"); + } + + if(!paymentService.isSupport(ifCode)){ + throw new BizException("接口不支持该支付方式"); + } + + if(mchConfigContext.getMchType() == MchInfo.TYPE_NORMAL){ //普通商户 + + if(mchConfigContext == null || mchConfigContext.getNormalMchParamsByIfCode(ifCode) == null){ + throw new BizException("商户参数未配置"); + } + }else if(mchConfigContext.getMchType() == MchInfo.TYPE_ISVSUB){ //特约商户 + + mchConfigContext = configContextService.getMchConfigContext(mchConfigContext.getMchNo()); + + if(mchConfigContext == null || mchConfigContext.getIsvsubMchParamsByIfCode(ifCode) == null){ + throw new BizException("特约商户参数未配置"); + } + + IsvConfigContext isvConfigContext = configContextService.getIsvConfigContext(mchConfigContext.getMchInfo().getIsvNo()); + + if(isvConfigContext == null || isvConfigContext.getIsvParamsByIfCode(ifCode) == null){ + throw new BizException("服务商参数未配置"); + } + } + + return paymentService; + + } + + + /** 处理返回的渠道信息,并更新订单状态 + * payOrder将对部分信息进行 赋值操作。 + * **/ + private void processChannelMsg(ChannelRetMsg channelRetMsg, PayOrder payOrder){ + + //对象为空 || 上游返回状态为空, 则无需操作 + if(channelRetMsg == null || channelRetMsg.getChannelState() == null){ + return ; + } + + String payOrderId = payOrder.getPayOrderId(); + + //明确成功 + if(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS == channelRetMsg.getChannelState()) { + + this.updateInitOrderStateThrowException(PayOrder.STATE_SUCCESS, payOrder, channelRetMsg); + payMchNotifyService.payOrderNotify(payOrder); + + //明确失败 + }else if(ChannelRetMsg.ChannelState.CONFIRM_FAIL == channelRetMsg.getChannelState()) { + + this.updateInitOrderStateThrowException(PayOrder.STATE_FAIL, payOrder, channelRetMsg); + + // 上游处理中 || 未知 || 上游接口返回异常 订单为支付中状态 + }else if( ChannelRetMsg.ChannelState.WAITING == channelRetMsg.getChannelState() || + ChannelRetMsg.ChannelState.UNKNOWN == channelRetMsg.getChannelState() || + ChannelRetMsg.ChannelState.API_RET_ERROR == channelRetMsg.getChannelState() + + ){ + this.updateInitOrderStateThrowException(PayOrder.STATE_ING, payOrder, channelRetMsg); + + // 系统异常: 订单不再处理。 为: 生成状态 + }else if( ChannelRetMsg.ChannelState.SYS_ERROR == channelRetMsg.getChannelState()){ + + }else{ + + throw new BizException("ChannelState 返回异常!"); + } + + //判断是否需要轮询查单 + if(channelRetMsg.isNeedQuery()){ + mqChannelOrderQueryQueue.send(MqQueue4ChannelOrderQuery.buildMsg(payOrderId, 1), 5 * 1000); + } + + } + + + /** 更新订单状态 --》 订单生成--》 其他状态 (向外抛出异常) **/ + private void updateInitOrderStateThrowException(byte orderState, PayOrder payOrder, ChannelRetMsg channelRetMsg){ + + payOrder.setState(orderState); + payOrder.setChannelOrderNo(channelRetMsg.getChannelOrderId()); + payOrder.setErrCode(channelRetMsg.getChannelErrCode()); + payOrder.setErrMsg(channelRetMsg.getChannelErrMsg()); + + + boolean isSuccess = payOrderService.updateInit2Ing(payOrder.getPayOrderId(), payOrder.getIfCode(), payOrder.getWayCode()); + if(!isSuccess){ + throw new BizException("更新订单异常!"); + } + + isSuccess = payOrderService.updateIng2SuccessOrFail(payOrder.getPayOrderId(), payOrder.getState(), + channelRetMsg.getChannelOrderId(), channelRetMsg.getChannelErrCode(), channelRetMsg.getChannelErrMsg()); + if(!isSuccess){ + throw new BizException("更新订单异常!"); + } + } + + + /** 统一封装订单数据 **/ + private ApiRes packageApiResByPayOrder(UnifiedOrderRQ bizRQ, UnifiedOrderRS bizRS, PayOrder payOrder){ + + // 返回接口数据 + bizRS.setPayOrderId(payOrder.getPayOrderId()); + bizRS.setOrderState(payOrder.getState()); + bizRS.setMchOrderNo(payOrder.getMchOrderNo()); + + if(payOrder.getState() == PayOrder.STATE_FAIL){ + bizRS.setErrCode(bizRS.getChannelRetMsg() != null ? bizRS.getChannelRetMsg().getChannelErrCode() : null); + bizRS.setErrMsg(bizRS.getChannelRetMsg() != null ? bizRS.getChannelRetMsg().getChannelErrMsg() : null); + } + + return ApiRes.okWithSign(bizRS, configContextService.getMchConfigContext(bizRQ.getMchNo()).getMchInfo().getPrivateKey()); + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java new file mode 100644 index 0000000000000000000000000000000000000000..543d81acc26f3f7b15d2e5b4b8f243dc72b4edd9 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/ChannelNoticeController.java @@ -0,0 +1,274 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder; + +import com.jeequan.jeepay.core.ctrls.AbstractCtrl; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.exception.ResponseException; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.pay.channel.IChannelNoticeService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.service.PayMchNotifyService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletRequest; + +/* +* 渠道侧的通知入口Controller 【分为同步跳转(doReturn)和异步回调(doNotify) 】 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:26 +*/ +@Slf4j +@Controller +public class ChannelNoticeController extends AbstractCtrl { + + @Autowired private PayOrderService payOrderService; + @Autowired private ConfigContextService configContextService; + @Autowired private PayMchNotifyService payMchNotifyService; + + /** 同步通知入口 **/ + @RequestMapping(value= {"/api/pay/return/{ifCode}", "/api/pay/return/{ifCode}/{payOrderId}"}) + public String doReturn(HttpServletRequest request, @PathVariable("ifCode") String ifCode, @PathVariable(value = "payOrderId", required = false) String urlOrderId){ + + String payOrderId = null; + String logPrefix = "进入[" +ifCode+ "]支付同步跳转:urlOrderId:["+ StringUtils.defaultIfEmpty(urlOrderId, "") + "] "; + log.info("===== {} =====" , logPrefix); + + try { + + // 参数有误 + if(StringUtils.isEmpty(ifCode)){ + return this.toReturnPage("ifCode is empty"); + } + + //查询支付接口是否存在 + IChannelNoticeService payNotifyService = SpringBeansUtil.getBean(ifCode + "ChannelNoticeService", IChannelNoticeService.class); + + // 支付通道接口实现不存在 + if(payNotifyService == null){ + log.error("{}, interface not exists ", logPrefix); + return this.toReturnPage("[" + ifCode + "] interface not exists"); + } + + // 解析订单号 和 请求参数 + MutablePair mutablePair = payNotifyService.parseParams(request, urlOrderId, IChannelNoticeService.NoticeTypeEnum.DO_NOTIFY); + if(mutablePair == null){ // 解析数据失败, 响应已处理 + log.error("{}, mutablePair is null ", logPrefix); + throw new BizException("解析数据异常!"); //需要实现类自行抛出ResponseException, 不应该在这抛此异常。 + } + + //解析到订单号 + payOrderId = mutablePair.left; + log.info("{}, 解析数据为:payOrderId:{}, params:{}", logPrefix, payOrderId, mutablePair.getRight()); + + if(StringUtils.isNotEmpty(urlOrderId) && !urlOrderId.equals(payOrderId)){ + log.error("{}, 订单号不匹配. urlOrderId={}, payOrderId={} ", logPrefix, urlOrderId, payOrderId); + throw new BizException("订单号不匹配!"); + } + + //获取订单号 和 订单数据 + PayOrder payOrder = payOrderService.getById(payOrderId); + + // 订单不存在 + if(payOrder == null){ + log.error("{}, 订单不存在. payOrderId={} ", logPrefix, payOrderId); + return this.toReturnPage("支付订单不存在"); + } + + //查询出商户的配置信息 + String mchNo = payOrder.getMchNo(); + + //查询出商户配置参数 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + + //调起接口的回调判断 + ChannelRetMsg notifyResult = payNotifyService.doNotice(request, mutablePair.getRight(), payOrder, mchConfigContext, IChannelNoticeService.NoticeTypeEnum.DO_RETURN); + + // 返回null 表明出现异常, 无需处理通知下游等操作。 + if(notifyResult == null || notifyResult.getChannelState() == null || notifyResult.getResponseEntity() == null){ + log.error("{}, 处理回调事件异常 notifyResult data error, notifyResult ={} ",logPrefix, notifyResult); + throw new BizException("处理回调事件异常!"); //需要实现类自行抛出ResponseException, 不应该在这抛此异常。 + } + + //判断订单状态 + if(notifyResult.getChannelState() == ChannelRetMsg.ChannelState.CONFIRM_SUCCESS) { + payOrder.setState(PayOrder.STATE_SUCCESS); + }else if(notifyResult.getChannelState() == ChannelRetMsg.ChannelState.CONFIRM_FAIL) { + payOrder.setState(PayOrder.STATE_FAIL); + } + + boolean hasReturnUrl = StringUtils.isNotBlank(payOrder.getReturnUrl()); + log.info("===== {}, 订单通知完成。 payOrderId={}, parseState = {}, hasReturnUrl={} =====", logPrefix, payOrderId, notifyResult.getChannelState(), hasReturnUrl); + + //包含通知地址时 + if(hasReturnUrl){ + // 重定向 + response.sendRedirect(payMchNotifyService.createReturnUrl(payOrder, mchConfigContext.getMchInfo().getPrivateKey())); + return null; + }else{ + + //跳转到支付成功页面 + return this.toReturnPage(null); + } + + } catch (BizException e) { + log.error("{}, payOrderId={}, BizException", logPrefix, payOrderId, e); + return this.toReturnPage(e.getMessage()); + + } catch (ResponseException e) { + log.error("{}, payOrderId={}, ResponseException", logPrefix, payOrderId, e); + return this.toReturnPage(e.getMessage()); + + } catch (Exception e) { + log.error("{}, payOrderId={}, 系统异常", logPrefix, payOrderId, e); + return this.toReturnPage(e.getMessage()); + } + } + + /** 异步回调入口 **/ + @ResponseBody + @RequestMapping(value= {"/api/pay/notify/{ifCode}", "/api/pay/notify/{ifCode}/{payOrderId}"}) + public ResponseEntity doNotify(HttpServletRequest request, @PathVariable("ifCode") String ifCode, @PathVariable(value = "payOrderId", required = false) String urlOrderId){ + + String payOrderId = null; + String logPrefix = "进入[" +ifCode+ "]支付回调:urlOrderId:["+ StringUtils.defaultIfEmpty(urlOrderId, "") + "] "; + log.info("===== {} =====" , logPrefix); + + try { + + // 参数有误 + if(StringUtils.isEmpty(ifCode)){ + return ResponseEntity.badRequest().body("ifCode is empty"); + } + + //查询支付接口是否存在 + IChannelNoticeService payNotifyService = SpringBeansUtil.getBean(ifCode + "ChannelNoticeService", IChannelNoticeService.class); + + // 支付通道接口实现不存在 + if(payNotifyService == null){ + log.error("{}, interface not exists ", logPrefix); + return ResponseEntity.badRequest().body("[" + ifCode + "] interface not exists"); + } + + // 解析订单号 和 请求参数 + MutablePair mutablePair = payNotifyService.parseParams(request, urlOrderId, IChannelNoticeService.NoticeTypeEnum.DO_NOTIFY); + if(mutablePair == null){ // 解析数据失败, 响应已处理 + log.error("{}, mutablePair is null ", logPrefix); + throw new BizException("解析数据异常!"); //需要实现类自行抛出ResponseException, 不应该在这抛此异常。 + } + + //解析到订单号 + payOrderId = mutablePair.left; + log.info("{}, 解析数据为:payOrderId:{}, params:{}", logPrefix, payOrderId, mutablePair.getRight()); + + if(StringUtils.isNotEmpty(urlOrderId) && !urlOrderId.equals(payOrderId)){ + log.error("{}, 订单号不匹配. urlOrderId={}, payOrderId={} ", logPrefix, urlOrderId, payOrderId); + throw new BizException("订单号不匹配!"); + } + + //获取订单号 和 订单数据 + PayOrder payOrder = payOrderService.getById(payOrderId); + + // 订单不存在 + if(payOrder == null){ + log.error("{}, 订单不存在. payOrderId={} ", logPrefix, payOrderId); + return payNotifyService.doNotifyOrderNotExists(request); + } + + //查询出商户的配置信息 + String mchNo = payOrder.getMchNo(); + + //查询出商户配置参数 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + + //调起接口的回调判断 + ChannelRetMsg notifyResult = payNotifyService.doNotice(request, mutablePair.getRight(), payOrder, mchConfigContext, IChannelNoticeService.NoticeTypeEnum.DO_NOTIFY); + + // 返回null 表明出现异常, 无需处理通知下游等操作。 + if(notifyResult == null || notifyResult.getChannelState() == null || notifyResult.getResponseEntity() == null){ + log.error("{}, 处理回调事件异常 notifyResult data error, notifyResult ={} ",logPrefix, notifyResult); + throw new BizException("处理回调事件异常!"); //需要实现类自行抛出ResponseException, 不应该在这抛此异常。 + } + + boolean updateOrderSuccess = true; //默认更新成功 + // 订单是 【支付中状态】 + if(payOrder.getState() == PayOrder.STATE_ING) { + + //明确成功 + if(ChannelRetMsg.ChannelState.CONFIRM_SUCCESS == notifyResult.getChannelState()) { + + updateOrderSuccess = payOrderService.updateIng2Success(payOrderId, notifyResult.getChannelOrderId(), notifyResult.getChannelUserId()); + + //明确失败 + }else if(ChannelRetMsg.ChannelState.CONFIRM_FAIL == notifyResult.getChannelState()) { + + updateOrderSuccess = payOrderService.updateIng2Fail(payOrderId, notifyResult.getChannelOrderId(), notifyResult.getChannelErrCode(), notifyResult.getChannelErrMsg()); + } + } + + // 更新订单 异常 + if(!updateOrderSuccess){ + log.error("{}, updateOrderSuccess = {} ",logPrefix, updateOrderSuccess); + return payNotifyService.doNotifyOrderStateUpdateFail(request); + } + + //订单支付成功 需要MQ通知下游商户 + if(notifyResult.getChannelState() == ChannelRetMsg.ChannelState.CONFIRM_SUCCESS){ + payOrder.setState(PayOrder.STATE_SUCCESS); + payMchNotifyService.payOrderNotify(payOrder); + } + + log.info("===== {}, 订单通知完成。 payOrderId={}, parseState = {} =====", logPrefix, payOrderId, notifyResult.getChannelState()); + + return notifyResult.getResponseEntity(); + + } catch (BizException e) { + log.error("{}, payOrderId={}, BizException", logPrefix, payOrderId, e); + return ResponseEntity.badRequest().body(e.getMessage()); + + } catch (ResponseException e) { + log.error("{}, payOrderId={}, ResponseException", logPrefix, payOrderId, e); + return e.getResponseEntity(); + + } catch (Exception e) { + log.error("{}, payOrderId={}, 系统异常", logPrefix, payOrderId, e); + return ResponseEntity.badRequest().body(e.getMessage()); + } + } + + + /* 跳转到支付成功页面 **/ + private String toReturnPage(String errInfo){ + + + return "cashier/returnPage"; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/QueryOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/QueryOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..4a134ba529c2f3591d8c1af38e684c8129a729e2 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/QueryOrderController.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder; + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.rqrs.QueryPayOrderRQ; +import com.jeequan.jeepay.pay.rqrs.QueryPayOrderRS; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/* +* 商户查单controller +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:26 +*/ +@Slf4j +@RestController +public class QueryOrderController extends AbstractPayOrderController { + + @Autowired private PayOrderService payOrderService; + @Autowired private ConfigContextService configContextService; + + /** + * 查单接口 + * **/ + @RequestMapping("/api/pay/query") + public ApiRes queryOrder(){ + + //获取参数 & 验签 + QueryPayOrderRQ rq = getRQByWithMchSign(QueryPayOrderRQ.class); + + if(StringUtils.isAllEmpty(rq.getMchOrderNo(), rq.getPayOrderId())){ + throw new BizException("mchOrderNo 和 payOrderId不能同时为空"); + } + + PayOrder payOrder = payOrderService.queryMchOrder(rq.getMchNo(), rq.getPayOrderId(), rq.getMchOrderNo()); + if(payOrder == null){ + throw new BizException("订单不存在"); + } + + QueryPayOrderRS bizRes = QueryPayOrderRS.buildByPayOrder(payOrder); + return ApiRes.okWithSign(bizRes, configContextService.getMchConfigContext(rq.getMchNo()).getMchInfo().getPrivateKey()); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/UnifiedOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/UnifiedOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..49f465d10fc5d6d95a924767518bd14a1d06aca5 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/UnifiedOrderController.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AutoBarOrderRQ; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.service.impl.PayWayService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/* +* 统一下单 controller +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:27 +*/ +@Slf4j +@RestController +public class UnifiedOrderController extends AbstractPayOrderController { + + @Autowired private PayWayService payWayService; + @Autowired private ConfigContextService configContextService; + + /** + * 统一下单接口 + * **/ + @PostMapping("/api/pay/unifiedOrder") + public ApiRes unifiedOrder(){ + + //获取参数 & 验签 + UnifiedOrderRQ rq = getRQByWithMchSign(UnifiedOrderRQ.class); + + UnifiedOrderRQ bizRQ = buildBizRQ(rq); + + //实现子类的res + ApiRes apiRes = unifiedOrder(bizRQ.getWayCode(), bizRQ); + if(apiRes.getData() == null){ + return apiRes; + } + + UnifiedOrderRS bizRes = (UnifiedOrderRS)apiRes.getData(); + + //聚合接口,返回的参数 + UnifiedOrderRS res = new UnifiedOrderRS(); + BeanUtils.copyProperties(bizRes, res); + + //只有 订单生成(QR_CASHIER) || 支付中 || 支付成功返回该数据 + if(bizRes.getOrderState() != null && (bizRes.getOrderState() == PayOrder.STATE_INIT || bizRes.getOrderState() == PayOrder.STATE_ING || bizRes.getOrderState() == PayOrder.STATE_SUCCESS) ){ + res.setPayDataType(bizRes.buildPayDataType()); + res.setPayData(bizRes.buildPayData()); + } + + return ApiRes.okWithSign(res, configContextService.getMchConfigContext(rq.getMchNo()).getMchInfo().getPrivateKey()); + } + + + private UnifiedOrderRQ buildBizRQ(UnifiedOrderRQ rq){ + + //支付方式 比如: ali_bar + String wayCode = rq.getWayCode(); + + //jsapi 收银台聚合支付场景 (不校验是否存在payWayCode) + if(CS.PAY_WAY_CODE.QR_CASHIER.equals(wayCode)){ + return rq.buildBizRQ(); + } + + //如果是自动分类条码 + if(CS.PAY_WAY_CODE.AUTO_BAR.equals(wayCode)){ + + AutoBarOrderRQ bizRQ = (AutoBarOrderRQ)rq.buildBizRQ(); + wayCode = JeepayKit.getPayWayCodeByBarCode(bizRQ.getAuthCode()); + rq.setWayCode(wayCode); + } + + if(payWayService.count(PayWay.gw().eq(PayWay::getWayCode, wayCode)) <= 0){ + throw new BizException("不支持的支付方式"); + } + + //转换为 bizRQ + return rq.buildBizRQ(); + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliBarOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliBarOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..f26b5ffdebb524da1b157b5de4173e43a90adb7e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliBarOrderController.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliBarOrderRQ; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/* +* 支付宝 条码支付 controller +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:25 +*/ +@Slf4j +@RestController +public class AliBarOrderController extends AbstractPayOrderController { + + + /** + * 统一下单接口 + * **/ + @PostMapping("/api/pay/aliBarOrder") + public ApiRes aliBarOrder(){ + + //获取参数 & 验证 + AliBarOrderRQ bizRQ = getRQByWithMchSign(AliBarOrderRQ.class); + + // 统一下单接口 + return unifiedOrder(CS.PAY_WAY_CODE.ALI_BAR, bizRQ); + + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliJsapiOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliJsapiOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..51fc18d1686e893984b31ac6a7c05a50cd8bcba6 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/AliJsapiOrderController.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/* + * 支付宝 jspai controller + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:25 + */ +@Slf4j +@RestController +public class AliJsapiOrderController extends AbstractPayOrderController { + + + /** + * 统一下单接口 + * **/ + @PostMapping("/api/pay/aliJsapiOrder") + public ApiRes aliJsapiOrder(){ + + //获取参数 & 验证 + AliJsapiOrderRQ bizRQ = getRQByWithMchSign(AliJsapiOrderRQ.class); + + // 统一下单接口 + return unifiedOrder(CS.PAY_WAY_CODE.ALI_JSAPI, bizRQ); + + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfBarOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfBarOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..8ddfc35e893448fb443250fd7cdcdf7dd033ec4a --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfBarOrderController.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfBarOrderRQ; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/* + * 云闪付 条码支付 controller + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:25 + */ +@Slf4j +@RestController +public class YsfBarOrderController extends AbstractPayOrderController { + + + /** + * 统一下单接口 + * **/ + @PostMapping("/api/pay/ysfBarOrder") + public ApiRes aliBarOrder(){ + + //获取参数 & 验证 + YsfBarOrderRQ bizRQ = getRQByWithMchSign(YsfBarOrderRQ.class); + + // 统一下单接口 + return unifiedOrder(CS.PAY_WAY_CODE.YSF_BAR, bizRQ); + + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfJsapiOrderController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfJsapiOrderController.java new file mode 100644 index 0000000000000000000000000000000000000000..2cc69f2d0b17cec16ad4b0aa338106202c1c6201 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/payway/YsfJsapiOrderController.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.YsfJsapiOrderRQ; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RestController; + +/* + * 云闪付 jsapi支付 controller + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:25 + */ +@Slf4j +@RestController +public class YsfJsapiOrderController extends AbstractPayOrderController { + + + /** + * 统一下单接口 + * **/ + @PostMapping("/api/pay/ysfJsapiOrder") + public ApiRes aliJsapiOrder(){ + + //获取参数 & 验证 + YsfJsapiOrderRQ bizRQ = getRQByWithMchSign(YsfJsapiOrderRQ.class); + + // 统一下单接口 + return unifiedOrder(CS.PAY_WAY_CODE.YSF_JSAPI, bizRQ); + + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/ChannelUserIdController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/ChannelUserIdController.java new file mode 100644 index 0000000000000000000000000000000000000000..ebf204daccb7bfd9469ea337a4778258479264c2 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/ChannelUserIdController.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.qr; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.pay.channel.IChannelUserService; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.ChannelUserIdRQ; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.net.URLEncoder; + +/* +* 商户获取渠道用户ID接口 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:27 +*/ +@RestController +@RequestMapping("/api/channelUserId") +public class ChannelUserIdController extends AbstractPayOrderController { + + @Autowired private ConfigContextService configContextService; + @Autowired private SysConfigService sysConfigService; + + /** 重定向到微信地址 **/ + @RequestMapping("/jump") + public void jump() throws Exception { + + //获取请求数据 + ChannelUserIdRQ rq = getRQByWithMchSign(ChannelUserIdRQ.class); + + String ifCode = "AUTO".equalsIgnoreCase(rq.getIfCode()) ? getIfCodeByUA() : rq.getIfCode(); + + // 获取接口 + IChannelUserService channelUserService = SpringBeansUtil.getBean(ifCode + "ChannelUserService", IChannelUserService.class); + + if(channelUserService == null){ + throw new BizException("不支持的客户端"); + } + + JSONObject jsonObject = new JSONObject(); + jsonObject.put("mchNo", rq.getMchNo()); + jsonObject.put("ifCode", ifCode); + jsonObject.put("redirectUrl", rq.getRedirectUrl()); + + //回调地址 + String callbackUrl = sysConfigService.getDBApplicationConfig().genMchChannelUserIdApiOauth2RedirectUrlEncode(jsonObject); + + //获取商户配置信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(rq.getMchNo()); + String redirectUrl = channelUserService.buildUserRedirectUrl(callbackUrl, mchConfigContext); + response.sendRedirect(redirectUrl); + + } + + + /** 回调地址 **/ + @RequestMapping("/oauth2Callback/{aesData}") + public void oauth2Callback(@PathVariable("aesData") String aesData) throws Exception { + + JSONObject callbackData = JSON.parseObject(JeepayKit.aesDecode(aesData)); + + String mchNo = callbackData.getString("mchNo"); + String ifCode = callbackData.getString("ifCode"); + String redirectUrl = callbackData.getString("redirectUrl"); + + // 获取接口 + IChannelUserService channelUserService = SpringBeansUtil.getBean(ifCode + "ChannelUserService", IChannelUserService.class); + + if(channelUserService == null){ + throw new BizException("不支持的客户端"); + } + + //获取商户配置信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + + String channelUserId = channelUserService.getChannelUserId(getReqParamJSON(), mchConfigContext); + + response.sendRedirect(redirectUrl + "?channelId=" + URLEncoder.encode(channelUserId)); + } + + + /** 根据UA获取支付接口 */ + private String getIfCodeByUA() { + + String ua = request.getHeader("User-Agent"); + + // 无法识别扫码客户端 + if (StringUtils.isBlank(ua)) return null; + + if(ua.contains("Alipay")) { + return CS.IF_CODE.ALIPAY; //支付宝服务窗支付 + }else if(ua.contains("MicroMessenger")) { + return CS.IF_CODE.WXPAY; + } + return null; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/QrCashierController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/QrCashierController.java new file mode 100644 index 0000000000000000000000000000000000000000..7f7b48610c9373ede049c8e7502eba92498d2ab1 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/qr/QrCashierController.java @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.qr; + +import com.alipay.api.AlipayApiException; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.core.model.ApiRes; +import com.jeequan.jeepay.pay.channel.IChannelUserService; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.WxJsapiOrderRQ; +import com.jeequan.jeepay.pay.service.PayMchNotifyService; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.service.impl.PayOrderService; +import com.jeequan.jeepay.service.impl.SysConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/* +* 聚合码支付二维码收银台controller +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:27 +*/ +@RestController +@RequestMapping("/api/cashier") +public class QrCashierController extends AbstractPayOrderController { + + @Autowired private PayOrderService payOrderService; + @Autowired private ConfigContextService configContextService; + @Autowired private SysConfigService sysConfigService; + @Autowired private PayMchNotifyService payMchNotifyService; + + /** + * 返回 oauth2【获取uerId跳转地址】 + * **/ + @PostMapping("/redirectUrl") + public ApiRes redirectUrl(){ + + //查询订单 + PayOrder payOrder = getPayOrder(); + + //回调地址 + String redirectUrlEncode = sysConfigService.getDBApplicationConfig().genOauth2RedirectUrlEncode(payOrder.getPayOrderId()); + + //获取商户配置信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(payOrder.getMchNo()); + + //获取接口并返回数据 + IChannelUserService channelUserService = getServiceByWayCode(getWayCode(), "ChannelUserService", IChannelUserService.class); + return ApiRes.ok(channelUserService.buildUserRedirectUrl(redirectUrlEncode, mchConfigContext)); + + } + + /** + * 获取userId + * **/ + @PostMapping("/channelUserId") + public ApiRes channelUserId() throws Exception { + + //查询订单 + PayOrder payOrder = getPayOrder(); + + String wayCode = getWayCode(); + + //获取商户配置信息 + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(payOrder.getMchNo()); + IChannelUserService channelUserService = getServiceByWayCode(wayCode, "ChannelUserService", IChannelUserService.class); + return ApiRes.ok(channelUserService.getChannelUserId(getReqParamJSON(), mchConfigContext)); + + } + + + /** + * 获取订单支付信息 + * **/ + @PostMapping("/payOrderInfo") + public ApiRes payOrderInfo() throws Exception { + + //查询订单 + PayOrder payOrder = getPayOrder(); + + PayOrder resOrder = new PayOrder(); + resOrder.setPayOrderId(payOrder.getPayOrderId()); + resOrder.setMchOrderNo(payOrder.getMchOrderNo()); + resOrder.setMchName(payOrder.getMchName()); + resOrder.setAmount(payOrder.getAmount()); + resOrder.setReturnUrl(payMchNotifyService.createReturnUrl(payOrder, configContextService.getMchConfigContext(payOrder.getMchNo()).getMchInfo().getPrivateKey())); + return ApiRes.ok(resOrder); + } + + + /** 调起下单接口, 返回支付数据包 **/ + @PostMapping("/pay") + public ApiRes pay() throws Exception { + + //查询订单 + PayOrder payOrder = getPayOrder(); + + String wayCode = getWayCode(); + + ApiRes apiRes = null; + + if(wayCode.equals(CS.PAY_WAY_CODE.ALI_JSAPI)){ + apiRes = packageAlipayPayPackage(payOrder); + }else if(wayCode.equals(CS.PAY_WAY_CODE.WX_JSAPI)){ + apiRes = packageWxpayPayPackage(payOrder); + } + + return ApiRes.ok(apiRes); + } + + + /** 获取支付宝的 支付参数 **/ + private ApiRes packageAlipayPayPackage(PayOrder payOrder) throws AlipayApiException { + + String channelUserId = getValStringRequired("channelUserId"); + AliJsapiOrderRQ rq = new AliJsapiOrderRQ(); + rq.setBuyerUserId(channelUserId); + return this.unifiedOrder(getWayCode(), rq, payOrder); + } + + + /** 获取微信的 支付参数 **/ + private ApiRes packageWxpayPayPackage(PayOrder payOrder) throws AlipayApiException { + + String openId = getValStringRequired("channelUserId"); + WxJsapiOrderRQ rq = new WxJsapiOrderRQ(); + rq.setOpenid(openId); + return this.unifiedOrder(getWayCode(), rq, payOrder); + } + + + private String getToken(){ + return getValStringRequired("token"); + } + + private String getWayCode(){ + return getValStringRequired("wayCode"); + } + + private PayOrder getPayOrder(){ + + String payOrderId = JeepayKit.aesDecode(getToken()); //解析token + + PayOrder payOrder = payOrderService.getById(payOrderId); + if(payOrder == null || payOrder.getState() != PayOrder.STATE_INIT){ + throw new BizException("订单不存在或状态不正确"); + } + + return payOrderService.getById(payOrderId); + } + + + private T getServiceByWayCode(String wayCode, String serviceSuffix, Class cls){ + + if(CS.PAY_WAY_CODE.ALI_JSAPI.equals(wayCode)){ + return SpringBeansUtil.getBean(CS.IF_CODE.ALIPAY + serviceSuffix, cls); + }else if(CS.PAY_WAY_CODE.WX_JSAPI.equals(wayCode)){ + return SpringBeansUtil.getBean(CS.IF_CODE.WXPAY + serviceSuffix, cls); + } + + return null; + } + + + + + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/scanimg/ScanImgController.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/scanimg/ScanImgController.java new file mode 100644 index 0000000000000000000000000000000000000000..d714adf21582cd7b47debe7c34315589fe98ceb1 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/scanimg/ScanImgController.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.ctrl.scanimg; + +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.pay.ctrl.payorder.AbstractPayOrderController; +import com.jeequan.jeepay.pay.util.CodeImgUtil; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/* +* jeepay 扫描图片生成器 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:28 +*/ +@RestController +@RequestMapping("/api/scan") +public class ScanImgController extends AbstractPayOrderController { + + /** 返回 图片地址信息 **/ + @RequestMapping("/imgs/{aesStr}.png") + public void qrImgs(@PathVariable("aesStr") String aesStr) throws Exception { + String str = JeepayKit.aesDecode(aesStr); + int width = getValIntegerDefault("width", 200); + int height = getValIntegerDefault("height", 200); + CodeImgUtil.writeQrCode(response.getOutputStream(), str, width, height); + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/exception/ChannelException.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/exception/ChannelException.java new file mode 100644 index 0000000000000000000000000000000000000000..26f9f6ff5b9255c2c55b91a566a7f87e4f75e717 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/exception/ChannelException.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.exception; + +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import lombok.Getter; + +/* +* 请求渠道侧异常 exception +* 抛出此异常: 仅支持: 未知状态(需查单) 和 系统内异常 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:28 +*/ +@Getter +public class ChannelException extends RuntimeException{ + + private static final long serialVersionUID = 1L; + + private ChannelRetMsg channelRetMsg; + + /** 业务自定义异常 **/ + private ChannelException(ChannelRetMsg channelRetMsg) { + super(channelRetMsg != null ? channelRetMsg.getChannelErrMsg() : null); + this.channelRetMsg = channelRetMsg; + } + + /** 未知状态 **/ + public static ChannelException unknown(String channelErrMsg){ + return new ChannelException(ChannelRetMsg.sysError(channelErrMsg)); + } + + /** 系统内异常 **/ + public static ChannelException sysError(String channelErrMsg){ + return new ChannelException(ChannelRetMsg.sysError(channelErrMsg)); + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/AlipayClientWrapper.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/AlipayClientWrapper.java new file mode 100644 index 0000000000000000000000000000000000000000..7f07d735ff07686be7f061e79258841b1e86f796 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/AlipayClientWrapper.java @@ -0,0 +1,77 @@ + /* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.model; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.AlipayClient; +import com.alipay.api.AlipayRequest; +import com.alipay.api.AlipayResponse; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.exception.ChannelException; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; + +/* +* 支付宝Client 包装类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:28 +*/ +@Slf4j +@Data +@AllArgsConstructor +public class AlipayClientWrapper { + + + //默认为 不使用证书方式 + private Byte useCert = CS.NO; + + /** 缓存支付宝client 对象 **/ + private AlipayClient alipayClient; + + /** 封装支付宝接口调用函数 **/ + public T execute(AlipayRequest request){ + + try { + + T alipayResp = null; + + if(useCert != null && useCert == CS.YES){ //证书加密方式 + alipayResp = alipayClient.certificateExecute(request); + + }else{ //key 或者 空都为默认普通加密方式 + alipayResp = alipayClient.execute(request); + } + + //判断返回的值: // TODO + + return alipayResp; + + } catch (AlipayApiException e) { // 调起接口前出现异常,如私钥问题。 调起后出现验签异常等。 + + log.error("调起支付宝execute[AlipayApiException]异常!", e); + //如果数据返回出现验签异常,则需要抛出: UNKNOWN 异常。 + throw ChannelException.sysError(e.getMessage()); + + } catch (Exception e) { + log.error("调起支付宝execute[Exception]异常!", e); + throw ChannelException.sysError("调用支付宝client服务异常"); + } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/IsvConfigContext.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/IsvConfigContext.java new file mode 100644 index 0000000000000000000000000000000000000000..5704317a1f383dccbd1ee3ce62a325b41aa12d29 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/IsvConfigContext.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.model; + +import com.jeequan.jeepay.core.entity.IsvInfo; +import com.jeequan.jeepay.core.model.params.IsvParams; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +/* + * Isv支付参数信息 放置到内存, 避免多次查询操作 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:28 + */ +@Data +public class IsvConfigContext { + + /** isv信息缓存 */ + private String isvNo; + private IsvInfo isvInfo; + + /** 商户支付配置信息缓存 */ + private Map isvParamsMap = new HashMap<>(); + + + /** 缓存支付宝client 对象 **/ + private AlipayClientWrapper alipayClientWrapper; + + /** 缓存 wxServiceWrapper 对象 **/ + private WxServiceWrapper wxServiceWrapper; + + + /** 获取isv配置信息 **/ + public IsvParams getIsvParamsByIfCode(String ifCode){ + return isvParamsMap.get(ifCode); + } + + /** 获取isv配置信息 **/ + public T getIsvParamsByIfCode(String ifCode, Class cls){ + return (T)isvParamsMap.get(ifCode); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/MchConfigContext.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/MchConfigContext.java new file mode 100644 index 0000000000000000000000000000000000000000..ace439a02a1b4ce6c08a400953532cf7354f7927 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/MchConfigContext.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.model; + +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.model.params.IsvsubMchParams; +import com.jeequan.jeepay.core.model.params.NormalMchParams; +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +/* +* 商户支付参数信息 +* 用户 放置到内存, 避免多次查询操作 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:29 +*/ +@Data +public class MchConfigContext { + + + /** 商户信息缓存 */ + private String mchNo; + private Byte mchType; + private MchInfo mchInfo; + + /** 商户支付配置信息缓存 */ + private Map normalMchParamsMap = new HashMap<>(); + private Map isvsubMchParamsMap = new HashMap<>(); + + /** 放置所属服务商的信息 **/ + private IsvConfigContext isvConfigContext; + + + /** 缓存支付宝client 对象 **/ + private AlipayClientWrapper alipayClientWrapper; + + /** 缓存 wxServiceWrapper 对象 **/ + private WxServiceWrapper wxServiceWrapper; + + /** 获取普通商户配置信息 **/ + public NormalMchParams getNormalMchParamsByIfCode(String ifCode){ + return normalMchParamsMap.get(ifCode); + } + + /** 获取isv配置信息 **/ + public T getNormalMchParamsByIfCode(String ifCode, Class cls){ + return (T)normalMchParamsMap.get(ifCode); + } + + /** 获取特约商户配置信息 **/ + public IsvsubMchParams getIsvsubMchParamsByIfCode(String ifCode){ + return isvsubMchParamsMap.get(ifCode); + } + + /** 获取isv配置信息 **/ + public T getIsvsubMchParamsByIfCode(String ifCode, Class cls){ + return (T)isvsubMchParamsMap.get(ifCode); + } + + /** 是否为 服务商特约商户 **/ + public boolean isIsvsubMch(){ + return this.mchType == MchInfo.TYPE_ISVSUB; + } + + public AlipayClientWrapper getAlipayClientWrapper(){ + return isIsvsubMch() ? isvConfigContext.getAlipayClientWrapper(): alipayClientWrapper; + } + + public WxServiceWrapper getWxServiceWrapper(){ + return isIsvsubMch() ? isvConfigContext.getWxServiceWrapper(): wxServiceWrapper; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/WxServiceWrapper.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/WxServiceWrapper.java new file mode 100644 index 0000000000000000000000000000000000000000..4dca97bf9d4c0f674dda38f3a1e29ee6c9c098c1 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/model/WxServiceWrapper.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.model; + +import com.github.binarywang.wxpay.service.WxPayService; +import lombok.AllArgsConstructor; +import lombok.Data; +import me.chanjar.weixin.mp.api.WxMpService; + +/* +* wxService 包装类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:30 +*/ +@Data +@AllArgsConstructor +public class WxServiceWrapper { + + /** 缓存微信API版本 **/ + private String apiVersion; + + /** 缓存 wxPayService 对象 **/ + private WxPayService wxPayService; + + /** 缓存 wxJavaService 对象 **/ + private WxMpService wxMpService; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/config/MqThreadExecutor.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/config/MqThreadExecutor.java new file mode 100644 index 0000000000000000000000000000000000000000..019d3bf42a9a683e901455b93ca18aec0a761088 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/config/MqThreadExecutor.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; + +/* +* MQ 线程池配置 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:33 +*/ +@Configuration +@EnableAsync +public class MqThreadExecutor { + + public static final String EXECUTOR_PAYORDER_MCH_NOTIFY = "mqQueue4PayOrderMchNotifyExecutor"; + + /* + * 功能描述: + * 支付结果通知到商户的异步执行器 (由于量大, 单独新建一个线程池处理, 之前的不做变动 ) + * 20, 300, 10, 60 该配置: 同一时间最大并发量300,(已经验证通过, 商户都可以收到请求消息) + * 缓存队列尽量减少,否则将堵塞在队列中无法执行。 corePoolSize 根据机器的配置进行添加。此处设置的为20 + */ + @Bean + public Executor mqQueue4PayOrderMchNotifyExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(20); // 线程池维护线程的最少数量 + executor.setMaxPoolSize(300); // 线程池维护线程的最大数量 + executor.setQueueCapacity(10); // 缓存队列 + executor.setThreadNamePrefix("payOrderMchNotifyExecutor-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是由调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); //对拒绝task的处理策略 + executor.setKeepAliveSeconds(60); // 允许的空闲时间 + executor.initialize(); + return executor; + } + + + +} \ No newline at end of file diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4ChannelOrderQuery.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4ChannelOrderQuery.java new file mode 100644 index 0000000000000000000000000000000000000000..40f52afa78427a2e01a3ba457677d0936c6a5243 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4ChannelOrderQuery.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.queue; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.pay.service.ChannelOrderReissueService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.ScheduledMessage; +import org.apache.activemq.command.ActiveMQQueue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.stereotype.Component; + +import javax.jms.TextMessage; + +/* + * 上游渠道订单轮询查单 + * 如:微信的条码支付,没有回调接口, 需要轮询查单完成交易结果通知。 + * +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:30 +*/ +@Slf4j +@Component +public class MqQueue4ChannelOrderQuery extends ActiveMQQueue{ + + @Autowired private JmsTemplate jmsTemplate; + @Autowired private PayOrderService payOrderService; + @Autowired private ChannelOrderReissueService channelOrderReissueService; + + public static final String buildMsg(String payOrderId, int count){ + return payOrderId + "," + count; + } + + /** 构造函数 */ + public MqQueue4ChannelOrderQuery(){ + super(CS.MQ.QUEUE_CHANNEL_ORDER_QUERY); + } + + /** 发送MQ消息 **/ + public void send(String msg) { + this.jmsTemplate.convertAndSend(this, msg); + } + + /** 发送MQ消息 **/ + public void send(String msg, long delay) { + jmsTemplate.send(this, session -> { + TextMessage tm = session.createTextMessage(msg); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); + return tm; + }); + } + + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.QUEUE_CHANNEL_ORDER_QUERY) + public void receive(String msg) { + + String [] arr = msg.split(","); + String payOrderId = arr[0]; + int currentCount = Integer.parseInt(arr[1]); + log.info("接收轮询查单通知MQ, payOrderId={}, count={}", payOrderId, currentCount); + currentCount++ ; + + PayOrder payOrder = payOrderService.getById(payOrderId); + if(payOrder == null) { + log.warn("查询支付订单为空,payOrderId={}", payOrderId); + return; + } + + if(payOrder.getState() != PayOrder.STATE_ING) { + log.warn("订单状态不是支付中,不需查询渠道.payOrderId={}", payOrderId); + return; + } + + ChannelRetMsg channelRetMsg = channelOrderReissueService.processPayOrder(payOrder); + + //返回null 可能为接口报错等, 需要再次轮询 + if(channelRetMsg == null || channelRetMsg.getChannelState() == null || channelRetMsg.getChannelState().equals(ChannelRetMsg.ChannelState.WAITING)){ + + //最多查询6次 + if(currentCount <= 6){ + send(buildMsg(payOrderId, currentCount), 5 * 1000); //延迟5s再次查询 + }else{ + + //TODO 调用【撤销订单】接口 + + } + + }else{ //其他状态, 不需要再次轮询。 + } + + return; + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4PayOrderMchNotify.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4PayOrderMchNotify.java new file mode 100644 index 0000000000000000000000000000000000000000..7252bdba7295d102c339435e2ff42a3b7eaf70fb --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/queue/MqQueue4PayOrderMchNotify.java @@ -0,0 +1,141 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.queue; + +import cn.hutool.http.HttpException; +import cn.hutool.http.HttpUtil; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchNotifyRecord; +import com.jeequan.jeepay.pay.mq.config.MqThreadExecutor; +import com.jeequan.jeepay.service.impl.MchNotifyRecordService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.ScheduledMessage; +import org.apache.activemq.command.ActiveMQQueue; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Lazy; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.jms.core.JmsTemplate; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +import javax.jms.Queue; +import javax.jms.TextMessage; + +/* +* 商户订单回调MQ通知 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:34 +*/ +@Slf4j +@Component +public class MqQueue4PayOrderMchNotify { + + @Bean("mqQueue4PayOrderMchNotifyInner") + public Queue mqQueue4PayOrderMchNotifyInner(){ + return new ActiveMQQueue(CS.MQ.QUEUE_PAYORDER_MCH_NOTIFY); + } + + @Lazy + @Autowired + @Qualifier("mqQueue4PayOrderMchNotifyInner") + private Queue mqQueue4PayOrderMchNotifyInner; + @Autowired private JmsTemplate jmsTemplate; + @Autowired private MchNotifyRecordService mchNotifyRecordService; + @Autowired private PayOrderService payOrderService; + + public MqQueue4PayOrderMchNotify(){ + super(); + } + + /** 发送MQ消息 **/ + public void send(String msg) { + this.jmsTemplate.convertAndSend(mqQueue4PayOrderMchNotifyInner, msg); + } + + /** 发送MQ消息 **/ + public void send(String msg, long delay) { + jmsTemplate.send(mqQueue4PayOrderMchNotifyInner, session -> { + TextMessage tm = session.createTextMessage(msg); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); + tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); + return tm; + }); + } + + /** 接收 更新系统配置项的消息 **/ + @Async(MqThreadExecutor.EXECUTOR_PAYORDER_MCH_NOTIFY) + @JmsListener(destination = CS.MQ.QUEUE_PAYORDER_MCH_NOTIFY) + public void receive(String msg) { + + log.info("接收商户通知MQ, msg={}", msg); + + Long notifyId = Long.parseLong(msg); + + MchNotifyRecord record = mchNotifyRecordService.getById(notifyId); + + if(record == null || record.getState() != MchNotifyRecord.STATE_ING){ + log.info("查询通知记录不存在或状态不是通知中"); + return ; + } + if( record.getNotifyCount() >= 6 ){ + log.info("已达到最大发送次数"); + return ; + } + + //1. (发送结果最多6次) + Integer currentCount = record.getNotifyCount() + 1; + + String notifyUrl = record.getNotifyUrl(); + String res = ""; + try { + res = HttpUtil.createPost(notifyUrl).timeout(20000).execute().body(); + } catch (HttpException e) { + log.error("http error", e); + } + + if(currentCount == 1){ //第一次通知: 更新为已通知 + payOrderService.updateNotifySent(record.getOrderId()); + } + + //通知成功 + if("SUCCESS".equalsIgnoreCase(res)){ + mchNotifyRecordService.updateNotifyResult(notifyId, MchNotifyRecord.STATE_SUCCESS, res); + return ; + } + + //响应结果为异常 + if( currentCount >= 6 ){ + mchNotifyRecordService.updateNotifyResult(notifyId, MchNotifyRecord.STATE_FAIL, res); + return ; + } + + // 继续发送MQ 延迟发送 + mchNotifyRecordService.updateNotifyResult(notifyId, MchNotifyRecord.STATE_ING, res); + + // 通知延时次数 +// 1 2 3 4 5 6 +// 0 30 60 90 120 150 + send(msg, currentCount * 30 * 1000); + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/JMSConfig.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/JMSConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..ce9f8ec88655c634e1ccaa6aff369241968d1743 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/JMSConfig.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.topic; + +import org.springframework.context.annotation.Bean; +import org.springframework.jms.config.DefaultJmsListenerContainerFactory; +import org.springframework.jms.config.JmsListenerContainerFactory; +import org.springframework.stereotype.Component; + +import javax.jms.ConnectionFactory; + +/* +* JMS消息配置项 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:31 +*/ +@Component +public class JMSConfig { + + /** 新增jmsListenerContainer, 用于接收topic类型的消息 **/ + @Bean + public JmsListenerContainerFactory jmsListenerContainer(ConnectionFactory factory){ + DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); + bean.setPubSubDomain(true); + bean.setConnectionFactory(factory); + return bean; + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyIsvInfo.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyIsvInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..55545cc87c8a5bd48eb9ecbdd456c6d1e5b5e758 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyIsvInfo.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +/* +* 更改ISV信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:31 +*/ +@Slf4j +@Component +public class MqTopic4ModifyIsvInfo extends ActiveMQTopic{ + + @Autowired private ConfigContextService configContextService; + + public MqTopic4ModifyIsvInfo(){ + super(CS.MQ.TOPIC_MODIFY_ISV_INFO); + } + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.TOPIC_MODIFY_ISV_INFO, containerFactory = "jmsListenerContainer") + public void receive(String isvNo) { + + log.info("重置ISV信息, msg={}", isvNo); + configContextService.initIsvConfigContext(isvNo); + } + + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyMchInfo.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyMchInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..b287516d848cc3485d7d975d6a9ea7a60101d166 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifyMchInfo.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.service.ConfigContextService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +/* +* 更改商户信息 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:31 +*/ +@Slf4j +@Component +public class MqTopic4ModifyMchInfo extends ActiveMQTopic{ + + @Autowired private ConfigContextService configContextService; + + public MqTopic4ModifyMchInfo(){ + super(CS.MQ.TOPIC_MODIFY_MCH_INFO); + } + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.TOPIC_MODIFY_MCH_INFO, containerFactory = "jmsListenerContainer") + public void receive(String mchNo) { + + log.info("重置商户信息, msg={}", mchNo); + configContextService.initMchConfigContext(mchNo); + } + + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifySysConfig.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifySysConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..8a588f1b708493c6072b2581db643d32a38eebb3 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/topic/MqTopic4ModifySysConfig.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.mq.topic; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.service.impl.SysConfigService; +import lombok.extern.slf4j.Slf4j; +import org.apache.activemq.command.ActiveMQTopic; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jms.annotation.JmsListener; +import org.springframework.stereotype.Component; + +/* +* 更改系统配置参数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:35 +*/ +@Slf4j +@Component +public class MqTopic4ModifySysConfig extends ActiveMQTopic{ + + @Autowired private SysConfigService sysConfigService; + + public MqTopic4ModifySysConfig(){ + super(CS.MQ.TOPIC_MODIFY_SYS_CONFIG); + } + + /** 接收 更新系统配置项的消息 **/ + @JmsListener(destination = CS.MQ.TOPIC_MODIFY_SYS_CONFIG, containerFactory = "jmsListenerContainer") + public void receive(String msg) { + + log.info("成功接收更新系统配置的订阅通知, msg={}", msg); + sysConfigService.initDBConfig(msg); + log.info("系统配置静态属性已重置"); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..b91f3e8d26c7a9b0434e7abe51384c8c9902d05c --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRQ.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/* +* 基础请求参数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:39 +*/ +@Data +public abstract class AbstractRQ implements Serializable { + + /** 版本号 **/ + @NotBlank(message="版本号不能为空") + protected String version; + + /** 签名类型 **/ + @NotBlank(message="签名类型不能为空") + protected String signType; + + /** 签名值 **/ + @NotBlank(message="签名值不能为空") + protected String sign; + + /** 接口请求时间 **/ + @NotBlank(message="时间戳不能为空") + protected String reqTime; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRS.java new file mode 100644 index 0000000000000000000000000000000000000000..318c0c4de7881899d171114c9ea4e2744868ef8d --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/AbstractRS.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs; + +import com.alibaba.fastjson.JSON; +import lombok.Data; + +import java.io.Serializable; + +/* +* 接口抽象RS对象, 本身无需实例化 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:39 +*/ +@Data +public abstract class AbstractRS implements Serializable { + + public String toJSONString(){ + return JSON.toJSONString(this); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/ChannelUserIdRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/ChannelUserIdRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..84873493cb02fa491735af0d828e00ed1c3d2d7d --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/ChannelUserIdRQ.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* +* 商户获取渠道用户ID 请求参数对象 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:40 +*/ +@Data +public class ChannelUserIdRQ extends AbstractRQ{ + + /** 商户号 **/ + @NotBlank(message="商户号不能为空") + private String mchNo; + + /** 接口代码, AUTO表示:自动获取 **/ + @NotBlank(message="接口代码不能为空") + private String ifCode; + + /** 回调地址 **/ + @NotBlank(message="回调地址不能为空") + private String redirectUrl; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..dcc60ed004bbaf649a9042119212f070f3e838d2 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRQ.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* +* 查询订单请求参数对象 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:40 +*/ +@Data +public class QueryPayOrderRQ extends AbstractRQ{ + + /** 商户号 **/ + @NotBlank(message="商户号不能为空") + private String mchNo; + + /** 商户订单号 **/ + private String mchOrderNo; + + /** 支付系统订单号 **/ + private String payOrderId; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..86ceb398a3b8828266553b4abd15d8ba3eeeb8dd --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/QueryPayOrderRS.java @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs; + +import com.jeequan.jeepay.core.entity.PayOrder; +import lombok.Data; +import org.springframework.beans.BeanUtils; + +/* +* 查询订单 响应参数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:40 +*/ +@Data +public class QueryPayOrderRS extends AbstractRS{ + + /** + * 支付订单号 + */ + private String payOrderId; + + /** + * 商户号 + */ + private String mchNo; + + /** + * 商户订单号 + */ + private String mchOrderNo; + + /** + * 支付接口代码 + */ + private String ifCode; + + /** + * 支付方式代码 + */ + private String wayCode; + + /** + * 支付金额,单位分 + */ + private Long amount; + + /** + * 三位货币代码,人民币:cny + */ + private String currency; + + /** + * 支付状态: 0-订单生成, 1-支付中, 2-支付成功, 3-支付失败, 4-已撤销, 5-已退款, 6-订单关闭 + */ + private Byte state; + + /** + * 客户端IP + */ + private String clientIp; + + /** + * 商品标题 + */ + private String subject; + + /** + * 商品描述信息 + */ + private String body; + + /** + * 渠道订单号 + */ + private String channelOrderNo; + + /** + * 渠道支付错误码 + */ + private String errCode; + + /** + * 渠道支付错误描述 + */ + private String errMsg; + + /** + * 商户扩展参数 + */ + private String extParam; + + /** + * 订单支付成功时间 + */ + private Long successTime; + + /** + * 创建时间 + */ + private Long createdAt; + + + public static QueryPayOrderRS buildByPayOrder(PayOrder payOrder){ + + if(payOrder == null){ + return null; + } + + QueryPayOrderRS result = new QueryPayOrderRS(); + BeanUtils.copyProperties(payOrder, result); + result.setSuccessTime(payOrder.getSuccessTime() == null ? null : payOrder.getSuccessTime().getTime()); + result.setCreatedAt(payOrder.getCreatedAt() == null ? null : payOrder.getCreatedAt().getTime()); + + return result; + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/msg/ChannelRetMsg.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/msg/ChannelRetMsg.java new file mode 100644 index 0000000000000000000000000000000000000000..ecef4e92ca67245893696a2e26801d93000218ee --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/msg/ChannelRetMsg.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.msg; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.ResponseEntity; + +import java.io.Serializable; + +/* +* 上游渠道侧响应信息包装类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:31 +*/ +@Slf4j +@Data +public class ChannelRetMsg implements Serializable { + + /** 上游渠道返回状态 **/ + private ChannelState channelState; + + /** 渠道订单号 **/ + private String channelOrderId; + + /** 渠道用户标识 **/ + private String channelUserId; + + /** 渠道错误码 **/ + private String channelErrCode; + + /** 渠道错误描述 **/ + private String channelErrMsg; + + /** 渠道支付数据包, 一般用于支付订单的继续支付操作 **/ + private String channelAttach; + + /** 上游渠道返回的原始报文, 一般用于[运营平台的查询上游结果]功能 **/ + private String channelOriginResponse; + + /** 是否需要轮询查单(比如微信条码支付) 默认不查询订单 **/ + private boolean isNeedQuery = false; + + /** 响应结果(一般用于回调接口返回给上游数据 ) **/ + private ResponseEntity responseEntity; + + //渠道状态枚举值 + public enum ChannelState { + CONFIRM_SUCCESS, //接口正确返回: 业务状态已经明确成功 + CONFIRM_FAIL, //接口正确返回: 业务状态已经明确失败 + WAITING, //接口正确返回: 上游处理中, 需通过定时查询/回调进行下一步处理 + UNKNOWN, //接口超时,或网络异常等请求, 或者返回结果的签名失败: 状态不明确 ( 上游接口变更, 暂时无法确定状态值 ) + API_RET_ERROR, //渠道侧出现异常( 接口返回了异常状态 ) + SYS_ERROR //本系统出现不可预知的异常 + } + + //静态初始函数 + public ChannelRetMsg(){} + public ChannelRetMsg(ChannelState channelState, String channelOrderId, String channelErrCode, String channelErrMsg) { + this.channelState = channelState; + this.channelOrderId = channelOrderId; + this.channelErrCode = channelErrCode; + this.channelErrMsg = channelErrMsg; + } + + /** 明确成功 **/ + public static ChannelRetMsg confirmSuccess(String channelOrderId){ + return new ChannelRetMsg(ChannelState.CONFIRM_SUCCESS, channelOrderId, null, null); + } + + /** 明确失败 **/ + public static ChannelRetMsg confirmFail(String channelOrderId, String channelErrCode, String channelErrMsg){ + return new ChannelRetMsg(ChannelState.CONFIRM_FAIL, channelOrderId, channelErrCode, channelErrMsg); + } + + /** 明确失败 **/ + public static ChannelRetMsg confirmFail(String channelOrderId){ + return new ChannelRetMsg(ChannelState.CONFIRM_FAIL, channelOrderId, null, null); + } + + /** 明确失败 **/ + public static ChannelRetMsg confirmFail(){ + return new ChannelRetMsg(ChannelState.CONFIRM_FAIL, null, null, null); + } + + /** 处理中 **/ + public static ChannelRetMsg waiting(){ + return new ChannelRetMsg(ChannelState.WAITING, null, null, null); + } + + /** 异常的情况 **/ + public static ChannelRetMsg sysError(String channelErrMsg){ + return new ChannelRetMsg(ChannelState.SYS_ERROR, null, null, "系统:" + channelErrMsg); + } + + /** 状态未知的情况 **/ + public static ChannelRetMsg unknown(){ + return new ChannelRetMsg(ChannelState.UNKNOWN, null, null, null); + } + +} + + + + + diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..b32f0536690889cc3b1171cc116a9953970c3ba8 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRQ.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder; + +import lombok.Data; + +/* +* 通用支付数据RQ +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:31 +*/ +@Data +public class CommonPayDataRQ extends UnifiedOrderRQ { + + /** 请求参数: 支付数据包类型 **/ + private String payDataType; + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRS.java new file mode 100644 index 0000000000000000000000000000000000000000..57a12a344b28148658341bff6daa1d4bcc553b74 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/CommonPayDataRS.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder; + +import com.jeequan.jeepay.core.constants.CS; +import lombok.Data; +import org.apache.commons.lang3.StringUtils; + +/* +* 通用支付数据RS +* 根据set的值,响应不同的payDataType +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:32 +*/ +@Data +public class CommonPayDataRS extends UnifiedOrderRS { + + /** 跳转地址 **/ + private String payUrl; + + /** 二维码地址 **/ + private String codeUrl; + + /** 二维码图片地址 **/ + private String codeImgUrl; + + /** 表单内容 **/ + private String formContent; + + @Override + public String buildPayDataType(){ + + if(StringUtils.isNotEmpty(payUrl)){ + return CS.PAY_DATA_TYPE.PAY_URL; + } + + if(StringUtils.isNotEmpty(codeUrl)){ + return CS.PAY_DATA_TYPE.CODE_URL; + } + + if(StringUtils.isNotEmpty(codeImgUrl)){ + return CS.PAY_DATA_TYPE.CODE_IMG_URL; + } + + if(StringUtils.isNotEmpty(formContent)){ + return CS.PAY_DATA_TYPE.FORM; + } + + return CS.PAY_DATA_TYPE.PAY_URL; + } + + @Override + public String buildPayData(){ + + if(StringUtils.isNotEmpty(payUrl)){ + return payUrl; + } + + if(StringUtils.isNotEmpty(codeUrl)){ + return codeUrl; + } + + if(StringUtils.isNotEmpty(codeImgUrl)){ + return codeImgUrl; + } + + if(StringUtils.isNotEmpty(formContent)){ + return formContent; + } + + return ""; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..6f412b06ecb99d5ce20841c649d5e6ad450c1ede --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRQ.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.AbstractRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.payway.*; +import lombok.Data; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/* +* 创建订单请求参数对象 +* 聚合支付接口(统一下单) +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:33 +*/ +@Data +public class UnifiedOrderRQ extends AbstractRQ { + + /** 商户号 **/ + @NotBlank(message="商户号不能为空") + private String mchNo; + + /** 商户订单号 **/ + @NotBlank(message="商户订单号不能为空") + private String mchOrderNo; + + /** 支付方式 如: wxpay_jsapi,alipay_wap等 **/ + @NotBlank(message="支付方式不能为空") + private String wayCode; + + /** 支付金额, 单位:分 **/ + @NotNull(message="支付金额不能为空") + @Min(value = 1, message = "支付金额不能为空") + private Long amount; + + /** 货币代码 **/ + @NotBlank(message="货币代码不能为空") + private String currency; + + /** 客户端IP地址 **/ + private String clientIp; + + /** 商品标题 **/ + @NotBlank(message="商品标题不能为空") + private String subject; + + /** 商品描述信息 **/ + @NotBlank(message="商品描述信息不能为空") + private String body; + + /** 异步通知地址 **/ + private String notifyUrl; + + /** 跳转通知地址 **/ + private String returnUrl; + + /** 订单失效时间 **/ + private String expiredTime; + + /** 特定渠道发起额外参数 **/ + private String channelExtra; + + /** 渠道用户标识,如微信openId,支付宝账号 **/ + private String channelUser; + + /** 商户扩展参数 **/ + private String extParam; + + + /** 返回真实的bizRQ **/ + public UnifiedOrderRQ buildBizRQ(){ + + if(CS.PAY_WAY_CODE.ALI_BAR.equals(wayCode)){ + AliBarOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliBarOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.ALI_JSAPI.equals(wayCode)){ + AliJsapiOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliJsapiOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.QR_CASHIER.equals(wayCode)){ + QrCashierOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), QrCashierOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.WX_JSAPI.equals(wayCode) || CS.PAY_WAY_CODE.WX_LITE.equals(wayCode)){ + WxJsapiOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), WxJsapiOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.WX_BAR.equals(wayCode)){ + WxBarOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), WxBarOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.WX_NATIVE.equals(wayCode)){ + WxNativeOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), WxNativeOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.WX_H5.equals(wayCode)){ + WxH5OrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), WxH5OrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.YSF_BAR.equals(wayCode)){ + YsfBarOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), YsfBarOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.YSF_JSAPI.equals(wayCode)){ + YsfJsapiOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), YsfJsapiOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.AUTO_BAR.equals(wayCode)){ + AutoBarOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AutoBarOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.ALI_APP.equals(wayCode)){ + AliAppOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliAppOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.ALI_WAP.equals(wayCode)){ + AliWapOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliWapOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.ALI_PC.equals(wayCode)){ + AliPcOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliPcOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + }else if(CS.PAY_WAY_CODE.ALI_QR.equals(wayCode)){ + AliQrOrderRQ bizRQ = JSONObject.parseObject(StringUtils.defaultIfEmpty(this.channelExtra, "{}"), AliQrOrderRQ.class); + BeanUtils.copyProperties(this, bizRQ); + return bizRQ; + } + + return this; + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..e17d644de7f9845d1fa581d6c0f8e3f401f0d414 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/UnifiedOrderRS.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder; + +import com.alibaba.fastjson.annotation.JSONField; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.AbstractRS; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import lombok.Data; + +/* +* 创建订单(统一订单) 响应参数 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:34 +*/ +@Data +public class UnifiedOrderRS extends AbstractRS { + + /** 支付订单号 **/ + private String payOrderId; + + /** 商户订单号 **/ + private String mchOrderNo; + + /** 订单状态 **/ + private Byte orderState; + + /** 支付参数类型 ( 无参数, 调起支付插件参数, 重定向到指定地址, 用户扫码 ) **/ + private String payDataType; + + /** 支付参数 **/ + private String payData; + + /** 渠道返回错误代码 **/ + private String errCode; + + /** 渠道返回错误信息 **/ + private String errMsg; + + /** 上游渠道返回数据包 (无需JSON序列化) **/ + @JSONField(serialize = false) + private ChannelRetMsg channelRetMsg; + + /** 生成聚合支付参数 (仅统一下单接口使用) **/ + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.NONE; + } + + /** 生成支付参数 **/ + public String buildPayData(){ + return ""; + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..702e2977fa1c57ccb030359bfd159008cde84ddd --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +/* +* 支付方式: ALI_APP +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:34 +*/ +@Data +public class AliAppOrderRQ extends UnifiedOrderRQ { + + /** 构造函数 **/ + public AliAppOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_APP); //默认 wayCode, 避免validate出现问题 + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..dee976db5161af737714140a0b01668a14cb6178 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliAppOrderRS.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: ALI_APP + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliAppOrderRS extends UnifiedOrderRS { + + private String payData; + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.ALI_APP; + } + + @Override + public String buildPayData(){ + return payData; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..16759d8b6d07dbaa0ece71ede7e92ee8ea52aa64 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRQ.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* + * 支付方式: ALI_BAR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliBarOrderRQ extends UnifiedOrderRQ { + + /** 用户 支付条码 **/ + @NotBlank(message = "支付条码不能为空") + private String authCode; + + /** 构造函数 **/ + public AliBarOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_BAR); //默认 ali_bar, 避免validate出现问题 + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..711c0da1d27fcb5feb6c13234d8f48bc3aaf5f62 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliBarOrderRS.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: ALI_BAR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliBarOrderRS extends UnifiedOrderRS { + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.NONE; + } + + @Override + public String buildPayData(){ + return ""; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..408d4aa40cf03e07b9bb60792ab42e0dc40bfe12 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRQ.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* + * 支付方式: ALI_JSAPI + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliJsapiOrderRQ extends UnifiedOrderRQ { + + /** 支付宝用户ID **/ + @NotBlank(message = "用户ID不能为空") + private String buyerUserId; + + /** 构造函数 **/ + public AliJsapiOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_JSAPI); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..7283d64713fa53f263e4010532dd87561226edb7 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliJsapiOrderRS.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.utils.JsonKit; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: ALI_JSAPI + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliJsapiOrderRS extends UnifiedOrderRS { + + /** 调起支付插件的支付宝订单号 **/ + private String alipayTradeNo; + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.ALI_APP; + } + + @Override + public String buildPayData(){ + return JsonKit.newJson("alipayTradeNo", alipayTradeNo).toString(); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..7b10958237891c2bed97fe5fce92129c07361300 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRQ.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +/* + * 支付方式: ALI_PC + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliPcOrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public AliPcOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_PC); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..42d01d392bbb3f72cc71f058b1e813b69df4189d --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliPcOrderRS.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: ALI_PC + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliPcOrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..82aef749d9c622e32d769ae6e5d791e553be4ae7 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import lombok.Data; + +/* + * 支付方式: ALI_QR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliQrOrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public AliQrOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_QR); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..244cf0960f940ea6d7c04250db2f54f53ec24442 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliQrOrderRS.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import lombok.Data; + +/* + * 支付方式: ALI_QR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliQrOrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..320000795f13dd7574a677df6a8bb1712df48e7a --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import lombok.Data; + +/* + * 支付方式: ALI_WAP + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliWapOrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public AliWapOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.ALI_WAP); //默认 ALI_WAP, 避免validate出现问题 + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..9a9f7c3728908f3a76ace01fd1aed3b5c8c6eb40 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AliWapOrderRS.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import lombok.Data; + +/* + * 支付方式: ALI_WAP + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AliWapOrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..d9402e4993a22de3455a0aa69b779ef5cb1dec69 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRQ.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +/* + * 支付方式: AUTO_BAR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AutoBarOrderRQ extends UnifiedOrderRQ { + + /** 条码值 **/ + private String authCode; + + /** 构造函数 **/ + public AutoBarOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.AUTO_BAR); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..df22f22e8016d5f10775c03931335dc797bd0583 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/AutoBarOrderRS.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: AUTO_BAR + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class AutoBarOrderRS extends UnifiedOrderRS { + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.NONE; + } + + @Override + public String buildPayData(){ + return ""; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..abd118d9e2b8ff7ae740058dce0162ef8748d015 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import lombok.Data; + +/* + * 支付方式: QR_CASHIER + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class QrCashierOrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public QrCashierOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.QR_CASHIER); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..e03cb40a140107662c611aa6428b02e5e8713940 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/QrCashierOrderRS.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import lombok.Data; + +/* + * 支付方式: QR_CASHIER + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class QrCashierOrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxAppOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxAppOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..8603eea03373411b5806759e79e9ca88aad69d32 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxAppOrderRS.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: WX_APP + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxAppOrderRS extends UnifiedOrderRS { + + /** 预支付数据包 **/ + private String payInfo; + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.WX_APP; + } + + @Override + public String buildPayData(){ + return payInfo; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..16c154d6a4e27d07327c312d590a1b3bf9016f83 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRQ.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* + * 支付方式: WX_BAR + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxBarOrderRQ extends UnifiedOrderRQ { + + /** 用户 支付条码 **/ + @NotBlank(message = "支付条码不能为空") + private String authCode; + + /** 构造函数 **/ + public WxBarOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.WX_BAR); //默认 wx_bar, 避免validate出现问题 + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..d1487f959edd153f70106705b64a0a6f07d074f2 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxBarOrderRS.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: WX_BAR + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxBarOrderRS extends UnifiedOrderRS { + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.NONE; + } + + @Override + public String buildPayData(){ + return ""; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..379c90cfb6317a26e33c20214612d746d5066652 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRQ.java @@ -0,0 +1,22 @@ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import lombok.Data; + +/* + * 支付方式: WX_H5 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxH5OrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public WxH5OrderRQ() { + this.setWayCode(CS.PAY_WAY_CODE.WX_H5); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..cbd5b6f05fe8510c398eeb353d37b24831880531 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxH5OrderRS.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import lombok.Data; + +/* + * 支付方式: WX_H5 + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxH5OrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..9369c79fd7aaa61a2c35c7750bd0201a3591ad3f --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRQ.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* + * 支付方式: WX_JSAPI + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxJsapiOrderRQ extends UnifiedOrderRQ { + + /** 微信openid **/ + @NotBlank(message = "openid不能为空") + private String openid; + + /** 构造函数 **/ + public WxJsapiOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.WX_JSAPI); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..892904b09de5de78978065bdd36da304f280a072 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxJsapiOrderRS.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: WX_JSAPI + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxJsapiOrderRS extends UnifiedOrderRS { + + /** 预支付数据包 **/ + private String payInfo; + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.WX_APP; + } + + @Override + public String buildPayData(){ + return payInfo; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..a31907222ce5b87ab669ad750fe714b7f2cc94dd --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRQ; +import lombok.Data; + +/* + * 支付方式: WX_NATIVE + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxNativeOrderRQ extends CommonPayDataRQ { + + /** 构造函数 **/ + public WxNativeOrderRQ() { + this.setWayCode(CS.PAY_WAY_CODE.WX_NATIVE); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..6e9e8d6e463be496bb890d034196acce47c1661e --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/WxNativeOrderRS.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.pay.rqrs.payorder.CommonPayDataRS; +import lombok.Data; + +/* + * 支付方式: WX_NATIVE + * + * @author zhuxiao + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class WxNativeOrderRS extends CommonPayDataRS { + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..af721769cabd477e095ff9c60eb2aa93dcec8b96 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRQ.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/* + * 支付方式: YSF_BAR + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class YsfBarOrderRQ extends UnifiedOrderRQ { + + /** 用户 支付条码 **/ + @NotBlank(message = "支付条码不能为空") + private String authCode; + + /** 构造函数 **/ + public YsfBarOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.YSF_BAR); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..d7336ecd99f408d1b7808b1587c38d8198ec8175 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfBarOrderRS.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: YSF_BAR + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class YsfBarOrderRS extends UnifiedOrderRS { + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.NONE; + } + + @Override + public String buildPayData(){ + return ""; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRQ.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRQ.java new file mode 100644 index 0000000000000000000000000000000000000000..15e1e3a3f4a1ffff6062c627d3706c60ec21b53c --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRQ.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ; +import lombok.Data; + +/* + * 支付方式: YSF_JSAPI + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class YsfJsapiOrderRQ extends UnifiedOrderRQ { + + /** 构造函数 **/ + public YsfJsapiOrderRQ(){ + this.setWayCode(CS.PAY_WAY_CODE.YSF_JSAPI); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRS.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRS.java new file mode 100644 index 0000000000000000000000000000000000000000..7c28a8ceb346d76d48b0fb1908c27c170aeb300b --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/rqrs/payorder/payway/YsfJsapiOrderRS.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.rqrs.payorder.payway; + +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.utils.JsonKit; +import com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRS; +import lombok.Data; + +/* + * 支付方式: YSF_JSAPI + * + * @author pangxiaoyu + * @site https://www.jeepay.vip + * @date 2021/6/8 17:34 + */ +@Data +public class YsfJsapiOrderRS extends UnifiedOrderRS { + + /** 调起支付插件的云闪付订单号 **/ + private String redirectUrl; + + @Override + public String buildPayDataType(){ + return CS.PAY_DATA_TYPE.YSF_APP; + } + + @Override + public String buildPayData(){ + return JsonKit.newJson("redirectUrl", redirectUrl).toString(); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ChannelOrderReissueService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ChannelOrderReissueService.java new file mode 100644 index 0000000000000000000000000000000000000000..0d2c9a4f5d32095247c07a6632d902bb498a67db --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ChannelOrderReissueService.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.service; + +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.pay.channel.IPayOrderQueryService; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/* +* 查询上游订单, & 补单服务实现类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:40 +*/ +@Service +@Slf4j +public class ChannelOrderReissueService { + + @Autowired private ConfigContextService configContextService; + @Autowired private PayOrderService payOrderService; + @Autowired private PayMchNotifyService payMchNotifyService; + + + /** 处理订单 **/ + public ChannelRetMsg processPayOrder(PayOrder payOrder){ + + try { + + String payOrderId = payOrder.getPayOrderId(); + + //查询支付接口是否存在 + IPayOrderQueryService queryService = SpringBeansUtil.getBean(payOrder.getIfCode() + "PayOrderQueryService", IPayOrderQueryService.class); + + // 支付通道接口实现不存在 + if(queryService == null){ + log.error("{} interface not exists!", payOrder.getIfCode()); + return null; + } + + //查询出商户的配置信息 + String mchNo = payOrder.getMchNo(); + MchConfigContext mchConfigContext = configContextService.getMchConfigContext(mchNo); + + ChannelRetMsg channelRetMsg = queryService.query(payOrder, mchConfigContext); + if(channelRetMsg == null){ + log.error("channelRetMsg is null"); + return null; + } + + log.info("补单[{}]查询结果为:{}", payOrderId, channelRetMsg); + + // 查询成功 + if(channelRetMsg.getChannelState() == ChannelRetMsg.ChannelState.CONFIRM_SUCCESS) { + if (payOrderService.updateIng2Success(payOrderId, channelRetMsg.getChannelOrderId())) { + + // 通知商户系统 + if(StringUtils.isNotEmpty(payOrder.getNotifyUrl())){ + payMchNotifyService.payOrderNotify(payOrderService.getById(payOrderId)); + } + + } + }else if(channelRetMsg.getChannelState() == ChannelRetMsg.ChannelState.CONFIRM_FAIL){ //确认失败 + + //1. 更新支付订单表为失败状态 + payOrderService.updateIng2Fail(payOrderId, channelRetMsg.getChannelOrderId(), channelRetMsg.getChannelErrCode(), channelRetMsg.getChannelErrMsg()); + + } + + return channelRetMsg; + + } catch (Exception e) { //继续下一次迭代查询 + log.error("error payOrderId = {}", payOrder.getPayOrderId(), e); + return null; + } + + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java new file mode 100644 index 0000000000000000000000000000000000000000..2cf714785064e97c871c3845a53ccae2074737df --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.service; + +import com.alipay.api.AlipayApiException; +import com.alipay.api.AlipayClient; +import com.alipay.api.CertAlipayRequest; +import com.alipay.api.DefaultAlipayClient; +import com.github.binarywang.wxpay.config.WxPayConfig; +import com.github.binarywang.wxpay.constant.WxPayConstants; +import com.github.binarywang.wxpay.service.WxPayService; +import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.IsvInfo; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.model.params.IsvParams; +import com.jeequan.jeepay.core.model.params.IsvsubMchParams; +import com.jeequan.jeepay.core.model.params.NormalMchParams; +import com.jeequan.jeepay.core.model.params.alipay.AlipayConfig; +import com.jeequan.jeepay.core.model.params.alipay.AlipayIsvParams; +import com.jeequan.jeepay.core.model.params.alipay.AlipayNormalMchParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayIsvParams; +import com.jeequan.jeepay.core.model.params.wxpay.WxpayNormalMchParams; +import com.jeequan.jeepay.pay.config.SystemYmlConfig; +import com.jeequan.jeepay.pay.model.AlipayClientWrapper; +import com.jeequan.jeepay.pay.model.IsvConfigContext; +import com.jeequan.jeepay.pay.model.MchConfigContext; +import com.jeequan.jeepay.pay.model.WxServiceWrapper; +import com.jeequan.jeepay.pay.util.ChannelCertConfigKitBean; +import com.jeequan.jeepay.service.impl.IsvInfoService; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.PayInterfaceConfigService; +import me.chanjar.weixin.mp.api.WxMpService; +import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; +import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.File; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/* +* 商户/服务商 配置信息上下文服务 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:41 +*/ +@Service +public class ConfigContextService { + + private static final Map mchConfigContextMap = new ConcurrentHashMap<>(); + private static final Map isvConfigContextMap = new ConcurrentHashMap<>(); + + @Autowired private MchInfoService mchInfoService; + @Autowired private IsvInfoService isvInfoService; + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + @Autowired private SystemYmlConfig mainConfig; + @Autowired private ChannelCertConfigKitBean channelCertConfigKitBean; + + /** 获取支付参数 **/ + public synchronized MchConfigContext getMchConfigContext(String mchNo){ + + MchConfigContext mchConfigContext = mchConfigContextMap.get(mchNo); + + //无此数据, 需要初始化 + if(mchConfigContext == null){ + initMchConfigContext(mchNo); + } + + return mchConfigContextMap.get(mchNo); + } + + /** 获取支付参数 **/ + public synchronized IsvConfigContext getIsvConfigContext(String isvNo){ + + IsvConfigContext isvConfigContext = isvConfigContextMap.get(isvNo); + + //无此数据, 需要初始化 + if(isvConfigContext == null){ + initIsvConfigContext(isvNo); + } + + return isvConfigContextMap.get(isvNo); + } + + + /** 获取支付参数 **/ + public synchronized void initMchConfigContext(String mchNo){ + + MchConfigContext mchConfigContext = new MchConfigContext(); + MchInfo mchInfo = mchInfoService.getById(mchNo); + if(mchInfo == null){ + mchConfigContextMap.remove(mchNo); + return ; + } + + // 设置商户信息 + mchConfigContext.setMchNo(mchInfo.getMchNo()); + mchConfigContext.setMchType(mchInfo.getType()); + mchConfigContext.setMchInfo(mchInfo); + + // 查询商户的所有支持的参数配置 + List allConfigList = payInterfaceConfigService.list(PayInterfaceConfig.gw() + .select(PayInterfaceConfig::getIfCode, PayInterfaceConfig::getIfParams) + .eq(PayInterfaceConfig::getState, CS.YES) + .eq(PayInterfaceConfig::getInfoType, CS.INFO_TYPE_MCH) + .eq(PayInterfaceConfig::getInfoId, mchNo) + ); + + // 普通商户 + if(mchInfo.getType() == CS.MCH_TYPE_NORMAL){ + + for (PayInterfaceConfig payInterfaceConfig : allConfigList) { + mchConfigContext.getNormalMchParamsMap().put( + payInterfaceConfig.getIfCode(), + NormalMchParams.factory(payInterfaceConfig.getIfCode(), payInterfaceConfig.getIfParams()) + ); + } + + //放置alipay client + + AlipayNormalMchParams alipayParams = mchConfigContext.getNormalMchParamsByIfCode(CS.IF_CODE.ALIPAY, AlipayNormalMchParams.class); + if(alipayParams != null){ + + mchConfigContext.setAlipayClientWrapper(buildAlipayClientWrapper( + alipayParams.getUseCert(), alipayParams.getSandbox(), alipayParams.getAppId(), alipayParams.getPrivateKey(), + alipayParams.getAlipayPublicKey(), alipayParams.getSignType(), alipayParams.getAppPublicCert(), + alipayParams.getAlipayPublicCert(), alipayParams.getAlipayRootCert() + ) + ); + + } + + //放置 wxJavaService + WxpayNormalMchParams wxpayParams = mchConfigContext.getNormalMchParamsByIfCode(CS.IF_CODE.WXPAY, WxpayNormalMchParams.class); + if(wxpayParams != null){ + mchConfigContext.setWxServiceWrapper(buildWxServiceWrapper(wxpayParams.getMchId(), wxpayParams.getAppId(), + wxpayParams.getAppSecret(), wxpayParams.getKey(), wxpayParams.getApiVersion(), wxpayParams.getApiV3Key(), + wxpayParams.getSerialNo(), wxpayParams.getCert(), wxpayParams.getApiClientKey())); + } + + + }else{ //服务商模式商户 + for (PayInterfaceConfig payInterfaceConfig : allConfigList) { + mchConfigContext.getIsvsubMchParamsMap().put( + payInterfaceConfig.getIfCode(), + IsvsubMchParams.factory(payInterfaceConfig.getIfCode(), payInterfaceConfig.getIfParams()) + ); + } + + //放置 当前商户的 服务商信息 + mchConfigContext.setIsvConfigContext(getIsvConfigContext(mchInfo.getIsvNo())); + + } + + mchConfigContextMap.put(mchNo, mchConfigContext); + } + + + /** 初始化 **/ + public synchronized void initIsvConfigContext(String isvNo){ + + IsvConfigContext isvConfigContext = new IsvConfigContext(); + IsvInfo isvInfo = isvInfoService.getById(isvNo); + if(isvInfo == null){ + + //查询出所有商户的配置信息并更新 + mchInfoService.list(MchInfo.gw().select(MchInfo::getMchNo).eq(MchInfo::getIsvNo, isvNo)).forEach(mchInfoItem -> { + + //将更新已存在缓存的商户配置信息 (每个商户下存储的为同一个 服务商配置的对象指针) + MchConfigContext mchConfigContext = mchConfigContextMap.get(mchInfoItem.getMchNo()); + if(mchConfigContext != null){ + mchConfigContext.setIsvConfigContext(null); + } + }); + isvConfigContextMap.remove(isvNo); // 服务商有商户不可删除, 此处不再更新商户下的配置信息 + return ; + } + + // 设置商户信息 + isvConfigContext.setIsvNo(isvInfo.getIsvNo()); + isvConfigContext.setIsvInfo(isvInfo); + + // 查询商户的所有支持的参数配置 + List allConfigList = payInterfaceConfigService.list(PayInterfaceConfig.gw() + .select(PayInterfaceConfig::getIfCode, PayInterfaceConfig::getIfParams) + .eq(PayInterfaceConfig::getState, CS.YES) + .eq(PayInterfaceConfig::getInfoType, CS.INFO_TYPE_ISV) + .eq(PayInterfaceConfig::getInfoId, isvNo) + ); + + for (PayInterfaceConfig payInterfaceConfig : allConfigList) { + isvConfigContext.getIsvParamsMap().put( + payInterfaceConfig.getIfCode(), + IsvParams.factory(payInterfaceConfig.getIfCode(), payInterfaceConfig.getIfParams()) + ); + } + + //放置alipay client + AlipayIsvParams alipayParams = isvConfigContext.getIsvParamsByIfCode(CS.IF_CODE.ALIPAY, AlipayIsvParams.class); + if(alipayParams != null){ + isvConfigContext.setAlipayClientWrapper(buildAlipayClientWrapper( + alipayParams.getUseCert(), alipayParams.getSandbox(), alipayParams.getAppId(), alipayParams.getPrivateKey(), + alipayParams.getAlipayPublicKey(), alipayParams.getSignType(), alipayParams.getAppPublicCert(), + alipayParams.getAlipayPublicCert(), alipayParams.getAlipayRootCert() + ) + ); + } + + //放置 wxJavaService + WxpayIsvParams wxpayParams = isvConfigContext.getIsvParamsByIfCode(CS.IF_CODE.WXPAY, WxpayIsvParams.class); + if(wxpayParams != null){ + isvConfigContext.setWxServiceWrapper(buildWxServiceWrapper(wxpayParams.getMchId(), wxpayParams.getAppId(), + wxpayParams.getAppSecret(), wxpayParams.getKey(), wxpayParams.getApiVersion(), wxpayParams.getApiV3Key(), + wxpayParams.getSerialNo(), wxpayParams.getCert(), wxpayParams.getApiClientKey())); + } + + isvConfigContextMap.put(isvNo, isvConfigContext); + + //查询出所有商户的配置信息并更新 + mchInfoService.list(MchInfo.gw().select(MchInfo::getMchNo).eq(MchInfo::getIsvNo, isvNo)).forEach(mchInfoItem -> { + + //将更新已存在缓存的商户配置信息 (每个商户下存储的为同一个 服务商配置的对象指针) + MchConfigContext mchConfigContext = mchConfigContextMap.get(mchInfoItem.getMchNo()); + if(mchConfigContext != null){ + mchConfigContext.setIsvConfigContext(isvConfigContext); + } + + }); + + } + + + /* + * 构建支付宝client 包装类 + * + * @author terrfly + * @site https://www.jeepay.vip + * @date 2021/6/8 17:46 + */ + private AlipayClientWrapper buildAlipayClientWrapper(Byte useCert, Byte sandbox, String appId, String privateKey, String alipayPublicKey, String signType, String appCert, + String alipayPublicCert, String alipayRootCert){ + + //避免空值 + sandbox = sandbox == null ? CS.NO : sandbox; + + AlipayClient alipayClient = null; + if(useCert != null && useCert == CS.YES){ //证书的方式 + + CertAlipayRequest certAlipayRequest = new CertAlipayRequest(); + certAlipayRequest.setServerUrl(sandbox == CS.YES ? AlipayConfig.SANDBOX_SERVER_URL : AlipayConfig.PROD_SERVER_URL); + certAlipayRequest.setAppId(appId); + certAlipayRequest.setPrivateKey(privateKey); + certAlipayRequest.setFormat(AlipayConfig.FORMAT); + certAlipayRequest.setCharset(AlipayConfig.CHARSET); + certAlipayRequest.setSignType(signType); + + certAlipayRequest.setCertPath(channelCertConfigKitBean.getCertFilePath(appCert)); + certAlipayRequest.setAlipayPublicCertPath(channelCertConfigKitBean.getCertFilePath(alipayPublicCert)); + certAlipayRequest.setRootCertPath(channelCertConfigKitBean.getCertFilePath(alipayRootCert)); + try { + alipayClient = new DefaultAlipayClient(certAlipayRequest); + } catch (AlipayApiException e) { + e.printStackTrace(); + } + }else{ + alipayClient = new DefaultAlipayClient(sandbox == CS.YES ? AlipayConfig.SANDBOX_SERVER_URL : AlipayConfig.PROD_SERVER_URL + , appId, privateKey, AlipayConfig.FORMAT, AlipayConfig.CHARSET, + alipayPublicKey, signType); + } + + return new AlipayClientWrapper(useCert, alipayClient); + } + + private WxServiceWrapper buildWxServiceWrapper(String mchId, String appId, String appSecret, String mchKey, String apiVersion, String apiV3Key, + String serialNo, String cert, String apiClientKey){ + + WxPayConfig wxPayConfig = new WxPayConfig(); + wxPayConfig.setMchId(mchId); + wxPayConfig.setAppId(appId); + wxPayConfig.setMchKey(mchKey); + + if (CS.PAY_IF_VERSION.WX_V2.equals(apiVersion)) { // 微信API V2 + wxPayConfig.setSignType(WxPayConstants.SignType.MD5); + } else if (CS.PAY_IF_VERSION.WX_V3.equals(apiVersion)) { // 微信API V3 + wxPayConfig.setApiV3Key(apiV3Key); + wxPayConfig.setCertSerialNo(serialNo); + wxPayConfig.setPrivateCertPath(channelCertConfigKitBean.getCertFilePath(cert)); + wxPayConfig.setPrivateKeyPath(channelCertConfigKitBean.getCertFilePath(apiClientKey)); + } + + WxPayService wxPayService = new WxPayServiceImpl(); + wxPayService.setConfig(wxPayConfig); //微信配置信息 + + WxMpDefaultConfigImpl wxMpConfigStorage = new WxMpDefaultConfigImpl(); + wxMpConfigStorage.setAppId(appId); + wxMpConfigStorage.setSecret(appSecret); + + WxMpService wxMpService = new WxMpServiceImpl(); + wxMpService.setWxMpConfigStorage(wxMpConfigStorage); //微信配置信息 + + return new WxServiceWrapper(apiVersion, wxPayService, wxMpService); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/PayMchNotifyService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/PayMchNotifyService.java new file mode 100644 index 0000000000000000000000000000000000000000..bd9102f68de5f40ad31bc1ca3efa52f46af1bda5 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/PayMchNotifyService.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.service; + +import com.alibaba.fastjson.JSONObject; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.MchNotifyRecord; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.utils.JeepayKit; +import com.jeequan.jeepay.pay.mq.queue.MqQueue4PayOrderMchNotify; +import com.jeequan.jeepay.pay.rqrs.QueryPayOrderRS; +import com.jeequan.jeepay.service.impl.MchInfoService; +import com.jeequan.jeepay.service.impl.MchNotifyRecordService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + +/* +* 商户通知 service +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:43 +*/ +@Slf4j +@Service +public class PayMchNotifyService { + + @Autowired private MchNotifyRecordService mchNotifyRecordService; + @Autowired private MchInfoService mchInfoService; + @Autowired private MqQueue4PayOrderMchNotify mqPayOrderMchNotifyQueue; + + + /** 商户通知信息, 只有订单是终态,才会发送通知, 如明确成功和明确失败 **/ + public void payOrderNotify(PayOrder dbPayOrder){ + + try { + // 通知地址为空 + if(StringUtils.isEmpty(dbPayOrder.getNotifyUrl())){ + return ; + } + + //获取到通知对象 + MchNotifyRecord mchNotifyRecord = mchNotifyRecordService.findByPayOrder(dbPayOrder.getPayOrderId()); + + if(mchNotifyRecord != null){ + + log.info("当前已存在通知消息, 不再发送。"); + return ; + } + + //构建数据 + MchInfo mchInfo = mchInfoService.getById(dbPayOrder.getMchNo()); + // 封装通知url + String notifyUrl = createNotifyUrl(dbPayOrder, mchInfo.getPrivateKey()); + mchNotifyRecord = new MchNotifyRecord(); + mchNotifyRecord.setOrderId(dbPayOrder.getPayOrderId()); + mchNotifyRecord.setOrderType(MchNotifyRecord.TYPE_PAY_ORDER); + mchNotifyRecord.setMchNo(dbPayOrder.getMchNo()); + mchNotifyRecord.setMchOrderNo(dbPayOrder.getMchOrderNo()); //商户订单号 + mchNotifyRecord.setIsvNo(dbPayOrder.getIsvNo()); + mchNotifyRecord.setNotifyUrl(notifyUrl); + mchNotifyRecord.setResResult(""); + mchNotifyRecord.setNotifyCount(0); + mchNotifyRecord.setState(MchNotifyRecord.STATE_ING); // 通知中 + mchNotifyRecordService.save(mchNotifyRecord); + + //推送到MQ + Long notifyId = mchNotifyRecord.getNotifyId(); + mqPayOrderMchNotifyQueue.send(notifyId + ""); + + } catch (Exception e) { + log.error("推送失败!", e); + } + } + + + /** + * 创建响应URL + */ + public String createNotifyUrl(PayOrder payOrder, String mchKey) { + + QueryPayOrderRS queryPayOrderRS = QueryPayOrderRS.buildByPayOrder(payOrder); + JSONObject jsonObject = (JSONObject)JSONObject.toJSON(queryPayOrderRS); + jsonObject.put("reqTime", System.currentTimeMillis()); //添加请求时间 + + // 先对原文签名 + String reqSign = JeepayKit.getSign(jsonObject, mchKey); + + jsonObject.put("sign", reqSign); // 签名 + // 生成参数串 + String param = JeepayKit.genUrlParams(jsonObject); + + //响应结果 + return payOrder.getNotifyUrl() + "?" + param; + } + + + /** + * 创建响应URL + */ + public String createReturnUrl(PayOrder payOrder, String mchKey) { + + if(StringUtils.isEmpty(payOrder.getReturnUrl())){ + return ""; + } + + QueryPayOrderRS queryPayOrderRS = QueryPayOrderRS.buildByPayOrder(payOrder); + JSONObject jsonObject = (JSONObject)JSONObject.toJSON(queryPayOrderRS); + jsonObject.put("reqTime", System.currentTimeMillis()); //添加请求时间 + + jsonObject.keySet().stream().forEach(key -> jsonObject.put(key, ( jsonObject.getString(key) == null ? null : URLEncoder.encode(jsonObject.getString(key))) )); + + // 先对原文签名 + String reqSign = JeepayKit.getSign(jsonObject, mchKey); + + jsonObject.put("sign", reqSign); // 签名 + // 生成参数串 + String param = JeepayKit.genUrlParams(jsonObject); + + //响应结果 + return payOrder.getReturnUrl() + "?" + param; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ValidateService.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ValidateService.java new file mode 100644 index 0000000000000000000000000000000000000000..79b3ca0425b850a9d1c8ae5ba6c5c8322dea2d30 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ValidateService.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.service; + +import com.jeequan.jeepay.core.exception.BizException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.validation.ConstraintViolation; +import javax.validation.Validator; +import java.util.Set; + +/* +* 通用 Validator +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:47 +*/ +@Service +public class ValidateService { + + @Autowired private Validator validator; + + public void validate(Object obj){ + + Set> resultSet = validator.validate(obj); + if(resultSet == null || resultSet.isEmpty()){ + return ; + } + resultSet.stream().forEach(item -> {throw new BizException(item.getMessage());}); + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderExpiredTask.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderExpiredTask.java new file mode 100644 index 0000000000000000000000000000000000000000..9d52ca503f635c418fd33b83123e4d7215266a73 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderExpiredTask.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.task; + +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +/* +* 订单过期定时任务 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:47 +*/ +@Slf4j +@Component +public class PayOrderExpiredTask { + + @Autowired private PayOrderService payOrderService; + + @Scheduled(cron="0 0/1 * * * ?") // 每分钟执行一次 + public void start() { + + int updateCount = payOrderService.updateOrderExpired(); + log.info("处理订单超时{}条.", updateCount); + } + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderReissueTask.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderReissueTask.java new file mode 100644 index 0000000000000000000000000000000000000000..3251c1528cd2163a5d43a55dc73f73aeea934e28 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/task/PayOrderReissueTask.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.task; + +import cn.hutool.core.date.DateUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.pay.service.ChannelOrderReissueService; +import com.jeequan.jeepay.service.impl.PayOrderService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/* +* 补单定时任务 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:47 +*/ +@Slf4j +@Component +public class PayOrderReissueTask { + + private static final int QUERY_PAGE_SIZE = 100; //每次查询数量 + + @Autowired private PayOrderService payOrderService; + @Autowired private ChannelOrderReissueService channelOrderReissueService; + + @Scheduled(cron="0 0/1 * * * ?") // 每分钟执行一次 + public void start() { + + //当前时间 减去10分钟。 + Date offsetDate = DateUtil.offsetMinute(new Date(), -10); + + //查询条件: 支付中的订单 & ( 订单创建时间 + 10分钟 >= 当前时间 ) + LambdaQueryWrapper lambdaQueryWrapper = PayOrder.gw().eq(PayOrder::getState, PayOrder.STATE_ING).le(PayOrder::getCreatedAt, offsetDate); + + int currentPageIndex = 1; //当前页码 + while(true){ + + try { + IPage payOrderIPage = payOrderService.page(new Page(currentPageIndex, QUERY_PAGE_SIZE), lambdaQueryWrapper); + + if(payOrderIPage == null || payOrderIPage.getRecords().isEmpty()){ //本次查询无结果, 不再继续查询; + break; + } + + for(PayOrder payOrder: payOrderIPage.getRecords()){ + channelOrderReissueService.processPayOrder(payOrder); + } + + //已经到达页码最大量,无需再次查询 + if(payOrderIPage.getPages() <= currentPageIndex){ + break; + } + currentPageIndex++; + + + } catch (Exception e) { //出现异常,直接退出,避免死循环。 + log.error("error", e); + break; + } + + } + } + + + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ApiResBuilder.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ApiResBuilder.java new file mode 100644 index 0000000000000000000000000000000000000000..d63c12be0cbef742262a742a693098209684df9a --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ApiResBuilder.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.util; + + +import com.jeequan.jeepay.pay.rqrs.AbstractRS; + +/* +* api响应结果构造器 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:45 +*/ +public class ApiResBuilder { + + /** 构建自定义响应对象, 默认响应成功 **/ + public static T buildSuccess(Class T){ + + try { + T result = (T)T.newInstance(); + return result; + + } catch (Exception e) { return null; } + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ChannelCertConfigKitBean.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ChannelCertConfigKitBean.java new file mode 100644 index 0000000000000000000000000000000000000000..19a8560a077f3bdd23c482dc337f2f693b595a08 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/ChannelCertConfigKitBean.java @@ -0,0 +1,28 @@ +package com.jeequan.jeepay.pay.util; + +import com.jeequan.jeepay.pay.config.SystemYmlConfig; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.File; + +/* +* 支付平台 获取系统文件工具类 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:45 +*/ +@Component +public class ChannelCertConfigKitBean { + + @Autowired private SystemYmlConfig systemYmlConfig; + + public String getCertFilePath(String certFilePath){ + return systemYmlConfig.getOssFile().getPrivatePath() + File.separator + certFilePath; + } + + public File getCertFile(String certFilePath){ + return new File(getCertFilePath(certFilePath)); + } +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/CodeImgUtil.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/CodeImgUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..49ec6884c35e27098014eb4056232669c3afd5c4 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/CodeImgUtil.java @@ -0,0 +1,355 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.util; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.google.zxing.*; +import com.google.zxing.client.j2se.BufferedImageLuminanceSource; +import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.common.HybridBinarizer; +import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.geom.AffineTransform; +import java.awt.image.AffineTransformOp; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URL; +import java.nio.file.FileSystems; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/* +* 二维码生成器 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:54 +*/ +public class CodeImgUtil { + + private static final Logger _log = LoggerFactory.getLogger(CodeImgUtil.class); + + // 二维码尺寸List + private static List sizeList = new ArrayList(); + + static { + sizeList.add(258); + sizeList.add(344); + sizeList.add(430); + sizeList.add(860); + sizeList.add(1280); + } + + public static List getEwmSizeList() { + return sizeList; + } + + + //TODO + // 图片宽度的一般 + private static final int IMAGE_WIDTH = 25; + private static final int IMAGE_HEIGHT = 25; + private static final int IMAGE_HALF_WIDTH = IMAGE_WIDTH / 2; + private static final int FRAME_WIDTH = 2; + + // 二维码写码器 + private static MultiFormatWriter mutiWriter = new MultiFormatWriter(); + + /** + * + * @param content + * 二维码显示的文本 + * @param width + * 二维码的宽度 + * @param height + * 二维码的高度 + * @param srcImagePath + * 中间嵌套的图片 + * @param destImagePath + * 二维码生成的地址 + */ + public static void encode(String content, int width, int height, + String srcImagePath, String destImagePath, String fileName) { + try { + File dir = new File(destImagePath); + _log.error("==================" + destImagePath); + _log.error("==================" + srcImagePath); + if (!dir.exists()) { + _log.error("==================notExist"); + boolean result = dir.mkdirs(); + _log.error("==================midirsResult" + result); + } + // ImageIO.write 参数 1、BufferedImage 2、输出的格式 3、输出的文件 + ImageIO.write(genBarcode(content, width, height, srcImagePath), + "jpg", new File(destImagePath + fileName)); + + } catch (Exception e) { + _log.error("生成二维码出错", e); + } + } + + /** + * 得到BufferedImage + * + * @param content + * 二维码显示的文本 + * @param width + * 二维码的宽度 + * @param height + * 二维码的高度 + * @param srcImagePath + * 中间嵌套的图片 + * @return + * @throws WriterException + * @throws IOException + */ + @SuppressWarnings({ "rawtypes", "unchecked" }) + private static BufferedImage genBarcode(String content, int width, + int height, String srcImagePath) throws WriterException, + IOException { + // 读取源图像 + BufferedImage scaleImage = scale(srcImagePath, IMAGE_WIDTH, + IMAGE_HEIGHT, false); + + int[][] srcPixels = new int[IMAGE_WIDTH][IMAGE_HEIGHT]; + for (int i = 0; i < scaleImage.getWidth(); i++) { + for (int j = 0; j < scaleImage.getHeight(); j++) { + srcPixels[i][j] = scaleImage.getRGB(i, j); + } + } + + java.util.Hashtable hint = new java.util.Hashtable(); + hint.put(EncodeHintType.CHARACTER_SET, "utf-8"); + hint.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); + hint.put(EncodeHintType.MARGIN, 1); + // 生成二维码 + BitMatrix matrix = mutiWriter.encode(content, BarcodeFormat.QR_CODE, + width, height, hint); + + // 二维矩阵转为一维像素数组 + int halfW = matrix.getWidth() / 2; + int halfH = matrix.getHeight() / 2; + int[] pixels = new int[width * height]; + + for (int y = 0; y < matrix.getHeight(); y++) { + for (int x = 0; x < matrix.getWidth(); x++) { + // 读取图片 + if (x > halfW - IMAGE_HALF_WIDTH + && x < halfW + IMAGE_HALF_WIDTH + && y > halfH - IMAGE_HALF_WIDTH + && y < halfH + IMAGE_HALF_WIDTH) { + pixels[y * width + x] = srcPixels[x - halfW + + IMAGE_HALF_WIDTH][y - halfH + IMAGE_HALF_WIDTH]; + } + // 在图片四周形成边框 + else if ((x > halfW - IMAGE_HALF_WIDTH - FRAME_WIDTH + && x < halfW - IMAGE_HALF_WIDTH + FRAME_WIDTH + && y > halfH - IMAGE_HALF_WIDTH - FRAME_WIDTH && y < halfH + + IMAGE_HALF_WIDTH + FRAME_WIDTH) + || (x > halfW + IMAGE_HALF_WIDTH - FRAME_WIDTH + && x < halfW + IMAGE_HALF_WIDTH + FRAME_WIDTH + && y > halfH - IMAGE_HALF_WIDTH - FRAME_WIDTH && y < halfH + + IMAGE_HALF_WIDTH + FRAME_WIDTH) + || (x > halfW - IMAGE_HALF_WIDTH - FRAME_WIDTH + && x < halfW + IMAGE_HALF_WIDTH + FRAME_WIDTH + && y > halfH - IMAGE_HALF_WIDTH - FRAME_WIDTH && y < halfH + - IMAGE_HALF_WIDTH + FRAME_WIDTH) + || (x > halfW - IMAGE_HALF_WIDTH - FRAME_WIDTH + && x < halfW + IMAGE_HALF_WIDTH + FRAME_WIDTH + && y > halfH + IMAGE_HALF_WIDTH - FRAME_WIDTH && y < halfH + + IMAGE_HALF_WIDTH + FRAME_WIDTH)) { + pixels[y * width + x] = 0xfffffff; + } else { + // 此处可以修改二维码的颜色,可以分别制定二维码和背景的颜色; + pixels[y * width + x] = matrix.get(x, y) ? 0xff000000 + : 0xfffffff; + } + } + } + + BufferedImage image = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + image.getRaster().setDataElements(0, 0, width, height, pixels); + + return image; + } + + /** + * 把传入的原始图像按高度和宽度进行缩放,生成符合要求的图标 + * + * @param srcImageFile + * 源文件地址 + * @param height + * 目标高度 + * @param width + * 目标宽度 + * @param hasFiller + * 比例不对时是否需要补白:true为补白; false为不补白; + * @throws IOException + */ + private static BufferedImage scale(String srcImageFile, int height, + int width, boolean hasFiller) throws IOException { + double ratio = 0.0; // 缩放比例 + + URL url = new URL(srcImageFile); + + BufferedImage srcImage = ImageIO.read(url); + Image destImage = srcImage.getScaledInstance(width, height, + BufferedImage.SCALE_SMOOTH); + // 计算比例 + if ((srcImage.getHeight() > height) || (srcImage.getWidth() > width)) { + if (srcImage.getHeight() > srcImage.getWidth()) { + ratio = (new Integer(height)).doubleValue() + / srcImage.getHeight(); + } else { + ratio = (new Integer(width)).doubleValue() + / srcImage.getWidth(); + } + AffineTransformOp op = new AffineTransformOp(AffineTransform + .getScaleInstance(ratio, ratio), null); + destImage = op.filter(srcImage, null); + } + if (hasFiller) {// 补白 + BufferedImage image = new BufferedImage(width, height, + BufferedImage.TYPE_INT_RGB); + Graphics2D graphic = image.createGraphics(); + graphic.setColor(Color.white); + graphic.fillRect(0, 0, width, height); + if (width == destImage.getWidth(null)) + graphic.drawImage(destImage, 0, (height - destImage + .getHeight(null)) / 2, destImage.getWidth(null), + destImage.getHeight(null), Color.white, null); + else + graphic.drawImage(destImage, + (width - destImage.getWidth(null)) / 2, 0, destImage + .getWidth(null), destImage.getHeight(null), + Color.white, null); + graphic.dispose(); + destImage = image; + } + return (BufferedImage) destImage; + } + + /** + * 生成图像 + * filePath 存放图片的路径 + * fileName 图片的名称 + * info 生成图片的链接地址(例如:weixin://wxpay/s/Anp43md) + * width 图片的宽度 + * height 图片的高度 + * @throws WriterException + * @throws IOException + */ + public static String codeImgEncode(String filePath, String fileName, String info, int width, int height) throws WriterException, IOException { + String format="png"; + Map hints = new HashMap(); + hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); + BitMatrix bitMatrix = new MultiFormatWriter().encode(info, + BarcodeFormat.QR_CODE, width, height, hints);// 生成矩阵 + Path path = FileSystems.getDefault().getPath(filePath, fileName); + File dir = new File(filePath); + _log.error("==================" + filePath); + if (!dir.exists()) { + _log.error("==================notExist"); + boolean result = dir.mkdirs(); + _log.error("==================midirsResult" + result); + } + MatrixToImageWriter.writeToPath(bitMatrix, format, path);// 输出图像 + return path.toString(); + } + + + public static void writeQrCode(OutputStream stream, String info, int width, int height) throws WriterException, IOException { + String format="png"; + Map hints = new HashMap(); + hints.put(EncodeHintType.CHARACTER_SET, "UTF-8"); + hints.put(EncodeHintType.MARGIN,0); + BitMatrix bitMatrix = new MultiFormatWriter().encode(info, + BarcodeFormat.QR_CODE, width, height, hints);// 生成矩阵 + bitMatrix = deleteWhite(bitMatrix); + BufferedImage bi = MatrixToImageWriter.toBufferedImage(bitMatrix); + bi = zoomInImage(bi,width,height); + ImageIO.write(bi,format,stream); // 输出图像 + //MatrixToImageWriter.writeToStream(bitMatrix, format, stream);// 输出图像 + } + + + /** + * 解析图像 + */ + public static void codeImgDecode() { + String filePath = "D://zxing.png"; + BufferedImage image; + try { + image = ImageIO.read(new File(filePath)); + LuminanceSource source = new BufferedImageLuminanceSource(image); + Binarizer binarizer = new HybridBinarizer(source); + BinaryBitmap binaryBitmap = new BinaryBitmap(binarizer); + Map hints = new HashMap(); + hints.put(DecodeHintType.CHARACTER_SET, "UTF-8"); + Result result = new MultiFormatReader().decode(binaryBitmap, hints);// 对图像进行解码 + JSONObject content = JSON.parseObject(result.getText()); + System.out.println("图片中内容: "); + System.out.println("author: " + content.getString("author")); + System.out.println("zxing: " + content.getString("zxing")); + System.out.println("图片中格式: "); + System.out.println("encode: " + result.getBarcodeFormat()); + } catch (IOException e) { + e.printStackTrace(); + } catch (NotFoundException e) { + e.printStackTrace(); + } + } + + /** + * 去除白边 + * */ + private static BitMatrix deleteWhite(BitMatrix matrix) { + int[] rec = matrix.getEnclosingRectangle(); + int resWidth = rec[2] + 1; + int resHeight = rec[3] + 1; + + BitMatrix resMatrix = new BitMatrix(resWidth, resHeight); + resMatrix.clear(); + for (int i = 0; i < resWidth; i++) { + for (int j = 0; j < resHeight; j++) { + if (matrix.get(i + rec[0], j + rec[1])) + resMatrix.set(i, j); + } + } + return resMatrix; + } + + public static BufferedImage zoomInImage(BufferedImage originalImage, int wigth, int height){ + BufferedImage newImage = new BufferedImage(wigth,height,originalImage.getType()); + Graphics g = newImage.getGraphics(); + g.drawImage(originalImage,0,0,wigth,height,null); + g.dispose(); + return newImage; + } + +} diff --git a/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/PaywayUtil.java b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/PaywayUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..6f4a7a033ce2c8e626487638aad271b58b85b197 --- /dev/null +++ b/jeepay-payment/src/main/java/com/jeequan/jeepay/pay/util/PaywayUtil.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.pay.util; + +import cn.hutool.core.util.StrUtil; +import com.jeequan.jeepay.core.utils.SpringBeansUtil; +import com.jeequan.jeepay.pay.channel.IPaymentService; + +/* +* 支付方式动态调用Utils +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:46 +*/ +public class PaywayUtil { + + private static final String PAYWAY_PACKAGE_NAME = "payway"; + private static final String PAYWAYV3_PACKAGE_NAME = "paywayV3"; + + /** 获取真实的支付方式Service **/ + public static IPaymentService getRealPaywayService(Object obj, String wayCode){ + + try { + + //下划线转换驼峰 & 首字母大写 + String clsName = StrUtil.upperFirst(StrUtil.toCamelCase(wayCode.toLowerCase())); + return (IPaymentService) SpringBeansUtil.getBean( + Class.forName(obj.getClass().getPackage().getName() + + "." + PAYWAY_PACKAGE_NAME + + "." + clsName) + ); + + } catch (ClassNotFoundException e) { + return null; + } + } + + /** 获取微信V3真实的支付方式Service **/ + public static IPaymentService getRealPaywayV3Service(Object obj, String wayCode){ + + try { + + //下划线转换驼峰 & 首字母大写 + String clsName = StrUtil.upperFirst(StrUtil.toCamelCase(wayCode.toLowerCase())); + return (IPaymentService) SpringBeansUtil.getBean( + Class.forName(obj.getClass().getPackage().getName() + + "." + PAYWAYV3_PACKAGE_NAME + + "." + clsName) + ); + + } catch (ClassNotFoundException e) { + return null; + } + } + +} diff --git a/jeepay-payment/src/main/resources/application.yml b/jeepay-payment/src/main/resources/application.yml new file mode 100644 index 0000000000000000000000000000000000000000..9c9a503987184f114b7e0066fa524d10b235e8c6 --- /dev/null +++ b/jeepay-payment/src/main/resources/application.yml @@ -0,0 +1,73 @@ +server: + port: 9216 #设置端口为 9216 + servlet: + context-path: / #设置应用的目录. 前缀需要带/, 无需设置后缀, 示例 【 /xxx 】 or 【 / 】 +spring: + mvc: + servlet: + multipart: + enabled: true #是否启用http上传处理 + max-request-size: 10MB #最大请求文件的大小 + max-file-size: 10MB #设置单个文件最大长度 + resources: + static-locations: classpath:/static #项目静态资源路径 (可直接通过http访问) + freemarker: + template-loader-path: classpath:/templates #freemarker模板目录 + template-encoding: UTF-8 + suffix: .ftl + settings: + classic_compatible: true # 如果变量为null,转化为空字符串,比如做比较的时候按照空字符做比较 + number_format: '#' #数字格式进行原样显示,不加格式化字符例如 100,00 + datasource: + # yml填写url连接串, 无需将&符号进行转义 + url: jdbc:mysql://127.0.0.1:3306/jeepay?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false + username: root + password: 123 + druid: + # 连接池配置项 + initial-size: 5 #初始化时建立物理连接的个数 + min-idle: 5 #最小连接池数量 + max-active: 30 #最大连接池数量 + max-wait: 60000 #获取连接时最大等待时间,单位毫秒 + # 检测相关 + test-while-idle: true # 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 + test-on-borrow: false # 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + test-on-return: false # 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 + time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + min-evictable-idle-time-millis: 300000 #连接保持空闲而不被驱逐的最小时间 + validation-query: SELECT 1 FROM DUAL + # 是否缓存preparedStatement + pool-prepared-statements: false # 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭。 + max-pool-prepared-statement-per-connection-size: 20 # 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true。 + # 配置监控统计拦截的filters,去掉后监控界面sql无法统计 通过connectProperties属性来打开mergeSql功能;慢SQL记录 + filters: stat,wall + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 + cache: + type: redis + redis: + host: 127.0.0.1 + port: 6379 + timeout: 1000 + database: 3 #1库:运营平台 #2库:商户系统 #3库:支付网关 + password: + #activeMQ配置 + activemq: + broker-url: tcp://localhost:61616 #连接地址 + +#日志配置参数。 + # 当存在logback-spring.xml文件时: 该配置将引进到logback配置, springboot配置不生效。 + # 不存在logback-spring.xml 文件时, 使用springboot的配置, 同样可用。 +logging: + level: + root: info #主日志级别 + com.jeequan.jeepay: debug #该项目日志级别,当需要打印sql时请开启为debug + path: E:/logs #日志存放地址 + +#系统业务参数 +isys: + allow-cors: true #是否允许跨域请求 [生产环境建议关闭, 若api与前端项目没有在同一个域名下时,应开启此配置或在nginx统一配置允许跨域] + + # 文件系统配置项(系统内oss, 并非云oss) + oss-file: + root-path: E:/home/jeepay/files #存储根路径 ( 无需以‘/’结尾 ) + private-path: ${isys.oss-file.root-path}/private #私有化本地访问,不允许url方式公共读取 ( 一般配合root-path参数进行设置,需以‘/’ 开头, 无需以‘/’结尾 ) diff --git a/jeepay-payment/src/main/resources/banner.txt b/jeepay-payment/src/main/resources/banner.txt new file mode 100644 index 0000000000000000000000000000000000000000..3332e85c43819ca4183c57b3c15d45c760e63ed7 --- /dev/null +++ b/jeepay-payment/src/main/resources/banner.txt @@ -0,0 +1,9 @@ + __ + / /___ ___ ____ ____ ___ __ + __ / // _ \/ _ \/ __ \/ __ `/ / / / +/ /_/ // __/ __/ /_/ / /_/ / /_/ / +\____/ \___/\___/ .___/\__,_/\__, / + /_/ /____/ + :: Jeepay :: (v1.0.0.RELEASE) + 适合互联网企业使用的开源支付系统 : https://www.jeepay.vip + \ No newline at end of file diff --git a/jeepay-payment/src/main/resources/logback-spring.xml b/jeepay-payment/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000000000000000000000000000000000..d59a312c0265b86e2a42947486ff654724e58e31 --- /dev/null +++ b/jeepay-payment/src/main/resources/logback-spring.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + ${currentLoggerPattern} + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.all.%d{yyyy-MM-dd}.log + 10 + + + + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.log + + ${currentLoggerPattern} + + + + ${currentLoggerFilePath}/${currentLoggerFileName}.error.%d{yyyy-MM-dd}.log + 20 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + diff --git a/jeepay-payment/src/main/resources/static/qrCashier/readme.txt b/jeepay-payment/src/main/resources/static/qrCashier/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..5f0d13d58d8c1288ae97ff5384fa52d9b78ceb09 --- /dev/null +++ b/jeepay-payment/src/main/resources/static/qrCashier/readme.txt @@ -0,0 +1 @@ +放置打包好的html文件。 \ No newline at end of file diff --git a/jeepay-payment/src/main/resources/templates/cashier/returnPage.ftl b/jeepay-payment/src/main/resources/templates/cashier/returnPage.ftl new file mode 100644 index 0000000000000000000000000000000000000000..46ea8e06bae07290cb9faefcbb50259dea41d800 --- /dev/null +++ b/jeepay-payment/src/main/resources/templates/cashier/returnPage.ftl @@ -0,0 +1,16 @@ + + + + + + 支付完成 - 聚合支付 + + + + +

支付成功

+ + + + + \ No newline at end of file diff --git a/jeepay-payment/src/test/java/.gitkeep b/jeepay-payment/src/test/java/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-payment/src/test/resources/.gitkeep b/jeepay-payment/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-service/pom.xml b/jeepay-service/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..146b17d4166d463174c655af02e6a29d7534c939 --- /dev/null +++ b/jeepay-service/pom.xml @@ -0,0 +1,69 @@ + + + 4.0.0 + + com.jeequan + jeepay-service + jar + ${isys.version} + Jeepay计全支付系统 [jeepay-service] + https://www.jeequan.com + + + com.jeequan + jeepay + 1.0.0 + + + + + + + com.jeequan + jeepay-core + ${isys.version} + + + + + mysql + mysql-connector-java + + + + + com.alibaba + druid-spring-boot-starter + 1.2.6 + + + + + com.baomidou + mybatis-plus-boot-starter + + + + + org.springframework.security + spring-security-core + provided + + + + + + + + src/main/resources + + + src/main/java + **/*.xml + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/IsvInfoService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/IsvInfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..74faee09e9ec5bd776f2eaaa36e6763243f77976 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/IsvInfoService.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.IsvInfo; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.mapper.IsvInfoMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + *

+ * 服务商信息表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class IsvInfoService extends ServiceImpl { + + @Autowired private MchInfoService mchInfoService; + + @Autowired private IsvInfoService isvInfoService; + + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + + @Transactional + public void removeByIsvNo(String isvNo) { + // 0.当前服务商是否存在 + IsvInfo isvInfo = isvInfoService.getById(isvNo); + if (isvInfo == null) throw new BizException("该服务商不存在"); + + // 1.查询当前服务商下是否存在商户 + int mchCount = mchInfoService.count(MchInfo.gw().eq(MchInfo::getIsvNo, isvNo).eq(MchInfo::getType, CS.INFO_TYPE_ISV)); + if (mchCount > 0) throw new BizException("该服务商下存在商户,不可删除"); + + // 2.删除当前服务商支付接口配置参数 + payInterfaceConfigService.remove(PayInterfaceConfig.gw() + .eq(PayInterfaceConfig::getInfoId, isvNo) + .eq(PayInterfaceConfig::getInfoType, CS.INFO_TYPE_ISV) + ); + + // 3.删除该服务商 + boolean remove = isvInfoService.removeById(isvNo); + if (!remove) throw new BizException("删除服务商失败"); + } +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchInfoService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchInfoService.java new file mode 100644 index 0000000000000000000000000000000000000000..e0133cec27487c2ae0cc01d8dfbd48fc05a576b2 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchInfoService.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.*; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.mapper.MchInfoMapper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 商户信息表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class MchInfoService extends ServiceImpl { + + @Autowired private SysUserService sysUserService; + + @Autowired private PayOrderService payOrderService; + + @Autowired private MchPayPassageService mchPayPassageService; + + @Autowired private PayInterfaceConfigService payInterfaceConfigService; + + @Autowired private SysUserAuthService sysUserAuthService; + + @Autowired private IsvInfoService isvInfoService; + + @Transactional(rollbackFor = Exception.class) + public void addMch(MchInfo mchInfo, String loginUserName) { + + // 校验特邀商户信息 + if (mchInfo.getType() == CS.MCH_TYPE_ISVSUB && StringUtils.isNotEmpty(mchInfo.getIsvNo())) { + // 当前服务商状态是否正确 + IsvInfo isvInfo = isvInfoService.getById(mchInfo.getIsvNo()); + if (isvInfo == null || isvInfo.getState() == CS.NO) { + throw new BizException("当前服务商不可用"); + } + } + + // 插入商户基本信息 + boolean saveResult = save(mchInfo); + if (!saveResult) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_CREATE); + + // 插入用户信息 + SysUser sysUser = new SysUser(); + sysUser.setLoginUsername(loginUserName); + sysUser.setRealname(mchInfo.getContactName()); + sysUser.setTelphone(mchInfo.getContactTel()); + sysUser.setUserNo(mchInfo.getMchNo()); + sysUser.setBelongInfoId(mchInfo.getMchNo()); + sysUser.setSex(CS.SEX_MALE); + sysUser.setIsAdmin(CS.YES); + sysUser.setState(mchInfo.getState()); + sysUserService.addSysUser(sysUser, CS.SYS_TYPE.MCH); + + // 存入商户默认用户ID + mchInfo.setInitUserId(sysUser.getSysUserId()); + updateById(mchInfo); + + } + + @Transactional(rollbackFor = Exception.class) + public List removeByMchNo(String mchNo) { + try { + // 0.当前商户是否存在 + MchInfo mchInfo = getById(mchNo); + if (mchInfo == null) throw new BizException("该商户不存在"); + + // 1.查看当前商户是否存在交易数据 + int payCount = payOrderService.count(PayOrder.gw().eq(PayOrder::getMchNo, mchNo)); + if (payCount > 0) throw new BizException("该商户已存在交易数据,不可删除"); + + // 2.删除当前商户配置的支付通道 + mchPayPassageService.remove(MchPayPassage.gw().eq(MchPayPassage::getMchNo, mchNo)); + + // 3.删除当前商户支付接口配置参数 + payInterfaceConfigService.remove(PayInterfaceConfig.gw() + .eq(PayInterfaceConfig::getInfoId, mchNo) + .eq(PayInterfaceConfig::getInfoType, CS.INFO_TYPE_MCH) + ); + + List userList = sysUserService.list(SysUser.gw() + .eq(SysUser::getBelongInfoId, mchNo) + .eq(SysUser::getSystem, CS.SYS_TYPE.MCH) + ); + // 返回的用户id + List userIdList = new ArrayList<>(); + if (userList.size() > 0) { + for (SysUser user:userList) { + userIdList.add(user.getSysUserId()); + } + // 4.删除当前商户用户子用户信息 + sysUserAuthService.remove(SysUserAuth.gw().in(SysUserAuth::getUserId, userIdList)); + } + + // 5.删除当前商户的登录用户 + sysUserService.remove(SysUser.gw() + .eq(SysUser::getBelongInfoId, mchNo) + .eq(SysUser::getSystem, CS.SYS_TYPE.MCH) + ); + + // 6.删除当前商户 + boolean removeMchInfo = removeById(mchNo); + if (!removeMchInfo) throw new BizException("删除当前商户失败"); + return userIdList; + }catch (Exception e) { + throw new BizException(e.getMessage()); + } + } +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchNotifyRecordService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchNotifyRecordService.java new file mode 100644 index 0000000000000000000000000000000000000000..0a70edc83d0a996a1cfb64ae2a7930bb1ba7557b --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchNotifyRecordService.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.MchNotifyRecord; +import com.jeequan.jeepay.service.mapper.MchNotifyRecordMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Service; + +/** + *

+ * 商户通知表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class MchNotifyRecordService extends ServiceImpl { + + /** 根据订单号和类型查询 */ + public MchNotifyRecord findByOrderAndType(String orderId, Byte orderType){ + return getOne( + MchNotifyRecord.gw().eq(MchNotifyRecord::getOrderId, orderId).eq(MchNotifyRecord::getOrderType, orderType) + ); + } + + /** 查询支付订单 */ + public MchNotifyRecord findByPayOrder(String orderId){ + return findByOrderAndType(orderId, MchNotifyRecord.TYPE_PAY_ORDER); + } + + /** 查询退款订单订单 */ + public MchNotifyRecord findByRefundOrder(String orderId){ + return findByOrderAndType(orderId, MchNotifyRecord.TYPE_REFUND_ORDER); + } + + public Integer updateNotifyResult(Long notifyId, Byte state, String resResult){ + return baseMapper.updateNotifyResult(notifyId, state, resResult); + } + + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchPayPassageService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchPayPassageService.java new file mode 100644 index 0000000000000000000000000000000000000000..466e26e8e3dbed840f231dbff718f856349efbd4 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/MchPayPassageService.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchPayPassage; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.mapper.MchPayPassageMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 商户支付通道表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class MchPayPassageService extends ServiceImpl { + + /** + * @Author: ZhuXiao + * @Description: 根据支付方式查询可用的支付接口列表 + * @Date: 9:56 2021/5/10 + */ + public List selectAvailablePayInterfaceList(String wayCode, String mchNo, Byte infoType, Byte mchType) { + Map params = new HashMap(); + params.put("wayCode", wayCode); + params.put("mchNo", mchNo); + params.put("infoType", infoType); + params.put("mchType", mchType); + List list = baseMapper.selectAvailablePayInterfaceList(params); + if (CollectionUtils.isEmpty(list)) return null; + + // 添加通道状态 + for (JSONObject object : list) { + MchPayPassage payPassage = baseMapper.selectOne(MchPayPassage.gw() + .eq(MchPayPassage::getMchNo, mchNo) + .eq(MchPayPassage::getWayCode, wayCode) + .eq(MchPayPassage::getIfCode, object.getString("ifCode")) + ); + if (payPassage != null) { + object.put("passageId", payPassage.getId()); + if (payPassage.getRate() != null) { + object.put("rate", payPassage.getRate().multiply(new BigDecimal("100"))); + } + object.put("state", payPassage.getState()); + } + if(object.getBigDecimal("ifRate") != null) { + object.put("ifRate", object.getBigDecimal("ifRate").multiply(new BigDecimal("100"))); + } + } + return list; + } + + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdateBatchSelf(List mchPayPassageList) { + saveOrUpdateBatchSelf(mchPayPassageList, null); + } + + @Transactional(rollbackFor = Exception.class) + public void saveOrUpdateBatchSelf(List mchPayPassageList, String mchNo) { + if (CollectionUtils.isEmpty(mchPayPassageList)) { + throw new BizException("操作失败"); + } + for (MchPayPassage payPassage : mchPayPassageList) { + if (payPassage.getState() == CS.NO && payPassage.getId() == null) { + continue; + } + if (StrUtil.isNotBlank(mchNo)) { // 商户系统配置通道,添加商户号参数 + payPassage.setMchNo(mchNo); + } + if (payPassage.getRate() != null) { + payPassage.setRate(payPassage.getRate().divide(new BigDecimal("100"), 6, BigDecimal.ROUND_HALF_UP)); + } + if (!saveOrUpdate(payPassage)) { + throw new BizException("操作失败"); + } + } + } + + + /** 根据商户号 和 支付方式, 查询出商户可用的支付接口 **/ + public MchPayPassage findMchPayPassage(String mchNo, String wayCode){ + + List list = list(MchPayPassage.gw() + .eq(MchPayPassage::getMchNo, mchNo) + .eq(MchPayPassage::getState, CS.YES) + .eq(MchPayPassage::getWayCode, wayCode) + ); + + return list.isEmpty() ? null : list.get(0); + } + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceConfigService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceConfigService.java new file mode 100644 index 0000000000000000000000000000000000000000..9e14809702a597033b3ba1165a991af5426c5685 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceConfigService.java @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.ApiCodeEnum; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.service.mapper.PayInterfaceConfigMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 支付接口配置参数表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class PayInterfaceConfigService extends ServiceImpl { + + @Autowired + private PayInterfaceDefineService payInterfaceDefineService; + + @Autowired + private MchInfoService mchInfoService; + + /** + * @Author: ZhuXiao + * @Description: 根据 账户类型、账户号、接口类型 获取支付参数配置 + * @Date: 17:20 2021/4/27 + */ + public PayInterfaceConfig getByInfoIdAndIfCode(Byte infoType, String infoId, String ifCode) { + return getOne(PayInterfaceConfig.gw() + .eq(PayInterfaceConfig::getInfoType, infoType) + .eq(PayInterfaceConfig::getInfoId, infoId) + .eq(PayInterfaceConfig::getIfCode, ifCode) + ); + } + + /** + * @Author: ZhuXiao + * @Description: 根据 账户类型、账户号 获取支付参数配置列表 + * @Date: 14:19 2021/5/7 + */ + public List selectAllPayIfConfigListByInfoId(Byte infoType, String infoId) { + + // 支付定义列表 + LambdaQueryWrapper queryWrapper = PayInterfaceDefine.gw(); + queryWrapper.eq(PayInterfaceDefine::getState, CS.YES); + + // 根据商户类型,添加接口是否支持该商户类型条件 + MchInfo mchInfo = null; + Map isvPayConfigMap = new HashMap<>(); // 服务商支付参数配置集合 + if (infoType == CS.INFO_TYPE_MCH) { + //商户信息 + mchInfo = mchInfoService.getById(infoId); + if (mchInfo == null || mchInfo.getState() != CS.YES) throw new BizException(ApiCodeEnum.SYS_OPERATION_FAIL_SELETE); + + if (mchInfo.getType() == CS.MCH_TYPE_NORMAL) { + queryWrapper.eq(PayInterfaceDefine::getIsMchMode, CS.YES); // 支持普通商户模式 + } + if (mchInfo.getType() == CS.MCH_TYPE_ISVSUB) { + queryWrapper.eq(PayInterfaceDefine::getIsIsvMode, CS.YES); // 支持服务商模式 + // 商户类型为特约商户,服务商应已经配置支付参数 + List isvConfigList = this.list(PayInterfaceConfig.gw() + .eq(PayInterfaceConfig::getInfoId, mchInfo.getIsvNo()) + .eq(PayInterfaceConfig::getInfoType, CS.INFO_TYPE_ISV) + .eq(PayInterfaceConfig::getState, CS.YES) + .ne(PayInterfaceConfig::getIfParams, " ") + .isNotNull(PayInterfaceConfig::getIfParams)); + + for (PayInterfaceConfig config : isvConfigList) { + isvPayConfigMap.put(config.getIfCode(), config); + } + } + } + if (infoType == CS.INFO_TYPE_ISV) { + queryWrapper.eq(PayInterfaceDefine::getIsIsvMode, CS.YES); // 支持服务商模式 + } + + List defineList = payInterfaceDefineService.list(queryWrapper); + + // 支付参数列表 + LambdaQueryWrapper wrapper = PayInterfaceConfig.gw(); + wrapper.eq(PayInterfaceConfig::getInfoId, infoId); + wrapper.eq(PayInterfaceConfig::getInfoType, infoType); + List configList = this.list(wrapper); + + for (PayInterfaceDefine define : defineList) { + for (PayInterfaceConfig config : configList) { + if (define.getIfCode().equals(config.getIfCode())) { + define.addExt("ifConfigState", config.getState()); // 配置状态 + } + } + + if (infoType == CS.INFO_TYPE_MCH && mchInfo.getType() == CS.MCH_TYPE_ISVSUB && isvPayConfigMap.get(define.getIfCode()) == null) { + define.addExt("subMchIsvConfig", CS.NO); // 特约商户,服务商支付参数的配置状态,0表示未配置 + } + } + return defineList; + } + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceDefineService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceDefineService.java new file mode 100644 index 0000000000000000000000000000000000000000..97a50f6740b9752e8fcaf2488cddbd86f7b61b8a --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayInterfaceDefineService.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; +import com.jeequan.jeepay.service.mapper.PayInterfaceDefineMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 支付接口定义表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class PayInterfaceDefineService extends ServiceImpl { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayOrderService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayOrderService.java new file mode 100644 index 0000000000000000000000000000000000000000..9bd51256103f6eb641ad483a04eeb589c4d3bdb7 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayOrderService.java @@ -0,0 +1,337 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import cn.hutool.core.date.DatePattern; +import cn.hutool.core.date.DateTime; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.IsvInfo; +import com.jeequan.jeepay.core.entity.MchInfo; +import com.jeequan.jeepay.core.entity.PayOrder; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.service.mapper.IsvInfoMapper; +import com.jeequan.jeepay.service.mapper.MchInfoMapper; +import com.jeequan.jeepay.service.mapper.PayOrderMapper; +import com.jeequan.jeepay.service.mapper.PayWayMapper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.*; + +/** + *

+ * 支付订单表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class PayOrderService extends ServiceImpl { + + @Autowired private PayOrderMapper payOrderMapper; + @Autowired private MchInfoMapper mchInfoMapper; + @Autowired private IsvInfoMapper isvInfoMapper; + @Autowired private PayWayMapper payWayMapper; + + /** 更新订单状态 【订单生成】 --》 【支付中】 **/ + public boolean updateInit2Ing(String payOrderId, String ifCode, String wayCode){ + + PayOrder updateRecord = new PayOrder(); + updateRecord.setState(PayOrder.STATE_ING); + updateRecord.setIfCode(ifCode); + updateRecord.setWayCode(wayCode); + + return update(updateRecord, new LambdaUpdateWrapper() + .eq(PayOrder::getPayOrderId, payOrderId).eq(PayOrder::getState, PayOrder.STATE_INIT)); + } + + /** 更新订单状态 【支付中】 --》 【支付成功】 **/ + public boolean updateIng2Success(String payOrderId, String channelOrderNo){ + return updateIng2Success(payOrderId, channelOrderNo, null); + } + + /** 更新订单状态 【支付中】 --》 【支付成功】 **/ + public boolean updateIng2Success(String payOrderId, String channelOrderNo, String channelUserId){ + + PayOrder updateRecord = new PayOrder(); + updateRecord.setState(PayOrder.STATE_SUCCESS); + updateRecord.setChannelOrderNo(channelOrderNo); + updateRecord.setChannelUser(channelUserId); + updateRecord.setSuccessTime(new Date()); + + return update(updateRecord, new LambdaUpdateWrapper() + .eq(PayOrder::getPayOrderId, payOrderId).eq(PayOrder::getState, PayOrder.STATE_ING)); + } + + + /** 更新订单状态 【支付中】 --》 【支付失败】 **/ + public boolean updateIng2Fail(String payOrderId, String channelOrderNo, String channelErrCode, String channelErrMsg){ + + PayOrder updateRecord = new PayOrder(); + updateRecord.setState(PayOrder.STATE_FAIL); + updateRecord.setErrCode(channelErrCode); + updateRecord.setErrMsg(channelErrMsg); + updateRecord.setChannelOrderNo(channelOrderNo); + + return update(updateRecord, new LambdaUpdateWrapper() + .eq(PayOrder::getPayOrderId, payOrderId).eq(PayOrder::getState, PayOrder.STATE_ING)); + } + + + /** 更新订单状态 【支付中】 --》 【支付成功/支付失败】 **/ + public boolean updateIng2SuccessOrFail(String payOrderId, Byte updateState, String channelOrderNo, String channelErrCode, String channelErrMsg){ + + if(updateState == PayOrder.STATE_ING){ + return true; + }else if(updateState == PayOrder.STATE_SUCCESS){ + return updateIng2Success(payOrderId, channelOrderNo); + }else if(updateState == PayOrder.STATE_FAIL){ + return updateIng2Fail(payOrderId, channelOrderNo, channelErrCode, channelErrMsg); + } + return false; + } + + /** 查询商户订单 **/ + public PayOrder queryMchOrder(String mchNo, String payOrderId, String mchOrderNo){ + + if(StringUtils.isNotEmpty(payOrderId)){ + return getOne(PayOrder.gw().eq(PayOrder::getMchNo, mchNo).eq(PayOrder::getPayOrderId, payOrderId)); + }else if(StringUtils.isNotEmpty(mchOrderNo)){ + return getOne(PayOrder.gw().eq(PayOrder::getMchNo, mchNo).eq(PayOrder::getMchOrderNo, mchOrderNo)); + }else{ + return null; + } + } + + + public Map payCount(String mchNo, Byte state, String dayStart, String dayEnd) { + Map param = new HashMap<>(); + if (state != null) param.put("state", state); + if (StrUtil.isNotBlank(mchNo)) param.put("mchNo", mchNo); + if (StrUtil.isNotBlank(dayStart)) param.put("createTimeStart", dayStart); + if (StrUtil.isNotBlank(dayEnd)) param.put("createTimeEnd", dayEnd); + return payOrderMapper.payCount(param); + } + + public List payTypeCount(String mchNo, Byte state, String dayStart, String dayEnd) { + Map param = new HashMap<>(); + if (state != null) param.put("state", state); + if (StrUtil.isNotBlank(mchNo)) param.put("mchNo", mchNo); + if (StrUtil.isNotBlank(dayStart)) param.put("createTimeStart", dayStart); + if (StrUtil.isNotBlank(dayEnd)) param.put("createTimeEnd", dayEnd); + return payOrderMapper.payTypeCount(param); + } + + public Map selectTotalCount(String mchNo, Byte state, String dayStart, String dayEnd) { + Map param = new HashMap<>(); + if (state != null) param.put("state", state); + if (StrUtil.isNotBlank(mchNo)) param.put("mchNo", mchNo); + if (StrUtil.isNotBlank(dayStart)) param.put("createTimeStart", dayStart); + if (StrUtil.isNotBlank(dayEnd)) param.put("createTimeEnd", dayEnd); + return payOrderMapper.selectTotalCount(param); + } + + + /** 更新订单为 超时状态 **/ + public Integer updateOrderExpired(){ + + PayOrder payOrder = new PayOrder(); + payOrder.setState(PayOrder.STATE_CLOSED); + + return baseMapper.update(payOrder, + PayOrder.gw() + .in(PayOrder::getState, Arrays.asList(PayOrder.STATE_INIT, PayOrder.STATE_ING)) + .le(PayOrder::getExpiredTime, new Date()) + ); + } + + /** 更新订单 通知状态 --> 已发送 **/ + public int updateNotifySent(String payOrderId){ + PayOrder payOrder = new PayOrder(); + payOrder.setNotifyState(CS.YES); + payOrder.setPayOrderId(payOrderId); + return baseMapper.updateById(payOrder); + } + + /** 首页支付周统计 **/ + public JSONObject mainPageWeekCount(String mchNo) { + JSONObject json = new JSONObject(); + Map dayAmount = new LinkedHashMap(); + ArrayList array = new ArrayList<>(); + BigDecimal payAmount = new BigDecimal(0); // 当日金额 + BigDecimal payWeek = payAmount; // 周总收益 + String todayAmount = "0.00"; // 今日金额 + String todayPayCount = "0"; // 今日交易笔数 + String yesterdayAmount = "0.00"; // 昨日金额 + Date today = new Date(); + for(int i = 0 ; i < 7 ; i++){ + Date date = DateUtil.offsetDay(today, -i).toJdkDate(); + String dayStart = DateUtil.beginOfDay(date).toString(DatePattern.NORM_DATETIME_MINUTE_PATTERN); + String dayEnd = DateUtil.endOfDay(date).toString(DatePattern.NORM_DATETIME_MINUTE_PATTERN); + // 每日交易金额查询 + dayAmount = payCount(mchNo, PayOrder.STATE_SUCCESS, dayStart, dayEnd); + if (dayAmount != null) payAmount = new BigDecimal(dayAmount.get("payAmount").toString()); + if (i == 0) { + todayAmount = dayAmount.get("payAmount").toString(); + todayPayCount = dayAmount.get("payCount").toString(); + } + if (i == 1) yesterdayAmount = dayAmount.get("payAmount").toString(); + payWeek = payWeek.add(payAmount); + array.add(payAmount); + } + + // 倒序排列 + Collections.reverse(array); + json.put("dataArray", array); + json.put("todayAmount", todayAmount); + json.put("todayPayCount", todayPayCount); + json.put("payWeek", payWeek); + json.put("yesterdayAmount", yesterdayAmount); + return json; + } + + /** 首页统计总数量 **/ + public JSONObject mainPageNumCount(String mchNo) { + JSONObject json = new JSONObject(); + // 商户总数 + int mchCount = mchInfoMapper.selectCount(MchInfo.gw()); + // 服务商总数 + int isvCount = isvInfoMapper.selectCount(IsvInfo.gw()); + // 总交易金额 + Map payCountMap = payCount(mchNo, PayOrder.STATE_SUCCESS, null, null); + json.put("totalMch", mchCount); + json.put("totalIsv", isvCount); + json.put("totalAmount", payCountMap.get("payAmount")); + json.put("totalCount", payCountMap.get("payCount")); + return json; + } + + /** 首页支付统计 **/ + public List mainPagePayCount(String mchNo, String createdStart, String createdEnd) { + Map param = new HashMap<>(); // 条件参数 + int daySpace = 6; // 默认最近七天(含当天) + if (StringUtils.isNotEmpty(createdStart) && StringUtils.isNotEmpty(createdEnd)) { + createdStart = createdStart + " 00:00:00"; + createdEnd = createdEnd + " 23:59:59"; + // 计算两时间间隔天数 + daySpace = Math.toIntExact(DateUtil.betweenDay(DateUtil.parseDate(createdStart), DateUtil.parseDate(createdEnd), true)); + } else { + Date today = new Date(); + createdStart = DateUtil.formatDate(DateUtil.offsetDay(today, -daySpace)) + " 00:00:00"; + createdEnd = DateUtil.formatDate(today) + " 23:59:59"; + } + + if (StrUtil.isNotBlank(mchNo)) param.put("mchNo", mchNo); + param.put("createTimeStart", createdStart); + param.put("createTimeEnd", createdEnd); + // 查询收款的记录 + param.put("state", PayOrder.STATE_SUCCESS); + List payOrderList = payOrderMapper.selectOrderCount(param); + // 查询退款的记录 + param.put("state", PayOrder.STATE_REFUND); + List refundOrderList = payOrderMapper.selectOrderCount(param); + // 生成前端返回参数类型 + List returnList = getReturnList(daySpace, createdEnd, payOrderList, refundOrderList); + return returnList; + } + + /** 首页支付类型统计 **/ + public ArrayList mainPagePayTypeCount(String mchNo, String createdStart, String createdEnd) { + // 返回数据列 + ArrayList array = new ArrayList<>(); + if (StringUtils.isNotEmpty(createdStart) && StringUtils.isNotEmpty(createdEnd)) { + createdStart = createdStart + " 00:00:00"; + createdEnd = createdEnd + " 23:59:59"; + }else { + Date endDay = new Date(); // 当前日期 + Date startDay = DateUtil.lastWeek().toJdkDate(); // 一周前日期 + String end = DateUtil.formatDate(endDay); + String start = DateUtil.formatDate(startDay); + createdStart = start + " 00:00:00"; + createdEnd = end + " 23:59:59"; + } + // 统计列表 + List payCountMap = payTypeCount(mchNo, PayOrder.STATE_SUCCESS, createdStart, createdEnd); + + // 得到所有支付方式 + Map payWayNameMap = new HashMap<>(); + List payWayList = payWayMapper.selectList(PayWay.gw()); + for (PayWay payWay:payWayList) { + payWayNameMap.put(payWay.getWayCode(), payWay.getWayName()); + } + // 支付方式名称标注 + for (Map payCount:payCountMap) { + if (StringUtils.isNotEmpty(payWayNameMap.get(payCount.get("wayCode")))) { + payCount.put("typeName", payWayNameMap.get(payCount.get("wayCode"))); + }else { + payCount.put("typeName", payCount.get("wayCode")); + } + } + array.add(payCountMap); + return array; + } + + /** 生成首页交易统计数据类型 **/ + public List getReturnList(int daySpace, String createdStart, List payOrderList, List refundOrderList) { + List dayList = new ArrayList<>(); + DateTime endDay = DateUtil.parseDateTime(createdStart); + // 先判断间隔天数 根据天数设置空的list + for (int i = 0; i <= daySpace ; i++) { + Map map = new HashMap<>(); + map.put("date", DateUtil.format(DateUtil.offsetDay(endDay, -i), "MM-dd")); + dayList.add(map); + } + // 日期倒序排列 + Collections.reverse(dayList); + + List payListMap = new ArrayList<>(); // 收款的列 + List refundListMap = new ArrayList<>(); // 退款的列 + for (Map dayMap:dayList) { + // 为收款列和退款列赋值默认参数【payAmount字段切记不可为string,否则前端图表解析不出来】 + Map payMap = new HashMap<>(); + payMap.put("date", dayMap.get("date").toString()); + payMap.put("type", "收款"); + payMap.put("payAmount", 0); + + Map refundMap = new HashMap<>(); + refundMap.put("date", dayMap.get("date").toString()); + refundMap.put("type", "退款"); + refundMap.put("payAmount", 0); + for (Map payOrderMap:payOrderList) { + if (dayMap.get("date").equals(payOrderMap.get("groupDate"))) { + payMap.put("payAmount", payOrderMap.get("payAmount")); + } + } + payListMap.add(payMap); + for (Map refundOrderMap:refundOrderList) { + if (dayMap.get("date").equals(refundOrderMap.get("groupDate"))) { + refundMap.put("payAmount", refundOrderMap.get("payAmount")); + } + } + refundListMap.add(refundMap); + } + payListMap.addAll(refundListMap); + return payListMap; + } +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayWayService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayWayService.java new file mode 100644 index 0000000000000000000000000000000000000000..c62d9b18a5a4191138795f3da9a550c5e4b1958f --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/PayWayService.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.PayWay; +import com.jeequan.jeepay.service.mapper.PayWayMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 支付方式表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class PayWayService extends ServiceImpl { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/RefundOrderService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/RefundOrderService.java new file mode 100644 index 0000000000000000000000000000000000000000..97c3efee8f6aa858878afb42f026d1f920995fd2 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/RefundOrderService.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.RefundOrder; +import com.jeequan.jeepay.service.mapper.RefundOrderMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 退款订单表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class RefundOrderService extends ServiceImpl { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysConfigService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysConfigService.java new file mode 100644 index 0000000000000000000000000000000000000000..2638b3f7bfd220b6a0fa36ee562b6310db4c5e81 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysConfigService.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.SysConfig; +import com.jeequan.jeepay.core.model.DBApplicationConfig; +import com.jeequan.jeepay.service.mapper.SysConfigMapper; +import org.apache.commons.lang3.tuple.MutablePair; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Map; +import java.util.Set; + +/** + *

+ * 系统配置表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-07-29 + */ +@Service +public class SysConfigService extends ServiceImpl { + + @Autowired + private SysConfigService sysConfigService; + + /** 数据库application配置参数 **/ + private static MutablePair APPLICATION_CONFIG = new MutablePair<>("applicationConfig", null); + + public synchronized void initDBConfig(String groupKey) { + + if(APPLICATION_CONFIG.getLeft().equalsIgnoreCase(groupKey)){ + APPLICATION_CONFIG.right = this.selectByGroupKey(groupKey).toJavaObject(DBApplicationConfig.class); + } + } + + /** 获取实际的数据 **/ + public DBApplicationConfig getDBApplicationConfig() { + + if(APPLICATION_CONFIG.getRight() == null ){ + initDBConfig(APPLICATION_CONFIG.getLeft()); + } + return APPLICATION_CONFIG.right; + } + + + /** 根据分组查询,并返回JSON对象格式的数据 **/ + public JSONObject selectByGroupKey(String groupKey){ + + JSONObject result = new JSONObject(); + list(SysConfig.gw().select(SysConfig::getConfigKey, SysConfig::getConfigVal).eq(SysConfig::getGroupKey, groupKey)) + .stream().forEach(item -> result.put(item.getConfigKey(), item.getConfigVal())); + return result; + } + + + public int updateByConfigKey(Map updateMap) { + int count = 0; + Set set = updateMap.keySet(); + for(String k : set) { + SysConfig sysConfig = new SysConfig(); + sysConfig.setConfigKey(k); + sysConfig.setConfigVal(updateMap.get(k)); + boolean update = sysConfigService.saveOrUpdate(sysConfig); + if (update) count ++; + } + return count; + } +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysEntitlementService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysEntitlementService.java new file mode 100644 index 0000000000000000000000000000000000000000..ae3b9a2fcbe74fd77e67f9b07f2462b6b3d2eed6 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysEntitlementService.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import org.springframework.stereotype.Service; +import com.jeequan.jeepay.service.mapper.SysEntitlementMapper; + +/** + *

+ * 系统权限表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysEntitlementService extends ServiceImpl { + + + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysLogService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysLogService.java new file mode 100644 index 0000000000000000000000000000000000000000..46a1b2f9690603481ddf885b2596f7bd1976cc22 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysLogService.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.SysLog; +import com.jeequan.jeepay.service.mapper.SysLogMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 系统操作日志表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +@Service +public class SysLogService extends ServiceImpl { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleEntRelaService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleEntRelaService.java new file mode 100644 index 0000000000000000000000000000000000000000..27bd591c5565472fe835e738b350e704bd0af517 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleEntRelaService.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import com.jeequan.jeepay.core.entity.SysRoleEntRela; +import com.jeequan.jeepay.service.mapper.SysRoleEntRelaMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 系统角色权限关联表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysRoleEntRelaService extends ServiceImpl { + + @Autowired private SysEntitlementService sysEntitlementService; + + /** 根据人查询出所有权限ID集合 */ + public List selectEntIdsByUserId(Long userId, Byte isAdmin, String system){ + + + if(isAdmin == CS.YES){ + + List result = new ArrayList<>(); + sysEntitlementService.list(SysEntitlement.gw().select(SysEntitlement::getEntId).eq(SysEntitlement::getSystem, system).eq(SysEntitlement::getState, CS.PUB_USABLE) + ).stream().forEach(r -> result.add(r.getEntId())); + + return result; + + }else{ + return baseMapper.selectEntIdsByUserId(userId, system); + } + + } + + + /** 重置 角色 - 权限 关联关系 **/ + @Transactional + public void resetRela(String roleId, List entIdList){ + + //1. 删除 + this.remove(SysRoleEntRela.gw().eq(SysRoleEntRela::getRoleId, roleId)); + + //2. 插入 + for (String entId : entIdList) { + SysRoleEntRela r = new SysRoleEntRela(); + r.setRoleId(roleId); r.setEntId(entId); + this.save(r); + } + + } + + + + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleService.java new file mode 100644 index 0000000000000000000000000000000000000000..7ceda1037b98341943e127a03b979c84c2f54f63 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysRoleService.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.SysRole; +import com.jeequan.jeepay.core.entity.SysRoleEntRela; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.exception.BizException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.jeequan.jeepay.service.mapper.SysRoleMapper; + +import java.util.ArrayList; +import java.util.List; + +/** + *

+ * 系统角色表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysRoleService extends ServiceImpl { + + @Autowired private SysUserRoleRelaService sysUserRoleRelaService; + + @Autowired private SysRoleEntRelaService sysRoleEntRelaService; + + + /** 根据用户查询全部角色集合 **/ + public List findListByUser(Long sysUserId){ + List result = new ArrayList<>(); + sysUserRoleRelaService.list( + SysUserRoleRela.gw().eq(SysUserRoleRela::getUserId, sysUserId) + ).stream().forEach(r -> result.add(r.getRoleId())); + + return result; + } + + + @Transactional + public void removeRole(String roleId){ + + if(sysUserRoleRelaService.count(SysUserRoleRela.gw().eq(SysUserRoleRela::getRoleId, roleId)) > 0){ + throw new BizException("当前角色已分配到用户, 不可删除!"); + } + + //删除当前表 + removeById(roleId); + + //删除关联表 + sysRoleEntRelaService.remove(SysRoleEntRela.gw().eq(SysRoleEntRela::getRoleId, roleId)); + + } + + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserAuthService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserAuthService.java new file mode 100644 index 0000000000000000000000000000000000000000..5337c6d6efbe9e16cc056f5d27737f82ff51422f --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserAuthService.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUserAuth; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.core.model.security.JeeUserDetails; +import com.jeequan.jeepay.service.mapper.SysUserAuthMapper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + *

+ * 操作员认证表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysUserAuthService extends ServiceImpl { + + /** 根据登录信息查询用户认证信息 **/ + public SysUserAuth selectByLogin(String identifier, Byte identityType, String system){ + return baseMapper.selectByLogin(identifier, identityType, system); + } + + /** 添加用户认证表 **/ + @Transactional + public void addUserAuthDefault(Long userId, String loginUserName, String telPhone, String pwdRaw, String system){ + + String salt = StringKit.getUUID(6); //6位随机数 + String userPwd = new BCryptPasswordEncoder().encode(pwdRaw); + + /** 用户名登录方式 */ + SysUserAuth record = new SysUserAuth(); record.setUserId(userId); record.setCredential(userPwd); record.setSalt(salt);record.setSystem(system); + record.setIdentityType(CS.AUTH_TYPE.LOGIN_USER_NAME); + record.setIdentifier(loginUserName); + save(record); + + /** 手机号登录方式 */ + record = new SysUserAuth(); record.setUserId(userId); record.setCredential(userPwd); record.setSalt(salt);record.setSystem(system); + record.setIdentityType(CS.AUTH_TYPE.TELPHONE); + record.setIdentifier(telPhone); + save(record); + } + + + /** 重置密码 */ + @Transactional + public void resetAuthInfo(Long resetUserId, String authLoginUserName, String telphone, String newPwd, String system){ + + //更改登录用户名 +// if(StringKit.isNotEmpty(authLoginUserName)){ +// SysUserAuth updateRecord = new SysUserAuth(); +// updateRecord.setIdentifier(authLoginUserName); +// update(updateRecord, SysUserAuth.gw().eq(SysUserAuth::getSystem, system).eq(SysUserAuth::getUserId, resetUserId).eq(SysUserAuth::getIdentityType, CS.AUTH_TYPE.LOGIN_USER_NAME)); +// } + + //更新手机号认证 +// if(StringKit.isNotEmpty(telphone)){ +// SysUserAuth updateRecord = new SysUserAuth(); +// updateRecord.setIdentifier(telphone); +// update(updateRecord, SysUserAuth.gw().eq(SysUserAuth::getSystem, system).eq(SysUserAuth::getUserId, resetUserId).eq(SysUserAuth::getIdentityType, CS.AUTH_TYPE.TELPHONE)); +// } + + //更改密码 + if(StringUtils.isNotEmpty(newPwd)){ + //根据当前用户ID 查询出用户的所有认证记录 + List authList = list(SysUserAuth.gw().eq(SysUserAuth::getSystem, system).eq(SysUserAuth::getUserId, resetUserId)); + for (SysUserAuth auth : authList) { + if(StringUtils.isEmpty(auth.getSalt())){ //可能为其他登录方式, 不存在salt + continue; + } + SysUserAuth updateRecord = new SysUserAuth(); + updateRecord.setAuthId(auth.getAuthId()); + updateRecord.setCredential(new BCryptPasswordEncoder().encode(newPwd)); + updateById(updateRecord); + } + } + } + + + /** 查询当前用户密码是否正确 */ + public boolean validateCurrentUserPwd(String pwdRaw){ + + //根据当前用户ID + 认证方式为 登录用户名的方式 查询一条记录 + SysUserAuth auth = getOne(SysUserAuth.gw() + .eq(SysUserAuth::getUserId, JeeUserDetails.getCurrentUserDetails().getSysUser().getSysUserId()) + .eq(SysUserAuth::getIdentityType, CS.AUTH_TYPE.LOGIN_USER_NAME) + ); + if(auth != null && new BCryptPasswordEncoder().matches(pwdRaw, auth.getCredential())){ + return true; + } + + return false; + } + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserRoleRelaService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserRoleRelaService.java new file mode 100644 index 0000000000000000000000000000000000000000..d55849e94b491e4f4cb15b5ec77bc6462c90ffd6 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserRoleRelaService.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.service.mapper.SysUserRoleRelaMapper; +import org.springframework.stereotype.Service; + +/** + *

+ * 操作员<->角色 关联表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysUserRoleRelaService extends ServiceImpl { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..0c477b714c7a4e4634d6ead167b62429eb6118ec --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/impl/SysUserService.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.jeequan.jeepay.core.constants.CS; +import com.jeequan.jeepay.core.entity.SysUser; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; +import com.jeequan.jeepay.core.exception.BizException; +import com.jeequan.jeepay.core.utils.StringKit; +import com.jeequan.jeepay.service.mapper.SysUserMapper; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + *

+ * 系统操作员表 服务实现类 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +@Service +public class SysUserService extends ServiceImpl { + + @Autowired private SysUserAuthService sysUserAuthService; + @Autowired private SysUserRoleRelaService sysUserRoleRelaService; + + + /** 添加系统用户 **/ + @Transactional + public void addSysUser(SysUser sysUser, String system){ + + //判断获取到选择的角色集合 +// String roleIdListStr = sysUser.extv().getString("roleIdListStr"); +// if(StringKit.isEmpty(roleIdListStr)) throw new BizException("请选择角色信息!"); +// +// List roleIdList = JSONArray.parseArray(roleIdListStr, String.class); +// if(roleIdList.isEmpty()) throw new BizException("请选择角色信息!"); + + // 判断数据来源 + if( StringUtils.isEmpty(sysUser.getLoginUsername()) ) throw new BizException("登录用户名不能为空!"); + if( StringUtils.isEmpty(sysUser.getRealname()) )throw new BizException("姓名不能为空!"); + if( StringUtils.isEmpty(sysUser.getTelphone()) ) throw new BizException("手机号不能为空!"); + if(sysUser.getSex() == null ) throw new BizException("性别不能为空!"); + + //登录用户名不可重复 + if( count(SysUser.gw().eq(SysUser::getSystem, system).eq(SysUser::getLoginUsername, sysUser.getLoginUsername())) > 0 ){ + throw new BizException("登录用户名已存在!"); + } + //手机号不可重复 + if( count(SysUser.gw().eq(SysUser::getSystem, system).eq(SysUser::getTelphone, sysUser.getTelphone())) > 0 ){ + throw new BizException("手机号已存在!"); + } + //员工号不可重复 + if( count(SysUser.gw().eq(SysUser::getSystem, system).eq(SysUser::getUserNo, sysUser.getUserNo())) > 0 ){ + throw new BizException("员工号已存在!"); + } + + //女 默认头像 + if(sysUser.getSex() != null && CS.SEX_FEMALE == sysUser.getSex()){ + sysUser.setAvatarUrl("/imgs/defava_f.png"); + }else{ + sysUser.setAvatarUrl("/imgs/defava_m.png"); + } + + //1. 插入用户主表 + sysUser.setSystem(system); // 系统类型 + this.save(sysUser); + + Long sysUserId = sysUser.getSysUserId(); + + //添加到 user_auth表 + String authPwd = CS.DEFAULT_PWD; + + sysUserAuthService.addUserAuthDefault(sysUserId, sysUser.getLoginUsername(), sysUser.getTelphone(), authPwd, system); + + //3. 添加用户角色信息 + //saveUserRole(sysUser.getSysUserId(), new ArrayList<>()); + + } + + //修改用户信息 + @Transactional + public void updateSysUser(SysUser sysUser){ + + Long sysUserId = sysUser.getSysUserId(); + SysUser dbRecord = getById(sysUserId); + + if (dbRecord == null) throw new BizException("该用户不存在"); + + //修改了手机号, 需要修改auth表信息 + if(!dbRecord.getTelphone().equals(sysUser.getTelphone())){ + + if(count(SysUser.gw().eq(SysUser::getSystem, dbRecord.getSystem()).eq(SysUser::getTelphone, sysUser.getTelphone())) > 0){ + throw new BizException("该手机号已关联其他用户!"); + } + + sysUserAuthService.resetAuthInfo(sysUserId, null, sysUser.getTelphone(), null, dbRecord.getSystem()); + } + + //修改了手机号, 需要修改auth表信息 + if(!dbRecord.getLoginUsername().equals(sysUser.getLoginUsername())){ + + if(count(SysUser.gw().eq(SysUser::getSystem, dbRecord.getSystem()).eq(SysUser::getLoginUsername, sysUser.getLoginUsername())) > 0){ + throw new BizException("该登录用户名已关联其他用户!"); + } + + sysUserAuthService.resetAuthInfo(sysUserId, sysUser.getLoginUsername(), null, null, dbRecord.getSystem()); + } + + //修改用户主表 + baseMapper.updateById(sysUser); + } + + + /** 分配用户角色 **/ + @Transactional + public void saveUserRole(Long userId, List roleIdList) { + + //删除用户之前的 角色信息 + sysUserRoleRelaService.remove(SysUserRoleRela.gw().eq(SysUserRoleRela::getUserId, userId)); + for (String roleId : roleIdList) { + SysUserRoleRela addRecord = new SysUserRoleRela(); + addRecord.setUserId(userId); addRecord.setRoleId(roleId); + sysUserRoleRelaService.save(addRecord); + } + } + + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..99003dbf8866df0b4b60b2cbf3bf798bd8517304 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.IsvInfo; + +/** + *

+ * 服务商信息表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface IsvInfoMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..5b853645176015280f571213308e2a1ec36cf282 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/IsvInfoMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a8cbb038b03755b426bf3f7c70f3152f0ff22012 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.MchInfo; + +/** + *

+ * 商户信息表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface MchInfoMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..79dc17c1465b02965d6ef20232710a540ab73330 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchInfoMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a2d9da1e11c9266d1157e5f33f4b6750887ff839 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.MchNotifyRecord; +import org.apache.ibatis.annotations.Param; + +/** + *

+ * 商户通知表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface MchNotifyRecordMapper extends BaseMapper { + + Integer updateNotifyResult(@Param("notifyId") Long notifyId, @Param("state") Byte state, @Param("resResult") String resResult); +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..69cca3430d705fa6bd45c31a4a4655ef28f807e2 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchNotifyRecordMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + update t_mch_notify_record set res_result = #{resResult}, + notify_count = notify_count + 1, + state = #{state}, + last_notify_time = now() + where notify_id = #{notifyId} + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..282692ae74c83c0aa2433ebf81a28c024557cb9b --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.MchPayPassage; + +import java.util.List; +import java.util.Map; + +/** + *

+ * 商户支付通道表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface MchPayPassageMapper extends BaseMapper { + + /** 根据支付方式查询可用的支付接口列表 **/ + List selectAvailablePayInterfaceList(Map params); +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..e9ebf979557804c2c5c3342b02ccc9e248d6e106 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/MchPayPassageMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..86c18e4bf8a39dc28e7478e7b4f6966a1fa0b664 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.PayInterfaceConfig; + +/** + *

+ * 支付接口配置参数表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface PayInterfaceConfigMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..91b5d172c9caf4d5c3285f8ff5b79814e8062022 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceConfigMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..8a48d2eaebd3af774eabd44405695497678390e4 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.PayInterfaceDefine; + +/** + *

+ * 支付接口定义表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface PayInterfaceDefineMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..718bd343c2f7381609a7da282de9b50733c8a653 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayInterfaceDefineMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..dc188bfaa530eceefdd86e2e5469ce7b2580bd68 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.PayOrder; + +import java.util.List; +import java.util.Map; + +/** + *

+ * 支付订单表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface PayOrderMapper extends BaseMapper { + + Map payCount(Map param); + + List payTypeCount(Map param); + + Map selectTotalCount(Map param); + + List selectOrderCount(Map param); +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..b3ef5ce02205deff2c0ab88899e299b514d5c908 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayOrderMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..4bffa8758ad345b88cb88a015c9c5f8db83c6e56 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.PayWay; + +/** + *

+ * 支付方式表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface PayWayMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..325ff0f0b1229b23b8d09e282f93ba687f9e74be --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/PayWayMapper.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..6d7fe8e69c0c385422502c7a41ffb108d60a243d --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.RefundOrder; + +/** + *

+ * 退款订单表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface RefundOrderMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..2f9cd62cea536493ec997c644fdcc0020054fd6e --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/RefundOrderMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..b96af193cbdb78f1b51e47f0d4aba474ecd82086 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysConfig; + +/** + *

+ * 系统配置表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-07-29 + */ +public interface SysConfigMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..5b2df9dab4f452f6b78528b950a40d96cb0bb892 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysConfigMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..caf2bb45b4774e5917bccef5b9377e26da96e9b4 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysEntitlement; +import org.apache.ibatis.annotations.Param; + +/** + *

+ * 系统权限表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysEntitlementMapper extends BaseMapper { + + Integer userHasLeftMenu(@Param("userId") Long userId, @Param("system") String system); + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..d2d922b5993592b9accf9ae04aa87a254ab26bb0 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysEntitlementMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..4205238ed9b6ae266adebab2f96f9a281ffc98cb --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysLog; + +/** + *

+ * 系统操作日志表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2021-04-27 + */ +public interface SysLogMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..15fe90329ce84fb7e3faeb8aed8922364cbe5096 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysLogMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..e224064d23379b9c87752fc4186edfcdb519f26f --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysRoleEntRela; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + *

+ * 系统角色权限关联表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysRoleEntRelaMapper extends BaseMapper { + + List selectEntIdsByUserId(@Param("userId") Long userId, @Param("system") String system); + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c72b8e2ad91a77bf624c92ad84aae7cfdaf3f60 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleEntRelaMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..e545d4ae4f688cbe91dbbdb2c8dca532c5499af4 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysRole; + +/** + *

+ * 系统角色表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysRoleMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..28437bffcdad7734deb78d389e787a199c8c525c --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysRoleMapper.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..5dbf97117f89ae9338212d0184ddae54132f5674 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import com.jeequan.jeepay.core.entity.SysUserAuth; + +/** + *

+ * 操作员认证表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysUserAuthMapper extends BaseMapper { + + SysUserAuth selectByLogin(@Param("identifier")String identifier, + @Param("identityType")Byte identityType, @Param("system")String system); + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..340568648e0ecc7501c954a7dea127872466c762 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserAuthMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..ec7ec39884a2d70e5484447f5e36701c9dbb51d3 --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysUser; + +/** + *

+ * 系统操作员表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysUserMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..a36da7c4fe469882b2800257cf2fb5049ee7571f --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.java b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..6f7b95143c23bb910902a4586c34d30bc26dba9e --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021-2031, 河北计全科技有限公司 (https://www.jeequan.com & jeequan@126.com). + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jeequan.jeepay.service.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.jeequan.jeepay.core.entity.SysUserRoleRela; + +/** + *

+ * 操作员<->角色 关联表 Mapper 接口 + *

+ * + * @author [mybatis plus generator] + * @since 2020-06-13 + */ +public interface SysUserRoleRelaMapper extends BaseMapper { + +} diff --git a/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.xml b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..39f8e4911d1feb8bedf8608a6ca426e52db3115b --- /dev/null +++ b/jeepay-service/src/main/java/com/jeequan/jeepay/service/mapper/SysUserRoleRelaMapper.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/jeepay-service/src/test/java/com/.gitkeep b/jeepay-service/src/test/java/com/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-service/src/test/resources/.gitkeep b/jeepay-service/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-z-codegen/pom.xml b/jeepay-z-codegen/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..6afcb27c305be0362f0ea7d1f91504e0d370bea4 --- /dev/null +++ b/jeepay-z-codegen/pom.xml @@ -0,0 +1,79 @@ + + + 4.0.0 + + com.jeequan + jeepay-z-codegen + jar + 1.0-SNAPSHOT + Jeepay计全支付系统 [代码生成工具] + https://www.jeequan.com + + + + UTF-8 + 1.8 + + + 4.12 + + + + + + + + + junit + junit + ${junit.version} + test + + + + mysql + mysql-connector-java + 8.0.18 + + + + org.projectlombok + lombok + 1.18.10 + true + + + + org.springframework + spring-context + 4.3.10.RELEASE + + + + com.baomidou + mybatis-plus-generator + 3.3.0 + + + + org.apache.velocity + velocity-engine-core + 2.1 + + + + + + + + maven-compiler-plugin + + 8 + 8 + + + + + + \ No newline at end of file diff --git a/jeepay-z-codegen/src/main/java/com/gen/MainGen.java b/jeepay-z-codegen/src/main/java/com/gen/MainGen.java new file mode 100644 index 0000000000000000000000000000000000000000..620a0d5185906c430def20587638cef3cc0f6be2 --- /dev/null +++ b/jeepay-z-codegen/src/main/java/com/gen/MainGen.java @@ -0,0 +1,113 @@ +package com.gen; + +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert; +import com.baomidou.mybatisplus.generator.config.rules.DateType; +import com.baomidou.mybatisplus.generator.config.rules.DbColumnType; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; + +import java.io.File; + +/* +* 代码生成器 +* +* @author terrfly +* @site https://www.jeepay.vip +* @date 2021/6/8 17:47 +*/ +public class MainGen { + + public static final String THIS_MODULE_NAME = "jeepay-z-codegen"; //当前项目名称 + + public static final String DB_URL = "jdbc:mysql://127.0.0.1:3306/jeepay?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8"; + public static final String DB_USERNAME = "root"; + public static final String DB_PASSWORD = "root"; + + // 多个用, 拼接 + //public static final String TABLE_NAMES= "t_sys_entitlement,t_sys_role,t_sys_user,t_sys_user_auth"; + public static final String TABLE_NAMES= "t_pay_way"; + + public static void main(String[] args) { + + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + String projectPath = System.getProperty("user.dir"); //获取当前项目的 文件夹地址 + + if(!projectPath.endsWith(THIS_MODULE_NAME)){ //解决IDEA中 项目目录问题 + projectPath += File.separator + THIS_MODULE_NAME; + } + + gc.setOutputDir(projectPath + "/src/main/java"); + gc.setAuthor("[mybatis plus generator]"); + gc.setOpen(false); + + gc.setBaseResultMap(true); + gc.setDateType(DateType.ONLY_DATE); + gc.setServiceImplName("%sService"); //不生成 service接口; + + mpg.setGlobalConfig(gc); + + // 数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setUrl(DB_URL); + dsc.setDriverName("com.mysql.jdbc.Driver"); + dsc.setUsername(DB_USERNAME); + dsc.setPassword(DB_PASSWORD); + + dsc.setTypeConvert(new MySqlTypeConvert() { + @Override + public DbColumnType processTypeConvert(GlobalConfig globalConfig, String fieldType) { + System.out.println("转换类型:" + fieldType); + //tinyint转换成Boolean + if (fieldType.toLowerCase().contains("tinyint")) { + return DbColumnType.BYTE; + } + return (DbColumnType) super.processTypeConvert(globalConfig, fieldType); + } + + }); + + mpg.setDataSource(dsc); + + // 包配置 + PackageConfig pc = new PackageConfig(); + pc.setParent("com.jeequan.jeepay"); //根目录 + pc.setEntity("core.entity"); //实体目录 + pc.setMapper("service.mapper"); //Mapper接口目录 + pc.setXml("service.mapper"); //xml目录 + + pc.setService("delete_delete"); //service目录 不需要,暂时删除 + pc.setServiceImpl("service"); //serviceImpl 目录 + + mpg.setPackageInfo(pc); + + // 配置模板 + TemplateConfig templateConfig = new TemplateConfig(); + templateConfig.setController(null); //不生成controller + templateConfig.setService(null); //不生成services + + mpg.setTemplate(templateConfig); + + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); //no_change原样输出 + strategy.setColumnNaming(NamingStrategy.underline_to_camel); //no_change原样输出 + strategy.setEntityLombokModel(true); + + strategy.setInclude(TABLE_NAMES.split(",")); + strategy.setTablePrefix("t_"); + +// strategy.setEntityTableFieldAnnotationEnable(true); //自动添加 field注解 + + mpg.setStrategy(strategy); + + mpg.execute(); + } + + +} diff --git a/jeepay-z-codegen/src/main/resources/.gitkeep b/jeepay-z-codegen/src/main/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-z-codegen/src/test/java/.gitkeep b/jeepay-z-codegen/src/test/java/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/jeepay-z-codegen/src/test/resources/.gitkeep b/jeepay-z-codegen/src/test/resources/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/pom.xml b/pom.xml old mode 100755 new mode 100644 index 6b8a7b973201b350618e4f2e72c12513c15e2d03..6925d9d03507dc248b9f8806ec4bb15451f6cd19 --- a/pom.xml +++ b/pom.xml @@ -1,29 +1,145 @@ - 4.0.0 + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + 4.0.0 - org.xxpay - xxpay-master - 1.0.0 - pom - xxpay-master - xxpay-master + com.jeequan + jeepay + pom + jeepay + 1.0.0 + Jeepay计全支付系统 + https://www.jeequan.com + + + + org.springframework.boot + spring-boot-starter-parent + 2.4.5 + + + - xxpay-common - xxpay-dal - xxpay-mgr - xxpay-shop - xxpay4spring-cloud - xxpay4dubbo - xxpay4spring-boot + jeepay-z-codegen + + jeepay-core + jeepay-service + jeepay-manager + jeepay-merchant + jeepay-payment + - UTF-8 - UTF-8 - 1.8 + 1.8 + UTF-8 + 1.0.0 + + + 1.2.76 + 3.4.2 + 5.6.6 + 5.4.6 + 0.9.1 + 4.1.0 + + + + + + + + + com.alibaba + fastjson + ${fastjson.version} + + + + + org.springframework.security + spring-security-core + ${spring.security.version} + + + + + io.jsonwebtoken + jjwt + ${jjwt.version} + + + + + com.github.binarywang + weixin-java-pay + ${binarywang.weixin.java.version} + + + + com.github.binarywang + weixin-java-mp + ${binarywang.weixin.java.version} + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis.plus.starter.version} + + + + + com.google.zxing + core + 3.1.0 + + + + com.google.zxing + javase + 3.1.0 + + + + + com.alipay.sdk + alipay-sdk-java + 4.13.50.ALL + + + + + + + + + + + org.projectlombok + lombok + true + provided + + + + + cn.hutool + hutool-all + ${hutool.util.version} + + + + + + + + + + + + diff --git a/xxpay-common/pom.xml b/xxpay-common/pom.xml deleted file mode 100644 index 4a541bb6bb1c8dda77d68a0928c2171f4c6538ed..0000000000000000000000000000000000000000 --- a/xxpay-common/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-common - 1.0.0 - jar - xxpay-common - xxpay-common - - - UTF-8 - 1.8 - 1.2.54 - 1.1.7 - 1.7.7 - 3.5 - 1.7.0 - 3.2.2 - - - - - ch.qos.logback - logback-core - ${logback-classic.version} - - - ch.qos.logback - logback-classic - ${logback-classic.version} - - - org.slf4j - slf4j-api - ${slf4j-api.version} - - - com.alibaba - fastjson - ${fastjson.version} - - - org.apache.commons - commons-lang3 - ${commons-lang3.version} - - - commons-beanutils - commons-beanutils - ${commons.beanutils.version} - - - commons-collections - commons-collections - ${commons.collections.version} - - - - - xxpay-common - - - \ No newline at end of file diff --git a/xxpay-common/src/main/java/org/xxpay/common/constant/Constant.java b/xxpay-common/src/main/java/org/xxpay/common/constant/Constant.java deleted file mode 100644 index 480c949b30db1fdd9e042da7deab7eb78aebdd40..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/constant/Constant.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.xxpay.common.constant; - -/** - * Created by admin on 2016/4/27. - */ -public class Constant { - - // 账户业务模块流水号前缀(account) - public static final String AC_BIZ_SEQUENCE_NO_PREFIX = "ac"; - // 账户业务模块流水号前缀(config) - public static final String CF_BIZ_SEQUENCE_NO_PREFIX = "cf"; - // 账户业务模块流水号前缀(metadata) - public static final String MD_BIZ_SEQUENCE_NO_PREFIX = "md"; - public static final String ME_BIZ_SEQUENCE_NO_PREFIX = "me"; - // 认证业务模块流水号前缀(auth) - public static final String AU_BIZ_SEQUENCE_NO_PREFIX = "au"; - // 交易业务模块流水号前缀(trans) - public static final String TRANS_BIZ_SEQUENCE_NO_PREFIX = "tn"; - // 日志业务模块流水号前缀(log) - public static final String LG_BIZ_SEQUENCE_NO_PREFIX = "lg"; - // zookeeper监控业务模块流水号前缀(zk) - public static final String ZK_BIZ_SEQUENCE_NO_PREFIX = "zk"; - // 朋友圈流水号前缀(moments) - public static final String MM_BIZ_SEQUENCE_NO_PREFIX = "mm"; - // 背包流水号前缀(pack) - public static final String PK_BIZ_SEQUENCE_NO_PREFIX = "pk"; - - // 随机通讯码不重复的时间间隔(ms) - public static final long RPC_SEQ_NO_NOT_REPEAT_INTERVAL = 5 * 1000; - - // 服务端返回map中业务数据结果对应的key名称 - public static final String BIZ_RESULT_KEY = "bizResult"; - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/constant/PayConstant.java b/xxpay-common/src/main/java/org/xxpay/common/constant/PayConstant.java deleted file mode 100644 index 8102104f88ab68a20b2e62b016c15406435a71df..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/constant/PayConstant.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.xxpay.common.constant; - -import java.io.File; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付常量类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class PayConstant { - - public final static String PAY_CHANNEL_WX_JSAPI = "WX_JSAPI"; // 微信公众号支付 - public final static String PAY_CHANNEL_WX_NATIVE = "WX_NATIVE"; // 微信原生扫码支付 - public final static String PAY_CHANNEL_WX_APP = "WX_APP"; // 微信APP支付 - public final static String PAY_CHANNEL_WX_MWEB = "WX_MWEB"; // 微信H5支付 - public final static String PAY_CHANNEL_IAP = "IAP"; // 苹果应用内支付 - public final static String PAY_CHANNEL_ALIPAY_MOBILE = "ALIPAY_MOBILE"; // 支付宝移动支付 - public final static String PAY_CHANNEL_ALIPAY_PC = "ALIPAY_PC"; // 支付宝PC支付 - public final static String PAY_CHANNEL_ALIPAY_WAP = "ALIPAY_WAP"; // 支付宝WAP支付 - public final static String PAY_CHANNEL_ALIPAY_QR = "ALIPAY_QR"; // 支付宝当面付之扫码支付 - - public final static String CHANNEL_NAME_WX = "WX"; // 渠道名称:微信 - public final static String CHANNEL_NAME_ALIPAY = "ALIPAY"; // 渠道名称:支付宝 - - - - public final static byte PAY_STATUS_EXPIRED = -2; // 订单过期 - public final static byte PAY_STATUS_FAILED = -1; // 支付失败 - public final static byte PAY_STATUS_INIT = 0; // 初始态 - public final static byte PAY_STATUS_PAYING = 1; // 支付中 - public final static byte PAY_STATUS_SUCCESS = 2; // 支付成功 - public final static byte PAY_STATUS_COMPLETE = 3; // 业务完成 - - public final static byte TRANS_STATUS_INIT = 0; // 初始态 - public final static byte TRANS_STATUS_TRANING = 1; // 转账中 - public final static byte TRANS_STATUS_SUCCESS = 2; // 成功 - public final static byte TRANS_STATUS_FAIL = 3; // 失败 - public final static byte TRANS_STATUS_COMPLETE = 4; // 业务完成 - - public final static byte TRANS_RESULT_INIT = 0; // 不确认结果 - public final static byte TRANS_RESULT_REFUNDING = 1; // 等待手动处理 - public final static byte TRANS_RESULT_SUCCESS = 2; // 确认成功 - public final static byte TRANS_RESULT_FAIL = 3; // 确认失败 - - public final static byte REFUND_STATUS_INIT = 0; // 初始态 - public final static byte REFUND_STATUS_REFUNDING = 1; // 转账中 - public final static byte REFUND_STATUS_SUCCESS = 2; // 成功 - public final static byte REFUND_STATUS_FAIL = 3; // 失败 - public final static byte REFUND_STATUS_COMPLETE = 4; // 业务完成 - - public final static byte REFUND_RESULT_INIT = 0; // 不确认结果 - public final static byte REFUND_RESULT_REFUNDING = 1; // 等待手动处理 - public final static byte REFUND_RESULT_SUCCESS = 2; // 确认成功 - public final static byte REFUND_RESULT_FAIL = 3; // 确认失败 - - public final static String MCH_NOTIFY_TYPE_PAY = "1"; // 商户通知类型:支付订单 - public final static String MCH_NOTIFY_TYPE_TRANS = "2"; // 商户通知类型:转账订单 - public final static String MCH_NOTIFY_TYPE_REFUND = "3"; // 商户通知类型:退款订单 - - public final static byte MCH_NOTIFY_STATUS_NOTIFYING = 1; // 通知中 - public final static byte MCH_NOTIFY_STATUS_SUCCESS = 2; // 通知成功 - public final static byte MCH_NOTIFY_STATUS_FAIL = 3; // 通知失败 - - - public final static String RESP_UTF8 = "UTF-8"; // 通知业务系统使用的编码 - - public static final String RETURN_PARAM_RETCODE = "retCode"; - public static final String RETURN_PARAM_RETMSG = "retMsg"; - public static final String RESULT_PARAM_RESCODE = "resCode"; - public static final String RESULT_PARAM_ERRCODE = "errCode"; - public static final String RESULT_PARAM_ERRCODEDES = "errCodeDes"; - public static final String RESULT_PARAM_SIGN = "sign"; - - public static final String RETURN_VALUE_SUCCESS = "SUCCESS"; - public static final String RETURN_VALUE_FAIL = "FAIL"; - - public static final String RETURN_ALIPAY_VALUE_SUCCESS = "success"; - public static final String RETURN_ALIPAY_VALUE_FAIL = "fail"; - - public static class JdConstant { - public final static String CONFIG_PATH = "jd" + File.separator + "jd"; // 京东支付配置文件路径 - } - - public static class WxConstant { - public final static String TRADE_TYPE_APP = "APP"; // APP支付 - public final static String TRADE_TYPE_JSPAI = "JSAPI"; // 公众号支付或小程序支付 - public final static String TRADE_TYPE_NATIVE = "NATIVE"; // 原生扫码支付 - public final static String TRADE_TYPE_MWEB = "MWEB"; // H5支付 - - } - - public static class IapConstant { - public final static String CONFIG_PATH = "iap" + File.separator + "iap"; // 苹果应用内支付 - } - - public static class AlipayConstant { - public final static String CONFIG_PATH = "alipay" + File.separator + "alipay"; // 支付宝移动支付 - public final static String TRADE_STATUS_WAIT = "WAIT_BUYER_PAY"; // 交易创建,等待买家付款 - public final static String TRADE_STATUS_CLOSED = "TRADE_CLOSED"; // 交易关闭 - public final static String TRADE_STATUS_SUCCESS = "TRADE_SUCCESS"; // 交易成功 - public final static String TRADE_STATUS_FINISHED = "TRADE_FINISHED"; // 交易成功且结束 - } - - public static final String NOTIFY_BUSI_PAY = "NOTIFY_VV_PAY_RES"; - public static final String NOTIFY_BUSI_TRANS = "NOTIFY_VV_TRANS_RES"; - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/constant/PayEnum.java b/xxpay-common/src/main/java/org/xxpay/common/constant/PayEnum.java deleted file mode 100644 index cd5e2629cac520fc33cf17f988adf07c151505d0..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/constant/PayEnum.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.xxpay.common.constant; - -/** - * @Description: 支付返回码定义 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public enum PayEnum { - - /* - 0010|系统错误 |系统超时或异常|系统异常,请用相同参数重新调用 - 0011|请使用post方法 |未使用post传递参数|请检查请求参数是否通过post方法提交 - 0012|post数据为空 |post数据不能为空|请检查post数据是否为空 - 0013|签名错误 |参数签名结果不正确|请检查签名参数和方法是否都符合签名算法要求 - 0014|参数错误 |缺少参数或参数格式不正确|请根据具体的原因检查参数 - 0015|商户不存在 |传入的商户ID在支付中心不存在|请检查mchID参数是否正确 - 0110|第三方超时 |调用第三方支付系统超时|请重新调用 - 0111|第三方异常 |调用第三方支付系统异常|根据提示错误信息检查 - 0112|订单不存在 |商户订单不存在|请检查商户订单payOrderId参数 - 0113|订单已支付 |商户订单已支付,无需重复操作|商户订单已支付,无需重复操作 - */ - - ERR_0001("0001", "商户签名异常"), - - ERR_0010("0010", "系统错误"), - ERR_0011("0011", "请使用post方法"), - ERR_0012("0012", "post数据为空"), - ERR_0013("0013", "签名错误"), - ERR_0014("0014", "参数错误"), - ERR_0015("0015", "商户不存在"), - ERR_0110("0110", "第三方超时"), - ERR_0111("0111", "第三方异常"), - ERR_0112("0112", "订单不存在"), - ERR_0113("0113", "订单已支付"), - ERR_0114("0114", "商品不存在"), - ERR_0115("0115", "价格不对"), - ERR_0116("0116", "物品数量不对"), - ERR_0117("0117", "过程返回255"), - ERR_0118("0118", "DB错误"); - - private String code; - private String message; - - PayEnum(String code, String message) { - this.code = code; - this.message = message; - } - - public String getCode() - { - return this.code; - } - - public String getMessage() { - return this.message; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/domain/BaseParam.java b/xxpay-common/src/main/java/org/xxpay/common/domain/BaseParam.java deleted file mode 100644 index c47a8ba5ed307b12cb8703a310934bf2060a326c..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/domain/BaseParam.java +++ /dev/null @@ -1,257 +0,0 @@ -package org.xxpay.common.domain; - -import org.apache.commons.lang3.StringUtils; -import org.xxpay.common.enumm.RpcSignTypeEnum; -import org.xxpay.common.util.*; - -import java.util.*; - -/** - * Created by admin on 2016/7/11. - */ -public class BaseParam extends RpcBaseParam { - - private Map bizParamMap; - - public BaseParam() {} - - /** - * 不需要业务签名的构造器 - * @param rpcSrcSysId - * @param rpcSignKey - * @param bizSeqNoPrefix - */ - public BaseParam(String rpcSrcSysId, String rpcSignKey, String bizSeqNoPrefix) { - super.rpcSrcSysId = rpcSrcSysId; - super.rpcDateTime = DateUtils.getCurrentTimeStrDefault(); - super.rpcSeqNo = RandomStrUtils.getInstance().getRandomString(); - super.rpcSignType = RpcSignTypeEnum.SHA1_SIGN.getCode(); - super.bizSeqNo = BizSequenceUtils.getInstance().generateBizSeqNo(bizSeqNoPrefix); - StringBuffer decriptBuffer = new StringBuffer(); - decriptBuffer.append(rpcSignKey) - .append(super.rpcSrcSysId) - .append(super.rpcDateTime) - .append(super.rpcSignType) - .append(super.bizSeqNo); - super.rpcSign = RpcSignUtils.sha1(decriptBuffer.toString()); - this.bizParamMap = new HashMap(); - } - - /** - * 需要业务签名的构造器 - * @param rpcSrcSysId - * @param rpcSignKey - * @param bizSeqNoPrefix - * @param bizSign - */ - public BaseParam(String rpcSrcSysId, String rpcSignKey, String bizSeqNoPrefix, String bizSign) { - super.rpcSrcSysId = rpcSrcSysId; - super.rpcDateTime = DateUtils.getCurrentTimeStrDefault(); - super.rpcSeqNo = RandomStrUtils.getInstance().getRandomString(); - super.rpcSignType = RpcSignTypeEnum.SHA1_SIGN.getCode(); - super.bizSeqNo = BizSequenceUtils.getInstance().generateBizSeqNo(bizSeqNoPrefix); - super.bizSign = bizSign; - StringBuffer decriptBuffer = new StringBuffer(); - decriptBuffer.append(rpcSignKey) - .append(super.rpcSrcSysId) - .append(super.rpcDateTime) - .append(super.rpcSignType) - .append(super.bizSeqNo) - .append(super.bizSign); - super.rpcSign = RpcSignUtils.sha1(decriptBuffer.toString()); - this.bizParamMap = new HashMap(); - } - - public Map getBizParamMap() { - return bizParamMap; - } - - public void setBizParamMap(Map bizParamMap) { - this.bizParamMap = bizParamMap; - } - - public String toJson() { - return JsonUtil.object2Json(this); - } - - @Override - public String toString() { - final StringBuffer sb = new StringBuffer("BaseParam{"); - sb.append("rpcSrcSysId='").append(rpcSrcSysId).append('\''); - sb.append(", rpcDateTime='").append(rpcDateTime).append('\''); - sb.append(", rpcSeqNo='").append(rpcSeqNo).append('\''); - sb.append(", rpcSignType=").append(rpcSignType); - sb.append(", rpcSign='").append(rpcSign).append('\''); - sb.append(", bizSeqNo='").append(bizSeqNo).append('\''); - sb.append(", bizSign='").append(bizSign).append('\''); - sb.append(", bizParamMap=").append(bizParamMap); - sb.append('}'); - return sb.toString(); - } - - public boolean isNullValue(String key) { - Object objValue = this.bizParamMap.get(key); - return objValue == null || StringUtils.isBlank(objValue.toString()); - } - - /** - * 判断bizParamMap中的参数是否全部为空,是则返回true,否则返回false - * @param excludeKeys - * @return - */ - public boolean isInvalidMapValue(Object... excludeKeys) { - if (this.bizParamMap == null || this.bizParamMap.isEmpty()) { - return true; - } - List list = Arrays.asList(excludeKeys); - for (Map.Entry entry : this.bizParamMap.entrySet()) { - if (list.contains(entry.getKey())) { - continue; - } - Object value = entry.getValue(); - if (value != null ) { - if (value instanceof String) { - if (StringUtils.isNotBlank(value.toString())) { - return false; - } - } else { - return false; - } - } - } - return true; - } - - /** - * 获取long类型参数 - * @param name - * @return - */ - public Long getLongBizParam(String name) { - if (isNullValue(name)) { - return null; - } - return Long.valueOf(bizParamMap.get(name).toString()); - } - - /** - * 获取int类型参数 - * @param name - * @return - */ - public Integer getIntBizParam(String name) { - if (isNullValue(name)) { - return null; - } - return Integer.valueOf(bizParamMap.get(name).toString()); - } - - /** - * 获取int类型参数,如果为空返回defaultValue - * @param name - * @param defaultValue - * @return - */ - public Integer getIntBizParam(String name, int defaultValue) { - if (isNullValue(name)) { - return defaultValue; - } - return Integer.valueOf(bizParamMap.get(name).toString()); - } - - /** - * 获取short类型参数 - * @param name - * @return - */ - public Short getShortBizParam(String name) { - if (isNullValue(name)) { - return null; - } - return Short.valueOf(bizParamMap.get(name).toString()); - } - - /** - * 获取string类型参数,如果为空返回defaultValue - * @param name - * @param - * @return - */ - public String getStringBizParam(String name, String defaultValue){ - if (isNullValue(name)) { - return defaultValue; - } - return bizParamMap.get(name).toString(); - } - - /** - * 获取string类型参数 - * @param name - * @param - * @return - */ - public String getStringBizParam(String name){ - if (isNullValue(name)) { - return null; - } - return bizParamMap.get(name).toString(); - } - - public List getShortListBizParam(String name) { - if (isNullValue(name)) { - return null; - } - List numberList = (List) bizParamMap.get(name); - if (numberList == null) { - return null; - } - List shortList = new ArrayList(numberList.size()); - for (Number number : numberList) { - Short value = number.shortValue(); - shortList.add(value); - } - return shortList; - } - - public List getIntegerListBizParam(String name) { - if (isNullValue(name)) { - return null; - } - List numberList = (List) bizParamMap.get(name); - if (numberList == null) { - return null; - } - List integerList = new ArrayList(numberList.size()); - for (Number number : numberList) { - Integer value = number.intValue(); - integerList.add(value); - } - return integerList; - } - - public List getLongListBizParam(String name) { - if (isNullValue(name)) { - return null; - } - List numberList = (List) bizParamMap.get(name); - if (numberList == null) { - return null; - } - List longList = new ArrayList(numberList.size()); - for (Number number : numberList) { - Long value = number.longValue(); - longList.add(value); - } - return longList; - } - - public static void main(String[] args) { - BaseParam baseParam = new BaseParam(); - Map map = new HashMap(); - map.put("a", null); - map.put("b", ""); - baseParam.setBizParamMap(map); - System.out.println(baseParam.isInvalidMapValue("")); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseParam.java b/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseParam.java deleted file mode 100644 index 0193746b7f67943ec51971f970da134760067699..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseParam.java +++ /dev/null @@ -1,195 +0,0 @@ -package org.xxpay.common.domain; - -import org.xxpay.common.enumm.RpcSignTypeEnum; -import org.xxpay.common.util.*; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.Map; - -/** - * 服务接口调用入参基类 - * Created by admin on 2016/4/27. - */ -public class RpcBaseParam implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 调用方ID(由RPC服务端分配) - */ - protected String rpcSrcSysId; - /** - * 业务调用当前时间(格式:yyyyMMddHHmmssSSS) - */ - protected String rpcDateTime; - /** - * 随机通讯码(要求一定时间段内不重复) - */ - protected String rpcSeqNo; - /** - * 签名计算方法 - * 参见RpcSignTypeEnum - * 0: 明文 - * 1: SHA-1 - */ - protected Integer rpcSignType; - /** - * 签名(用于验证调用方的合法性) - * 签名计算方法: 签名方法(key(由RPC服务端分配,不在通讯中传递)+scrSysId+rpcDateTime(yyyyMMddHHmmssSSS)+rpcSignType+bizSeqNo+bizSign),如果字段为null则不参与 - * eg. sha1(key+srcSysId+curDateTime+rpcSignType+bizSeqNo+bizSign) - */ - protected String rpcSign; - /** - * 业务流水号(唯一标示一笔业务) - * 由业务前缀(2字符,参见Constant.MP_BIZ_SEQUENCE_NO_PREFIX)+日期时间(yyyyMMddHHmmss)+流水号(6位数字)组成 - * eg. Constant.MP_BIZ_SEQUENCE_NO_PREFIX)+DateUtils.getCurrentTimeStr("yyyyMMddHHmmss") - * +BizSequenceUtils.getInstance().generateBizSeqNo() - */ - protected String bizSeqNo; - /** - * 业务签名(计算由各业务系统定义) - */ - protected String bizSign; - - public RpcBaseParam() {} - - /** - * 不需要业务签名的构造器 - * @param rpcSrcSysId - * @param rpcSignKey - * @param bizSeqNoPrefix - */ - public RpcBaseParam(String rpcSrcSysId, String rpcSignKey, String bizSeqNoPrefix) { - this.rpcSrcSysId = rpcSrcSysId; - this.rpcDateTime = DateUtils.getCurrentTimeStrDefault(); - this.rpcSeqNo = RandomStrUtils.getInstance().getRandomString(); - this.rpcSignType = RpcSignTypeEnum.SHA1_SIGN.getCode(); - this.bizSeqNo = BizSequenceUtils.getInstance().generateBizSeqNo(bizSeqNoPrefix); - StringBuffer decriptBuffer = new StringBuffer(); - decriptBuffer.append(rpcSignKey) - .append(this.rpcSrcSysId) - .append(this.rpcDateTime) - .append(this.rpcSignType) - .append(this.bizSeqNo); - this.rpcSign = RpcSignUtils.sha1(decriptBuffer.toString()); - } - - /** - * 需要业务签名的构造器 - * @param rpcSrcSysId - * @param rpcSignKey - * @param bizSeqNoPrefix - * @param bizSign - */ - public RpcBaseParam(String rpcSrcSysId, String rpcSignKey, String bizSeqNoPrefix, String bizSign) { - this.rpcSrcSysId = rpcSrcSysId; - this.rpcDateTime = DateUtils.getCurrentTimeStrDefault(); - this.rpcSeqNo = RandomStrUtils.getInstance().getRandomString(); - this.rpcSignType = RpcSignTypeEnum.SHA1_SIGN.getCode(); - this.bizSeqNo = BizSequenceUtils.getInstance().generateBizSeqNo(bizSeqNoPrefix); - this.bizSign = bizSign; - StringBuffer decriptBuffer = new StringBuffer(); - decriptBuffer.append(rpcSignKey) - .append(this.rpcSrcSysId) - .append(this.rpcDateTime) - .append(this.rpcSignType) - .append(this.bizSeqNo) - .append(this.bizSign); - this.rpcSign = RpcSignUtils.sha1(decriptBuffer.toString()); - } - - public String getRpcSrcSysId() { - return rpcSrcSysId; - } - - public void setRpcSrcSysId(String rpcSrcSysId) { - this.rpcSrcSysId = rpcSrcSysId; - } - - public String getRpcDateTime() { - return rpcDateTime; - } - - public void setRpcDateTime(String rpcDateTime) { - this.rpcDateTime = rpcDateTime; - } - - public String getRpcSeqNo() { - return rpcSeqNo; - } - - public void setRpcSeqNo(String rpcSeqNo) { - this.rpcSeqNo = rpcSeqNo; - } - - public Integer getRpcSignType() { - return rpcSignType; - } - - public void setRpcSignType(Integer rpcSignType) { - this.rpcSignType = rpcSignType; - } - - public String getBizSeqNo() { - return bizSeqNo; - } - - public void setBizSeqNo(String bizSeqNo) { - this.bizSeqNo = bizSeqNo; - } - - public String getBizSign() { - return bizSign; - } - - public void setBizSign(String bizSign) { - this.bizSign = bizSign; - } - - public String getRpcSign() { - return rpcSign; - } - - public void setRpcSign(String rpcSign) { - this.rpcSign = rpcSign; - } - - /*public Map convert2Map() { - if (this == null) { - return null; - } - return BeanConvertUtils.bean2Map(this); - }*/ - - public static RpcBaseParam convert2Bean(Map map) { - return BeanConvertUtils.map2Bean(map, RpcBaseParam.class); - } - - @Override - public String toString() { - final StringBuffer sb = new StringBuffer("RpcBaseParam{"); - sb.append("rpcSrcSysId='").append(rpcSrcSysId).append('\''); - sb.append(", rpcDateTime='").append(rpcDateTime).append('\''); - sb.append(", rpcSeqNo='").append(rpcSeqNo).append('\''); - sb.append(", rpcSignType=").append(rpcSignType); - sb.append(", rpcSign='").append(rpcSign).append('\''); - sb.append(", bizSeqNo='").append(bizSeqNo).append('\''); - sb.append(", bizSign='").append(bizSign).append('\''); - sb.append('}'); - return sb.toString(); - } - - public Map convert2Map() { - Map rpcMap = new HashMap(); - rpcMap.put("rpcSrcSysId", rpcSrcSysId); - rpcMap.put("rpcDateTime", rpcDateTime); - rpcMap.put("rpcSeqNo", rpcSeqNo); - rpcMap.put("rpcSignType", rpcSignType); - rpcMap.put("rpcSign", rpcSign); - rpcMap.put("bizSeqNo", bizSeqNo); - rpcMap.put("bizSign", bizSign); - return rpcMap; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseResult.java b/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseResult.java deleted file mode 100644 index c02efacf7413c3e8803f1f8f005b90e1d04f2637..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/domain/RpcBaseResult.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.xxpay.common.domain; - -import java.util.HashMap; -import java.util.Map; - -/** - * 服务接口调用返回值基类 - * Created by admin on 2016/4/27. - */ -public class RpcBaseResult extends RpcBaseParam { - - /** - * RPC调用返回码 - * 0000: 成功 - * 其他: 失败(00开始标示通讯层相关错误码) - */ - protected String rpcRetCode; - /** - * RPC调用返回错误描述 - */ - protected String rpcRetMsg; - - /** - * DB返回的错误码 - */ - protected String dbErrorCode; - - /** - * DB返回的错误信息 - */ - protected String dbErrorMsg; - - public String getRpcRetCode() { - return rpcRetCode; - } - - public void setRpcRetCode(String rpcRetCode) { - this.rpcRetCode = rpcRetCode; - } - - public String getRpcRetMsg() { - return rpcRetMsg; - } - - public void setRpcRetMsg(String rpcRetMsg) { - this.rpcRetMsg = rpcRetMsg; - } - - @Override - public String toString() { - final StringBuffer sb = new StringBuffer("RpcBaseResult{"); - sb.append("rpcSrcSysId='").append(rpcSrcSysId).append('\''); - sb.append(", rpcDateTime='").append(rpcDateTime).append('\''); - sb.append(", rpcSeqNo='").append(rpcSeqNo).append('\''); - sb.append(", rpcSignType=").append(rpcSignType); - sb.append(", rpcSign='").append(rpcSign).append('\''); - sb.append(", bizSeqNo='").append(bizSeqNo).append('\''); - sb.append(", bizSign='").append(bizSign).append('\''); - sb.append(", rpcRetCode='").append(rpcRetCode).append('\''); - sb.append(", rpcRetMsg='").append(rpcRetMsg).append('\''); - sb.append(", dbErrorCode='").append(dbErrorCode).append('\''); - sb.append(", dbErrorMsg='").append(dbErrorMsg).append('\''); - sb.append('}'); - return sb.toString(); - } - - public Map convert2Map() { - Map rpcMap = new HashMap(); - rpcMap.put("rpcSrcSysId", rpcSrcSysId); - rpcMap.put("rpcDateTime", rpcDateTime); - rpcMap.put("rpcSeqNo", rpcSeqNo); - rpcMap.put("rpcSignType", rpcSignType); - rpcMap.put("rpcSign", rpcSign); - rpcMap.put("bizSeqNo", bizSeqNo); - rpcMap.put("bizSign", bizSign); - rpcMap.put("rpcRetCode", rpcRetCode); - rpcMap.put("rpcRetMsg", rpcRetMsg); - rpcMap.put("dbErrorCode", dbErrorCode); - rpcMap.put("dbErrorMsg", dbErrorMsg); - return rpcMap; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/enumm/RetEnum.java b/xxpay-common/src/main/java/org/xxpay/common/enumm/RetEnum.java deleted file mode 100644 index 5f5764c99d5ef6a19f11da4f6a97fd2e4533bf32..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/enumm/RetEnum.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.xxpay.common.enumm; - -/** - * RPC调用返回码枚举类 - * 对应方法调用返回值中的rpcRetCode和rpcRetMsg - * Created by admin on 2016/4/27. - */ -public enum RetEnum { - - // 0000: 成功 - RET_SUCCESS("0000", ""), - - // 失败(00开始标示通讯层相关错误码) - RET_REMOTE_UNUSABLE("0001", "远程服务不可用"), - RET_REMOTE_INVALID("0002", "客户端非法调用"), - RET_NO_BIZ_SEQUENCE_NO("0003", "远程服务调用业务流水号不存在"), - RET_REMOTE_CHECK_SIGN_FAIL("0004", "远程服务调用签名验证失败"), - RET_REMOTE_RPC_SEQ_NO_REPEATED("0005", "随机通讯码在指定时间内重复"), - RET_REMOTE_SIGN_INVALID("0006", "远程服务调用签名计算方式错误"), - RET_REMOTE_DEAL_EXCEPTION("0007", "远程服务调用处理异常"), - RET_REMOTE_PROTOCOL_INVALID("0008", "客户端调用协议非法"), - RET_REMOTE_HTTP_METHOD_INVALID("0009", "客户端请求方式非法"), - - // 失败(01开始标示参数校验相关错误码) - RET_PARAM_NOT_FOUND("0101", "参数不存在"), - RET_PARAM_INVALID("0102", "无效的参数"), - RET_PARAM_TOO_LARGE_LIST("0103", "列表超长"), - RET_PARAM_TYPE_INVALID("0104", "参数类型错误"), - RET_CURRENT_PAGE_INVALID("0105", "当前页码非法"), - RET_VIEW_NUMBER_INVALID("0106", "分页显示数目非法"), - RET_VIEW_LIMIT_INVALID("0107", "数据排列显示数目非法"), - - // 失败(02开始标示DB操作相关错误码) - RET_DB_FAIL("0201", "数据库操作失败"), - - // 业务相关 - RET_BIZ_DATA_NOT_EXISTS("1001", "数据不存在"), - RET_BIZ_SING_DATA_FAIL("1002", "商户签名数据不正确"), - RET_BIZ_WX_PAY_CREATE_FAIL("1003", "微信支付下单失败"), - RET_BIZ_ALI_PAY_CREATE_FAIL("1004", "支付宝支付下单失败"), - RET_BIZ_PAY_NOTIFY_VERIFY_FAIL("1005", "支付通知数据验证不正确"), - - - // 未知错误 - RET_UNKNOWN_ERROR("9999", "未知错误"); - - private String code; - private String message; - - private RetEnum(String code, String message) { this.code = code; - this.message = message; } - - public String getCode() - { - return this.code; - } - - public String getMessage() { - return this.message; - } - - public static RetEnum getRetEnum(String code) { - if (code == null) { - return null; - } - - RetEnum[] values = RetEnum.values(); - for (RetEnum e : values) { - if (e.getCode().equals(code)) { - return e; - } - } - return null; - } -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/enumm/RpcSignTypeEnum.java b/xxpay-common/src/main/java/org/xxpay/common/enumm/RpcSignTypeEnum.java deleted file mode 100644 index f95f9e6621ae535dd9caf796a997be0d04739feb..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/enumm/RpcSignTypeEnum.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.xxpay.common.enumm; - -/** - * RPC通讯层签名计算方法枚举类 - * Created by admin on 2016/5/4. - */ -public enum RpcSignTypeEnum { - - NOT_SIGN(0),// 明文 - SHA1_SIGN(1);// SHA-1签名 - - private Integer code; - - private RpcSignTypeEnum(Integer code) { - this.code = code; - } - - public Integer getCode() - { - return this.code; - } - - public static RpcSignTypeEnum getRpcSignTypeEnum(Integer code) { - if (code == null) { - return null; - } - - RpcSignTypeEnum[] values =RpcSignTypeEnum.values(); - for (RpcSignTypeEnum e : values) { - if (e.getCode().equals(code)) { - return e; - } - } - return null; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/AmountUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/AmountUtil.java deleted file mode 100644 index f8e13eeec2a00a46c25936d77c4835cd9b2009bc..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/AmountUtil.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.xxpay.common.util; - -import java.text.DecimalFormat; -import java.text.FieldPosition; - -/** - * @Description: 金额工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class AmountUtil { - - /** - * 将字符串"元"转换成"分" - * @param str - * @return - */ - public static String convertDollar2Cent(String str) { - DecimalFormat df = new DecimalFormat("0.00"); - StringBuffer sb = df.format(Double.parseDouble(str), - new StringBuffer(), new FieldPosition(0)); - int idx = sb.toString().indexOf("."); - sb.deleteCharAt(idx); - for (; sb.length() != 1;) { - if(sb.charAt(0) == '0') { - sb.deleteCharAt(0); - } else { - break; - } - } - return sb.toString(); - } - - /** - * 将字符串"分"转换成"元"(长格式),如:100分被转换为1.00元。 - * @param s - * @return - */ - public static String convertCent2Dollar(String s) { - if("".equals(s) || s ==null){ - return ""; - } - long l; - if(s.length() != 0) { - if(s.charAt(0) == '+') { - s = s.substring(1); - } - l = Long.parseLong(s); - } else { - return ""; - } - boolean negative = false; - if(l < 0) { - negative = true; - l = Math.abs(l); - } - s = Long.toString(l); - if(s.length() == 1) - return(negative ? ("-0.0" + s) : ("0.0" + s)); - if(s.length() == 2) - return(negative ? ("-0." + s) : ("0." + s)); - else - return(negative ? ("-" + s.substring(0, s.length() - 2) + "." + s - .substring(s.length() - 2)) : (s.substring(0, - s.length() - 2) - + "." + s.substring(s.length() - 2))); - } - - /** - * 将字符串"分"转换成"元"(短格式),如:100分被转换为1元。 - * @param s - * @return - */ - public static String convertCent2DollarShort(String s) { - String ss = convertCent2Dollar(s); - ss = "" + Double.parseDouble(ss); - if(ss.endsWith(".0")) - return ss.substring(0, ss.length() - 2); - if(ss.endsWith(".00")) - return ss.substring(0, ss.length() - 3); - else - return ss; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/BeanConvertUtils.java b/xxpay-common/src/main/java/org/xxpay/common/util/BeanConvertUtils.java deleted file mode 100644 index 3a28ca068527dcacd973f161fd090a3979ba4133..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/BeanConvertUtils.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.xxpay.common.util; - -import org.apache.commons.beanutils.BeanUtils; -import org.apache.commons.beanutils.ConvertUtils; -import org.apache.commons.beanutils.converters.*; - -import java.lang.reflect.InvocationTargetException; -import java.math.BigDecimal; -import java.util.Date; -import java.util.Map; - -/** - * Created by admin on 2016/5/4. - */ -public class BeanConvertUtils { - - static { - // 在封装之前 注册转换器 - ConvertUtils.register(new DateTimeConverter(), Date.class); - ConvertUtils.register(new DateTimeConverter(), java.sql.Date.class); - ConvertUtils.register(new LongConverter(null), Long.class); - ConvertUtils.register(new ShortConverter(null), Short.class); - ConvertUtils.register(new IntegerConverter(null), Integer.class); - ConvertUtils.register(new DoubleConverter(null), Double.class); - ConvertUtils.register(new BigDecimalConverter(null), BigDecimal.class); - } - - /** - * 将javabean转换为Map - * @param obj - * @return - */ - public static Map bean2Map(Object obj) { - try { - Map map = BeanUtils.describe(obj); - map.remove("class"); - return map; - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } catch (NoSuchMethodException e) { - e.printStackTrace(); - } - return null; - } - - /** - * 将Map转换为javabean - * @param map - * @param clazz - * @param - * @return - */ - public static T map2Bean(Map map, Class clazz) { - if (map == null || clazz == null) { - return null; - } - T bean = null; - try { - bean = clazz.newInstance(); - BeanUtils.populate(bean, map); - } catch (InstantiationException e) { - e.printStackTrace(); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } - return bean; - } - - /** - * 对象间的属性值拷贝 - * - * @param dest 目标对象 - * @param src 源对象 - */ - public static void copyProperties(Object dest, Object src) { - if (src == null || dest == null) { - return; - } - try { - BeanUtils.copyProperties(dest, src); - } catch (IllegalAccessException e) { - e.printStackTrace(); - } catch (InvocationTargetException e) { - e.printStackTrace(); - } catch (IllegalArgumentException e) { - e.printStackTrace(); - } - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/BizSequenceUtils.java b/xxpay-common/src/main/java/org/xxpay/common/util/BizSequenceUtils.java deleted file mode 100644 index 387993eb8dd38b5b11f71eb526225358f820bd36..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/BizSequenceUtils.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.xxpay.common.util; - -import java.text.DecimalFormat; -import java.text.FieldPosition; -import java.text.NumberFormat; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * 业务流水号工具类 - * Created by admin on 2016/4/28. - */ -public class BizSequenceUtils { - - private static Object lock = new Object(); - - private static BizSequenceUtils instance; - - /** - * The FieldPosition. - */ - private static final FieldPosition HELPER_POSITION = new FieldPosition(0); - - /** - * This Format for format the number to special format. - */ - private final static NumberFormat numberFormat = new DecimalFormat("00000000"); - - /** - * This int is the sequence number ,the default value is 1. - */ - private static AtomicInteger seq = new AtomicInteger(1); - - private static final int MAX = 99999999; - - private BizSequenceUtils() { - } - - public static BizSequenceUtils getInstance() { - if (instance == null) { - synchronized (lock) { - if (instance == null) { - instance = new BizSequenceUtils(); - } - } - } - return instance; - } - - /** - * 生成业务流水号(唯一标示一笔业务) - * - * @param bizSeqNoPrefix 业务前缀(2字符,参见Constant.**_BIZ_SEQUENCE_NO_PREFIX) - * @return - */ - public String generateBizSeqNo(String bizSeqNoPrefix) { - StringBuffer bizSeqNo = new StringBuffer(); - bizSeqNo.append(bizSeqNoPrefix) - .append(DateUtils.getCurrentTimeStr("yyMMddHHmmss")) - .append(getSeq()); - return bizSeqNo.toString(); - } - - private String getSeq() { - StringBuffer sb = new StringBuffer(); - numberFormat.format(seq, sb, HELPER_POSITION); - if (!seq.compareAndSet(MAX, 0)) { - seq.incrementAndGet(); - } - return sb.toString(); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/DateTimeConverter.java b/xxpay-common/src/main/java/org/xxpay/common/util/DateTimeConverter.java deleted file mode 100644 index efc162510bc96ea6cc1787f9c0064671f73ae5c2..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/DateTimeConverter.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.common.util; - -import org.apache.commons.beanutils.Converter; - -import java.text.DateFormat; -import java.text.DateFormatSymbols; -import java.text.SimpleDateFormat; -import java.util.Locale; - -/** - * Created by admin on 2016/5/10. - */ -public class DateTimeConverter implements Converter { - - private static final String DATE = "yyyy-MM-dd"; - private static final String DATETIME = "yyyy-MM-dd HH:mm:ss"; - private static final String TIMESTAMP = "yyyy-MM-dd HH:mm:ss.SSS"; - - @Override - public Object convert(Class type, Object value) { - return toDate(type, value); - } - - public static Object toDate(Class type, Object value) { - if (value == null || "".equals(value)) - return null; - if (value instanceof String) { - String dateValue = value.toString().trim(); - int length = dateValue.length(); - if (type.equals(java.util.Date.class)) { - try { - DateFormat formatter = null; - if (length <= 10) { - formatter = new SimpleDateFormat(DATE, new DateFormatSymbols(Locale.CHINA)); - return formatter.parse(dateValue); - } - if (length <= 19) { - formatter = new SimpleDateFormat(DATETIME, new DateFormatSymbols(Locale.CHINA)); - return formatter.parse(dateValue); - } - if (length <= 23) { - formatter = new SimpleDateFormat(TIMESTAMP, new DateFormatSymbols(Locale.CHINA)); - return formatter.parse(dateValue); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - } - return value; - } -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/DateUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/DateUtil.java deleted file mode 100644 index 7b0da161414e0c65c3153602ff5f0e6625aaac3f..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/DateUtil.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.xxpay.common.util; - -import org.apache.commons.lang3.StringUtils; - -import java.sql.Timestamp; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * @Description: 日期时间工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class DateUtil { - - public static final String FORMAT_YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - public static final String FORMAT_YYYYMMDDHHMMSSSSS = "yyyyMMddhhmmssSSS"; - public static final String FORMAT_YYYYMMDDHHMMSS = "yyyyMMddhhmmss"; - - public static String getCurrentDate() { - String formatPattern_Short = "yyyyMMddhhmmss"; - SimpleDateFormat format = new SimpleDateFormat(formatPattern_Short); - return format.format(new Date()); - } - - public static String getSeqString() { - SimpleDateFormat fm = new SimpleDateFormat("yyyyMMddHHmmss"); // "yyyyMMdd G - return fm.format(new Date()); - } - - public static Timestamp getCurrentTimestamp() { - return new Timestamp(System.currentTimeMillis()); - } - - /** - * 获取当前时间,格式为 yyyyMMddHHmmss - * - * @return - */ - public static String getCurrentTimeStr(String format) { - format = StringUtils.isBlank(format) ? FORMAT_YYYY_MM_DD_HH_MM_SS : format; - Date now = new Date(); - return date2Str(now, format); - } - - public static String date2Str(Date date) { - return date2Str(date, FORMAT_YYYY_MM_DD_HH_MM_SS); - } - - /** - * 时间转换成 Date 类型 - * - * @param date - * @param format - * @return - */ - public static String date2Str(Date date, String format) { - if ((format == null) || format.equals("")) { - format = FORMAT_YYYY_MM_DD_HH_MM_SS; - } - SimpleDateFormat sdf = new SimpleDateFormat(format); - if (date != null) { - return sdf.format(date); - } - return ""; - } - - /** - * 获取批量付款预约时间 - * @return - */ - public static String getRevTime() { - Date date = new Date(); - Calendar cal = Calendar.getInstance(); - cal.setTime(date); - cal.add(Calendar.DATE, 1); - String dateString = new SimpleDateFormat(DateUtil.FORMAT_YYYYMMDDHHMMSS).format(cal.getTime()); - System.out.println(dateString); - return dateString; - } - - /** - * 时间比较 - * @param date1 - * @param date2 - * @return DATE1>DATE2返回1,DATE1 dt2.getTime()) { - return 1; - } else if (dt1.getTime() < dt2.getTime()) { - return -1; - } else { - return 0; - } - } catch (Exception exception) { - exception.printStackTrace(); - } - return 0; - } - - /** - * 把给定的时间减掉给定的分钟数 - * @param date - * @param minute - * @return - */ - public static Date minusDateByMinute(Date date, int minute) { - Date newDate = new Date(date.getTime() - (minute * 60 * 1000)); - return newDate; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/DateUtils.java b/xxpay-common/src/main/java/org/xxpay/common/util/DateUtils.java deleted file mode 100644 index 46e52c09e31d85cd2532668b2e8ad35fa5793ffd..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/DateUtils.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.xxpay.common.util; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * 时间格式化工具 - * Created by admin on 2016/5/4. - */ -public class DateUtils { - - private static final String DEFAULT_CONVERT_PATTERN = "yyyyMMddHHmmssSSS"; - - /** - * 获取当前时间字符串(默认格式:yyyyMMddHHmmssSSS) - * - * @return - */ - public static String getCurrentTimeStrDefault() { - return getCurrentTimeStr(DEFAULT_CONVERT_PATTERN); - } - - /** - * 获取指定时间字符串(默认格式:yyyyMMddHHmmssSSS) - * @param date - * @return - */ - public static String getTimeStrDefault(Date date) { - SimpleDateFormat dateFormat = new SimpleDateFormat(DEFAULT_CONVERT_PATTERN); - return dateFormat.format(date); - } - - /** - * 获取当前时间字符串 - * - * @param pattern 转换格式 - * @return - */ - public static String getCurrentTimeStr(String pattern) { - SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); - return dateFormat.format(new Date()); - } - - /** - * 获取指定时间字符串 - * @param date - * @return - */ - public static String getTimeStr(Date date, String pattern) { - SimpleDateFormat dateFormat = new SimpleDateFormat(pattern); - return dateFormat.format(date); - } - - /** - * 判断时间字符串是否为默认格式 - * @param dateTimeStr - * @return - */ - public static boolean isValidDefaultFormat(String dateTimeStr) { - SimpleDateFormat dateFormat = new SimpleDateFormat(DEFAULT_CONVERT_PATTERN); - try { - dateFormat.parse(dateTimeStr); - return true; - } catch (Exception e) { - // 如果抛出异常,说明格式不正确 - return false; - } - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/HttpClient.java b/xxpay-common/src/main/java/org/xxpay/common/util/HttpClient.java deleted file mode 100755 index c229d291d90ed27e01fdffcaa96a682f785fc622..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/HttpClient.java +++ /dev/null @@ -1,555 +0,0 @@ -package org.xxpay.common.util; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.net.ssl.*; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class HttpClient { - - private static final String USER_AGENT_VALUE = - "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)"; - - private static final String JKS_CA_FILENAME = - "tenpay_cacert.jks"; - - private static final String JKS_CA_ALIAS = "tenpay"; - - private static final String JKS_CA_PASSWORD = ""; - - private static Logger _log = LoggerFactory.getLogger(HttpClient.class); - - /** - * ca证书文件 - */ - private File caFile; - - /** - * 证书文件 - */ - private File certFile; - - /** - * 证书密码 - */ - private String certPasswd; - - /** - * 请求内容,无论post和get,都用get方式提供 - */ - private String reqContent; - - /** - * 应答内容 - */ - private String resContent; - - /** - * 请求方法 - */ - private String method; - - /** - * 错误信息 - */ - private String errInfo; - - /** - * 超时时间,以秒为单位 - */ - private int timeOut; - - /** - * http应答编码 - */ - private int responseCode; - - /** - * 字符编码 - */ - private String charset; - - private InputStream inputStream; - - public HttpClient() { - this.caFile = null; - this.certFile = null; - this.certPasswd = ""; - - this.reqContent = ""; - this.resContent = ""; - this.method = "POST"; - this.errInfo = ""; - this.timeOut = 30;//30秒 - - this.responseCode = 0; - this.charset = "UTF-8"; - - this.inputStream = null; - } - - public HttpClient(String url, String method, int timeOut, String charset) { - this.caFile = null; - this.certFile = null; - this.certPasswd = ""; - - this.reqContent = url; - this.resContent = ""; - this.method = method; - this.errInfo = ""; - this.timeOut = timeOut;//30秒 - - this.responseCode = 0; - this.charset = charset; - - this.inputStream = null; - } - - /** - * 设置证书信息 - * - * @param certFile 证书文件 - * @param certPasswd 证书密码 - */ - public void setCertInfo(File certFile, String certPasswd) { - this.certFile = certFile; - this.certPasswd = certPasswd; - } - - /** - * 设置ca - * - * @param caFile - */ - public void setCaInfo(File caFile) { - this.caFile = caFile; - } - - /** - * 设置请求内容 - * - * @param reqContent 表求内容 - */ - public void setReqContent(String reqContent) { - this.reqContent = reqContent; - } - - /** - * 获取结果内容 - * - * @return String - * @throws IOException - */ - public String getResContent() { - try { - this.doResponse(); - } catch (IOException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - //return ""; - } - - return this.resContent; - } - - /** - * 设置请求方法post或者get - * - * @param method 请求方法post/get - */ - public void setMethod(String method) { - this.method = method; - } - - /** - * 获取错误信息 - * - * @return String - */ - public String getErrInfo() { - return this.errInfo; - } - - /** - * 设置超时时间,以秒为单位 - * - * @param timeOut 超时时间,以秒为单位 - */ - public void setTimeOut(int timeOut) { - this.timeOut = timeOut; - } - - /** - * 获取http状态码 - * - * @return int - */ - public int getResponseCode() { - return this.responseCode; - } - - /** - * 执行http调用。true:成功 false:失败 - * - * @return boolean - */ - public boolean call() { - - boolean isRet = false; - - //http - if (null == this.caFile && null == this.certFile) { - try { - this.callHttp(); - isRet = true; - } catch (IOException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (Exception e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } - return isRet; - } - - //https - return calls(); - - } - - public boolean calls() { - - boolean isRet = false; - - //https - try { - this.callHttps(); - isRet = true; - } catch (UnrecoverableKeyException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (KeyManagementException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (CertificateException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (KeyStoreException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (NoSuchAlgorithmException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (IOException e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } catch (Exception e) { - _log.error("", e); - this.errInfo = e.getMessage(); - } - return isRet; - - } - - protected void callHttp() throws IOException { - - if ("POST".equals(this.method.toUpperCase())) { - String url = HttpClientUtil.getURL(this.reqContent); - String queryString = HttpClientUtil.getQueryString(this.reqContent); - byte[] postData = queryString.getBytes(this.charset); - this.httpPostMethod(url, postData); - - return; - } - - this.httpGetMethod(this.reqContent); - - } - - protected void callHttps() throws IOException, CertificateException, - KeyStoreException, NoSuchAlgorithmException, - UnrecoverableKeyException, KeyManagementException { - - // ca目录 - /*String caPath = this.caFile.getParent(); - - File jksCAFile = new File(caPath + "/" - + HttpClient.JKS_CA_FILENAME); - if (!jksCAFile.isFile()) { - X509Certificate cert = (X509Certificate) HttpClientUtil - .getCertificate(this.caFile); - - FileOutputStream out = new FileOutputStream(jksCAFile); - - // store jks file - HttpClientUtil.storeCACert(cert, HttpClient.JKS_CA_ALIAS, - HttpClient.JKS_CA_PASSWORD, out); - - out.close(); - - } - - FileInputStream trustStream = new FileInputStream(jksCAFile); - FileInputStream keyStream = new FileInputStream(this.certFile);*/ - - /*SSLContext sslContext = HttpClientUtil.getSSLContext(trustStream, - HttpClient.JKS_CA_PASSWORD, keyStream, this.certPasswd);*/ - - SSLContext sslContext = SSLContext.getInstance("SSL"); - sslContext.init(null, new TrustManager[]{new TrustAnyTrustManager()}, - new java.security.SecureRandom()); - - //关闭流 - //keyStream.close(); - //trustStream.close(); - - if ("POST".equals(this.method.toUpperCase())) { - String url = HttpClientUtil.getURL(this.reqContent); - String queryString = HttpClientUtil.getQueryString(this.reqContent); - byte[] postData = queryString.getBytes(this.charset); - - this.httpsPostMethod(url, postData, sslContext); - - return; - } - - this.httpsGetMethod(this.reqContent, sslContext); - - } - - /** - * 以http post方式通信 - * - * @param url - * @param postData - * @throws IOException - */ - protected void httpPostMethod(String url, byte[] postData) - throws IOException { - - HttpURLConnection conn = HttpClientUtil.getHttpURLConnection(url); - - this.doPost(conn, postData); - } - - /** - * 以http get方式通信 - * - * @param url - * @throws IOException - */ - protected void httpGetMethod(String url) throws IOException { - - HttpURLConnection httpConnection = - HttpClientUtil.getHttpURLConnection(url); - - this.setHttpRequest(httpConnection); - - httpConnection.setRequestMethod("GET"); - - this.responseCode = httpConnection.getResponseCode(); - - this.inputStream = httpConnection.getInputStream(); - - } - - /** - * 以https get方式通信 - * - * @param url - * @param sslContext - * @throws IOException - */ - protected void httpsGetMethod(String url, SSLContext sslContext) - throws IOException { - - SSLSocketFactory sf = sslContext.getSocketFactory(); - - HttpsURLConnection conn = HttpClientUtil.getHttpsURLConnection(url); - - conn.setSSLSocketFactory(sf); - - this.doGet(conn); - - } - - protected void httpsPostMethod(String url, byte[] postData, - SSLContext sslContext) throws IOException { - - SSLSocketFactory sf = sslContext.getSocketFactory(); - - HttpsURLConnection conn = HttpClientUtil.getHttpsURLConnection(url); - - conn.setSSLSocketFactory(sf); - - this.doPost(conn, postData); - - } - - /** - * 设置http请求默认属性 - * - * @param httpConnection - */ - protected void setHttpRequest(HttpURLConnection httpConnection) { - - //设置连接超时时间 - httpConnection.setConnectTimeout(this.timeOut * 1000); - - //User-Agent - httpConnection.setRequestProperty("User-Agent", - HttpClient.USER_AGENT_VALUE); - - //不使用缓存 - httpConnection.setUseCaches(false); - - //允许输入输出 - httpConnection.setDoInput(true); - httpConnection.setDoOutput(true); - - } - - /** - * 处理应答 - * - * @throws IOException - */ - protected void doResponse() throws IOException { - - if (null == this.inputStream) { - return; - } - - //获取应答内容 - this.resContent = HttpClientUtil.InputStreamTOString(this.inputStream, this.charset); - - //关闭输入流 - this.inputStream.close(); - - } - - /** - * post方式处理 - * - * @param conn - * @param postData - * @throws IOException - */ - protected void doPost(HttpURLConnection conn, byte[] postData) - throws IOException { - - // 以post方式通信 - conn.setRequestMethod("POST"); - - // 设置请求默认属性 - this.setHttpRequest(conn); - - // Content-Type - conn.setRequestProperty("Content-Type", - "application/x-www-form-urlencoded"); - - - BufferedOutputStream out = new BufferedOutputStream(conn - .getOutputStream()); - - final int len = 1024; // 1KB - HttpClientUtil.doOutput(out, postData, len); - - - - /*PrintWriter out = new PrintWriter(conn.getOutputStream()); - // 发送请求参数 - out.print(new String(postData)); - // flush输出流的缓冲 - out.flush();*/ - - - // 关闭流 - out.close(); - - // 获取响应返回状态码 - this.responseCode = conn.getResponseCode(); - - // 获取应答输入流 - this.inputStream = conn.getInputStream(); - - } - - /** - * get方式处理 - * - * @param conn - * @throws IOException - */ - protected void doGet(HttpURLConnection conn) throws IOException { - - //以GET方式通信 - conn.setRequestMethod("GET"); - - //设置请求默认属性 - this.setHttpRequest(conn); - - //获取响应返回状态码 - this.responseCode = conn.getResponseCode(); - - //获取应答输入流 - this.inputStream = conn.getInputStream(); - } - - public static String callHttpPost(String url) { - return callHttpPost(url, 60); // 默认超时时间60秒 - } - - public static String callHttpPost(String url, int connect_timeout) { - return callHttpPost(url, connect_timeout, "UTF-8"); // 默认编码 UTF-8 - } - - public static String callHttpPost(String url, int connect_timeout, String encode) { - HttpClient client = new HttpClient(url, "POST", connect_timeout, encode); - client.call(); - return client.getResContent(); - } - - public static String callHttpsPost(String url) { - - HttpClient client = new HttpClient(url, "POST", 60, "UTF-8"); - client.calls(); - return client.getResContent(); - - } - - - private static class TrustAnyTrustManager implements X509TrustManager { - - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[]{}; - } - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/HttpClientUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/HttpClientUtil.java deleted file mode 100755 index 9cb07510c13b06443e5b78440d0e3f1bc808a0ef..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/HttpClientUtil.java +++ /dev/null @@ -1,327 +0,0 @@ -package org.xxpay.common.util; - -import org.slf4j.LoggerFactory; - -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.KeyManagerFactory; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManagerFactory; -import java.io.*; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.*; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class HttpClientUtil { - - public static final String SunX509 = "SunX509"; - public static final String JKS = "JKS"; - public static final String PKCS12 = "PKCS12"; - public static final String TLS = "TLS"; - - private static final String encoding = "UTF-8"; - - private static final org.slf4j.Logger logger = LoggerFactory.getLogger(HttpClientUtil.class); - - /** - * get HttpURLConnection - * @param strUrl url地址 - * @return HttpURLConnection - * @throws IOException - */ - public static HttpURLConnection getHttpURLConnection(String strUrl) - throws IOException { - URL url = new URL(strUrl); - HttpURLConnection httpURLConnection = (HttpURLConnection) url - .openConnection(); - return httpURLConnection; - } - - /** - * get HttpsURLConnection - * @param strUrl url地址 - * @return HttpsURLConnection - * @throws IOException - */ - public static HttpsURLConnection getHttpsURLConnection(String strUrl) - throws IOException { - URL url = new URL(strUrl); - HttpsURLConnection httpsURLConnection = (HttpsURLConnection) url - .openConnection(); - return httpsURLConnection; - } - - /** - * 获取不带查询串的url - * @param strUrl - * @return String - */ - public static String getURL(String strUrl) { - - if(null != strUrl) { - int indexOf = strUrl.indexOf("?"); - if(-1 != indexOf) { - return strUrl.substring(0, indexOf); - } - - return strUrl; - } - - return strUrl; - - } - - /** - * 获取查询串 - * @param strUrl - * @return String - */ - public static String getQueryString(String strUrl) { - - if(null != strUrl) { - int indexOf = strUrl.indexOf("?"); - if(-1 != indexOf) { - return strUrl.substring(indexOf+1, strUrl.length()); - } - return ""; - } - - return strUrl; - } - - /** - * 查询字符串转换成Map
- * name1=key1&name2=key2&... - * @param queryString - * @return - */ - public static Map queryString2Map(String queryString) { - if(null == queryString || "".equals(queryString)) { - return null; - } - - Map m = new HashMap(); - String[] strArray = queryString.split("&"); - for(int index = 0; index < strArray.length; index++) { - String pair = strArray[index]; - HttpClientUtil.putMapByPair(pair, m); - } - - return m; - - } - - /** - * 把键值添加至Map
- * pair:name=value - * @param pair name=value - * @param m - */ - public static void putMapByPair(String pair, Map m) { - - if(null == pair || "".equals(pair)) { - return; - } - - int indexOf = pair.indexOf("="); - if(-1 != indexOf) { - String k = pair.substring(0, indexOf); - String v = pair.substring(indexOf+1, pair.length()); - if(null != k && !"".equals(k)) { - m.put(k, v); - } - } else { - m.put(pair, ""); - } - } - - /** - * BufferedReader转换成String
- * 注意:流关闭需要自行处理 - * @param reader - * @return String - * @throws IOException - */ - public static String bufferedReader2String(BufferedReader reader) throws IOException { - StringBuffer buf = new StringBuffer(); - String line = null; - while( (line = reader.readLine()) != null) { - buf.append(line); - buf.append("\r\n"); - } - - return buf.toString(); - } - - /** - * 处理输出
- * 注意:流关闭需要自行处理 - * @param out - * @param data - * @param len - * @throws IOException - */ - public static void doOutput(OutputStream out, byte[] data, int len) - throws IOException { - int dataLen = data.length; - int off = 0; - while (off < data.length) { - if (len >= dataLen) { - out.write(data, off, dataLen); - off += dataLen; - } else { - out.write(data, off, len); - off += len; - dataLen -= len; - } - - // 刷新缓冲区 - out.flush(); - } - - } - - /** - * 获取SSLContext - * @param trustPasswd - * @param keyPasswd - * @return - * @throws NoSuchAlgorithmException - * @throws KeyStoreException - * @throws IOException - * @throws CertificateException - * @throws UnrecoverableKeyException - * @throws KeyManagementException - */ - public static SSLContext getSSLContext( - FileInputStream trustFileInputStream, String trustPasswd, - FileInputStream keyFileInputStream, String keyPasswd) - throws NoSuchAlgorithmException, KeyStoreException, - CertificateException, IOException, UnrecoverableKeyException, - KeyManagementException { - - // ca - TrustManagerFactory tmf = TrustManagerFactory.getInstance(HttpClientUtil.SunX509); - KeyStore trustKeyStore = KeyStore.getInstance(HttpClientUtil.JKS); - trustKeyStore.load(trustFileInputStream, HttpClientUtil - .str2CharArray(trustPasswd)); - tmf.init(trustKeyStore); - - final char[] kp = HttpClientUtil.str2CharArray(keyPasswd); - KeyManagerFactory kmf = KeyManagerFactory.getInstance(HttpClientUtil.SunX509); - KeyStore ks = KeyStore.getInstance(HttpClientUtil.PKCS12); - ks.load(keyFileInputStream, kp); - kmf.init(ks, kp); - - SecureRandom rand = new SecureRandom(); - SSLContext ctx = SSLContext.getInstance(HttpClientUtil.TLS); - ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), rand); - - return ctx; - } - - /** - * 获取CA证书信息 - * @param cafile CA证书文件 - * @return Certificate - * @throws CertificateException - * @throws IOException - */ - public static Certificate getCertificate(File cafile) - throws CertificateException, IOException { - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - FileInputStream in = new FileInputStream(cafile); - Certificate cert = cf.generateCertificate(in); - in.close(); - return cert; - } - - /** - * 字符串转换成char数组 - * @param str - * @return char[] - */ - public static char[] str2CharArray(String str) { - if(null == str) return null; - - return str.toCharArray(); - } - - /** - * 存储ca证书成JKS格式 - * @param cert - * @param alias - * @param password - * @param out - * @throws KeyStoreException - * @throws NoSuchAlgorithmException - * @throws CertificateException - * @throws IOException - */ - public static void storeCACert(Certificate cert, String alias, - String password, OutputStream out) throws KeyStoreException, - NoSuchAlgorithmException, CertificateException, IOException { - KeyStore ks = KeyStore.getInstance("JKS"); - - ks.load(null, null); - - ks.setCertificateEntry(alias, cert); - - // store keystore - ks.store(out, HttpClientUtil.str2CharArray(password)); - - } - - public static InputStream String2Inputstream(String str) { - return new ByteArrayInputStream(str.getBytes()); - } - - /** - * InputStream转换成Byte - * 注意:流关闭需要自行处理 - * @param in - * @return byte - * @throws Exception - */ - public static byte[] InputStreamTOByte(InputStream in) throws IOException{ - - int BUFFER_SIZE = 4096; - ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - byte[] data = new byte[BUFFER_SIZE]; - int count = -1; - - while((count = in.read(data,0,BUFFER_SIZE)) != -1) - outStream.write(data, 0, count); - - data = null; - byte[] outByte = outStream.toByteArray(); - outStream.close(); - - return outByte; - } - - /** - * InputStream转换成String - * 注意:流关闭需要自行处理 - * @param in - * @param encoding 编码 - * @return String - * @throws Exception - */ - public static String InputStreamTOString(InputStream in,String encoding) throws IOException{ - return new String(InputStreamTOByte(in),encoding); - } - - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/IPUtility.java b/xxpay-common/src/main/java/org/xxpay/common/util/IPUtility.java deleted file mode 100644 index 0e4ebe925f506d7195f7e0357833e59c5d0ac97d..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/IPUtility.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.xxpay.common.util; - -import java.net.*; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.List; - -/** - * @Description: IP地址工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class IPUtility { - - /** - * getLocalhostIp(获取本机ip地址) - * @throws UnknownHostException - * @Exception 异常对象 - * @since CodingExample Ver(编码范例查看) 1.1 - */ - public static String getLocalhostIp() { - String ip = ""; - try { - ip = InetAddress.getLocalHost().getHostAddress(); - } catch (Exception e) { - return null; - } - return ip; - } - - public static List getIpAddrs() throws Exception { - List IPs = new ArrayList(); - Enumeration allNetInterfaces = null; - allNetInterfaces = NetworkInterface.getNetworkInterfaces(); - InetAddress ip = null; - while (allNetInterfaces.hasMoreElements()) { - NetworkInterface netInterface = (NetworkInterface) allNetInterfaces.nextElement(); - Enumeration addresses = netInterface.getInetAddresses(); - while (addresses.hasMoreElements()) { - ip = (InetAddress) addresses.nextElement(); - if (ip != null && ip instanceof Inet4Address && ip.getHostAddress().indexOf(".") != -1) { - IPs.add(ip.getHostAddress()); - } - } - } - return IPs; - } - - /** - * 兼容Linux系统 - * @return - */ - public static String getLocalIP() { - String ip = ""; - try { - Enumeration e1 = (Enumeration) NetworkInterface - .getNetworkInterfaces(); - while (e1.hasMoreElements()) { - NetworkInterface ni = (NetworkInterface) e1.nextElement(); - Enumeration e2 = ni.getInetAddresses(); - while (e2.hasMoreElements()) { - InetAddress ia = (InetAddress) e2.nextElement(); - if (ia instanceof Inet6Address) - continue; - if (!ia.isLoopbackAddress()) { - ip = ia.getHostAddress(); - break; - } - } - } - } catch (SocketException e) { - e.printStackTrace(); - return ""; - } - return ip; - } - - public static void main(String[] args) throws Exception { - System.out.println(IPUtility.getLocalIP()); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/JsonUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/JsonUtil.java deleted file mode 100644 index 133a438f2a3a484e0897dedd96cb93ddd7543dd1..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/JsonUtil.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.common.util; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; - -import java.util.List; - -/** - * Created by admin on 2016/4/13. - */ -public class JsonUtil { - - static { - System.setProperty("fastjson.compatibleWithJavaBean", "true"); - } - - public static String object2Json(Object object) { - if (object == null) { - return null; - } - return JSONObject.toJSONString(object); - } - - public static T getObjectFromJson(String json, Class clazz) { - if (json == null) { - return null; - } - return JSON.parseObject(json, clazz); - } - - public static List getObjectListFromJson(String json, Class clazz) { - if (json == null) { - return null; - } - return JSON.parseArray(json, clazz); - } - - public static JSONObject getJSONObjectFromJson(String json) { - if (json == null) { - return null; - } - return JSONObject.parseObject(json); - } - - public static JSONObject getJSONObjectFromObj(Object object) { - if (object == null) { - return null; - } - return (JSONObject) JSONObject.toJSON(object); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MyBase64.java b/xxpay-common/src/main/java/org/xxpay/common/util/MyBase64.java deleted file mode 100755 index b59ed63d0a0ea815335faddf3fdef7e4bb95684f..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MyBase64.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.xxpay.common.util; - -/** - * @Description: base64编码解码工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class MyBase64 { - public final static String encode(byte[] src, int startIndex, int srclen) { - if (src == null) return null; - if (startIndex+srclen>src.length) srclen = src.length-startIndex; - byte src2[] = new byte[srclen]; - System.arraycopy(src, startIndex, src2, 0, srclen); - return encode(src2); - } - - public final static String encode(byte[] src, int srclen) { - if (src == null) return null; - if (srclen>src.length) srclen = src.length; - byte data[] = new byte[srclen+2]; - System.arraycopy(src, 0, data, 0, srclen); - byte dest[] = new byte[(data.length/3)*4]; - // 3-byte to 4-byte conversion - for (int sidx = 0, didx=0; sidx < srclen; sidx += 3, didx += 4) { - dest[didx] = (byte) ((data[sidx] >>> 2) & 077); - dest[didx+1] = (byte) ((data[sidx+1] >>> 4) & 017 | (data[sidx] << 4) & 077); - dest[didx+2] = (byte) ((data[sidx+2] >>> 6) & 003 | (data[sidx+1] << 2) & 077); - dest[didx+3] = (byte) (data[sidx+2] & 077); - } - - // 0-63 to ascii printable conversion - for (int idx = 0; idx (srclen*4)/3; idx--) { - dest[idx] = (byte)'='; - } - return new String(dest); - } - - public final static String encode(byte[] d) { - return encode(d, d.length); - } - /** 每64字符后,换行 */ - public static String encode_64(byte[] bin) throws Exception { - String b64 = MyBase64.encode(bin); - StringBuffer sb = new StringBuffer(); - for(int offset=0; offset < b64.length(); offset+=64) { - int idx_begin = offset; - int idx_end = Math.min(offset+64, b64.length()); - String s = b64.substring(idx_begin, idx_end); - sb.append(s).append('\n'); - //if (withDebug) debug(idx_begin+"..."+idx_end); - } - b64 = sb.toString(); - return b64; - } - - public final static byte[] decode(String str) { - if (str == null) return new byte[0]; - str = str.trim(); //TODO 去掉结尾空格,但还不彻底,可考虑进一步改善。。。 - if (str.length()==0) return new byte[0]; - return decode(str.getBytes()); - } - private final static byte[] decode(byte[] data) { - int tail = data.length; - while (data[tail-1] == '=') tail--; //去掉结尾的等号 - byte dest[] = new byte[tail - data.length/4]; - for(int i = 0; i >> 4) & 3) ); - dest[didx+1] = (byte) ( ((data[sidx+1] << 4) & 255) | ((data[sidx+2] >>> 2) & 017) ); - dest[didx+2] = (byte) ( ((data[sidx+2] << 6) & 255) | ( data[sidx+3] & 077) ); - } - if (didx < dest.length) { - dest[didx] = (byte) ( ((data[sidx] << 2) & 255) | ((data[sidx+1] >>> 4) & 3) ); - } - if (++didx < dest.length) { - dest[didx] = (byte) ( ((data[sidx+1] << 4) & 255) | ((data[sidx+2] >>> 2) & 017) ); - } - return dest; - } - private final static byte decode_pre_byte(byte b0) { //重构。。。 - byte b = 0; - if (b0 >= '0' && b0 <= '9') b = (byte)(b0 - ('0' - 52)); - else if (b0 >= 'a' && b0 <= 'z') b = (byte)(b0 - ('a' - 26)); - else if (b0 >= 'A' && b0 <= 'Z') b = (byte)(b0 - 'A'); - else if (b0 == '=') b = 0; - else if (b0 == '+') b = 62; - else if (b0 == '/') b = 63; - return b; - } - /** - * A simple test.cache that encodes and decodes the first commandline argument. - */ - public final static void main(String args[]) throws Exception { - String s = "xxpay做最好的开源聚合支付系统"; - System.out.println(MyBase64.encode(s.getBytes())); - } -} \ No newline at end of file diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MyLog.java b/xxpay-common/src/main/java/org/xxpay/common/util/MyLog.java deleted file mode 100644 index 0e0d0d8f339a21063ddf01cf80e620ae791bd162..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MyLog.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay.common.util; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -/** - * Created by admin on 2016/4/27. - */ -public class MyLog extends MyLogFace { - - private static final Map _pool = new HashMap(); - //---------- - public static synchronized Set getLoggers() { - return _pool.keySet(); - } - public static synchronized void clearLoggers() { - _pool.clear(); - } - //---------- - public static synchronized MyLog getLog(String clz) { - MyLog log = _pool.get(clz); - if (log==null) { - log = new MyLog(); - log.setName(clz); - _pool.put(clz, log); - } - return log; - } - //---------- - public static MyLog getLog(Class clz){ - return getLog(clz.getName()); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MyLogFace.java b/xxpay-common/src/main/java/org/xxpay/common/util/MyLogFace.java deleted file mode 100644 index 54ac6196130f1c8c7dcd1a95daaefeff5bdba463..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MyLogFace.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.xxpay.common.util; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class MyLogFace implements MyLogInf { - - private org.slf4j.Logger _log = null; - public void setName(String clz) { _log = org.slf4j.LoggerFactory.getLogger(clz); } - - public boolean isDebugEnabled() { return _log.isDebugEnabled(); } - public boolean isInfoEnabled() { return _log.isInfoEnabled(); } - public boolean isWarnEnabled() { return _log.isWarnEnabled(); } - public boolean isErrorEnabled() { return _log.isErrorEnabled(); } - public boolean isTraceEnabled() { return _log.isTraceEnabled(); } - - public void trace(String message, Object... args) { - if (this.isTraceEnabled()) _log.trace(message, args); - } - - public void debug(String message, Object... args) { - if (this.isDebugEnabled()) _log.debug(message, args); - } - - public void info(String message, Object... args) { - if (this.isInfoEnabled()) _log.info(message, args); - } - - public void warn(String message, Object... args) { - if (this.isWarnEnabled()) _log.warn(message, args); - } - - public void error(String message, Object... args) { - if (this.isErrorEnabled()) _log.error(message, args); - } - - public void error(Throwable e, String message, Object... args) { - if (this.isErrorEnabled()) _log.error(String.format(message, args), e); - } - //------------------ - public void error(Throwable e, String message) {//简化版 - if (this.isErrorEnabled()) _log.error(message+e.toString(), e); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MyLogInf.java b/xxpay-common/src/main/java/org/xxpay/common/util/MyLogInf.java deleted file mode 100644 index 8e4cef96ec868420de78697781fba60319acc9b9..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MyLogInf.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.xxpay.common.util; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public abstract interface MyLogInf { - - public abstract void debug(String paramString, Object[] paramArrayOfObject); - - public abstract void info(String paramString, Object[] paramArrayOfObject); - - public abstract void warn(String paramString, Object[] paramArrayOfObject); - - public abstract void error(Throwable paramThrowable, String paramString, Object[] paramArrayOfObject); -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MyProperties.java b/xxpay-common/src/main/java/org/xxpay/common/util/MyProperties.java deleted file mode 100644 index a406467c630d299bce02a56db9b1ff4251061509..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MyProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.xxpay.common.util; - -import java.util.Date; -import java.util.HashMap; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * @Description: 属性文件工具类,支持缓存及刷新 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class MyProperties { - - private static HashMap configMap = new HashMap(); - - private Date loadTime = null; - private ResourceBundle rb = null; - private static final String CONFIG_FILE = "properties"; - private static final long CONFIG_CACHE_TIME = 60 * 1000; // 缓存1分钟 - - private MyProperties(String name) { - this.loadTime = new Date(); - this.rb = ResourceBundle.getBundle(name); - } - - public static synchronized MyProperties getInstance(String name) { - MyProperties conf = configMap.get(name); - if (null == conf) { - conf = new MyProperties(name); - configMap.put(name, conf); - return conf; - } - if (new Date().getTime() - conf.getLoadTime().getTime() > CONFIG_CACHE_TIME) { - conf = new MyProperties(name); - configMap.put(name, conf); - return conf; - } - return conf; - } - - public static synchronized MyProperties getInstance() { - return getInstance("config"); - } - - public Date getLoadTime() { - return loadTime; - } - - public String getValue(String key) { - try { - String v = rb.getString(key); - return v; - }catch (MissingResourceException e) { - return ""; - } - } - - public boolean getBool(String key) { - String v = getValue(key); - if (v.equalsIgnoreCase("true")) - return true; - return false; - } - - public int getInt(String key) { - String v = getValue(key); - return Integer.parseInt(v); - } - - public long getLong(String key) { - String v = getValue(key); - return Long.parseLong(v); - } - - public static void main(String[] args) throws InterruptedException { - for (int i=0; i<10; i++) { - String v = MyProperties.getInstance("common").getValue("jdbc.jndi.name"); - Thread.sleep(1000 * 30); - } - - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/MySeq.java b/xxpay-common/src/main/java/org/xxpay/common/util/MySeq.java deleted file mode 100644 index 1e8dfbb6338a9578ec60e59465c630b92c356943..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/MySeq.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.xxpay.common.util; - - -import java.util.concurrent.atomic.AtomicLong; - -/** - * @Description: 生成全局唯一序列号工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class MySeq { - - private static AtomicLong pay_seq = new AtomicLong(0L); - private static String pay_seq_prefix = "P"; - private static AtomicLong trans_seq = new AtomicLong(0L); - private static String trans_seq_prefix = "T"; - private static AtomicLong refund_seq = new AtomicLong(0L); - private static String refund_seq_prefix = "R"; - - private static String node = "00"; - static { - try { - //URL url = Thread.currentThread().getContextClassLoader().getResource("config" + File.separator + "system.properties"); - //Properties properties = new Properties(); - //properties.load(url.openStream()); - //node = properties.getProperty(ConfigEnum.SERVER_NAME.getKey()); - }catch (Exception e) { - e.printStackTrace(); - } - } - - public static String getPay() { - return getSeq(pay_seq_prefix, pay_seq); - } - - public static String getTrans() { - return getSeq(trans_seq_prefix, trans_seq); - } - - public static String getRefund() { - return getSeq(refund_seq_prefix, refund_seq); - } - - private static String getSeq(String prefix, AtomicLong seq) { - prefix += node; - return String.format("%s%s%06d", prefix, DateUtil.getSeqString(), (int) seq.getAndIncrement() % 1000000); - } - - public static void main(String[] args) { - for (int i = 0; i < 100; i++) { - System.out.println("pay=" + getPay()); - System.out.println("trans=" + getTrans()); - System.out.println("refund=" + getRefund()); - } - - } - -} \ No newline at end of file diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/ObjectValidUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/ObjectValidUtil.java deleted file mode 100644 index e9ae65af5adcca36a3252c45c86b1b75374e4467..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/ObjectValidUtil.java +++ /dev/null @@ -1,230 +0,0 @@ -package org.xxpay.common.util; - - -import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang3.StringUtils; - -import java.math.BigDecimal; -import java.util.List; -import java.util.Map; - -/** - * Created by admin on 2016/6/23. - */ -public class ObjectValidUtil { - - public static boolean isValid(Object... objs) { - if (objs == null || objs.length < 1) { - return false; - } - - for (Object obj : objs) { - if (obj instanceof Short) { - if (isNull(obj)) { - return false; - } - } else if (obj instanceof Integer) { - if (isInvalidInteger((Integer) obj)) { - return false; - } - } else if (obj instanceof Long) { - if (isInvalidLong((Long) obj)) { - return false; - } - } else if (obj instanceof String) { - if (isInvalidString(obj.toString())) { - return false; - } - } else if (obj instanceof List) { - if (CollectionUtils.isEmpty((List) obj)) { - return false; - } - } else if (obj instanceof Map) { - if (isNull(obj) || ((Map) obj).isEmpty()) { - return false; - } - } else { - if (isNull(obj)) { - return false; - } - } - } - return true; - } - - public static boolean isInvalid(Object... objs) { - return !isValid(objs); - } - - /** - * 判断是否为有效Short值 - * @param num - * @return - */ - public static boolean isValidShort(Short num) { - if (num == null || num.compareTo((short) 0) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidShort(Short num) { - return !isValidShort(num); - } - - /** - * 判断是否为有效Integer值 - * @param num - * @return - */ - public static boolean isValidInteger(Integer num) { - if (num == null || num.compareTo(0) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidInteger(Integer num) { - return !isValidInteger(num); - } - - /** - * 判断是否为有效Long值 - * @param num - * @return - */ - public static boolean isValidLong(Long num) { - if (num == null || num.compareTo(0L) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidLong(Long num) { - return !isValidLong(num); - } - - /** - * 判断是否为有效BigDecimal值 - * @param num - * @return - */ - public static boolean isValidBigDecimal(BigDecimal num) { - if (num == null || num.compareTo(BigDecimal.ZERO) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidBigDecimal(BigDecimal num) { - return !isValidBigDecimal(num); - } - - /** - * 判断是否为有效String值 - * @param str - * @return - */ - public static boolean isValidString(String str) { - return StringUtils.isNotBlank(str); - } - - public static boolean isInvalidString(String str) { - return StringUtils.isBlank(str); - } - - public static boolean isNull(Object obj) { - if (obj == null) { - return true; - } - return false; - } - - public static boolean isNotNull(Object obj) { - return !isNull(obj); - } - - public static boolean isValidCurPage(Integer curPage) { - if (curPage == null) { - return false; - } - if (curPage.compareTo(1) < 0) { - return false; - } - return true; - } - - public static boolean isValidCurPage(Long curPage) { - if (curPage == null) { - return false; - } - if (curPage.compareTo(1L) < 0) { - return false; - } - return true; - } - - public static boolean isInvalidCurPage(Integer curPage) { - return !isValidCurPage(curPage); - } - - public static boolean isInvalidCurPage(Long curPage) { - return !isValidCurPage(curPage); - } - - public static boolean isValidViewNumber(Integer viewNumber) { - if (viewNumber == null) { - return false; - } - if (viewNumber.compareTo(0) <= 0) { - return false; - } - return true; - } - - public static boolean isValidViewNumber(Long viewNumber) { - if (viewNumber == null) { - return false; - } - if (viewNumber.compareTo(0L) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidViewNumber(Integer viewNumber) { - return !isValidViewNumber(viewNumber); - } - - public static boolean isInvalidViewNumber(Long viewNumber) { - return !isValidViewNumber(viewNumber); - } - - public static boolean isValidLimit(Integer limit) { - if (limit == null) { - return false; - } - if (limit.compareTo(0) <= 0) { - return false; - } - return true; - } - - public static boolean isInvalidLimit(Integer limit) { - return !isValidLimit(limit); - } - - public static boolean isAllNull(Object... objs) { - if (objs == null || objs.length < 1) { - return true; - } - int nullcount = 0; - for (Object obj : objs) { - if (isNull(obj)) { - nullcount++; - } - } - return objs.length == nullcount; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/PayDigestUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/PayDigestUtil.java deleted file mode 100644 index 588d209ede01ef24b8b46c6b7a462e568cb7b365..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/PayDigestUtil.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.xxpay.common.util; - -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Field; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class PayDigestUtil { - - private static final MyLog _log = MyLog.getLog(PayDigestUtil.class); - private static String encodingCharset = "UTF-8"; - - /** - * @param aValue - * @param aKey - * @return - */ - public static String hmacSign(String aValue, String aKey) { - byte k_ipad[] = new byte[64]; - byte k_opad[] = new byte[64]; - byte keyb[]; - byte value[]; - try { - keyb = aKey.getBytes(encodingCharset); - value = aValue.getBytes(encodingCharset); - } catch (UnsupportedEncodingException e) { - keyb = aKey.getBytes(); - value = aValue.getBytes(); - } - - Arrays.fill(k_ipad, keyb.length, 64, (byte) 54); - Arrays.fill(k_opad, keyb.length, 64, (byte) 92); - for (int i = 0; i < keyb.length; i++) { - k_ipad[i] = (byte) (keyb[i] ^ 0x36); - k_opad[i] = (byte) (keyb[i] ^ 0x5c); - } - - MessageDigest md = null; - try { - md = MessageDigest.getInstance("MD5"); - } catch (NoSuchAlgorithmException e) { - - return null; - } - md.update(k_ipad); - md.update(value); - byte dg[] = md.digest(); - md.reset(); - md.update(k_opad); - md.update(dg, 0, 16); - dg = md.digest(); - return toHex(dg); - } - - public static String toHex(byte input[]) { - if (input == null) - return null; - StringBuffer output = new StringBuffer(input.length * 2); - for (int i = 0; i < input.length; i++) { - int current = input[i] & 0xff; - if (current < 16) - output.append("0"); - output.append(Integer.toString(current, 16)); - } - - return output.toString(); - } - - /** - * - * @param args - * @param key - * @return - */ - public static String getHmac(String[] args, String key) { - if (args == null || args.length == 0) { - return (null); - } - StringBuffer str = new StringBuffer(); - for (int i = 0; i < args.length; i++) { - str.append(args[i]); - } - return (hmacSign(str.toString(), key)); - } - - /** - * @param aValue - * @return - */ - public static String digest(String aValue) { - aValue = aValue.trim(); - byte value[]; - try { - value = aValue.getBytes(encodingCharset); - } catch (UnsupportedEncodingException e) { - value = aValue.getBytes(); - } - MessageDigest md = null; - try { - md = MessageDigest.getInstance("SHA"); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - return null; - } - return toHex(md.digest(value)); - - } - - public static String md5(String value, String charset) { - MessageDigest md = null; - try { - byte[] data = value.getBytes(charset); - md = MessageDigest.getInstance("MD5"); - byte[] digestData = md.digest(data); - return toHex(digestData); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - return null; - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - return null; - } - } - - public static String getSign(Object o, String key) throws IllegalAccessException { - if(o instanceof Map) { - return getSign((Map)o, key); - } - ArrayList list = new ArrayList(); - Class cls = o.getClass(); - Field[] fields = cls.getDeclaredFields(); - for (Field f : fields) { - f.setAccessible(true); - if (f.get(o) != null && !"".equals(f.get(o))) { - list.add(f.getName() + "=" + f.get(o) + "&"); - } - } - int size = list.size(); - String [] arrayToSort = list.toArray(new String[size]); - Arrays.sort(arrayToSort, String.CASE_INSENSITIVE_ORDER); - StringBuilder sb = new StringBuilder(); - for(int i = 0; i < size; i ++) { - sb.append(arrayToSort[i]); - } - String result = sb.toString(); - result += "key=" + key; - _log.debug("Sign Before MD5:" + result); - result = md5(result, encodingCharset).toUpperCase(); - _log.debug("Sign Result:" + result); - return result; - } - - public static String getSign(Map map, String key){ - ArrayList list = new ArrayList(); - for(Map.Entry entry:map.entrySet()){ - if(!"".equals(entry.getValue()) && null != entry.getValue()){ - list.add(entry.getKey() + "=" + entry.getValue() + "&"); - } - } - int size = list.size(); - String [] arrayToSort = list.toArray(new String[size]); - Arrays.sort(arrayToSort, String.CASE_INSENSITIVE_ORDER); - StringBuilder sb = new StringBuilder(); - for(int i = 0; i < size; i ++) { - sb.append(arrayToSort[i]); - } - String result = sb.toString(); - result += "key=" + key; - _log.debug("Sign Before MD5:" + result); - result = md5(result, encodingCharset).toUpperCase(); - _log.debug("Sign Result:" + result); - return result; - } - - /** - * - * @param map - * @param key - * @param notContains 不包含的签名字段 - * @return - */ - public static String getSign(Map map, String key, String... notContains){ - Map newMap = new HashMap(); - for(Map.Entry entry:map.entrySet()){ - boolean isContain = false; - for(int i=0; i randomStrMap = new ConcurrentHashMap(); - - private static final String[] BASE_STRING = new String[]{ - "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", - "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", - "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", - "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", - "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", - "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" - }; - - private static final int RANDOM_STRING_LENGTH = 6; - - private RandomStrUtils() { - } - - public static RandomStrUtils getInstance() { - synchronized (lock) { - if (instance == null) { - instance = new RandomStrUtils(); - } - } - return instance; - } - - public String getRandomString() { - Long nowTime = System.currentTimeMillis(); - String randomStr = null; - - synchronized (lock) { - // 生成随机字符串 - randomStr = createRandomString(RANDOM_STRING_LENGTH, nowTime); - - // 删除一分钟前的随机字符串 - Iterator> it = randomStrMap.entrySet().iterator(); - while (it.hasNext()) { - Map.Entry entry = it.next(); - Long value = entry.getValue(); - if (nowTime - value > Constant.RPC_SEQ_NO_NOT_REPEAT_INTERVAL) { - it.remove(); - } - } - } - - return randomStr; - } - - private String createRandomString(int len, Long nowTime) { - Random random = new Random(); - int length = BASE_STRING.length; - String randomString = ""; - for (int i = 0; i < length; i++) { - randomString += BASE_STRING[random.nextInt(length)]; - } - random = new Random(System.currentTimeMillis()); - String resultStr = ""; - for (int i = 0; i < len; i++) { - resultStr += randomString.charAt(random.nextInt(randomString.length() - 1)); - } - - // 判断一分钟内是否重复 - Long randomStrCreateTime = randomStrMap.get(resultStr); - if (randomStrCreateTime != null && - nowTime - randomStrCreateTime < Constant.RPC_SEQ_NO_NOT_REPEAT_INTERVAL) { - resultStr = createRandomString(len, nowTime); - } - randomStrMap.put(resultStr, nowTime); - return resultStr; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/RpcSignUtils.java b/xxpay-common/src/main/java/org/xxpay/common/util/RpcSignUtils.java deleted file mode 100644 index b46bc6f847f6497b2f835714aae8b19640268f8c..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/RpcSignUtils.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay.common.util; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -/** - * RPC通讯层签名工具类 - * Created by admin on 2016/5/3. - */ -public class RpcSignUtils { - - public static String sha1(String decript) { - try { - MessageDigest digest = MessageDigest - .getInstance("SHA-1"); - digest.update(decript.getBytes()); - byte messageDigest[] = digest.digest(); - // Create Hex String - StringBuffer hexString = new StringBuffer(); - // 字节数组转换为 十六进制 数 - for (int i = 0; i < messageDigest.length; i++) { - String shaHex = Integer.toHexString(messageDigest[i] & 0xFF); - if (shaHex.length() < 2) { - hexString.append(0); - } - hexString.append(shaHex); - } - return hexString.toString(); - } catch (NoSuchAlgorithmException e) { - e.printStackTrace(); - } - return ""; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/RpcUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/RpcUtil.java deleted file mode 100644 index 2847a780763b839822b57d8aca84d09e775d5fcb..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/RpcUtil.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.xxpay.common.util; - -import org.xxpay.common.constant.Constant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.domain.RpcBaseParam; -import org.xxpay.common.enumm.RetEnum; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -public class RpcUtil { - - public static BaseParam getBaseParam(Map paramMap) { - if (paramMap == null || paramMap.isEmpty()) { - return null; - } - BaseParam baseParam = BeanConvertUtils.map2Bean(paramMap, BaseParam.class); - paramMap.remove("rpcSrcSysId"); - paramMap.remove("rpcDateTime"); - paramMap.remove("rpcSeqNo"); - paramMap.remove("rpcSignType"); - paramMap.remove("rpcSign"); - paramMap.remove("bizSeqNo"); - paramMap.remove("bizSign"); - baseParam.setBizParamMap(paramMap); - return baseParam; - } - - /** - * 构建成功返回结果 - * @param baseParam - * @param obj - * @return - */ - public static Map createBizResult(RpcBaseParam baseParam, Object obj) { - Map resultMap = createResultMap(baseParam, RetEnum.RET_SUCCESS); - resultMap.put(Constant.BIZ_RESULT_KEY, obj); - return resultMap; - } - public static Map createBizResultWithDBError(RpcBaseParam baseParam, Object obj, - String dbErrorCode, String dbErrorMsg) { - Map resultMap = createResultMapWithDBError(baseParam, RetEnum.RET_SUCCESS, dbErrorCode, dbErrorMsg); - resultMap.put(Constant.BIZ_RESULT_KEY, obj); - return resultMap; - } - - /** - * 构建失败返回结果 - * @param rpcBaseParam - * @param retEnum - * @return - */ - public static Map createFailResult(RpcBaseParam rpcBaseParam, RetEnum retEnum) { - if (retEnum == null) { - retEnum = RetEnum.RET_PARAM_NOT_FOUND; - } - return createResultMap(rpcBaseParam, retEnum); - } - - public static Map createFailResultWithDBError(RpcBaseParam rpcBaseParam, RetEnum retEnum, - String dbErrorCode, String dbErrorMsg) { - if (retEnum == null) { - retEnum = RetEnum.RET_PARAM_NOT_FOUND; - } - return createResultMapWithDBError(rpcBaseParam, retEnum, dbErrorCode, dbErrorMsg); - } - - private static Map createResultMap(RpcBaseParam rpcBaseParam, RetEnum retEnum) { - Map resultMap = null; - if (rpcBaseParam != null) { - resultMap = rpcBaseParam.convert2Map(); - } else { - resultMap = new HashMap(); - } - resultMap.put("rpcRetCode", retEnum.getCode()); - resultMap.put("rpcRetMsg", retEnum.getMessage()); - return resultMap; - } - - private static Map createResultMapWithDBError(RpcBaseParam rpcBaseParam, RetEnum retEnum, - String dbErrorCode, String dbErrorMsg) { - Map resultMap = null; - if (rpcBaseParam != null) { - resultMap = rpcBaseParam.convert2Map(); - } else { - resultMap = new HashMap(); - } - resultMap.put("rpcRetCode", retEnum.getCode()); - resultMap.put("rpcRetMsg", retEnum.getMessage()); - resultMap.put("dbErrorCode", dbErrorCode); - resultMap.put("dbErrorMsg", dbErrorMsg); - return resultMap; - } - - public static String createBaseParam(Map paramMap) { - BaseParam baseParam = new BaseParam("102", "rpc-src-sys-vvlive-config-key", Constant.CF_BIZ_SEQUENCE_NO_PREFIX); - baseParam.setBizParamMap(paramMap); - return baseParam.toJson(); - } - - public static String mkRet(Map result) { - //_log.info("调用dal返回result={}", result); - if(result == null) return null; - String retCode = (String)result.get("rpcRetCode"); - if("0000".equals(retCode)) { - if(result.get("bizResult") == null) return null; - return result.get("bizResult").toString(); - } - return null; - } - - public static Boolean isSuccess(Map result) { - if(result == null) return false; - String retCode = (String) result.get("rpcRetCode"); - if("0000".equals(retCode) && result.get("bizResult") != null) return true; - return false; - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/StrUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/StrUtil.java deleted file mode 100644 index 327b678b1ebe0fbbf8d8c2c84d586a99eff24454..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/StrUtil.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.xxpay.common.util; - -/** - * @author: dingzhiwei - * @date: 17/11/1 - * @description: - */ -public class StrUtil { - - public static String toString(Object obj) { - return obj == null?"":obj.toString(); - } - - public static String toString(Object obj, String nullStr) { - return obj == null?nullStr:obj.toString(); - } - -} diff --git a/xxpay-common/src/main/java/org/xxpay/common/util/XXPayUtil.java b/xxpay-common/src/main/java/org/xxpay/common/util/XXPayUtil.java deleted file mode 100644 index de1129ffc69af4324599e78b685fb33c9050b392..0000000000000000000000000000000000000000 --- a/xxpay-common/src/main/java/org/xxpay/common/util/XXPayUtil.java +++ /dev/null @@ -1,129 +0,0 @@ -package org.xxpay.common.util; - -import com.alibaba.fastjson.JSON; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.constant.PayEnum; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -/** - * @Description: 支付工具类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class XXPayUtil { - - private static final MyLog _log = MyLog.getLog(XXPayUtil.class); - - public static Map makeRetMap(String retCode, String retMsg, String resCode, String errCode, String errCodeDesc) { - Map retMap = new HashMap(); - if(retCode != null) retMap.put(PayConstant.RETURN_PARAM_RETCODE, retCode); - if(retMsg != null) retMap.put(PayConstant.RETURN_PARAM_RETMSG, retMsg); - if(resCode != null) retMap.put(PayConstant.RESULT_PARAM_RESCODE, resCode); - if(errCode != null) retMap.put(PayConstant.RESULT_PARAM_ERRCODE, errCode); - if(errCodeDesc != null) retMap.put(PayConstant.RESULT_PARAM_ERRCODEDES, errCodeDesc); - return retMap; - } - - public static Map makeRetMap(String retCode, String retMsg, String resCode, PayEnum payEnum) { - Map retMap = new HashMap(); - if(retCode != null) retMap.put(PayConstant.RETURN_PARAM_RETCODE, retCode); - if(retMsg != null) retMap.put(PayConstant.RETURN_PARAM_RETMSG, retMsg); - if(resCode != null) retMap.put(PayConstant.RESULT_PARAM_RESCODE, resCode); - if(payEnum != null) { - retMap.put(PayConstant.RESULT_PARAM_ERRCODE, payEnum.getCode()); - retMap.put(PayConstant.RESULT_PARAM_ERRCODEDES, payEnum.getMessage()); - } - return retMap; - } - - public static String makeRetData(Map retMap, String resKey) { - if(retMap.get(PayConstant.RETURN_PARAM_RETCODE).equals(PayConstant.RETURN_VALUE_SUCCESS)) { - String sign = PayDigestUtil.getSign(retMap, resKey, "payParams"); - retMap.put(PayConstant.RESULT_PARAM_SIGN, sign); - } - _log.info("生成响应数据:{}", retMap); - return JSON.toJSONString(retMap); - } - - public static String makeRetFail(Map retMap) { - _log.info("生成响应数据:{}", retMap); - return JSON.toJSONString(retMap); - } - - /** - * 验证支付中心签名 - * @param params - * @return - */ - public static boolean verifyPaySign(Map params, String key) { - String sign = (String)params.get("sign"); // 签名 - params.remove("sign"); // 不参与签名 - String checkSign = PayDigestUtil.getSign(params, key); - if (!checkSign.equalsIgnoreCase(sign)) { - return false; - } - return true; - } - - /** - * 验证VV平台支付中心签名 - * @param params - * @return - */ - public static boolean verifyPaySign(Map params, String key, String... noSigns) { - String sign = (String)params.get("sign"); // 签名 - params.remove("sign"); // 不参与签名 - if(noSigns != null && noSigns.length > 0) { - for (String noSign : noSigns) { - params.remove(noSign); - } - } - String checkSign = PayDigestUtil.getSign(params, key); - if (!checkSign.equalsIgnoreCase(sign)) { - return false; - } - return true; - } - - public static String genUrlParams(Map paraMap) { - if(paraMap == null || paraMap.isEmpty()) return ""; - StringBuffer urlParam = new StringBuffer(); - Set keySet = paraMap.keySet(); - int i = 0; - for(String key:keySet) { - urlParam.append(key).append("=").append(paraMap.get(key)); - if(++i == keySet.size()) break; - urlParam.append("&"); - } - return urlParam.toString(); - } - - /** - * 发起HTTP/HTTPS请求(method=POST) - * @param url - * @return - */ - public static String call4Post(String url) { - try { - URL url1 = new URL(url); - if("https".equals(url1.getProtocol())) { - return HttpClient.callHttpsPost(url); - }else if("http".equals(url1.getProtocol())) { - return HttpClient.callHttpPost(url); - }else { - return ""; - } - } catch (MalformedURLException e) { - e.printStackTrace(); - } - return ""; - } - -} diff --git a/xxpay-dal/pom.xml b/xxpay-dal/pom.xml deleted file mode 100644 index 66059d191a1f95df974a9c9339c90e8dd019c486..0000000000000000000000000000000000000000 --- a/xxpay-dal/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-dal - 1.0.0 - jar - xxpay-dal - xxpay-dal - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - UTF-8 - 5.1.34 - 3.4.1 - 1.3.0 - 1.3.2 - 1.2.7 - - - - - org.xxpay - xxpay-common - 1.0.0 - - - mysql - mysql-connector-java - ${mysql.connector.java.version} - - - org.mybatis - mybatis - ${mybatis.version} - - - org.mybatis - mybatis-spring - ${mybatis.spring.version} - - - org.mybatis.generator - mybatis-generator-core - ${mybatis.generator.version} - - - - com.alibaba - druid - 1.0.26 - - - org.springframework.boot - spring-boot-autoconfigure - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - - com.github.pagehelper - pagehelper - 4.1.6 - - - - - - xxpay-dal - - - src/main/java - - **/*.xml - - - - src/main/resources - - **/*.properties - **/*.xml - - true - - - - - org.mybatis.generator - mybatis-generator-maven-plugin - ${mybatis.generator.version} - - - org.xxpay - xxpay-dal - 1.0.0 - - - - true - true - - - - - - \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/IapReceiptMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/IapReceiptMapper.java deleted file mode 100644 index 04c54b983ef20ff091d8321b8385ffa0cc8aacf1..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/IapReceiptMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.IapReceipt; -import org.xxpay.dal.dao.model.IapReceiptExample; - -public interface IapReceiptMapper { - int countByExample(IapReceiptExample example); - - int deleteByExample(IapReceiptExample example); - - int deleteByPrimaryKey(String payOrderId); - - int insert(IapReceipt record); - - int insertSelective(IapReceipt record); - - List selectByExampleWithBLOBs(IapReceiptExample example); - - List selectByExample(IapReceiptExample example); - - IapReceipt selectByPrimaryKey(String payOrderId); - - int updateByExampleSelective(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example); - - int updateByExampleWithBLOBs(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example); - - int updateByExample(@Param("record") IapReceipt record, @Param("example") IapReceiptExample example); - - int updateByPrimaryKeySelective(IapReceipt record); - - int updateByPrimaryKeyWithBLOBs(IapReceipt record); - - int updateByPrimaryKey(IapReceipt record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchInfoMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchInfoMapper.java deleted file mode 100644 index 1ff9a9a4e5e79154c779a95aaf2c2a862e3bbea0..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchInfoMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.MchInfoExample; - -public interface MchInfoMapper { - int countByExample(MchInfoExample example); - - int deleteByExample(MchInfoExample example); - - int deleteByPrimaryKey(String mchId); - - int insert(MchInfo record); - - int insertSelective(MchInfo record); - - List selectByExample(MchInfoExample example); - - MchInfo selectByPrimaryKey(String mchId); - - int updateByExampleSelective(@Param("record") MchInfo record, @Param("example") MchInfoExample example); - - int updateByExample(@Param("record") MchInfo record, @Param("example") MchInfoExample example); - - int updateByPrimaryKeySelective(MchInfo record); - - int updateByPrimaryKey(MchInfo record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchNotifyMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchNotifyMapper.java deleted file mode 100644 index 2457e32fa5ef45318baece1ef6dbc6af03813607..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/MchNotifyMapper.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.model.MchNotifyExample; - -public interface MchNotifyMapper { - int countByExample(MchNotifyExample example); - - int deleteByExample(MchNotifyExample example); - - int deleteByPrimaryKey(String orderId); - - int insert(MchNotify record); - - int insertSelective(MchNotify record); - - List selectByExample(MchNotifyExample example); - - MchNotify selectByPrimaryKey(String orderId); - - int updateByExampleSelective(@Param("record") MchNotify record, @Param("example") MchNotifyExample example); - - int updateByExample(@Param("record") MchNotify record, @Param("example") MchNotifyExample example); - - int updateByPrimaryKeySelective(MchNotify record); - - int updateByPrimaryKey(MchNotify record); - - int insertSelectiveOnDuplicateKeyUpdate(MchNotify record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayChannelMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayChannelMapper.java deleted file mode 100644 index 24ae4c34b35c63c2a5c07640684570334d63449c..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayChannelMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayChannelExample; - -public interface PayChannelMapper { - int countByExample(PayChannelExample example); - - int deleteByExample(PayChannelExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(PayChannel record); - - int insertSelective(PayChannel record); - - List selectByExample(PayChannelExample example); - - PayChannel selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") PayChannel record, @Param("example") PayChannelExample example); - - int updateByExample(@Param("record") PayChannel record, @Param("example") PayChannelExample example); - - int updateByPrimaryKeySelective(PayChannel record); - - int updateByPrimaryKey(PayChannel record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayOrderMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayOrderMapper.java deleted file mode 100644 index ad17d6627637e2965cdf42070a3b72c0329566d4..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/PayOrderMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.PayOrderExample; - -public interface PayOrderMapper { - int countByExample(PayOrderExample example); - - int deleteByExample(PayOrderExample example); - - int deleteByPrimaryKey(String payOrderId); - - int insert(PayOrder record); - - int insertSelective(PayOrder record); - - List selectByExample(PayOrderExample example); - - PayOrder selectByPrimaryKey(String payOrderId); - - int updateByExampleSelective(@Param("record") PayOrder record, @Param("example") PayOrderExample example); - - int updateByExample(@Param("record") PayOrder record, @Param("example") PayOrderExample example); - - int updateByPrimaryKeySelective(PayOrder record); - - int updateByPrimaryKey(PayOrder record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/RefundOrderMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/RefundOrderMapper.java deleted file mode 100644 index c063b2cc0b564ba496b7ae5eac5ec53f395caa17..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/RefundOrderMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.RefundOrderExample; - -public interface RefundOrderMapper { - int countByExample(RefundOrderExample example); - - int deleteByExample(RefundOrderExample example); - - int deleteByPrimaryKey(String refundOrderId); - - int insert(RefundOrder record); - - int insertSelective(RefundOrder record); - - List selectByExample(RefundOrderExample example); - - RefundOrder selectByPrimaryKey(String refundOrderId); - - int updateByExampleSelective(@Param("record") RefundOrder record, @Param("example") RefundOrderExample example); - - int updateByExample(@Param("record") RefundOrder record, @Param("example") RefundOrderExample example); - - int updateByPrimaryKeySelective(RefundOrder record); - - int updateByPrimaryKey(RefundOrder record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/TransOrderMapper.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/TransOrderMapper.java deleted file mode 100644 index 1f4f04d1eebcef71e88647ce92f64dfcd1e44caf..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/mapper/TransOrderMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.dal.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dal.dao.model.TransOrderExample; - -public interface TransOrderMapper { - int countByExample(TransOrderExample example); - - int deleteByExample(TransOrderExample example); - - int deleteByPrimaryKey(String transOrderId); - - int insert(TransOrder record); - - int insertSelective(TransOrder record); - - List selectByExample(TransOrderExample example); - - TransOrder selectByPrimaryKey(String transOrderId); - - int updateByExampleSelective(@Param("record") TransOrder record, @Param("example") TransOrderExample example); - - int updateByExample(@Param("record") TransOrder record, @Param("example") TransOrderExample example); - - int updateByPrimaryKeySelective(TransOrder record); - - int updateByPrimaryKey(TransOrder record); -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceipt.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceipt.java deleted file mode 100644 index 7effc071ffad6de7aed0985ff73d40ace1d7c3ae..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceipt.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class IapReceipt implements Serializable { - /** - * 支付订单号 - * - * @mbggenerated - */ - private String payOrderId; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * IAP业务号 - * - * @mbggenerated - */ - private String transactionId; - - /** - * 处理状态:0-未处理,1-处理成功,-1-处理失败 - * - * @mbggenerated - */ - private Byte status; - - /** - * 处理次数 - * - * @mbggenerated - */ - private Byte handleCount; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String receiptData; - - private static final long serialVersionUID = 1L; - - public String getPayOrderId() { - return payOrderId; - } - - public void setPayOrderId(String payOrderId) { - this.payOrderId = payOrderId; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public Byte getHandleCount() { - return handleCount; - } - - public void setHandleCount(Byte handleCount) { - this.handleCount = handleCount; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public String getReceiptData() { - return receiptData; - } - - public void setReceiptData(String receiptData) { - this.receiptData = receiptData; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", payOrderId=").append(payOrderId); - sb.append(", mchId=").append(mchId); - sb.append(", transactionId=").append(transactionId); - sb.append(", status=").append(status); - sb.append(", handleCount=").append(handleCount); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append(", receiptData=").append(receiptData); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - IapReceipt other = (IapReceipt) that; - return (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getTransactionId() == null ? other.getTransactionId() == null : this.getTransactionId().equals(other.getTransactionId())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getHandleCount() == null ? other.getHandleCount() == null : this.getHandleCount().equals(other.getHandleCount())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) - && (this.getReceiptData() == null ? other.getReceiptData() == null : this.getReceiptData().equals(other.getReceiptData())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getTransactionId() == null) ? 0 : getTransactionId().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getHandleCount() == null) ? 0 : getHandleCount().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - result = prime * result + ((getReceiptData() == null) ? 0 : getReceiptData().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceiptExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceiptExample.java deleted file mode 100644 index ab86568b95f197250cc443da43d5d082551fd2a5..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/IapReceiptExample.java +++ /dev/null @@ -1,674 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class IapReceiptExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public IapReceiptExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andPayOrderIdIsNull() { - addCriterion("PayOrderId is null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNotNull() { - addCriterion("PayOrderId is not null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdEqualTo(String value) { - addCriterion("PayOrderId =", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotEqualTo(String value) { - addCriterion("PayOrderId <>", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThan(String value) { - addCriterion("PayOrderId >", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("PayOrderId >=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThan(String value) { - addCriterion("PayOrderId <", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThanOrEqualTo(String value) { - addCriterion("PayOrderId <=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLike(String value) { - addCriterion("PayOrderId like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotLike(String value) { - addCriterion("PayOrderId not like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIn(List values) { - addCriterion("PayOrderId in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotIn(List values) { - addCriterion("PayOrderId not in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdBetween(String value1, String value2) { - addCriterion("PayOrderId between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotBetween(String value1, String value2) { - addCriterion("PayOrderId not between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andTransactionIdIsNull() { - addCriterion("TransactionId is null"); - return (Criteria) this; - } - - public Criteria andTransactionIdIsNotNull() { - addCriterion("TransactionId is not null"); - return (Criteria) this; - } - - public Criteria andTransactionIdEqualTo(String value) { - addCriterion("TransactionId =", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdNotEqualTo(String value) { - addCriterion("TransactionId <>", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdGreaterThan(String value) { - addCriterion("TransactionId >", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdGreaterThanOrEqualTo(String value) { - addCriterion("TransactionId >=", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdLessThan(String value) { - addCriterion("TransactionId <", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdLessThanOrEqualTo(String value) { - addCriterion("TransactionId <=", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdLike(String value) { - addCriterion("TransactionId like", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdNotLike(String value) { - addCriterion("TransactionId not like", value, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdIn(List values) { - addCriterion("TransactionId in", values, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdNotIn(List values) { - addCriterion("TransactionId not in", values, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdBetween(String value1, String value2) { - addCriterion("TransactionId between", value1, value2, "transactionId"); - return (Criteria) this; - } - - public Criteria andTransactionIdNotBetween(String value1, String value2) { - addCriterion("TransactionId not between", value1, value2, "transactionId"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andHandleCountIsNull() { - addCriterion("HandleCount is null"); - return (Criteria) this; - } - - public Criteria andHandleCountIsNotNull() { - addCriterion("HandleCount is not null"); - return (Criteria) this; - } - - public Criteria andHandleCountEqualTo(Byte value) { - addCriterion("HandleCount =", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountNotEqualTo(Byte value) { - addCriterion("HandleCount <>", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountGreaterThan(Byte value) { - addCriterion("HandleCount >", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountGreaterThanOrEqualTo(Byte value) { - addCriterion("HandleCount >=", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountLessThan(Byte value) { - addCriterion("HandleCount <", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountLessThanOrEqualTo(Byte value) { - addCriterion("HandleCount <=", value, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountIn(List values) { - addCriterion("HandleCount in", values, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountNotIn(List values) { - addCriterion("HandleCount not in", values, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountBetween(Byte value1, Byte value2) { - addCriterion("HandleCount between", value1, value2, "handleCount"); - return (Criteria) this; - } - - public Criteria andHandleCountNotBetween(Byte value1, Byte value2) { - addCriterion("HandleCount not between", value1, value2, "handleCount"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfo.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfo.java deleted file mode 100644 index 02862089e82673dd31cf321ccf761da17d6d540a..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfo.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class MchInfo implements Serializable { - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 名称 - * - * @mbggenerated - */ - private String name; - - /** - * 类型 - * - * @mbggenerated - */ - private String type; - - /** - * 请求私钥 - * - * @mbggenerated - */ - private String reqKey; - - /** - * 响应私钥 - * - * @mbggenerated - */ - private String resKey; - - /** - * 商户状态,0-停止使用,1-使用中 - * - * @mbggenerated - */ - private Byte state; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getReqKey() { - return reqKey; - } - - public void setReqKey(String reqKey) { - this.reqKey = reqKey; - } - - public String getResKey() { - return resKey; - } - - public void setResKey(String resKey) { - this.resKey = resKey; - } - - public Byte getState() { - return state; - } - - public void setState(Byte state) { - this.state = state; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", mchId=").append(mchId); - sb.append(", name=").append(name); - sb.append(", type=").append(type); - sb.append(", reqKey=").append(reqKey); - sb.append(", resKey=").append(resKey); - sb.append(", state=").append(state); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - MchInfo other = (MchInfo) that; - return (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) - && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) - && (this.getReqKey() == null ? other.getReqKey() == null : this.getReqKey().equals(other.getReqKey())) - && (this.getResKey() == null ? other.getResKey() == null : this.getResKey().equals(other.getResKey())) - && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); - result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); - result = prime * result + ((getReqKey() == null) ? 0 : getReqKey().hashCode()); - result = prime * result + ((getResKey() == null) ? 0 : getResKey().hashCode()); - result = prime * result + ((getState() == null) ? 0 : getState().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfoExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfoExample.java deleted file mode 100644 index bf42368c545b7b1ba985b6de68c01fe4d485d060..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchInfoExample.java +++ /dev/null @@ -1,754 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class MchInfoExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public MchInfoExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("Name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("Name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("Name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("Name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("Name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("Name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("Name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("Name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("Name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("Name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("Name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("Name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("Name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("Name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andTypeIsNull() { - addCriterion("Type is null"); - return (Criteria) this; - } - - public Criteria andTypeIsNotNull() { - addCriterion("Type is not null"); - return (Criteria) this; - } - - public Criteria andTypeEqualTo(String value) { - addCriterion("Type =", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotEqualTo(String value) { - addCriterion("Type <>", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThan(String value) { - addCriterion("Type >", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThanOrEqualTo(String value) { - addCriterion("Type >=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThan(String value) { - addCriterion("Type <", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThanOrEqualTo(String value) { - addCriterion("Type <=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLike(String value) { - addCriterion("Type like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotLike(String value) { - addCriterion("Type not like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeIn(List values) { - addCriterion("Type in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotIn(List values) { - addCriterion("Type not in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeBetween(String value1, String value2) { - addCriterion("Type between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotBetween(String value1, String value2) { - addCriterion("Type not between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andReqKeyIsNull() { - addCriterion("ReqKey is null"); - return (Criteria) this; - } - - public Criteria andReqKeyIsNotNull() { - addCriterion("ReqKey is not null"); - return (Criteria) this; - } - - public Criteria andReqKeyEqualTo(String value) { - addCriterion("ReqKey =", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyNotEqualTo(String value) { - addCriterion("ReqKey <>", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyGreaterThan(String value) { - addCriterion("ReqKey >", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyGreaterThanOrEqualTo(String value) { - addCriterion("ReqKey >=", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyLessThan(String value) { - addCriterion("ReqKey <", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyLessThanOrEqualTo(String value) { - addCriterion("ReqKey <=", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyLike(String value) { - addCriterion("ReqKey like", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyNotLike(String value) { - addCriterion("ReqKey not like", value, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyIn(List values) { - addCriterion("ReqKey in", values, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyNotIn(List values) { - addCriterion("ReqKey not in", values, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyBetween(String value1, String value2) { - addCriterion("ReqKey between", value1, value2, "reqKey"); - return (Criteria) this; - } - - public Criteria andReqKeyNotBetween(String value1, String value2) { - addCriterion("ReqKey not between", value1, value2, "reqKey"); - return (Criteria) this; - } - - public Criteria andResKeyIsNull() { - addCriterion("ResKey is null"); - return (Criteria) this; - } - - public Criteria andResKeyIsNotNull() { - addCriterion("ResKey is not null"); - return (Criteria) this; - } - - public Criteria andResKeyEqualTo(String value) { - addCriterion("ResKey =", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyNotEqualTo(String value) { - addCriterion("ResKey <>", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyGreaterThan(String value) { - addCriterion("ResKey >", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyGreaterThanOrEqualTo(String value) { - addCriterion("ResKey >=", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyLessThan(String value) { - addCriterion("ResKey <", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyLessThanOrEqualTo(String value) { - addCriterion("ResKey <=", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyLike(String value) { - addCriterion("ResKey like", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyNotLike(String value) { - addCriterion("ResKey not like", value, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyIn(List values) { - addCriterion("ResKey in", values, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyNotIn(List values) { - addCriterion("ResKey not in", values, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyBetween(String value1, String value2) { - addCriterion("ResKey between", value1, value2, "resKey"); - return (Criteria) this; - } - - public Criteria andResKeyNotBetween(String value1, String value2) { - addCriterion("ResKey not between", value1, value2, "resKey"); - return (Criteria) this; - } - - public Criteria andStateIsNull() { - addCriterion("State is null"); - return (Criteria) this; - } - - public Criteria andStateIsNotNull() { - addCriterion("State is not null"); - return (Criteria) this; - } - - public Criteria andStateEqualTo(Byte value) { - addCriterion("State =", value, "state"); - return (Criteria) this; - } - - public Criteria andStateNotEqualTo(Byte value) { - addCriterion("State <>", value, "state"); - return (Criteria) this; - } - - public Criteria andStateGreaterThan(Byte value) { - addCriterion("State >", value, "state"); - return (Criteria) this; - } - - public Criteria andStateGreaterThanOrEqualTo(Byte value) { - addCriterion("State >=", value, "state"); - return (Criteria) this; - } - - public Criteria andStateLessThan(Byte value) { - addCriterion("State <", value, "state"); - return (Criteria) this; - } - - public Criteria andStateLessThanOrEqualTo(Byte value) { - addCriterion("State <=", value, "state"); - return (Criteria) this; - } - - public Criteria andStateIn(List values) { - addCriterion("State in", values, "state"); - return (Criteria) this; - } - - public Criteria andStateNotIn(List values) { - addCriterion("State not in", values, "state"); - return (Criteria) this; - } - - public Criteria andStateBetween(Byte value1, Byte value2) { - addCriterion("State between", value1, value2, "state"); - return (Criteria) this; - } - - public Criteria andStateNotBetween(Byte value1, Byte value2) { - addCriterion("State not between", value1, value2, "state"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotify.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotify.java deleted file mode 100644 index 0c121c2e47ea3863332a909af7f71dea381ee25f..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotify.java +++ /dev/null @@ -1,237 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class MchNotify implements Serializable { - /** - * 订单ID - * - * @mbggenerated - */ - private String orderId; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 商户订单号 - * - * @mbggenerated - */ - private String mchOrderNo; - - /** - * 订单类型:1-支付,2-转账,3-退款 - * - * @mbggenerated - */ - private String orderType; - - /** - * 通知地址 - * - * @mbggenerated - */ - private String notifyUrl; - - /** - * 通知次数 - * - * @mbggenerated - */ - private Byte notifyCount; - - /** - * 通知响应结果 - * - * @mbggenerated - */ - private String result; - - /** - * 通知状态,1-通知中,2-通知成功,3-通知失败 - * - * @mbggenerated - */ - private Byte status; - - /** - * 最后一次通知时间 - * - * @mbggenerated - */ - private Date lastNotifyTime; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getOrderId() { - return orderId; - } - - public void setOrderId(String orderId) { - this.orderId = orderId; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getMchOrderNo() { - return mchOrderNo; - } - - public void setMchOrderNo(String mchOrderNo) { - this.mchOrderNo = mchOrderNo; - } - - public String getOrderType() { - return orderType; - } - - public void setOrderType(String orderType) { - this.orderType = orderType; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } - - public Byte getNotifyCount() { - return notifyCount; - } - - public void setNotifyCount(Byte notifyCount) { - this.notifyCount = notifyCount; - } - - public String getResult() { - return result; - } - - public void setResult(String result) { - this.result = result; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public Date getLastNotifyTime() { - return lastNotifyTime; - } - - public void setLastNotifyTime(Date lastNotifyTime) { - this.lastNotifyTime = lastNotifyTime; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", orderId=").append(orderId); - sb.append(", mchId=").append(mchId); - sb.append(", mchOrderNo=").append(mchOrderNo); - sb.append(", orderType=").append(orderType); - sb.append(", notifyUrl=").append(notifyUrl); - sb.append(", notifyCount=").append(notifyCount); - sb.append(", result=").append(result); - sb.append(", status=").append(status); - sb.append(", lastNotifyTime=").append(lastNotifyTime); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - MchNotify other = (MchNotify) that; - return (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo())) - && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) - && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) - && (this.getNotifyCount() == null ? other.getNotifyCount() == null : this.getNotifyCount().equals(other.getNotifyCount())) - && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getLastNotifyTime() == null ? other.getLastNotifyTime() == null : this.getLastNotifyTime().equals(other.getLastNotifyTime())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode()); - result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode()); - result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); - result = prime * result + ((getNotifyCount() == null) ? 0 : getNotifyCount().hashCode()); - result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getLastNotifyTime() == null) ? 0 : getLastNotifyTime().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotifyExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotifyExample.java deleted file mode 100644 index 1f5ffbb83123fdc149a4a44ae9941eeee07a2db3..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/MchNotifyExample.java +++ /dev/null @@ -1,944 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class MchNotifyExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public MchNotifyExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andOrderIdIsNull() { - addCriterion("OrderId is null"); - return (Criteria) this; - } - - public Criteria andOrderIdIsNotNull() { - addCriterion("OrderId is not null"); - return (Criteria) this; - } - - public Criteria andOrderIdEqualTo(String value) { - addCriterion("OrderId =", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdNotEqualTo(String value) { - addCriterion("OrderId <>", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdGreaterThan(String value) { - addCriterion("OrderId >", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("OrderId >=", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdLessThan(String value) { - addCriterion("OrderId <", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdLessThanOrEqualTo(String value) { - addCriterion("OrderId <=", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdLike(String value) { - addCriterion("OrderId like", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdNotLike(String value) { - addCriterion("OrderId not like", value, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdIn(List values) { - addCriterion("OrderId in", values, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdNotIn(List values) { - addCriterion("OrderId not in", values, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdBetween(String value1, String value2) { - addCriterion("OrderId between", value1, value2, "orderId"); - return (Criteria) this; - } - - public Criteria andOrderIdNotBetween(String value1, String value2) { - addCriterion("OrderId not between", value1, value2, "orderId"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIsNull() { - addCriterion("MchOrderNo is null"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIsNotNull() { - addCriterion("MchOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andMchOrderNoEqualTo(String value) { - addCriterion("MchOrderNo =", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotEqualTo(String value) { - addCriterion("MchOrderNo <>", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoGreaterThan(String value) { - addCriterion("MchOrderNo >", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("MchOrderNo >=", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLessThan(String value) { - addCriterion("MchOrderNo <", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLessThanOrEqualTo(String value) { - addCriterion("MchOrderNo <=", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLike(String value) { - addCriterion("MchOrderNo like", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotLike(String value) { - addCriterion("MchOrderNo not like", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIn(List values) { - addCriterion("MchOrderNo in", values, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotIn(List values) { - addCriterion("MchOrderNo not in", values, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoBetween(String value1, String value2) { - addCriterion("MchOrderNo between", value1, value2, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotBetween(String value1, String value2) { - addCriterion("MchOrderNo not between", value1, value2, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andOrderTypeIsNull() { - addCriterion("OrderType is null"); - return (Criteria) this; - } - - public Criteria andOrderTypeIsNotNull() { - addCriterion("OrderType is not null"); - return (Criteria) this; - } - - public Criteria andOrderTypeEqualTo(String value) { - addCriterion("OrderType =", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeNotEqualTo(String value) { - addCriterion("OrderType <>", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeGreaterThan(String value) { - addCriterion("OrderType >", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeGreaterThanOrEqualTo(String value) { - addCriterion("OrderType >=", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeLessThan(String value) { - addCriterion("OrderType <", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeLessThanOrEqualTo(String value) { - addCriterion("OrderType <=", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeLike(String value) { - addCriterion("OrderType like", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeNotLike(String value) { - addCriterion("OrderType not like", value, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeIn(List values) { - addCriterion("OrderType in", values, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeNotIn(List values) { - addCriterion("OrderType not in", values, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeBetween(String value1, String value2) { - addCriterion("OrderType between", value1, value2, "orderType"); - return (Criteria) this; - } - - public Criteria andOrderTypeNotBetween(String value1, String value2) { - addCriterion("OrderType not between", value1, value2, "orderType"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNull() { - addCriterion("NotifyUrl is null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNotNull() { - addCriterion("NotifyUrl is not null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlEqualTo(String value) { - addCriterion("NotifyUrl =", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotEqualTo(String value) { - addCriterion("NotifyUrl <>", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThan(String value) { - addCriterion("NotifyUrl >", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThanOrEqualTo(String value) { - addCriterion("NotifyUrl >=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThan(String value) { - addCriterion("NotifyUrl <", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThanOrEqualTo(String value) { - addCriterion("NotifyUrl <=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLike(String value) { - addCriterion("NotifyUrl like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotLike(String value) { - addCriterion("NotifyUrl not like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIn(List values) { - addCriterion("NotifyUrl in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotIn(List values) { - addCriterion("NotifyUrl not in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlBetween(String value1, String value2) { - addCriterion("NotifyUrl between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotBetween(String value1, String value2) { - addCriterion("NotifyUrl not between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyCountIsNull() { - addCriterion("NotifyCount is null"); - return (Criteria) this; - } - - public Criteria andNotifyCountIsNotNull() { - addCriterion("NotifyCount is not null"); - return (Criteria) this; - } - - public Criteria andNotifyCountEqualTo(Byte value) { - addCriterion("NotifyCount =", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotEqualTo(Byte value) { - addCriterion("NotifyCount <>", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountGreaterThan(Byte value) { - addCriterion("NotifyCount >", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountGreaterThanOrEqualTo(Byte value) { - addCriterion("NotifyCount >=", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountLessThan(Byte value) { - addCriterion("NotifyCount <", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountLessThanOrEqualTo(Byte value) { - addCriterion("NotifyCount <=", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountIn(List values) { - addCriterion("NotifyCount in", values, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotIn(List values) { - addCriterion("NotifyCount not in", values, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountBetween(Byte value1, Byte value2) { - addCriterion("NotifyCount between", value1, value2, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotBetween(Byte value1, Byte value2) { - addCriterion("NotifyCount not between", value1, value2, "notifyCount"); - return (Criteria) this; - } - - public Criteria andResultIsNull() { - addCriterion("Result is null"); - return (Criteria) this; - } - - public Criteria andResultIsNotNull() { - addCriterion("Result is not null"); - return (Criteria) this; - } - - public Criteria andResultEqualTo(String value) { - addCriterion("Result =", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotEqualTo(String value) { - addCriterion("Result <>", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThan(String value) { - addCriterion("Result >", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThanOrEqualTo(String value) { - addCriterion("Result >=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThan(String value) { - addCriterion("Result <", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThanOrEqualTo(String value) { - addCriterion("Result <=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLike(String value) { - addCriterion("Result like", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotLike(String value) { - addCriterion("Result not like", value, "result"); - return (Criteria) this; - } - - public Criteria andResultIn(List values) { - addCriterion("Result in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultNotIn(List values) { - addCriterion("Result not in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultBetween(String value1, String value2) { - addCriterion("Result between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andResultNotBetween(String value1, String value2) { - addCriterion("Result not between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIsNull() { - addCriterion("LastNotifyTime is null"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIsNotNull() { - addCriterion("LastNotifyTime is not null"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeEqualTo(Date value) { - addCriterion("LastNotifyTime =", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotEqualTo(Date value) { - addCriterion("LastNotifyTime <>", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeGreaterThan(Date value) { - addCriterion("LastNotifyTime >", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeGreaterThanOrEqualTo(Date value) { - addCriterion("LastNotifyTime >=", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeLessThan(Date value) { - addCriterion("LastNotifyTime <", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeLessThanOrEqualTo(Date value) { - addCriterion("LastNotifyTime <=", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIn(List values) { - addCriterion("LastNotifyTime in", values, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotIn(List values) { - addCriterion("LastNotifyTime not in", values, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeBetween(Date value1, Date value2) { - addCriterion("LastNotifyTime between", value1, value2, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotBetween(Date value1, Date value2) { - addCriterion("LastNotifyTime not between", value1, value2, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannel.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannel.java deleted file mode 100644 index 869bfdc32c373af9e5254c17c9f83205835ab7ce..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannel.java +++ /dev/null @@ -1,219 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class PayChannel implements Serializable { - /** - * 渠道主键ID - * - * @mbggenerated - */ - private Integer id; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String channelId; - - /** - * 渠道名称,如:alipay,wechat - * - * @mbggenerated - */ - private String channelName; - - /** - * 渠道商户ID - * - * @mbggenerated - */ - private String channelMchId; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 渠道状态,0-停止使用,1-使用中 - * - * @mbggenerated - */ - private Byte state; - - /** - * 配置参数,json字符串 - * - * @mbggenerated - */ - private String param; - - /** - * 备注 - * - * @mbggenerated - */ - private String remark; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public String getChannelName() { - return channelName; - } - - public void setChannelName(String channelName) { - this.channelName = channelName; - } - - public String getChannelMchId() { - return channelMchId; - } - - public void setChannelMchId(String channelMchId) { - this.channelMchId = channelMchId; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public Byte getState() { - return state; - } - - public void setState(Byte state) { - this.state = state; - } - - public String getParam() { - return param; - } - - public void setParam(String param) { - this.param = param; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", channelId=").append(channelId); - sb.append(", channelName=").append(channelName); - sb.append(", channelMchId=").append(channelMchId); - sb.append(", mchId=").append(mchId); - sb.append(", state=").append(state); - sb.append(", param=").append(param); - sb.append(", remark=").append(remark); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - PayChannel other = (PayChannel) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) - && (this.getChannelName() == null ? other.getChannelName() == null : this.getChannelName().equals(other.getChannelName())) - && (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState())) - && (this.getParam() == null ? other.getParam() == null : this.getParam().equals(other.getParam())) - && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); - result = prime * result + ((getChannelName() == null) ? 0 : getChannelName().hashCode()); - result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getState() == null) ? 0 : getState().hashCode()); - result = prime * result + ((getParam() == null) ? 0 : getParam().hashCode()); - result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannelExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannelExample.java deleted file mode 100644 index e4daa5698f148856b6d180f862cf350a371b5543..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayChannelExample.java +++ /dev/null @@ -1,884 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class PayChannelExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public PayChannelExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNull() { - addCriterion("ChannelId is null"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNotNull() { - addCriterion("ChannelId is not null"); - return (Criteria) this; - } - - public Criteria andChannelIdEqualTo(String value) { - addCriterion("ChannelId =", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotEqualTo(String value) { - addCriterion("ChannelId <>", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThan(String value) { - addCriterion("ChannelId >", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelId >=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThan(String value) { - addCriterion("ChannelId <", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThanOrEqualTo(String value) { - addCriterion("ChannelId <=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLike(String value) { - addCriterion("ChannelId like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotLike(String value) { - addCriterion("ChannelId not like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdIn(List values) { - addCriterion("ChannelId in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotIn(List values) { - addCriterion("ChannelId not in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdBetween(String value1, String value2) { - addCriterion("ChannelId between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotBetween(String value1, String value2) { - addCriterion("ChannelId not between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelNameIsNull() { - addCriterion("ChannelName is null"); - return (Criteria) this; - } - - public Criteria andChannelNameIsNotNull() { - addCriterion("ChannelName is not null"); - return (Criteria) this; - } - - public Criteria andChannelNameEqualTo(String value) { - addCriterion("ChannelName =", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameNotEqualTo(String value) { - addCriterion("ChannelName <>", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameGreaterThan(String value) { - addCriterion("ChannelName >", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameGreaterThanOrEqualTo(String value) { - addCriterion("ChannelName >=", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameLessThan(String value) { - addCriterion("ChannelName <", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameLessThanOrEqualTo(String value) { - addCriterion("ChannelName <=", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameLike(String value) { - addCriterion("ChannelName like", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameNotLike(String value) { - addCriterion("ChannelName not like", value, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameIn(List values) { - addCriterion("ChannelName in", values, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameNotIn(List values) { - addCriterion("ChannelName not in", values, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameBetween(String value1, String value2) { - addCriterion("ChannelName between", value1, value2, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelNameNotBetween(String value1, String value2) { - addCriterion("ChannelName not between", value1, value2, "channelName"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNull() { - addCriterion("ChannelMchId is null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNotNull() { - addCriterion("ChannelMchId is not null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdEqualTo(String value) { - addCriterion("ChannelMchId =", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotEqualTo(String value) { - addCriterion("ChannelMchId <>", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThan(String value) { - addCriterion("ChannelMchId >", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelMchId >=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThan(String value) { - addCriterion("ChannelMchId <", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThanOrEqualTo(String value) { - addCriterion("ChannelMchId <=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLike(String value) { - addCriterion("ChannelMchId like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotLike(String value) { - addCriterion("ChannelMchId not like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIn(List values) { - addCriterion("ChannelMchId in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotIn(List values) { - addCriterion("ChannelMchId not in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdBetween(String value1, String value2) { - addCriterion("ChannelMchId between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotBetween(String value1, String value2) { - addCriterion("ChannelMchId not between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andStateIsNull() { - addCriterion("State is null"); - return (Criteria) this; - } - - public Criteria andStateIsNotNull() { - addCriterion("State is not null"); - return (Criteria) this; - } - - public Criteria andStateEqualTo(Byte value) { - addCriterion("State =", value, "state"); - return (Criteria) this; - } - - public Criteria andStateNotEqualTo(Byte value) { - addCriterion("State <>", value, "state"); - return (Criteria) this; - } - - public Criteria andStateGreaterThan(Byte value) { - addCriterion("State >", value, "state"); - return (Criteria) this; - } - - public Criteria andStateGreaterThanOrEqualTo(Byte value) { - addCriterion("State >=", value, "state"); - return (Criteria) this; - } - - public Criteria andStateLessThan(Byte value) { - addCriterion("State <", value, "state"); - return (Criteria) this; - } - - public Criteria andStateLessThanOrEqualTo(Byte value) { - addCriterion("State <=", value, "state"); - return (Criteria) this; - } - - public Criteria andStateIn(List values) { - addCriterion("State in", values, "state"); - return (Criteria) this; - } - - public Criteria andStateNotIn(List values) { - addCriterion("State not in", values, "state"); - return (Criteria) this; - } - - public Criteria andStateBetween(Byte value1, Byte value2) { - addCriterion("State between", value1, value2, "state"); - return (Criteria) this; - } - - public Criteria andStateNotBetween(Byte value1, Byte value2) { - addCriterion("State not between", value1, value2, "state"); - return (Criteria) this; - } - - public Criteria andParamIsNull() { - addCriterion("Param is null"); - return (Criteria) this; - } - - public Criteria andParamIsNotNull() { - addCriterion("Param is not null"); - return (Criteria) this; - } - - public Criteria andParamEqualTo(String value) { - addCriterion("Param =", value, "param"); - return (Criteria) this; - } - - public Criteria andParamNotEqualTo(String value) { - addCriterion("Param <>", value, "param"); - return (Criteria) this; - } - - public Criteria andParamGreaterThan(String value) { - addCriterion("Param >", value, "param"); - return (Criteria) this; - } - - public Criteria andParamGreaterThanOrEqualTo(String value) { - addCriterion("Param >=", value, "param"); - return (Criteria) this; - } - - public Criteria andParamLessThan(String value) { - addCriterion("Param <", value, "param"); - return (Criteria) this; - } - - public Criteria andParamLessThanOrEqualTo(String value) { - addCriterion("Param <=", value, "param"); - return (Criteria) this; - } - - public Criteria andParamLike(String value) { - addCriterion("Param like", value, "param"); - return (Criteria) this; - } - - public Criteria andParamNotLike(String value) { - addCriterion("Param not like", value, "param"); - return (Criteria) this; - } - - public Criteria andParamIn(List values) { - addCriterion("Param in", values, "param"); - return (Criteria) this; - } - - public Criteria andParamNotIn(List values) { - addCriterion("Param not in", values, "param"); - return (Criteria) this; - } - - public Criteria andParamBetween(String value1, String value2) { - addCriterion("Param between", value1, value2, "param"); - return (Criteria) this; - } - - public Criteria andParamNotBetween(String value1, String value2) { - addCriterion("Param not between", value1, value2, "param"); - return (Criteria) this; - } - - public Criteria andRemarkIsNull() { - addCriterion("Remark is null"); - return (Criteria) this; - } - - public Criteria andRemarkIsNotNull() { - addCriterion("Remark is not null"); - return (Criteria) this; - } - - public Criteria andRemarkEqualTo(String value) { - addCriterion("Remark =", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotEqualTo(String value) { - addCriterion("Remark <>", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThan(String value) { - addCriterion("Remark >", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkGreaterThanOrEqualTo(String value) { - addCriterion("Remark >=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThan(String value) { - addCriterion("Remark <", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLessThanOrEqualTo(String value) { - addCriterion("Remark <=", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkLike(String value) { - addCriterion("Remark like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotLike(String value) { - addCriterion("Remark not like", value, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkIn(List values) { - addCriterion("Remark in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotIn(List values) { - addCriterion("Remark not in", values, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkBetween(String value1, String value2) { - addCriterion("Remark between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andRemarkNotBetween(String value1, String value2) { - addCriterion("Remark not between", value1, value2, "remark"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrder.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrder.java deleted file mode 100644 index adab773d297b89421d2f1d1ccc7b95e9a62b7d58..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrder.java +++ /dev/null @@ -1,489 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class PayOrder implements Serializable { - /** - * 支付订单号 - * - * @mbggenerated - */ - private String payOrderId; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 商户订单号 - * - * @mbggenerated - */ - private String mchOrderNo; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String channelId; - - /** - * 支付金额,单位分 - * - * @mbggenerated - */ - private Long amount; - - /** - * 三位货币代码,人民币:cny - * - * @mbggenerated - */ - private String currency; - - /** - * 支付状态,0-订单生成,1-支付中(目前未使用),2-支付成功,3-业务处理完成 - * - * @mbggenerated - */ - private Byte status; - - /** - * 客户端IP - * - * @mbggenerated - */ - private String clientIp; - - /** - * 设备 - * - * @mbggenerated - */ - private String device; - - /** - * 商品标题 - * - * @mbggenerated - */ - private String subject; - - /** - * 商品描述信息 - * - * @mbggenerated - */ - private String body; - - /** - * 特定渠道发起时额外参数 - * - * @mbggenerated - */ - private String extra; - - /** - * 渠道商户ID - * - * @mbggenerated - */ - private String channelMchId; - - /** - * 渠道订单号 - * - * @mbggenerated - */ - private String channelOrderNo; - - /** - * 渠道支付错误码 - * - * @mbggenerated - */ - private String errCode; - - /** - * 渠道支付错误描述 - * - * @mbggenerated - */ - private String errMsg; - - /** - * 扩展参数1 - * - * @mbggenerated - */ - private String param1; - - /** - * 扩展参数2 - * - * @mbggenerated - */ - private String param2; - - /** - * 通知地址 - * - * @mbggenerated - */ - private String notifyUrl; - - /** - * 通知次数 - * - * @mbggenerated - */ - private Byte notifyCount; - - /** - * 最后一次通知时间 - * - * @mbggenerated - */ - private Long lastNotifyTime; - - /** - * 订单失效时间 - * - * @mbggenerated - */ - private Long expireTime; - - /** - * 订单支付成功时间 - * - * @mbggenerated - */ - private Long paySuccTime; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getPayOrderId() { - return payOrderId; - } - - public void setPayOrderId(String payOrderId) { - this.payOrderId = payOrderId; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getMchOrderNo() { - return mchOrderNo; - } - - public void setMchOrderNo(String mchOrderNo) { - this.mchOrderNo = mchOrderNo; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public Long getAmount() { - return amount; - } - - public void setAmount(Long amount) { - this.amount = amount; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public String getClientIp() { - return clientIp; - } - - public void setClientIp(String clientIp) { - this.clientIp = clientIp; - } - - public String getDevice() { - return device; - } - - public void setDevice(String device) { - this.device = device; - } - - public String getSubject() { - return subject; - } - - public void setSubject(String subject) { - this.subject = subject; - } - - public String getBody() { - return body; - } - - public void setBody(String body) { - this.body = body; - } - - public String getExtra() { - return extra; - } - - public void setExtra(String extra) { - this.extra = extra; - } - - public String getChannelMchId() { - return channelMchId; - } - - public void setChannelMchId(String channelMchId) { - this.channelMchId = channelMchId; - } - - public String getChannelOrderNo() { - return channelOrderNo; - } - - public void setChannelOrderNo(String channelOrderNo) { - this.channelOrderNo = channelOrderNo; - } - - public String getErrCode() { - return errCode; - } - - public void setErrCode(String errCode) { - this.errCode = errCode; - } - - public String getErrMsg() { - return errMsg; - } - - public void setErrMsg(String errMsg) { - this.errMsg = errMsg; - } - - public String getParam1() { - return param1; - } - - public void setParam1(String param1) { - this.param1 = param1; - } - - public String getParam2() { - return param2; - } - - public void setParam2(String param2) { - this.param2 = param2; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } - - public Byte getNotifyCount() { - return notifyCount; - } - - public void setNotifyCount(Byte notifyCount) { - this.notifyCount = notifyCount; - } - - public Long getLastNotifyTime() { - return lastNotifyTime; - } - - public void setLastNotifyTime(Long lastNotifyTime) { - this.lastNotifyTime = lastNotifyTime; - } - - public Long getExpireTime() { - return expireTime; - } - - public void setExpireTime(Long expireTime) { - this.expireTime = expireTime; - } - - public Long getPaySuccTime() { - return paySuccTime; - } - - public void setPaySuccTime(Long paySuccTime) { - this.paySuccTime = paySuccTime; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", payOrderId=").append(payOrderId); - sb.append(", mchId=").append(mchId); - sb.append(", mchOrderNo=").append(mchOrderNo); - sb.append(", channelId=").append(channelId); - sb.append(", amount=").append(amount); - sb.append(", currency=").append(currency); - sb.append(", status=").append(status); - sb.append(", clientIp=").append(clientIp); - sb.append(", device=").append(device); - sb.append(", subject=").append(subject); - sb.append(", body=").append(body); - sb.append(", extra=").append(extra); - sb.append(", channelMchId=").append(channelMchId); - sb.append(", channelOrderNo=").append(channelOrderNo); - sb.append(", errCode=").append(errCode); - sb.append(", errMsg=").append(errMsg); - sb.append(", param1=").append(param1); - sb.append(", param2=").append(param2); - sb.append(", notifyUrl=").append(notifyUrl); - sb.append(", notifyCount=").append(notifyCount); - sb.append(", lastNotifyTime=").append(lastNotifyTime); - sb.append(", expireTime=").append(expireTime); - sb.append(", paySuccTime=").append(paySuccTime); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - PayOrder other = (PayOrder) that; - return (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getMchOrderNo() == null ? other.getMchOrderNo() == null : this.getMchOrderNo().equals(other.getMchOrderNo())) - && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) - && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) - && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp())) - && (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice())) - && (this.getSubject() == null ? other.getSubject() == null : this.getSubject().equals(other.getSubject())) - && (this.getBody() == null ? other.getBody() == null : this.getBody().equals(other.getBody())) - && (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra())) - && (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId())) - && (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo())) - && (this.getErrCode() == null ? other.getErrCode() == null : this.getErrCode().equals(other.getErrCode())) - && (this.getErrMsg() == null ? other.getErrMsg() == null : this.getErrMsg().equals(other.getErrMsg())) - && (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1())) - && (this.getParam2() == null ? other.getParam2() == null : this.getParam2().equals(other.getParam2())) - && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) - && (this.getNotifyCount() == null ? other.getNotifyCount() == null : this.getNotifyCount().equals(other.getNotifyCount())) - && (this.getLastNotifyTime() == null ? other.getLastNotifyTime() == null : this.getLastNotifyTime().equals(other.getLastNotifyTime())) - && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime())) - && (this.getPaySuccTime() == null ? other.getPaySuccTime() == null : this.getPaySuccTime().equals(other.getPaySuccTime())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getMchOrderNo() == null) ? 0 : getMchOrderNo().hashCode()); - result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); - result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); - result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode()); - result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode()); - result = prime * result + ((getSubject() == null) ? 0 : getSubject().hashCode()); - result = prime * result + ((getBody() == null) ? 0 : getBody().hashCode()); - result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode()); - result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode()); - result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode()); - result = prime * result + ((getErrCode() == null) ? 0 : getErrCode().hashCode()); - result = prime * result + ((getErrMsg() == null) ? 0 : getErrMsg().hashCode()); - result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode()); - result = prime * result + ((getParam2() == null) ? 0 : getParam2().hashCode()); - result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); - result = prime * result + ((getNotifyCount() == null) ? 0 : getNotifyCount().hashCode()); - result = prime * result + ((getLastNotifyTime() == null) ? 0 : getLastNotifyTime().hashCode()); - result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode()); - result = prime * result + ((getPaySuccTime() == null) ? 0 : getPaySuccTime().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrderExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrderExample.java deleted file mode 100644 index 982f0e522317412daf469e8a8b5fe9789450a825..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/PayOrderExample.java +++ /dev/null @@ -1,1894 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class PayOrderExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public PayOrderExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andPayOrderIdIsNull() { - addCriterion("PayOrderId is null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNotNull() { - addCriterion("PayOrderId is not null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdEqualTo(String value) { - addCriterion("PayOrderId =", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotEqualTo(String value) { - addCriterion("PayOrderId <>", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThan(String value) { - addCriterion("PayOrderId >", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("PayOrderId >=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThan(String value) { - addCriterion("PayOrderId <", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThanOrEqualTo(String value) { - addCriterion("PayOrderId <=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLike(String value) { - addCriterion("PayOrderId like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotLike(String value) { - addCriterion("PayOrderId not like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIn(List values) { - addCriterion("PayOrderId in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotIn(List values) { - addCriterion("PayOrderId not in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdBetween(String value1, String value2) { - addCriterion("PayOrderId between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotBetween(String value1, String value2) { - addCriterion("PayOrderId not between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIsNull() { - addCriterion("MchOrderNo is null"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIsNotNull() { - addCriterion("MchOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andMchOrderNoEqualTo(String value) { - addCriterion("MchOrderNo =", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotEqualTo(String value) { - addCriterion("MchOrderNo <>", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoGreaterThan(String value) { - addCriterion("MchOrderNo >", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("MchOrderNo >=", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLessThan(String value) { - addCriterion("MchOrderNo <", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLessThanOrEqualTo(String value) { - addCriterion("MchOrderNo <=", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoLike(String value) { - addCriterion("MchOrderNo like", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotLike(String value) { - addCriterion("MchOrderNo not like", value, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoIn(List values) { - addCriterion("MchOrderNo in", values, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotIn(List values) { - addCriterion("MchOrderNo not in", values, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoBetween(String value1, String value2) { - addCriterion("MchOrderNo between", value1, value2, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andMchOrderNoNotBetween(String value1, String value2) { - addCriterion("MchOrderNo not between", value1, value2, "mchOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNull() { - addCriterion("ChannelId is null"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNotNull() { - addCriterion("ChannelId is not null"); - return (Criteria) this; - } - - public Criteria andChannelIdEqualTo(String value) { - addCriterion("ChannelId =", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotEqualTo(String value) { - addCriterion("ChannelId <>", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThan(String value) { - addCriterion("ChannelId >", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelId >=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThan(String value) { - addCriterion("ChannelId <", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThanOrEqualTo(String value) { - addCriterion("ChannelId <=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLike(String value) { - addCriterion("ChannelId like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotLike(String value) { - addCriterion("ChannelId not like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdIn(List values) { - addCriterion("ChannelId in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotIn(List values) { - addCriterion("ChannelId not in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdBetween(String value1, String value2) { - addCriterion("ChannelId between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotBetween(String value1, String value2) { - addCriterion("ChannelId not between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andAmountIsNull() { - addCriterion("Amount is null"); - return (Criteria) this; - } - - public Criteria andAmountIsNotNull() { - addCriterion("Amount is not null"); - return (Criteria) this; - } - - public Criteria andAmountEqualTo(Long value) { - addCriterion("Amount =", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotEqualTo(Long value) { - addCriterion("Amount <>", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThan(Long value) { - addCriterion("Amount >", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThanOrEqualTo(Long value) { - addCriterion("Amount >=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThan(Long value) { - addCriterion("Amount <", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThanOrEqualTo(Long value) { - addCriterion("Amount <=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountIn(List values) { - addCriterion("Amount in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotIn(List values) { - addCriterion("Amount not in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountBetween(Long value1, Long value2) { - addCriterion("Amount between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotBetween(Long value1, Long value2) { - addCriterion("Amount not between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNull() { - addCriterion("Currency is null"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNotNull() { - addCriterion("Currency is not null"); - return (Criteria) this; - } - - public Criteria andCurrencyEqualTo(String value) { - addCriterion("Currency =", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotEqualTo(String value) { - addCriterion("Currency <>", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThan(String value) { - addCriterion("Currency >", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThanOrEqualTo(String value) { - addCriterion("Currency >=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThan(String value) { - addCriterion("Currency <", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThanOrEqualTo(String value) { - addCriterion("Currency <=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLike(String value) { - addCriterion("Currency like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotLike(String value) { - addCriterion("Currency not like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyIn(List values) { - addCriterion("Currency in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotIn(List values) { - addCriterion("Currency not in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyBetween(String value1, String value2) { - addCriterion("Currency between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotBetween(String value1, String value2) { - addCriterion("Currency not between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andClientIpIsNull() { - addCriterion("ClientIp is null"); - return (Criteria) this; - } - - public Criteria andClientIpIsNotNull() { - addCriterion("ClientIp is not null"); - return (Criteria) this; - } - - public Criteria andClientIpEqualTo(String value) { - addCriterion("ClientIp =", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotEqualTo(String value) { - addCriterion("ClientIp <>", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThan(String value) { - addCriterion("ClientIp >", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThanOrEqualTo(String value) { - addCriterion("ClientIp >=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThan(String value) { - addCriterion("ClientIp <", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThanOrEqualTo(String value) { - addCriterion("ClientIp <=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLike(String value) { - addCriterion("ClientIp like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotLike(String value) { - addCriterion("ClientIp not like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpIn(List values) { - addCriterion("ClientIp in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotIn(List values) { - addCriterion("ClientIp not in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpBetween(String value1, String value2) { - addCriterion("ClientIp between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotBetween(String value1, String value2) { - addCriterion("ClientIp not between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andDeviceIsNull() { - addCriterion("Device is null"); - return (Criteria) this; - } - - public Criteria andDeviceIsNotNull() { - addCriterion("Device is not null"); - return (Criteria) this; - } - - public Criteria andDeviceEqualTo(String value) { - addCriterion("Device =", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotEqualTo(String value) { - addCriterion("Device <>", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThan(String value) { - addCriterion("Device >", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThanOrEqualTo(String value) { - addCriterion("Device >=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThan(String value) { - addCriterion("Device <", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThanOrEqualTo(String value) { - addCriterion("Device <=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLike(String value) { - addCriterion("Device like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotLike(String value) { - addCriterion("Device not like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceIn(List values) { - addCriterion("Device in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotIn(List values) { - addCriterion("Device not in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceBetween(String value1, String value2) { - addCriterion("Device between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotBetween(String value1, String value2) { - addCriterion("Device not between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andSubjectIsNull() { - addCriterion("Subject is null"); - return (Criteria) this; - } - - public Criteria andSubjectIsNotNull() { - addCriterion("Subject is not null"); - return (Criteria) this; - } - - public Criteria andSubjectEqualTo(String value) { - addCriterion("Subject =", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectNotEqualTo(String value) { - addCriterion("Subject <>", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectGreaterThan(String value) { - addCriterion("Subject >", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectGreaterThanOrEqualTo(String value) { - addCriterion("Subject >=", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectLessThan(String value) { - addCriterion("Subject <", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectLessThanOrEqualTo(String value) { - addCriterion("Subject <=", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectLike(String value) { - addCriterion("Subject like", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectNotLike(String value) { - addCriterion("Subject not like", value, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectIn(List values) { - addCriterion("Subject in", values, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectNotIn(List values) { - addCriterion("Subject not in", values, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectBetween(String value1, String value2) { - addCriterion("Subject between", value1, value2, "subject"); - return (Criteria) this; - } - - public Criteria andSubjectNotBetween(String value1, String value2) { - addCriterion("Subject not between", value1, value2, "subject"); - return (Criteria) this; - } - - public Criteria andBodyIsNull() { - addCriterion("Body is null"); - return (Criteria) this; - } - - public Criteria andBodyIsNotNull() { - addCriterion("Body is not null"); - return (Criteria) this; - } - - public Criteria andBodyEqualTo(String value) { - addCriterion("Body =", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyNotEqualTo(String value) { - addCriterion("Body <>", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyGreaterThan(String value) { - addCriterion("Body >", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyGreaterThanOrEqualTo(String value) { - addCriterion("Body >=", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyLessThan(String value) { - addCriterion("Body <", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyLessThanOrEqualTo(String value) { - addCriterion("Body <=", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyLike(String value) { - addCriterion("Body like", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyNotLike(String value) { - addCriterion("Body not like", value, "body"); - return (Criteria) this; - } - - public Criteria andBodyIn(List values) { - addCriterion("Body in", values, "body"); - return (Criteria) this; - } - - public Criteria andBodyNotIn(List values) { - addCriterion("Body not in", values, "body"); - return (Criteria) this; - } - - public Criteria andBodyBetween(String value1, String value2) { - addCriterion("Body between", value1, value2, "body"); - return (Criteria) this; - } - - public Criteria andBodyNotBetween(String value1, String value2) { - addCriterion("Body not between", value1, value2, "body"); - return (Criteria) this; - } - - public Criteria andExtraIsNull() { - addCriterion("Extra is null"); - return (Criteria) this; - } - - public Criteria andExtraIsNotNull() { - addCriterion("Extra is not null"); - return (Criteria) this; - } - - public Criteria andExtraEqualTo(String value) { - addCriterion("Extra =", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotEqualTo(String value) { - addCriterion("Extra <>", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThan(String value) { - addCriterion("Extra >", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThanOrEqualTo(String value) { - addCriterion("Extra >=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThan(String value) { - addCriterion("Extra <", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThanOrEqualTo(String value) { - addCriterion("Extra <=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLike(String value) { - addCriterion("Extra like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotLike(String value) { - addCriterion("Extra not like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraIn(List values) { - addCriterion("Extra in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotIn(List values) { - addCriterion("Extra not in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraBetween(String value1, String value2) { - addCriterion("Extra between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotBetween(String value1, String value2) { - addCriterion("Extra not between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNull() { - addCriterion("ChannelMchId is null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNotNull() { - addCriterion("ChannelMchId is not null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdEqualTo(String value) { - addCriterion("ChannelMchId =", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotEqualTo(String value) { - addCriterion("ChannelMchId <>", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThan(String value) { - addCriterion("ChannelMchId >", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelMchId >=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThan(String value) { - addCriterion("ChannelMchId <", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThanOrEqualTo(String value) { - addCriterion("ChannelMchId <=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLike(String value) { - addCriterion("ChannelMchId like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotLike(String value) { - addCriterion("ChannelMchId not like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIn(List values) { - addCriterion("ChannelMchId in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotIn(List values) { - addCriterion("ChannelMchId not in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdBetween(String value1, String value2) { - addCriterion("ChannelMchId between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotBetween(String value1, String value2) { - addCriterion("ChannelMchId not between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNull() { - addCriterion("ChannelOrderNo is null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNotNull() { - addCriterion("ChannelOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoEqualTo(String value) { - addCriterion("ChannelOrderNo =", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotEqualTo(String value) { - addCriterion("ChannelOrderNo <>", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThan(String value) { - addCriterion("ChannelOrderNo >", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo >=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThan(String value) { - addCriterion("ChannelOrderNo <", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo <=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLike(String value) { - addCriterion("ChannelOrderNo like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotLike(String value) { - addCriterion("ChannelOrderNo not like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIn(List values) { - addCriterion("ChannelOrderNo in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotIn(List values) { - addCriterion("ChannelOrderNo not in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoBetween(String value1, String value2) { - addCriterion("ChannelOrderNo between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotBetween(String value1, String value2) { - addCriterion("ChannelOrderNo not between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andErrCodeIsNull() { - addCriterion("ErrCode is null"); - return (Criteria) this; - } - - public Criteria andErrCodeIsNotNull() { - addCriterion("ErrCode is not null"); - return (Criteria) this; - } - - public Criteria andErrCodeEqualTo(String value) { - addCriterion("ErrCode =", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeNotEqualTo(String value) { - addCriterion("ErrCode <>", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeGreaterThan(String value) { - addCriterion("ErrCode >", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeGreaterThanOrEqualTo(String value) { - addCriterion("ErrCode >=", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeLessThan(String value) { - addCriterion("ErrCode <", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeLessThanOrEqualTo(String value) { - addCriterion("ErrCode <=", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeLike(String value) { - addCriterion("ErrCode like", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeNotLike(String value) { - addCriterion("ErrCode not like", value, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeIn(List values) { - addCriterion("ErrCode in", values, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeNotIn(List values) { - addCriterion("ErrCode not in", values, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeBetween(String value1, String value2) { - addCriterion("ErrCode between", value1, value2, "errCode"); - return (Criteria) this; - } - - public Criteria andErrCodeNotBetween(String value1, String value2) { - addCriterion("ErrCode not between", value1, value2, "errCode"); - return (Criteria) this; - } - - public Criteria andErrMsgIsNull() { - addCriterion("ErrMsg is null"); - return (Criteria) this; - } - - public Criteria andErrMsgIsNotNull() { - addCriterion("ErrMsg is not null"); - return (Criteria) this; - } - - public Criteria andErrMsgEqualTo(String value) { - addCriterion("ErrMsg =", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgNotEqualTo(String value) { - addCriterion("ErrMsg <>", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgGreaterThan(String value) { - addCriterion("ErrMsg >", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgGreaterThanOrEqualTo(String value) { - addCriterion("ErrMsg >=", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgLessThan(String value) { - addCriterion("ErrMsg <", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgLessThanOrEqualTo(String value) { - addCriterion("ErrMsg <=", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgLike(String value) { - addCriterion("ErrMsg like", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgNotLike(String value) { - addCriterion("ErrMsg not like", value, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgIn(List values) { - addCriterion("ErrMsg in", values, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgNotIn(List values) { - addCriterion("ErrMsg not in", values, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgBetween(String value1, String value2) { - addCriterion("ErrMsg between", value1, value2, "errMsg"); - return (Criteria) this; - } - - public Criteria andErrMsgNotBetween(String value1, String value2) { - addCriterion("ErrMsg not between", value1, value2, "errMsg"); - return (Criteria) this; - } - - public Criteria andParam1IsNull() { - addCriterion("Param1 is null"); - return (Criteria) this; - } - - public Criteria andParam1IsNotNull() { - addCriterion("Param1 is not null"); - return (Criteria) this; - } - - public Criteria andParam1EqualTo(String value) { - addCriterion("Param1 =", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotEqualTo(String value) { - addCriterion("Param1 <>", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThan(String value) { - addCriterion("Param1 >", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThanOrEqualTo(String value) { - addCriterion("Param1 >=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThan(String value) { - addCriterion("Param1 <", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThanOrEqualTo(String value) { - addCriterion("Param1 <=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Like(String value) { - addCriterion("Param1 like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotLike(String value) { - addCriterion("Param1 not like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1In(List values) { - addCriterion("Param1 in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotIn(List values) { - addCriterion("Param1 not in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Between(String value1, String value2) { - addCriterion("Param1 between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotBetween(String value1, String value2) { - addCriterion("Param1 not between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam2IsNull() { - addCriterion("Param2 is null"); - return (Criteria) this; - } - - public Criteria andParam2IsNotNull() { - addCriterion("Param2 is not null"); - return (Criteria) this; - } - - public Criteria andParam2EqualTo(String value) { - addCriterion("Param2 =", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotEqualTo(String value) { - addCriterion("Param2 <>", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThan(String value) { - addCriterion("Param2 >", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThanOrEqualTo(String value) { - addCriterion("Param2 >=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThan(String value) { - addCriterion("Param2 <", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThanOrEqualTo(String value) { - addCriterion("Param2 <=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Like(String value) { - addCriterion("Param2 like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotLike(String value) { - addCriterion("Param2 not like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2In(List values) { - addCriterion("Param2 in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotIn(List values) { - addCriterion("Param2 not in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Between(String value1, String value2) { - addCriterion("Param2 between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotBetween(String value1, String value2) { - addCriterion("Param2 not between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNull() { - addCriterion("NotifyUrl is null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNotNull() { - addCriterion("NotifyUrl is not null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlEqualTo(String value) { - addCriterion("NotifyUrl =", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotEqualTo(String value) { - addCriterion("NotifyUrl <>", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThan(String value) { - addCriterion("NotifyUrl >", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThanOrEqualTo(String value) { - addCriterion("NotifyUrl >=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThan(String value) { - addCriterion("NotifyUrl <", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThanOrEqualTo(String value) { - addCriterion("NotifyUrl <=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLike(String value) { - addCriterion("NotifyUrl like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotLike(String value) { - addCriterion("NotifyUrl not like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIn(List values) { - addCriterion("NotifyUrl in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotIn(List values) { - addCriterion("NotifyUrl not in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlBetween(String value1, String value2) { - addCriterion("NotifyUrl between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotBetween(String value1, String value2) { - addCriterion("NotifyUrl not between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyCountIsNull() { - addCriterion("NotifyCount is null"); - return (Criteria) this; - } - - public Criteria andNotifyCountIsNotNull() { - addCriterion("NotifyCount is not null"); - return (Criteria) this; - } - - public Criteria andNotifyCountEqualTo(Byte value) { - addCriterion("NotifyCount =", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotEqualTo(Byte value) { - addCriterion("NotifyCount <>", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountGreaterThan(Byte value) { - addCriterion("NotifyCount >", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountGreaterThanOrEqualTo(Byte value) { - addCriterion("NotifyCount >=", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountLessThan(Byte value) { - addCriterion("NotifyCount <", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountLessThanOrEqualTo(Byte value) { - addCriterion("NotifyCount <=", value, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountIn(List values) { - addCriterion("NotifyCount in", values, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotIn(List values) { - addCriterion("NotifyCount not in", values, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountBetween(Byte value1, Byte value2) { - addCriterion("NotifyCount between", value1, value2, "notifyCount"); - return (Criteria) this; - } - - public Criteria andNotifyCountNotBetween(Byte value1, Byte value2) { - addCriterion("NotifyCount not between", value1, value2, "notifyCount"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIsNull() { - addCriterion("LastNotifyTime is null"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIsNotNull() { - addCriterion("LastNotifyTime is not null"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeEqualTo(Long value) { - addCriterion("LastNotifyTime =", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotEqualTo(Long value) { - addCriterion("LastNotifyTime <>", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeGreaterThan(Long value) { - addCriterion("LastNotifyTime >", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeGreaterThanOrEqualTo(Long value) { - addCriterion("LastNotifyTime >=", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeLessThan(Long value) { - addCriterion("LastNotifyTime <", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeLessThanOrEqualTo(Long value) { - addCriterion("LastNotifyTime <=", value, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeIn(List values) { - addCriterion("LastNotifyTime in", values, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotIn(List values) { - addCriterion("LastNotifyTime not in", values, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeBetween(Long value1, Long value2) { - addCriterion("LastNotifyTime between", value1, value2, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andLastNotifyTimeNotBetween(Long value1, Long value2) { - addCriterion("LastNotifyTime not between", value1, value2, "lastNotifyTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNull() { - addCriterion("ExpireTime is null"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNotNull() { - addCriterion("ExpireTime is not null"); - return (Criteria) this; - } - - public Criteria andExpireTimeEqualTo(Long value) { - addCriterion("ExpireTime =", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotEqualTo(Long value) { - addCriterion("ExpireTime <>", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThan(Long value) { - addCriterion("ExpireTime >", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThanOrEqualTo(Long value) { - addCriterion("ExpireTime >=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThan(Long value) { - addCriterion("ExpireTime <", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThanOrEqualTo(Long value) { - addCriterion("ExpireTime <=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeIn(List values) { - addCriterion("ExpireTime in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotIn(List values) { - addCriterion("ExpireTime not in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeBetween(Long value1, Long value2) { - addCriterion("ExpireTime between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotBetween(Long value1, Long value2) { - addCriterion("ExpireTime not between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeIsNull() { - addCriterion("PaySuccTime is null"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeIsNotNull() { - addCriterion("PaySuccTime is not null"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeEqualTo(Long value) { - addCriterion("PaySuccTime =", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeNotEqualTo(Long value) { - addCriterion("PaySuccTime <>", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeGreaterThan(Long value) { - addCriterion("PaySuccTime >", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeGreaterThanOrEqualTo(Long value) { - addCriterion("PaySuccTime >=", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeLessThan(Long value) { - addCriterion("PaySuccTime <", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeLessThanOrEqualTo(Long value) { - addCriterion("PaySuccTime <=", value, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeIn(List values) { - addCriterion("PaySuccTime in", values, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeNotIn(List values) { - addCriterion("PaySuccTime not in", values, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeBetween(Long value1, Long value2) { - addCriterion("PaySuccTime between", value1, value2, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andPaySuccTimeNotBetween(Long value1, Long value2) { - addCriterion("PaySuccTime not between", value1, value2, "paySuccTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrder.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrder.java deleted file mode 100644 index f868d84d12ec497c9d4a9af5178b54139052193c..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrder.java +++ /dev/null @@ -1,543 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class RefundOrder implements Serializable { - /** - * 退款订单号 - * - * @mbggenerated - */ - private String refundOrderId; - - /** - * 支付订单号 - * - * @mbggenerated - */ - private String payOrderId; - - /** - * 渠道支付单号 - * - * @mbggenerated - */ - private String channelPayOrderNo; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 商户退款单号 - * - * @mbggenerated - */ - private String mchRefundNo; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String channelId; - - /** - * 支付金额,单位分 - * - * @mbggenerated - */ - private Long payAmount; - - /** - * 退款金额,单位分 - * - * @mbggenerated - */ - private Long refundAmount; - - /** - * 三位货币代码,人民币:cny - * - * @mbggenerated - */ - private String currency; - - /** - * 退款状态:0-订单生成,1-退款中,2-退款成功,3-退款失败,4-业务处理完成 - * - * @mbggenerated - */ - private Byte status; - - /** - * 退款结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败 - * - * @mbggenerated - */ - private Byte result; - - /** - * 客户端IP - * - * @mbggenerated - */ - private String clientIp; - - /** - * 设备 - * - * @mbggenerated - */ - private String device; - - /** - * 备注 - * - * @mbggenerated - */ - private String remarkInfo; - - /** - * 渠道用户标识,如微信openId,支付宝账号 - * - * @mbggenerated - */ - private String channelUser; - - /** - * 用户姓名 - * - * @mbggenerated - */ - private String userName; - - /** - * 渠道商户ID - * - * @mbggenerated - */ - private String channelMchId; - - /** - * 渠道订单号 - * - * @mbggenerated - */ - private String channelOrderNo; - - /** - * 渠道错误码 - * - * @mbggenerated - */ - private String channelErrCode; - - /** - * 渠道错误描述 - * - * @mbggenerated - */ - private String channelErrMsg; - - /** - * 特定渠道发起时额外参数 - * - * @mbggenerated - */ - private String extra; - - /** - * 通知地址 - * - * @mbggenerated - */ - private String notifyUrl; - - /** - * 扩展参数1 - * - * @mbggenerated - */ - private String param1; - - /** - * 扩展参数2 - * - * @mbggenerated - */ - private String param2; - - /** - * 订单失效时间 - * - * @mbggenerated - */ - private Date expireTime; - - /** - * 订单退款成功时间 - * - * @mbggenerated - */ - private Date refundSuccTime; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getRefundOrderId() { - return refundOrderId; - } - - public void setRefundOrderId(String refundOrderId) { - this.refundOrderId = refundOrderId; - } - - public String getPayOrderId() { - return payOrderId; - } - - public void setPayOrderId(String payOrderId) { - this.payOrderId = payOrderId; - } - - public String getChannelPayOrderNo() { - return channelPayOrderNo; - } - - public void setChannelPayOrderNo(String channelPayOrderNo) { - this.channelPayOrderNo = channelPayOrderNo; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getMchRefundNo() { - return mchRefundNo; - } - - public void setMchRefundNo(String mchRefundNo) { - this.mchRefundNo = mchRefundNo; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public Long getPayAmount() { - return payAmount; - } - - public void setPayAmount(Long payAmount) { - this.payAmount = payAmount; - } - - public Long getRefundAmount() { - return refundAmount; - } - - public void setRefundAmount(Long refundAmount) { - this.refundAmount = refundAmount; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public Byte getResult() { - return result; - } - - public void setResult(Byte result) { - this.result = result; - } - - public String getClientIp() { - return clientIp; - } - - public void setClientIp(String clientIp) { - this.clientIp = clientIp; - } - - public String getDevice() { - return device; - } - - public void setDevice(String device) { - this.device = device; - } - - public String getRemarkInfo() { - return remarkInfo; - } - - public void setRemarkInfo(String remarkInfo) { - this.remarkInfo = remarkInfo; - } - - public String getChannelUser() { - return channelUser; - } - - public void setChannelUser(String channelUser) { - this.channelUser = channelUser; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getChannelMchId() { - return channelMchId; - } - - public void setChannelMchId(String channelMchId) { - this.channelMchId = channelMchId; - } - - public String getChannelOrderNo() { - return channelOrderNo; - } - - public void setChannelOrderNo(String channelOrderNo) { - this.channelOrderNo = channelOrderNo; - } - - public String getChannelErrCode() { - return channelErrCode; - } - - public void setChannelErrCode(String channelErrCode) { - this.channelErrCode = channelErrCode; - } - - public String getChannelErrMsg() { - return channelErrMsg; - } - - public void setChannelErrMsg(String channelErrMsg) { - this.channelErrMsg = channelErrMsg; - } - - public String getExtra() { - return extra; - } - - public void setExtra(String extra) { - this.extra = extra; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } - - public String getParam1() { - return param1; - } - - public void setParam1(String param1) { - this.param1 = param1; - } - - public String getParam2() { - return param2; - } - - public void setParam2(String param2) { - this.param2 = param2; - } - - public Date getExpireTime() { - return expireTime; - } - - public void setExpireTime(Date expireTime) { - this.expireTime = expireTime; - } - - public Date getRefundSuccTime() { - return refundSuccTime; - } - - public void setRefundSuccTime(Date refundSuccTime) { - this.refundSuccTime = refundSuccTime; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", refundOrderId=").append(refundOrderId); - sb.append(", payOrderId=").append(payOrderId); - sb.append(", channelPayOrderNo=").append(channelPayOrderNo); - sb.append(", mchId=").append(mchId); - sb.append(", mchRefundNo=").append(mchRefundNo); - sb.append(", channelId=").append(channelId); - sb.append(", payAmount=").append(payAmount); - sb.append(", refundAmount=").append(refundAmount); - sb.append(", currency=").append(currency); - sb.append(", status=").append(status); - sb.append(", result=").append(result); - sb.append(", clientIp=").append(clientIp); - sb.append(", device=").append(device); - sb.append(", remarkInfo=").append(remarkInfo); - sb.append(", channelUser=").append(channelUser); - sb.append(", userName=").append(userName); - sb.append(", channelMchId=").append(channelMchId); - sb.append(", channelOrderNo=").append(channelOrderNo); - sb.append(", channelErrCode=").append(channelErrCode); - sb.append(", channelErrMsg=").append(channelErrMsg); - sb.append(", extra=").append(extra); - sb.append(", notifyUrl=").append(notifyUrl); - sb.append(", param1=").append(param1); - sb.append(", param2=").append(param2); - sb.append(", expireTime=").append(expireTime); - sb.append(", refundSuccTime=").append(refundSuccTime); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - RefundOrder other = (RefundOrder) that; - return (this.getRefundOrderId() == null ? other.getRefundOrderId() == null : this.getRefundOrderId().equals(other.getRefundOrderId())) - && (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId())) - && (this.getChannelPayOrderNo() == null ? other.getChannelPayOrderNo() == null : this.getChannelPayOrderNo().equals(other.getChannelPayOrderNo())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getMchRefundNo() == null ? other.getMchRefundNo() == null : this.getMchRefundNo().equals(other.getMchRefundNo())) - && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) - && (this.getPayAmount() == null ? other.getPayAmount() == null : this.getPayAmount().equals(other.getPayAmount())) - && (this.getRefundAmount() == null ? other.getRefundAmount() == null : this.getRefundAmount().equals(other.getRefundAmount())) - && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())) - && (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp())) - && (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice())) - && (this.getRemarkInfo() == null ? other.getRemarkInfo() == null : this.getRemarkInfo().equals(other.getRemarkInfo())) - && (this.getChannelUser() == null ? other.getChannelUser() == null : this.getChannelUser().equals(other.getChannelUser())) - && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) - && (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId())) - && (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo())) - && (this.getChannelErrCode() == null ? other.getChannelErrCode() == null : this.getChannelErrCode().equals(other.getChannelErrCode())) - && (this.getChannelErrMsg() == null ? other.getChannelErrMsg() == null : this.getChannelErrMsg().equals(other.getChannelErrMsg())) - && (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra())) - && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) - && (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1())) - && (this.getParam2() == null ? other.getParam2() == null : this.getParam2().equals(other.getParam2())) - && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime())) - && (this.getRefundSuccTime() == null ? other.getRefundSuccTime() == null : this.getRefundSuccTime().equals(other.getRefundSuccTime())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getRefundOrderId() == null) ? 0 : getRefundOrderId().hashCode()); - result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode()); - result = prime * result + ((getChannelPayOrderNo() == null) ? 0 : getChannelPayOrderNo().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getMchRefundNo() == null) ? 0 : getMchRefundNo().hashCode()); - result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); - result = prime * result + ((getPayAmount() == null) ? 0 : getPayAmount().hashCode()); - result = prime * result + ((getRefundAmount() == null) ? 0 : getRefundAmount().hashCode()); - result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); - result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode()); - result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode()); - result = prime * result + ((getRemarkInfo() == null) ? 0 : getRemarkInfo().hashCode()); - result = prime * result + ((getChannelUser() == null) ? 0 : getChannelUser().hashCode()); - result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); - result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode()); - result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode()); - result = prime * result + ((getChannelErrCode() == null) ? 0 : getChannelErrCode().hashCode()); - result = prime * result + ((getChannelErrMsg() == null) ? 0 : getChannelErrMsg().hashCode()); - result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode()); - result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); - result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode()); - result = prime * result + ((getParam2() == null) ? 0 : getParam2().hashCode()); - result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode()); - result = prime * result + ((getRefundSuccTime() == null) ? 0 : getRefundSuccTime().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrderExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrderExample.java deleted file mode 100644 index 7c349de305d23093735dc4432528d7d205772edc..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/RefundOrderExample.java +++ /dev/null @@ -1,2104 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class RefundOrderExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public RefundOrderExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andRefundOrderIdIsNull() { - addCriterion("RefundOrderId is null"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdIsNotNull() { - addCriterion("RefundOrderId is not null"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdEqualTo(String value) { - addCriterion("RefundOrderId =", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdNotEqualTo(String value) { - addCriterion("RefundOrderId <>", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdGreaterThan(String value) { - addCriterion("RefundOrderId >", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("RefundOrderId >=", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdLessThan(String value) { - addCriterion("RefundOrderId <", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdLessThanOrEqualTo(String value) { - addCriterion("RefundOrderId <=", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdLike(String value) { - addCriterion("RefundOrderId like", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdNotLike(String value) { - addCriterion("RefundOrderId not like", value, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdIn(List values) { - addCriterion("RefundOrderId in", values, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdNotIn(List values) { - addCriterion("RefundOrderId not in", values, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdBetween(String value1, String value2) { - addCriterion("RefundOrderId between", value1, value2, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andRefundOrderIdNotBetween(String value1, String value2) { - addCriterion("RefundOrderId not between", value1, value2, "refundOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNull() { - addCriterion("PayOrderId is null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNotNull() { - addCriterion("PayOrderId is not null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdEqualTo(String value) { - addCriterion("PayOrderId =", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotEqualTo(String value) { - addCriterion("PayOrderId <>", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThan(String value) { - addCriterion("PayOrderId >", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("PayOrderId >=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThan(String value) { - addCriterion("PayOrderId <", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThanOrEqualTo(String value) { - addCriterion("PayOrderId <=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLike(String value) { - addCriterion("PayOrderId like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotLike(String value) { - addCriterion("PayOrderId not like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIn(List values) { - addCriterion("PayOrderId in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotIn(List values) { - addCriterion("PayOrderId not in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdBetween(String value1, String value2) { - addCriterion("PayOrderId between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotBetween(String value1, String value2) { - addCriterion("PayOrderId not between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoIsNull() { - addCriterion("ChannelPayOrderNo is null"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoIsNotNull() { - addCriterion("ChannelPayOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoEqualTo(String value) { - addCriterion("ChannelPayOrderNo =", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoNotEqualTo(String value) { - addCriterion("ChannelPayOrderNo <>", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoGreaterThan(String value) { - addCriterion("ChannelPayOrderNo >", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("ChannelPayOrderNo >=", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoLessThan(String value) { - addCriterion("ChannelPayOrderNo <", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoLessThanOrEqualTo(String value) { - addCriterion("ChannelPayOrderNo <=", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoLike(String value) { - addCriterion("ChannelPayOrderNo like", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoNotLike(String value) { - addCriterion("ChannelPayOrderNo not like", value, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoIn(List values) { - addCriterion("ChannelPayOrderNo in", values, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoNotIn(List values) { - addCriterion("ChannelPayOrderNo not in", values, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoBetween(String value1, String value2) { - addCriterion("ChannelPayOrderNo between", value1, value2, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelPayOrderNoNotBetween(String value1, String value2) { - addCriterion("ChannelPayOrderNo not between", value1, value2, "channelPayOrderNo"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchRefundNoIsNull() { - addCriterion("MchRefundNo is null"); - return (Criteria) this; - } - - public Criteria andMchRefundNoIsNotNull() { - addCriterion("MchRefundNo is not null"); - return (Criteria) this; - } - - public Criteria andMchRefundNoEqualTo(String value) { - addCriterion("MchRefundNo =", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoNotEqualTo(String value) { - addCriterion("MchRefundNo <>", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoGreaterThan(String value) { - addCriterion("MchRefundNo >", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoGreaterThanOrEqualTo(String value) { - addCriterion("MchRefundNo >=", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoLessThan(String value) { - addCriterion("MchRefundNo <", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoLessThanOrEqualTo(String value) { - addCriterion("MchRefundNo <=", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoLike(String value) { - addCriterion("MchRefundNo like", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoNotLike(String value) { - addCriterion("MchRefundNo not like", value, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoIn(List values) { - addCriterion("MchRefundNo in", values, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoNotIn(List values) { - addCriterion("MchRefundNo not in", values, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoBetween(String value1, String value2) { - addCriterion("MchRefundNo between", value1, value2, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andMchRefundNoNotBetween(String value1, String value2) { - addCriterion("MchRefundNo not between", value1, value2, "mchRefundNo"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNull() { - addCriterion("ChannelId is null"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNotNull() { - addCriterion("ChannelId is not null"); - return (Criteria) this; - } - - public Criteria andChannelIdEqualTo(String value) { - addCriterion("ChannelId =", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotEqualTo(String value) { - addCriterion("ChannelId <>", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThan(String value) { - addCriterion("ChannelId >", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelId >=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThan(String value) { - addCriterion("ChannelId <", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThanOrEqualTo(String value) { - addCriterion("ChannelId <=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLike(String value) { - addCriterion("ChannelId like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotLike(String value) { - addCriterion("ChannelId not like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdIn(List values) { - addCriterion("ChannelId in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotIn(List values) { - addCriterion("ChannelId not in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdBetween(String value1, String value2) { - addCriterion("ChannelId between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotBetween(String value1, String value2) { - addCriterion("ChannelId not between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andPayAmountIsNull() { - addCriterion("PayAmount is null"); - return (Criteria) this; - } - - public Criteria andPayAmountIsNotNull() { - addCriterion("PayAmount is not null"); - return (Criteria) this; - } - - public Criteria andPayAmountEqualTo(Long value) { - addCriterion("PayAmount =", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountNotEqualTo(Long value) { - addCriterion("PayAmount <>", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountGreaterThan(Long value) { - addCriterion("PayAmount >", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountGreaterThanOrEqualTo(Long value) { - addCriterion("PayAmount >=", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountLessThan(Long value) { - addCriterion("PayAmount <", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountLessThanOrEqualTo(Long value) { - addCriterion("PayAmount <=", value, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountIn(List values) { - addCriterion("PayAmount in", values, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountNotIn(List values) { - addCriterion("PayAmount not in", values, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountBetween(Long value1, Long value2) { - addCriterion("PayAmount between", value1, value2, "payAmount"); - return (Criteria) this; - } - - public Criteria andPayAmountNotBetween(Long value1, Long value2) { - addCriterion("PayAmount not between", value1, value2, "payAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountIsNull() { - addCriterion("RefundAmount is null"); - return (Criteria) this; - } - - public Criteria andRefundAmountIsNotNull() { - addCriterion("RefundAmount is not null"); - return (Criteria) this; - } - - public Criteria andRefundAmountEqualTo(Long value) { - addCriterion("RefundAmount =", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountNotEqualTo(Long value) { - addCriterion("RefundAmount <>", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountGreaterThan(Long value) { - addCriterion("RefundAmount >", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountGreaterThanOrEqualTo(Long value) { - addCriterion("RefundAmount >=", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountLessThan(Long value) { - addCriterion("RefundAmount <", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountLessThanOrEqualTo(Long value) { - addCriterion("RefundAmount <=", value, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountIn(List values) { - addCriterion("RefundAmount in", values, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountNotIn(List values) { - addCriterion("RefundAmount not in", values, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountBetween(Long value1, Long value2) { - addCriterion("RefundAmount between", value1, value2, "refundAmount"); - return (Criteria) this; - } - - public Criteria andRefundAmountNotBetween(Long value1, Long value2) { - addCriterion("RefundAmount not between", value1, value2, "refundAmount"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNull() { - addCriterion("Currency is null"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNotNull() { - addCriterion("Currency is not null"); - return (Criteria) this; - } - - public Criteria andCurrencyEqualTo(String value) { - addCriterion("Currency =", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotEqualTo(String value) { - addCriterion("Currency <>", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThan(String value) { - addCriterion("Currency >", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThanOrEqualTo(String value) { - addCriterion("Currency >=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThan(String value) { - addCriterion("Currency <", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThanOrEqualTo(String value) { - addCriterion("Currency <=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLike(String value) { - addCriterion("Currency like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotLike(String value) { - addCriterion("Currency not like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyIn(List values) { - addCriterion("Currency in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotIn(List values) { - addCriterion("Currency not in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyBetween(String value1, String value2) { - addCriterion("Currency between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotBetween(String value1, String value2) { - addCriterion("Currency not between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andResultIsNull() { - addCriterion("Result is null"); - return (Criteria) this; - } - - public Criteria andResultIsNotNull() { - addCriterion("Result is not null"); - return (Criteria) this; - } - - public Criteria andResultEqualTo(Byte value) { - addCriterion("Result =", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotEqualTo(Byte value) { - addCriterion("Result <>", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThan(Byte value) { - addCriterion("Result >", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThanOrEqualTo(Byte value) { - addCriterion("Result >=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThan(Byte value) { - addCriterion("Result <", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThanOrEqualTo(Byte value) { - addCriterion("Result <=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultIn(List values) { - addCriterion("Result in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultNotIn(List values) { - addCriterion("Result not in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultBetween(Byte value1, Byte value2) { - addCriterion("Result between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andResultNotBetween(Byte value1, Byte value2) { - addCriterion("Result not between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andClientIpIsNull() { - addCriterion("ClientIp is null"); - return (Criteria) this; - } - - public Criteria andClientIpIsNotNull() { - addCriterion("ClientIp is not null"); - return (Criteria) this; - } - - public Criteria andClientIpEqualTo(String value) { - addCriterion("ClientIp =", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotEqualTo(String value) { - addCriterion("ClientIp <>", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThan(String value) { - addCriterion("ClientIp >", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThanOrEqualTo(String value) { - addCriterion("ClientIp >=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThan(String value) { - addCriterion("ClientIp <", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThanOrEqualTo(String value) { - addCriterion("ClientIp <=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLike(String value) { - addCriterion("ClientIp like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotLike(String value) { - addCriterion("ClientIp not like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpIn(List values) { - addCriterion("ClientIp in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotIn(List values) { - addCriterion("ClientIp not in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpBetween(String value1, String value2) { - addCriterion("ClientIp between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotBetween(String value1, String value2) { - addCriterion("ClientIp not between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andDeviceIsNull() { - addCriterion("Device is null"); - return (Criteria) this; - } - - public Criteria andDeviceIsNotNull() { - addCriterion("Device is not null"); - return (Criteria) this; - } - - public Criteria andDeviceEqualTo(String value) { - addCriterion("Device =", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotEqualTo(String value) { - addCriterion("Device <>", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThan(String value) { - addCriterion("Device >", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThanOrEqualTo(String value) { - addCriterion("Device >=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThan(String value) { - addCriterion("Device <", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThanOrEqualTo(String value) { - addCriterion("Device <=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLike(String value) { - addCriterion("Device like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotLike(String value) { - addCriterion("Device not like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceIn(List values) { - addCriterion("Device in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotIn(List values) { - addCriterion("Device not in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceBetween(String value1, String value2) { - addCriterion("Device between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotBetween(String value1, String value2) { - addCriterion("Device not between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIsNull() { - addCriterion("RemarkInfo is null"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIsNotNull() { - addCriterion("RemarkInfo is not null"); - return (Criteria) this; - } - - public Criteria andRemarkInfoEqualTo(String value) { - addCriterion("RemarkInfo =", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotEqualTo(String value) { - addCriterion("RemarkInfo <>", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoGreaterThan(String value) { - addCriterion("RemarkInfo >", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoGreaterThanOrEqualTo(String value) { - addCriterion("RemarkInfo >=", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLessThan(String value) { - addCriterion("RemarkInfo <", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLessThanOrEqualTo(String value) { - addCriterion("RemarkInfo <=", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLike(String value) { - addCriterion("RemarkInfo like", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotLike(String value) { - addCriterion("RemarkInfo not like", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIn(List values) { - addCriterion("RemarkInfo in", values, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotIn(List values) { - addCriterion("RemarkInfo not in", values, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoBetween(String value1, String value2) { - addCriterion("RemarkInfo between", value1, value2, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotBetween(String value1, String value2) { - addCriterion("RemarkInfo not between", value1, value2, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andChannelUserIsNull() { - addCriterion("ChannelUser is null"); - return (Criteria) this; - } - - public Criteria andChannelUserIsNotNull() { - addCriterion("ChannelUser is not null"); - return (Criteria) this; - } - - public Criteria andChannelUserEqualTo(String value) { - addCriterion("ChannelUser =", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotEqualTo(String value) { - addCriterion("ChannelUser <>", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserGreaterThan(String value) { - addCriterion("ChannelUser >", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserGreaterThanOrEqualTo(String value) { - addCriterion("ChannelUser >=", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLessThan(String value) { - addCriterion("ChannelUser <", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLessThanOrEqualTo(String value) { - addCriterion("ChannelUser <=", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLike(String value) { - addCriterion("ChannelUser like", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotLike(String value) { - addCriterion("ChannelUser not like", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserIn(List values) { - addCriterion("ChannelUser in", values, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotIn(List values) { - addCriterion("ChannelUser not in", values, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserBetween(String value1, String value2) { - addCriterion("ChannelUser between", value1, value2, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotBetween(String value1, String value2) { - addCriterion("ChannelUser not between", value1, value2, "channelUser"); - return (Criteria) this; - } - - public Criteria andUserNameIsNull() { - addCriterion("UserName is null"); - return (Criteria) this; - } - - public Criteria andUserNameIsNotNull() { - addCriterion("UserName is not null"); - return (Criteria) this; - } - - public Criteria andUserNameEqualTo(String value) { - addCriterion("UserName =", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotEqualTo(String value) { - addCriterion("UserName <>", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameGreaterThan(String value) { - addCriterion("UserName >", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameGreaterThanOrEqualTo(String value) { - addCriterion("UserName >=", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLessThan(String value) { - addCriterion("UserName <", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLessThanOrEqualTo(String value) { - addCriterion("UserName <=", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLike(String value) { - addCriterion("UserName like", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotLike(String value) { - addCriterion("UserName not like", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameIn(List values) { - addCriterion("UserName in", values, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotIn(List values) { - addCriterion("UserName not in", values, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameBetween(String value1, String value2) { - addCriterion("UserName between", value1, value2, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotBetween(String value1, String value2) { - addCriterion("UserName not between", value1, value2, "userName"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNull() { - addCriterion("ChannelMchId is null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNotNull() { - addCriterion("ChannelMchId is not null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdEqualTo(String value) { - addCriterion("ChannelMchId =", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotEqualTo(String value) { - addCriterion("ChannelMchId <>", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThan(String value) { - addCriterion("ChannelMchId >", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelMchId >=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThan(String value) { - addCriterion("ChannelMchId <", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThanOrEqualTo(String value) { - addCriterion("ChannelMchId <=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLike(String value) { - addCriterion("ChannelMchId like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotLike(String value) { - addCriterion("ChannelMchId not like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIn(List values) { - addCriterion("ChannelMchId in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotIn(List values) { - addCriterion("ChannelMchId not in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdBetween(String value1, String value2) { - addCriterion("ChannelMchId between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotBetween(String value1, String value2) { - addCriterion("ChannelMchId not between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNull() { - addCriterion("ChannelOrderNo is null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNotNull() { - addCriterion("ChannelOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoEqualTo(String value) { - addCriterion("ChannelOrderNo =", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotEqualTo(String value) { - addCriterion("ChannelOrderNo <>", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThan(String value) { - addCriterion("ChannelOrderNo >", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo >=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThan(String value) { - addCriterion("ChannelOrderNo <", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo <=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLike(String value) { - addCriterion("ChannelOrderNo like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotLike(String value) { - addCriterion("ChannelOrderNo not like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIn(List values) { - addCriterion("ChannelOrderNo in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotIn(List values) { - addCriterion("ChannelOrderNo not in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoBetween(String value1, String value2) { - addCriterion("ChannelOrderNo between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotBetween(String value1, String value2) { - addCriterion("ChannelOrderNo not between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIsNull() { - addCriterion("ChannelErrCode is null"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIsNotNull() { - addCriterion("ChannelErrCode is not null"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeEqualTo(String value) { - addCriterion("ChannelErrCode =", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotEqualTo(String value) { - addCriterion("ChannelErrCode <>", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeGreaterThan(String value) { - addCriterion("ChannelErrCode >", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeGreaterThanOrEqualTo(String value) { - addCriterion("ChannelErrCode >=", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLessThan(String value) { - addCriterion("ChannelErrCode <", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLessThanOrEqualTo(String value) { - addCriterion("ChannelErrCode <=", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLike(String value) { - addCriterion("ChannelErrCode like", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotLike(String value) { - addCriterion("ChannelErrCode not like", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIn(List values) { - addCriterion("ChannelErrCode in", values, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotIn(List values) { - addCriterion("ChannelErrCode not in", values, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeBetween(String value1, String value2) { - addCriterion("ChannelErrCode between", value1, value2, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotBetween(String value1, String value2) { - addCriterion("ChannelErrCode not between", value1, value2, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIsNull() { - addCriterion("ChannelErrMsg is null"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIsNotNull() { - addCriterion("ChannelErrMsg is not null"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgEqualTo(String value) { - addCriterion("ChannelErrMsg =", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotEqualTo(String value) { - addCriterion("ChannelErrMsg <>", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgGreaterThan(String value) { - addCriterion("ChannelErrMsg >", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgGreaterThanOrEqualTo(String value) { - addCriterion("ChannelErrMsg >=", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLessThan(String value) { - addCriterion("ChannelErrMsg <", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLessThanOrEqualTo(String value) { - addCriterion("ChannelErrMsg <=", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLike(String value) { - addCriterion("ChannelErrMsg like", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotLike(String value) { - addCriterion("ChannelErrMsg not like", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIn(List values) { - addCriterion("ChannelErrMsg in", values, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotIn(List values) { - addCriterion("ChannelErrMsg not in", values, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgBetween(String value1, String value2) { - addCriterion("ChannelErrMsg between", value1, value2, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotBetween(String value1, String value2) { - addCriterion("ChannelErrMsg not between", value1, value2, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andExtraIsNull() { - addCriterion("Extra is null"); - return (Criteria) this; - } - - public Criteria andExtraIsNotNull() { - addCriterion("Extra is not null"); - return (Criteria) this; - } - - public Criteria andExtraEqualTo(String value) { - addCriterion("Extra =", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotEqualTo(String value) { - addCriterion("Extra <>", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThan(String value) { - addCriterion("Extra >", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThanOrEqualTo(String value) { - addCriterion("Extra >=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThan(String value) { - addCriterion("Extra <", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThanOrEqualTo(String value) { - addCriterion("Extra <=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLike(String value) { - addCriterion("Extra like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotLike(String value) { - addCriterion("Extra not like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraIn(List values) { - addCriterion("Extra in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotIn(List values) { - addCriterion("Extra not in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraBetween(String value1, String value2) { - addCriterion("Extra between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotBetween(String value1, String value2) { - addCriterion("Extra not between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNull() { - addCriterion("NotifyUrl is null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNotNull() { - addCriterion("NotifyUrl is not null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlEqualTo(String value) { - addCriterion("NotifyUrl =", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotEqualTo(String value) { - addCriterion("NotifyUrl <>", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThan(String value) { - addCriterion("NotifyUrl >", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThanOrEqualTo(String value) { - addCriterion("NotifyUrl >=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThan(String value) { - addCriterion("NotifyUrl <", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThanOrEqualTo(String value) { - addCriterion("NotifyUrl <=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLike(String value) { - addCriterion("NotifyUrl like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotLike(String value) { - addCriterion("NotifyUrl not like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIn(List values) { - addCriterion("NotifyUrl in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotIn(List values) { - addCriterion("NotifyUrl not in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlBetween(String value1, String value2) { - addCriterion("NotifyUrl between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotBetween(String value1, String value2) { - addCriterion("NotifyUrl not between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andParam1IsNull() { - addCriterion("Param1 is null"); - return (Criteria) this; - } - - public Criteria andParam1IsNotNull() { - addCriterion("Param1 is not null"); - return (Criteria) this; - } - - public Criteria andParam1EqualTo(String value) { - addCriterion("Param1 =", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotEqualTo(String value) { - addCriterion("Param1 <>", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThan(String value) { - addCriterion("Param1 >", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThanOrEqualTo(String value) { - addCriterion("Param1 >=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThan(String value) { - addCriterion("Param1 <", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThanOrEqualTo(String value) { - addCriterion("Param1 <=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Like(String value) { - addCriterion("Param1 like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotLike(String value) { - addCriterion("Param1 not like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1In(List values) { - addCriterion("Param1 in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotIn(List values) { - addCriterion("Param1 not in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Between(String value1, String value2) { - addCriterion("Param1 between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotBetween(String value1, String value2) { - addCriterion("Param1 not between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam2IsNull() { - addCriterion("Param2 is null"); - return (Criteria) this; - } - - public Criteria andParam2IsNotNull() { - addCriterion("Param2 is not null"); - return (Criteria) this; - } - - public Criteria andParam2EqualTo(String value) { - addCriterion("Param2 =", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotEqualTo(String value) { - addCriterion("Param2 <>", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThan(String value) { - addCriterion("Param2 >", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThanOrEqualTo(String value) { - addCriterion("Param2 >=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThan(String value) { - addCriterion("Param2 <", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThanOrEqualTo(String value) { - addCriterion("Param2 <=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Like(String value) { - addCriterion("Param2 like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotLike(String value) { - addCriterion("Param2 not like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2In(List values) { - addCriterion("Param2 in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotIn(List values) { - addCriterion("Param2 not in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Between(String value1, String value2) { - addCriterion("Param2 between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotBetween(String value1, String value2) { - addCriterion("Param2 not between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNull() { - addCriterion("ExpireTime is null"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNotNull() { - addCriterion("ExpireTime is not null"); - return (Criteria) this; - } - - public Criteria andExpireTimeEqualTo(Date value) { - addCriterion("ExpireTime =", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotEqualTo(Date value) { - addCriterion("ExpireTime <>", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThan(Date value) { - addCriterion("ExpireTime >", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThanOrEqualTo(Date value) { - addCriterion("ExpireTime >=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThan(Date value) { - addCriterion("ExpireTime <", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThanOrEqualTo(Date value) { - addCriterion("ExpireTime <=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeIn(List values) { - addCriterion("ExpireTime in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotIn(List values) { - addCriterion("ExpireTime not in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeBetween(Date value1, Date value2) { - addCriterion("ExpireTime between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotBetween(Date value1, Date value2) { - addCriterion("ExpireTime not between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeIsNull() { - addCriterion("RefundSuccTime is null"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeIsNotNull() { - addCriterion("RefundSuccTime is not null"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeEqualTo(Date value) { - addCriterion("RefundSuccTime =", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeNotEqualTo(Date value) { - addCriterion("RefundSuccTime <>", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeGreaterThan(Date value) { - addCriterion("RefundSuccTime >", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeGreaterThanOrEqualTo(Date value) { - addCriterion("RefundSuccTime >=", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeLessThan(Date value) { - addCriterion("RefundSuccTime <", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeLessThanOrEqualTo(Date value) { - addCriterion("RefundSuccTime <=", value, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeIn(List values) { - addCriterion("RefundSuccTime in", values, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeNotIn(List values) { - addCriterion("RefundSuccTime not in", values, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeBetween(Date value1, Date value2) { - addCriterion("RefundSuccTime between", value1, value2, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andRefundSuccTimeNotBetween(Date value1, Date value2) { - addCriterion("RefundSuccTime not between", value1, value2, "refundSuccTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrder.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrder.java deleted file mode 100644 index 3fc6d8ee31bb45967857421595e03e5701fb9899..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrder.java +++ /dev/null @@ -1,489 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class TransOrder implements Serializable { - /** - * 转账订单号 - * - * @mbggenerated - */ - private String transOrderId; - - /** - * 商户ID - * - * @mbggenerated - */ - private String mchId; - - /** - * 商户转账单号 - * - * @mbggenerated - */ - private String mchTransNo; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String channelId; - - /** - * 转账金额,单位分 - * - * @mbggenerated - */ - private Long amount; - - /** - * 三位货币代码,人民币:cny - * - * @mbggenerated - */ - private String currency; - - /** - * 转账状态:0-订单生成,1-转账中,2-转账成功,3-转账失败,4-业务处理完成 - * - * @mbggenerated - */ - private Byte status; - - /** - * 转账结果:0-不确认结果,1-等待手动处理,2-确认成功,3-确认失败 - * - * @mbggenerated - */ - private Byte result; - - /** - * 客户端IP - * - * @mbggenerated - */ - private String clientIp; - - /** - * 设备 - * - * @mbggenerated - */ - private String device; - - /** - * 备注 - * - * @mbggenerated - */ - private String remarkInfo; - - /** - * 渠道用户标识,如微信openId,支付宝账号 - * - * @mbggenerated - */ - private String channelUser; - - /** - * 用户姓名 - * - * @mbggenerated - */ - private String userName; - - /** - * 渠道商户ID - * - * @mbggenerated - */ - private String channelMchId; - - /** - * 渠道订单号 - * - * @mbggenerated - */ - private String channelOrderNo; - - /** - * 渠道错误码 - * - * @mbggenerated - */ - private String channelErrCode; - - /** - * 渠道错误描述 - * - * @mbggenerated - */ - private String channelErrMsg; - - /** - * 特定渠道发起时额外参数 - * - * @mbggenerated - */ - private String extra; - - /** - * 通知地址 - * - * @mbggenerated - */ - private String notifyUrl; - - /** - * 扩展参数1 - * - * @mbggenerated - */ - private String param1; - - /** - * 扩展参数2 - * - * @mbggenerated - */ - private String param2; - - /** - * 订单失效时间 - * - * @mbggenerated - */ - private Date expireTime; - - /** - * 订单转账成功时间 - * - * @mbggenerated - */ - private Date transSuccTime; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getTransOrderId() { - return transOrderId; - } - - public void setTransOrderId(String transOrderId) { - this.transOrderId = transOrderId; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getMchTransNo() { - return mchTransNo; - } - - public void setMchTransNo(String mchTransNo) { - this.mchTransNo = mchTransNo; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public Long getAmount() { - return amount; - } - - public void setAmount(Long amount) { - this.amount = amount; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public Byte getResult() { - return result; - } - - public void setResult(Byte result) { - this.result = result; - } - - public String getClientIp() { - return clientIp; - } - - public void setClientIp(String clientIp) { - this.clientIp = clientIp; - } - - public String getDevice() { - return device; - } - - public void setDevice(String device) { - this.device = device; - } - - public String getRemarkInfo() { - return remarkInfo; - } - - public void setRemarkInfo(String remarkInfo) { - this.remarkInfo = remarkInfo; - } - - public String getChannelUser() { - return channelUser; - } - - public void setChannelUser(String channelUser) { - this.channelUser = channelUser; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getChannelMchId() { - return channelMchId; - } - - public void setChannelMchId(String channelMchId) { - this.channelMchId = channelMchId; - } - - public String getChannelOrderNo() { - return channelOrderNo; - } - - public void setChannelOrderNo(String channelOrderNo) { - this.channelOrderNo = channelOrderNo; - } - - public String getChannelErrCode() { - return channelErrCode; - } - - public void setChannelErrCode(String channelErrCode) { - this.channelErrCode = channelErrCode; - } - - public String getChannelErrMsg() { - return channelErrMsg; - } - - public void setChannelErrMsg(String channelErrMsg) { - this.channelErrMsg = channelErrMsg; - } - - public String getExtra() { - return extra; - } - - public void setExtra(String extra) { - this.extra = extra; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } - - public String getParam1() { - return param1; - } - - public void setParam1(String param1) { - this.param1 = param1; - } - - public String getParam2() { - return param2; - } - - public void setParam2(String param2) { - this.param2 = param2; - } - - public Date getExpireTime() { - return expireTime; - } - - public void setExpireTime(Date expireTime) { - this.expireTime = expireTime; - } - - public Date getTransSuccTime() { - return transSuccTime; - } - - public void setTransSuccTime(Date transSuccTime) { - this.transSuccTime = transSuccTime; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", transOrderId=").append(transOrderId); - sb.append(", mchId=").append(mchId); - sb.append(", mchTransNo=").append(mchTransNo); - sb.append(", channelId=").append(channelId); - sb.append(", amount=").append(amount); - sb.append(", currency=").append(currency); - sb.append(", status=").append(status); - sb.append(", result=").append(result); - sb.append(", clientIp=").append(clientIp); - sb.append(", device=").append(device); - sb.append(", remarkInfo=").append(remarkInfo); - sb.append(", channelUser=").append(channelUser); - sb.append(", userName=").append(userName); - sb.append(", channelMchId=").append(channelMchId); - sb.append(", channelOrderNo=").append(channelOrderNo); - sb.append(", channelErrCode=").append(channelErrCode); - sb.append(", channelErrMsg=").append(channelErrMsg); - sb.append(", extra=").append(extra); - sb.append(", notifyUrl=").append(notifyUrl); - sb.append(", param1=").append(param1); - sb.append(", param2=").append(param2); - sb.append(", expireTime=").append(expireTime); - sb.append(", transSuccTime=").append(transSuccTime); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - TransOrder other = (TransOrder) that; - return (this.getTransOrderId() == null ? other.getTransOrderId() == null : this.getTransOrderId().equals(other.getTransOrderId())) - && (this.getMchId() == null ? other.getMchId() == null : this.getMchId().equals(other.getMchId())) - && (this.getMchTransNo() == null ? other.getMchTransNo() == null : this.getMchTransNo().equals(other.getMchTransNo())) - && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) - && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) - && (this.getCurrency() == null ? other.getCurrency() == null : this.getCurrency().equals(other.getCurrency())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())) - && (this.getClientIp() == null ? other.getClientIp() == null : this.getClientIp().equals(other.getClientIp())) - && (this.getDevice() == null ? other.getDevice() == null : this.getDevice().equals(other.getDevice())) - && (this.getRemarkInfo() == null ? other.getRemarkInfo() == null : this.getRemarkInfo().equals(other.getRemarkInfo())) - && (this.getChannelUser() == null ? other.getChannelUser() == null : this.getChannelUser().equals(other.getChannelUser())) - && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) - && (this.getChannelMchId() == null ? other.getChannelMchId() == null : this.getChannelMchId().equals(other.getChannelMchId())) - && (this.getChannelOrderNo() == null ? other.getChannelOrderNo() == null : this.getChannelOrderNo().equals(other.getChannelOrderNo())) - && (this.getChannelErrCode() == null ? other.getChannelErrCode() == null : this.getChannelErrCode().equals(other.getChannelErrCode())) - && (this.getChannelErrMsg() == null ? other.getChannelErrMsg() == null : this.getChannelErrMsg().equals(other.getChannelErrMsg())) - && (this.getExtra() == null ? other.getExtra() == null : this.getExtra().equals(other.getExtra())) - && (this.getNotifyUrl() == null ? other.getNotifyUrl() == null : this.getNotifyUrl().equals(other.getNotifyUrl())) - && (this.getParam1() == null ? other.getParam1() == null : this.getParam1().equals(other.getParam1())) - && (this.getParam2() == null ? other.getParam2() == null : this.getParam2().equals(other.getParam2())) - && (this.getExpireTime() == null ? other.getExpireTime() == null : this.getExpireTime().equals(other.getExpireTime())) - && (this.getTransSuccTime() == null ? other.getTransSuccTime() == null : this.getTransSuccTime().equals(other.getTransSuccTime())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getTransOrderId() == null) ? 0 : getTransOrderId().hashCode()); - result = prime * result + ((getMchId() == null) ? 0 : getMchId().hashCode()); - result = prime * result + ((getMchTransNo() == null) ? 0 : getMchTransNo().hashCode()); - result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); - result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); - result = prime * result + ((getCurrency() == null) ? 0 : getCurrency().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); - result = prime * result + ((getClientIp() == null) ? 0 : getClientIp().hashCode()); - result = prime * result + ((getDevice() == null) ? 0 : getDevice().hashCode()); - result = prime * result + ((getRemarkInfo() == null) ? 0 : getRemarkInfo().hashCode()); - result = prime * result + ((getChannelUser() == null) ? 0 : getChannelUser().hashCode()); - result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); - result = prime * result + ((getChannelMchId() == null) ? 0 : getChannelMchId().hashCode()); - result = prime * result + ((getChannelOrderNo() == null) ? 0 : getChannelOrderNo().hashCode()); - result = prime * result + ((getChannelErrCode() == null) ? 0 : getChannelErrCode().hashCode()); - result = prime * result + ((getChannelErrMsg() == null) ? 0 : getChannelErrMsg().hashCode()); - result = prime * result + ((getExtra() == null) ? 0 : getExtra().hashCode()); - result = prime * result + ((getNotifyUrl() == null) ? 0 : getNotifyUrl().hashCode()); - result = prime * result + ((getParam1() == null) ? 0 : getParam1().hashCode()); - result = prime * result + ((getParam2() == null) ? 0 : getParam2().hashCode()); - result = prime * result + ((getExpireTime() == null) ? 0 : getExpireTime().hashCode()); - result = prime * result + ((getTransSuccTime() == null) ? 0 : getTransSuccTime().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrderExample.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrderExample.java deleted file mode 100644 index b24b4b275528442a1fd653524cdd13822051ac0f..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/model/TransOrderExample.java +++ /dev/null @@ -1,1904 +0,0 @@ -package org.xxpay.dal.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class TransOrderExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public TransOrderExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andTransOrderIdIsNull() { - addCriterion("TransOrderId is null"); - return (Criteria) this; - } - - public Criteria andTransOrderIdIsNotNull() { - addCriterion("TransOrderId is not null"); - return (Criteria) this; - } - - public Criteria andTransOrderIdEqualTo(String value) { - addCriterion("TransOrderId =", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdNotEqualTo(String value) { - addCriterion("TransOrderId <>", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdGreaterThan(String value) { - addCriterion("TransOrderId >", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("TransOrderId >=", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdLessThan(String value) { - addCriterion("TransOrderId <", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdLessThanOrEqualTo(String value) { - addCriterion("TransOrderId <=", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdLike(String value) { - addCriterion("TransOrderId like", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdNotLike(String value) { - addCriterion("TransOrderId not like", value, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdIn(List values) { - addCriterion("TransOrderId in", values, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdNotIn(List values) { - addCriterion("TransOrderId not in", values, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdBetween(String value1, String value2) { - addCriterion("TransOrderId between", value1, value2, "transOrderId"); - return (Criteria) this; - } - - public Criteria andTransOrderIdNotBetween(String value1, String value2) { - addCriterion("TransOrderId not between", value1, value2, "transOrderId"); - return (Criteria) this; - } - - public Criteria andMchIdIsNull() { - addCriterion("MchId is null"); - return (Criteria) this; - } - - public Criteria andMchIdIsNotNull() { - addCriterion("MchId is not null"); - return (Criteria) this; - } - - public Criteria andMchIdEqualTo(String value) { - addCriterion("MchId =", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotEqualTo(String value) { - addCriterion("MchId <>", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThan(String value) { - addCriterion("MchId >", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdGreaterThanOrEqualTo(String value) { - addCriterion("MchId >=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThan(String value) { - addCriterion("MchId <", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLessThanOrEqualTo(String value) { - addCriterion("MchId <=", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdLike(String value) { - addCriterion("MchId like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotLike(String value) { - addCriterion("MchId not like", value, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdIn(List values) { - addCriterion("MchId in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotIn(List values) { - addCriterion("MchId not in", values, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdBetween(String value1, String value2) { - addCriterion("MchId between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchIdNotBetween(String value1, String value2) { - addCriterion("MchId not between", value1, value2, "mchId"); - return (Criteria) this; - } - - public Criteria andMchTransNoIsNull() { - addCriterion("MchTransNo is null"); - return (Criteria) this; - } - - public Criteria andMchTransNoIsNotNull() { - addCriterion("MchTransNo is not null"); - return (Criteria) this; - } - - public Criteria andMchTransNoEqualTo(String value) { - addCriterion("MchTransNo =", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoNotEqualTo(String value) { - addCriterion("MchTransNo <>", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoGreaterThan(String value) { - addCriterion("MchTransNo >", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoGreaterThanOrEqualTo(String value) { - addCriterion("MchTransNo >=", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoLessThan(String value) { - addCriterion("MchTransNo <", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoLessThanOrEqualTo(String value) { - addCriterion("MchTransNo <=", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoLike(String value) { - addCriterion("MchTransNo like", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoNotLike(String value) { - addCriterion("MchTransNo not like", value, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoIn(List values) { - addCriterion("MchTransNo in", values, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoNotIn(List values) { - addCriterion("MchTransNo not in", values, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoBetween(String value1, String value2) { - addCriterion("MchTransNo between", value1, value2, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andMchTransNoNotBetween(String value1, String value2) { - addCriterion("MchTransNo not between", value1, value2, "mchTransNo"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNull() { - addCriterion("ChannelId is null"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNotNull() { - addCriterion("ChannelId is not null"); - return (Criteria) this; - } - - public Criteria andChannelIdEqualTo(String value) { - addCriterion("ChannelId =", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotEqualTo(String value) { - addCriterion("ChannelId <>", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThan(String value) { - addCriterion("ChannelId >", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelId >=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThan(String value) { - addCriterion("ChannelId <", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThanOrEqualTo(String value) { - addCriterion("ChannelId <=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLike(String value) { - addCriterion("ChannelId like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotLike(String value) { - addCriterion("ChannelId not like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdIn(List values) { - addCriterion("ChannelId in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotIn(List values) { - addCriterion("ChannelId not in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdBetween(String value1, String value2) { - addCriterion("ChannelId between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotBetween(String value1, String value2) { - addCriterion("ChannelId not between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andAmountIsNull() { - addCriterion("Amount is null"); - return (Criteria) this; - } - - public Criteria andAmountIsNotNull() { - addCriterion("Amount is not null"); - return (Criteria) this; - } - - public Criteria andAmountEqualTo(Long value) { - addCriterion("Amount =", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotEqualTo(Long value) { - addCriterion("Amount <>", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThan(Long value) { - addCriterion("Amount >", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThanOrEqualTo(Long value) { - addCriterion("Amount >=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThan(Long value) { - addCriterion("Amount <", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThanOrEqualTo(Long value) { - addCriterion("Amount <=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountIn(List values) { - addCriterion("Amount in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotIn(List values) { - addCriterion("Amount not in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountBetween(Long value1, Long value2) { - addCriterion("Amount between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotBetween(Long value1, Long value2) { - addCriterion("Amount not between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNull() { - addCriterion("Currency is null"); - return (Criteria) this; - } - - public Criteria andCurrencyIsNotNull() { - addCriterion("Currency is not null"); - return (Criteria) this; - } - - public Criteria andCurrencyEqualTo(String value) { - addCriterion("Currency =", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotEqualTo(String value) { - addCriterion("Currency <>", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThan(String value) { - addCriterion("Currency >", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyGreaterThanOrEqualTo(String value) { - addCriterion("Currency >=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThan(String value) { - addCriterion("Currency <", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLessThanOrEqualTo(String value) { - addCriterion("Currency <=", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyLike(String value) { - addCriterion("Currency like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotLike(String value) { - addCriterion("Currency not like", value, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyIn(List values) { - addCriterion("Currency in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotIn(List values) { - addCriterion("Currency not in", values, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyBetween(String value1, String value2) { - addCriterion("Currency between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andCurrencyNotBetween(String value1, String value2) { - addCriterion("Currency not between", value1, value2, "currency"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andResultIsNull() { - addCriterion("Result is null"); - return (Criteria) this; - } - - public Criteria andResultIsNotNull() { - addCriterion("Result is not null"); - return (Criteria) this; - } - - public Criteria andResultEqualTo(Byte value) { - addCriterion("Result =", value, "result"); - return (Criteria) this; - } - - public Criteria andResultNotEqualTo(Byte value) { - addCriterion("Result <>", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThan(Byte value) { - addCriterion("Result >", value, "result"); - return (Criteria) this; - } - - public Criteria andResultGreaterThanOrEqualTo(Byte value) { - addCriterion("Result >=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThan(Byte value) { - addCriterion("Result <", value, "result"); - return (Criteria) this; - } - - public Criteria andResultLessThanOrEqualTo(Byte value) { - addCriterion("Result <=", value, "result"); - return (Criteria) this; - } - - public Criteria andResultIn(List values) { - addCriterion("Result in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultNotIn(List values) { - addCriterion("Result not in", values, "result"); - return (Criteria) this; - } - - public Criteria andResultBetween(Byte value1, Byte value2) { - addCriterion("Result between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andResultNotBetween(Byte value1, Byte value2) { - addCriterion("Result not between", value1, value2, "result"); - return (Criteria) this; - } - - public Criteria andClientIpIsNull() { - addCriterion("ClientIp is null"); - return (Criteria) this; - } - - public Criteria andClientIpIsNotNull() { - addCriterion("ClientIp is not null"); - return (Criteria) this; - } - - public Criteria andClientIpEqualTo(String value) { - addCriterion("ClientIp =", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotEqualTo(String value) { - addCriterion("ClientIp <>", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThan(String value) { - addCriterion("ClientIp >", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpGreaterThanOrEqualTo(String value) { - addCriterion("ClientIp >=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThan(String value) { - addCriterion("ClientIp <", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLessThanOrEqualTo(String value) { - addCriterion("ClientIp <=", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpLike(String value) { - addCriterion("ClientIp like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotLike(String value) { - addCriterion("ClientIp not like", value, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpIn(List values) { - addCriterion("ClientIp in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotIn(List values) { - addCriterion("ClientIp not in", values, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpBetween(String value1, String value2) { - addCriterion("ClientIp between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andClientIpNotBetween(String value1, String value2) { - addCriterion("ClientIp not between", value1, value2, "clientIp"); - return (Criteria) this; - } - - public Criteria andDeviceIsNull() { - addCriterion("Device is null"); - return (Criteria) this; - } - - public Criteria andDeviceIsNotNull() { - addCriterion("Device is not null"); - return (Criteria) this; - } - - public Criteria andDeviceEqualTo(String value) { - addCriterion("Device =", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotEqualTo(String value) { - addCriterion("Device <>", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThan(String value) { - addCriterion("Device >", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceGreaterThanOrEqualTo(String value) { - addCriterion("Device >=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThan(String value) { - addCriterion("Device <", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLessThanOrEqualTo(String value) { - addCriterion("Device <=", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceLike(String value) { - addCriterion("Device like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotLike(String value) { - addCriterion("Device not like", value, "device"); - return (Criteria) this; - } - - public Criteria andDeviceIn(List values) { - addCriterion("Device in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotIn(List values) { - addCriterion("Device not in", values, "device"); - return (Criteria) this; - } - - public Criteria andDeviceBetween(String value1, String value2) { - addCriterion("Device between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andDeviceNotBetween(String value1, String value2) { - addCriterion("Device not between", value1, value2, "device"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIsNull() { - addCriterion("RemarkInfo is null"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIsNotNull() { - addCriterion("RemarkInfo is not null"); - return (Criteria) this; - } - - public Criteria andRemarkInfoEqualTo(String value) { - addCriterion("RemarkInfo =", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotEqualTo(String value) { - addCriterion("RemarkInfo <>", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoGreaterThan(String value) { - addCriterion("RemarkInfo >", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoGreaterThanOrEqualTo(String value) { - addCriterion("RemarkInfo >=", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLessThan(String value) { - addCriterion("RemarkInfo <", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLessThanOrEqualTo(String value) { - addCriterion("RemarkInfo <=", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoLike(String value) { - addCriterion("RemarkInfo like", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotLike(String value) { - addCriterion("RemarkInfo not like", value, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoIn(List values) { - addCriterion("RemarkInfo in", values, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotIn(List values) { - addCriterion("RemarkInfo not in", values, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoBetween(String value1, String value2) { - addCriterion("RemarkInfo between", value1, value2, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andRemarkInfoNotBetween(String value1, String value2) { - addCriterion("RemarkInfo not between", value1, value2, "remarkInfo"); - return (Criteria) this; - } - - public Criteria andChannelUserIsNull() { - addCriterion("ChannelUser is null"); - return (Criteria) this; - } - - public Criteria andChannelUserIsNotNull() { - addCriterion("ChannelUser is not null"); - return (Criteria) this; - } - - public Criteria andChannelUserEqualTo(String value) { - addCriterion("ChannelUser =", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotEqualTo(String value) { - addCriterion("ChannelUser <>", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserGreaterThan(String value) { - addCriterion("ChannelUser >", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserGreaterThanOrEqualTo(String value) { - addCriterion("ChannelUser >=", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLessThan(String value) { - addCriterion("ChannelUser <", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLessThanOrEqualTo(String value) { - addCriterion("ChannelUser <=", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserLike(String value) { - addCriterion("ChannelUser like", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotLike(String value) { - addCriterion("ChannelUser not like", value, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserIn(List values) { - addCriterion("ChannelUser in", values, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotIn(List values) { - addCriterion("ChannelUser not in", values, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserBetween(String value1, String value2) { - addCriterion("ChannelUser between", value1, value2, "channelUser"); - return (Criteria) this; - } - - public Criteria andChannelUserNotBetween(String value1, String value2) { - addCriterion("ChannelUser not between", value1, value2, "channelUser"); - return (Criteria) this; - } - - public Criteria andUserNameIsNull() { - addCriterion("UserName is null"); - return (Criteria) this; - } - - public Criteria andUserNameIsNotNull() { - addCriterion("UserName is not null"); - return (Criteria) this; - } - - public Criteria andUserNameEqualTo(String value) { - addCriterion("UserName =", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotEqualTo(String value) { - addCriterion("UserName <>", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameGreaterThan(String value) { - addCriterion("UserName >", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameGreaterThanOrEqualTo(String value) { - addCriterion("UserName >=", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLessThan(String value) { - addCriterion("UserName <", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLessThanOrEqualTo(String value) { - addCriterion("UserName <=", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameLike(String value) { - addCriterion("UserName like", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotLike(String value) { - addCriterion("UserName not like", value, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameIn(List values) { - addCriterion("UserName in", values, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotIn(List values) { - addCriterion("UserName not in", values, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameBetween(String value1, String value2) { - addCriterion("UserName between", value1, value2, "userName"); - return (Criteria) this; - } - - public Criteria andUserNameNotBetween(String value1, String value2) { - addCriterion("UserName not between", value1, value2, "userName"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNull() { - addCriterion("ChannelMchId is null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIsNotNull() { - addCriterion("ChannelMchId is not null"); - return (Criteria) this; - } - - public Criteria andChannelMchIdEqualTo(String value) { - addCriterion("ChannelMchId =", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotEqualTo(String value) { - addCriterion("ChannelMchId <>", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThan(String value) { - addCriterion("ChannelMchId >", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelMchId >=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThan(String value) { - addCriterion("ChannelMchId <", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLessThanOrEqualTo(String value) { - addCriterion("ChannelMchId <=", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdLike(String value) { - addCriterion("ChannelMchId like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotLike(String value) { - addCriterion("ChannelMchId not like", value, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdIn(List values) { - addCriterion("ChannelMchId in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotIn(List values) { - addCriterion("ChannelMchId not in", values, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdBetween(String value1, String value2) { - addCriterion("ChannelMchId between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelMchIdNotBetween(String value1, String value2) { - addCriterion("ChannelMchId not between", value1, value2, "channelMchId"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNull() { - addCriterion("ChannelOrderNo is null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIsNotNull() { - addCriterion("ChannelOrderNo is not null"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoEqualTo(String value) { - addCriterion("ChannelOrderNo =", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotEqualTo(String value) { - addCriterion("ChannelOrderNo <>", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThan(String value) { - addCriterion("ChannelOrderNo >", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoGreaterThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo >=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThan(String value) { - addCriterion("ChannelOrderNo <", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLessThanOrEqualTo(String value) { - addCriterion("ChannelOrderNo <=", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoLike(String value) { - addCriterion("ChannelOrderNo like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotLike(String value) { - addCriterion("ChannelOrderNo not like", value, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoIn(List values) { - addCriterion("ChannelOrderNo in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotIn(List values) { - addCriterion("ChannelOrderNo not in", values, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoBetween(String value1, String value2) { - addCriterion("ChannelOrderNo between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelOrderNoNotBetween(String value1, String value2) { - addCriterion("ChannelOrderNo not between", value1, value2, "channelOrderNo"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIsNull() { - addCriterion("ChannelErrCode is null"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIsNotNull() { - addCriterion("ChannelErrCode is not null"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeEqualTo(String value) { - addCriterion("ChannelErrCode =", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotEqualTo(String value) { - addCriterion("ChannelErrCode <>", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeGreaterThan(String value) { - addCriterion("ChannelErrCode >", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeGreaterThanOrEqualTo(String value) { - addCriterion("ChannelErrCode >=", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLessThan(String value) { - addCriterion("ChannelErrCode <", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLessThanOrEqualTo(String value) { - addCriterion("ChannelErrCode <=", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeLike(String value) { - addCriterion("ChannelErrCode like", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotLike(String value) { - addCriterion("ChannelErrCode not like", value, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeIn(List values) { - addCriterion("ChannelErrCode in", values, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotIn(List values) { - addCriterion("ChannelErrCode not in", values, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeBetween(String value1, String value2) { - addCriterion("ChannelErrCode between", value1, value2, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrCodeNotBetween(String value1, String value2) { - addCriterion("ChannelErrCode not between", value1, value2, "channelErrCode"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIsNull() { - addCriterion("ChannelErrMsg is null"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIsNotNull() { - addCriterion("ChannelErrMsg is not null"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgEqualTo(String value) { - addCriterion("ChannelErrMsg =", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotEqualTo(String value) { - addCriterion("ChannelErrMsg <>", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgGreaterThan(String value) { - addCriterion("ChannelErrMsg >", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgGreaterThanOrEqualTo(String value) { - addCriterion("ChannelErrMsg >=", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLessThan(String value) { - addCriterion("ChannelErrMsg <", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLessThanOrEqualTo(String value) { - addCriterion("ChannelErrMsg <=", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgLike(String value) { - addCriterion("ChannelErrMsg like", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotLike(String value) { - addCriterion("ChannelErrMsg not like", value, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgIn(List values) { - addCriterion("ChannelErrMsg in", values, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotIn(List values) { - addCriterion("ChannelErrMsg not in", values, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgBetween(String value1, String value2) { - addCriterion("ChannelErrMsg between", value1, value2, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andChannelErrMsgNotBetween(String value1, String value2) { - addCriterion("ChannelErrMsg not between", value1, value2, "channelErrMsg"); - return (Criteria) this; - } - - public Criteria andExtraIsNull() { - addCriterion("Extra is null"); - return (Criteria) this; - } - - public Criteria andExtraIsNotNull() { - addCriterion("Extra is not null"); - return (Criteria) this; - } - - public Criteria andExtraEqualTo(String value) { - addCriterion("Extra =", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotEqualTo(String value) { - addCriterion("Extra <>", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThan(String value) { - addCriterion("Extra >", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraGreaterThanOrEqualTo(String value) { - addCriterion("Extra >=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThan(String value) { - addCriterion("Extra <", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLessThanOrEqualTo(String value) { - addCriterion("Extra <=", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraLike(String value) { - addCriterion("Extra like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotLike(String value) { - addCriterion("Extra not like", value, "extra"); - return (Criteria) this; - } - - public Criteria andExtraIn(List values) { - addCriterion("Extra in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotIn(List values) { - addCriterion("Extra not in", values, "extra"); - return (Criteria) this; - } - - public Criteria andExtraBetween(String value1, String value2) { - addCriterion("Extra between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andExtraNotBetween(String value1, String value2) { - addCriterion("Extra not between", value1, value2, "extra"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNull() { - addCriterion("NotifyUrl is null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIsNotNull() { - addCriterion("NotifyUrl is not null"); - return (Criteria) this; - } - - public Criteria andNotifyUrlEqualTo(String value) { - addCriterion("NotifyUrl =", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotEqualTo(String value) { - addCriterion("NotifyUrl <>", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThan(String value) { - addCriterion("NotifyUrl >", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlGreaterThanOrEqualTo(String value) { - addCriterion("NotifyUrl >=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThan(String value) { - addCriterion("NotifyUrl <", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLessThanOrEqualTo(String value) { - addCriterion("NotifyUrl <=", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlLike(String value) { - addCriterion("NotifyUrl like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotLike(String value) { - addCriterion("NotifyUrl not like", value, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlIn(List values) { - addCriterion("NotifyUrl in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotIn(List values) { - addCriterion("NotifyUrl not in", values, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlBetween(String value1, String value2) { - addCriterion("NotifyUrl between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andNotifyUrlNotBetween(String value1, String value2) { - addCriterion("NotifyUrl not between", value1, value2, "notifyUrl"); - return (Criteria) this; - } - - public Criteria andParam1IsNull() { - addCriterion("Param1 is null"); - return (Criteria) this; - } - - public Criteria andParam1IsNotNull() { - addCriterion("Param1 is not null"); - return (Criteria) this; - } - - public Criteria andParam1EqualTo(String value) { - addCriterion("Param1 =", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotEqualTo(String value) { - addCriterion("Param1 <>", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThan(String value) { - addCriterion("Param1 >", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1GreaterThanOrEqualTo(String value) { - addCriterion("Param1 >=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThan(String value) { - addCriterion("Param1 <", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1LessThanOrEqualTo(String value) { - addCriterion("Param1 <=", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Like(String value) { - addCriterion("Param1 like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotLike(String value) { - addCriterion("Param1 not like", value, "param1"); - return (Criteria) this; - } - - public Criteria andParam1In(List values) { - addCriterion("Param1 in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotIn(List values) { - addCriterion("Param1 not in", values, "param1"); - return (Criteria) this; - } - - public Criteria andParam1Between(String value1, String value2) { - addCriterion("Param1 between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam1NotBetween(String value1, String value2) { - addCriterion("Param1 not between", value1, value2, "param1"); - return (Criteria) this; - } - - public Criteria andParam2IsNull() { - addCriterion("Param2 is null"); - return (Criteria) this; - } - - public Criteria andParam2IsNotNull() { - addCriterion("Param2 is not null"); - return (Criteria) this; - } - - public Criteria andParam2EqualTo(String value) { - addCriterion("Param2 =", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotEqualTo(String value) { - addCriterion("Param2 <>", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThan(String value) { - addCriterion("Param2 >", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2GreaterThanOrEqualTo(String value) { - addCriterion("Param2 >=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThan(String value) { - addCriterion("Param2 <", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2LessThanOrEqualTo(String value) { - addCriterion("Param2 <=", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Like(String value) { - addCriterion("Param2 like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotLike(String value) { - addCriterion("Param2 not like", value, "param2"); - return (Criteria) this; - } - - public Criteria andParam2In(List values) { - addCriterion("Param2 in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotIn(List values) { - addCriterion("Param2 not in", values, "param2"); - return (Criteria) this; - } - - public Criteria andParam2Between(String value1, String value2) { - addCriterion("Param2 between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andParam2NotBetween(String value1, String value2) { - addCriterion("Param2 not between", value1, value2, "param2"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNull() { - addCriterion("ExpireTime is null"); - return (Criteria) this; - } - - public Criteria andExpireTimeIsNotNull() { - addCriterion("ExpireTime is not null"); - return (Criteria) this; - } - - public Criteria andExpireTimeEqualTo(Date value) { - addCriterion("ExpireTime =", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotEqualTo(Date value) { - addCriterion("ExpireTime <>", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThan(Date value) { - addCriterion("ExpireTime >", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeGreaterThanOrEqualTo(Date value) { - addCriterion("ExpireTime >=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThan(Date value) { - addCriterion("ExpireTime <", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeLessThanOrEqualTo(Date value) { - addCriterion("ExpireTime <=", value, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeIn(List values) { - addCriterion("ExpireTime in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotIn(List values) { - addCriterion("ExpireTime not in", values, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeBetween(Date value1, Date value2) { - addCriterion("ExpireTime between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andExpireTimeNotBetween(Date value1, Date value2) { - addCriterion("ExpireTime not between", value1, value2, "expireTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeIsNull() { - addCriterion("TransSuccTime is null"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeIsNotNull() { - addCriterion("TransSuccTime is not null"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeEqualTo(Date value) { - addCriterion("TransSuccTime =", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeNotEqualTo(Date value) { - addCriterion("TransSuccTime <>", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeGreaterThan(Date value) { - addCriterion("TransSuccTime >", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeGreaterThanOrEqualTo(Date value) { - addCriterion("TransSuccTime >=", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeLessThan(Date value) { - addCriterion("TransSuccTime <", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeLessThanOrEqualTo(Date value) { - addCriterion("TransSuccTime <=", value, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeIn(List values) { - addCriterion("TransSuccTime in", values, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeNotIn(List values) { - addCriterion("TransSuccTime not in", values, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeBetween(Date value1, Date value2) { - addCriterion("TransSuccTime between", value1, value2, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andTransSuccTimeNotBetween(Date value1, Date value2) { - addCriterion("TransSuccTime not between", value1, value2, "transSuccTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/CommentGenerator.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/CommentGenerator.java deleted file mode 100644 index 3515928414ec006d0749a2bfa5a9c802a1d2f28d..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/CommentGenerator.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.xxpay.dal.dao.plugin; - -import org.mybatis.generator.api.IntrospectedColumn; -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.dom.java.Field; -import org.mybatis.generator.internal.DefaultCommentGenerator; - -/** - * @Description: 生成model中,字段增加注释 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class CommentGenerator extends DefaultCommentGenerator { - - @Override - public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) { - super.addFieldComment(field, introspectedTable, introspectedColumn); - if (introspectedColumn.getRemarks() != null && !introspectedColumn.getRemarks().equals("")) { - field.addJavaDocLine("/**"); - field.addJavaDocLine(" * " + introspectedColumn.getRemarks()); - addJavadocTag(field, false); - field.addJavaDocLine(" */"); - } - } - -} diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/DruidDataSourceConfig.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/DruidDataSourceConfig.java deleted file mode 100644 index 1d43654e2794a0679098f1848033cb4e4d44178e..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/DruidDataSourceConfig.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.xxpay.dal.dao.plugin; - -import com.alibaba.druid.pool.DruidDataSource; -import com.github.pagehelper.PageHelper; -import org.apache.ibatis.plugin.Interceptor; -import org.apache.ibatis.session.SqlSessionFactory; -import org.mybatis.spring.SqlSessionFactoryBean; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.bind.RelaxedPropertyResolver; -import org.springframework.context.ApplicationContextException; -import org.springframework.context.EnvironmentAware; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.annotation.EnableTransactionManagement; -import org.springframework.util.StringUtils; - -import java.sql.SQLException; -import java.util.Arrays; -import java.util.Properties; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Configuration -@EnableTransactionManagement -@MapperScan(value = "org.xxpay.dal.dao.mapper") -public class DruidDataSourceConfig implements EnvironmentAware { - - private Environment environment; - private RelaxedPropertyResolver propertyResolver; - - public void setEnvironment(Environment environment) { - this.environment = environment; - this.propertyResolver = new RelaxedPropertyResolver(environment, "spring.datasource."); - } - - //注册dataSource - @Bean(initMethod = "init", destroyMethod = "close") - public DruidDataSource dataSource() throws SQLException { - if (StringUtils.isEmpty(propertyResolver.getProperty("url"))) { - System.out.println("Your database connection pool configuration is incorrect!" - + " Please check your Spring profile, current profiles are:" - + Arrays.toString(environment.getActiveProfiles())); - throw new ApplicationContextException( - "Database connection pool is not configured correctly"); - } - DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setDriverClassName(propertyResolver.getProperty("driver-class-name")); - druidDataSource.setUrl(propertyResolver.getProperty("url")); - druidDataSource.setUsername(propertyResolver.getProperty("username")); - druidDataSource.setPassword(propertyResolver.getProperty("password")); - druidDataSource.setInitialSize(Integer.parseInt(propertyResolver.getProperty("initialSize"))); - druidDataSource.setMinIdle(Integer.parseInt(propertyResolver.getProperty("minIdle"))); - druidDataSource.setMaxActive(Integer.parseInt(propertyResolver.getProperty("maxActive"))); - druidDataSource.setMaxWait(Integer.parseInt(propertyResolver.getProperty("maxWait"))); - druidDataSource.setTimeBetweenEvictionRunsMillis(Long.parseLong(propertyResolver.getProperty("timeBetweenEvictionRunsMillis"))); - druidDataSource.setMinEvictableIdleTimeMillis(Long.parseLong(propertyResolver.getProperty("minEvictableIdleTimeMillis"))); - druidDataSource.setValidationQuery(propertyResolver.getProperty("validationQuery")); - druidDataSource.setTestWhileIdle(Boolean.parseBoolean(propertyResolver.getProperty("testWhileIdle"))); - druidDataSource.setTestOnBorrow(Boolean.parseBoolean(propertyResolver.getProperty("testOnBorrow"))); - druidDataSource.setTestOnReturn(Boolean.parseBoolean(propertyResolver.getProperty("testOnReturn"))); - druidDataSource.setPoolPreparedStatements(Boolean.parseBoolean(propertyResolver.getProperty("poolPreparedStatements"))); - druidDataSource.setMaxPoolPreparedStatementPerConnectionSize(Integer.parseInt(propertyResolver.getProperty("maxPoolPreparedStatementPerConnectionSize"))); - druidDataSource.setFilters(propertyResolver.getProperty("filters")); - return druidDataSource; - } - - @Bean - public SqlSessionFactory sqlSessionFactory() throws Exception { - SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); - sqlSessionFactoryBean.setDataSource(dataSource()); - //mybatis分页 - PageHelper pageHelper = new PageHelper(); - Properties props = new Properties(); - props.setProperty("dialect", "mysql"); - props.setProperty("reasonable", "true"); - props.setProperty("supportMethodsArguments", "true"); - props.setProperty("returnPageInfo", "check"); - props.setProperty("params", "count=countSql"); - pageHelper.setProperties(props); //添加插件 - sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper}); - PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); - sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:org/xxpay/dal/dao/mapper/*.xml")); - return sqlSessionFactoryBean.getObject(); - } - - @Bean - public PlatformTransactionManager transactionManager() throws SQLException { - return new DataSourceTransactionManager(dataSource()); - } -} \ No newline at end of file diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PageModel.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PageModel.java deleted file mode 100644 index f8793d33fbeb2e976932c79abe96b24fb0b026c2..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PageModel.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.xxpay.dal.dao.plugin; - -import java.util.List; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class PageModel { - - public List list; - public Integer count = 0; - public String msg; - public Boolean rel; - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public Boolean getRel() { - return rel; - } - - public void setRel(Boolean rel) { - this.rel = rel; - } -} diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PaginationPlugin.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PaginationPlugin.java deleted file mode 100644 index 970fb2b6b0f9091e25e94cd1038334e9a6dbc0bb..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/PaginationPlugin.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.xxpay.dal.dao.plugin; - -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.PluginAdapter; -import org.mybatis.generator.api.dom.java.*; -import org.mybatis.generator.api.dom.xml.Attribute; -import org.mybatis.generator.api.dom.xml.TextElement; -import org.mybatis.generator.api.dom.xml.XmlElement; - -import java.util.List; - -/** - * @Description: MySql分页插件 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class PaginationPlugin extends PluginAdapter { - - @Override - public boolean validate(List list) { - return true; - } - - /** - * 为每个Example类添加limit和offset属性和set、get方法 - */ - @Override - public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - - PrimitiveTypeWrapper integerWrapper = FullyQualifiedJavaType.getIntInstance().getPrimitiveTypeWrapper(); - - Field limit = new Field(); - limit.setName("limit"); - limit.setVisibility(JavaVisibility.PRIVATE); - limit.setType(integerWrapper); - topLevelClass.addField(limit); - - Method setLimit = new Method(); - setLimit.setVisibility(JavaVisibility.PUBLIC); - setLimit.setName("setLimit"); - setLimit.addParameter(new Parameter(integerWrapper, "limit")); - setLimit.addBodyLine("this.limit = limit;"); - topLevelClass.addMethod(setLimit); - - Method getLimit = new Method(); - getLimit.setVisibility(JavaVisibility.PUBLIC); - getLimit.setReturnType(integerWrapper); - getLimit.setName("getLimit"); - getLimit.addBodyLine("return limit;"); - topLevelClass.addMethod(getLimit); - - Field offset = new Field(); - offset.setName("offset"); - offset.setVisibility(JavaVisibility.PRIVATE); - offset.setType(integerWrapper); - topLevelClass.addField(offset); - - Method setOffset = new Method(); - setOffset.setVisibility(JavaVisibility.PUBLIC); - setOffset.setName("setOffset"); - setOffset.addParameter(new Parameter(integerWrapper, "offset")); - setOffset.addBodyLine("this.offset = offset;"); - topLevelClass.addMethod(setOffset); - - Method getOffset = new Method(); - getOffset.setVisibility(JavaVisibility.PUBLIC); - getOffset.setReturnType(integerWrapper); - getOffset.setName("getOffset"); - getOffset.addBodyLine("return offset;"); - topLevelClass.addMethod(getOffset); - - return true; - } - - /** - * 为Mapper.xml的selectByExample添加limit,offset - */ - @Override - public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, - IntrospectedTable introspectedTable) { - - XmlElement ifLimitNotNullElement = new XmlElement("if"); - ifLimitNotNullElement.addAttribute(new Attribute("test", "limit != null")); - - XmlElement ifOffsetNotNullElement = new XmlElement("if"); - ifOffsetNotNullElement.addAttribute(new Attribute("test", "offset != null")); - ifOffsetNotNullElement.addElement(new TextElement("limit ${offset}, ${limit}")); - ifLimitNotNullElement.addElement(ifOffsetNotNullElement); - - XmlElement ifOffsetNullElement = new XmlElement("if"); - ifOffsetNullElement.addAttribute(new Attribute("test", "offset == null")); - ifOffsetNullElement.addElement(new TextElement("limit ${limit}")); - ifLimitNotNullElement.addElement(ifOffsetNullElement); - - element.addElement(ifLimitNotNullElement); - - return true; - } - - - -} diff --git a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/SerializablePlugin.java b/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/SerializablePlugin.java deleted file mode 100644 index dd85fb154f46112ecc4ef0a851d5dd1c4b497f9f..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/java/org/xxpay/dal/dao/plugin/SerializablePlugin.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.xxpay.dal.dao.plugin; - -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.PluginAdapter; -import org.mybatis.generator.api.dom.java.*; - -import java.util.List; -import java.util.Properties; - -/** - * @Description: Example类和model类实现序列化插件 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class SerializablePlugin extends PluginAdapter { - private FullyQualifiedJavaType serializable = new FullyQualifiedJavaType("java.io.Serializable"); - private FullyQualifiedJavaType gwtSerializable = new FullyQualifiedJavaType("com.google.gwt.user.client.rpc.IsSerializable"); - private boolean addGWTInterface; - private boolean suppressJavaInterface; - - public SerializablePlugin() { - } - - public boolean validate(List warnings) { - return true; - } - - public void setProperties(Properties properties) { - super.setProperties(properties); - this.addGWTInterface = Boolean.valueOf(properties.getProperty("addGWTInterface")).booleanValue(); - this.suppressJavaInterface = Boolean.valueOf(properties.getProperty("suppressJavaInterface")).booleanValue(); - } - - public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - protected void makeSerializable(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - if(this.addGWTInterface) { - topLevelClass.addImportedType(this.gwtSerializable); - topLevelClass.addSuperInterface(this.gwtSerializable); - } - - if(!this.suppressJavaInterface) { - topLevelClass.addImportedType(this.serializable); - topLevelClass.addSuperInterface(this.serializable); - Field field = new Field(); - field.setFinal(true); - field.setInitializationString("1L"); - field.setName("serialVersionUID"); - field.setStatic(true); - field.setType(new FullyQualifiedJavaType("long")); - field.setVisibility(JavaVisibility.PRIVATE); - this.context.getCommentGenerator().addFieldComment(field, introspectedTable); - topLevelClass.addField(field); - } - - } - - /** - * 添加给Example类序列化的方法 - * @param topLevelClass - * @param introspectedTable - * @return - */ - @Override - public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable){ - makeSerializable(topLevelClass, introspectedTable); - - for (InnerClass innerClass : topLevelClass.getInnerClasses()) { - if ("GeneratedCriteria".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - if ("Criteria".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - if ("Criterion".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - } - - return true; - } - -} diff --git a/xxpay-dal/src/main/resources/generator.properties b/xxpay-dal/src/main/resources/generator.properties deleted file mode 100644 index 2c08e7e180403f08f0b573a0ccbbe75961471d97..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/generator.properties +++ /dev/null @@ -1,5 +0,0 @@ -generator.jdbc.driver=com.mysql.jdbc.Driver -rator.jdbc.url=jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true -generator.jdbc.username=xxpay -generator.jdbc.password=xxpay -classPathEntry=/Users/dingzhiwei/java/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/generatorConfig.xml b/xxpay-dal/src/main/resources/generatorConfig.xml deleted file mode 100644 index f2a22fa5e55a2e3f2d3b1d0cf010ec3ae9eeb936..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/generatorConfig.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
\ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/IapReceiptMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/IapReceiptMapper.xml deleted file mode 100644 index 05b84c26e87b329c61b73df33adf6bff1119e901..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/IapReceiptMapper.xml +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - PayOrderId, MchId, TransactionId, Status, HandleCount, CreateTime, UpdateTime - - - ReceiptData - - - - - - delete from t_iap_receipt - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - - delete from t_iap_receipt - - - - - - insert into t_iap_receipt (PayOrderId, MchId, TransactionId, - Status, HandleCount, CreateTime, - UpdateTime, ReceiptData) - values (#{payOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{transactionId,jdbcType=VARCHAR}, - #{status,jdbcType=TINYINT}, #{handleCount,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}, #{receiptData,jdbcType=LONGVARCHAR}) - - - insert into t_iap_receipt - - - PayOrderId, - - - MchId, - - - TransactionId, - - - Status, - - - HandleCount, - - - CreateTime, - - - UpdateTime, - - - ReceiptData, - - - - - #{payOrderId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{transactionId,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{handleCount,jdbcType=TINYINT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - #{receiptData,jdbcType=LONGVARCHAR}, - - - - - - update t_iap_receipt - - - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - TransactionId = #{record.transactionId,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - HandleCount = #{record.handleCount,jdbcType=TINYINT}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - ReceiptData = #{record.receiptData,jdbcType=LONGVARCHAR}, - - - - - - - - update t_iap_receipt - set PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - TransactionId = #{record.transactionId,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - HandleCount = #{record.handleCount,jdbcType=TINYINT}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - ReceiptData = #{record.receiptData,jdbcType=LONGVARCHAR} - - - - - - update t_iap_receipt - set PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - TransactionId = #{record.transactionId,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - HandleCount = #{record.handleCount,jdbcType=TINYINT}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_iap_receipt - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - TransactionId = #{transactionId,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - HandleCount = #{handleCount,jdbcType=TINYINT}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - ReceiptData = #{receiptData,jdbcType=LONGVARCHAR}, - - - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - - update t_iap_receipt - set MchId = #{mchId,jdbcType=VARCHAR}, - TransactionId = #{transactionId,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - HandleCount = #{handleCount,jdbcType=TINYINT}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - ReceiptData = #{receiptData,jdbcType=LONGVARCHAR} - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - - update t_iap_receipt - set MchId = #{mchId,jdbcType=VARCHAR}, - TransactionId = #{transactionId,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - HandleCount = #{handleCount,jdbcType=TINYINT}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchInfoMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchInfoMapper.xml deleted file mode 100644 index 222110b8357aba4a26734303f0da6731d8808823..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchInfoMapper.xml +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - MchId, Name, Type, ReqKey, ResKey, State, CreateTime, UpdateTime - - - - - delete from t_mch_info - where MchId = #{mchId,jdbcType=VARCHAR} - - - delete from t_mch_info - - - - - - insert into t_mch_info (MchId, Name, Type, - ReqKey, ResKey, State, - CreateTime, UpdateTime) - values (#{mchId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, - #{reqKey,jdbcType=VARCHAR}, #{resKey,jdbcType=VARCHAR}, #{state,jdbcType=TINYINT}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_mch_info - - - MchId, - - - Name, - - - Type, - - - ReqKey, - - - ResKey, - - - State, - - - CreateTime, - - - UpdateTime, - - - - - #{mchId,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{type,jdbcType=VARCHAR}, - - - #{reqKey,jdbcType=VARCHAR}, - - - #{resKey,jdbcType=VARCHAR}, - - - #{state,jdbcType=TINYINT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_mch_info - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - Name = #{record.name,jdbcType=VARCHAR}, - - - Type = #{record.type,jdbcType=VARCHAR}, - - - ReqKey = #{record.reqKey,jdbcType=VARCHAR}, - - - ResKey = #{record.resKey,jdbcType=VARCHAR}, - - - State = #{record.state,jdbcType=TINYINT}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_mch_info - set MchId = #{record.mchId,jdbcType=VARCHAR}, - Name = #{record.name,jdbcType=VARCHAR}, - Type = #{record.type,jdbcType=VARCHAR}, - ReqKey = #{record.reqKey,jdbcType=VARCHAR}, - ResKey = #{record.resKey,jdbcType=VARCHAR}, - State = #{record.state,jdbcType=TINYINT}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_mch_info - - - Name = #{name,jdbcType=VARCHAR}, - - - Type = #{type,jdbcType=VARCHAR}, - - - ReqKey = #{reqKey,jdbcType=VARCHAR}, - - - ResKey = #{resKey,jdbcType=VARCHAR}, - - - State = #{state,jdbcType=TINYINT}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where MchId = #{mchId,jdbcType=VARCHAR} - - - update t_mch_info - set Name = #{name,jdbcType=VARCHAR}, - Type = #{type,jdbcType=VARCHAR}, - ReqKey = #{reqKey,jdbcType=VARCHAR}, - ResKey = #{resKey,jdbcType=VARCHAR}, - State = #{state,jdbcType=TINYINT}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where MchId = #{mchId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchNotifyMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchNotifyMapper.xml deleted file mode 100644 index ddb6008ac8d5d0f8a154e6dafcf4a394eb34082a..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/MchNotifyMapper.xml +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - OrderId, MchId, MchOrderNo, OrderType, NotifyUrl, NotifyCount, Result, Status, LastNotifyTime, - CreateTime, UpdateTime - - - - - delete from t_mch_notify - where OrderId = #{orderId,jdbcType=VARCHAR} - - - delete from t_mch_notify - - - - - - insert into t_mch_notify (OrderId, MchId, MchOrderNo, - OrderType, NotifyUrl, NotifyCount, - Result, Status, LastNotifyTime, - CreateTime, UpdateTime) - values (#{orderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{mchOrderNo,jdbcType=VARCHAR}, - #{orderType,jdbcType=VARCHAR}, #{notifyUrl,jdbcType=VARCHAR}, #{notifyCount,jdbcType=TINYINT}, - #{result,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{lastNotifyTime,jdbcType=TIMESTAMP}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_mch_notify - - - OrderId, - - - MchId, - - - MchOrderNo, - - - OrderType, - - - NotifyUrl, - - - NotifyCount, - - - Result, - - - Status, - - - LastNotifyTime, - - - CreateTime, - - - UpdateTime, - - - - - #{orderId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{mchOrderNo,jdbcType=VARCHAR}, - - - #{orderType,jdbcType=VARCHAR}, - - - #{notifyUrl,jdbcType=VARCHAR}, - - - #{notifyCount,jdbcType=TINYINT}, - - - #{result,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{lastNotifyTime,jdbcType=TIMESTAMP}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_mch_notify - - - OrderId = #{record.orderId,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - MchOrderNo = #{record.mchOrderNo,jdbcType=VARCHAR}, - - - OrderType = #{record.orderType,jdbcType=VARCHAR}, - - - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - - - NotifyCount = #{record.notifyCount,jdbcType=TINYINT}, - - - Result = #{record.result,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - LastNotifyTime = #{record.lastNotifyTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_mch_notify - set OrderId = #{record.orderId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - MchOrderNo = #{record.mchOrderNo,jdbcType=VARCHAR}, - OrderType = #{record.orderType,jdbcType=VARCHAR}, - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - NotifyCount = #{record.notifyCount,jdbcType=TINYINT}, - Result = #{record.result,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - LastNotifyTime = #{record.lastNotifyTime,jdbcType=TIMESTAMP}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_mch_notify - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - MchOrderNo = #{mchOrderNo,jdbcType=VARCHAR}, - - - OrderType = #{orderType,jdbcType=VARCHAR}, - - - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - - - NotifyCount = #{notifyCount,jdbcType=TINYINT}, - - - Result = #{result,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - LastNotifyTime = #{lastNotifyTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where OrderId = #{orderId,jdbcType=VARCHAR} - - - update t_mch_notify - set MchId = #{mchId,jdbcType=VARCHAR}, - MchOrderNo = #{mchOrderNo,jdbcType=VARCHAR}, - OrderType = #{orderType,jdbcType=VARCHAR}, - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - NotifyCount = #{notifyCount,jdbcType=TINYINT}, - Result = #{result,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - LastNotifyTime = #{lastNotifyTime,jdbcType=TIMESTAMP}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where OrderId = #{orderId,jdbcType=VARCHAR} - - - - - insert into t_mch_notify - - - OrderId, - - - MchId, - - - MchOrderNo, - - - OrderType, - - - NotifyUrl, - - - NotifyCount, - - - Result, - - - Status, - - - LastNotifyTime, - - - CreateTime, - - - UpdateTime, - - - - - #{orderId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{mchOrderNo,jdbcType=VARCHAR}, - - - #{orderType,jdbcType=VARCHAR}, - - - #{notifyUrl,jdbcType=VARCHAR}, - - - #{notifyCount,jdbcType=TINYINT}, - - - #{result,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{lastNotifyTime,jdbcType=TIMESTAMP}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - ON DUPLICATE KEY UPDATE OrderId = #{orderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayChannelMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayChannelMapper.xml deleted file mode 100644 index 115d93d67f3e6ac826f7b5efbd97806a5326c378..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayChannelMapper.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, ChannelId, ChannelName, ChannelMchId, MchId, State, Param, Remark, CreateTime, - UpdateTime - - - - - delete from t_pay_channel - where id = #{id,jdbcType=INTEGER} - - - delete from t_pay_channel - - - - - - insert into t_pay_channel (id, ChannelId, ChannelName, - ChannelMchId, MchId, State, - Param, Remark, CreateTime, - UpdateTime) - values (#{id,jdbcType=INTEGER}, #{channelId,jdbcType=VARCHAR}, #{channelName,jdbcType=VARCHAR}, - #{channelMchId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{state,jdbcType=TINYINT}, - #{param,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_pay_channel - - - id, - - - ChannelId, - - - ChannelName, - - - ChannelMchId, - - - MchId, - - - State, - - - Param, - - - Remark, - - - CreateTime, - - - UpdateTime, - - - - - #{id,jdbcType=INTEGER}, - - - #{channelId,jdbcType=VARCHAR}, - - - #{channelName,jdbcType=VARCHAR}, - - - #{channelMchId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{state,jdbcType=TINYINT}, - - - #{param,jdbcType=VARCHAR}, - - - #{remark,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_pay_channel - - - id = #{record.id,jdbcType=INTEGER}, - - - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - - - ChannelName = #{record.channelName,jdbcType=VARCHAR}, - - - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - State = #{record.state,jdbcType=TINYINT}, - - - Param = #{record.param,jdbcType=VARCHAR}, - - - Remark = #{record.remark,jdbcType=VARCHAR}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_pay_channel - set id = #{record.id,jdbcType=INTEGER}, - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - ChannelName = #{record.channelName,jdbcType=VARCHAR}, - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - State = #{record.state,jdbcType=TINYINT}, - Param = #{record.param,jdbcType=VARCHAR}, - Remark = #{record.remark,jdbcType=VARCHAR}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_pay_channel - - - ChannelId = #{channelId,jdbcType=VARCHAR}, - - - ChannelName = #{channelName,jdbcType=VARCHAR}, - - - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - State = #{state,jdbcType=TINYINT}, - - - Param = #{param,jdbcType=VARCHAR}, - - - Remark = #{remark,jdbcType=VARCHAR}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where id = #{id,jdbcType=INTEGER} - - - update t_pay_channel - set ChannelId = #{channelId,jdbcType=VARCHAR}, - ChannelName = #{channelName,jdbcType=VARCHAR}, - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - MchId = #{mchId,jdbcType=VARCHAR}, - State = #{state,jdbcType=TINYINT}, - Param = #{param,jdbcType=VARCHAR}, - Remark = #{remark,jdbcType=VARCHAR}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayOrderMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayOrderMapper.xml deleted file mode 100644 index 102492e80e47ba4ecb0ba5faaf94db833211eec6..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/PayOrderMapper.xml +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - PayOrderId, MchId, MchOrderNo, ChannelId, Amount, Currency, Status, ClientIp, Device, - Subject, Body, Extra, ChannelMchId, ChannelOrderNo, ErrCode, ErrMsg, Param1, Param2, - NotifyUrl, NotifyCount, LastNotifyTime, ExpireTime, PaySuccTime, CreateTime, UpdateTime - - - - - delete from t_pay_order - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - - delete from t_pay_order - - - - - - insert into t_pay_order (PayOrderId, MchId, MchOrderNo, - ChannelId, Amount, Currency, - Status, ClientIp, Device, - Subject, Body, Extra, - ChannelMchId, ChannelOrderNo, ErrCode, - ErrMsg, Param1, Param2, - NotifyUrl, NotifyCount, LastNotifyTime, - ExpireTime, PaySuccTime, CreateTime, - UpdateTime) - values (#{payOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{mchOrderNo,jdbcType=VARCHAR}, - #{channelId,jdbcType=VARCHAR}, #{amount,jdbcType=BIGINT}, #{currency,jdbcType=VARCHAR}, - #{status,jdbcType=TINYINT}, #{clientIp,jdbcType=VARCHAR}, #{device,jdbcType=VARCHAR}, - #{subject,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, - #{channelMchId,jdbcType=VARCHAR}, #{channelOrderNo,jdbcType=VARCHAR}, #{errCode,jdbcType=VARCHAR}, - #{errMsg,jdbcType=VARCHAR}, #{param1,jdbcType=VARCHAR}, #{param2,jdbcType=VARCHAR}, - #{notifyUrl,jdbcType=VARCHAR}, #{notifyCount,jdbcType=TINYINT}, #{lastNotifyTime,jdbcType=BIGINT}, - #{expireTime,jdbcType=BIGINT}, #{paySuccTime,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_pay_order - - - PayOrderId, - - - MchId, - - - MchOrderNo, - - - ChannelId, - - - Amount, - - - Currency, - - - Status, - - - ClientIp, - - - Device, - - - Subject, - - - Body, - - - Extra, - - - ChannelMchId, - - - ChannelOrderNo, - - - ErrCode, - - - ErrMsg, - - - Param1, - - - Param2, - - - NotifyUrl, - - - NotifyCount, - - - LastNotifyTime, - - - ExpireTime, - - - PaySuccTime, - - - CreateTime, - - - UpdateTime, - - - - - #{payOrderId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{mchOrderNo,jdbcType=VARCHAR}, - - - #{channelId,jdbcType=VARCHAR}, - - - #{amount,jdbcType=BIGINT}, - - - #{currency,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{clientIp,jdbcType=VARCHAR}, - - - #{device,jdbcType=VARCHAR}, - - - #{subject,jdbcType=VARCHAR}, - - - #{body,jdbcType=VARCHAR}, - - - #{extra,jdbcType=VARCHAR}, - - - #{channelMchId,jdbcType=VARCHAR}, - - - #{channelOrderNo,jdbcType=VARCHAR}, - - - #{errCode,jdbcType=VARCHAR}, - - - #{errMsg,jdbcType=VARCHAR}, - - - #{param1,jdbcType=VARCHAR}, - - - #{param2,jdbcType=VARCHAR}, - - - #{notifyUrl,jdbcType=VARCHAR}, - - - #{notifyCount,jdbcType=TINYINT}, - - - #{lastNotifyTime,jdbcType=BIGINT}, - - - #{expireTime,jdbcType=BIGINT}, - - - #{paySuccTime,jdbcType=BIGINT}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_pay_order - - - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - MchOrderNo = #{record.mchOrderNo,jdbcType=VARCHAR}, - - - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - - - Amount = #{record.amount,jdbcType=BIGINT}, - - - Currency = #{record.currency,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - - - Device = #{record.device,jdbcType=VARCHAR}, - - - Subject = #{record.subject,jdbcType=VARCHAR}, - - - Body = #{record.body,jdbcType=VARCHAR}, - - - Extra = #{record.extra,jdbcType=VARCHAR}, - - - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - - - ErrCode = #{record.errCode,jdbcType=VARCHAR}, - - - ErrMsg = #{record.errMsg,jdbcType=VARCHAR}, - - - Param1 = #{record.param1,jdbcType=VARCHAR}, - - - Param2 = #{record.param2,jdbcType=VARCHAR}, - - - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - - - NotifyCount = #{record.notifyCount,jdbcType=TINYINT}, - - - LastNotifyTime = #{record.lastNotifyTime,jdbcType=BIGINT}, - - - ExpireTime = #{record.expireTime,jdbcType=BIGINT}, - - - PaySuccTime = #{record.paySuccTime,jdbcType=BIGINT}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_pay_order - set PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - MchOrderNo = #{record.mchOrderNo,jdbcType=VARCHAR}, - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - Amount = #{record.amount,jdbcType=BIGINT}, - Currency = #{record.currency,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - Device = #{record.device,jdbcType=VARCHAR}, - Subject = #{record.subject,jdbcType=VARCHAR}, - Body = #{record.body,jdbcType=VARCHAR}, - Extra = #{record.extra,jdbcType=VARCHAR}, - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - ErrCode = #{record.errCode,jdbcType=VARCHAR}, - ErrMsg = #{record.errMsg,jdbcType=VARCHAR}, - Param1 = #{record.param1,jdbcType=VARCHAR}, - Param2 = #{record.param2,jdbcType=VARCHAR}, - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - NotifyCount = #{record.notifyCount,jdbcType=TINYINT}, - LastNotifyTime = #{record.lastNotifyTime,jdbcType=BIGINT}, - ExpireTime = #{record.expireTime,jdbcType=BIGINT}, - PaySuccTime = #{record.paySuccTime,jdbcType=BIGINT}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_pay_order - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - MchOrderNo = #{mchOrderNo,jdbcType=VARCHAR}, - - - ChannelId = #{channelId,jdbcType=VARCHAR}, - - - Amount = #{amount,jdbcType=BIGINT}, - - - Currency = #{currency,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - ClientIp = #{clientIp,jdbcType=VARCHAR}, - - - Device = #{device,jdbcType=VARCHAR}, - - - Subject = #{subject,jdbcType=VARCHAR}, - - - Body = #{body,jdbcType=VARCHAR}, - - - Extra = #{extra,jdbcType=VARCHAR}, - - - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - - - ErrCode = #{errCode,jdbcType=VARCHAR}, - - - ErrMsg = #{errMsg,jdbcType=VARCHAR}, - - - Param1 = #{param1,jdbcType=VARCHAR}, - - - Param2 = #{param2,jdbcType=VARCHAR}, - - - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - - - NotifyCount = #{notifyCount,jdbcType=TINYINT}, - - - LastNotifyTime = #{lastNotifyTime,jdbcType=BIGINT}, - - - ExpireTime = #{expireTime,jdbcType=BIGINT}, - - - PaySuccTime = #{paySuccTime,jdbcType=BIGINT}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - - update t_pay_order - set MchId = #{mchId,jdbcType=VARCHAR}, - MchOrderNo = #{mchOrderNo,jdbcType=VARCHAR}, - ChannelId = #{channelId,jdbcType=VARCHAR}, - Amount = #{amount,jdbcType=BIGINT}, - Currency = #{currency,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - ClientIp = #{clientIp,jdbcType=VARCHAR}, - Device = #{device,jdbcType=VARCHAR}, - Subject = #{subject,jdbcType=VARCHAR}, - Body = #{body,jdbcType=VARCHAR}, - Extra = #{extra,jdbcType=VARCHAR}, - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - ErrCode = #{errCode,jdbcType=VARCHAR}, - ErrMsg = #{errMsg,jdbcType=VARCHAR}, - Param1 = #{param1,jdbcType=VARCHAR}, - Param2 = #{param2,jdbcType=VARCHAR}, - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - NotifyCount = #{notifyCount,jdbcType=TINYINT}, - LastNotifyTime = #{lastNotifyTime,jdbcType=BIGINT}, - ExpireTime = #{expireTime,jdbcType=BIGINT}, - PaySuccTime = #{paySuccTime,jdbcType=BIGINT}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where PayOrderId = #{payOrderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/RefundOrderMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/RefundOrderMapper.xml deleted file mode 100644 index aee1b1a37482c0dc0cd73a4de1a85fa3accf1621..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/RefundOrderMapper.xml +++ /dev/null @@ -1,583 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - RefundOrderId, PayOrderId, ChannelPayOrderNo, MchId, MchRefundNo, ChannelId, PayAmount, - RefundAmount, Currency, Status, Result, ClientIp, Device, RemarkInfo, ChannelUser, - UserName, ChannelMchId, ChannelOrderNo, ChannelErrCode, ChannelErrMsg, Extra, NotifyUrl, - Param1, Param2, ExpireTime, RefundSuccTime, CreateTime, UpdateTime - - - - - delete from t_refund_order - where RefundOrderId = #{refundOrderId,jdbcType=VARCHAR} - - - delete from t_refund_order - - - - - - insert into t_refund_order (RefundOrderId, PayOrderId, ChannelPayOrderNo, - MchId, MchRefundNo, ChannelId, - PayAmount, RefundAmount, Currency, - Status, Result, ClientIp, - Device, RemarkInfo, ChannelUser, - UserName, ChannelMchId, ChannelOrderNo, - ChannelErrCode, ChannelErrMsg, Extra, - NotifyUrl, Param1, Param2, - ExpireTime, RefundSuccTime, CreateTime, - UpdateTime) - values (#{refundOrderId,jdbcType=VARCHAR}, #{payOrderId,jdbcType=VARCHAR}, #{channelPayOrderNo,jdbcType=VARCHAR}, - #{mchId,jdbcType=VARCHAR}, #{mchRefundNo,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, - #{payAmount,jdbcType=BIGINT}, #{refundAmount,jdbcType=BIGINT}, #{currency,jdbcType=VARCHAR}, - #{status,jdbcType=TINYINT}, #{result,jdbcType=TINYINT}, #{clientIp,jdbcType=VARCHAR}, - #{device,jdbcType=VARCHAR}, #{remarkInfo,jdbcType=VARCHAR}, #{channelUser,jdbcType=VARCHAR}, - #{userName,jdbcType=VARCHAR}, #{channelMchId,jdbcType=VARCHAR}, #{channelOrderNo,jdbcType=VARCHAR}, - #{channelErrCode,jdbcType=VARCHAR}, #{channelErrMsg,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, - #{notifyUrl,jdbcType=VARCHAR}, #{param1,jdbcType=VARCHAR}, #{param2,jdbcType=VARCHAR}, - #{expireTime,jdbcType=TIMESTAMP}, #{refundSuccTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_refund_order - - - RefundOrderId, - - - PayOrderId, - - - ChannelPayOrderNo, - - - MchId, - - - MchRefundNo, - - - ChannelId, - - - PayAmount, - - - RefundAmount, - - - Currency, - - - Status, - - - Result, - - - ClientIp, - - - Device, - - - RemarkInfo, - - - ChannelUser, - - - UserName, - - - ChannelMchId, - - - ChannelOrderNo, - - - ChannelErrCode, - - - ChannelErrMsg, - - - Extra, - - - NotifyUrl, - - - Param1, - - - Param2, - - - ExpireTime, - - - RefundSuccTime, - - - CreateTime, - - - UpdateTime, - - - - - #{refundOrderId,jdbcType=VARCHAR}, - - - #{payOrderId,jdbcType=VARCHAR}, - - - #{channelPayOrderNo,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{mchRefundNo,jdbcType=VARCHAR}, - - - #{channelId,jdbcType=VARCHAR}, - - - #{payAmount,jdbcType=BIGINT}, - - - #{refundAmount,jdbcType=BIGINT}, - - - #{currency,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{result,jdbcType=TINYINT}, - - - #{clientIp,jdbcType=VARCHAR}, - - - #{device,jdbcType=VARCHAR}, - - - #{remarkInfo,jdbcType=VARCHAR}, - - - #{channelUser,jdbcType=VARCHAR}, - - - #{userName,jdbcType=VARCHAR}, - - - #{channelMchId,jdbcType=VARCHAR}, - - - #{channelOrderNo,jdbcType=VARCHAR}, - - - #{channelErrCode,jdbcType=VARCHAR}, - - - #{channelErrMsg,jdbcType=VARCHAR}, - - - #{extra,jdbcType=VARCHAR}, - - - #{notifyUrl,jdbcType=VARCHAR}, - - - #{param1,jdbcType=VARCHAR}, - - - #{param2,jdbcType=VARCHAR}, - - - #{expireTime,jdbcType=TIMESTAMP}, - - - #{refundSuccTime,jdbcType=TIMESTAMP}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_refund_order - - - RefundOrderId = #{record.refundOrderId,jdbcType=VARCHAR}, - - - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - - - ChannelPayOrderNo = #{record.channelPayOrderNo,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - MchRefundNo = #{record.mchRefundNo,jdbcType=VARCHAR}, - - - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - - - PayAmount = #{record.payAmount,jdbcType=BIGINT}, - - - RefundAmount = #{record.refundAmount,jdbcType=BIGINT}, - - - Currency = #{record.currency,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - Result = #{record.result,jdbcType=TINYINT}, - - - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - - - Device = #{record.device,jdbcType=VARCHAR}, - - - RemarkInfo = #{record.remarkInfo,jdbcType=VARCHAR}, - - - ChannelUser = #{record.channelUser,jdbcType=VARCHAR}, - - - UserName = #{record.userName,jdbcType=VARCHAR}, - - - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - - - ChannelErrCode = #{record.channelErrCode,jdbcType=VARCHAR}, - - - ChannelErrMsg = #{record.channelErrMsg,jdbcType=VARCHAR}, - - - Extra = #{record.extra,jdbcType=VARCHAR}, - - - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - - - Param1 = #{record.param1,jdbcType=VARCHAR}, - - - Param2 = #{record.param2,jdbcType=VARCHAR}, - - - ExpireTime = #{record.expireTime,jdbcType=TIMESTAMP}, - - - RefundSuccTime = #{record.refundSuccTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_refund_order - set RefundOrderId = #{record.refundOrderId,jdbcType=VARCHAR}, - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - ChannelPayOrderNo = #{record.channelPayOrderNo,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - MchRefundNo = #{record.mchRefundNo,jdbcType=VARCHAR}, - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - PayAmount = #{record.payAmount,jdbcType=BIGINT}, - RefundAmount = #{record.refundAmount,jdbcType=BIGINT}, - Currency = #{record.currency,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - Result = #{record.result,jdbcType=TINYINT}, - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - Device = #{record.device,jdbcType=VARCHAR}, - RemarkInfo = #{record.remarkInfo,jdbcType=VARCHAR}, - ChannelUser = #{record.channelUser,jdbcType=VARCHAR}, - UserName = #{record.userName,jdbcType=VARCHAR}, - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - ChannelErrCode = #{record.channelErrCode,jdbcType=VARCHAR}, - ChannelErrMsg = #{record.channelErrMsg,jdbcType=VARCHAR}, - Extra = #{record.extra,jdbcType=VARCHAR}, - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - Param1 = #{record.param1,jdbcType=VARCHAR}, - Param2 = #{record.param2,jdbcType=VARCHAR}, - ExpireTime = #{record.expireTime,jdbcType=TIMESTAMP}, - RefundSuccTime = #{record.refundSuccTime,jdbcType=TIMESTAMP}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_refund_order - - - PayOrderId = #{payOrderId,jdbcType=VARCHAR}, - - - ChannelPayOrderNo = #{channelPayOrderNo,jdbcType=VARCHAR}, - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - MchRefundNo = #{mchRefundNo,jdbcType=VARCHAR}, - - - ChannelId = #{channelId,jdbcType=VARCHAR}, - - - PayAmount = #{payAmount,jdbcType=BIGINT}, - - - RefundAmount = #{refundAmount,jdbcType=BIGINT}, - - - Currency = #{currency,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - Result = #{result,jdbcType=TINYINT}, - - - ClientIp = #{clientIp,jdbcType=VARCHAR}, - - - Device = #{device,jdbcType=VARCHAR}, - - - RemarkInfo = #{remarkInfo,jdbcType=VARCHAR}, - - - ChannelUser = #{channelUser,jdbcType=VARCHAR}, - - - UserName = #{userName,jdbcType=VARCHAR}, - - - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - - - ChannelErrCode = #{channelErrCode,jdbcType=VARCHAR}, - - - ChannelErrMsg = #{channelErrMsg,jdbcType=VARCHAR}, - - - Extra = #{extra,jdbcType=VARCHAR}, - - - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - - - Param1 = #{param1,jdbcType=VARCHAR}, - - - Param2 = #{param2,jdbcType=VARCHAR}, - - - ExpireTime = #{expireTime,jdbcType=TIMESTAMP}, - - - RefundSuccTime = #{refundSuccTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where RefundOrderId = #{refundOrderId,jdbcType=VARCHAR} - - - update t_refund_order - set PayOrderId = #{payOrderId,jdbcType=VARCHAR}, - ChannelPayOrderNo = #{channelPayOrderNo,jdbcType=VARCHAR}, - MchId = #{mchId,jdbcType=VARCHAR}, - MchRefundNo = #{mchRefundNo,jdbcType=VARCHAR}, - ChannelId = #{channelId,jdbcType=VARCHAR}, - PayAmount = #{payAmount,jdbcType=BIGINT}, - RefundAmount = #{refundAmount,jdbcType=BIGINT}, - Currency = #{currency,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - Result = #{result,jdbcType=TINYINT}, - ClientIp = #{clientIp,jdbcType=VARCHAR}, - Device = #{device,jdbcType=VARCHAR}, - RemarkInfo = #{remarkInfo,jdbcType=VARCHAR}, - ChannelUser = #{channelUser,jdbcType=VARCHAR}, - UserName = #{userName,jdbcType=VARCHAR}, - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - ChannelErrCode = #{channelErrCode,jdbcType=VARCHAR}, - ChannelErrMsg = #{channelErrMsg,jdbcType=VARCHAR}, - Extra = #{extra,jdbcType=VARCHAR}, - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - Param1 = #{param1,jdbcType=VARCHAR}, - Param2 = #{param2,jdbcType=VARCHAR}, - ExpireTime = #{expireTime,jdbcType=TIMESTAMP}, - RefundSuccTime = #{refundSuccTime,jdbcType=TIMESTAMP}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where RefundOrderId = #{refundOrderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/TransOrderMapper.xml b/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/TransOrderMapper.xml deleted file mode 100644 index 32cfd1308131055af450ff0a42e6993699661dd6..0000000000000000000000000000000000000000 --- a/xxpay-dal/src/main/resources/org/xxpay/dal/dao/mapper/TransOrderMapper.xml +++ /dev/null @@ -1,536 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - TransOrderId, MchId, MchTransNo, ChannelId, Amount, Currency, Status, Result, ClientIp, - Device, RemarkInfo, ChannelUser, UserName, ChannelMchId, ChannelOrderNo, ChannelErrCode, - ChannelErrMsg, Extra, NotifyUrl, Param1, Param2, ExpireTime, TransSuccTime, CreateTime, - UpdateTime - - - - - delete from t_trans_order - where TransOrderId = #{transOrderId,jdbcType=VARCHAR} - - - delete from t_trans_order - - - - - - insert into t_trans_order (TransOrderId, MchId, MchTransNo, - ChannelId, Amount, Currency, - Status, Result, ClientIp, - Device, RemarkInfo, ChannelUser, - UserName, ChannelMchId, ChannelOrderNo, - ChannelErrCode, ChannelErrMsg, Extra, - NotifyUrl, Param1, Param2, - ExpireTime, TransSuccTime, CreateTime, - UpdateTime) - values (#{transOrderId,jdbcType=VARCHAR}, #{mchId,jdbcType=VARCHAR}, #{mchTransNo,jdbcType=VARCHAR}, - #{channelId,jdbcType=VARCHAR}, #{amount,jdbcType=BIGINT}, #{currency,jdbcType=VARCHAR}, - #{status,jdbcType=TINYINT}, #{result,jdbcType=TINYINT}, #{clientIp,jdbcType=VARCHAR}, - #{device,jdbcType=VARCHAR}, #{remarkInfo,jdbcType=VARCHAR}, #{channelUser,jdbcType=VARCHAR}, - #{userName,jdbcType=VARCHAR}, #{channelMchId,jdbcType=VARCHAR}, #{channelOrderNo,jdbcType=VARCHAR}, - #{channelErrCode,jdbcType=VARCHAR}, #{channelErrMsg,jdbcType=VARCHAR}, #{extra,jdbcType=VARCHAR}, - #{notifyUrl,jdbcType=VARCHAR}, #{param1,jdbcType=VARCHAR}, #{param2,jdbcType=VARCHAR}, - #{expireTime,jdbcType=TIMESTAMP}, #{transSuccTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, - #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_trans_order - - - TransOrderId, - - - MchId, - - - MchTransNo, - - - ChannelId, - - - Amount, - - - Currency, - - - Status, - - - Result, - - - ClientIp, - - - Device, - - - RemarkInfo, - - - ChannelUser, - - - UserName, - - - ChannelMchId, - - - ChannelOrderNo, - - - ChannelErrCode, - - - ChannelErrMsg, - - - Extra, - - - NotifyUrl, - - - Param1, - - - Param2, - - - ExpireTime, - - - TransSuccTime, - - - CreateTime, - - - UpdateTime, - - - - - #{transOrderId,jdbcType=VARCHAR}, - - - #{mchId,jdbcType=VARCHAR}, - - - #{mchTransNo,jdbcType=VARCHAR}, - - - #{channelId,jdbcType=VARCHAR}, - - - #{amount,jdbcType=BIGINT}, - - - #{currency,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{result,jdbcType=TINYINT}, - - - #{clientIp,jdbcType=VARCHAR}, - - - #{device,jdbcType=VARCHAR}, - - - #{remarkInfo,jdbcType=VARCHAR}, - - - #{channelUser,jdbcType=VARCHAR}, - - - #{userName,jdbcType=VARCHAR}, - - - #{channelMchId,jdbcType=VARCHAR}, - - - #{channelOrderNo,jdbcType=VARCHAR}, - - - #{channelErrCode,jdbcType=VARCHAR}, - - - #{channelErrMsg,jdbcType=VARCHAR}, - - - #{extra,jdbcType=VARCHAR}, - - - #{notifyUrl,jdbcType=VARCHAR}, - - - #{param1,jdbcType=VARCHAR}, - - - #{param2,jdbcType=VARCHAR}, - - - #{expireTime,jdbcType=TIMESTAMP}, - - - #{transSuccTime,jdbcType=TIMESTAMP}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_trans_order - - - TransOrderId = #{record.transOrderId,jdbcType=VARCHAR}, - - - MchId = #{record.mchId,jdbcType=VARCHAR}, - - - MchTransNo = #{record.mchTransNo,jdbcType=VARCHAR}, - - - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - - - Amount = #{record.amount,jdbcType=BIGINT}, - - - Currency = #{record.currency,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - Result = #{record.result,jdbcType=TINYINT}, - - - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - - - Device = #{record.device,jdbcType=VARCHAR}, - - - RemarkInfo = #{record.remarkInfo,jdbcType=VARCHAR}, - - - ChannelUser = #{record.channelUser,jdbcType=VARCHAR}, - - - UserName = #{record.userName,jdbcType=VARCHAR}, - - - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - - - ChannelErrCode = #{record.channelErrCode,jdbcType=VARCHAR}, - - - ChannelErrMsg = #{record.channelErrMsg,jdbcType=VARCHAR}, - - - Extra = #{record.extra,jdbcType=VARCHAR}, - - - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - - - Param1 = #{record.param1,jdbcType=VARCHAR}, - - - Param2 = #{record.param2,jdbcType=VARCHAR}, - - - ExpireTime = #{record.expireTime,jdbcType=TIMESTAMP}, - - - TransSuccTime = #{record.transSuccTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_trans_order - set TransOrderId = #{record.transOrderId,jdbcType=VARCHAR}, - MchId = #{record.mchId,jdbcType=VARCHAR}, - MchTransNo = #{record.mchTransNo,jdbcType=VARCHAR}, - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - Amount = #{record.amount,jdbcType=BIGINT}, - Currency = #{record.currency,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - Result = #{record.result,jdbcType=TINYINT}, - ClientIp = #{record.clientIp,jdbcType=VARCHAR}, - Device = #{record.device,jdbcType=VARCHAR}, - RemarkInfo = #{record.remarkInfo,jdbcType=VARCHAR}, - ChannelUser = #{record.channelUser,jdbcType=VARCHAR}, - UserName = #{record.userName,jdbcType=VARCHAR}, - ChannelMchId = #{record.channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{record.channelOrderNo,jdbcType=VARCHAR}, - ChannelErrCode = #{record.channelErrCode,jdbcType=VARCHAR}, - ChannelErrMsg = #{record.channelErrMsg,jdbcType=VARCHAR}, - Extra = #{record.extra,jdbcType=VARCHAR}, - NotifyUrl = #{record.notifyUrl,jdbcType=VARCHAR}, - Param1 = #{record.param1,jdbcType=VARCHAR}, - Param2 = #{record.param2,jdbcType=VARCHAR}, - ExpireTime = #{record.expireTime,jdbcType=TIMESTAMP}, - TransSuccTime = #{record.transSuccTime,jdbcType=TIMESTAMP}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_trans_order - - - MchId = #{mchId,jdbcType=VARCHAR}, - - - MchTransNo = #{mchTransNo,jdbcType=VARCHAR}, - - - ChannelId = #{channelId,jdbcType=VARCHAR}, - - - Amount = #{amount,jdbcType=BIGINT}, - - - Currency = #{currency,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - Result = #{result,jdbcType=TINYINT}, - - - ClientIp = #{clientIp,jdbcType=VARCHAR}, - - - Device = #{device,jdbcType=VARCHAR}, - - - RemarkInfo = #{remarkInfo,jdbcType=VARCHAR}, - - - ChannelUser = #{channelUser,jdbcType=VARCHAR}, - - - UserName = #{userName,jdbcType=VARCHAR}, - - - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - - - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - - - ChannelErrCode = #{channelErrCode,jdbcType=VARCHAR}, - - - ChannelErrMsg = #{channelErrMsg,jdbcType=VARCHAR}, - - - Extra = #{extra,jdbcType=VARCHAR}, - - - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - - - Param1 = #{param1,jdbcType=VARCHAR}, - - - Param2 = #{param2,jdbcType=VARCHAR}, - - - ExpireTime = #{expireTime,jdbcType=TIMESTAMP}, - - - TransSuccTime = #{transSuccTime,jdbcType=TIMESTAMP}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where TransOrderId = #{transOrderId,jdbcType=VARCHAR} - - - update t_trans_order - set MchId = #{mchId,jdbcType=VARCHAR}, - MchTransNo = #{mchTransNo,jdbcType=VARCHAR}, - ChannelId = #{channelId,jdbcType=VARCHAR}, - Amount = #{amount,jdbcType=BIGINT}, - Currency = #{currency,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - Result = #{result,jdbcType=TINYINT}, - ClientIp = #{clientIp,jdbcType=VARCHAR}, - Device = #{device,jdbcType=VARCHAR}, - RemarkInfo = #{remarkInfo,jdbcType=VARCHAR}, - ChannelUser = #{channelUser,jdbcType=VARCHAR}, - UserName = #{userName,jdbcType=VARCHAR}, - ChannelMchId = #{channelMchId,jdbcType=VARCHAR}, - ChannelOrderNo = #{channelOrderNo,jdbcType=VARCHAR}, - ChannelErrCode = #{channelErrCode,jdbcType=VARCHAR}, - ChannelErrMsg = #{channelErrMsg,jdbcType=VARCHAR}, - Extra = #{extra,jdbcType=VARCHAR}, - NotifyUrl = #{notifyUrl,jdbcType=VARCHAR}, - Param1 = #{param1,jdbcType=VARCHAR}, - Param2 = #{param2,jdbcType=VARCHAR}, - ExpireTime = #{expireTime,jdbcType=TIMESTAMP}, - TransSuccTime = #{transSuccTime,jdbcType=TIMESTAMP}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where TransOrderId = #{transOrderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-mgr/pom.xml b/xxpay-mgr/pom.xml deleted file mode 100644 index ebd89b77b2e7a73b227d9bbf1863c5022e608209..0000000000000000000000000000000000000000 --- a/xxpay-mgr/pom.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-mgr - 1.0.0 - jar - xxpay-mgr - xxpay-mgr - - - UTF-8 - 1.8 - 5.1.34 - 3.4.1 - 1.3.0 - 1.3.2 - 1.2.7 - - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - - org.xxpay - xxpay-dal - 1.0.0 - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-freemarker - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/XxPayMgrApplication.java b/xxpay-mgr/src/main/java/org/xxpay/XxPayMgrApplication.java deleted file mode 100755 index dab56b250613d2e9bbc3e49c9a54ef90521085e2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/XxPayMgrApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.xxpay; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.support.SpringBootServletInitializer; - -@SpringBootApplication -public class XxPayMgrApplication extends SpringBootServletInitializer { - - public static void main(String[] args) { - SpringApplication.run(XxPayMgrApplication.class, args); - } - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - application.listeners(); - return application.sources(applicationClass); - } - - private static Class applicationClass = XxPayMgrApplication.class; - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchInfoController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchInfoController.java deleted file mode 100644 index 7416d129ab68d86fd52478ce610923c6f8729c00..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchInfoController.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.*; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.MchInfoService; - - -import java.util.List; - -@Controller -@RequestMapping("/mch_info") -public class MchInfoController { - - private final static MyLog _log = MyLog.getLog(MchInfoController.class); - - @Autowired - private MchInfoService mchInfoService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "mch_info/list"; - } - - @RequestMapping("/edit.html") - public String editInput(String mchId, ModelMap model) { - MchInfo item = null; - if(StringUtils.isNotBlank(mchId)) { - item = mchInfoService.selectMchInfo(mchId); - } - if(item == null) item = new MchInfo(); - model.put("item", item); - return "mch_info/edit"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute MchInfo mchInfo, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = mchInfoService.count(mchInfo); - if(count <= 0) return JSON.toJSONString(pageModel); - List mchInfoList = mchInfoService.getMchInfoList((pageIndex-1)*pageSize, pageSize, mchInfo); - if(!CollectionUtils.isEmpty(mchInfoList)) { - JSONArray array = new JSONArray(); - for(MchInfo mi : mchInfoList) { - JSONObject object = (JSONObject) JSONObject.toJSON(mi); - object.put("createTime", DateUtil.date2Str(mi.getCreateTime())); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping(value = "/save", method = RequestMethod.POST) - @ResponseBody - public String save(@RequestParam String params) { - JSONObject po = JSONObject.parseObject(params); - MchInfo mchInfo = new MchInfo(); - String mchId = po.getString("mchId"); - mchInfo.setName(po.getString("name")); - mchInfo.setType(po.getString("type")); - mchInfo.setState((byte) ("on".equalsIgnoreCase(po.getString("state")) ? 1 : 0)); - mchInfo.setReqKey(po.getString("reqKey")); - mchInfo.setResKey(po.getString("resKey")); - int result; - if(StringUtils.isBlank(mchId)) { - // 添加 - result = mchInfoService.addMchInfo(mchInfo); - }else { - // 修改 - mchInfo.setMchId(mchId); - result = mchInfoService.updateMchInfo(mchInfo); - } - _log.info("保存商户记录,返回:{}", result); - return result+""; - } - - @RequestMapping("/view.html") - public String viewInput(String mchId, ModelMap model) { - MchInfo item = null; - if(StringUtils.isNotBlank(mchId)) { - item = mchInfoService.selectMchInfo(mchId); - } - if(item == null) item = new MchInfo(); - model.put("item", item); - return "mch_info/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchNotifyController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchNotifyController.java deleted file mode 100644 index 65edc8404e8a7edc11cfb5ce715318672db87459..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/MchNotifyController.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.MchNotifyService; - -import java.util.List; - -@Controller -@RequestMapping("/mch_notify") -public class MchNotifyController { - - private final static MyLog _log = MyLog.getLog(MchNotifyController.class); - - @Autowired - private MchNotifyService mchNotifyService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "mch_notify/list"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute MchNotify mchNotify, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = mchNotifyService.count(mchNotify); - if(count <= 0) return JSON.toJSONString(pageModel); - List mchNotifyList = mchNotifyService.getMchNotifyList((pageIndex-1)*pageSize, pageSize, mchNotify); - if(!CollectionUtils.isEmpty(mchNotifyList)) { - JSONArray array = new JSONArray(); - for(MchNotify po : mchNotifyList) { - JSONObject object = (JSONObject) JSONObject.toJSON(po); - if(po.getCreateTime() != null) object.put("createTime", DateUtil.date2Str(po.getCreateTime())); - if(po.getLastNotifyTime() != null) object.put("lastNotifyTime", DateUtil.date2Str(po.getLastNotifyTime())); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping("/view.html") - public String viewInput(String orderId, ModelMap model) { - MchNotify item = null; - if(StringUtils.isNotBlank(orderId)) { - item = mchNotifyService.selectMchNotify(orderId); - } - if(item == null) { - item = new MchNotify(); - model.put("item", item); - return "mch_notify/view"; - } - JSONObject object = (JSONObject) JSON.toJSON(item); - if(item.getCreateTime() != null) object.put("createTime", DateUtil.date2Str(item.getCreateTime())); - if(item.getUpdateTime() != null) object.put("updateTime", DateUtil.date2Str(item.getUpdateTime())); - if(item.getLastNotifyTime() != null) object.put("lastNotifyTime", DateUtil.date2Str(item.getLastNotifyTime())); - model.put("item", object); - return "mch_notify/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayChannelController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayChannelController.java deleted file mode 100644 index 8cbc8ffb078d5dc67a4d5210b7aa3c826bb016b5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayChannelController.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.*; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.PayChannelService; - -import java.util.List; - -@Controller -@RequestMapping("/pay_channel") -public class PayChannelController { - - private final static MyLog _log = MyLog.getLog(PayChannelController.class); - - @Autowired - private PayChannelService payChannelService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "pay_channel/list"; - } - - @RequestMapping("/edit.html") - public String editInput(String id, ModelMap model) { - PayChannel item = null; - if(StringUtils.isNotBlank(id) && NumberUtils.isNumber(id)) { - item = payChannelService.selectPayChannel(Integer.parseInt(id)); - } - if(item == null) item = new PayChannel(); - model.put("item", item); - return "pay_channel/edit"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute PayChannel payChannel, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = payChannelService.count(payChannel); - if(count <= 0) return JSON.toJSONString(pageModel); - List payChannelList = payChannelService.getPayChannelList((pageIndex-1)*pageSize, pageSize, payChannel); - if(!CollectionUtils.isEmpty(payChannelList)) { - JSONArray array = new JSONArray(); - for(PayChannel pc : payChannelList) { - JSONObject object = (JSONObject) JSONObject.toJSON(pc); - object.put("createTime", DateUtil.date2Str(pc.getCreateTime())); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping(value = "/save", method = RequestMethod.POST) - @ResponseBody - public String save(@RequestParam String params) { - JSONObject po = JSONObject.parseObject(params); - String channelId = po.getString("channelId"); - String param = po.getString("param"); - // 对于配置支付宝参数时,前端将+号转为空格bug处理 - if(PayConstant.PAY_CHANNEL_ALIPAY_MOBILE.equals(channelId) || - PayConstant.PAY_CHANNEL_ALIPAY_PC.equals(channelId) || - PayConstant.PAY_CHANNEL_ALIPAY_WAP.equals(channelId) || - PayConstant.PAY_CHANNEL_ALIPAY_QR.equals(channelId)) { - JSONObject paramObj = null; - try{ - paramObj = JSON.parseObject(po.getString("param")); - }catch (Exception e) { - _log.info("param is not json"); - } - if(paramObj != null) { - paramObj.put("private_key", paramObj.getString("private_key").replaceAll(" ", "+")); - paramObj.put("alipay_public_key", paramObj.getString("alipay_public_key").replaceAll(" ", "+")); - param = paramObj.toJSONString(); - } - } - PayChannel payChannel = new PayChannel(); - Integer id = po.getInteger("id"); - payChannel.setChannelId(channelId); - payChannel.setMchId(po.getString("mchId")); - payChannel.setChannelName(po.getString("channelName")); - payChannel.setChannelMchId(po.getString("channelMchId")); - payChannel.setState((byte) ("on".equalsIgnoreCase(po.getString("state")) ? 1 : 0)); - payChannel.setParam(param); - payChannel.setRemark(po.getString("remark")); - int result; - if(id == null) { - // 添加 - result = payChannelService.addPayChannel(payChannel); - }else { - // 修改 - payChannel.setId(id); - result = payChannelService.updatePayChannel(payChannel); - } - _log.info("保存渠道记录,返回:{}", result); - return result+""; - } - - @RequestMapping("/view.html") - public String viewInput(String id, ModelMap model) { - PayChannel item = null; - if(StringUtils.isNotBlank(id) && NumberUtils.isNumber(id)) { - item = payChannelService.selectPayChannel(Integer.parseInt(id)); - } - if(item == null) item = new PayChannel(); - model.put("item", item); - return "pay_channel/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayOrderController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayOrderController.java deleted file mode 100644 index 41e3b39ed27962b29606933963fc49f610ae9a93..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/PayOrderController.java +++ /dev/null @@ -1,81 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.xxpay.common.util.AmountUtil; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.PayOrderService; - -import java.util.Date; -import java.util.List; - -@Controller -@RequestMapping("/pay_order") -public class PayOrderController { - - private final static MyLog _log = MyLog.getLog(PayOrderController.class); - - @Autowired - private PayOrderService payOrderService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "pay_order/list"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute PayOrder payOrder, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = payOrderService.count(payOrder); - if(count <= 0) return JSON.toJSONString(pageModel); - List payOrderList = payOrderService.getPayOrderList((pageIndex-1)*pageSize, pageSize, payOrder); - if(!CollectionUtils.isEmpty(payOrderList)) { - JSONArray array = new JSONArray(); - for(PayOrder po : payOrderList) { - JSONObject object = (JSONObject) JSONObject.toJSON(po); - if(po.getCreateTime() != null) object.put("createTime", DateUtil.date2Str(po.getCreateTime())); - if(po.getAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(po.getAmount()+"")); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping("/view.html") - public String viewInput(String payOrderId, ModelMap model) { - PayOrder item = null; - if(StringUtils.isNotBlank(payOrderId)) { - item = payOrderService.selectPayOrder(payOrderId); - } - if(item == null) { - item = new PayOrder(); - model.put("item", item); - return "pay_order/view"; - } - JSONObject object = (JSONObject) JSON.toJSON(item); - if(item.getPaySuccTime() != null) object.put("paySuccTime", DateUtil.date2Str(new Date(item.getPaySuccTime()))); - if(item.getLastNotifyTime() != null) object.put("lastNotifyTime", DateUtil.date2Str(new Date(item.getLastNotifyTime()))); - if(item.getExpireTime() != null) object.put("expireTime", DateUtil.date2Str(new Date(item.getExpireTime()))); - if(item.getAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(item.getAmount()+"")); - model.put("item", object); - return "pay_order/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/RefundOrderController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/RefundOrderController.java deleted file mode 100644 index 2f42edd54e012ab458d806e9e9d2218d334e73cf..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/RefundOrderController.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.xxpay.common.util.AmountUtil; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.RefundOrderService; - -import java.util.List; - -@Controller -@RequestMapping("/refund_order") -public class RefundOrderController { - - private final static MyLog _log = MyLog.getLog(RefundOrderController.class); - - @Autowired - private RefundOrderService refundOrderService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "refund_order/list"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute RefundOrder refundOrder, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = refundOrderService.count(refundOrder); - if(count <= 0) return JSON.toJSONString(pageModel); - List refundOrderList = refundOrderService.getRefundOrderList((pageIndex-1)*pageSize, pageSize, refundOrder); - if(!CollectionUtils.isEmpty(refundOrderList)) { - JSONArray array = new JSONArray(); - for(RefundOrder po : refundOrderList) { - JSONObject object = (JSONObject) JSONObject.toJSON(po); - if(po.getCreateTime() != null) object.put("createTime", DateUtil.date2Str(po.getCreateTime())); - if(po.getRefundAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(po.getRefundAmount()+"")); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping("/view.html") - public String viewInput(String refundOrderId, ModelMap model) { - RefundOrder item = null; - if(StringUtils.isNotBlank(refundOrderId)) { - item = refundOrderService.selectRefundOrder(refundOrderId); - } - if(item == null) { - item = new RefundOrder(); - model.put("item", item); - return "refund_order/view"; - } - JSONObject object = (JSONObject) JSON.toJSON(item); - if(item.getRefundSuccTime() != null) object.put("refundSuccTime", DateUtil.date2Str(item.getRefundSuccTime())); - if(item.getExpireTime() != null) object.put("expireTime", DateUtil.date2Str(item.getExpireTime())); - if(item.getRefundAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(item.getRefundAmount()+"")); - model.put("item", object); - return "refund_order/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/TransOrderController.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/TransOrderController.java deleted file mode 100644 index 934a3698c5f1671646e7a86f4b206d9b741347cd..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/controller/TransOrderController.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.xxpay.mgr.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.xxpay.common.util.AmountUtil; -import org.xxpay.common.util.DateUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dal.dao.plugin.PageModel; -import org.xxpay.mgr.service.TransOrderService; - -import java.util.Date; -import java.util.List; - -@Controller -@RequestMapping("/trans_order") -public class TransOrderController { - - private final static MyLog _log = MyLog.getLog(TransOrderController.class); - - @Autowired - private TransOrderService transOrderService; - - @RequestMapping("/list.html") - public String listInput(ModelMap model) { - return "trans_order/list"; - } - - @RequestMapping("/list") - @ResponseBody - public String list(@ModelAttribute TransOrder transOrder, Integer pageIndex, Integer pageSize) { - PageModel pageModel = new PageModel(); - int count = transOrderService.count(transOrder); - if(count <= 0) return JSON.toJSONString(pageModel); - List transOrderList = transOrderService.getTransOrderList((pageIndex-1)*pageSize, pageSize, transOrder); - if(!CollectionUtils.isEmpty(transOrderList)) { - JSONArray array = new JSONArray(); - for(TransOrder po : transOrderList) { - JSONObject object = (JSONObject) JSONObject.toJSON(po); - if(po.getCreateTime() != null) object.put("createTime", DateUtil.date2Str(po.getCreateTime())); - if(po.getAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(po.getAmount()+"")); - array.add(object); - } - pageModel.setList(array); - } - pageModel.setCount(count); - pageModel.setMsg("ok"); - pageModel.setRel(true); - return JSON.toJSONString(pageModel); - } - - @RequestMapping("/view.html") - public String viewInput(String transOrderId, ModelMap model) { - TransOrder item = null; - if(StringUtils.isNotBlank(transOrderId)) { - item = transOrderService.selectTransOrder(transOrderId); - } - if(item == null) { - item = new TransOrder(); - model.put("item", item); - return "trans_order/view"; - } - JSONObject object = (JSONObject) JSON.toJSON(item); - if(item.getTransSuccTime() != null) object.put("transSuccTime", DateUtil.date2Str(item.getTransSuccTime())); - if(item.getExpireTime() != null) object.put("expireTime", DateUtil.date2Str(item.getExpireTime())); - if(item.getAmount() != null) object.put("amount", AmountUtil.convertCent2Dollar(item.getAmount()+"")); - model.put("item", object); - return "trans_order/view"; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchInfoService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchInfoService.java deleted file mode 100644 index 58f1a9007be9b91ee239bae3fa2b6d44ba7f2a2e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchInfoService.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.xxpay.dal.dao.mapper.MchInfoMapper; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.MchInfoExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/5/4. - */ -@Component -public class MchInfoService { - - @Autowired - private MchInfoMapper mchInfoMapper; - - public int addMchInfo(MchInfo mchInfo) { - MchInfoExample example = new MchInfoExample(); - example.setOrderByClause("mchId DESC"); - example.setOffset(0); - example.setLimit(1); - List mchInfos = mchInfoMapper.selectByExample(example); - String mchId = "10000000"; - if(!CollectionUtils.isEmpty(mchInfos)) { - mchId = String.valueOf(Integer.parseInt(mchInfos.get(0).getMchId()) + 1); - } - mchInfo.setMchId(mchId); - return mchInfoMapper.insertSelective(mchInfo); - } - - public int updateMchInfo(MchInfo mchInfo) { - return mchInfoMapper.updateByPrimaryKeySelective(mchInfo); - } - - public MchInfo selectMchInfo(String mchId) { - return mchInfoMapper.selectByPrimaryKey(mchId); - } - - public List getMchInfoList(int offset, int limit, MchInfo mchInfo) { - MchInfoExample example = new MchInfoExample(); - example.setOrderByClause("createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - MchInfoExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, mchInfo); - return mchInfoMapper.selectByExample(example); - } - - public Integer count(MchInfo mchInfo) { - MchInfoExample example = new MchInfoExample(); - MchInfoExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, mchInfo); - return mchInfoMapper.countByExample(example); - } - - void setCriteria(MchInfoExample.Criteria criteria, MchInfo mchInfo) { - if(mchInfo != null) { - if(StringUtils.isNotBlank(mchInfo.getMchId())) criteria.andMchIdEqualTo(mchInfo.getMchId()); - if(mchInfo.getType() != null && !"-99".equals(mchInfo.getType())) criteria.andTypeEqualTo(mchInfo.getType()); - } - } - -} diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchNotifyService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchNotifyService.java deleted file mode 100644 index e8d98eada635f4b2e4f0e98aee0ffe39e2fa3fbe..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/MchNotifyService.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.dal.dao.mapper.MchNotifyMapper; -import org.xxpay.dal.dao.mapper.MchNotifyMapper; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.model.MchNotifyExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/11/03. - */ -@Component -public class MchNotifyService { - - @Autowired - private MchNotifyMapper mchNotifyMapper; - - public MchNotify selectMchNotify(String orderId) { - return mchNotifyMapper.selectByPrimaryKey(orderId); - } - - public List getMchNotifyList(int offset, int limit, MchNotify mchNotify) { - MchNotifyExample example = new MchNotifyExample(); - example.setOrderByClause("createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - MchNotifyExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, mchNotify); - return mchNotifyMapper.selectByExample(example); - } - - public Integer count(MchNotify mchNotify) { - MchNotifyExample example = new MchNotifyExample(); - MchNotifyExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, mchNotify); - return mchNotifyMapper.countByExample(example); - } - - void setCriteria(MchNotifyExample.Criteria criteria, MchNotify mchNotify) { - if(mchNotify != null) { - if(StringUtils.isNotBlank(mchNotify.getMchId())) criteria.andMchIdEqualTo(mchNotify.getMchId()); - if(StringUtils.isNotBlank(mchNotify.getOrderId())) criteria.andOrderIdEqualTo(mchNotify.getOrderId()); - if(StringUtils.isNotBlank(mchNotify.getOrderType())) criteria.andOrderTypeEqualTo(mchNotify.getOrderType()); - if(StringUtils.isNotBlank(mchNotify.getMchOrderNo())) criteria.andMchOrderNoEqualTo(mchNotify.getMchOrderNo()); - if(mchNotify.getStatus() != null && mchNotify.getStatus() != -99) criteria.andStatusEqualTo(mchNotify.getStatus()); - } - } - -} diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayChannelService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayChannelService.java deleted file mode 100644 index 64336e662ada6503e07805065d950722d7d39cbb..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayChannelService.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.xxpay.dal.dao.mapper.PayChannelMapper; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayChannelExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/5/7. - */ -@Component -public class PayChannelService { - - @Autowired - private PayChannelMapper payChannelMapper; - - public int addPayChannel(PayChannel payChannel) { - return payChannelMapper.insertSelective(payChannel); - } - - public int updatePayChannel(PayChannel payChannel) { - return payChannelMapper.updateByPrimaryKeySelective(payChannel); - } - - public PayChannel selectPayChannel(String channelId, String mchId) { - PayChannelExample example = new PayChannelExample(); - PayChannelExample.Criteria criteria = example.createCriteria(); - criteria.andChannelIdEqualTo(channelId); - criteria.andMchIdEqualTo(mchId); - List payChannelList = payChannelMapper.selectByExample(example); - if(CollectionUtils.isEmpty(payChannelList)) return null; - return payChannelList.get(0); - } - - public PayChannel selectPayChannel(int id) { - return payChannelMapper.selectByPrimaryKey(id); - } - - public List getPayChannelList(int offset, int limit, PayChannel payChannel) { - PayChannelExample example = new PayChannelExample(); - example.setOrderByClause("mchId ASC, channelId ASC, createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - PayChannelExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, payChannel); - return payChannelMapper.selectByExample(example); - } - - public Integer count(PayChannel payChannel) { - PayChannelExample example = new PayChannelExample(); - PayChannelExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, payChannel); - return payChannelMapper.countByExample(example); - } - - void setCriteria(PayChannelExample.Criteria criteria, PayChannel payChannel) { - if(payChannel != null) { - if(StringUtils.isNotBlank(payChannel.getMchId())) criteria.andMchIdEqualTo(payChannel.getMchId()); - if(StringUtils.isNotBlank(payChannel.getChannelId())) criteria.andChannelIdEqualTo(payChannel.getChannelId()); - } - } - -} diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayOrderService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayOrderService.java deleted file mode 100644 index 391729ef8f5ca46b414331f074efad6635da4020..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/PayOrderService.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.PayOrderMapper; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.PayOrderExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/5/7. - */ -@Component -public class PayOrderService { - - @Autowired - private PayOrderMapper payOrderMapper; - - public PayOrder selectPayOrder(String payOrderId) { - return payOrderMapper.selectByPrimaryKey(payOrderId); - } - - public List getPayOrderList(int offset, int limit, PayOrder payOrder) { - PayOrderExample example = new PayOrderExample(); - example.setOrderByClause("createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - PayOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, payOrder); - return payOrderMapper.selectByExample(example); - } - - public Integer count(PayOrder payOrder) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, payOrder); - return payOrderMapper.countByExample(example); - } - - void setCriteria(PayOrderExample.Criteria criteria, PayOrder payOrder) { - if(payOrder != null) { - if(StringUtils.isNotBlank(payOrder.getMchId())) criteria.andMchIdEqualTo(payOrder.getMchId()); - if(StringUtils.isNotBlank(payOrder.getPayOrderId())) criteria.andPayOrderIdEqualTo(payOrder.getPayOrderId()); - if(StringUtils.isNotBlank(payOrder.getMchOrderNo())) criteria.andMchOrderNoEqualTo(payOrder.getMchOrderNo()); - if(StringUtils.isNotBlank(payOrder.getChannelOrderNo())) criteria.andChannelOrderNoEqualTo(payOrder.getChannelOrderNo()); - if(payOrder.getStatus() != null && payOrder.getStatus() != -99) criteria.andStatusEqualTo(payOrder.getStatus()); - } - } - -} diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/RefundOrderService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/RefundOrderService.java deleted file mode 100644 index 428e2affbbb863c702644ee204a7a93fa6d27274..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/RefundOrderService.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.dal.dao.mapper.RefundOrderMapper; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.RefundOrderExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/11/03. - */ -@Component -public class RefundOrderService { - - @Autowired - private RefundOrderMapper refundOrderMapper; - - public RefundOrder selectRefundOrder(String refundOrderId) { - return refundOrderMapper.selectByPrimaryKey(refundOrderId); - } - - public List getRefundOrderList(int offset, int limit, RefundOrder refundOrder) { - RefundOrderExample example = new RefundOrderExample(); - example.setOrderByClause("createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - RefundOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, refundOrder); - return refundOrderMapper.selectByExample(example); - } - - public Integer count(RefundOrder refundOrder) { - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, refundOrder); - return refundOrderMapper.countByExample(example); - } - - void setCriteria(RefundOrderExample.Criteria criteria, RefundOrder refundOrder) { - if(refundOrder != null) { - if(StringUtils.isNotBlank(refundOrder.getMchId())) criteria.andMchIdEqualTo(refundOrder.getMchId()); - if(StringUtils.isNotBlank(refundOrder.getRefundOrderId())) criteria.andRefundOrderIdEqualTo(refundOrder.getRefundOrderId()); - if(StringUtils.isNotBlank(refundOrder.getRefundOrderId())) criteria.andMchRefundNoEqualTo(refundOrder.getMchRefundNo()); - if(StringUtils.isNotBlank(refundOrder.getChannelOrderNo())) criteria.andChannelOrderNoEqualTo(refundOrder.getChannelOrderNo()); - if(refundOrder.getStatus() != null && refundOrder.getStatus() != -99) criteria.andStatusEqualTo(refundOrder.getStatus()); - } - } - -} diff --git a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/TransOrderService.java b/xxpay-mgr/src/main/java/org/xxpay/mgr/service/TransOrderService.java deleted file mode 100644 index ed334a196048b3a8d81755f27e70745da72bf436..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/java/org/xxpay/mgr/service/TransOrderService.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.mgr.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.dal.dao.mapper.TransOrderMapper; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dal.dao.model.TransOrderExample; - -import java.util.List; - -/** - * Created by dingzhiwei on 17/11/03. - */ -@Component -public class TransOrderService { - - @Autowired - private TransOrderMapper transOrderMapper; - - public TransOrder selectTransOrder(String transOrderId) { - return transOrderMapper.selectByPrimaryKey(transOrderId); - } - - public List getTransOrderList(int offset, int limit, TransOrder transOrder) { - TransOrderExample example = new TransOrderExample(); - example.setOrderByClause("createTime DESC"); - example.setOffset(offset); - example.setLimit(limit); - TransOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, transOrder); - return transOrderMapper.selectByExample(example); - } - - public Integer count(TransOrder transOrder) { - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - setCriteria(criteria, transOrder); - return transOrderMapper.countByExample(example); - } - - void setCriteria(TransOrderExample.Criteria criteria, TransOrder transOrder) { - if(transOrder != null) { - if(StringUtils.isNotBlank(transOrder.getMchId())) criteria.andMchIdEqualTo(transOrder.getMchId()); - if(StringUtils.isNotBlank(transOrder.getTransOrderId())) criteria.andTransOrderIdEqualTo(transOrder.getTransOrderId()); - if(StringUtils.isNotBlank(transOrder.getMchTransNo())) criteria.andMchTransNoEqualTo(transOrder.getMchTransNo()); - if(StringUtils.isNotBlank(transOrder.getChannelOrderNo())) criteria.andChannelOrderNoEqualTo(transOrder.getChannelOrderNo()); - if(transOrder.getStatus() != null && transOrder.getStatus() != -99) criteria.andStatusEqualTo(transOrder.getStatus()); - } - } - -} diff --git a/xxpay-mgr/src/main/resources/application.properties b/xxpay-mgr/src/main/resources/application.properties deleted file mode 100755 index 4a212d548e6dfe2cda909b10533acdf59890fcfa..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -server.port=8092 - -spring.freemarker.cache=false -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.expose-request-attributes=true -spring.freemarker.expose-session-attributes=true -spring.freemarker.request-context-attribute=request -spring.freemarker.suffix=.ftl -spring.freemarker.templateEncoding=UTF-8 -spring.freemarker.templateLoaderPath=classpath:/templates/ - -#\u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false -spring.datasource.username=xxpay -spring.datasource.password=xxpay -# \u4E0B\u9762\u4E3A\u8FDE\u63A5\u6C60\u7684\u8865\u5145\u8BBE\u7F6E\uFF0C\u5E94\u7528\u5230\u4E0A\u9762\u6240\u6709\u6570\u636E\u6E90\u4E2D# \u521D\u59CB\u5316\u5927\u5C0F\uFF0C\u6700\u5C0F\uFF0C\u6700\u5927 -spring.datasource.initialSize=5 -spring.datasource.minIdle=5 -spring.datasource.maxActive=20 -# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4 -spring.datasource.maxWait=60000 -# \u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 -spring.datasource.timeBetweenEvictionRunsMillis=60000 -# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 -spring.datasource.minEvictableIdleTimeMillis=300000 -spring.datasource.validationQuery=SELECT 1 FROM DUAL -spring.datasource.testWhileIdle=true -spring.datasource.testOnBorrow=false -spring.datasource.testOnReturn=false -# \u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F -spring.datasource.poolPreparedStatements=true -spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 -# \u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899 -spring.datasource.filters=stat,wall,log4j -# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55 -spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 -# \u5408\u5E76\u591A\u4E2ADruidDataSource\u7684\u76D1\u63A7\u6570\u636E -#spring.datasource.useGlobalDataSourceStat=true - -### \u65E5\u5FD7 -logging.file=./log/xxpay-mgr.log - -spring.mvc.favicon.enabled = false \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/css/begtable.css b/xxpay-mgr/src/main/resources/static/css/begtable.css deleted file mode 100755 index 0b94d690a8d473b232a1e23fe5d39651b0db6878..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/begtable.css +++ /dev/null @@ -1,91 +0,0 @@ -.beg-table-box { - position: relative; - height: 100%; - width: 100%; - max-width: 100%; -} - -.beg-table-header { - position: absolute; - width: 100%; -} - -.beg-table-header table { - width: 100%; - max-width: 100%; -} - -.beg-table-header table thead tr th { - vertical-align: bottom; - border-bottom: 2px solid #DDDDDD; - padding: 7px 15px; - background-color: #f2f2f2; -} - -.beg-table-body { - overflow: auto; - width: 100%; - max-height: 100%; -} - -.beg-table { - width: 100%; - max-width: 100%; - height: 100%; - margin-bottom: 40px; -} - -.beg-table thead {} - -.beg-table thead tr {} - -.beg-table thead tr th { - vertical-align: bottom; - border-bottom: 2px solid #DDDDDD; - padding: 7px 15px; - background-color: #f2f2f2; -} - -.beg-table tbody {} - -.beg-table tbody tr {} - -.beg-table tbody tr td { - padding: 7px 15px; - border-bottom: 1px solid #DDDDDD; - vertical-align: top; -} - -.beg-table-bordered { - border: 1px solid #DDDDDD; -} - -.beg-table-bordered td, -.beg-table-bordered th { - border: 1px solid #DDDDDD; -} - -.beg-table-striped tbody tr:nth-child(even), -.beg-table-hovered tbody tr:hover { - background-color: #f6f6f6; -} - - -/*page*/ - -.beg-table-box .beg-table-paged { - position: absolute; - bottom: 0; - width: 100%; - height: 40px; - line-height: 40px; - background-color: #f2f2f2; -} - -.beg-table-box .beg-table-paged .layui-laypage { - margin: 3px 5px 0 5px; -} - -.beg-table-box .beg-table-paged .layui-laypage a { - /*margin: 0;*/ -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/css/btable.css b/xxpay-mgr/src/main/resources/static/css/btable.css deleted file mode 100755 index c54ff644bf6fa75b27b6ae502ca341901eb2634c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/btable.css +++ /dev/null @@ -1,84 +0,0 @@ -.btable { - position: relative; - width: 100%; - height: 100%; -} - -.btable .layui-form-checkbox { - margin-top: 0; - height: 20px; - line-height: 20px; -} - -.btable .layui-table { - /*margin: 5px;*/ - margin-bottom: 38px; -} - -.btable .layui-table td { - padding: 6px 15px; -} - -.btable .layui-laypage { - margin: 5px; -} - -.btable .layui-laypage a, .btable .layui-laypage span { - border: 0; - margin: 0; -} - -.btable .layui-laypage button, .btable .layui-laypage input, .btable .layui-laypage .layui-laypage-total { - height: 28px; - line-height: 28px; -} - -.btable .layui-laypage button, .btable .layui-laypage input { - border: 0; -} - -.btable .btable-paged { - width: 100%; - background-color: #f2f2f2; - position: fixed; - bottom: 0; -} - - -.btable thead tr th { - position: relative; -} - -.btable-order { - position: absolute; - right: 0; - top: 10px; -} - -.btable-order .up, .down { - width: 30px; - height: 10px; - text-align: center; - position: absolute; - top: 0; - right: 0; - cursor: pointer; -} - -.btable-order .down { - top: 10px; -} - -.btable-order .up .fa { - width: 30px; - position: absolute; - right: 0; - top: 0; -} - -.btable-order .down .fa { - height: 8px; - position: absolute; - top: -5px; - right: 11px; -} diff --git a/xxpay-mgr/src/main/resources/static/css/global.css b/xxpay-mgr/src/main/resources/static/css/global.css deleted file mode 100755 index 03c19c88ac0b9e109c637b50128ec0dfb3758d55..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/global.css +++ /dev/null @@ -1,433 +0,0 @@ -/** - - layui官网 - By 贤心 - -*/ - - -/* 布局 */ -.site-inline{font-size: 0;} -.site-tree, .site-content{display: inline-block; *display:inline; *zoom:1; vertical-align: top; font-size: 14px;} -.site-tree{width: 220px; min-height: 900px; padding: 5px 0 20px;} -.site-content{width: 899px; min-height: 900px; padding: 20px 0 10px 20px;} - -/* 头部 */admin-side-toggle -.header{height: 65px; border-bottom: 1px solid #404553; background-color: #393D49; color: #fff;} -.logo{position: absolute; left: 0; top: 18px;} -.logo img{width: 82px; height: 31px;} - -.header .layui-nav{position: absolute; right: 0; top: 0; padding: 0; background: none;} -.header .layui-nav .layui-nav-item{margin: 0 20px; line-height: 66px;} - -.menu{position: absolute; right: 0; top: 0; line-height: 65px;} -.menu a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;} -.menu a{position: relative; padding: 0 20px; margin: 0 20px; color: #c2c2c2; font-size: 14px;} -.menu a:hover{color: #fff; transition: all .5s; -webkit-transition: all .5s} -.menu a.this{color: #fff} -.menu a.this::after{content: ''; position: absolute; left: 0; bottom: -1px; width: 100%; height: 5px; background-color: #5FB878;} - -.header-index{background-color: #080018; border: none;} - -.layui-layout-admin .header-demo{border-bottom-color: #1AA094; background-color: #fff;} -.header-demo .logo{left: 40px;} -.header-demo .layui-nav{top: 0;} -.header-demo .layui-nav .layui-nav-item{margin: 0 10px; line-height: 65px;} -.header-demo .layui-nav .layui-nav-item a{color: #999;} -.header-demo .layui-nav .layui-this{background-color: #f2f2f2;} -.header-demo .layui-nav .layui-nav-item a:hover, -.header-demo .layui-nav .layui-this a{color: #000;} -.header-demo .layui-nav .layui-this:after, -.header-demo .layui-nav-bar{background-color: #393D49;} -.header-demo .layui-nav .layui-this a{padding: 0 20px;} - -/* 底部 */ -.footer{padding: 30px 0; line-height: 30px; text-align: center; background-color: #eee; color: #666; font-weight: 300;} -body .layui-layout-admin .footer-demo{height: auto; padding: 5px 0; line-height: 26px;} -.footer a{padding: 0 5px;} - -/* 首页banner部分 */ -.site-banner{position: relative; height: 600px; text-align: center; overflow: hidden; background-color: #393D49;} -.site-banner-bg -,.site-banner-main{position: absolute; left: 0; top: 0; width: 100%; height: 100%;} -.site-banner-bg{background-position: center 0;} - - -.site-zfj{padding-top: 25px; height: 220px;} -.site-zfj i{position: absolute; left: 50%; top: 25px; width: 200px; height: 200px; margin-left: -100px; font-size: 200px; color: #c2c2c2;} - -@-webkit-keyframes site-zfj { - 0% {opacity: 1; -webkit-transform: translate3d(0, 0, 0) rotate(0deg) scale(1);} - 10% {opacity: 0.8; -webkit-transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);} - 35% {opacity: 0.6; -webkit-transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);} - 50% {opacity: 0.4; -webkit-transform: translate3d(0, 0, 0) rotate(360deg) scale(0);} - 80% {opacity: 0.2; -webkit-transform: translate3d(0, 0, 0) rotate(720deg) scale(1);} - 90% {opacity: 0.1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);} - 100% {opacity: 1; -webkit-transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);} -} -@keyframes site-zfj { - 0% {opacity: 1; transform: translate3d(0, 0, 0) rotate(0deg) scale(1);} - 10% {opacity: 0.8; transform: translate3d(-100px, 0px, 0) rotate(10deg) scale(0.7);} - 35% {opacity: 0.6; transform: translate3d(100px, 0px, 0) rotate(30deg) scale(0.4);} - 50% {opacity: 0.4; transform: translate3d(0, 0, 0) rotate(360deg) scale(0);} - 80% {opacity: 0.2; transform: translate3d(0, 0, 0) rotate(720deg) scale(1);} - 90% {opacity: 0.1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(6);} - 100% {opacity: 1; transform: translate3d(0, 0, 0) rotate(3600deg) scale(1);} -} - -@-webkit-keyframes site-desc { - 0% { -webkit-transform: scale(1.1);} - 100% {opacity: 1; -webkit-transform: scale(1);} -} -@keyframes site-desc { - 0% { transform: scale(1.1);} - 100% {transform: scale(1);} -} - -.layui-anim-scaleSpring{-webkit-animation-name: layui-scale-spring; animation-name: layui-scale-spring} -.site-zfj-anim i{-webkit-animation-name: site-zfj; animation-name: site-zfj; -webkit-animation-duration: 5s; animation-duration: 5s; -webkit-animation-timing-function: linear; animation-timing-function: linear;} - - -.site-desc{position: relative; height: 70px; margin-top: 25px; background: url(../images/layui/desc.png) center no-repeat;} -.site-desc-anim{-webkit-animation-name: site-desc; animation-name: site-desc;} - -.site-desc cite{position: absolute; bottom: -40px; left: 0; width: 100%; color: #c2c2c2; font-style: normal;} -.site-download{margin-top: 80px; font-size: 0;} -.site-download a{position: relative; padding: 0 45px 0 90px; height: 60px; line-height: 60px; border: 1px solid #464B5B; font-size: 24px; color: #ccc; transition: all .5s; -webkit-transition: all .5s;} -.site-download a:hover{border: 1px solid #778097; color: #fff; border-radius: 30px; } -.site-download a cite{position: absolute; left: 45px; font-size: 30px;} -.site-version{position: relative; margin-top: 15px; color: #ccc; font-size: 12px;} -.site-version span{padding: 0 3px;} -.site-version *{font-style: normal;} -.site-version a{color: #e2e2e2; text-decoration: underline;} - -.site-banner-other{position: absolute; left: 0; bottom: 32px; width: 100%; text-align: center;} -.site-banner-other iframe{border: none;} - -.site-idea{margin: 50px 0; font-size: 0; text-align: center; font-weight: 300;} -.site-idea li{display: inline-block; vertical-align: top; *display: inline; *zoom:1; font-size: 14px; } -.site-idea li{width: 298px; height: 150px; padding: 30px; line-height: 24px; margin-left: 30px; border: 1px solid #d2d2d2; text-align: left;} -.site-idea li:first-child{margin-left: 0} -.site-idea .layui-field-title{border-color: #d2d2d2} -.site-idea .layui-field-title legend{margin: 0 20px 20px 0; padding: 0 20px; text-align: center;} - - -/* 辅助 */ -.site-tips{margin-bottom: 10px; padding: 15px; border-left: 5px solid #0078AD; background-color: #f2f2f2;} -body .site-tips p{margin: 0;} - -/* 目录 */ -.site-dir{display: none;} -.site-dir li{line-height: 26px; margin-left: 20px; overflow: visible; list-style-type: disc;} -.site-dir li a{display: block;} -.site-dir li a:active{color: #01AAED;} -.site-dir li a.layui-this{color: #01AAED;} -body .layui-layer-dir{box-shadow: none; border: 1px solid #d2d2d2;} -body .layui-layer-dir .layui-layer-content{padding: 10px; max-height: 280px; overflow: auto;} -.site-dir a em{padding-left: 5px; font-size: 12px; color: #c2c2c2; font-style: normal;} - -/* 文档 */ -.site-tree{border-right: 1px solid #eee; } -.site-tree .layui-tree{line-height: 32px;} -.site-tree .layui-tree li i{position: relative; font-size: 22px; color: #000} -.site-tree .layui-tree li a cite{padding: 0 8px;} -.site-tree .layui-tree .site-tree-noicon a cite{padding-left: 15px;} -.site-tree .layui-tree li a em{font-size: 12px; color: #bbb; padding-right: 5px; font-style: normal;} -.site-tree .layui-tree li h2{line-height: 36px; border-left: 5px solid #009E94; margin: 15px 0 5px; padding: 0 10px; background-color: #f2f2f2;} -.site-tree .layui-tree li ul{margin-left: 27px; line-height: 28px;} -.site-tree .layui-tree li ul a, -.site-tree .layui-tree li ul a i{color: #777;} -.site-tree .layui-tree li ul a:hover{color: #333;} -.site-tree .layui-tree li ul li{margin-left: 25px; overflow: visible; list-style-type: disc; /*list-style-position: inside;*/} -.site-tree .layui-tree li ul li cite, -.site-tree .layui-tree .site-tree-noicon ul li cite{padding-left: 0;} - -.site-tree .layui-tree .layui-this a{color: #01AAED;} -.site-tree .layui-tree .layui-this .layui-icon{color: #01AAED;} - -.site-fix .site-tree{position: fixed; top: 0; bottom: 0; z-index: 666; min-height: 0; overflow: auto; background-color: #fff;} -.site-fix .site-content{margin-left: 220px;} -.site-fix-footer .site-tree{margin-bottom: 120px;} - - -.site-title{ margin: 30px 0 20px;} -.site-title fieldset{border: none; padding: 0; border-top: 1px solid #eee;} -.site-title fieldset legend{margin-left: 20px; padding: 0 10px; font-size: 22px; font-weight: 300;} - -.site-text a{color: #01AAED;} -.site-h1{margin-bottom: 20px; line-height: 60px; padding-bottom: 10px; color: #393D49; border-bottom: 1px solid #eee; font-size: 28px; font-weight: 300;} -.site-h1 .layui-icon{position: relative; top: 5px; font-size: 50px; margin-right: 10px;} -.site-text{position:relative;} -.site-text p{margin-bottom: 10px; line-height:22px;} -.site-text em{padding: 0 3px; font-weight: 500; font-style: italic; color: #666;} -.site-text code{margin:0 5px; padding: 3px 10px; border: 1px solid #e2e2e2; background-color: #fbfbfb; color: #666; border-radius: 2px;} - -.site-table{width: 100%; margin: 10px 0;} -.site-table thead{background-color:#f2f2f2; } -.site-table th, -.site-table td{padding: 6px 15px; min-height: 20px; line-height: 20px; border:1px solid #ddd; font-size: 14px; font-weight: 400;} -.site-table tr:nth-child(even){background: #fbfbfb;} - -.site-block{padding: 20px; border: 1px solid #eee;} -.site-block .layui-form{margin-right: 200px;} - - -/* 演示 */ -body .layui-layout-admin .site-demo{bottom: 82px; padding: 0;z-index:-1;} -body .site-demo-nav .layui-nav-item{line-height: 40px} -.layui-nav-item .layui-icon{position: relative; /*font-size: 20px;*/} -.layui-nav-item a cite{padding: 0 10px;} -.site-demo .layui-main{margin: 15px; line-height: 22px;} -.site-demo-editor{position: absolute; top: 0; bottom: 0; left: 0; width: 50%; } -.site-demo-area{position: absolute; top: 0; bottom: 90px; width: 100%;} -.site-demo-editor textarea{position: absolute; width: 100%; height: 100%; padding: 15px; border: none; resize: none; /*background-color: #F7FBFF;*/ background-color: #272822; color: #CFBFAF; font-family: Courier New; font-size: 12px; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;} -.site-demo-btn{position: absolute; bottom: 100px; right: 20px;} -.site-demo-zanzhu{position: absolute; bottom: 0; left: 0; width: 100%; height: 90px; text-align: center; background-color: #e2e2e2; overflow: hidden;} -.site-demo-zanzhu>*{position: relative; z-index: 1;} -.site-demo-zanzhu:before{content: ""; position: absolute; z-index: 0; top: 50%; left: 50%; width: 120px; margin: -10px 0px 0px -60px; text-align: center; color: rgb(170, 170, 170); font-size: 18px; font-weight: 300; } - -.site-demo-result{position: absolute; right: 0; top: 0; bottom: 0; width: 50%;} -.site-demo-result iframe{position: absolute; width: 100%; height: 100%;} - -.site-demo-button{margin-bottom: 30px;} -.site-demo-button div{margin: 20px 30px 10px;} -.site-demo-button .layui-btn{margin-bottom: 10px;} - - -.site-demo-laytpl{text-align: center;} -.site-demo-laytpl textarea, -.site-demo-laytpl div span{width: 40%; padding: 15px; margin: 0 15px;} -.site-demo-laytpl textarea{height: 300px; border: none; background-color: #3F3F3F; color: #E3CEAB; font-family: Courier New; resize: none;} -.site-demo-laytpl div span{display: inline-block; text-align: center; background: #101010; color: #fff;} -.site-demo-tplres{margin: 10px 0; text-align: center} -.site-demo-tplres .site-demo-tplh2, -.site-demo-tplres .site-demo-tplview{display: inline-block; width: 50%;} -.site-demo-tplres h2{padding: 15px; background: #e2e2e2;} -.site-demo-tplres h3{font-weight: 700;} -.site-demo-tplres div{padding: 14px; border: 1px solid #e2e2e2; text-align: left;} - -.site-demo-upload, -.site-demo-upload img{width: 200px; height: 200px; border-radius: 100%;} -.site-demo-upload{position: relative; background: #e2e2e2;} -.site-demo-upload .site-demo-upbar{position: absolute; top: 50%; left: 50%; margin: -18px 0 0 -56px;} -.site-demo-upload .layui-upload-button{background-color: rgba(0,0,0,.2); color: rgba(255,255,255,1);} - -.site-demo-util{position: relative; width: 300px;} -.site-demo-util img{width: 300px; border-radius: 100%;} -.site-demo-util span{position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: #333; cursor: pointer;} -@-webkit-keyframes demo-fengjie { - 0% {-webkit-filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;} - 80% {-webkit-filter: blur(50px); opacity: 0.95;} - 100% {-webkit-filter: blur(20px); opacity: 0; background: #fff;} -} -@keyframes demo-fengjie { - 0% {filter: blur(0); opacity: 1; background: #fff; height: 300px; border-radius: 100%;} - 80% {filter: blur(50px); opacity: 0.95;} - 100% {filter: blur(20px); opacity: 0; background: #fff;} -} -.site-demo-fengjie{-webkit-animation-name: demo-fengjie; animation-name: demo-fengjie; -webkit-animation-duration: 5s; animation-duration: 5s;} - - -.layui-layout-admin .site-demo-body{top: 117px;} -.site-demo-title{position: fixed; left: 200px; right: 0; top: 76px;} -.site-demo-code{position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: none; padding: 10px; resize: none; font-size: 12px; background-color: #F7FBFF; color: #881280; font-family: Courier New;} - -.site-demo-body .layui-elem-quote a{color: #01AAED;} -.site-demo-body .layui-elem-quote a:hover{color: #FF5722;} - - -/* 其它 */ -#trans-tooltip, -#tip-arrow-bottom, -#tip-arrow-top{display: none !important;} - - -/* 独立组件 */ -.alone{width:730px; margin:200px auto;} -.alone ul{margin-left:1px; font-size:0;} -.alone li{display:inline-block; width:181px; font-size: 16px; text-align:center; line-height:80px; margin:0 1px 1px 0; background-color:#393D49; color:#fff;} -.alone li:hover{opacity:0.8;} -.alone li a{display:block; color:#fff;} - - -/* 自定义css */ -.admin-header-item-mobile{ - position: absolute; right: 0px; height: 70px;line-height: 70px; - padding: 0 20px; text-align: center; top:0; - display: none; -} - -.admin-nav-tree .layui-nav-child a { - padding-left: 30px; -} - -.admin{ - border: 0; - margin: 0; - box-shadow:none; -} -.admin-nav-card{ - margin-top: 5px; -} -.admin-nav-card .layui-icon{ - position: relative; -} -.admin-nav-card .layui-tab-item iframe{ - width: 100%; - border: 0; - height: 100%; -} -.admin-nav-card>.layui-tab-title{ - border-bottom: 1px solid #1AA094; -} -.admin-nav-card .layui-tab-title cite{ - font-style: normal; - padding-left: 5px; -} -.admin-nav-card>.layui-tab-title .layui-this{ - color: white; - background-color: #1AA094; -} -.admin-nav-card>.layui-tab-title .layui-this:after{ - border-bottom: 0; -} -.admin-header-user img{ - width: 40px; height: 40px; border-radius: 100%; - /*position: relative; - top: 15px;*/ -} -.admin-header-user .layui-nav-more{ - top:33px; -} -.admin-header-user .layui-nav-mored{ - top: 26px; -} - -/*lock*/ -.admin-header-lock{ - width: 320px; height: 150px; padding: 20px; position: relative; text-align: center; -} -.admin-header-lock-img{ - width: 60px; height: 60px; margin: 0 auto; -} -.admin-header-lock-img img{ - width: 60px; height: 60px; border-radius: 100%; -} -.admin-header-lock-name{ - color: #009688;margin: 8px 0 15px 0; -} -.admin-header-lock-input{ - width: 150px; color: #FFFFFF; height: 30px; border: 0;background-color: #009688; padding: 0 7px; border-radius: 2px; -} -/*table*/ -.site-table tbody tr td {text-align: center;} -.site-table tbody tr td .layui-btn+.layui-btn{margin-left: 0px;} -.admin-table-page {position: fixed;z-index: 19940201;bottom: 0;width: 100%;background-color: #eee;border-bottom: 1px solid #ddd;left: 0px;} -.admin-table-page .page{padding-left:20px;} -.admin-table-page .page .layui-laypage {margin: 6px 0 0 0;} - -/**/ -.admin-main {margin: 15px;} - -.admin-side-toggle,.admin-side-full{ - position: absolute; cursor: pointer; - z-index: 19940201; - left: 200px; - color: white; - text-align: center; - width: 30px; - height: 30px; - background-color: #1AA094; - line-height: 30px; - top: 25%; -} -.admin-side-toggle:hover{ - background-color: #5FB878; -} -.admin-side-full{ - left: 240px; -} -.admin-login-box{ - width: 185px; height: 70px; position: relative; -} - -.beg-navbar .layui-nav-child dd a{ - padding-left: 30px; -} - - -.admin-contextmenu{ - position: absolute;line-height: 36px;padding: 5px 0; - border: 1px solid #d2d2d2;background-color: white;z-index: 19940201;border-radius: 2px;white-space: nowrap;top:30px; - /*width: 100px;height: 200px; */ -} -.admin-contextmenu ul li{ - padding: 0 15px; -} -.admin-contextmenu ul li:hover{ - background-color: #eee; - cursor: pointer; -} - - -/* 适配多设备 */ -@media screen and (max-width: 750px) { - .layui-main{width: auto; margin: 0 10px;} - .logo, - .header-demo .logo{left: 10px;} - - .site-nav-layim{display: none !important;} - .header .layui-nav .layui-nav-item{margin: 0;} - .header .layui-nav .layui-nav-item a{padding: 0 15px;} - .site-banner{height: 300px;} - .site-banner-bg{background-size: cover;} - .site-zfj{height: 100px; padding-top: 5px;} - .site-zfj i{top: 10px; width: 100px; height: 100px; margin-left: -50px; font-size: 100px;} - .site-desc{background-size: 70%; margin: 0;} - .site-desc cite{display: none;} - .site-download{margin-top: 0; } - .site-download a{height: 40px; line-height: 40px; padding: 0 25px 0 60px; border: 1px solid #778097; border-radius: 30px; color: #fff; font-size: 16px;} - .site-download a cite{left: 20px;} - .site-banner-other{bottom: 15px;} - - .site-idea{margin: 20px 0;} - .site-idea li{margin: 0 0 20px 0; width: 100%; height: auto; -webkit-box-sizing: border-box !important; -moz-box-sizing: border-box !important; box-sizing: border-box !important;} - .site-hengfu img{max-width: 100%} - - .layui-layer-dir{display: none;} - .site-tree{position: fixed; top: 0; bottom: 0; min-height: 0; overflow: auto; z-index: 1000; left: -260px; background-color: #fff; transition: all .3s; -webkit-transition: all .3s;} - .site-content{width: 100%; padding: 0; overflow: auto;} - .site-content img{max-width: 100%;} - .site-tree-mobile{display: block!important; position: fixed; z-index: 100000; bottom: 15px; left: 15px; width: 50px; height: 50px; line-height: 50px; border-radius: 2px; text-align: center; background-color: rgba(0,0,0,.7); color: #fff;} - .site-home .site-tree-mobile{display: none!important;} - .site-mobile .site-tree-mobile{display: none !important;} - .site-mobile .site-tree{left: 0;} - .site-mobile .site-mobile-shade{content: ''; position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: rgba(0,0,0,.8); z-index: 9999;} - .site-tree-mobile i{font-size: 20px;} - .layui-code-view{-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;} - - .layui-layout-admin .layui-side{position: fixed; top: 0; left: -260px; transition: all .3s; -webkit-transition: all .3s; z-index: 10000;} - .layui-body{position: static; bottom: 0; left: 0;} - .site-mobile .layui-side{left: 0;} - body .layui-layout-admin .footer-demo{position: static;} - - .site-demo-area, - .site-demo-editor, - .site-demo-result, - .site-demo-editor textarea, - .site-demo-result iframe{position: static; width: 100%;} - .site-demo-editor textarea{height: 350px;} - .site-demo-zanzhu{display: none;} - .site-demo-btn{bottom: auto; top: 370px;} - .site-demo-result iframe{height: 500px;} - - .site-demo-laytpl textarea, .site-demo-laytpl div span{margin: 0;} - .site-demo-tplres .site-demo-tplh2, .site-demo-tplres .site-demo-tplview{width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;} - - .site-demo-title{position: static; left: 0;} - body .layui-layout-admin .site-demo{} - .site-demo-code{position: static; height: 350px;} - - .admin-side-toggle ,.admin-header-item{display: none;} - .admin-header-item-mobile{ display: block; } -} diff --git a/xxpay-mgr/src/main/resources/static/css/layout.css b/xxpay-mgr/src/main/resources/static/css/layout.css deleted file mode 100755 index c4c22e11b52afaf64d76b844bf7583254f8b2202..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/layout.css +++ /dev/null @@ -1,144 +0,0 @@ -.beg-layout-container{ - /*min-width: 1024px;*/ -} -.beg-layout-container .beg-layout-main{ - position: absolute; -} -.beg-layout-container .beg-layout-header{ - background-color: #FFFFFF; - height: 55px; - position: fixed; - width: 100%; - min-width: 800px; - border-bottom: 5px solid #1AA094; -} -.beg-layout-container .beg-layout-header .beg-layout-logo{ - width: 200px; - height: 60px; - text-align: center; - line-height: 60px; -} -.beg-layout-container .beg-layout-header .beg-layout-side-toggle{ - position: absolute; - cursor: pointer; - z-index: 19940201; - left: 200px; - color: white; - text-align: center; - width: 30px; - height: 30px; - background-color: #1AA094; - line-height: 30px; - top: 25%; -} -.beg-layout-container .beg-layout-header .beg-layout-side-toggle:hover{ - background-color: #5FB878; -} -.beg-layout-container .beg-layout-header .beg-layout-menu{ - top: 0; - left:230px; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav{ - background: none; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-nav-item{ - line-height: 60px; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-nav-item .layui-nav-more{ - top:27px -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-nav-item .layui-nav-mored{ - top:20px -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-this{ - color: #FFFFFF; - background-color: #4E5465; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-this:after,.beg-layout-header .layui-nav-bar{ - background-color: #4E5465; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-nav-item a{ - color: #393D49; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-this a{ - color: #FFFFFF; -} -.beg-layout-header .beg-layout-menu .beg-layout-nav .layui-nav-item a:hover{ - color: #FFFFFF; - background-color: #4E5465; -} -.beg-layout-header .beg-layout-panel{ - right: 10px; -} -.beg-layout-header .beg-layout-panel .beg-layout-nav{ - background: none; -} -.beg-layout-header .beg-layout-panel .beg-layout-nav a{ - color: #393D49; -} -.beg-layout-header .beg-layou-head{ - -} -.beg-layout-header .beg-layou-head img{ - width: 40px; height: 40px; border-radius: 100%; -} - -.beg-layout-container .beg-layout-side{ - background-color: #393D49; - color: #FFFFFF; - top: 60px; -} -.beg-layout-container .beg-layout-body{ - top: 60px; - height: auto; -} -.beg-layout-container .beg-layout-body .layout-nav-card cite{ - font-style: normal; - padding-left: 5px; -} -.beg-layout-body iframe{ - width: 100%; - border: 0; - height: 99.5%; -} -.beg-layout-container .beg-layout-footer{ - line-height: 44px; - text-align: center; -} - -.layout-tab-contextmenu {width: 135px; background-color: #CCCCCC;position: absolute; z-index: 19940201;display: none;} -.layout-tab-contextmenu .layui-nav{ - padding: 5px 3px; -} -.layout-tab-contextmenu .layui-nav .layui-nav-item{ - line-height: 27px;width: 100%; -} -.layout-tab-contextmenu .layui-nav .layui-nav-item:hover{ - background-color: #5FB878; -} -.layout-tab-contextmenu .layui-nav .layui-nav-item a{ - text-align: left; -} - -.layout-tab-contextmenu .layui-nav .layui-this:after, .layout-tab-contextmenu .layui-nav-bar { - transition: none; -webkit-transition:none; background: none; - } -.admin-contextmenu{ - position: absolute;line-height: 36px;padding: 5px 0; - border: 1px solid #d2d2d2;background-color: white;z-index: 19940201;border-radius: 2px;white-space: nowrap;top:30px; - /*width: 100px;height: 200px; */ -} -.admin-contextmenu ul li{ - padding: 0 15px; -} -.admin-contextmenu ul li:hover{ - background-color: #eee; - cursor: pointer; -} - -@media screen and (max-width: 1024px) { - .beg-layout-menu cite{ - display: none; - } - -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/css/login.css b/xxpay-mgr/src/main/resources/static/css/login.css deleted file mode 100755 index e949ea5c219d0d808a4e39f5ad0f63d2e135c5be..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/login.css +++ /dev/null @@ -1,92 +0,0 @@ -.beg-login-bg { - background: url(../Images/login-bg-1.jpg) no-repeat center center fixed; - background-color: #393D49; -} - -.beg-login-box { - width: 450px; - height: 330px; - margin: 10% auto; - background-color: rgba(255, 255, 255, 0.407843); - border-radius: 10px; - color: aliceblue; -} - -.beg-login-box header { - height: 39px; - padding: 10px; - border-bottom: 1px solid aliceblue; -} - -.beg-login-box header h1 { - text-align: center; - font-size: 25px; - line-height: 40px; -} - -.beg-login-box .beg-login-main { - height: 185px; - padding: 30px 90px 0; -} - -.beg-login-main .layui-form-item { - position: relative; -} - -.beg-login-main .layui-form-item .beg-login-icon { - position: absolute; - color: #cccccc; - top: 10px; - left: 10px; -} - -.beg-login-main .layui-form-item input { - padding-left: 34px; -} - -.beg-login-box footer { - height: 35px; - padding: 10px 10px 0 10px; -} - -.beg-login-box footer p { - line-height: 35px; - text-align: center; -} - -.beg-pull-left { - float: left !important; -} - -.beg-pull-right { - float: right !important; -} - -.beg-clear { - clear: both; -} - -.beg-login-remember { - line-height: 38px; -} - -.beg-login-remember .layui-form-switch { - margin-top: 0px; -} - -.beg-login-code-box { - position: relative; - padding: 10px; -} - -.beg-login-code-box input { - position: absolute; - width: 100px; -} - -.beg-login-code-box img { - cursor: pointer; - position: absolute; - left: 115px; - height: 38px; -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/css/main.css b/xxpay-mgr/src/main/resources/static/css/main.css deleted file mode 100755 index 5ebe44df11b1875edcfddb43925dec1c9ada46bc..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/main.css +++ /dev/null @@ -1,9 +0,0 @@ -.admin-main{ - margin: 15px; -} -.admin-main .layui-field-title .layui-field-box{ - padding: 10px 30px; -} -.admin-main .layui-field-title .layui-field-box p{ - padding: 5px 0; -} diff --git a/xxpay-mgr/src/main/resources/static/css/table.css b/xxpay-mgr/src/main/resources/static/css/table.css deleted file mode 100755 index 02257bb61500461efbab341c395c3f25017ba91e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/css/table.css +++ /dev/null @@ -1,16 +0,0 @@ -/*table*/ -.site-table tbody tr td {text-align: center;} -.site-table tbody tr td .layui-btn+.layui-btn{margin-left: 0px;} -.admin-table-page {position: fixed;z-index: 19940201;bottom: 0;width: 100%;background-color: #eee;border-bottom: 1px solid #ddd;left: 0px;} -.admin-table-page .page{padding-left:20px;} -.admin-table-page .page .layui-laypage {margin: 6px 0 0 0;} -.table-hover tbody tr:hover{ background-color: #EEEEEE; } - -.admin-table{ - -} -.admin-table .layui-form-checkbox{ - margin-top: 0; - height: 20px; - line-height: 20px; -} diff --git a/xxpay-mgr/src/main/resources/static/datas/area_data.js b/xxpay-mgr/src/main/resources/static/datas/area_data.js deleted file mode 100755 index 79460a000a981384e2446d9c6813908679c167a9..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/area_data.js +++ /dev/null @@ -1,13717 +0,0 @@ -var Area = [ - { - "provinceCode": "110000", - "provinceName": "北京市", - "mallCityList": [ - { - "cityCode": "110100", - "cityName": "北京市", - "mallAreaList": [ - { - "areaCode": "110101", - "areaName": "东城区" - }, - { - "areaCode": "110102", - "areaName": "西城区" - }, - { - "areaCode": "110105", - "areaName": "朝阳区" - }, - { - "areaCode": "110106", - "areaName": "丰台区" - }, - { - "areaCode": "110107", - "areaName": "石景山区" - }, - { - "areaCode": "110108", - "areaName": "海淀区" - }, - { - "areaCode": "110109", - "areaName": "门头沟区" - }, - { - "areaCode": "110111", - "areaName": "房山区" - }, - { - "areaCode": "110112", - "areaName": "通州区" - }, - { - "areaCode": "110113", - "areaName": "顺义区" - }, - { - "areaCode": "110114", - "areaName": "昌平区" - }, - { - "areaCode": "110115", - "areaName": "大兴区" - }, - { - "areaCode": "110116", - "areaName": "怀柔区" - }, - { - "areaCode": "110117", - "areaName": "平谷区" - } - ] - }, - { - "cityCode": "110200", - "cityName": "北京市辖县", - "mallAreaList": [ - { - "areaCode": "110228", - "areaName": "密云县" - }, - { - "areaCode": "110229", - "areaName": "延庆县" - } - ] - } - ] - }, - { - "provinceCode": "120000", - "provinceName": "天津市", - "mallCityList": [ - { - "cityCode": "120100", - "cityName": "天津市", - "mallAreaList": [ - { - "areaCode": "120101", - "areaName": "和平区" - }, - { - "areaCode": "120102", - "areaName": "河东区" - }, - { - "areaCode": "120103", - "areaName": "河西区" - }, - { - "areaCode": "120104", - "areaName": "南开区" - }, - { - "areaCode": "120105", - "areaName": "河北区" - }, - { - "areaCode": "120106", - "areaName": "红桥区" - }, - { - "areaCode": "120110", - "areaName": "东丽区" - }, - { - "areaCode": "120111", - "areaName": "西青区" - }, - { - "areaCode": "120112", - "areaName": "津南区" - }, - { - "areaCode": "120113", - "areaName": "北辰区" - }, - { - "areaCode": "120114", - "areaName": "武清区" - }, - { - "areaCode": "120115", - "areaName": "宝坻区" - }, - { - "areaCode": "120116", - "areaName": "滨海新区" - } - ] - }, - { - "cityCode": "120200", - "cityName": "天津市辖县", - "mallAreaList": [ - { - "areaCode": "120221", - "areaName": "宁河县" - }, - { - "areaCode": "120223", - "areaName": "静海县" - }, - { - "areaCode": "120225", - "areaName": "蓟县" - } - ] - } - ] - }, - { - "provinceCode": "130000", - "provinceName": "河北省", - "mallCityList": [ - { - "cityCode": "130100", - "cityName": "石家庄市", - "mallAreaList": [ - { - "areaCode": "130102", - "areaName": "长安区" - }, - { - "areaCode": "130104", - "areaName": "桥西区" - }, - { - "areaCode": "130105", - "areaName": "新华区" - }, - { - "areaCode": "130107", - "areaName": "井陉矿区" - }, - { - "areaCode": "130108", - "areaName": "裕华区" - }, - { - "areaCode": "130109", - "areaName": "藁城区" - }, - { - "areaCode": "130110", - "areaName": "鹿泉区" - }, - { - "areaCode": "130111", - "areaName": "栾城区" - }, - { - "areaCode": "130121", - "areaName": "井陉县" - }, - { - "areaCode": "130123", - "areaName": "正定县" - }, - { - "areaCode": "130125", - "areaName": "行唐县" - }, - { - "areaCode": "130126", - "areaName": "灵寿县" - }, - { - "areaCode": "130127", - "areaName": "高邑县" - }, - { - "areaCode": "130128", - "areaName": "深泽县" - }, - { - "areaCode": "130129", - "areaName": "赞皇县" - }, - { - "areaCode": "130130", - "areaName": "无极县" - }, - { - "areaCode": "130131", - "areaName": "平山县" - }, - { - "areaCode": "130132", - "areaName": "元氏县" - }, - { - "areaCode": "130133", - "areaName": "赵县" - }, - { - "areaCode": "130181", - "areaName": "辛集市" - }, - { - "areaCode": "130183", - "areaName": "晋州市" - }, - { - "areaCode": "130184", - "areaName": "新乐市" - } - ] - }, - { - "cityCode": "130200", - "cityName": "唐山市", - "mallAreaList": [ - { - "areaCode": "130202", - "areaName": "路南区" - }, - { - "areaCode": "130203", - "areaName": "路北区" - }, - { - "areaCode": "130204", - "areaName": "古冶区" - }, - { - "areaCode": "130205", - "areaName": "开平区" - }, - { - "areaCode": "130207", - "areaName": "丰南区" - }, - { - "areaCode": "130208", - "areaName": "丰润区" - }, - { - "areaCode": "130209", - "areaName": "曹妃甸区" - }, - { - "areaCode": "130223", - "areaName": "滦县" - }, - { - "areaCode": "130224", - "areaName": "滦南县" - }, - { - "areaCode": "130225", - "areaName": "乐亭县" - }, - { - "areaCode": "130227", - "areaName": "迁西县" - }, - { - "areaCode": "130229", - "areaName": "玉田县" - }, - { - "areaCode": "130281", - "areaName": "遵化市" - }, - { - "areaCode": "130283", - "areaName": "迁安市" - } - ] - }, - { - "cityCode": "130300", - "cityName": "秦皇岛市", - "mallAreaList": [ - { - "areaCode": "130302", - "areaName": "海港区" - }, - { - "areaCode": "130303", - "areaName": "山海关区" - }, - { - "areaCode": "130304", - "areaName": "北戴河区" - }, - { - "areaCode": "130321", - "areaName": "青龙满族自治县" - }, - { - "areaCode": "130322", - "areaName": "昌黎县" - }, - { - "areaCode": "130323", - "areaName": "抚宁县" - }, - { - "areaCode": "130324", - "areaName": "卢龙县" - } - ] - }, - { - "cityCode": "130400", - "cityName": "邯郸市", - "mallAreaList": [ - { - "areaCode": "130402", - "areaName": "邯山区" - }, - { - "areaCode": "130403", - "areaName": "丛台区" - }, - { - "areaCode": "130404", - "areaName": "复兴区" - }, - { - "areaCode": "130406", - "areaName": "峰峰矿区" - }, - { - "areaCode": "130421", - "areaName": "邯郸县" - }, - { - "areaCode": "130423", - "areaName": "临漳县" - }, - { - "areaCode": "130424", - "areaName": "成安县" - }, - { - "areaCode": "130425", - "areaName": "大名县" - }, - { - "areaCode": "130426", - "areaName": "涉县" - }, - { - "areaCode": "130427", - "areaName": "磁县" - }, - { - "areaCode": "130428", - "areaName": "肥乡县" - }, - { - "areaCode": "130429", - "areaName": "永年县" - }, - { - "areaCode": "130430", - "areaName": "邱县" - }, - { - "areaCode": "130431", - "areaName": "鸡泽县" - }, - { - "areaCode": "130432", - "areaName": "广平县" - }, - { - "areaCode": "130433", - "areaName": "馆陶县" - }, - { - "areaCode": "130434", - "areaName": "魏县" - }, - { - "areaCode": "130435", - "areaName": "曲周县" - }, - { - "areaCode": "130481", - "areaName": "武安市" - } - ] - }, - { - "cityCode": "130500", - "cityName": "邢台市", - "mallAreaList": [ - { - "areaCode": "130502", - "areaName": "桥东区" - }, - { - "areaCode": "130503", - "areaName": "桥西区" - }, - { - "areaCode": "130521", - "areaName": "邢台县" - }, - { - "areaCode": "130522", - "areaName": "临城县" - }, - { - "areaCode": "130523", - "areaName": "内丘县" - }, - { - "areaCode": "130524", - "areaName": "柏乡县" - }, - { - "areaCode": "130525", - "areaName": "隆尧县" - }, - { - "areaCode": "130526", - "areaName": "任县" - }, - { - "areaCode": "130527", - "areaName": "南和县" - }, - { - "areaCode": "130528", - "areaName": "宁晋县" - }, - { - "areaCode": "130529", - "areaName": "巨鹿县" - }, - { - "areaCode": "130530", - "areaName": "新河县" - }, - { - "areaCode": "130531", - "areaName": "广宗县" - }, - { - "areaCode": "130532", - "areaName": "平乡县" - }, - { - "areaCode": "130533", - "areaName": "威县" - }, - { - "areaCode": "130534", - "areaName": "清河县" - }, - { - "areaCode": "130535", - "areaName": "临西县" - }, - { - "areaCode": "130581", - "areaName": "南宫市" - }, - { - "areaCode": "130582", - "areaName": "沙河市" - } - ] - }, - { - "cityCode": "130600", - "cityName": "保定市", - "mallAreaList": [ - { - "areaCode": "130602", - "areaName": "新市区" - }, - { - "areaCode": "130603", - "areaName": "北市区" - }, - { - "areaCode": "130604", - "areaName": "南市区" - }, - { - "areaCode": "130621", - "areaName": "满城县" - }, - { - "areaCode": "130622", - "areaName": "清苑县" - }, - { - "areaCode": "130623", - "areaName": "涞水县" - }, - { - "areaCode": "130624", - "areaName": "阜平县" - }, - { - "areaCode": "130625", - "areaName": "徐水县" - }, - { - "areaCode": "130626", - "areaName": "定兴县" - }, - { - "areaCode": "130627", - "areaName": "唐县" - }, - { - "areaCode": "130628", - "areaName": "高阳县" - }, - { - "areaCode": "130629", - "areaName": "容城县" - }, - { - "areaCode": "130630", - "areaName": "涞源县" - }, - { - "areaCode": "130631", - "areaName": "望都县" - }, - { - "areaCode": "130632", - "areaName": "安新县" - }, - { - "areaCode": "130633", - "areaName": "易县" - }, - { - "areaCode": "130634", - "areaName": "曲阳县" - }, - { - "areaCode": "130635", - "areaName": "蠡县" - }, - { - "areaCode": "130636", - "areaName": "顺平县" - }, - { - "areaCode": "130637", - "areaName": "博野县" - }, - { - "areaCode": "130638", - "areaName": "雄县" - }, - { - "areaCode": "130681", - "areaName": "涿州市" - }, - { - "areaCode": "130682", - "areaName": "定州市" - }, - { - "areaCode": "130683", - "areaName": "安国市" - }, - { - "areaCode": "130684", - "areaName": "高碑店市" - } - ] - }, - { - "cityCode": "130700", - "cityName": "张家口市", - "mallAreaList": [ - { - "areaCode": "130702", - "areaName": "桥东区" - }, - { - "areaCode": "130703", - "areaName": "桥西区" - }, - { - "areaCode": "130705", - "areaName": "宣化区" - }, - { - "areaCode": "130706", - "areaName": "下花园区" - }, - { - "areaCode": "130721", - "areaName": "宣化县" - }, - { - "areaCode": "130722", - "areaName": "张北县" - }, - { - "areaCode": "130723", - "areaName": "康保县" - }, - { - "areaCode": "130724", - "areaName": "沽源县" - }, - { - "areaCode": "130725", - "areaName": "尚义县" - }, - { - "areaCode": "130726", - "areaName": "蔚县" - }, - { - "areaCode": "130727", - "areaName": "阳原县" - }, - { - "areaCode": "130728", - "areaName": "怀安县" - }, - { - "areaCode": "130729", - "areaName": "万全县" - }, - { - "areaCode": "130730", - "areaName": "怀来县" - }, - { - "areaCode": "130731", - "areaName": "涿鹿县" - }, - { - "areaCode": "130732", - "areaName": "赤城县" - }, - { - "areaCode": "130733", - "areaName": "崇礼县" - } - ] - }, - { - "cityCode": "130800", - "cityName": "承德市", - "mallAreaList": [ - { - "areaCode": "130802", - "areaName": "双桥区" - }, - { - "areaCode": "130803", - "areaName": "双滦区" - }, - { - "areaCode": "130804", - "areaName": "鹰手营子矿区" - }, - { - "areaCode": "130821", - "areaName": "承德县" - }, - { - "areaCode": "130822", - "areaName": "兴隆县" - }, - { - "areaCode": "130823", - "areaName": "平泉县" - }, - { - "areaCode": "130824", - "areaName": "滦平县" - }, - { - "areaCode": "130825", - "areaName": "隆化县" - }, - { - "areaCode": "130826", - "areaName": "丰宁满族自治县" - }, - { - "areaCode": "130827", - "areaName": "宽城满族自治县" - }, - { - "areaCode": "130828", - "areaName": "围场满族蒙古族自治县" - } - ] - }, - { - "cityCode": "130900", - "cityName": "沧州市", - "mallAreaList": [ - { - "areaCode": "130902", - "areaName": "新华区" - }, - { - "areaCode": "130903", - "areaName": "运河区" - }, - { - "areaCode": "130921", - "areaName": "沧县" - }, - { - "areaCode": "130922", - "areaName": "青县" - }, - { - "areaCode": "130923", - "areaName": "东光县" - }, - { - "areaCode": "130924", - "areaName": "海兴县" - }, - { - "areaCode": "130925", - "areaName": "盐山县" - }, - { - "areaCode": "130926", - "areaName": "肃宁县" - }, - { - "areaCode": "130927", - "areaName": "南皮县" - }, - { - "areaCode": "130928", - "areaName": "吴桥县" - }, - { - "areaCode": "130929", - "areaName": "献县" - }, - { - "areaCode": "130930", - "areaName": "孟村回族自治县" - }, - { - "areaCode": "130981", - "areaName": "泊头市" - }, - { - "areaCode": "130982", - "areaName": "任丘市" - }, - { - "areaCode": "130983", - "areaName": "黄骅市" - }, - { - "areaCode": "130984", - "areaName": "河间市" - } - ] - }, - { - "cityCode": "131000", - "cityName": "廊坊市", - "mallAreaList": [ - { - "areaCode": "131002", - "areaName": "安次区" - }, - { - "areaCode": "131003", - "areaName": "广阳区" - }, - { - "areaCode": "131022", - "areaName": "固安县" - }, - { - "areaCode": "131023", - "areaName": "永清县" - }, - { - "areaCode": "131024", - "areaName": "香河县" - }, - { - "areaCode": "131025", - "areaName": "大城县" - }, - { - "areaCode": "131026", - "areaName": "文安县" - }, - { - "areaCode": "131028", - "areaName": "大厂回族自治县" - }, - { - "areaCode": "131081", - "areaName": "霸州市" - }, - { - "areaCode": "131082", - "areaName": "三河市" - } - ] - }, - { - "cityCode": "131100", - "cityName": "衡水市", - "mallAreaList": [ - { - "areaCode": "131102", - "areaName": "桃城区" - }, - { - "areaCode": "131121", - "areaName": "枣强县" - }, - { - "areaCode": "131122", - "areaName": "武邑县" - }, - { - "areaCode": "131123", - "areaName": "武强县" - }, - { - "areaCode": "131124", - "areaName": "饶阳县" - }, - { - "areaCode": "131125", - "areaName": "安平县" - }, - { - "areaCode": "131126", - "areaName": "故城县" - }, - { - "areaCode": "131127", - "areaName": "景县" - }, - { - "areaCode": "131128", - "areaName": "阜城县" - }, - { - "areaCode": "131181", - "areaName": "冀州市" - }, - { - "areaCode": "131182", - "areaName": "深州市" - } - ] - } - ] - }, - { - "provinceCode": "140000", - "provinceName": "山西省", - "mallCityList": [ - { - "cityCode": "140100", - "cityName": "太原市", - "mallAreaList": [ - { - "areaCode": "140105", - "areaName": "小店区" - }, - { - "areaCode": "140106", - "areaName": "迎泽区" - }, - { - "areaCode": "140107", - "areaName": "杏花岭区" - }, - { - "areaCode": "140108", - "areaName": "尖草坪区" - }, - { - "areaCode": "140109", - "areaName": "万柏林区" - }, - { - "areaCode": "140110", - "areaName": "晋源区" - }, - { - "areaCode": "140121", - "areaName": "清徐县" - }, - { - "areaCode": "140122", - "areaName": "阳曲县" - }, - { - "areaCode": "140123", - "areaName": "娄烦县" - }, - { - "areaCode": "140181", - "areaName": "古交市" - } - ] - }, - { - "cityCode": "140200", - "cityName": "大同市", - "mallAreaList": [ - { - "areaCode": "140202", - "areaName": "城区" - }, - { - "areaCode": "140203", - "areaName": "矿区" - }, - { - "areaCode": "140211", - "areaName": "南郊区" - }, - { - "areaCode": "140212", - "areaName": "新荣区" - }, - { - "areaCode": "140221", - "areaName": "阳高县" - }, - { - "areaCode": "140222", - "areaName": "天镇县" - }, - { - "areaCode": "140223", - "areaName": "广灵县" - }, - { - "areaCode": "140224", - "areaName": "灵丘县" - }, - { - "areaCode": "140225", - "areaName": "浑源县" - }, - { - "areaCode": "140226", - "areaName": "左云县" - }, - { - "areaCode": "140227", - "areaName": "大同县" - } - ] - }, - { - "cityCode": "140300", - "cityName": "阳泉市", - "mallAreaList": [ - { - "areaCode": "140302", - "areaName": "城区" - }, - { - "areaCode": "140303", - "areaName": "矿区" - }, - { - "areaCode": "140311", - "areaName": "郊区" - }, - { - "areaCode": "140321", - "areaName": "平定县" - }, - { - "areaCode": "140322", - "areaName": "盂县" - } - ] - }, - { - "cityCode": "140400", - "cityName": "长治市", - "mallAreaList": [ - { - "areaCode": "140402", - "areaName": "城区" - }, - { - "areaCode": "140411", - "areaName": "郊区" - }, - { - "areaCode": "140421", - "areaName": "长治县" - }, - { - "areaCode": "140423", - "areaName": "襄垣县" - }, - { - "areaCode": "140424", - "areaName": "屯留县" - }, - { - "areaCode": "140425", - "areaName": "平顺县" - }, - { - "areaCode": "140426", - "areaName": "黎城县" - }, - { - "areaCode": "140427", - "areaName": "壶关县" - }, - { - "areaCode": "140428", - "areaName": "长子县" - }, - { - "areaCode": "140429", - "areaName": "武乡县" - }, - { - "areaCode": "140430", - "areaName": "沁县" - }, - { - "areaCode": "140431", - "areaName": "沁源县" - }, - { - "areaCode": "140481", - "areaName": "潞城市" - } - ] - }, - { - "cityCode": "140500", - "cityName": "晋城市", - "mallAreaList": [ - { - "areaCode": "140502", - "areaName": "城区" - }, - { - "areaCode": "140521", - "areaName": "沁水县" - }, - { - "areaCode": "140522", - "areaName": "阳城县" - }, - { - "areaCode": "140524", - "areaName": "陵川县" - }, - { - "areaCode": "140525", - "areaName": "泽州县" - }, - { - "areaCode": "140581", - "areaName": "高平市" - } - ] - }, - { - "cityCode": "140600", - "cityName": "朔州市", - "mallAreaList": [ - { - "areaCode": "140602", - "areaName": "朔城区" - }, - { - "areaCode": "140603", - "areaName": "平鲁区" - }, - { - "areaCode": "140621", - "areaName": "山阴县" - }, - { - "areaCode": "140622", - "areaName": "应县" - }, - { - "areaCode": "140623", - "areaName": "右玉县" - }, - { - "areaCode": "140624", - "areaName": "怀仁县" - } - ] - }, - { - "cityCode": "140700", - "cityName": "晋中市", - "mallAreaList": [ - { - "areaCode": "140702", - "areaName": "榆次区" - }, - { - "areaCode": "140721", - "areaName": "榆社县" - }, - { - "areaCode": "140722", - "areaName": "左权县" - }, - { - "areaCode": "140723", - "areaName": "和顺县" - }, - { - "areaCode": "140724", - "areaName": "昔阳县" - }, - { - "areaCode": "140725", - "areaName": "寿阳县" - }, - { - "areaCode": "140726", - "areaName": "太谷县" - }, - { - "areaCode": "140727", - "areaName": "祁县" - }, - { - "areaCode": "140728", - "areaName": "平遥县" - }, - { - "areaCode": "140729", - "areaName": "灵石县" - }, - { - "areaCode": "140781", - "areaName": "介休市" - } - ] - }, - { - "cityCode": "140800", - "cityName": "运城市", - "mallAreaList": [ - { - "areaCode": "140802", - "areaName": "盐湖区" - }, - { - "areaCode": "140821", - "areaName": "临猗县" - }, - { - "areaCode": "140822", - "areaName": "万荣县" - }, - { - "areaCode": "140823", - "areaName": "闻喜县" - }, - { - "areaCode": "140824", - "areaName": "稷山县" - }, - { - "areaCode": "140825", - "areaName": "新绛县" - }, - { - "areaCode": "140826", - "areaName": "绛县" - }, - { - "areaCode": "140827", - "areaName": "垣曲县" - }, - { - "areaCode": "140828", - "areaName": "夏县" - }, - { - "areaCode": "140829", - "areaName": "平陆县" - }, - { - "areaCode": "140830", - "areaName": "芮城县" - }, - { - "areaCode": "140881", - "areaName": "永济市" - }, - { - "areaCode": "140882", - "areaName": "河津市" - } - ] - }, - { - "cityCode": "140900", - "cityName": "忻州市", - "mallAreaList": [ - { - "areaCode": "140902", - "areaName": "忻府区" - }, - { - "areaCode": "140921", - "areaName": "定襄县" - }, - { - "areaCode": "140922", - "areaName": "五台县" - }, - { - "areaCode": "140923", - "areaName": "代县" - }, - { - "areaCode": "140924", - "areaName": "繁峙县" - }, - { - "areaCode": "140925", - "areaName": "宁武县" - }, - { - "areaCode": "140926", - "areaName": "静乐县" - }, - { - "areaCode": "140927", - "areaName": "神池县" - }, - { - "areaCode": "140928", - "areaName": "五寨县" - }, - { - "areaCode": "140929", - "areaName": "岢岚县" - }, - { - "areaCode": "140930", - "areaName": "河曲县" - }, - { - "areaCode": "140931", - "areaName": "保德县" - }, - { - "areaCode": "140932", - "areaName": "偏关县" - }, - { - "areaCode": "140981", - "areaName": "原平市" - } - ] - }, - { - "cityCode": "141000", - "cityName": "临汾市", - "mallAreaList": [ - { - "areaCode": "141002", - "areaName": "尧都区" - }, - { - "areaCode": "141021", - "areaName": "曲沃县" - }, - { - "areaCode": "141022", - "areaName": "翼城县" - }, - { - "areaCode": "141023", - "areaName": "襄汾县" - }, - { - "areaCode": "141024", - "areaName": "洪洞县" - }, - { - "areaCode": "141025", - "areaName": "古县" - }, - { - "areaCode": "141026", - "areaName": "安泽县" - }, - { - "areaCode": "141027", - "areaName": "浮山县" - }, - { - "areaCode": "141028", - "areaName": "吉县" - }, - { - "areaCode": "141029", - "areaName": "乡宁县" - }, - { - "areaCode": "141030", - "areaName": "大宁县" - }, - { - "areaCode": "141031", - "areaName": "隰县" - }, - { - "areaCode": "141032", - "areaName": "永和县" - }, - { - "areaCode": "141033", - "areaName": "蒲县" - }, - { - "areaCode": "141034", - "areaName": "汾西县" - }, - { - "areaCode": "141081", - "areaName": "侯马市" - }, - { - "areaCode": "141082", - "areaName": "霍州市" - } - ] - }, - { - "cityCode": "141100", - "cityName": "吕梁市", - "mallAreaList": [ - { - "areaCode": "141102", - "areaName": "离石区" - }, - { - "areaCode": "141121", - "areaName": "文水县" - }, - { - "areaCode": "141122", - "areaName": "交城县" - }, - { - "areaCode": "141123", - "areaName": "兴县" - }, - { - "areaCode": "141124", - "areaName": "临县" - }, - { - "areaCode": "141125", - "areaName": "柳林县" - }, - { - "areaCode": "141126", - "areaName": "石楼县" - }, - { - "areaCode": "141127", - "areaName": "岚县" - }, - { - "areaCode": "141128", - "areaName": "方山县" - }, - { - "areaCode": "141129", - "areaName": "中阳县" - }, - { - "areaCode": "141130", - "areaName": "交口县" - }, - { - "areaCode": "141181", - "areaName": "孝义市" - }, - { - "areaCode": "141182", - "areaName": "汾阳市" - } - ] - } - ] - }, - { - "provinceCode": "150000", - "provinceName": "内蒙古自治区", - "mallCityList": [ - { - "cityCode": "150100", - "cityName": "呼和浩特市", - "mallAreaList": [ - { - "areaCode": "150102", - "areaName": "新城区" - }, - { - "areaCode": "150103", - "areaName": "回民区" - }, - { - "areaCode": "150104", - "areaName": "玉泉区" - }, - { - "areaCode": "150105", - "areaName": "赛罕区" - }, - { - "areaCode": "150121", - "areaName": "土默特左旗" - }, - { - "areaCode": "150122", - "areaName": "托克托县" - }, - { - "areaCode": "150123", - "areaName": "和林格尔县" - }, - { - "areaCode": "150124", - "areaName": "清水河县" - }, - { - "areaCode": "150125", - "areaName": "武川县" - } - ] - }, - { - "cityCode": "150200", - "cityName": "包头市", - "mallAreaList": [ - { - "areaCode": "150202", - "areaName": "东河区" - }, - { - "areaCode": "150203", - "areaName": "昆都仑区" - }, - { - "areaCode": "150204", - "areaName": "青山区" - }, - { - "areaCode": "150205", - "areaName": "石拐区" - }, - { - "areaCode": "150206", - "areaName": "白云鄂博矿区" - }, - { - "areaCode": "150207", - "areaName": "九原区" - }, - { - "areaCode": "150221", - "areaName": "土默特右旗" - }, - { - "areaCode": "150222", - "areaName": "固阳县" - }, - { - "areaCode": "150223", - "areaName": "达尔罕茂明安联合旗" - } - ] - }, - { - "cityCode": "150300", - "cityName": "乌海市", - "mallAreaList": [ - { - "areaCode": "150302", - "areaName": "海勃湾区" - }, - { - "areaCode": "150303", - "areaName": "海南区" - }, - { - "areaCode": "150304", - "areaName": "乌达区" - } - ] - }, - { - "cityCode": "150400", - "cityName": "赤峰市", - "mallAreaList": [ - { - "areaCode": "150402", - "areaName": "红山区" - }, - { - "areaCode": "150403", - "areaName": "元宝山区" - }, - { - "areaCode": "150404", - "areaName": "松山区" - }, - { - "areaCode": "150421", - "areaName": "阿鲁科尔沁旗" - }, - { - "areaCode": "150422", - "areaName": "巴林左旗" - }, - { - "areaCode": "150423", - "areaName": "巴林右旗" - }, - { - "areaCode": "150424", - "areaName": "林西县" - }, - { - "areaCode": "150425", - "areaName": "克什克腾旗" - }, - { - "areaCode": "150426", - "areaName": "翁牛特旗" - }, - { - "areaCode": "150428", - "areaName": "喀喇沁旗" - }, - { - "areaCode": "150429", - "areaName": "宁城县" - }, - { - "areaCode": "150430", - "areaName": "敖汉旗" - } - ] - }, - { - "cityCode": "150500", - "cityName": "通辽市", - "mallAreaList": [ - { - "areaCode": "150502", - "areaName": "科尔沁区" - }, - { - "areaCode": "150521", - "areaName": "科尔沁左翼中旗" - }, - { - "areaCode": "150522", - "areaName": "科尔沁左翼后旗" - }, - { - "areaCode": "150523", - "areaName": "开鲁县" - }, - { - "areaCode": "150524", - "areaName": "库伦旗" - }, - { - "areaCode": "150525", - "areaName": "奈曼旗" - }, - { - "areaCode": "150526", - "areaName": "扎鲁特旗" - }, - { - "areaCode": "150581", - "areaName": "霍林郭勒市" - } - ] - }, - { - "cityCode": "150600", - "cityName": "鄂尔多斯市", - "mallAreaList": [ - { - "areaCode": "150602", - "areaName": "东胜区" - }, - { - "areaCode": "150621", - "areaName": "达拉特旗" - }, - { - "areaCode": "150622", - "areaName": "准格尔旗" - }, - { - "areaCode": "150623", - "areaName": "鄂托克前旗" - }, - { - "areaCode": "150624", - "areaName": "鄂托克旗" - }, - { - "areaCode": "150625", - "areaName": "杭锦旗" - }, - { - "areaCode": "150626", - "areaName": "乌审旗" - }, - { - "areaCode": "150627", - "areaName": "伊金霍洛旗" - } - ] - }, - { - "cityCode": "150700", - "cityName": "呼伦贝尔市", - "mallAreaList": [ - { - "areaCode": "150702", - "areaName": "海拉尔区" - }, - { - "areaCode": "150703", - "areaName": "扎赉诺尔区" - }, - { - "areaCode": "150721", - "areaName": "阿荣旗" - }, - { - "areaCode": "150722", - "areaName": "莫力达瓦达斡尔族自治旗" - }, - { - "areaCode": "150723", - "areaName": "鄂伦春自治旗" - }, - { - "areaCode": "150724", - "areaName": "鄂温克族自治旗" - }, - { - "areaCode": "150725", - "areaName": "陈巴尔虎旗" - }, - { - "areaCode": "150726", - "areaName": "新巴尔虎左旗" - }, - { - "areaCode": "150727", - "areaName": "新巴尔虎右旗" - }, - { - "areaCode": "150781", - "areaName": "满洲里市" - }, - { - "areaCode": "150782", - "areaName": "牙克石市" - }, - { - "areaCode": "150783", - "areaName": "扎兰屯市" - }, - { - "areaCode": "150784", - "areaName": "额尔古纳市" - }, - { - "areaCode": "150785", - "areaName": "根河市" - } - ] - }, - { - "cityCode": "150800", - "cityName": "巴彦淖尔市", - "mallAreaList": [ - { - "areaCode": "150802", - "areaName": "临河区" - }, - { - "areaCode": "150821", - "areaName": "五原县" - }, - { - "areaCode": "150822", - "areaName": "磴口县" - }, - { - "areaCode": "150823", - "areaName": "乌拉特前旗" - }, - { - "areaCode": "150824", - "areaName": "乌拉特中旗" - }, - { - "areaCode": "150825", - "areaName": "乌拉特后旗" - }, - { - "areaCode": "150826", - "areaName": "杭锦后旗" - } - ] - }, - { - "cityCode": "150900", - "cityName": "乌兰察布市", - "mallAreaList": [ - { - "areaCode": "150902", - "areaName": "集宁区" - }, - { - "areaCode": "150921", - "areaName": "卓资县" - }, - { - "areaCode": "150922", - "areaName": "化德县" - }, - { - "areaCode": "150923", - "areaName": "商都县" - }, - { - "areaCode": "150924", - "areaName": "兴和县" - }, - { - "areaCode": "150925", - "areaName": "凉城县" - }, - { - "areaCode": "150926", - "areaName": "察哈尔右翼前旗" - }, - { - "areaCode": "150927", - "areaName": "察哈尔右翼中旗" - }, - { - "areaCode": "150928", - "areaName": "察哈尔右翼后旗" - }, - { - "areaCode": "150929", - "areaName": "四子王旗" - }, - { - "areaCode": "150981", - "areaName": "丰镇市" - } - ] - }, - { - "cityCode": "152200", - "cityName": "兴安盟", - "mallAreaList": [ - { - "areaCode": "152201", - "areaName": "乌兰浩特市" - }, - { - "areaCode": "152202", - "areaName": "阿尔山市" - }, - { - "areaCode": "152221", - "areaName": "科尔沁右翼前旗" - }, - { - "areaCode": "152222", - "areaName": "科尔沁右翼中旗" - }, - { - "areaCode": "152223", - "areaName": "扎赉特旗" - }, - { - "areaCode": "152224", - "areaName": "突泉县" - } - ] - }, - { - "cityCode": "152500", - "cityName": "锡林郭勒盟", - "mallAreaList": [ - { - "areaCode": "152501", - "areaName": "二连浩特市" - }, - { - "areaCode": "152502", - "areaName": "锡林浩特市" - }, - { - "areaCode": "152522", - "areaName": "阿巴嘎旗" - }, - { - "areaCode": "152523", - "areaName": "苏尼特左旗" - }, - { - "areaCode": "152524", - "areaName": "苏尼特右旗" - }, - { - "areaCode": "152525", - "areaName": "东乌珠穆沁旗" - }, - { - "areaCode": "152526", - "areaName": "西乌珠穆沁旗" - }, - { - "areaCode": "152527", - "areaName": "太仆寺旗" - }, - { - "areaCode": "152528", - "areaName": "镶黄旗" - }, - { - "areaCode": "152529", - "areaName": "正镶白旗" - }, - { - "areaCode": "152530", - "areaName": "正蓝旗" - }, - { - "areaCode": "152531", - "areaName": "多伦县" - } - ] - }, - { - "cityCode": "152900", - "cityName": "阿拉善盟", - "mallAreaList": [ - { - "areaCode": "152921", - "areaName": "阿拉善左旗" - }, - { - "areaCode": "152922", - "areaName": "阿拉善右旗" - }, - { - "areaCode": "152923", - "areaName": "额济纳旗" - } - ] - } - ] - }, - { - "provinceCode": "210000", - "provinceName": "辽宁省", - "mallCityList": [ - { - "cityCode": "210100", - "cityName": "沈阳市", - "mallAreaList": [ - { - "areaCode": "210102", - "areaName": "和平区" - }, - { - "areaCode": "210103", - "areaName": "沈河区" - }, - { - "areaCode": "210104", - "areaName": "大东区" - }, - { - "areaCode": "210105", - "areaName": "皇姑区" - }, - { - "areaCode": "210106", - "areaName": "铁西区" - }, - { - "areaCode": "210111", - "areaName": "苏家屯区" - }, - { - "areaCode": "210112", - "areaName": "浑南区" - }, - { - "areaCode": "210113", - "areaName": "沈北新区" - }, - { - "areaCode": "210114", - "areaName": "于洪区" - }, - { - "areaCode": "210122", - "areaName": "辽中县" - }, - { - "areaCode": "210123", - "areaName": "康平县" - }, - { - "areaCode": "210124", - "areaName": "法库县" - }, - { - "areaCode": "210181", - "areaName": "新民市" - } - ] - }, - { - "cityCode": "210200", - "cityName": "大连市", - "mallAreaList": [ - { - "areaCode": "210202", - "areaName": "中山区" - }, - { - "areaCode": "210203", - "areaName": "西岗区" - }, - { - "areaCode": "210204", - "areaName": "沙河口区" - }, - { - "areaCode": "210211", - "areaName": "甘井子区" - }, - { - "areaCode": "210212", - "areaName": "旅顺口区" - }, - { - "areaCode": "210213", - "areaName": "金州区" - }, - { - "areaCode": "210224", - "areaName": "长海县" - }, - { - "areaCode": "210281", - "areaName": "瓦房店市" - }, - { - "areaCode": "210282", - "areaName": "普兰店市" - }, - { - "areaCode": "210283", - "areaName": "庄河市" - } - ] - }, - { - "cityCode": "210300", - "cityName": "鞍山市", - "mallAreaList": [ - { - "areaCode": "210302", - "areaName": "铁东区" - }, - { - "areaCode": "210303", - "areaName": "铁西区" - }, - { - "areaCode": "210304", - "areaName": "立山区" - }, - { - "areaCode": "210311", - "areaName": "千山区" - }, - { - "areaCode": "210321", - "areaName": "台安县" - }, - { - "areaCode": "210323", - "areaName": "岫岩满族自治县" - }, - { - "areaCode": "210381", - "areaName": "海城市" - } - ] - }, - { - "cityCode": "210400", - "cityName": "抚顺市", - "mallAreaList": [ - { - "areaCode": "210402", - "areaName": "新抚区" - }, - { - "areaCode": "210403", - "areaName": "东洲区" - }, - { - "areaCode": "210404", - "areaName": "望花区" - }, - { - "areaCode": "210411", - "areaName": "顺城区" - }, - { - "areaCode": "210421", - "areaName": "抚顺县" - }, - { - "areaCode": "210422", - "areaName": "新宾满族自治县" - }, - { - "areaCode": "210423", - "areaName": "清原满族自治县" - } - ] - }, - { - "cityCode": "210500", - "cityName": "本溪市", - "mallAreaList": [ - { - "areaCode": "210502", - "areaName": "平山区" - }, - { - "areaCode": "210503", - "areaName": "溪湖区" - }, - { - "areaCode": "210504", - "areaName": "明山区" - }, - { - "areaCode": "210505", - "areaName": "南芬区" - }, - { - "areaCode": "210521", - "areaName": "本溪满族自治县" - }, - { - "areaCode": "210522", - "areaName": "桓仁满族自治县" - } - ] - }, - { - "cityCode": "210600", - "cityName": "丹东市", - "mallAreaList": [ - { - "areaCode": "210602", - "areaName": "元宝区" - }, - { - "areaCode": "210603", - "areaName": "振兴区" - }, - { - "areaCode": "210604", - "areaName": "振安区" - }, - { - "areaCode": "210624", - "areaName": "宽甸满族自治县" - }, - { - "areaCode": "210681", - "areaName": "东港市" - }, - { - "areaCode": "210682", - "areaName": "凤城市" - } - ] - }, - { - "cityCode": "210700", - "cityName": "锦州市", - "mallAreaList": [ - { - "areaCode": "210702", - "areaName": "古塔区" - }, - { - "areaCode": "210703", - "areaName": "凌河区" - }, - { - "areaCode": "210711", - "areaName": "太和区" - }, - { - "areaCode": "210726", - "areaName": "黑山县" - }, - { - "areaCode": "210727", - "areaName": "义县" - }, - { - "areaCode": "210781", - "areaName": "凌海市" - }, - { - "areaCode": "210782", - "areaName": "北镇市" - } - ] - }, - { - "cityCode": "210800", - "cityName": "营口市", - "mallAreaList": [ - { - "areaCode": "210802", - "areaName": "站前区" - }, - { - "areaCode": "210803", - "areaName": "西市区" - }, - { - "areaCode": "210804", - "areaName": "鲅鱼圈区" - }, - { - "areaCode": "210811", - "areaName": "老边区" - }, - { - "areaCode": "210881", - "areaName": "盖州市" - }, - { - "areaCode": "210882", - "areaName": "大石桥市" - } - ] - }, - { - "cityCode": "210900", - "cityName": "阜新市", - "mallAreaList": [ - { - "areaCode": "210902", - "areaName": "海州区" - }, - { - "areaCode": "210903", - "areaName": "新邱区" - }, - { - "areaCode": "210904", - "areaName": "太平区" - }, - { - "areaCode": "210905", - "areaName": "清河门区" - }, - { - "areaCode": "210911", - "areaName": "细河区" - }, - { - "areaCode": "210921", - "areaName": "阜新蒙古族自治县" - }, - { - "areaCode": "210922", - "areaName": "彰武县" - } - ] - }, - { - "cityCode": "211000", - "cityName": "辽阳市", - "mallAreaList": [ - { - "areaCode": "211002", - "areaName": "白塔区" - }, - { - "areaCode": "211003", - "areaName": "文圣区" - }, - { - "areaCode": "211004", - "areaName": "宏伟区" - }, - { - "areaCode": "211005", - "areaName": "弓长岭区" - }, - { - "areaCode": "211011", - "areaName": "太子河区" - }, - { - "areaCode": "211021", - "areaName": "辽阳县" - }, - { - "areaCode": "211081", - "areaName": "灯塔市" - } - ] - }, - { - "cityCode": "211100", - "cityName": "盘锦市", - "mallAreaList": [ - { - "areaCode": "211102", - "areaName": "双台子区" - }, - { - "areaCode": "211103", - "areaName": "兴隆台区" - }, - { - "areaCode": "211121", - "areaName": "大洼县" - }, - { - "areaCode": "211122", - "areaName": "盘山县" - } - ] - }, - { - "cityCode": "211200", - "cityName": "铁岭市", - "mallAreaList": [ - { - "areaCode": "211202", - "areaName": "银州区" - }, - { - "areaCode": "211204", - "areaName": "清河区" - }, - { - "areaCode": "211221", - "areaName": "铁岭县" - }, - { - "areaCode": "211223", - "areaName": "西丰县" - }, - { - "areaCode": "211224", - "areaName": "昌图县" - }, - { - "areaCode": "211281", - "areaName": "调兵山市" - }, - { - "areaCode": "211282", - "areaName": "开原市" - } - ] - }, - { - "cityCode": "211300", - "cityName": "朝阳市", - "mallAreaList": [ - { - "areaCode": "211302", - "areaName": "双塔区" - }, - { - "areaCode": "211303", - "areaName": "龙城区" - }, - { - "areaCode": "211321", - "areaName": "朝阳县" - }, - { - "areaCode": "211322", - "areaName": "建平县" - }, - { - "areaCode": "211324", - "areaName": "喀喇沁左翼蒙古族自治县" - }, - { - "areaCode": "211381", - "areaName": "北票市" - }, - { - "areaCode": "211382", - "areaName": "凌源市" - } - ] - }, - { - "cityCode": "211400", - "cityName": "葫芦岛市", - "mallAreaList": [ - { - "areaCode": "211402", - "areaName": "连山区" - }, - { - "areaCode": "211403", - "areaName": "龙港区" - }, - { - "areaCode": "211404", - "areaName": "南票区" - }, - { - "areaCode": "211421", - "areaName": "绥中县" - }, - { - "areaCode": "211422", - "areaName": "建昌县" - }, - { - "areaCode": "211481", - "areaName": "兴城市" - } - ] - } - ] - }, - { - "provinceCode": "220000", - "provinceName": "吉林省", - "mallCityList": [ - { - "cityCode": "220100", - "cityName": "长春市", - "mallAreaList": [ - { - "areaCode": "220102", - "areaName": "南关区" - }, - { - "areaCode": "220103", - "areaName": "宽城区" - }, - { - "areaCode": "220104", - "areaName": "朝阳区" - }, - { - "areaCode": "220105", - "areaName": "二道区" - }, - { - "areaCode": "220106", - "areaName": "绿园区" - }, - { - "areaCode": "220112", - "areaName": "双阳区" - }, - { - "areaCode": "220113", - "areaName": "九台区" - }, - { - "areaCode": "220122", - "areaName": "农安县" - }, - { - "areaCode": "220182", - "areaName": "榆树市" - }, - { - "areaCode": "220183", - "areaName": "德惠市" - } - ] - }, - { - "cityCode": "220200", - "cityName": "吉林市", - "mallAreaList": [ - { - "areaCode": "220202", - "areaName": "昌邑区" - }, - { - "areaCode": "220203", - "areaName": "龙潭区" - }, - { - "areaCode": "220204", - "areaName": "船营区" - }, - { - "areaCode": "220211", - "areaName": "丰满区" - }, - { - "areaCode": "220221", - "areaName": "永吉县" - }, - { - "areaCode": "220281", - "areaName": "蛟河市" - }, - { - "areaCode": "220282", - "areaName": "桦甸市" - }, - { - "areaCode": "220283", - "areaName": "舒兰市" - }, - { - "areaCode": "220284", - "areaName": "磐石市" - } - ] - }, - { - "cityCode": "220300", - "cityName": "四平市", - "mallAreaList": [ - { - "areaCode": "220302", - "areaName": "铁西区" - }, - { - "areaCode": "220303", - "areaName": "铁东区" - }, - { - "areaCode": "220322", - "areaName": "梨树县" - }, - { - "areaCode": "220323", - "areaName": "伊通满族自治县" - }, - { - "areaCode": "220381", - "areaName": "公主岭市" - }, - { - "areaCode": "220382", - "areaName": "双辽市" - } - ] - }, - { - "cityCode": "220400", - "cityName": "辽源市", - "mallAreaList": [ - { - "areaCode": "220402", - "areaName": "龙山区" - }, - { - "areaCode": "220403", - "areaName": "西安区" - }, - { - "areaCode": "220421", - "areaName": "东丰县" - }, - { - "areaCode": "220422", - "areaName": "东辽县" - } - ] - }, - { - "cityCode": "220500", - "cityName": "通化市", - "mallAreaList": [ - { - "areaCode": "220502", - "areaName": "东昌区" - }, - { - "areaCode": "220503", - "areaName": "二道江区" - }, - { - "areaCode": "220521", - "areaName": "通化县" - }, - { - "areaCode": "220523", - "areaName": "辉南县" - }, - { - "areaCode": "220524", - "areaName": "柳河县" - }, - { - "areaCode": "220581", - "areaName": "梅河口市" - }, - { - "areaCode": "220582", - "areaName": "集安市" - } - ] - }, - { - "cityCode": "220600", - "cityName": "白山市", - "mallAreaList": [ - { - "areaCode": "220602", - "areaName": "浑江区" - }, - { - "areaCode": "220605", - "areaName": "江源区" - }, - { - "areaCode": "220621", - "areaName": "抚松县" - }, - { - "areaCode": "220622", - "areaName": "靖宇县" - }, - { - "areaCode": "220623", - "areaName": "长白朝鲜族自治县" - }, - { - "areaCode": "220681", - "areaName": "临江市" - } - ] - }, - { - "cityCode": "220700", - "cityName": "松原市", - "mallAreaList": [ - { - "areaCode": "220702", - "areaName": "宁江区" - }, - { - "areaCode": "220721", - "areaName": "前郭尔罗斯蒙古族自治县" - }, - { - "areaCode": "220722", - "areaName": "长岭县" - }, - { - "areaCode": "220723", - "areaName": "乾安县" - }, - { - "areaCode": "220781", - "areaName": "扶余市" - } - ] - }, - { - "cityCode": "220800", - "cityName": "白城市", - "mallAreaList": [ - { - "areaCode": "220802", - "areaName": "洮北区" - }, - { - "areaCode": "220821", - "areaName": "镇赉县" - }, - { - "areaCode": "220822", - "areaName": "通榆县" - }, - { - "areaCode": "220881", - "areaName": "洮南市" - }, - { - "areaCode": "220882", - "areaName": "大安市" - } - ] - }, - { - "cityCode": "222400", - "cityName": "延边朝鲜族自治州", - "mallAreaList": [ - { - "areaCode": "222401", - "areaName": "延吉市" - }, - { - "areaCode": "222402", - "areaName": "图们市" - }, - { - "areaCode": "222403", - "areaName": "敦化市" - }, - { - "areaCode": "222404", - "areaName": "珲春市" - }, - { - "areaCode": "222405", - "areaName": "龙井市" - }, - { - "areaCode": "222406", - "areaName": "和龙市" - }, - { - "areaCode": "222424", - "areaName": "汪清县" - }, - { - "areaCode": "222426", - "areaName": "安图县" - } - ] - } - ] - }, - { - "provinceCode": "230000", - "provinceName": "黑龙江省", - "mallCityList": [ - { - "cityCode": "230100", - "cityName": "哈尔滨市", - "mallAreaList": [ - { - "areaCode": "230102", - "areaName": "道里区" - }, - { - "areaCode": "230103", - "areaName": "南岗区" - }, - { - "areaCode": "230104", - "areaName": "道外区" - }, - { - "areaCode": "230108", - "areaName": "平房区" - }, - { - "areaCode": "230109", - "areaName": "松北区" - }, - { - "areaCode": "230110", - "areaName": "香坊区" - }, - { - "areaCode": "230111", - "areaName": "呼兰区" - }, - { - "areaCode": "230112", - "areaName": "阿城区" - }, - { - "areaCode": "230123", - "areaName": "依兰县" - }, - { - "areaCode": "230124", - "areaName": "方正县" - }, - { - "areaCode": "230125", - "areaName": "宾县" - }, - { - "areaCode": "230126", - "areaName": "巴彦县" - }, - { - "areaCode": "230127", - "areaName": "木兰县" - }, - { - "areaCode": "230128", - "areaName": "通河县" - }, - { - "areaCode": "230129", - "areaName": "延寿县" - }, - { - "areaCode": "230182", - "areaName": "双城市" - }, - { - "areaCode": "230183", - "areaName": "尚志市" - }, - { - "areaCode": "230184", - "areaName": "五常市" - } - ] - }, - { - "cityCode": "230200", - "cityName": "齐齐哈尔市", - "mallAreaList": [ - { - "areaCode": "230202", - "areaName": "龙沙区" - }, - { - "areaCode": "230203", - "areaName": "建华区" - }, - { - "areaCode": "230204", - "areaName": "铁锋区" - }, - { - "areaCode": "230205", - "areaName": "昂昂溪区" - }, - { - "areaCode": "230206", - "areaName": "富拉尔基区" - }, - { - "areaCode": "230207", - "areaName": "碾子山区" - }, - { - "areaCode": "230208", - "areaName": "梅里斯达斡尔族区" - }, - { - "areaCode": "230221", - "areaName": "龙江县" - }, - { - "areaCode": "230223", - "areaName": "依安县" - }, - { - "areaCode": "230224", - "areaName": "泰来县" - }, - { - "areaCode": "230225", - "areaName": "甘南县" - }, - { - "areaCode": "230227", - "areaName": "富裕县" - }, - { - "areaCode": "230229", - "areaName": "克山县" - }, - { - "areaCode": "230230", - "areaName": "克东县" - }, - { - "areaCode": "230231", - "areaName": "拜泉县" - }, - { - "areaCode": "230281", - "areaName": "讷河市" - } - ] - }, - { - "cityCode": "230300", - "cityName": "鸡西市", - "mallAreaList": [ - { - "areaCode": "230302", - "areaName": "鸡冠区" - }, - { - "areaCode": "230303", - "areaName": "恒山区" - }, - { - "areaCode": "230304", - "areaName": "滴道区" - }, - { - "areaCode": "230305", - "areaName": "梨树区" - }, - { - "areaCode": "230306", - "areaName": "城子河区" - }, - { - "areaCode": "230307", - "areaName": "麻山区" - }, - { - "areaCode": "230321", - "areaName": "鸡东县" - }, - { - "areaCode": "230381", - "areaName": "虎林市" - }, - { - "areaCode": "230382", - "areaName": "密山市" - } - ] - }, - { - "cityCode": "230400", - "cityName": "鹤岗市", - "mallAreaList": [ - { - "areaCode": "230402", - "areaName": "向阳区" - }, - { - "areaCode": "230403", - "areaName": "工农区" - }, - { - "areaCode": "230404", - "areaName": "南山区" - }, - { - "areaCode": "230405", - "areaName": "兴安区" - }, - { - "areaCode": "230406", - "areaName": "东山区" - }, - { - "areaCode": "230407", - "areaName": "兴山区" - }, - { - "areaCode": "230421", - "areaName": "萝北县" - }, - { - "areaCode": "230422", - "areaName": "绥滨县" - } - ] - }, - { - "cityCode": "230500", - "cityName": "双鸭山市", - "mallAreaList": [ - { - "areaCode": "230502", - "areaName": "尖山区" - }, - { - "areaCode": "230503", - "areaName": "岭东区" - }, - { - "areaCode": "230505", - "areaName": "四方台区" - }, - { - "areaCode": "230506", - "areaName": "宝山区" - }, - { - "areaCode": "230521", - "areaName": "集贤县" - }, - { - "areaCode": "230522", - "areaName": "友谊县" - }, - { - "areaCode": "230523", - "areaName": "宝清县" - }, - { - "areaCode": "230524", - "areaName": "饶河县" - } - ] - }, - { - "cityCode": "230600", - "cityName": "大庆市", - "mallAreaList": [ - { - "areaCode": "230602", - "areaName": "萨尔图区" - }, - { - "areaCode": "230603", - "areaName": "龙凤区" - }, - { - "areaCode": "230604", - "areaName": "让胡路区" - }, - { - "areaCode": "230605", - "areaName": "红岗区" - }, - { - "areaCode": "230606", - "areaName": "大同区" - }, - { - "areaCode": "230621", - "areaName": "肇州县" - }, - { - "areaCode": "230622", - "areaName": "肇源县" - }, - { - "areaCode": "230623", - "areaName": "林甸县" - }, - { - "areaCode": "230624", - "areaName": "杜尔伯特蒙古族自治县" - } - ] - }, - { - "cityCode": "230700", - "cityName": "伊春市", - "mallAreaList": [ - { - "areaCode": "230702", - "areaName": "伊春区" - }, - { - "areaCode": "230703", - "areaName": "南岔区" - }, - { - "areaCode": "230704", - "areaName": "友好区" - }, - { - "areaCode": "230705", - "areaName": "西林区" - }, - { - "areaCode": "230706", - "areaName": "翠峦区" - }, - { - "areaCode": "230707", - "areaName": "新青区" - }, - { - "areaCode": "230708", - "areaName": "美溪区" - }, - { - "areaCode": "230709", - "areaName": "金山屯区" - }, - { - "areaCode": "230710", - "areaName": "五营区" - }, - { - "areaCode": "230711", - "areaName": "乌马河区" - }, - { - "areaCode": "230712", - "areaName": "汤旺河区" - }, - { - "areaCode": "230713", - "areaName": "带岭区" - }, - { - "areaCode": "230714", - "areaName": "乌伊岭区" - }, - { - "areaCode": "230715", - "areaName": "红星区" - }, - { - "areaCode": "230716", - "areaName": "上甘岭区" - }, - { - "areaCode": "230722", - "areaName": "嘉荫县" - }, - { - "areaCode": "230781", - "areaName": "铁力市" - } - ] - }, - { - "cityCode": "230800", - "cityName": "佳木斯市", - "mallAreaList": [ - { - "areaCode": "230803", - "areaName": "向阳区" - }, - { - "areaCode": "230804", - "areaName": "前进区" - }, - { - "areaCode": "230805", - "areaName": "东风区" - }, - { - "areaCode": "230811", - "areaName": "郊区" - }, - { - "areaCode": "230822", - "areaName": "桦南县" - }, - { - "areaCode": "230826", - "areaName": "桦川县" - }, - { - "areaCode": "230828", - "areaName": "汤原县" - }, - { - "areaCode": "230833", - "areaName": "抚远县" - }, - { - "areaCode": "230881", - "areaName": "同江市" - }, - { - "areaCode": "230882", - "areaName": "富锦市" - } - ] - }, - { - "cityCode": "230900", - "cityName": "七台河市", - "mallAreaList": [ - { - "areaCode": "230902", - "areaName": "新兴区" - }, - { - "areaCode": "230903", - "areaName": "桃山区" - }, - { - "areaCode": "230904", - "areaName": "茄子河区" - }, - { - "areaCode": "230921", - "areaName": "勃利县" - } - ] - }, - { - "cityCode": "231000", - "cityName": "牡丹江市", - "mallAreaList": [ - { - "areaCode": "231002", - "areaName": "东安区" - }, - { - "areaCode": "231003", - "areaName": "阳明区" - }, - { - "areaCode": "231004", - "areaName": "爱民区" - }, - { - "areaCode": "231005", - "areaName": "西安区" - }, - { - "areaCode": "231024", - "areaName": "东宁县" - }, - { - "areaCode": "231025", - "areaName": "林口县" - }, - { - "areaCode": "231081", - "areaName": "绥芬河市" - }, - { - "areaCode": "231083", - "areaName": "海林市" - }, - { - "areaCode": "231084", - "areaName": "宁安市" - }, - { - "areaCode": "231085", - "areaName": "穆棱市" - } - ] - }, - { - "cityCode": "231100", - "cityName": "黑河市", - "mallAreaList": [ - { - "areaCode": "231102", - "areaName": "爱辉区" - }, - { - "areaCode": "231121", - "areaName": "嫩江县" - }, - { - "areaCode": "231123", - "areaName": "逊克县" - }, - { - "areaCode": "231124", - "areaName": "孙吴县" - }, - { - "areaCode": "231181", - "areaName": "北安市" - }, - { - "areaCode": "231182", - "areaName": "五大连池市" - } - ] - }, - { - "cityCode": "231200", - "cityName": "绥化市", - "mallAreaList": [ - { - "areaCode": "231202", - "areaName": "北林区" - }, - { - "areaCode": "231221", - "areaName": "望奎县" - }, - { - "areaCode": "231222", - "areaName": "兰西县" - }, - { - "areaCode": "231223", - "areaName": "青冈县" - }, - { - "areaCode": "231224", - "areaName": "庆安县" - }, - { - "areaCode": "231225", - "areaName": "明水县" - }, - { - "areaCode": "231226", - "areaName": "绥棱县" - }, - { - "areaCode": "231281", - "areaName": "安达市" - }, - { - "areaCode": "231282", - "areaName": "肇东市" - }, - { - "areaCode": "231283", - "areaName": "海伦市" - } - ] - }, - { - "cityCode": "232700", - "cityName": "大兴安岭地区", - "mallAreaList": [ - { - "areaCode": "232721", - "areaName": "呼玛县" - }, - { - "areaCode": "232722", - "areaName": "塔河县" - }, - { - "areaCode": "232723", - "areaName": "漠河县" - } - ] - } - ] - }, - { - "provinceCode": "310000", - "provinceName": "上海市", - "mallCityList": [ - { - "cityCode": "310100", - "cityName": "上海市", - "mallAreaList": [ - { - "areaCode": "310101", - "areaName": "黄浦区" - }, - { - "areaCode": "310104", - "areaName": "徐汇区" - }, - { - "areaCode": "310105", - "areaName": "长宁区" - }, - { - "areaCode": "310106", - "areaName": "静安区" - }, - { - "areaCode": "310107", - "areaName": "普陀区" - }, - { - "areaCode": "310108", - "areaName": "闸北区" - }, - { - "areaCode": "310109", - "areaName": "虹口区" - }, - { - "areaCode": "310110", - "areaName": "杨浦区" - }, - { - "areaCode": "310112", - "areaName": "闵行区" - }, - { - "areaCode": "310113", - "areaName": "宝山区" - }, - { - "areaCode": "310114", - "areaName": "嘉定区" - }, - { - "areaCode": "310115", - "areaName": "浦东新区" - }, - { - "areaCode": "310116", - "areaName": "金山区" - }, - { - "areaCode": "310117", - "areaName": "松江区" - }, - { - "areaCode": "310118", - "areaName": "青浦区" - }, - { - "areaCode": "310120", - "areaName": "奉贤区" - } - ] - }, - { - "cityCode": "310200", - "cityName": "上海市辖县", - "mallAreaList": [ - { - "areaCode": "310230", - "areaName": "崇明县" - } - ] - } - ] - }, - { - "provinceCode": "320000", - "provinceName": "江苏省", - "mallCityList": [ - { - "cityCode": "320100", - "cityName": "南京市", - "mallAreaList": [ - { - "areaCode": "320102", - "areaName": "玄武区" - }, - { - "areaCode": "320104", - "areaName": "秦淮区" - }, - { - "areaCode": "320105", - "areaName": "建邺区" - }, - { - "areaCode": "320106", - "areaName": "鼓楼区" - }, - { - "areaCode": "320111", - "areaName": "浦口区" - }, - { - "areaCode": "320113", - "areaName": "栖霞区" - }, - { - "areaCode": "320114", - "areaName": "雨花台区" - }, - { - "areaCode": "320115", - "areaName": "江宁区" - }, - { - "areaCode": "320116", - "areaName": "六合区" - }, - { - "areaCode": "320117", - "areaName": "溧水区" - }, - { - "areaCode": "320118", - "areaName": "高淳区" - } - ] - }, - { - "cityCode": "320200", - "cityName": "无锡市", - "mallAreaList": [ - { - "areaCode": "320202", - "areaName": "崇安区" - }, - { - "areaCode": "320203", - "areaName": "南长区" - }, - { - "areaCode": "320204", - "areaName": "北塘区" - }, - { - "areaCode": "320205", - "areaName": "锡山区" - }, - { - "areaCode": "320206", - "areaName": "惠山区" - }, - { - "areaCode": "320211", - "areaName": "滨湖区" - }, - { - "areaCode": "320281", - "areaName": "江阴市" - }, - { - "areaCode": "320282", - "areaName": "宜兴市" - } - ] - }, - { - "cityCode": "320300", - "cityName": "徐州市", - "mallAreaList": [ - { - "areaCode": "320302", - "areaName": "鼓楼区" - }, - { - "areaCode": "320303", - "areaName": "云龙区" - }, - { - "areaCode": "320305", - "areaName": "贾汪区" - }, - { - "areaCode": "320311", - "areaName": "泉山区" - }, - { - "areaCode": "320312", - "areaName": "铜山区" - }, - { - "areaCode": "320321", - "areaName": "丰县" - }, - { - "areaCode": "320322", - "areaName": "沛县" - }, - { - "areaCode": "320324", - "areaName": "睢宁县" - }, - { - "areaCode": "320381", - "areaName": "新沂市" - }, - { - "areaCode": "320382", - "areaName": "邳州市" - } - ] - }, - { - "cityCode": "320400", - "cityName": "常州市", - "mallAreaList": [ - { - "areaCode": "320402", - "areaName": "天宁区" - }, - { - "areaCode": "320404", - "areaName": "钟楼区" - }, - { - "areaCode": "320405", - "areaName": "戚墅堰区" - }, - { - "areaCode": "320411", - "areaName": "新北区" - }, - { - "areaCode": "320412", - "areaName": "武进区" - }, - { - "areaCode": "320481", - "areaName": "溧阳市" - }, - { - "areaCode": "320482", - "areaName": "金坛市" - } - ] - }, - { - "cityCode": "320500", - "cityName": "苏州市", - "mallAreaList": [ - { - "areaCode": "320505", - "areaName": "虎丘区" - }, - { - "areaCode": "320506", - "areaName": "吴中区" - }, - { - "areaCode": "320507", - "areaName": "相城区" - }, - { - "areaCode": "320508", - "areaName": "姑苏区" - }, - { - "areaCode": "320509", - "areaName": "吴江区" - }, - { - "areaCode": "320581", - "areaName": "常熟市" - }, - { - "areaCode": "320582", - "areaName": "张家港市" - }, - { - "areaCode": "320583", - "areaName": "昆山市" - }, - { - "areaCode": "320585", - "areaName": "太仓市" - } - ] - }, - { - "cityCode": "320600", - "cityName": "南通市", - "mallAreaList": [ - { - "areaCode": "320602", - "areaName": "崇川区" - }, - { - "areaCode": "320611", - "areaName": "港闸区" - }, - { - "areaCode": "320612", - "areaName": "通州区" - }, - { - "areaCode": "320621", - "areaName": "海安县" - }, - { - "areaCode": "320623", - "areaName": "如东县" - }, - { - "areaCode": "320681", - "areaName": "启东市" - }, - { - "areaCode": "320682", - "areaName": "如皋市" - }, - { - "areaCode": "320684", - "areaName": "海门市" - } - ] - }, - { - "cityCode": "320700", - "cityName": "连云港市", - "mallAreaList": [ - { - "areaCode": "320703", - "areaName": "连云区" - }, - { - "areaCode": "320705", - "areaName": "新浦" - }, - { - "areaCode": "320706", - "areaName": "海州区" - }, - { - "areaCode": "320707", - "areaName": "赣榆区" - }, - { - "areaCode": "320722", - "areaName": "东海县" - }, - { - "areaCode": "320723", - "areaName": "灌云县" - }, - { - "areaCode": "320724", - "areaName": "灌南县" - } - ] - }, - { - "cityCode": "320800", - "cityName": "淮安市", - "mallAreaList": [ - { - "areaCode": "320802", - "areaName": "清河区" - }, - { - "areaCode": "320803", - "areaName": "淮安区" - }, - { - "areaCode": "320804", - "areaName": "淮阴区" - }, - { - "areaCode": "320811", - "areaName": "清浦区" - }, - { - "areaCode": "320826", - "areaName": "涟水县" - }, - { - "areaCode": "320829", - "areaName": "洪泽县" - }, - { - "areaCode": "320830", - "areaName": "盱眙县" - }, - { - "areaCode": "320831", - "areaName": "金湖县" - } - ] - }, - { - "cityCode": "320900", - "cityName": "盐城市", - "mallAreaList": [ - { - "areaCode": "320902", - "areaName": "亭湖区" - }, - { - "areaCode": "320903", - "areaName": "盐都区" - }, - { - "areaCode": "320921", - "areaName": "响水县" - }, - { - "areaCode": "320922", - "areaName": "滨海县" - }, - { - "areaCode": "320923", - "areaName": "阜宁县" - }, - { - "areaCode": "320924", - "areaName": "射阳县" - }, - { - "areaCode": "320925", - "areaName": "建湖县" - }, - { - "areaCode": "320981", - "areaName": "东台市" - }, - { - "areaCode": "320982", - "areaName": "大丰市" - } - ] - }, - { - "cityCode": "321000", - "cityName": "扬州市", - "mallAreaList": [ - { - "areaCode": "321002", - "areaName": "广陵区" - }, - { - "areaCode": "321003", - "areaName": "邗江区" - }, - { - "areaCode": "321012", - "areaName": "江都区" - }, - { - "areaCode": "321023", - "areaName": "宝应县" - }, - { - "areaCode": "321081", - "areaName": "仪征市" - }, - { - "areaCode": "321084", - "areaName": "高邮市" - } - ] - }, - { - "cityCode": "321100", - "cityName": "镇江市", - "mallAreaList": [ - { - "areaCode": "321102", - "areaName": "京口区" - }, - { - "areaCode": "321111", - "areaName": "润州区" - }, - { - "areaCode": "321112", - "areaName": "丹徒区" - }, - { - "areaCode": "321181", - "areaName": "丹阳市" - }, - { - "areaCode": "321182", - "areaName": "扬中市" - }, - { - "areaCode": "321183", - "areaName": "句容市" - } - ] - }, - { - "cityCode": "321200", - "cityName": "泰州市", - "mallAreaList": [ - { - "areaCode": "321202", - "areaName": "海陵区" - }, - { - "areaCode": "321203", - "areaName": "高港区" - }, - { - "areaCode": "321204", - "areaName": "姜堰区" - }, - { - "areaCode": "321281", - "areaName": "兴化市" - }, - { - "areaCode": "321282", - "areaName": "靖江市" - }, - { - "areaCode": "321283", - "areaName": "泰兴市" - } - ] - }, - { - "cityCode": "321300", - "cityName": "宿迁市", - "mallAreaList": [ - { - "areaCode": "321302", - "areaName": "宿城区" - }, - { - "areaCode": "321311", - "areaName": "宿豫区" - }, - { - "areaCode": "321322", - "areaName": "沭阳县" - }, - { - "areaCode": "321323", - "areaName": "泗阳县" - }, - { - "areaCode": "321324", - "areaName": "泗洪县" - } - ] - } - ] - }, - { - "provinceCode": "330000", - "provinceName": "浙江省", - "mallCityList": [ - { - "cityCode": "330100", - "cityName": "杭州市", - "mallAreaList": [ - { - "areaCode": "330102", - "areaName": "上城区" - }, - { - "areaCode": "330103", - "areaName": "下城区" - }, - { - "areaCode": "330104", - "areaName": "江干区" - }, - { - "areaCode": "330105", - "areaName": "拱墅区" - }, - { - "areaCode": "330106", - "areaName": "西湖区" - }, - { - "areaCode": "330108", - "areaName": "滨江区" - }, - { - "areaCode": "330109", - "areaName": "萧山区" - }, - { - "areaCode": "330110", - "areaName": "余杭区" - }, - { - "areaCode": "330122", - "areaName": "桐庐县" - }, - { - "areaCode": "330127", - "areaName": "淳安县" - }, - { - "areaCode": "330182", - "areaName": "建德市" - }, - { - "areaCode": "330183", - "areaName": "富阳市" - }, - { - "areaCode": "330185", - "areaName": "临安市" - } - ] - }, - { - "cityCode": "330200", - "cityName": "宁波市", - "mallAreaList": [ - { - "areaCode": "330203", - "areaName": "海曙区" - }, - { - "areaCode": "330204", - "areaName": "江东区" - }, - { - "areaCode": "330205", - "areaName": "江北区" - }, - { - "areaCode": "330206", - "areaName": "北仑区" - }, - { - "areaCode": "330211", - "areaName": "镇海区" - }, - { - "areaCode": "330212", - "areaName": "鄞州区" - }, - { - "areaCode": "330225", - "areaName": "象山县" - }, - { - "areaCode": "330226", - "areaName": "宁海县" - }, - { - "areaCode": "330281", - "areaName": "余姚市" - }, - { - "areaCode": "330282", - "areaName": "慈溪市" - }, - { - "areaCode": "330283", - "areaName": "奉化市" - } - ] - }, - { - "cityCode": "330300", - "cityName": "温州市", - "mallAreaList": [ - { - "areaCode": "330302", - "areaName": "鹿城区" - }, - { - "areaCode": "330303", - "areaName": "龙湾区" - }, - { - "areaCode": "330304", - "areaName": "瓯海区" - }, - { - "areaCode": "330322", - "areaName": "洞头县" - }, - { - "areaCode": "330324", - "areaName": "永嘉县" - }, - { - "areaCode": "330326", - "areaName": "平阳县" - }, - { - "areaCode": "330327", - "areaName": "苍南县" - }, - { - "areaCode": "330328", - "areaName": "文成县" - }, - { - "areaCode": "330329", - "areaName": "泰顺县" - }, - { - "areaCode": "330381", - "areaName": "瑞安市" - }, - { - "areaCode": "330382", - "areaName": "乐清市" - } - ] - }, - { - "cityCode": "330400", - "cityName": "嘉兴市", - "mallAreaList": [ - { - "areaCode": "330402", - "areaName": "南湖区" - }, - { - "areaCode": "330411", - "areaName": "秀洲区" - }, - { - "areaCode": "330421", - "areaName": "嘉善县" - }, - { - "areaCode": "330424", - "areaName": "海盐县" - }, - { - "areaCode": "330481", - "areaName": "海宁市" - }, - { - "areaCode": "330482", - "areaName": "平湖市" - }, - { - "areaCode": "330483", - "areaName": "桐乡市" - } - ] - }, - { - "cityCode": "330500", - "cityName": "湖州市", - "mallAreaList": [ - { - "areaCode": "330502", - "areaName": "吴兴区" - }, - { - "areaCode": "330503", - "areaName": "南浔区" - }, - { - "areaCode": "330521", - "areaName": "德清县" - }, - { - "areaCode": "330522", - "areaName": "长兴县" - }, - { - "areaCode": "330523", - "areaName": "安吉县" - } - ] - }, - { - "cityCode": "330600", - "cityName": "绍兴市", - "mallAreaList": [ - { - "areaCode": "330602", - "areaName": "越城区" - }, - { - "areaCode": "330603", - "areaName": "柯桥区" - }, - { - "areaCode": "330604", - "areaName": "上虞区" - }, - { - "areaCode": "330624", - "areaName": "新昌县" - }, - { - "areaCode": "330681", - "areaName": "诸暨市" - }, - { - "areaCode": "330683", - "areaName": "嵊州市" - } - ] - }, - { - "cityCode": "330700", - "cityName": "金华市", - "mallAreaList": [ - { - "areaCode": "330702", - "areaName": "婺城区" - }, - { - "areaCode": "330703", - "areaName": "金东区" - }, - { - "areaCode": "330723", - "areaName": "武义县" - }, - { - "areaCode": "330726", - "areaName": "浦江县" - }, - { - "areaCode": "330727", - "areaName": "磐安县" - }, - { - "areaCode": "330781", - "areaName": "兰溪市" - }, - { - "areaCode": "330782", - "areaName": "义乌市" - }, - { - "areaCode": "330783", - "areaName": "东阳市" - }, - { - "areaCode": "330784", - "areaName": "永康市" - } - ] - }, - { - "cityCode": "330800", - "cityName": "衢州市", - "mallAreaList": [ - { - "areaCode": "330802", - "areaName": "柯城区" - }, - { - "areaCode": "330803", - "areaName": "衢江区" - }, - { - "areaCode": "330822", - "areaName": "常山县" - }, - { - "areaCode": "330824", - "areaName": "开化县" - }, - { - "areaCode": "330825", - "areaName": "龙游县" - }, - { - "areaCode": "330881", - "areaName": "江山市" - } - ] - }, - { - "cityCode": "330900", - "cityName": "舟山市", - "mallAreaList": [ - { - "areaCode": "330902", - "areaName": "定海区" - }, - { - "areaCode": "330903", - "areaName": "普陀区" - }, - { - "areaCode": "330921", - "areaName": "岱山县" - }, - { - "areaCode": "330922", - "areaName": "嵊泗县" - } - ] - }, - { - "cityCode": "331000", - "cityName": "台州市", - "mallAreaList": [ - { - "areaCode": "331002", - "areaName": "椒江区" - }, - { - "areaCode": "331003", - "areaName": "黄岩区" - }, - { - "areaCode": "331004", - "areaName": "路桥区" - }, - { - "areaCode": "331021", - "areaName": "玉环县" - }, - { - "areaCode": "331022", - "areaName": "三门县" - }, - { - "areaCode": "331023", - "areaName": "天台县" - }, - { - "areaCode": "331024", - "areaName": "仙居县" - }, - { - "areaCode": "331081", - "areaName": "温岭市" - }, - { - "areaCode": "331082", - "areaName": "临海市" - } - ] - }, - { - "cityCode": "331100", - "cityName": "丽水市", - "mallAreaList": [ - { - "areaCode": "331102", - "areaName": "莲都区" - }, - { - "areaCode": "331121", - "areaName": "青田县" - }, - { - "areaCode": "331122", - "areaName": "缙云县" - }, - { - "areaCode": "331123", - "areaName": "遂昌县" - }, - { - "areaCode": "331124", - "areaName": "松阳县" - }, - { - "areaCode": "331125", - "areaName": "云和县" - }, - { - "areaCode": "331126", - "areaName": "庆元县" - }, - { - "areaCode": "331127", - "areaName": "景宁畲族自治县" - }, - { - "areaCode": "331181", - "areaName": "龙泉市" - } - ] - } - ] - }, - { - "provinceCode": "340000", - "provinceName": "安徽省", - "mallCityList": [ - { - "cityCode": "340100", - "cityName": "合肥市", - "mallAreaList": [ - { - "areaCode": "340102", - "areaName": "瑶海区" - }, - { - "areaCode": "340103", - "areaName": "庐阳区" - }, - { - "areaCode": "340104", - "areaName": "蜀山区" - }, - { - "areaCode": "340111", - "areaName": "包河区" - }, - { - "areaCode": "340121", - "areaName": "长丰县" - }, - { - "areaCode": "340122", - "areaName": "肥东县" - }, - { - "areaCode": "340123", - "areaName": "肥西县" - }, - { - "areaCode": "340124", - "areaName": "庐江县" - }, - { - "areaCode": "340181", - "areaName": "巢湖市" - } - ] - }, - { - "cityCode": "340200", - "cityName": "芜湖市", - "mallAreaList": [ - { - "areaCode": "340202", - "areaName": "镜湖区" - }, - { - "areaCode": "340203", - "areaName": "弋江区" - }, - { - "areaCode": "340207", - "areaName": "鸠江区" - }, - { - "areaCode": "340208", - "areaName": "三山区" - }, - { - "areaCode": "340221", - "areaName": "芜湖县" - }, - { - "areaCode": "340222", - "areaName": "繁昌县" - }, - { - "areaCode": "340223", - "areaName": "南陵县" - }, - { - "areaCode": "340225", - "areaName": "无为县" - } - ] - }, - { - "cityCode": "340300", - "cityName": "蚌埠市", - "mallAreaList": [ - { - "areaCode": "340302", - "areaName": "龙子湖区" - }, - { - "areaCode": "340303", - "areaName": "蚌山区" - }, - { - "areaCode": "340304", - "areaName": "禹会区" - }, - { - "areaCode": "340311", - "areaName": "淮上区" - }, - { - "areaCode": "340321", - "areaName": "怀远县" - }, - { - "areaCode": "340322", - "areaName": "五河县" - }, - { - "areaCode": "340323", - "areaName": "固镇县" - } - ] - }, - { - "cityCode": "340400", - "cityName": "淮南市", - "mallAreaList": [ - { - "areaCode": "340402", - "areaName": "大通区" - }, - { - "areaCode": "340403", - "areaName": "田家庵区" - }, - { - "areaCode": "340404", - "areaName": "谢家集区" - }, - { - "areaCode": "340405", - "areaName": "八公山区" - }, - { - "areaCode": "340406", - "areaName": "潘集区" - }, - { - "areaCode": "340421", - "areaName": "凤台县" - } - ] - }, - { - "cityCode": "340500", - "cityName": "马鞍山市", - "mallAreaList": [ - { - "areaCode": "340503", - "areaName": "花山区" - }, - { - "areaCode": "340504", - "areaName": "雨山区" - }, - { - "areaCode": "340506", - "areaName": "博望区" - }, - { - "areaCode": "340521", - "areaName": "当涂县" - }, - { - "areaCode": "340522", - "areaName": "含山县" - }, - { - "areaCode": "340523", - "areaName": "和县" - } - ] - }, - { - "cityCode": "340600", - "cityName": "淮北市", - "mallAreaList": [ - { - "areaCode": "340602", - "areaName": "杜集区" - }, - { - "areaCode": "340603", - "areaName": "相山区" - }, - { - "areaCode": "340604", - "areaName": "烈山区" - }, - { - "areaCode": "340621", - "areaName": "濉溪县" - } - ] - }, - { - "cityCode": "340700", - "cityName": "铜陵市", - "mallAreaList": [ - { - "areaCode": "340702", - "areaName": "铜官山区" - }, - { - "areaCode": "340703", - "areaName": "狮子山区" - }, - { - "areaCode": "340711", - "areaName": "郊区" - }, - { - "areaCode": "340721", - "areaName": "铜陵县" - } - ] - }, - { - "cityCode": "340800", - "cityName": "安庆市", - "mallAreaList": [ - { - "areaCode": "340802", - "areaName": "迎江区" - }, - { - "areaCode": "340803", - "areaName": "大观区" - }, - { - "areaCode": "340811", - "areaName": "宜秀区" - }, - { - "areaCode": "340822", - "areaName": "怀宁县" - }, - { - "areaCode": "340823", - "areaName": "枞阳县" - }, - { - "areaCode": "340824", - "areaName": "潜山县" - }, - { - "areaCode": "340825", - "areaName": "太湖县" - }, - { - "areaCode": "340826", - "areaName": "宿松县" - }, - { - "areaCode": "340827", - "areaName": "望江县" - }, - { - "areaCode": "340828", - "areaName": "岳西县" - }, - { - "areaCode": "340881", - "areaName": "桐城市" - } - ] - }, - { - "cityCode": "341000", - "cityName": "黄山市", - "mallAreaList": [ - { - "areaCode": "341002", - "areaName": "屯溪区" - }, - { - "areaCode": "341003", - "areaName": "黄山区" - }, - { - "areaCode": "341004", - "areaName": "徽州区" - }, - { - "areaCode": "341021", - "areaName": "歙县" - }, - { - "areaCode": "341022", - "areaName": "休宁县" - }, - { - "areaCode": "341023", - "areaName": "黟县" - }, - { - "areaCode": "341024", - "areaName": "祁门县" - } - ] - }, - { - "cityCode": "341100", - "cityName": "滁州市", - "mallAreaList": [ - { - "areaCode": "341102", - "areaName": "琅琊区" - }, - { - "areaCode": "341103", - "areaName": "南谯区" - }, - { - "areaCode": "341122", - "areaName": "来安县" - }, - { - "areaCode": "341124", - "areaName": "全椒县" - }, - { - "areaCode": "341125", - "areaName": "定远县" - }, - { - "areaCode": "341126", - "areaName": "凤阳县" - }, - { - "areaCode": "341181", - "areaName": "天长市" - }, - { - "areaCode": "341182", - "areaName": "明光市" - } - ] - }, - { - "cityCode": "341200", - "cityName": "阜阳市", - "mallAreaList": [ - { - "areaCode": "341202", - "areaName": "颍州区" - }, - { - "areaCode": "341203", - "areaName": "颍东区" - }, - { - "areaCode": "341204", - "areaName": "颍泉区" - }, - { - "areaCode": "341221", - "areaName": "临泉县" - }, - { - "areaCode": "341222", - "areaName": "太和县" - }, - { - "areaCode": "341225", - "areaName": "阜南县" - }, - { - "areaCode": "341226", - "areaName": "颍上县" - }, - { - "areaCode": "341282", - "areaName": "界首市" - } - ] - }, - { - "cityCode": "341300", - "cityName": "宿州市", - "mallAreaList": [ - { - "areaCode": "341302", - "areaName": "埇桥区" - }, - { - "areaCode": "341321", - "areaName": "砀山县" - }, - { - "areaCode": "341322", - "areaName": "萧县" - }, - { - "areaCode": "341323", - "areaName": "灵璧县" - }, - { - "areaCode": "341324", - "areaName": "泗县" - } - ] - }, - { - "cityCode": "341400", - "cityName": "巢湖市", - "mallAreaList": [ - { - "areaCode": "341400", - "areaName": "巢湖市区" - } - ] - }, - { - "cityCode": "341500", - "cityName": "六安市", - "mallAreaList": [ - { - "areaCode": "341502", - "areaName": "金安区" - }, - { - "areaCode": "341503", - "areaName": "裕安区" - }, - { - "areaCode": "341521", - "areaName": "寿县" - }, - { - "areaCode": "341522", - "areaName": "霍邱县" - }, - { - "areaCode": "341523", - "areaName": "舒城县" - }, - { - "areaCode": "341524", - "areaName": "金寨县" - }, - { - "areaCode": "341525", - "areaName": "霍山县" - } - ] - }, - { - "cityCode": "341600", - "cityName": "亳州市", - "mallAreaList": [ - { - "areaCode": "341602", - "areaName": "谯城区" - }, - { - "areaCode": "341621", - "areaName": "涡阳县" - }, - { - "areaCode": "341622", - "areaName": "蒙城县" - }, - { - "areaCode": "341623", - "areaName": "利辛县" - } - ] - }, - { - "cityCode": "341700", - "cityName": "池州市", - "mallAreaList": [ - { - "areaCode": "341702", - "areaName": "贵池区" - }, - { - "areaCode": "341721", - "areaName": "东至县" - }, - { - "areaCode": "341722", - "areaName": "石台县" - }, - { - "areaCode": "341723", - "areaName": "青阳县" - } - ] - }, - { - "cityCode": "341800", - "cityName": "宣城市", - "mallAreaList": [ - { - "areaCode": "341802", - "areaName": "宣州区" - }, - { - "areaCode": "341821", - "areaName": "郎溪县" - }, - { - "areaCode": "341822", - "areaName": "广德县" - }, - { - "areaCode": "341823", - "areaName": "泾县" - }, - { - "areaCode": "341824", - "areaName": "绩溪县" - }, - { - "areaCode": "341825", - "areaName": "旌德县" - }, - { - "areaCode": "341881", - "areaName": "宁国市" - } - ] - } - ] - }, - { - "provinceCode": "350000", - "provinceName": "福建省", - "mallCityList": [ - { - "cityCode": "350100", - "cityName": "福州市", - "mallAreaList": [ - { - "areaCode": "350102", - "areaName": "鼓楼区" - }, - { - "areaCode": "350103", - "areaName": "台江区" - }, - { - "areaCode": "350104", - "areaName": "仓山区" - }, - { - "areaCode": "350105", - "areaName": "马尾区" - }, - { - "areaCode": "350111", - "areaName": "晋安区" - }, - { - "areaCode": "350121", - "areaName": "闽侯县" - }, - { - "areaCode": "350122", - "areaName": "连江县" - }, - { - "areaCode": "350123", - "areaName": "罗源县" - }, - { - "areaCode": "350124", - "areaName": "闽清县" - }, - { - "areaCode": "350125", - "areaName": "永泰县" - }, - { - "areaCode": "350128", - "areaName": "平潭县" - }, - { - "areaCode": "350181", - "areaName": "福清市" - }, - { - "areaCode": "350182", - "areaName": "长乐市" - } - ] - }, - { - "cityCode": "350200", - "cityName": "厦门市", - "mallAreaList": [ - { - "areaCode": "350203", - "areaName": "思明区" - }, - { - "areaCode": "350205", - "areaName": "海沧区" - }, - { - "areaCode": "350206", - "areaName": "湖里区" - }, - { - "areaCode": "350211", - "areaName": "集美区" - }, - { - "areaCode": "350212", - "areaName": "同安区" - }, - { - "areaCode": "350213", - "areaName": "翔安区" - } - ] - }, - { - "cityCode": "350300", - "cityName": "莆田市", - "mallAreaList": [ - { - "areaCode": "350302", - "areaName": "城厢区" - }, - { - "areaCode": "350303", - "areaName": "涵江区" - }, - { - "areaCode": "350304", - "areaName": "荔城区" - }, - { - "areaCode": "350305", - "areaName": "秀屿区" - }, - { - "areaCode": "350322", - "areaName": "仙游县" - } - ] - }, - { - "cityCode": "350400", - "cityName": "三明市", - "mallAreaList": [ - { - "areaCode": "350402", - "areaName": "梅列区" - }, - { - "areaCode": "350403", - "areaName": "三元区" - }, - { - "areaCode": "350421", - "areaName": "明溪县" - }, - { - "areaCode": "350423", - "areaName": "清流县" - }, - { - "areaCode": "350424", - "areaName": "宁化县" - }, - { - "areaCode": "350425", - "areaName": "大田县" - }, - { - "areaCode": "350426", - "areaName": "尤溪县" - }, - { - "areaCode": "350427", - "areaName": "沙县" - }, - { - "areaCode": "350428", - "areaName": "将乐县" - }, - { - "areaCode": "350429", - "areaName": "泰宁县" - }, - { - "areaCode": "350430", - "areaName": "建宁县" - }, - { - "areaCode": "350481", - "areaName": "永安市" - } - ] - }, - { - "cityCode": "350500", - "cityName": "泉州市", - "mallAreaList": [ - { - "areaCode": "350502", - "areaName": "鲤城区" - }, - { - "areaCode": "350503", - "areaName": "丰泽区" - }, - { - "areaCode": "350504", - "areaName": "洛江区" - }, - { - "areaCode": "350505", - "areaName": "泉港区" - }, - { - "areaCode": "350521", - "areaName": "惠安县" - }, - { - "areaCode": "350524", - "areaName": "安溪县" - }, - { - "areaCode": "350525", - "areaName": "永春县" - }, - { - "areaCode": "350526", - "areaName": "德化县" - }, - { - "areaCode": "350527", - "areaName": "金门县" - }, - { - "areaCode": "350581", - "areaName": "石狮市" - }, - { - "areaCode": "350582", - "areaName": "晋江市" - }, - { - "areaCode": "350583", - "areaName": "南安市" - } - ] - }, - { - "cityCode": "350600", - "cityName": "漳州市", - "mallAreaList": [ - { - "areaCode": "350602", - "areaName": "芗城区" - }, - { - "areaCode": "350603", - "areaName": "龙文区" - }, - { - "areaCode": "350622", - "areaName": "云霄县" - }, - { - "areaCode": "350623", - "areaName": "漳浦县" - }, - { - "areaCode": "350624", - "areaName": "诏安县" - }, - { - "areaCode": "350625", - "areaName": "长泰县" - }, - { - "areaCode": "350626", - "areaName": "东山县" - }, - { - "areaCode": "350627", - "areaName": "南靖县" - }, - { - "areaCode": "350628", - "areaName": "平和县" - }, - { - "areaCode": "350629", - "areaName": "华安县" - }, - { - "areaCode": "350681", - "areaName": "龙海市" - } - ] - }, - { - "cityCode": "350700", - "cityName": "南平市", - "mallAreaList": [ - { - "areaCode": "350702", - "areaName": "延平区" - }, - { - "areaCode": "350721", - "areaName": "顺昌县" - }, - { - "areaCode": "350722", - "areaName": "浦城县" - }, - { - "areaCode": "350723", - "areaName": "光泽县" - }, - { - "areaCode": "350724", - "areaName": "松溪县" - }, - { - "areaCode": "350725", - "areaName": "政和县" - }, - { - "areaCode": "350781", - "areaName": "邵武市" - }, - { - "areaCode": "350782", - "areaName": "武夷山市" - }, - { - "areaCode": "350783", - "areaName": "建瓯市" - }, - { - "areaCode": "350784", - "areaName": "建阳市" - } - ] - }, - { - "cityCode": "350800", - "cityName": "龙岩市", - "mallAreaList": [ - { - "areaCode": "350802", - "areaName": "新罗区" - }, - { - "areaCode": "350821", - "areaName": "长汀县" - }, - { - "areaCode": "350822", - "areaName": "永定县" - }, - { - "areaCode": "350823", - "areaName": "上杭县" - }, - { - "areaCode": "350824", - "areaName": "武平县" - }, - { - "areaCode": "350825", - "areaName": "连城县" - }, - { - "areaCode": "350881", - "areaName": "漳平市" - } - ] - }, - { - "cityCode": "350900", - "cityName": "宁德市", - "mallAreaList": [ - { - "areaCode": "350902", - "areaName": "蕉城区" - }, - { - "areaCode": "350921", - "areaName": "霞浦县" - }, - { - "areaCode": "350922", - "areaName": "古田县" - }, - { - "areaCode": "350923", - "areaName": "屏南县" - }, - { - "areaCode": "350924", - "areaName": "寿宁县" - }, - { - "areaCode": "350925", - "areaName": "周宁县" - }, - { - "areaCode": "350926", - "areaName": "柘荣县" - }, - { - "areaCode": "350981", - "areaName": "福安市" - }, - { - "areaCode": "350982", - "areaName": "福鼎市" - } - ] - } - ] - }, - { - "provinceCode": "360000", - "provinceName": "江西省", - "mallCityList": [ - { - "cityCode": "360100", - "cityName": "南昌市", - "mallAreaList": [ - { - "areaCode": "360102", - "areaName": "东湖区" - }, - { - "areaCode": "360103", - "areaName": "西湖区" - }, - { - "areaCode": "360104", - "areaName": "青云谱区" - }, - { - "areaCode": "360105", - "areaName": "湾里区" - }, - { - "areaCode": "360111", - "areaName": "青山湖区" - }, - { - "areaCode": "360121", - "areaName": "南昌县" - }, - { - "areaCode": "360122", - "areaName": "新建县" - }, - { - "areaCode": "360123", - "areaName": "安义县" - }, - { - "areaCode": "360124", - "areaName": "进贤县" - } - ] - }, - { - "cityCode": "360200", - "cityName": "景德镇市", - "mallAreaList": [ - { - "areaCode": "360202", - "areaName": "昌江区" - }, - { - "areaCode": "360203", - "areaName": "珠山区" - }, - { - "areaCode": "360222", - "areaName": "浮梁县" - }, - { - "areaCode": "360281", - "areaName": "乐平市" - } - ] - }, - { - "cityCode": "360300", - "cityName": "萍乡市", - "mallAreaList": [ - { - "areaCode": "360302", - "areaName": "安源区" - }, - { - "areaCode": "360313", - "areaName": "湘东区" - }, - { - "areaCode": "360321", - "areaName": "莲花县" - }, - { - "areaCode": "360322", - "areaName": "上栗县" - }, - { - "areaCode": "360323", - "areaName": "芦溪县" - } - ] - }, - { - "cityCode": "360400", - "cityName": "九江市", - "mallAreaList": [ - { - "areaCode": "360402", - "areaName": "庐山区" - }, - { - "areaCode": "360403", - "areaName": "浔阳区" - }, - { - "areaCode": "360421", - "areaName": "九江县" - }, - { - "areaCode": "360423", - "areaName": "武宁县" - }, - { - "areaCode": "360424", - "areaName": "修水县" - }, - { - "areaCode": "360425", - "areaName": "永修县" - }, - { - "areaCode": "360426", - "areaName": "德安县" - }, - { - "areaCode": "360427", - "areaName": "星子县" - }, - { - "areaCode": "360428", - "areaName": "都昌县" - }, - { - "areaCode": "360429", - "areaName": "湖口县" - }, - { - "areaCode": "360430", - "areaName": "彭泽县" - }, - { - "areaCode": "360481", - "areaName": "瑞昌市" - }, - { - "areaCode": "360482", - "areaName": "共青城市" - } - ] - }, - { - "cityCode": "360500", - "cityName": "新余市", - "mallAreaList": [ - { - "areaCode": "360502", - "areaName": "渝水区" - }, - { - "areaCode": "360521", - "areaName": "分宜县" - } - ] - }, - { - "cityCode": "360600", - "cityName": "鹰潭市", - "mallAreaList": [ - { - "areaCode": "360602", - "areaName": "月湖区" - }, - { - "areaCode": "360622", - "areaName": "余江县" - }, - { - "areaCode": "360681", - "areaName": "贵溪市" - } - ] - }, - { - "cityCode": "360700", - "cityName": "赣州市", - "mallAreaList": [ - { - "areaCode": "360702", - "areaName": "章贡区" - }, - { - "areaCode": "360703", - "areaName": "南康区" - }, - { - "areaCode": "360721", - "areaName": "赣县" - }, - { - "areaCode": "360722", - "areaName": "信丰县" - }, - { - "areaCode": "360723", - "areaName": "大余县" - }, - { - "areaCode": "360724", - "areaName": "上犹县" - }, - { - "areaCode": "360725", - "areaName": "崇义县" - }, - { - "areaCode": "360726", - "areaName": "安远县" - }, - { - "areaCode": "360727", - "areaName": "龙南县" - }, - { - "areaCode": "360728", - "areaName": "定南县" - }, - { - "areaCode": "360729", - "areaName": "全南县" - }, - { - "areaCode": "360730", - "areaName": "宁都县" - }, - { - "areaCode": "360731", - "areaName": "于都县" - }, - { - "areaCode": "360732", - "areaName": "兴国县" - }, - { - "areaCode": "360733", - "areaName": "会昌县" - }, - { - "areaCode": "360734", - "areaName": "寻乌县" - }, - { - "areaCode": "360735", - "areaName": "石城县" - }, - { - "areaCode": "360781", - "areaName": "瑞金市" - } - ] - }, - { - "cityCode": "360800", - "cityName": "吉安市", - "mallAreaList": [ - { - "areaCode": "360802", - "areaName": "吉州区" - }, - { - "areaCode": "360803", - "areaName": "青原区" - }, - { - "areaCode": "360821", - "areaName": "吉安县" - }, - { - "areaCode": "360822", - "areaName": "吉水县" - }, - { - "areaCode": "360823", - "areaName": "峡江县" - }, - { - "areaCode": "360824", - "areaName": "新干县" - }, - { - "areaCode": "360825", - "areaName": "永丰县" - }, - { - "areaCode": "360826", - "areaName": "泰和县" - }, - { - "areaCode": "360827", - "areaName": "遂川县" - }, - { - "areaCode": "360828", - "areaName": "万安县" - }, - { - "areaCode": "360829", - "areaName": "安福县" - }, - { - "areaCode": "360830", - "areaName": "永新县" - }, - { - "areaCode": "360881", - "areaName": "井冈山市" - } - ] - }, - { - "cityCode": "360900", - "cityName": "宜春市", - "mallAreaList": [ - { - "areaCode": "360902", - "areaName": "袁州区" - }, - { - "areaCode": "360921", - "areaName": "奉新县" - }, - { - "areaCode": "360922", - "areaName": "万载县" - }, - { - "areaCode": "360923", - "areaName": "上高县" - }, - { - "areaCode": "360924", - "areaName": "宜丰县" - }, - { - "areaCode": "360925", - "areaName": "靖安县" - }, - { - "areaCode": "360926", - "areaName": "铜鼓县" - }, - { - "areaCode": "360981", - "areaName": "丰城市" - }, - { - "areaCode": "360982", - "areaName": "樟树市" - }, - { - "areaCode": "360983", - "areaName": "高安市" - } - ] - }, - { - "cityCode": "361000", - "cityName": "抚州市", - "mallAreaList": [ - { - "areaCode": "361002", - "areaName": "临川区" - }, - { - "areaCode": "361021", - "areaName": "南城县" - }, - { - "areaCode": "361022", - "areaName": "黎川县" - }, - { - "areaCode": "361023", - "areaName": "南丰县" - }, - { - "areaCode": "361024", - "areaName": "崇仁县" - }, - { - "areaCode": "361025", - "areaName": "乐安县" - }, - { - "areaCode": "361026", - "areaName": "宜黄县" - }, - { - "areaCode": "361027", - "areaName": "金溪县" - }, - { - "areaCode": "361028", - "areaName": "资溪县" - }, - { - "areaCode": "361029", - "areaName": "东乡县" - }, - { - "areaCode": "361030", - "areaName": "广昌县" - } - ] - }, - { - "cityCode": "361100", - "cityName": "上饶市", - "mallAreaList": [ - { - "areaCode": "361102", - "areaName": "信州区" - }, - { - "areaCode": "361121", - "areaName": "上饶县" - }, - { - "areaCode": "361122", - "areaName": "广丰县" - }, - { - "areaCode": "361123", - "areaName": "玉山县" - }, - { - "areaCode": "361124", - "areaName": "铅山县" - }, - { - "areaCode": "361125", - "areaName": "横峰县" - }, - { - "areaCode": "361126", - "areaName": "弋阳县" - }, - { - "areaCode": "361127", - "areaName": "余干县" - }, - { - "areaCode": "361128", - "areaName": "鄱阳县" - }, - { - "areaCode": "361129", - "areaName": "万年县" - }, - { - "areaCode": "361130", - "areaName": "婺源县" - }, - { - "areaCode": "361181", - "areaName": "德兴市" - } - ] - } - ] - }, - { - "provinceCode": "370000", - "provinceName": "山东省", - "mallCityList": [ - { - "cityCode": "370100", - "cityName": "济南市", - "mallAreaList": [ - { - "areaCode": "370102", - "areaName": "历下区" - }, - { - "areaCode": "370103", - "areaName": "市中区" - }, - { - "areaCode": "370104", - "areaName": "槐荫区" - }, - { - "areaCode": "370105", - "areaName": "天桥区" - }, - { - "areaCode": "370112", - "areaName": "历城区" - }, - { - "areaCode": "370113", - "areaName": "长清区" - }, - { - "areaCode": "370124", - "areaName": "平阴县" - }, - { - "areaCode": "370125", - "areaName": "济阳县" - }, - { - "areaCode": "370126", - "areaName": "商河县" - }, - { - "areaCode": "370181", - "areaName": "章丘市" - } - ] - }, - { - "cityCode": "370200", - "cityName": "青岛市", - "mallAreaList": [ - { - "areaCode": "370202", - "areaName": "市南区" - }, - { - "areaCode": "370203", - "areaName": "市北区" - }, - { - "areaCode": "370211", - "areaName": "黄岛区" - }, - { - "areaCode": "370212", - "areaName": "崂山区" - }, - { - "areaCode": "370213", - "areaName": "李沧区" - }, - { - "areaCode": "370214", - "areaName": "城阳区" - }, - { - "areaCode": "370281", - "areaName": "胶州市" - }, - { - "areaCode": "370282", - "areaName": "即墨市" - }, - { - "areaCode": "370283", - "areaName": "平度市" - }, - { - "areaCode": "370285", - "areaName": "莱西市" - } - ] - }, - { - "cityCode": "370300", - "cityName": "淄博市", - "mallAreaList": [ - { - "areaCode": "370302", - "areaName": "淄川区" - }, - { - "areaCode": "370303", - "areaName": "张店区" - }, - { - "areaCode": "370304", - "areaName": "博山区" - }, - { - "areaCode": "370305", - "areaName": "临淄区" - }, - { - "areaCode": "370306", - "areaName": "周村区" - }, - { - "areaCode": "370321", - "areaName": "桓台县" - }, - { - "areaCode": "370322", - "areaName": "高青县" - }, - { - "areaCode": "370323", - "areaName": "沂源县" - } - ] - }, - { - "cityCode": "370400", - "cityName": "枣庄市", - "mallAreaList": [ - { - "areaCode": "370402", - "areaName": "市中区" - }, - { - "areaCode": "370403", - "areaName": "薛城区" - }, - { - "areaCode": "370404", - "areaName": "峄城区" - }, - { - "areaCode": "370405", - "areaName": "台儿庄区" - }, - { - "areaCode": "370406", - "areaName": "山亭区" - }, - { - "areaCode": "370481", - "areaName": "滕州市" - } - ] - }, - { - "cityCode": "370500", - "cityName": "东营市", - "mallAreaList": [ - { - "areaCode": "370502", - "areaName": "东营区" - }, - { - "areaCode": "370503", - "areaName": "河口区" - }, - { - "areaCode": "370521", - "areaName": "垦利县" - }, - { - "areaCode": "370522", - "areaName": "利津县" - }, - { - "areaCode": "370523", - "areaName": "广饶县" - } - ] - }, - { - "cityCode": "370600", - "cityName": "烟台市", - "mallAreaList": [ - { - "areaCode": "370602", - "areaName": "芝罘区" - }, - { - "areaCode": "370611", - "areaName": "福山区" - }, - { - "areaCode": "370612", - "areaName": "牟平区" - }, - { - "areaCode": "370613", - "areaName": "莱山区" - }, - { - "areaCode": "370634", - "areaName": "长岛县" - }, - { - "areaCode": "370681", - "areaName": "龙口市" - }, - { - "areaCode": "370682", - "areaName": "莱阳市" - }, - { - "areaCode": "370683", - "areaName": "莱州市" - }, - { - "areaCode": "370684", - "areaName": "蓬莱市" - }, - { - "areaCode": "370685", - "areaName": "招远市" - }, - { - "areaCode": "370686", - "areaName": "栖霞市" - }, - { - "areaCode": "370687", - "areaName": "海阳市" - } - ] - }, - { - "cityCode": "370700", - "cityName": "潍坊市", - "mallAreaList": [ - { - "areaCode": "370702", - "areaName": "潍城区" - }, - { - "areaCode": "370703", - "areaName": "寒亭区" - }, - { - "areaCode": "370704", - "areaName": "坊子区" - }, - { - "areaCode": "370705", - "areaName": "奎文区" - }, - { - "areaCode": "370724", - "areaName": "临朐县" - }, - { - "areaCode": "370725", - "areaName": "昌乐县" - }, - { - "areaCode": "370781", - "areaName": "青州市" - }, - { - "areaCode": "370782", - "areaName": "诸城市" - }, - { - "areaCode": "370783", - "areaName": "寿光市" - }, - { - "areaCode": "370784", - "areaName": "安丘市" - }, - { - "areaCode": "370785", - "areaName": "高密市" - }, - { - "areaCode": "370786", - "areaName": "昌邑市" - } - ] - }, - { - "cityCode": "370800", - "cityName": "济宁市", - "mallAreaList": [ - { - "areaCode": "370802", - "areaName": "市中区" - }, - { - "areaCode": "370811", - "areaName": "任城区" - }, - { - "areaCode": "370812", - "areaName": "兖州区" - }, - { - "areaCode": "370826", - "areaName": "微山县" - }, - { - "areaCode": "370827", - "areaName": "鱼台县" - }, - { - "areaCode": "370828", - "areaName": "金乡县" - }, - { - "areaCode": "370829", - "areaName": "嘉祥县" - }, - { - "areaCode": "370830", - "areaName": "汶上县" - }, - { - "areaCode": "370831", - "areaName": "泗水县" - }, - { - "areaCode": "370832", - "areaName": "梁山县" - }, - { - "areaCode": "370881", - "areaName": "曲阜市" - }, - { - "areaCode": "370883", - "areaName": "邹城市" - } - ] - }, - { - "cityCode": "370900", - "cityName": "泰安市", - "mallAreaList": [ - { - "areaCode": "370902", - "areaName": "泰山区" - }, - { - "areaCode": "370911", - "areaName": "岱岳区" - }, - { - "areaCode": "370921", - "areaName": "宁阳县" - }, - { - "areaCode": "370923", - "areaName": "东平县" - }, - { - "areaCode": "370982", - "areaName": "新泰市" - }, - { - "areaCode": "370983", - "areaName": "肥城市" - } - ] - }, - { - "cityCode": "371000", - "cityName": "威海市", - "mallAreaList": [ - { - "areaCode": "371002", - "areaName": "环翠区" - }, - { - "areaCode": "371003", - "areaName": "文登区" - }, - { - "areaCode": "371082", - "areaName": "荣成市" - }, - { - "areaCode": "371083", - "areaName": "乳山市" - } - ] - }, - { - "cityCode": "371100", - "cityName": "日照市", - "mallAreaList": [ - { - "areaCode": "371102", - "areaName": "东港区" - }, - { - "areaCode": "371103", - "areaName": "岚山区" - }, - { - "areaCode": "371121", - "areaName": "五莲县" - }, - { - "areaCode": "371122", - "areaName": "莒县" - } - ] - }, - { - "cityCode": "371200", - "cityName": "莱芜市", - "mallAreaList": [ - { - "areaCode": "371202", - "areaName": "莱城区" - }, - { - "areaCode": "371203", - "areaName": "钢城区" - } - ] - }, - { - "cityCode": "371300", - "cityName": "临沂市", - "mallAreaList": [ - { - "areaCode": "371302", - "areaName": "兰山区" - }, - { - "areaCode": "371311", - "areaName": "罗庄区" - }, - { - "areaCode": "371312", - "areaName": "河东区" - }, - { - "areaCode": "371321", - "areaName": "沂南县" - }, - { - "areaCode": "371322", - "areaName": "郯城县" - }, - { - "areaCode": "371323", - "areaName": "沂水县" - }, - { - "areaCode": "371324", - "areaName": "兰陵县" - }, - { - "areaCode": "371325", - "areaName": "费县" - }, - { - "areaCode": "371326", - "areaName": "平邑县" - }, - { - "areaCode": "371327", - "areaName": "莒南县" - }, - { - "areaCode": "371328", - "areaName": "蒙阴县" - }, - { - "areaCode": "371329", - "areaName": "临沭县" - } - ] - }, - { - "cityCode": "371400", - "cityName": "德州市", - "mallAreaList": [ - { - "areaCode": "371402", - "areaName": "德城区" - }, - { - "areaCode": "371403", - "areaName": "陵城区" - }, - { - "areaCode": "371422", - "areaName": "宁津县" - }, - { - "areaCode": "371423", - "areaName": "庆云县" - }, - { - "areaCode": "371424", - "areaName": "临邑县" - }, - { - "areaCode": "371425", - "areaName": "齐河县" - }, - { - "areaCode": "371426", - "areaName": "平原县" - }, - { - "areaCode": "371427", - "areaName": "夏津县" - }, - { - "areaCode": "371428", - "areaName": "武城县" - }, - { - "areaCode": "371481", - "areaName": "乐陵市" - }, - { - "areaCode": "371482", - "areaName": "禹城市" - } - ] - }, - { - "cityCode": "371500", - "cityName": "聊城市", - "mallAreaList": [ - { - "areaCode": "371502", - "areaName": "东昌府区" - }, - { - "areaCode": "371521", - "areaName": "阳谷县" - }, - { - "areaCode": "371522", - "areaName": "莘县" - }, - { - "areaCode": "371523", - "areaName": "茌平县" - }, - { - "areaCode": "371524", - "areaName": "东阿县" - }, - { - "areaCode": "371525", - "areaName": "冠县" - }, - { - "areaCode": "371526", - "areaName": "高唐县" - }, - { - "areaCode": "371581", - "areaName": "临清市" - } - ] - }, - { - "cityCode": "371600", - "cityName": "滨州市", - "mallAreaList": [ - { - "areaCode": "371602", - "areaName": "滨城区" - }, - { - "areaCode": "371603", - "areaName": "沾化区" - }, - { - "areaCode": "371621", - "areaName": "惠民县" - }, - { - "areaCode": "371622", - "areaName": "阳信县" - }, - { - "areaCode": "371623", - "areaName": "无棣县" - }, - { - "areaCode": "371625", - "areaName": "博兴县" - }, - { - "areaCode": "371626", - "areaName": "邹平县" - } - ] - }, - { - "cityCode": "371700", - "cityName": "菏泽市", - "mallAreaList": [ - { - "areaCode": "371702", - "areaName": "牡丹区" - }, - { - "areaCode": "371721", - "areaName": "曹县" - }, - { - "areaCode": "371722", - "areaName": "单县" - }, - { - "areaCode": "371723", - "areaName": "成武县" - }, - { - "areaCode": "371724", - "areaName": "巨野县" - }, - { - "areaCode": "371725", - "areaName": "郓城县" - }, - { - "areaCode": "371726", - "areaName": "鄄城县" - }, - { - "areaCode": "371727", - "areaName": "定陶县" - }, - { - "areaCode": "371728", - "areaName": "东明县" - } - ] - } - ] - }, - { - "provinceCode": "410000", - "provinceName": "河南省", - "mallCityList": [ - { - "cityCode": "410100", - "cityName": "郑州市", - "mallAreaList": [ - { - "areaCode": "410102", - "areaName": "中原区" - }, - { - "areaCode": "410103", - "areaName": "二七区" - }, - { - "areaCode": "410104", - "areaName": "管城回族区" - }, - { - "areaCode": "410105", - "areaName": "金水区" - }, - { - "areaCode": "410106", - "areaName": "上街区" - }, - { - "areaCode": "410108", - "areaName": "惠济区" - }, - { - "areaCode": "410122", - "areaName": "中牟县" - }, - { - "areaCode": "410181", - "areaName": "巩义市" - }, - { - "areaCode": "410182", - "areaName": "荥阳市" - }, - { - "areaCode": "410183", - "areaName": "新密市" - }, - { - "areaCode": "410184", - "areaName": "新郑市" - }, - { - "areaCode": "410185", - "areaName": "登封市" - } - ] - }, - { - "cityCode": "410200", - "cityName": "开封市", - "mallAreaList": [ - { - "areaCode": "410202", - "areaName": "龙亭区" - }, - { - "areaCode": "410203", - "areaName": "顺河回族区" - }, - { - "areaCode": "410204", - "areaName": "鼓楼区" - }, - { - "areaCode": "410205", - "areaName": "禹王台区" - }, - { - "areaCode": "410211", - "areaName": "金明区" - }, - { - "areaCode": "410221", - "areaName": "杞县" - }, - { - "areaCode": "410222", - "areaName": "通许县" - }, - { - "areaCode": "410223", - "areaName": "尉氏县" - }, - { - "areaCode": "410224", - "areaName": "开封县" - }, - { - "areaCode": "410225", - "areaName": "兰考县" - } - ] - }, - { - "cityCode": "410300", - "cityName": "洛阳市", - "mallAreaList": [ - { - "areaCode": "410302", - "areaName": "老城区" - }, - { - "areaCode": "410303", - "areaName": "西工区" - }, - { - "areaCode": "410304", - "areaName": "瀍河回族区" - }, - { - "areaCode": "410305", - "areaName": "涧西区" - }, - { - "areaCode": "410306", - "areaName": "吉利区" - }, - { - "areaCode": "410311", - "areaName": "洛龙区" - }, - { - "areaCode": "410322", - "areaName": "孟津县" - }, - { - "areaCode": "410323", - "areaName": "新安县" - }, - { - "areaCode": "410324", - "areaName": "栾川县" - }, - { - "areaCode": "410325", - "areaName": "嵩县" - }, - { - "areaCode": "410326", - "areaName": "汝阳县" - }, - { - "areaCode": "410327", - "areaName": "宜阳县" - }, - { - "areaCode": "410328", - "areaName": "洛宁县" - }, - { - "areaCode": "410329", - "areaName": "伊川县" - }, - { - "areaCode": "410381", - "areaName": "偃师市" - } - ] - }, - { - "cityCode": "410400", - "cityName": "平顶山市", - "mallAreaList": [ - { - "areaCode": "410402", - "areaName": "新华区" - }, - { - "areaCode": "410403", - "areaName": "卫东区" - }, - { - "areaCode": "410404", - "areaName": "石龙区" - }, - { - "areaCode": "410411", - "areaName": "湛河区" - }, - { - "areaCode": "410421", - "areaName": "宝丰县" - }, - { - "areaCode": "410422", - "areaName": "叶县" - }, - { - "areaCode": "410423", - "areaName": "鲁山县" - }, - { - "areaCode": "410425", - "areaName": "郏县" - }, - { - "areaCode": "410481", - "areaName": "舞钢市" - }, - { - "areaCode": "410482", - "areaName": "汝州市" - } - ] - }, - { - "cityCode": "410500", - "cityName": "安阳市", - "mallAreaList": [ - { - "areaCode": "410502", - "areaName": "文峰区" - }, - { - "areaCode": "410503", - "areaName": "北关区" - }, - { - "areaCode": "410505", - "areaName": "殷都区" - }, - { - "areaCode": "410506", - "areaName": "龙安区" - }, - { - "areaCode": "410522", - "areaName": "安阳县" - }, - { - "areaCode": "410523", - "areaName": "汤阴县" - }, - { - "areaCode": "410526", - "areaName": "滑县" - }, - { - "areaCode": "410527", - "areaName": "内黄县" - }, - { - "areaCode": "410581", - "areaName": "林州市" - } - ] - }, - { - "cityCode": "410600", - "cityName": "鹤壁市", - "mallAreaList": [ - { - "areaCode": "410602", - "areaName": "鹤山区" - }, - { - "areaCode": "410603", - "areaName": "山城区" - }, - { - "areaCode": "410611", - "areaName": "淇滨区" - }, - { - "areaCode": "410621", - "areaName": "浚县" - }, - { - "areaCode": "410622", - "areaName": "淇县" - } - ] - }, - { - "cityCode": "410700", - "cityName": "新乡市", - "mallAreaList": [ - { - "areaCode": "410702", - "areaName": "红旗区" - }, - { - "areaCode": "410703", - "areaName": "卫滨区" - }, - { - "areaCode": "410704", - "areaName": "凤泉区" - }, - { - "areaCode": "410711", - "areaName": "牧野区" - }, - { - "areaCode": "410721", - "areaName": "新乡县" - }, - { - "areaCode": "410724", - "areaName": "获嘉县" - }, - { - "areaCode": "410725", - "areaName": "原阳县" - }, - { - "areaCode": "410726", - "areaName": "延津县" - }, - { - "areaCode": "410727", - "areaName": "封丘县" - }, - { - "areaCode": "410728", - "areaName": "长垣县" - }, - { - "areaCode": "410781", - "areaName": "卫辉市" - }, - { - "areaCode": "410782", - "areaName": "辉县市" - } - ] - }, - { - "cityCode": "410800", - "cityName": "焦作市", - "mallAreaList": [ - { - "areaCode": "410802", - "areaName": "解放区" - }, - { - "areaCode": "410803", - "areaName": "中站区" - }, - { - "areaCode": "410804", - "areaName": "马村区" - }, - { - "areaCode": "410811", - "areaName": "山阳区" - }, - { - "areaCode": "410821", - "areaName": "修武县" - }, - { - "areaCode": "410822", - "areaName": "博爱县" - }, - { - "areaCode": "410823", - "areaName": "武陟县" - }, - { - "areaCode": "410825", - "areaName": "温县" - }, - { - "areaCode": "410882", - "areaName": "沁阳市" - }, - { - "areaCode": "410883", - "areaName": "孟州市" - } - ] - }, - { - "cityCode": "410900", - "cityName": "濮阳市", - "mallAreaList": [ - { - "areaCode": "410902", - "areaName": "华龙区" - }, - { - "areaCode": "410922", - "areaName": "清丰县" - }, - { - "areaCode": "410923", - "areaName": "南乐县" - }, - { - "areaCode": "410926", - "areaName": "范县" - }, - { - "areaCode": "410927", - "areaName": "台前县" - }, - { - "areaCode": "410928", - "areaName": "濮阳县" - } - ] - }, - { - "cityCode": "411000", - "cityName": "许昌市", - "mallAreaList": [ - { - "areaCode": "411002", - "areaName": "魏都区" - }, - { - "areaCode": "411023", - "areaName": "许昌县" - }, - { - "areaCode": "411024", - "areaName": "鄢陵县" - }, - { - "areaCode": "411025", - "areaName": "襄城县" - }, - { - "areaCode": "411081", - "areaName": "禹州市" - }, - { - "areaCode": "411082", - "areaName": "长葛市" - } - ] - }, - { - "cityCode": "411100", - "cityName": "漯河市", - "mallAreaList": [ - { - "areaCode": "411102", - "areaName": "源汇区" - }, - { - "areaCode": "411103", - "areaName": "郾城区" - }, - { - "areaCode": "411104", - "areaName": "召陵区" - }, - { - "areaCode": "411121", - "areaName": "舞阳县" - }, - { - "areaCode": "411122", - "areaName": "临颍县" - } - ] - }, - { - "cityCode": "411200", - "cityName": "三门峡市", - "mallAreaList": [ - { - "areaCode": "411202", - "areaName": "湖滨区" - }, - { - "areaCode": "411221", - "areaName": "渑池县" - }, - { - "areaCode": "411222", - "areaName": "陕县" - }, - { - "areaCode": "411224", - "areaName": "卢氏县" - }, - { - "areaCode": "411281", - "areaName": "义马市" - }, - { - "areaCode": "411282", - "areaName": "灵宝市" - } - ] - }, - { - "cityCode": "411300", - "cityName": "南阳市", - "mallAreaList": [ - { - "areaCode": "411302", - "areaName": "宛城区" - }, - { - "areaCode": "411303", - "areaName": "卧龙区" - }, - { - "areaCode": "411321", - "areaName": "南召县" - }, - { - "areaCode": "411322", - "areaName": "方城县" - }, - { - "areaCode": "411323", - "areaName": "西峡县" - }, - { - "areaCode": "411324", - "areaName": "镇平县" - }, - { - "areaCode": "411325", - "areaName": "内乡县" - }, - { - "areaCode": "411326", - "areaName": "淅川县" - }, - { - "areaCode": "411327", - "areaName": "社旗县" - }, - { - "areaCode": "411328", - "areaName": "唐河县" - }, - { - "areaCode": "411329", - "areaName": "新野县" - }, - { - "areaCode": "411330", - "areaName": "桐柏县" - }, - { - "areaCode": "411381", - "areaName": "邓州市" - } - ] - }, - { - "cityCode": "411400", - "cityName": "商丘市", - "mallAreaList": [ - { - "areaCode": "411402", - "areaName": "梁园区" - }, - { - "areaCode": "411403", - "areaName": "睢阳区" - }, - { - "areaCode": "411421", - "areaName": "民权县" - }, - { - "areaCode": "411422", - "areaName": "睢县" - }, - { - "areaCode": "411423", - "areaName": "宁陵县" - }, - { - "areaCode": "411424", - "areaName": "柘城县" - }, - { - "areaCode": "411425", - "areaName": "虞城县" - }, - { - "areaCode": "411426", - "areaName": "夏邑县" - }, - { - "areaCode": "411481", - "areaName": "永城市" - } - ] - }, - { - "cityCode": "411500", - "cityName": "信阳市", - "mallAreaList": [ - { - "areaCode": "411502", - "areaName": "浉河区" - }, - { - "areaCode": "411503", - "areaName": "平桥区" - }, - { - "areaCode": "411521", - "areaName": "罗山县" - }, - { - "areaCode": "411522", - "areaName": "光山县" - }, - { - "areaCode": "411523", - "areaName": "新县" - }, - { - "areaCode": "411524", - "areaName": "商城县" - }, - { - "areaCode": "411525", - "areaName": "固始县" - }, - { - "areaCode": "411526", - "areaName": "潢川县" - }, - { - "areaCode": "411527", - "areaName": "淮滨县" - }, - { - "areaCode": "411528", - "areaName": "息县" - } - ] - }, - { - "cityCode": "411600", - "cityName": "周口市", - "mallAreaList": [ - { - "areaCode": "411602", - "areaName": "川汇区" - }, - { - "areaCode": "411621", - "areaName": "扶沟县" - }, - { - "areaCode": "411622", - "areaName": "西华县" - }, - { - "areaCode": "411623", - "areaName": "商水县" - }, - { - "areaCode": "411624", - "areaName": "沈丘县" - }, - { - "areaCode": "411625", - "areaName": "郸城县" - }, - { - "areaCode": "411626", - "areaName": "淮阳县" - }, - { - "areaCode": "411627", - "areaName": "太康县" - }, - { - "areaCode": "411628", - "areaName": "鹿邑县" - }, - { - "areaCode": "411681", - "areaName": "项城市" - } - ] - }, - { - "cityCode": "411700", - "cityName": "驻马店市", - "mallAreaList": [ - { - "areaCode": "411702", - "areaName": "驿城区" - }, - { - "areaCode": "411721", - "areaName": "西平县" - }, - { - "areaCode": "411722", - "areaName": "上蔡县" - }, - { - "areaCode": "411723", - "areaName": "平舆县" - }, - { - "areaCode": "411724", - "areaName": "正阳县" - }, - { - "areaCode": "411725", - "areaName": "确山县" - }, - { - "areaCode": "411726", - "areaName": "泌阳县" - }, - { - "areaCode": "411727", - "areaName": "汝南县" - }, - { - "areaCode": "411728", - "areaName": "遂平县" - }, - { - "areaCode": "411729", - "areaName": "新蔡县" - } - ] - }, - { - "cityCode": "419000", - "cityName": "河南省直辖县级行政区划", - "mallAreaList": [ - { - "areaCode": "419001", - "areaName": "济源市" - } - ] - } - ] - }, - { - "provinceCode": "420000", - "provinceName": "湖北省", - "mallCityList": [ - { - "cityCode": "420100", - "cityName": "武汉市", - "mallAreaList": [ - { - "areaCode": "420102", - "areaName": "江岸区" - }, - { - "areaCode": "420103", - "areaName": "江汉区" - }, - { - "areaCode": "420104", - "areaName": "硚口区" - }, - { - "areaCode": "420105", - "areaName": "汉阳区" - }, - { - "areaCode": "420106", - "areaName": "武昌区" - }, - { - "areaCode": "420107", - "areaName": "青山区" - }, - { - "areaCode": "420111", - "areaName": "洪山区" - }, - { - "areaCode": "420112", - "areaName": "东西湖区" - }, - { - "areaCode": "420113", - "areaName": "汉南区" - }, - { - "areaCode": "420114", - "areaName": "蔡甸区" - }, - { - "areaCode": "420115", - "areaName": "江夏区" - }, - { - "areaCode": "420116", - "areaName": "黄陂区" - }, - { - "areaCode": "420117", - "areaName": "新洲区" - } - ] - }, - { - "cityCode": "420200", - "cityName": "黄石市", - "mallAreaList": [ - { - "areaCode": "420202", - "areaName": "黄石港区" - }, - { - "areaCode": "420203", - "areaName": "西塞山区" - }, - { - "areaCode": "420204", - "areaName": "下陆区" - }, - { - "areaCode": "420205", - "areaName": "铁山区" - }, - { - "areaCode": "420222", - "areaName": "阳新县" - }, - { - "areaCode": "420281", - "areaName": "大冶市" - } - ] - }, - { - "cityCode": "420300", - "cityName": "十堰市", - "mallAreaList": [ - { - "areaCode": "420302", - "areaName": "茅箭区" - }, - { - "areaCode": "420303", - "areaName": "张湾区" - }, - { - "areaCode": "420304", - "areaName": "郧阳区" - }, - { - "areaCode": "420322", - "areaName": "郧西县" - }, - { - "areaCode": "420323", - "areaName": "竹山县" - }, - { - "areaCode": "420324", - "areaName": "竹溪县" - }, - { - "areaCode": "420325", - "areaName": "房县" - }, - { - "areaCode": "420381", - "areaName": "丹江口市" - } - ] - }, - { - "cityCode": "420500", - "cityName": "宜昌市", - "mallAreaList": [ - { - "areaCode": "420502", - "areaName": "西陵区" - }, - { - "areaCode": "420503", - "areaName": "伍家岗区" - }, - { - "areaCode": "420504", - "areaName": "点军区" - }, - { - "areaCode": "420505", - "areaName": "猇亭区" - }, - { - "areaCode": "420506", - "areaName": "夷陵区" - }, - { - "areaCode": "420525", - "areaName": "远安县" - }, - { - "areaCode": "420526", - "areaName": "兴山县" - }, - { - "areaCode": "420527", - "areaName": "秭归县" - }, - { - "areaCode": "420528", - "areaName": "长阳土家族自治县" - }, - { - "areaCode": "420529", - "areaName": "五峰土家族自治县" - }, - { - "areaCode": "420581", - "areaName": "宜都市" - }, - { - "areaCode": "420582", - "areaName": "当阳市" - }, - { - "areaCode": "420583", - "areaName": "枝江市" - } - ] - }, - { - "cityCode": "420600", - "cityName": "襄樊市", - "mallAreaList": [ - { - "areaCode": "420602", - "areaName": "襄城区" - }, - { - "areaCode": "420606", - "areaName": "樊城区" - }, - { - "areaCode": "420607", - "areaName": "襄州区" - }, - { - "areaCode": "420624", - "areaName": "南漳县" - }, - { - "areaCode": "420625", - "areaName": "谷城县" - }, - { - "areaCode": "420626", - "areaName": "保康县" - }, - { - "areaCode": "420682", - "areaName": "老河口市" - }, - { - "areaCode": "420683", - "areaName": "枣阳市" - }, - { - "areaCode": "420684", - "areaName": "宜城市" - } - ] - }, - { - "cityCode": "420700", - "cityName": "鄂州市", - "mallAreaList": [ - { - "areaCode": "420702", - "areaName": "梁子湖区" - }, - { - "areaCode": "420703", - "areaName": "华容区" - }, - { - "areaCode": "420704", - "areaName": "鄂城区" - } - ] - }, - { - "cityCode": "420800", - "cityName": "荆门市", - "mallAreaList": [ - { - "areaCode": "420802", - "areaName": "东宝区" - }, - { - "areaCode": "420804", - "areaName": "掇刀区" - }, - { - "areaCode": "420821", - "areaName": "京山县" - }, - { - "areaCode": "420822", - "areaName": "沙洋县" - }, - { - "areaCode": "420881", - "areaName": "钟祥市" - } - ] - }, - { - "cityCode": "420900", - "cityName": "孝感市", - "mallAreaList": [ - { - "areaCode": "420902", - "areaName": "孝南区" - }, - { - "areaCode": "420921", - "areaName": "孝昌县" - }, - { - "areaCode": "420922", - "areaName": "大悟县" - }, - { - "areaCode": "420923", - "areaName": "云梦县" - }, - { - "areaCode": "420981", - "areaName": "应城市" - }, - { - "areaCode": "420982", - "areaName": "安陆市" - }, - { - "areaCode": "420984", - "areaName": "汉川市" - } - ] - }, - { - "cityCode": "421000", - "cityName": "荆州市", - "mallAreaList": [ - { - "areaCode": "421002", - "areaName": "沙市区" - }, - { - "areaCode": "421003", - "areaName": "荆州区" - }, - { - "areaCode": "421022", - "areaName": "公安县" - }, - { - "areaCode": "421023", - "areaName": "监利县" - }, - { - "areaCode": "421024", - "areaName": "江陵县" - }, - { - "areaCode": "421081", - "areaName": "石首市" - }, - { - "areaCode": "421083", - "areaName": "洪湖市" - }, - { - "areaCode": "421087", - "areaName": "松滋市" - } - ] - }, - { - "cityCode": "421100", - "cityName": "黄冈市", - "mallAreaList": [ - { - "areaCode": "421102", - "areaName": "黄州区" - }, - { - "areaCode": "421121", - "areaName": "团风县" - }, - { - "areaCode": "421122", - "areaName": "红安县" - }, - { - "areaCode": "421123", - "areaName": "罗田县" - }, - { - "areaCode": "421124", - "areaName": "英山县" - }, - { - "areaCode": "421125", - "areaName": "浠水县" - }, - { - "areaCode": "421126", - "areaName": "蕲春县" - }, - { - "areaCode": "421127", - "areaName": "黄梅县" - }, - { - "areaCode": "421181", - "areaName": "麻城市" - }, - { - "areaCode": "421182", - "areaName": "武穴市" - } - ] - }, - { - "cityCode": "421200", - "cityName": "咸宁市", - "mallAreaList": [ - { - "areaCode": "421202", - "areaName": "咸安区" - }, - { - "areaCode": "421221", - "areaName": "嘉鱼县" - }, - { - "areaCode": "421222", - "areaName": "通城县" - }, - { - "areaCode": "421223", - "areaName": "崇阳县" - }, - { - "areaCode": "421224", - "areaName": "通山县" - }, - { - "areaCode": "421281", - "areaName": "赤壁市" - } - ] - }, - { - "cityCode": "421300", - "cityName": "随州市", - "mallAreaList": [ - { - "areaCode": "421303", - "areaName": "曾都区" - }, - { - "areaCode": "421321", - "areaName": "随县" - }, - { - "areaCode": "421381", - "areaName": "广水市" - } - ] - }, - { - "cityCode": "422800", - "cityName": "恩施土家族苗族自治州", - "mallAreaList": [ - { - "areaCode": "422801", - "areaName": "恩施市" - }, - { - "areaCode": "422802", - "areaName": "利川市" - }, - { - "areaCode": "422822", - "areaName": "建始县" - }, - { - "areaCode": "422823", - "areaName": "巴东县" - }, - { - "areaCode": "422825", - "areaName": "宣恩县" - }, - { - "areaCode": "422826", - "areaName": "咸丰县" - }, - { - "areaCode": "422827", - "areaName": "来凤县" - }, - { - "areaCode": "422828", - "areaName": "鹤峰县" - } - ] - }, - { - "cityCode": "429000", - "cityName": "省直辖行政单位", - "mallAreaList": [ - { - "areaCode": "429004", - "areaName": "仙桃市" - }, - { - "areaCode": "429005", - "areaName": "潜江市" - }, - { - "areaCode": "429006", - "areaName": "天门市" - }, - { - "areaCode": "429021", - "areaName": "神农架林区" - } - ] - } - ] - }, - { - "provinceCode": "430000", - "provinceName": "湖南省", - "mallCityList": [ - { - "cityCode": "430100", - "cityName": "长沙市", - "mallAreaList": [ - { - "areaCode": "430102", - "areaName": "芙蓉区" - }, - { - "areaCode": "430103", - "areaName": "天心区" - }, - { - "areaCode": "430104", - "areaName": "岳麓区" - }, - { - "areaCode": "430105", - "areaName": "开福区" - }, - { - "areaCode": "430111", - "areaName": "雨花区" - }, - { - "areaCode": "430112", - "areaName": "望城区" - }, - { - "areaCode": "430121", - "areaName": "长沙县" - }, - { - "areaCode": "430124", - "areaName": "宁乡县" - }, - { - "areaCode": "430181", - "areaName": "浏阳市" - } - ] - }, - { - "cityCode": "430200", - "cityName": "株洲市", - "mallAreaList": [ - { - "areaCode": "430202", - "areaName": "荷塘区" - }, - { - "areaCode": "430203", - "areaName": "芦淞区" - }, - { - "areaCode": "430204", - "areaName": "石峰区" - }, - { - "areaCode": "430211", - "areaName": "天元区" - }, - { - "areaCode": "430221", - "areaName": "株洲县" - }, - { - "areaCode": "430223", - "areaName": "攸县" - }, - { - "areaCode": "430224", - "areaName": "茶陵县" - }, - { - "areaCode": "430225", - "areaName": "炎陵县" - }, - { - "areaCode": "430281", - "areaName": "醴陵市" - } - ] - }, - { - "cityCode": "430300", - "cityName": "湘潭市", - "mallAreaList": [ - { - "areaCode": "430302", - "areaName": "雨湖区" - }, - { - "areaCode": "430304", - "areaName": "岳塘区" - }, - { - "areaCode": "430321", - "areaName": "湘潭县" - }, - { - "areaCode": "430381", - "areaName": "湘乡市" - }, - { - "areaCode": "430382", - "areaName": "韶山市" - } - ] - }, - { - "cityCode": "430400", - "cityName": "衡阳市", - "mallAreaList": [ - { - "areaCode": "430405", - "areaName": "珠晖区" - }, - { - "areaCode": "430406", - "areaName": "雁峰区" - }, - { - "areaCode": "430407", - "areaName": "石鼓区" - }, - { - "areaCode": "430408", - "areaName": "蒸湘区" - }, - { - "areaCode": "430412", - "areaName": "南岳区" - }, - { - "areaCode": "430421", - "areaName": "衡阳县" - }, - { - "areaCode": "430422", - "areaName": "衡南县" - }, - { - "areaCode": "430423", - "areaName": "衡山县" - }, - { - "areaCode": "430424", - "areaName": "衡东县" - }, - { - "areaCode": "430426", - "areaName": "祁东县" - }, - { - "areaCode": "430481", - "areaName": "耒阳市" - }, - { - "areaCode": "430482", - "areaName": "常宁市" - } - ] - }, - { - "cityCode": "430500", - "cityName": "邵阳市", - "mallAreaList": [ - { - "areaCode": "430502", - "areaName": "双清区" - }, - { - "areaCode": "430503", - "areaName": "大祥区" - }, - { - "areaCode": "430511", - "areaName": "北塔区" - }, - { - "areaCode": "430521", - "areaName": "邵东县" - }, - { - "areaCode": "430522", - "areaName": "新邵县" - }, - { - "areaCode": "430523", - "areaName": "邵阳县" - }, - { - "areaCode": "430524", - "areaName": "隆回县" - }, - { - "areaCode": "430525", - "areaName": "洞口县" - }, - { - "areaCode": "430527", - "areaName": "绥宁县" - }, - { - "areaCode": "430528", - "areaName": "新宁县" - }, - { - "areaCode": "430529", - "areaName": "城步苗族自治县" - }, - { - "areaCode": "430581", - "areaName": "武冈市" - } - ] - }, - { - "cityCode": "430600", - "cityName": "岳阳市", - "mallAreaList": [ - { - "areaCode": "430602", - "areaName": "岳阳楼区" - }, - { - "areaCode": "430603", - "areaName": "云溪区" - }, - { - "areaCode": "430611", - "areaName": "君山区" - }, - { - "areaCode": "430621", - "areaName": "岳阳县" - }, - { - "areaCode": "430623", - "areaName": "华容县" - }, - { - "areaCode": "430624", - "areaName": "湘阴县" - }, - { - "areaCode": "430626", - "areaName": "平江县" - }, - { - "areaCode": "430681", - "areaName": "汨罗市" - }, - { - "areaCode": "430682", - "areaName": "临湘市" - } - ] - }, - { - "cityCode": "430700", - "cityName": "常德市", - "mallAreaList": [ - { - "areaCode": "430702", - "areaName": "武陵区" - }, - { - "areaCode": "430703", - "areaName": "鼎城区" - }, - { - "areaCode": "430721", - "areaName": "安乡县" - }, - { - "areaCode": "430722", - "areaName": "汉寿县" - }, - { - "areaCode": "430723", - "areaName": "澧县" - }, - { - "areaCode": "430724", - "areaName": "临澧县" - }, - { - "areaCode": "430725", - "areaName": "桃源县" - }, - { - "areaCode": "430726", - "areaName": "石门县" - }, - { - "areaCode": "430781", - "areaName": "津市市" - } - ] - }, - { - "cityCode": "430800", - "cityName": "张家界市", - "mallAreaList": [ - { - "areaCode": "430802", - "areaName": "永定区" - }, - { - "areaCode": "430811", - "areaName": "武陵源区" - }, - { - "areaCode": "430821", - "areaName": "慈利县" - }, - { - "areaCode": "430822", - "areaName": "桑植县" - } - ] - }, - { - "cityCode": "430900", - "cityName": "益阳市", - "mallAreaList": [ - { - "areaCode": "430902", - "areaName": "资阳区" - }, - { - "areaCode": "430903", - "areaName": "赫山区" - }, - { - "areaCode": "430921", - "areaName": "南县" - }, - { - "areaCode": "430922", - "areaName": "桃江县" - }, - { - "areaCode": "430923", - "areaName": "安化县" - }, - { - "areaCode": "430981", - "areaName": "沅江市" - } - ] - }, - { - "cityCode": "431000", - "cityName": "郴州市", - "mallAreaList": [ - { - "areaCode": "431002", - "areaName": "北湖区" - }, - { - "areaCode": "431003", - "areaName": "苏仙区" - }, - { - "areaCode": "431021", - "areaName": "桂阳县" - }, - { - "areaCode": "431022", - "areaName": "宜章县" - }, - { - "areaCode": "431023", - "areaName": "永兴县" - }, - { - "areaCode": "431024", - "areaName": "嘉禾县" - }, - { - "areaCode": "431025", - "areaName": "临武县" - }, - { - "areaCode": "431026", - "areaName": "汝城县" - }, - { - "areaCode": "431027", - "areaName": "桂东县" - }, - { - "areaCode": "431028", - "areaName": "安仁县" - }, - { - "areaCode": "431081", - "areaName": "资兴市" - } - ] - }, - { - "cityCode": "431100", - "cityName": "永州市", - "mallAreaList": [ - { - "areaCode": "431102", - "areaName": "零陵区" - }, - { - "areaCode": "431103", - "areaName": "冷水滩区" - }, - { - "areaCode": "431121", - "areaName": "祁阳县" - }, - { - "areaCode": "431122", - "areaName": "东安县" - }, - { - "areaCode": "431123", - "areaName": "双牌县" - }, - { - "areaCode": "431124", - "areaName": "道县" - }, - { - "areaCode": "431125", - "areaName": "江永县" - }, - { - "areaCode": "431126", - "areaName": "宁远县" - }, - { - "areaCode": "431127", - "areaName": "蓝山县" - }, - { - "areaCode": "431128", - "areaName": "新田县" - }, - { - "areaCode": "431129", - "areaName": "江华瑶族自治县" - } - ] - }, - { - "cityCode": "431200", - "cityName": "怀化市", - "mallAreaList": [ - { - "areaCode": "431202", - "areaName": "鹤城区" - }, - { - "areaCode": "431221", - "areaName": "中方县" - }, - { - "areaCode": "431222", - "areaName": "沅陵县" - }, - { - "areaCode": "431223", - "areaName": "辰溪县" - }, - { - "areaCode": "431224", - "areaName": "溆浦县" - }, - { - "areaCode": "431225", - "areaName": "会同县" - }, - { - "areaCode": "431226", - "areaName": "麻阳苗族自治县" - }, - { - "areaCode": "431227", - "areaName": "新晃侗族自治县" - }, - { - "areaCode": "431228", - "areaName": "芷江侗族自治县" - }, - { - "areaCode": "431229", - "areaName": "靖州苗族侗族自治县" - }, - { - "areaCode": "431230", - "areaName": "通道侗族自治县" - }, - { - "areaCode": "431281", - "areaName": "洪江市" - } - ] - }, - { - "cityCode": "431300", - "cityName": "娄底市", - "mallAreaList": [ - { - "areaCode": "431302", - "areaName": "娄星区" - }, - { - "areaCode": "431321", - "areaName": "双峰县" - }, - { - "areaCode": "431322", - "areaName": "新化县" - }, - { - "areaCode": "431381", - "areaName": "冷水江市" - }, - { - "areaCode": "431382", - "areaName": "涟源市" - } - ] - }, - { - "cityCode": "433100", - "cityName": "湘西土家族苗族自治州", - "mallAreaList": [ - { - "areaCode": "433101", - "areaName": "吉首市" - }, - { - "areaCode": "433122", - "areaName": "泸溪县" - }, - { - "areaCode": "433123", - "areaName": "凤凰县" - }, - { - "areaCode": "433124", - "areaName": "花垣县" - }, - { - "areaCode": "433125", - "areaName": "保靖县" - }, - { - "areaCode": "433126", - "areaName": "古丈县" - }, - { - "areaCode": "433127", - "areaName": "永顺县" - }, - { - "areaCode": "433130", - "areaName": "龙山县" - } - ] - } - ] - }, - { - "provinceCode": "440000", - "provinceName": "广东省", - "mallCityList": [ - { - "cityCode": "440100", - "cityName": "广州市", - "mallAreaList": [ - { - "areaCode": "440103", - "areaName": "荔湾区" - }, - { - "areaCode": "440104", - "areaName": "越秀区" - }, - { - "areaCode": "440105", - "areaName": "海珠区" - }, - { - "areaCode": "440106", - "areaName": "天河区" - }, - { - "areaCode": "440111", - "areaName": "白云区" - }, - { - "areaCode": "440112", - "areaName": "黄埔区" - }, - { - "areaCode": "440113", - "areaName": "番禺区" - }, - { - "areaCode": "440114", - "areaName": "花都区" - }, - { - "areaCode": "440115", - "areaName": "南沙区" - }, - { - "areaCode": "440116", - "areaName": "萝岗区" - }, - { - "areaCode": "440117", - "areaName": "从化区" - }, - { - "areaCode": "440118", - "areaName": "增城区" - } - ] - }, - { - "cityCode": "440200", - "cityName": "韶关市", - "mallAreaList": [ - { - "areaCode": "440203", - "areaName": "武江区" - }, - { - "areaCode": "440204", - "areaName": "浈江区" - }, - { - "areaCode": "440205", - "areaName": "曲江区" - }, - { - "areaCode": "440222", - "areaName": "始兴县" - }, - { - "areaCode": "440224", - "areaName": "仁化县" - }, - { - "areaCode": "440229", - "areaName": "翁源县" - }, - { - "areaCode": "440232", - "areaName": "乳源瑶族自治县" - }, - { - "areaCode": "440233", - "areaName": "新丰县" - }, - { - "areaCode": "440281", - "areaName": "乐昌市" - }, - { - "areaCode": "440282", - "areaName": "南雄市" - } - ] - }, - { - "cityCode": "440300", - "cityName": "深圳市", - "mallAreaList": [ - { - "areaCode": "440303", - "areaName": "罗湖区" - }, - { - "areaCode": "440304", - "areaName": "福田区" - }, - { - "areaCode": "440305", - "areaName": "南山区" - }, - { - "areaCode": "440306", - "areaName": "宝安区" - }, - { - "areaCode": "440307", - "areaName": "龙岗区" - }, - { - "areaCode": "440308", - "areaName": "盐田区" - } - ] - }, - { - "cityCode": "440400", - "cityName": "珠海市", - "mallAreaList": [ - { - "areaCode": "440402", - "areaName": "香洲区" - }, - { - "areaCode": "440403", - "areaName": "斗门区" - }, - { - "areaCode": "440404", - "areaName": "金湾区" - } - ] - }, - { - "cityCode": "440500", - "cityName": "汕头市", - "mallAreaList": [ - { - "areaCode": "440507", - "areaName": "龙湖区" - }, - { - "areaCode": "440511", - "areaName": "金平区" - }, - { - "areaCode": "440512", - "areaName": "濠江区" - }, - { - "areaCode": "440513", - "areaName": "潮阳区" - }, - { - "areaCode": "440514", - "areaName": "潮南区" - }, - { - "areaCode": "440515", - "areaName": "澄海区" - }, - { - "areaCode": "440523", - "areaName": "南澳县" - } - ] - }, - { - "cityCode": "440600", - "cityName": "佛山市", - "mallAreaList": [ - { - "areaCode": "440604", - "areaName": "禅城区" - }, - { - "areaCode": "440605", - "areaName": "南海区" - }, - { - "areaCode": "440606", - "areaName": "顺德区" - }, - { - "areaCode": "440607", - "areaName": "三水区" - }, - { - "areaCode": "440608", - "areaName": "高明区" - } - ] - }, - { - "cityCode": "440700", - "cityName": "江门市", - "mallAreaList": [ - { - "areaCode": "440703", - "areaName": "蓬江区" - }, - { - "areaCode": "440704", - "areaName": "江海区" - }, - { - "areaCode": "440705", - "areaName": "新会区" - }, - { - "areaCode": "440781", - "areaName": "台山市" - }, - { - "areaCode": "440783", - "areaName": "开平市" - }, - { - "areaCode": "440784", - "areaName": "鹤山市" - }, - { - "areaCode": "440785", - "areaName": "恩平市" - } - ] - }, - { - "cityCode": "440800", - "cityName": "湛江市", - "mallAreaList": [ - { - "areaCode": "440802", - "areaName": "赤坎区" - }, - { - "areaCode": "440803", - "areaName": "霞山区" - }, - { - "areaCode": "440804", - "areaName": "坡头区" - }, - { - "areaCode": "440811", - "areaName": "麻章区" - }, - { - "areaCode": "440823", - "areaName": "遂溪县" - }, - { - "areaCode": "440825", - "areaName": "徐闻县" - }, - { - "areaCode": "440881", - "areaName": "廉江市" - }, - { - "areaCode": "440882", - "areaName": "雷州市" - }, - { - "areaCode": "440883", - "areaName": "吴川市" - } - ] - }, - { - "cityCode": "440900", - "cityName": "茂名市", - "mallAreaList": [ - { - "areaCode": "440902", - "areaName": "茂南区" - }, - { - "areaCode": "440904", - "areaName": "电白区" - }, - { - "areaCode": "440981", - "areaName": "高州市" - }, - { - "areaCode": "440982", - "areaName": "化州市" - }, - { - "areaCode": "440983", - "areaName": "信宜市" - } - ] - }, - { - "cityCode": "441200", - "cityName": "肇庆市", - "mallAreaList": [ - { - "areaCode": "441202", - "areaName": "端州区" - }, - { - "areaCode": "441203", - "areaName": "鼎湖区" - }, - { - "areaCode": "441223", - "areaName": "广宁县" - }, - { - "areaCode": "441224", - "areaName": "怀集县" - }, - { - "areaCode": "441225", - "areaName": "封开县" - }, - { - "areaCode": "441226", - "areaName": "德庆县" - }, - { - "areaCode": "441283", - "areaName": "高要市" - }, - { - "areaCode": "441284", - "areaName": "四会市" - } - ] - }, - { - "cityCode": "441300", - "cityName": "惠州市", - "mallAreaList": [ - { - "areaCode": "441302", - "areaName": "惠城区" - }, - { - "areaCode": "441303", - "areaName": "惠阳区" - }, - { - "areaCode": "441322", - "areaName": "博罗县" - }, - { - "areaCode": "441323", - "areaName": "惠东县" - }, - { - "areaCode": "441324", - "areaName": "龙门县" - } - ] - }, - { - "cityCode": "441400", - "cityName": "梅州市", - "mallAreaList": [ - { - "areaCode": "441402", - "areaName": "梅江区" - }, - { - "areaCode": "441403", - "areaName": "梅县区" - }, - { - "areaCode": "441422", - "areaName": "大埔县" - }, - { - "areaCode": "441423", - "areaName": "丰顺县" - }, - { - "areaCode": "441424", - "areaName": "五华县" - }, - { - "areaCode": "441426", - "areaName": "平远县" - }, - { - "areaCode": "441427", - "areaName": "蕉岭县" - }, - { - "areaCode": "441481", - "areaName": "兴宁市" - } - ] - }, - { - "cityCode": "441500", - "cityName": "汕尾市", - "mallAreaList": [ - { - "areaCode": "441502", - "areaName": "城区" - }, - { - "areaCode": "441521", - "areaName": "海丰县" - }, - { - "areaCode": "441523", - "areaName": "陆河县" - }, - { - "areaCode": "441581", - "areaName": "陆丰市" - } - ] - }, - { - "cityCode": "441600", - "cityName": "河源市", - "mallAreaList": [ - { - "areaCode": "441602", - "areaName": "源城区" - }, - { - "areaCode": "441621", - "areaName": "紫金县" - }, - { - "areaCode": "441622", - "areaName": "龙川县" - }, - { - "areaCode": "441623", - "areaName": "连平县" - }, - { - "areaCode": "441624", - "areaName": "和平县" - }, - { - "areaCode": "441625", - "areaName": "东源县" - } - ] - }, - { - "cityCode": "441700", - "cityName": "阳江市", - "mallAreaList": [ - { - "areaCode": "441702", - "areaName": "江城区" - }, - { - "areaCode": "441721", - "areaName": "阳西县" - }, - { - "areaCode": "441723", - "areaName": "阳东县" - }, - { - "areaCode": "441781", - "areaName": "阳春市" - } - ] - }, - { - "cityCode": "441800", - "cityName": "清远市", - "mallAreaList": [ - { - "areaCode": "441802", - "areaName": "清城区" - }, - { - "areaCode": "441803", - "areaName": "清新区" - }, - { - "areaCode": "441821", - "areaName": "佛冈县" - }, - { - "areaCode": "441823", - "areaName": "阳山县" - }, - { - "areaCode": "441825", - "areaName": "连山壮族瑶族自治县" - }, - { - "areaCode": "441826", - "areaName": "连南瑶族自治县" - }, - { - "areaCode": "441881", - "areaName": "英德市" - }, - { - "areaCode": "441882", - "areaName": "连州市" - } - ] - }, - { - "cityCode": "441900", - "cityName": "东莞市", - "mallAreaList": [ - { - "areaCode": "441900", - "areaName": "东莞市" - } - ] - }, - { - "cityCode": "442000", - "cityName": "中山市", - "mallAreaList": [ - { - "areaCode": "442000", - "areaName": "中山市" - } - ] - }, - { - "cityCode": "445100", - "cityName": "潮州市", - "mallAreaList": [ - { - "areaCode": "445102", - "areaName": "湘桥区" - }, - { - "areaCode": "445103", - "areaName": "潮安区" - }, - { - "areaCode": "445122", - "areaName": "饶平县" - } - ] - }, - { - "cityCode": "445200", - "cityName": "揭阳市", - "mallAreaList": [ - { - "areaCode": "445202", - "areaName": "榕城区" - }, - { - "areaCode": "445203", - "areaName": "揭东区" - }, - { - "areaCode": "445222", - "areaName": "揭西县" - }, - { - "areaCode": "445224", - "areaName": "惠来县" - }, - { - "areaCode": "445281", - "areaName": "普宁市" - } - ] - }, - { - "cityCode": "445300", - "cityName": "云浮市", - "mallAreaList": [ - { - "areaCode": "445302", - "areaName": "云城区" - }, - { - "areaCode": "445303", - "areaName": "云安区" - }, - { - "areaCode": "445321", - "areaName": "新兴县" - }, - { - "areaCode": "445322", - "areaName": "郁南县" - }, - { - "areaCode": "445381", - "areaName": "罗定市" - } - ] - } - ] - }, - { - "provinceCode": "450000", - "provinceName": "广西壮族自治区", - "mallCityList": [ - { - "cityCode": "450100", - "cityName": "南宁市", - "mallAreaList": [ - { - "areaCode": "450102", - "areaName": "兴宁区" - }, - { - "areaCode": "450103", - "areaName": "青秀区" - }, - { - "areaCode": "450105", - "areaName": "江南区" - }, - { - "areaCode": "450107", - "areaName": "西乡塘区" - }, - { - "areaCode": "450108", - "areaName": "良庆区" - }, - { - "areaCode": "450109", - "areaName": "邕宁区" - }, - { - "areaCode": "450122", - "areaName": "武鸣县" - }, - { - "areaCode": "450123", - "areaName": "隆安县" - }, - { - "areaCode": "450124", - "areaName": "马山县" - }, - { - "areaCode": "450125", - "areaName": "上林县" - }, - { - "areaCode": "450126", - "areaName": "宾阳县" - }, - { - "areaCode": "450127", - "areaName": "横县" - } - ] - }, - { - "cityCode": "450200", - "cityName": "柳州市", - "mallAreaList": [ - { - "areaCode": "450202", - "areaName": "城中区" - }, - { - "areaCode": "450203", - "areaName": "鱼峰区" - }, - { - "areaCode": "450204", - "areaName": "柳南区" - }, - { - "areaCode": "450205", - "areaName": "柳北区" - }, - { - "areaCode": "450221", - "areaName": "柳江县" - }, - { - "areaCode": "450222", - "areaName": "柳城县" - }, - { - "areaCode": "450223", - "areaName": "鹿寨县" - }, - { - "areaCode": "450224", - "areaName": "融安县" - }, - { - "areaCode": "450225", - "areaName": "融水苗族自治县" - }, - { - "areaCode": "450226", - "areaName": "三江侗族自治县" - } - ] - }, - { - "cityCode": "450300", - "cityName": "桂林市", - "mallAreaList": [ - { - "areaCode": "450302", - "areaName": "秀峰区" - }, - { - "areaCode": "450303", - "areaName": "叠彩区" - }, - { - "areaCode": "450304", - "areaName": "象山区" - }, - { - "areaCode": "450305", - "areaName": "七星区" - }, - { - "areaCode": "450311", - "areaName": "雁山区" - }, - { - "areaCode": "450312", - "areaName": "临桂区" - }, - { - "areaCode": "450321", - "areaName": "阳朔县" - }, - { - "areaCode": "450323", - "areaName": "灵川县" - }, - { - "areaCode": "450324", - "areaName": "全州县" - }, - { - "areaCode": "450325", - "areaName": "兴安县" - }, - { - "areaCode": "450326", - "areaName": "永福县" - }, - { - "areaCode": "450327", - "areaName": "灌阳县" - }, - { - "areaCode": "450328", - "areaName": "龙胜各族自治县" - }, - { - "areaCode": "450329", - "areaName": "资源县" - }, - { - "areaCode": "450330", - "areaName": "平乐县" - }, - { - "areaCode": "450331", - "areaName": "荔浦县" - }, - { - "areaCode": "450332", - "areaName": "恭城瑶族自治县" - } - ] - }, - { - "cityCode": "450400", - "cityName": "梧州市", - "mallAreaList": [ - { - "areaCode": "450403", - "areaName": "万秀区" - }, - { - "areaCode": "450405", - "areaName": "长洲区" - }, - { - "areaCode": "450406", - "areaName": "龙圩区" - }, - { - "areaCode": "450421", - "areaName": "苍梧县" - }, - { - "areaCode": "450422", - "areaName": "藤县" - }, - { - "areaCode": "450423", - "areaName": "蒙山县" - }, - { - "areaCode": "450481", - "areaName": "岑溪市" - } - ] - }, - { - "cityCode": "450500", - "cityName": "北海市", - "mallAreaList": [ - { - "areaCode": "450502", - "areaName": "海城区" - }, - { - "areaCode": "450503", - "areaName": "银海区" - }, - { - "areaCode": "450512", - "areaName": "铁山港区" - }, - { - "areaCode": "450521", - "areaName": "合浦县" - } - ] - }, - { - "cityCode": "450600", - "cityName": "防城港市", - "mallAreaList": [ - { - "areaCode": "450602", - "areaName": "港口区" - }, - { - "areaCode": "450603", - "areaName": "防城区" - }, - { - "areaCode": "450621", - "areaName": "上思县" - }, - { - "areaCode": "450681", - "areaName": "东兴市" - } - ] - }, - { - "cityCode": "450700", - "cityName": "钦州市", - "mallAreaList": [ - { - "areaCode": "450702", - "areaName": "钦南区" - }, - { - "areaCode": "450703", - "areaName": "钦北区" - }, - { - "areaCode": "450721", - "areaName": "灵山县" - }, - { - "areaCode": "450722", - "areaName": "浦北县" - } - ] - }, - { - "cityCode": "450800", - "cityName": "贵港市", - "mallAreaList": [ - { - "areaCode": "450802", - "areaName": "港北区" - }, - { - "areaCode": "450803", - "areaName": "港南区" - }, - { - "areaCode": "450804", - "areaName": "覃塘区" - }, - { - "areaCode": "450821", - "areaName": "平南县" - }, - { - "areaCode": "450881", - "areaName": "桂平市" - } - ] - }, - { - "cityCode": "450900", - "cityName": "玉林市", - "mallAreaList": [ - { - "areaCode": "450902", - "areaName": "玉州区" - }, - { - "areaCode": "450903", - "areaName": "福绵区" - }, - { - "areaCode": "450921", - "areaName": "容县" - }, - { - "areaCode": "450922", - "areaName": "陆川县" - }, - { - "areaCode": "450923", - "areaName": "博白县" - }, - { - "areaCode": "450924", - "areaName": "兴业县" - }, - { - "areaCode": "450981", - "areaName": "北流市" - } - ] - }, - { - "cityCode": "451000", - "cityName": "百色市", - "mallAreaList": [ - { - "areaCode": "451002", - "areaName": "右江区" - }, - { - "areaCode": "451021", - "areaName": "田阳县" - }, - { - "areaCode": "451022", - "areaName": "田东县" - }, - { - "areaCode": "451023", - "areaName": "平果县" - }, - { - "areaCode": "451024", - "areaName": "德保县" - }, - { - "areaCode": "451025", - "areaName": "靖西县" - }, - { - "areaCode": "451026", - "areaName": "那坡县" - }, - { - "areaCode": "451027", - "areaName": "凌云县" - }, - { - "areaCode": "451028", - "areaName": "乐业县" - }, - { - "areaCode": "451029", - "areaName": "田林县" - }, - { - "areaCode": "451030", - "areaName": "西林县" - }, - { - "areaCode": "451031", - "areaName": "隆林各族自治县" - } - ] - }, - { - "cityCode": "451100", - "cityName": "贺州市", - "mallAreaList": [ - { - "areaCode": "451102", - "areaName": "八步区" - }, - { - "areaCode": "451121", - "areaName": "昭平县" - }, - { - "areaCode": "451122", - "areaName": "钟山县" - }, - { - "areaCode": "451123", - "areaName": "富川瑶族自治县" - } - ] - }, - { - "cityCode": "451200", - "cityName": "河池市", - "mallAreaList": [ - { - "areaCode": "451202", - "areaName": "金城江区" - }, - { - "areaCode": "451221", - "areaName": "南丹县" - }, - { - "areaCode": "451222", - "areaName": "天峨县" - }, - { - "areaCode": "451223", - "areaName": "凤山县" - }, - { - "areaCode": "451224", - "areaName": "东兰县" - }, - { - "areaCode": "451225", - "areaName": "罗城仫佬族自治县" - }, - { - "areaCode": "451226", - "areaName": "环江毛南族自治县" - }, - { - "areaCode": "451227", - "areaName": "巴马瑶族自治县" - }, - { - "areaCode": "451228", - "areaName": "都安瑶族自治县" - }, - { - "areaCode": "451229", - "areaName": "大化瑶族自治县" - }, - { - "areaCode": "451281", - "areaName": "宜州市" - } - ] - }, - { - "cityCode": "451300", - "cityName": "来宾市", - "mallAreaList": [ - { - "areaCode": "451302", - "areaName": "兴宾区" - }, - { - "areaCode": "451321", - "areaName": "忻城县" - }, - { - "areaCode": "451322", - "areaName": "象州县" - }, - { - "areaCode": "451323", - "areaName": "武宣县" - }, - { - "areaCode": "451324", - "areaName": "金秀瑶族自治县" - }, - { - "areaCode": "451381", - "areaName": "合山市" - } - ] - }, - { - "cityCode": "451400", - "cityName": "崇左市", - "mallAreaList": [ - { - "areaCode": "451402", - "areaName": "江州区" - }, - { - "areaCode": "451421", - "areaName": "扶绥县" - }, - { - "areaCode": "451422", - "areaName": "宁明县" - }, - { - "areaCode": "451423", - "areaName": "龙州县" - }, - { - "areaCode": "451424", - "areaName": "大新县" - }, - { - "areaCode": "451425", - "areaName": "天等县" - }, - { - "areaCode": "451481", - "areaName": "凭祥市" - } - ] - } - ] - }, - { - "provinceCode": "460000", - "provinceName": "海南省", - "mallCityList": [ - { - "cityCode": "460100", - "cityName": "海口市", - "mallAreaList": [ - { - "areaCode": "460105", - "areaName": "秀英区" - }, - { - "areaCode": "460106", - "areaName": "龙华区" - }, - { - "areaCode": "460107", - "areaName": "琼山区" - }, - { - "areaCode": "460108", - "areaName": "美兰区" - } - ] - }, - { - "cityCode": "460200", - "cityName": "三亚市", - "mallAreaList": [ - { - "areaCode": "460202", - "areaName": "海棠区" - }, - { - "areaCode": "460203", - "areaName": "吉阳区" - }, - { - "areaCode": "460204", - "areaName": "天涯区" - }, - { - "areaCode": "460205", - "areaName": "崖州区" - } - ] - }, - { - "cityCode": "469000", - "cityName": "省直辖县级行政单位", - "mallAreaList": [ - { - "areaCode": "469001", - "areaName": "五指山市" - }, - { - "areaCode": "469002", - "areaName": "琼海市" - }, - { - "areaCode": "469003", - "areaName": "儋州市" - }, - { - "areaCode": "469005", - "areaName": "文昌市" - }, - { - "areaCode": "469006", - "areaName": "万宁市" - }, - { - "areaCode": "469007", - "areaName": "东方市" - }, - { - "areaCode": "469021", - "areaName": "定安县" - }, - { - "areaCode": "469022", - "areaName": "屯昌县" - }, - { - "areaCode": "469023", - "areaName": "澄迈县" - }, - { - "areaCode": "469024", - "areaName": "临高县" - }, - { - "areaCode": "469025", - "areaName": "白沙黎族自治县" - }, - { - "areaCode": "469026", - "areaName": "昌江黎族自治县" - }, - { - "areaCode": "469027", - "areaName": "乐东黎族自治县" - }, - { - "areaCode": "469028", - "areaName": "陵水黎族自治县" - }, - { - "areaCode": "469029", - "areaName": "保亭黎族苗族自治县" - }, - { - "areaCode": "469030", - "areaName": "琼中黎族苗族自治县" - } - ] - } - ] - }, - { - "provinceCode": "500000", - "provinceName": "重庆市", - "mallCityList": [ - { - "cityCode": "500100", - "cityName": "重庆市", - "mallAreaList": [ - { - "areaCode": "500101", - "areaName": "万州区" - }, - { - "areaCode": "500102", - "areaName": "涪陵区" - }, - { - "areaCode": "500103", - "areaName": "渝中区" - }, - { - "areaCode": "500104", - "areaName": "大渡口区" - }, - { - "areaCode": "500105", - "areaName": "江北区" - }, - { - "areaCode": "500106", - "areaName": "沙坪坝区" - }, - { - "areaCode": "500107", - "areaName": "九龙坡区" - }, - { - "areaCode": "500108", - "areaName": "南岸区" - }, - { - "areaCode": "500109", - "areaName": "北碚区" - }, - { - "areaCode": "500110", - "areaName": "綦江区" - }, - { - "areaCode": "500111", - "areaName": "大足区" - }, - { - "areaCode": "500112", - "areaName": "渝北区" - }, - { - "areaCode": "500113", - "areaName": "巴南区" - }, - { - "areaCode": "500114", - "areaName": "黔江区" - }, - { - "areaCode": "500115", - "areaName": "长寿区" - }, - { - "areaCode": "500116", - "areaName": "江津区" - }, - { - "areaCode": "500117", - "areaName": "合川区" - }, - { - "areaCode": "500118", - "areaName": "永川区" - }, - { - "areaCode": "500119", - "areaName": "南川区" - }, - { - "areaCode": "500120", - "areaName": "璧山区" - }, - { - "areaCode": "500151", - "areaName": "铜梁区" - } - ] - }, - { - "cityCode": "500200", - "cityName": "重庆市辖县", - "mallAreaList": [ - { - "areaCode": "500223", - "areaName": "潼南县" - }, - { - "areaCode": "500226", - "areaName": "荣昌县" - }, - { - "areaCode": "500228", - "areaName": "梁平县" - }, - { - "areaCode": "500229", - "areaName": "城口县" - }, - { - "areaCode": "500230", - "areaName": "丰都县" - }, - { - "areaCode": "500231", - "areaName": "垫江县" - }, - { - "areaCode": "500232", - "areaName": "武隆县" - }, - { - "areaCode": "500233", - "areaName": "忠县" - }, - { - "areaCode": "500234", - "areaName": "开县" - }, - { - "areaCode": "500235", - "areaName": "云阳县" - }, - { - "areaCode": "500236", - "areaName": "奉节县" - }, - { - "areaCode": "500237", - "areaName": "巫山县" - }, - { - "areaCode": "500238", - "areaName": "巫溪县" - }, - { - "areaCode": "500240", - "areaName": "石柱土家族自治县" - }, - { - "areaCode": "500241", - "areaName": "秀山土家族苗族自治县" - }, - { - "areaCode": "500242", - "areaName": "酉阳土家族苗族自治县" - }, - { - "areaCode": "500243", - "areaName": "彭水苗族土家族自治县" - } - ] - } - ] - }, - { - "provinceCode": "510000", - "provinceName": "四川省", - "mallCityList": [ - { - "cityCode": "510100", - "cityName": "成都市", - "mallAreaList": [ - { - "areaCode": "510104", - "areaName": "锦江区" - }, - { - "areaCode": "510105", - "areaName": "青羊区" - }, - { - "areaCode": "510106", - "areaName": "金牛区" - }, - { - "areaCode": "510107", - "areaName": "武侯区" - }, - { - "areaCode": "510108", - "areaName": "成华区" - }, - { - "areaCode": "510112", - "areaName": "龙泉驿区" - }, - { - "areaCode": "510113", - "areaName": "青白江区" - }, - { - "areaCode": "510114", - "areaName": "新都区" - }, - { - "areaCode": "510115", - "areaName": "温江区" - }, - { - "areaCode": "510121", - "areaName": "金堂县" - }, - { - "areaCode": "510122", - "areaName": "双流县" - }, - { - "areaCode": "510124", - "areaName": "郫县" - }, - { - "areaCode": "510129", - "areaName": "大邑县" - }, - { - "areaCode": "510131", - "areaName": "蒲江县" - }, - { - "areaCode": "510132", - "areaName": "新津县" - }, - { - "areaCode": "510181", - "areaName": "都江堰市" - }, - { - "areaCode": "510182", - "areaName": "彭州市" - }, - { - "areaCode": "510183", - "areaName": "邛崃市" - }, - { - "areaCode": "510184", - "areaName": "崇州市" - } - ] - }, - { - "cityCode": "510300", - "cityName": "自贡市", - "mallAreaList": [ - { - "areaCode": "510302", - "areaName": "自流井区" - }, - { - "areaCode": "510303", - "areaName": "贡井区" - }, - { - "areaCode": "510304", - "areaName": "大安区" - }, - { - "areaCode": "510311", - "areaName": "沿滩区" - }, - { - "areaCode": "510321", - "areaName": "荣县" - }, - { - "areaCode": "510322", - "areaName": "富顺县" - } - ] - }, - { - "cityCode": "510400", - "cityName": "攀枝花市", - "mallAreaList": [ - { - "areaCode": "510402", - "areaName": "东区" - }, - { - "areaCode": "510403", - "areaName": "西区" - }, - { - "areaCode": "510411", - "areaName": "仁和区" - }, - { - "areaCode": "510421", - "areaName": "米易县" - }, - { - "areaCode": "510422", - "areaName": "盐边县" - } - ] - }, - { - "cityCode": "510500", - "cityName": "泸州市", - "mallAreaList": [ - { - "areaCode": "510502", - "areaName": "江阳区" - }, - { - "areaCode": "510503", - "areaName": "纳溪区" - }, - { - "areaCode": "510504", - "areaName": "龙马潭区" - }, - { - "areaCode": "510521", - "areaName": "泸县" - }, - { - "areaCode": "510522", - "areaName": "合江县" - }, - { - "areaCode": "510524", - "areaName": "叙永县" - }, - { - "areaCode": "510525", - "areaName": "古蔺县" - } - ] - }, - { - "cityCode": "510600", - "cityName": "德阳市", - "mallAreaList": [ - { - "areaCode": "510603", - "areaName": "旌阳区" - }, - { - "areaCode": "510623", - "areaName": "中江县" - }, - { - "areaCode": "510626", - "areaName": "罗江县" - }, - { - "areaCode": "510681", - "areaName": "广汉市" - }, - { - "areaCode": "510682", - "areaName": "什邡市" - }, - { - "areaCode": "510683", - "areaName": "绵竹市" - } - ] - }, - { - "cityCode": "510700", - "cityName": "绵阳市", - "mallAreaList": [ - { - "areaCode": "510703", - "areaName": "涪城区" - }, - { - "areaCode": "510704", - "areaName": "游仙区" - }, - { - "areaCode": "510722", - "areaName": "三台县" - }, - { - "areaCode": "510723", - "areaName": "盐亭县" - }, - { - "areaCode": "510724", - "areaName": "安县" - }, - { - "areaCode": "510725", - "areaName": "梓潼县" - }, - { - "areaCode": "510726", - "areaName": "北川羌族自治县" - }, - { - "areaCode": "510727", - "areaName": "平武县" - }, - { - "areaCode": "510781", - "areaName": "江油市" - } - ] - }, - { - "cityCode": "510800", - "cityName": "广元市", - "mallAreaList": [ - { - "areaCode": "510802", - "areaName": "利州区" - }, - { - "areaCode": "510811", - "areaName": "昭化区" - }, - { - "areaCode": "510812", - "areaName": "朝天区" - }, - { - "areaCode": "510821", - "areaName": "旺苍县" - }, - { - "areaCode": "510822", - "areaName": "青川县" - }, - { - "areaCode": "510823", - "areaName": "剑阁县" - }, - { - "areaCode": "510824", - "areaName": "苍溪县" - } - ] - }, - { - "cityCode": "510900", - "cityName": "遂宁市", - "mallAreaList": [ - { - "areaCode": "510903", - "areaName": "船山区" - }, - { - "areaCode": "510904", - "areaName": "安居区" - }, - { - "areaCode": "510921", - "areaName": "蓬溪县" - }, - { - "areaCode": "510922", - "areaName": "射洪县" - }, - { - "areaCode": "510923", - "areaName": "大英县" - } - ] - }, - { - "cityCode": "511000", - "cityName": "内江市", - "mallAreaList": [ - { - "areaCode": "511002", - "areaName": "市中区" - }, - { - "areaCode": "511011", - "areaName": "东兴区" - }, - { - "areaCode": "511024", - "areaName": "威远县" - }, - { - "areaCode": "511025", - "areaName": "资中县" - }, - { - "areaCode": "511028", - "areaName": "隆昌县" - } - ] - }, - { - "cityCode": "511100", - "cityName": "乐山市", - "mallAreaList": [ - { - "areaCode": "511102", - "areaName": "市中区" - }, - { - "areaCode": "511111", - "areaName": "沙湾区" - }, - { - "areaCode": "511112", - "areaName": "五通桥区" - }, - { - "areaCode": "511113", - "areaName": "金口河区" - }, - { - "areaCode": "511123", - "areaName": "犍为县" - }, - { - "areaCode": "511124", - "areaName": "井研县" - }, - { - "areaCode": "511126", - "areaName": "夹江县" - }, - { - "areaCode": "511129", - "areaName": "沐川县" - }, - { - "areaCode": "511132", - "areaName": "峨边彝族自治县" - }, - { - "areaCode": "511133", - "areaName": "马边彝族自治县" - }, - { - "areaCode": "511181", - "areaName": "峨眉山市" - } - ] - }, - { - "cityCode": "511300", - "cityName": "南充市", - "mallAreaList": [ - { - "areaCode": "511302", - "areaName": "顺庆区" - }, - { - "areaCode": "511303", - "areaName": "高坪区" - }, - { - "areaCode": "511304", - "areaName": "嘉陵区" - }, - { - "areaCode": "511321", - "areaName": "南部县" - }, - { - "areaCode": "511322", - "areaName": "营山县" - }, - { - "areaCode": "511323", - "areaName": "蓬安县" - }, - { - "areaCode": "511324", - "areaName": "仪陇县" - }, - { - "areaCode": "511325", - "areaName": "西充县" - }, - { - "areaCode": "511381", - "areaName": "阆中市" - } - ] - }, - { - "cityCode": "511400", - "cityName": "眉山市", - "mallAreaList": [ - { - "areaCode": "511402", - "areaName": "东坡区" - }, - { - "areaCode": "511421", - "areaName": "仁寿县" - }, - { - "areaCode": "511422", - "areaName": "彭山县" - }, - { - "areaCode": "511423", - "areaName": "洪雅县" - }, - { - "areaCode": "511424", - "areaName": "丹棱县" - }, - { - "areaCode": "511425", - "areaName": "青神县" - } - ] - }, - { - "cityCode": "511500", - "cityName": "宜宾市", - "mallAreaList": [ - { - "areaCode": "511502", - "areaName": "翠屏区" - }, - { - "areaCode": "511503", - "areaName": "南溪区" - }, - { - "areaCode": "511521", - "areaName": "宜宾县" - }, - { - "areaCode": "511523", - "areaName": "江安县" - }, - { - "areaCode": "511524", - "areaName": "长宁县" - }, - { - "areaCode": "511525", - "areaName": "高县" - }, - { - "areaCode": "511526", - "areaName": "珙县" - }, - { - "areaCode": "511527", - "areaName": "筠连县" - }, - { - "areaCode": "511528", - "areaName": "兴文县" - }, - { - "areaCode": "511529", - "areaName": "屏山县" - } - ] - }, - { - "cityCode": "511600", - "cityName": "广安市", - "mallAreaList": [ - { - "areaCode": "511602", - "areaName": "广安区" - }, - { - "areaCode": "511603", - "areaName": "前锋区" - }, - { - "areaCode": "511621", - "areaName": "岳池县" - }, - { - "areaCode": "511622", - "areaName": "武胜县" - }, - { - "areaCode": "511623", - "areaName": "邻水县" - }, - { - "areaCode": "511681", - "areaName": "华蓥市" - } - ] - }, - { - "cityCode": "511700", - "cityName": "达州市", - "mallAreaList": [ - { - "areaCode": "511702", - "areaName": "通川区" - }, - { - "areaCode": "511703", - "areaName": "达川区" - }, - { - "areaCode": "511722", - "areaName": "宣汉县" - }, - { - "areaCode": "511723", - "areaName": "开江县" - }, - { - "areaCode": "511724", - "areaName": "大竹县" - }, - { - "areaCode": "511725", - "areaName": "渠县" - }, - { - "areaCode": "511781", - "areaName": "万源市" - } - ] - }, - { - "cityCode": "511800", - "cityName": "雅安市", - "mallAreaList": [ - { - "areaCode": "511802", - "areaName": "雨城区" - }, - { - "areaCode": "511803", - "areaName": "名山区" - }, - { - "areaCode": "511822", - "areaName": "荥经县" - }, - { - "areaCode": "511823", - "areaName": "汉源县" - }, - { - "areaCode": "511824", - "areaName": "石棉县" - }, - { - "areaCode": "511825", - "areaName": "天全县" - }, - { - "areaCode": "511826", - "areaName": "芦山县" - }, - { - "areaCode": "511827", - "areaName": "宝兴县" - } - ] - }, - { - "cityCode": "511900", - "cityName": "巴中市", - "mallAreaList": [ - { - "areaCode": "511902", - "areaName": "巴州区" - }, - { - "areaCode": "511903", - "areaName": "恩阳区" - }, - { - "areaCode": "511921", - "areaName": "通江县" - }, - { - "areaCode": "511922", - "areaName": "南江县" - }, - { - "areaCode": "511923", - "areaName": "平昌县" - } - ] - }, - { - "cityCode": "512000", - "cityName": "资阳市", - "mallAreaList": [ - { - "areaCode": "512002", - "areaName": "雁江区" - }, - { - "areaCode": "512021", - "areaName": "安岳县" - }, - { - "areaCode": "512022", - "areaName": "乐至县" - }, - { - "areaCode": "512081", - "areaName": "简阳市" - } - ] - }, - { - "cityCode": "513200", - "cityName": "阿坝藏族羌族自治州", - "mallAreaList": [ - { - "areaCode": "513221", - "areaName": "汶川县" - }, - { - "areaCode": "513222", - "areaName": "理县" - }, - { - "areaCode": "513223", - "areaName": "茂县" - }, - { - "areaCode": "513224", - "areaName": "松潘县" - }, - { - "areaCode": "513225", - "areaName": "九寨沟县" - }, - { - "areaCode": "513226", - "areaName": "金川县" - }, - { - "areaCode": "513227", - "areaName": "小金县" - }, - { - "areaCode": "513228", - "areaName": "黑水县" - }, - { - "areaCode": "513229", - "areaName": "马尔康县" - }, - { - "areaCode": "513230", - "areaName": "壤塘县" - }, - { - "areaCode": "513231", - "areaName": "阿坝县" - }, - { - "areaCode": "513232", - "areaName": "若尔盖县" - }, - { - "areaCode": "513233", - "areaName": "红原县" - } - ] - }, - { - "cityCode": "513300", - "cityName": "甘孜藏族自治州", - "mallAreaList": [ - { - "areaCode": "513321", - "areaName": "康定县" - }, - { - "areaCode": "513322", - "areaName": "泸定县" - }, - { - "areaCode": "513323", - "areaName": "丹巴县" - }, - { - "areaCode": "513324", - "areaName": "九龙县" - }, - { - "areaCode": "513325", - "areaName": "雅江县" - }, - { - "areaCode": "513326", - "areaName": "道孚县" - }, - { - "areaCode": "513327", - "areaName": "炉霍县" - }, - { - "areaCode": "513328", - "areaName": "甘孜县" - }, - { - "areaCode": "513329", - "areaName": "新龙县" - }, - { - "areaCode": "513330", - "areaName": "德格县" - }, - { - "areaCode": "513331", - "areaName": "白玉县" - }, - { - "areaCode": "513332", - "areaName": "石渠县" - }, - { - "areaCode": "513333", - "areaName": "色达县" - }, - { - "areaCode": "513334", - "areaName": "理塘县" - }, - { - "areaCode": "513335", - "areaName": "巴塘县" - }, - { - "areaCode": "513336", - "areaName": "乡城县" - }, - { - "areaCode": "513337", - "areaName": "稻城县" - }, - { - "areaCode": "513338", - "areaName": "得荣县" - } - ] - }, - { - "cityCode": "513400", - "cityName": "凉山彝族自治州", - "mallAreaList": [ - { - "areaCode": "513401", - "areaName": "西昌市" - }, - { - "areaCode": "513422", - "areaName": "木里藏族自治县" - }, - { - "areaCode": "513423", - "areaName": "盐源县" - }, - { - "areaCode": "513424", - "areaName": "德昌县" - }, - { - "areaCode": "513425", - "areaName": "会理县" - }, - { - "areaCode": "513426", - "areaName": "会东县" - }, - { - "areaCode": "513427", - "areaName": "宁南县" - }, - { - "areaCode": "513428", - "areaName": "普格县" - }, - { - "areaCode": "513429", - "areaName": "布拖县" - }, - { - "areaCode": "513430", - "areaName": "金阳县" - }, - { - "areaCode": "513431", - "areaName": "昭觉县" - }, - { - "areaCode": "513432", - "areaName": "喜德县" - }, - { - "areaCode": "513433", - "areaName": "冕宁县" - }, - { - "areaCode": "513434", - "areaName": "越西县" - }, - { - "areaCode": "513435", - "areaName": "甘洛县" - }, - { - "areaCode": "513436", - "areaName": "美姑县" - }, - { - "areaCode": "513437", - "areaName": "雷波县" - } - ] - } - ] - }, - { - "provinceCode": "520000", - "provinceName": "贵州省", - "mallCityList": [ - { - "cityCode": "520100", - "cityName": "贵阳市", - "mallAreaList": [ - { - "areaCode": "520102", - "areaName": "南明区" - }, - { - "areaCode": "520103", - "areaName": "云岩区" - }, - { - "areaCode": "520111", - "areaName": "花溪区" - }, - { - "areaCode": "520112", - "areaName": "乌当区" - }, - { - "areaCode": "520113", - "areaName": "白云区" - }, - { - "areaCode": "520115", - "areaName": "观山湖区" - }, - { - "areaCode": "520121", - "areaName": "开阳县" - }, - { - "areaCode": "520122", - "areaName": "息烽县" - }, - { - "areaCode": "520123", - "areaName": "修文县" - }, - { - "areaCode": "520181", - "areaName": "清镇市" - } - ] - }, - { - "cityCode": "520200", - "cityName": "六盘水市", - "mallAreaList": [ - { - "areaCode": "520201", - "areaName": "钟山区" - }, - { - "areaCode": "520203", - "areaName": "六枝特区" - }, - { - "areaCode": "520221", - "areaName": "水城县" - }, - { - "areaCode": "520222", - "areaName": "盘县" - } - ] - }, - { - "cityCode": "520300", - "cityName": "遵义市", - "mallAreaList": [ - { - "areaCode": "520302", - "areaName": "红花岗区" - }, - { - "areaCode": "520303", - "areaName": "汇川区" - }, - { - "areaCode": "520321", - "areaName": "遵义县" - }, - { - "areaCode": "520322", - "areaName": "桐梓县" - }, - { - "areaCode": "520323", - "areaName": "绥阳县" - }, - { - "areaCode": "520324", - "areaName": "正安县" - }, - { - "areaCode": "520325", - "areaName": "道真仡佬族苗族自治县" - }, - { - "areaCode": "520326", - "areaName": "务川仡佬族苗族自治县" - }, - { - "areaCode": "520327", - "areaName": "凤冈县" - }, - { - "areaCode": "520328", - "areaName": "湄潭县" - }, - { - "areaCode": "520329", - "areaName": "余庆县" - }, - { - "areaCode": "520330", - "areaName": "习水县" - }, - { - "areaCode": "520381", - "areaName": "赤水市" - }, - { - "areaCode": "520382", - "areaName": "仁怀市" - } - ] - }, - { - "cityCode": "520400", - "cityName": "安顺市", - "mallAreaList": [ - { - "areaCode": "520402", - "areaName": "西秀区" - }, - { - "areaCode": "520421", - "areaName": "平坝县" - }, - { - "areaCode": "520422", - "areaName": "普定县" - }, - { - "areaCode": "520423", - "areaName": "镇宁布依族苗族自治县" - }, - { - "areaCode": "520424", - "areaName": "关岭布依族苗族自治县" - }, - { - "areaCode": "520425", - "areaName": "紫云苗族布依族自治县" - } - ] - }, - { - "cityCode": "522200", - "cityName": "铜仁地区", - "mallAreaList": [ - { - "areaCode": "520602", - "areaName": "碧江区" - }, - { - "areaCode": "520603", - "areaName": "万山区" - }, - { - "areaCode": "520621", - "areaName": "江口县" - }, - { - "areaCode": "520622", - "areaName": "玉屏侗族自治县" - }, - { - "areaCode": "520623", - "areaName": "石阡县" - }, - { - "areaCode": "520624", - "areaName": "思南县" - }, - { - "areaCode": "520625", - "areaName": "印江土家族苗族自治县" - }, - { - "areaCode": "520626", - "areaName": "德江县" - }, - { - "areaCode": "520627", - "areaName": "沿河土家族自治县" - }, - { - "areaCode": "520628", - "areaName": "松桃苗族自治县" - }, - { - "areaCode": "522200", - "areaName": "铜仁地区" - } - ] - }, - { - "cityCode": "522300", - "cityName": "黔西南布依族苗族自治州", - "mallAreaList": [ - { - "areaCode": "522301", - "areaName": "兴义市" - }, - { - "areaCode": "522322", - "areaName": "兴仁县" - }, - { - "areaCode": "522323", - "areaName": "普安县" - }, - { - "areaCode": "522324", - "areaName": "晴隆县" - }, - { - "areaCode": "522325", - "areaName": "贞丰县" - }, - { - "areaCode": "522326", - "areaName": "望谟县" - }, - { - "areaCode": "522327", - "areaName": "册亨县" - }, - { - "areaCode": "522328", - "areaName": "安龙县" - } - ] - }, - { - "cityCode": "522400", - "cityName": "毕节地区", - "mallAreaList": [ - { - "areaCode": "520502", - "areaName": "七星关区" - }, - { - "areaCode": "520521", - "areaName": "大方县" - }, - { - "areaCode": "520522", - "areaName": "黔西县" - }, - { - "areaCode": "520523", - "areaName": "金沙县" - }, - { - "areaCode": "520524", - "areaName": "织金县" - }, - { - "areaCode": "520525", - "areaName": "纳雍县" - }, - { - "areaCode": "520526", - "areaName": "威宁彝族回族苗族自治县" - }, - { - "areaCode": "520527", - "areaName": "赫章县" - }, - { - "areaCode": "522400", - "areaName": "毕节地区" - } - ] - }, - { - "cityCode": "522600", - "cityName": "黔东南苗族侗族自治州", - "mallAreaList": [ - { - "areaCode": "522601", - "areaName": "凯里市" - }, - { - "areaCode": "522622", - "areaName": "黄平县" - }, - { - "areaCode": "522623", - "areaName": "施秉县" - }, - { - "areaCode": "522624", - "areaName": "三穗县" - }, - { - "areaCode": "522625", - "areaName": "镇远县" - }, - { - "areaCode": "522626", - "areaName": "岑巩县" - }, - { - "areaCode": "522627", - "areaName": "天柱县" - }, - { - "areaCode": "522628", - "areaName": "锦屏县" - }, - { - "areaCode": "522629", - "areaName": "剑河县" - }, - { - "areaCode": "522630", - "areaName": "台江县" - }, - { - "areaCode": "522631", - "areaName": "黎平县" - }, - { - "areaCode": "522632", - "areaName": "榕江县" - }, - { - "areaCode": "522633", - "areaName": "从江县" - }, - { - "areaCode": "522634", - "areaName": "雷山县" - }, - { - "areaCode": "522635", - "areaName": "麻江县" - }, - { - "areaCode": "522636", - "areaName": "丹寨县" - } - ] - }, - { - "cityCode": "522700", - "cityName": "黔南布依族苗族自治州", - "mallAreaList": [ - { - "areaCode": "522701", - "areaName": "都匀市" - }, - { - "areaCode": "522702", - "areaName": "福泉市" - }, - { - "areaCode": "522722", - "areaName": "荔波县" - }, - { - "areaCode": "522723", - "areaName": "贵定县" - }, - { - "areaCode": "522725", - "areaName": "瓮安县" - }, - { - "areaCode": "522726", - "areaName": "独山县" - }, - { - "areaCode": "522727", - "areaName": "平塘县" - }, - { - "areaCode": "522728", - "areaName": "罗甸县" - }, - { - "areaCode": "522729", - "areaName": "长顺县" - }, - { - "areaCode": "522730", - "areaName": "龙里县" - }, - { - "areaCode": "522731", - "areaName": "惠水县" - }, - { - "areaCode": "522732", - "areaName": "三都水族自治县" - } - ] - } - ] - }, - { - "provinceCode": "530000", - "provinceName": "云南省", - "mallCityList": [ - { - "cityCode": "530100", - "cityName": "昆明市", - "mallAreaList": [ - { - "areaCode": "530102", - "areaName": "五华区" - }, - { - "areaCode": "530103", - "areaName": "盘龙区" - }, - { - "areaCode": "530111", - "areaName": "官渡区" - }, - { - "areaCode": "530112", - "areaName": "西山区" - }, - { - "areaCode": "530113", - "areaName": "东川区" - }, - { - "areaCode": "530114", - "areaName": "呈贡区" - }, - { - "areaCode": "530122", - "areaName": "晋宁县" - }, - { - "areaCode": "530124", - "areaName": "富民县" - }, - { - "areaCode": "530125", - "areaName": "宜良县" - }, - { - "areaCode": "530126", - "areaName": "石林彝族自治县" - }, - { - "areaCode": "530127", - "areaName": "嵩明县" - }, - { - "areaCode": "530128", - "areaName": "禄劝彝族苗族自治县" - }, - { - "areaCode": "530129", - "areaName": "寻甸回族彝族自治县" - }, - { - "areaCode": "530181", - "areaName": "安宁市" - } - ] - }, - { - "cityCode": "530300", - "cityName": "曲靖市", - "mallAreaList": [ - { - "areaCode": "530302", - "areaName": "麒麟区" - }, - { - "areaCode": "530321", - "areaName": "马龙县" - }, - { - "areaCode": "530322", - "areaName": "陆良县" - }, - { - "areaCode": "530323", - "areaName": "师宗县" - }, - { - "areaCode": "530324", - "areaName": "罗平县" - }, - { - "areaCode": "530325", - "areaName": "富源县" - }, - { - "areaCode": "530326", - "areaName": "会泽县" - }, - { - "areaCode": "530328", - "areaName": "沾益县" - }, - { - "areaCode": "530381", - "areaName": "宣威市" - } - ] - }, - { - "cityCode": "530400", - "cityName": "玉溪市", - "mallAreaList": [ - { - "areaCode": "530402", - "areaName": "红塔区" - }, - { - "areaCode": "530421", - "areaName": "江川县" - }, - { - "areaCode": "530422", - "areaName": "澄江县" - }, - { - "areaCode": "530423", - "areaName": "通海县" - }, - { - "areaCode": "530424", - "areaName": "华宁县" - }, - { - "areaCode": "530425", - "areaName": "易门县" - }, - { - "areaCode": "530426", - "areaName": "峨山彝族自治县" - }, - { - "areaCode": "530427", - "areaName": "新平彝族傣族自治县" - }, - { - "areaCode": "530428", - "areaName": "元江哈尼族彝族傣族自治县" - } - ] - }, - { - "cityCode": "530500", - "cityName": "保山市", - "mallAreaList": [ - { - "areaCode": "530502", - "areaName": "隆阳区" - }, - { - "areaCode": "530521", - "areaName": "施甸县" - }, - { - "areaCode": "530522", - "areaName": "腾冲县" - }, - { - "areaCode": "530523", - "areaName": "龙陵县" - }, - { - "areaCode": "530524", - "areaName": "昌宁县" - } - ] - }, - { - "cityCode": "530600", - "cityName": "昭通市", - "mallAreaList": [ - { - "areaCode": "530602", - "areaName": "昭阳区" - }, - { - "areaCode": "530621", - "areaName": "鲁甸县" - }, - { - "areaCode": "530622", - "areaName": "巧家县" - }, - { - "areaCode": "530623", - "areaName": "盐津县" - }, - { - "areaCode": "530624", - "areaName": "大关县" - }, - { - "areaCode": "530625", - "areaName": "永善县" - }, - { - "areaCode": "530626", - "areaName": "绥江县" - }, - { - "areaCode": "530627", - "areaName": "镇雄县" - }, - { - "areaCode": "530628", - "areaName": "彝良县" - }, - { - "areaCode": "530629", - "areaName": "威信县" - }, - { - "areaCode": "530630", - "areaName": "水富县" - } - ] - }, - { - "cityCode": "530700", - "cityName": "丽江市", - "mallAreaList": [ - { - "areaCode": "530702", - "areaName": "古城区" - }, - { - "areaCode": "530721", - "areaName": "玉龙纳西族自治县" - }, - { - "areaCode": "530722", - "areaName": "永胜县" - }, - { - "areaCode": "530723", - "areaName": "华坪县" - }, - { - "areaCode": "530724", - "areaName": "宁蒗彝族自治县" - } - ] - }, - { - "cityCode": "530800", - "cityName": "思茅市", - "mallAreaList": [ - { - "areaCode": "530802", - "areaName": "思茅区" - }, - { - "areaCode": "530821", - "areaName": "宁洱哈尼族彝族自治县" - }, - { - "areaCode": "530822", - "areaName": "墨江哈尼族自治县" - }, - { - "areaCode": "530823", - "areaName": "景东彝族自治县" - }, - { - "areaCode": "530824", - "areaName": "景谷傣族彝族自治县" - }, - { - "areaCode": "530825", - "areaName": "镇沅彝族哈尼族拉祜族自治县" - }, - { - "areaCode": "530826", - "areaName": "江城哈尼族彝族自治县" - }, - { - "areaCode": "530827", - "areaName": "孟连傣族拉祜族佤族自治县" - }, - { - "areaCode": "530828", - "areaName": "澜沧拉祜族自治县" - }, - { - "areaCode": "530829", - "areaName": "西盟佤族自治县" - } - ] - }, - { - "cityCode": "530900", - "cityName": "临沧市", - "mallAreaList": [ - { - "areaCode": "530902", - "areaName": "临翔区" - }, - { - "areaCode": "530921", - "areaName": "凤庆县" - }, - { - "areaCode": "530922", - "areaName": "云县" - }, - { - "areaCode": "530923", - "areaName": "永德县" - }, - { - "areaCode": "530924", - "areaName": "镇康县" - }, - { - "areaCode": "530925", - "areaName": "双江拉祜族佤族布朗族傣族自治县" - }, - { - "areaCode": "530926", - "areaName": "耿马傣族佤族自治县" - }, - { - "areaCode": "530927", - "areaName": "沧源佤族自治县" - } - ] - }, - { - "cityCode": "532300", - "cityName": "楚雄彝族自治州", - "mallAreaList": [ - { - "areaCode": "532301", - "areaName": "楚雄市" - }, - { - "areaCode": "532322", - "areaName": "双柏县" - }, - { - "areaCode": "532323", - "areaName": "牟定县" - }, - { - "areaCode": "532324", - "areaName": "南华县" - }, - { - "areaCode": "532325", - "areaName": "姚安县" - }, - { - "areaCode": "532326", - "areaName": "大姚县" - }, - { - "areaCode": "532327", - "areaName": "永仁县" - }, - { - "areaCode": "532328", - "areaName": "元谋县" - }, - { - "areaCode": "532329", - "areaName": "武定县" - }, - { - "areaCode": "532331", - "areaName": "禄丰县" - } - ] - }, - { - "cityCode": "532500", - "cityName": "红河哈尼族彝族自治州", - "mallAreaList": [ - { - "areaCode": "532501", - "areaName": "个旧市" - }, - { - "areaCode": "532502", - "areaName": "开远市" - }, - { - "areaCode": "532503", - "areaName": "蒙自市" - }, - { - "areaCode": "532504", - "areaName": "弥勒市" - }, - { - "areaCode": "532523", - "areaName": "屏边苗族自治县" - }, - { - "areaCode": "532524", - "areaName": "建水县" - }, - { - "areaCode": "532525", - "areaName": "石屏县" - }, - { - "areaCode": "532527", - "areaName": "泸西县" - }, - { - "areaCode": "532528", - "areaName": "元阳县" - }, - { - "areaCode": "532529", - "areaName": "红河县" - }, - { - "areaCode": "532530", - "areaName": "金平苗族瑶族傣族自治县" - }, - { - "areaCode": "532531", - "areaName": "绿春县" - }, - { - "areaCode": "532532", - "areaName": "河口瑶族自治县" - } - ] - }, - { - "cityCode": "532600", - "cityName": "文山壮族苗族自治州", - "mallAreaList": [ - { - "areaCode": "532601", - "areaName": "文山市" - }, - { - "areaCode": "532622", - "areaName": "砚山县" - }, - { - "areaCode": "532623", - "areaName": "西畴县" - }, - { - "areaCode": "532624", - "areaName": "麻栗坡县" - }, - { - "areaCode": "532625", - "areaName": "马关县" - }, - { - "areaCode": "532626", - "areaName": "丘北县" - }, - { - "areaCode": "532627", - "areaName": "广南县" - }, - { - "areaCode": "532628", - "areaName": "富宁县" - } - ] - }, - { - "cityCode": "532800", - "cityName": "西双版纳傣族自治州", - "mallAreaList": [ - { - "areaCode": "532801", - "areaName": "景洪市" - }, - { - "areaCode": "532822", - "areaName": "勐海县" - }, - { - "areaCode": "532823", - "areaName": "勐腊县" - } - ] - }, - { - "cityCode": "532900", - "cityName": "大理白族自治州", - "mallAreaList": [ - { - "areaCode": "532901", - "areaName": "大理市" - }, - { - "areaCode": "532922", - "areaName": "漾濞彝族自治县" - }, - { - "areaCode": "532923", - "areaName": "祥云县" - }, - { - "areaCode": "532924", - "areaName": "宾川县" - }, - { - "areaCode": "532925", - "areaName": "弥渡县" - }, - { - "areaCode": "532926", - "areaName": "南涧彝族自治县" - }, - { - "areaCode": "532927", - "areaName": "巍山彝族回族自治县" - }, - { - "areaCode": "532928", - "areaName": "永平县" - }, - { - "areaCode": "532929", - "areaName": "云龙县" - }, - { - "areaCode": "532930", - "areaName": "洱源县" - }, - { - "areaCode": "532931", - "areaName": "剑川县" - }, - { - "areaCode": "532932", - "areaName": "鹤庆县" - } - ] - }, - { - "cityCode": "533100", - "cityName": "德宏傣族景颇族自治州", - "mallAreaList": [ - { - "areaCode": "533102", - "areaName": "瑞丽市" - }, - { - "areaCode": "533103", - "areaName": "芒市" - }, - { - "areaCode": "533122", - "areaName": "梁河县" - }, - { - "areaCode": "533123", - "areaName": "盈江县" - }, - { - "areaCode": "533124", - "areaName": "陇川县" - } - ] - }, - { - "cityCode": "533300", - "cityName": "怒江傈僳族自治州", - "mallAreaList": [ - { - "areaCode": "533321", - "areaName": "泸水县" - }, - { - "areaCode": "533323", - "areaName": "福贡县" - }, - { - "areaCode": "533324", - "areaName": "贡山独龙族怒族自治县" - }, - { - "areaCode": "533325", - "areaName": "兰坪白族普米族自治县" - } - ] - }, - { - "cityCode": "533400", - "cityName": "迪庆藏族自治州", - "mallAreaList": [ - { - "areaCode": "533421", - "areaName": "香格里拉县" - }, - { - "areaCode": "533422", - "areaName": "德钦县" - }, - { - "areaCode": "533423", - "areaName": "维西傈僳族自治县" - } - ] - } - ] - }, - { - "provinceCode": "540000", - "provinceName": "西藏自治区", - "mallCityList": [ - { - "cityCode": "540100", - "cityName": "拉萨市", - "mallAreaList": [ - { - "areaCode": "540102", - "areaName": "城关区" - }, - { - "areaCode": "540121", - "areaName": "林周县" - }, - { - "areaCode": "540122", - "areaName": "当雄县" - }, - { - "areaCode": "540123", - "areaName": "尼木县" - }, - { - "areaCode": "540124", - "areaName": "曲水县" - }, - { - "areaCode": "540125", - "areaName": "堆龙德庆县" - }, - { - "areaCode": "540126", - "areaName": "达孜县" - }, - { - "areaCode": "540127", - "areaName": "墨竹工卡县" - } - ] - }, - { - "cityCode": "542100", - "cityName": "昌都地区", - "mallAreaList": [ - { - "areaCode": "542121", - "areaName": "昌都县" - }, - { - "areaCode": "542122", - "areaName": "江达县" - }, - { - "areaCode": "542123", - "areaName": "贡觉县" - }, - { - "areaCode": "542124", - "areaName": "类乌齐县" - }, - { - "areaCode": "542125", - "areaName": "丁青县" - }, - { - "areaCode": "542126", - "areaName": "察雅县" - }, - { - "areaCode": "542127", - "areaName": "八宿县" - }, - { - "areaCode": "542128", - "areaName": "左贡县" - }, - { - "areaCode": "542129", - "areaName": "芒康县" - }, - { - "areaCode": "542132", - "areaName": "洛隆县" - }, - { - "areaCode": "542133", - "areaName": "边坝县" - } - ] - }, - { - "cityCode": "542200", - "cityName": "山南地区", - "mallAreaList": [ - { - "areaCode": "542221", - "areaName": "乃东县" - }, - { - "areaCode": "542222", - "areaName": "扎囊县" - }, - { - "areaCode": "542223", - "areaName": "贡嘎县" - }, - { - "areaCode": "542224", - "areaName": "桑日县" - }, - { - "areaCode": "542225", - "areaName": "琼结县" - }, - { - "areaCode": "542226", - "areaName": "曲松县" - }, - { - "areaCode": "542227", - "areaName": "措美县" - }, - { - "areaCode": "542228", - "areaName": "洛扎县" - }, - { - "areaCode": "542229", - "areaName": "加查县" - }, - { - "areaCode": "542231", - "areaName": "隆子县" - }, - { - "areaCode": "542232", - "areaName": "错那县" - }, - { - "areaCode": "542233", - "areaName": "浪卡子县" - } - ] - }, - { - "cityCode": "542300", - "cityName": "日喀则地区", - "mallAreaList": [ - { - "areaCode": "540202", - "areaName": "桑珠孜区" - }, - { - "areaCode": "540221", - "areaName": "南木林县" - }, - { - "areaCode": "540222", - "areaName": "江孜县" - }, - { - "areaCode": "540223", - "areaName": "定日县" - }, - { - "areaCode": "540224", - "areaName": "萨迦县" - }, - { - "areaCode": "540225", - "areaName": "拉孜县" - }, - { - "areaCode": "540226", - "areaName": "昂仁县" - }, - { - "areaCode": "540227", - "areaName": "谢通门县" - }, - { - "areaCode": "540228", - "areaName": "白朗县" - }, - { - "areaCode": "540229", - "areaName": "仁布县" - }, - { - "areaCode": "540230", - "areaName": "康马县" - }, - { - "areaCode": "540231", - "areaName": "定结县" - }, - { - "areaCode": "540232", - "areaName": "仲巴县" - }, - { - "areaCode": "540233", - "areaName": "亚东县" - }, - { - "areaCode": "540234", - "areaName": "吉隆县" - }, - { - "areaCode": "540235", - "areaName": "聂拉木县" - }, - { - "areaCode": "540236", - "areaName": "萨嘎县" - }, - { - "areaCode": "540237", - "areaName": "岗巴县" - }, - { - "areaCode": "542300", - "areaName": "日喀则地区" - } - ] - }, - { - "cityCode": "542400", - "cityName": "那曲地区", - "mallAreaList": [ - { - "areaCode": "542421", - "areaName": "那曲县" - }, - { - "areaCode": "542422", - "areaName": "嘉黎县" - }, - { - "areaCode": "542423", - "areaName": "比如县" - }, - { - "areaCode": "542424", - "areaName": "聂荣县" - }, - { - "areaCode": "542425", - "areaName": "安多县" - }, - { - "areaCode": "542426", - "areaName": "申扎县" - }, - { - "areaCode": "542427", - "areaName": "索县" - }, - { - "areaCode": "542428", - "areaName": "班戈县" - }, - { - "areaCode": "542429", - "areaName": "巴青县" - }, - { - "areaCode": "542430", - "areaName": "尼玛县" - }, - { - "areaCode": "542431", - "areaName": "双湖县" - } - ] - }, - { - "cityCode": "542500", - "cityName": "阿里地区", - "mallAreaList": [ - { - "areaCode": "542521", - "areaName": "普兰县" - }, - { - "areaCode": "542522", - "areaName": "札达县" - }, - { - "areaCode": "542523", - "areaName": "噶尔县" - }, - { - "areaCode": "542524", - "areaName": "日土县" - }, - { - "areaCode": "542525", - "areaName": "革吉县" - }, - { - "areaCode": "542526", - "areaName": "改则县" - }, - { - "areaCode": "542527", - "areaName": "措勤县" - } - ] - }, - { - "cityCode": "542600", - "cityName": "林芝地区", - "mallAreaList": [ - { - "areaCode": "542621", - "areaName": "林芝县" - }, - { - "areaCode": "542622", - "areaName": "工布江达县" - }, - { - "areaCode": "542623", - "areaName": "米林县" - }, - { - "areaCode": "542624", - "areaName": "墨脱县" - }, - { - "areaCode": "542625", - "areaName": "波密县" - }, - { - "areaCode": "542626", - "areaName": "察隅县" - }, - { - "areaCode": "542627", - "areaName": "朗县" - } - ] - } - ] - }, - { - "provinceCode": "610000", - "provinceName": "陕西省", - "mallCityList": [ - { - "cityCode": "610100", - "cityName": "西安市", - "mallAreaList": [ - { - "areaCode": "610102", - "areaName": "新城区" - }, - { - "areaCode": "610103", - "areaName": "碑林区" - }, - { - "areaCode": "610104", - "areaName": "莲湖区" - }, - { - "areaCode": "610111", - "areaName": "灞桥区" - }, - { - "areaCode": "610112", - "areaName": "未央区" - }, - { - "areaCode": "610113", - "areaName": "雁塔区" - }, - { - "areaCode": "610114", - "areaName": "阎良区" - }, - { - "areaCode": "610115", - "areaName": "临潼区" - }, - { - "areaCode": "610116", - "areaName": "长安区" - }, - { - "areaCode": "610122", - "areaName": "蓝田县" - }, - { - "areaCode": "610124", - "areaName": "周至县" - }, - { - "areaCode": "610125", - "areaName": "户县" - }, - { - "areaCode": "610126", - "areaName": "高陵县" - } - ] - }, - { - "cityCode": "610200", - "cityName": "铜川市", - "mallAreaList": [ - { - "areaCode": "610202", - "areaName": "王益区" - }, - { - "areaCode": "610203", - "areaName": "印台区" - }, - { - "areaCode": "610204", - "areaName": "耀州区" - }, - { - "areaCode": "610222", - "areaName": "宜君县" - } - ] - }, - { - "cityCode": "610300", - "cityName": "宝鸡市", - "mallAreaList": [ - { - "areaCode": "610302", - "areaName": "渭滨区" - }, - { - "areaCode": "610303", - "areaName": "金台区" - }, - { - "areaCode": "610304", - "areaName": "陈仓区" - }, - { - "areaCode": "610322", - "areaName": "凤翔县" - }, - { - "areaCode": "610323", - "areaName": "岐山县" - }, - { - "areaCode": "610324", - "areaName": "扶风县" - }, - { - "areaCode": "610326", - "areaName": "眉县" - }, - { - "areaCode": "610327", - "areaName": "陇县" - }, - { - "areaCode": "610328", - "areaName": "千阳县" - }, - { - "areaCode": "610329", - "areaName": "麟游县" - }, - { - "areaCode": "610330", - "areaName": "凤县" - }, - { - "areaCode": "610331", - "areaName": "太白县" - } - ] - }, - { - "cityCode": "610400", - "cityName": "咸阳市", - "mallAreaList": [ - { - "areaCode": "610402", - "areaName": "秦都区" - }, - { - "areaCode": "610403", - "areaName": "杨陵区" - }, - { - "areaCode": "610404", - "areaName": "渭城区" - }, - { - "areaCode": "610422", - "areaName": "三原县" - }, - { - "areaCode": "610423", - "areaName": "泾阳县" - }, - { - "areaCode": "610424", - "areaName": "乾县" - }, - { - "areaCode": "610425", - "areaName": "礼泉县" - }, - { - "areaCode": "610426", - "areaName": "永寿县" - }, - { - "areaCode": "610427", - "areaName": "彬县" - }, - { - "areaCode": "610428", - "areaName": "长武县" - }, - { - "areaCode": "610429", - "areaName": "旬邑县" - }, - { - "areaCode": "610430", - "areaName": "淳化县" - }, - { - "areaCode": "610431", - "areaName": "武功县" - }, - { - "areaCode": "610481", - "areaName": "兴平市" - } - ] - }, - { - "cityCode": "610500", - "cityName": "渭南市", - "mallAreaList": [ - { - "areaCode": "610502", - "areaName": "临渭区" - }, - { - "areaCode": "610521", - "areaName": "华县" - }, - { - "areaCode": "610522", - "areaName": "潼关县" - }, - { - "areaCode": "610523", - "areaName": "大荔县" - }, - { - "areaCode": "610524", - "areaName": "合阳县" - }, - { - "areaCode": "610525", - "areaName": "澄城县" - }, - { - "areaCode": "610526", - "areaName": "蒲城县" - }, - { - "areaCode": "610527", - "areaName": "白水县" - }, - { - "areaCode": "610528", - "areaName": "富平县" - }, - { - "areaCode": "610581", - "areaName": "韩城市" - }, - { - "areaCode": "610582", - "areaName": "华阴市" - } - ] - }, - { - "cityCode": "610600", - "cityName": "延安市", - "mallAreaList": [ - { - "areaCode": "610602", - "areaName": "宝塔区" - }, - { - "areaCode": "610621", - "areaName": "延长县" - }, - { - "areaCode": "610622", - "areaName": "延川县" - }, - { - "areaCode": "610623", - "areaName": "子长县" - }, - { - "areaCode": "610624", - "areaName": "安塞县" - }, - { - "areaCode": "610625", - "areaName": "志丹县" - }, - { - "areaCode": "610626", - "areaName": "吴起县" - }, - { - "areaCode": "610627", - "areaName": "甘泉县" - }, - { - "areaCode": "610628", - "areaName": "富县" - }, - { - "areaCode": "610629", - "areaName": "洛川县" - }, - { - "areaCode": "610630", - "areaName": "宜川县" - }, - { - "areaCode": "610631", - "areaName": "黄龙县" - }, - { - "areaCode": "610632", - "areaName": "黄陵县" - } - ] - }, - { - "cityCode": "610700", - "cityName": "汉中市", - "mallAreaList": [ - { - "areaCode": "610702", - "areaName": "汉台区" - }, - { - "areaCode": "610721", - "areaName": "南郑县" - }, - { - "areaCode": "610722", - "areaName": "城固县" - }, - { - "areaCode": "610723", - "areaName": "洋县" - }, - { - "areaCode": "610724", - "areaName": "西乡县" - }, - { - "areaCode": "610725", - "areaName": "勉县" - }, - { - "areaCode": "610726", - "areaName": "宁强县" - }, - { - "areaCode": "610727", - "areaName": "略阳县" - }, - { - "areaCode": "610728", - "areaName": "镇巴县" - }, - { - "areaCode": "610729", - "areaName": "留坝县" - }, - { - "areaCode": "610730", - "areaName": "佛坪县" - } - ] - }, - { - "cityCode": "610800", - "cityName": "榆林市", - "mallAreaList": [ - { - "areaCode": "610802", - "areaName": "榆阳区" - }, - { - "areaCode": "610821", - "areaName": "神木县" - }, - { - "areaCode": "610822", - "areaName": "府谷县" - }, - { - "areaCode": "610823", - "areaName": "横山县" - }, - { - "areaCode": "610824", - "areaName": "靖边县" - }, - { - "areaCode": "610825", - "areaName": "定边县" - }, - { - "areaCode": "610826", - "areaName": "绥德县" - }, - { - "areaCode": "610827", - "areaName": "米脂县" - }, - { - "areaCode": "610828", - "areaName": "佳县" - }, - { - "areaCode": "610829", - "areaName": "吴堡县" - }, - { - "areaCode": "610830", - "areaName": "清涧县" - }, - { - "areaCode": "610831", - "areaName": "子洲县" - } - ] - }, - { - "cityCode": "610900", - "cityName": "安康市", - "mallAreaList": [ - { - "areaCode": "610902", - "areaName": "汉滨区" - }, - { - "areaCode": "610921", - "areaName": "汉阴县" - }, - { - "areaCode": "610922", - "areaName": "石泉县" - }, - { - "areaCode": "610923", - "areaName": "宁陕县" - }, - { - "areaCode": "610924", - "areaName": "紫阳县" - }, - { - "areaCode": "610925", - "areaName": "岚皋县" - }, - { - "areaCode": "610926", - "areaName": "平利县" - }, - { - "areaCode": "610927", - "areaName": "镇坪县" - }, - { - "areaCode": "610928", - "areaName": "旬阳县" - }, - { - "areaCode": "610929", - "areaName": "白河县" - } - ] - }, - { - "cityCode": "611000", - "cityName": "商洛市", - "mallAreaList": [ - { - "areaCode": "611002", - "areaName": "商州区" - }, - { - "areaCode": "611021", - "areaName": "洛南县" - }, - { - "areaCode": "611022", - "areaName": "丹凤县" - }, - { - "areaCode": "611023", - "areaName": "商南县" - }, - { - "areaCode": "611024", - "areaName": "山阳县" - }, - { - "areaCode": "611025", - "areaName": "镇安县" - }, - { - "areaCode": "611026", - "areaName": "柞水县" - } - ] - } - ] - }, - { - "provinceCode": "620000", - "provinceName": "甘肃省", - "mallCityList": [ - { - "cityCode": "620100", - "cityName": "兰州市", - "mallAreaList": [ - { - "areaCode": "620102", - "areaName": "城关区" - }, - { - "areaCode": "620103", - "areaName": "七里河区" - }, - { - "areaCode": "620104", - "areaName": "西固区" - }, - { - "areaCode": "620105", - "areaName": "安宁区" - }, - { - "areaCode": "620111", - "areaName": "红古区" - }, - { - "areaCode": "620121", - "areaName": "永登县" - }, - { - "areaCode": "620122", - "areaName": "皋兰县" - }, - { - "areaCode": "620123", - "areaName": "榆中县" - } - ] - }, - { - "cityCode": "620200", - "cityName": "嘉峪关市", - "mallAreaList": [ - { - "areaCode": "620201", - "areaName": "嘉峪关市辖区" - } - ] - }, - { - "cityCode": "620300", - "cityName": "金昌市", - "mallAreaList": [ - { - "areaCode": "620302", - "areaName": "金川区" - }, - { - "areaCode": "620321", - "areaName": "永昌县" - } - ] - }, - { - "cityCode": "620400", - "cityName": "白银市", - "mallAreaList": [ - { - "areaCode": "620402", - "areaName": "白银区" - }, - { - "areaCode": "620403", - "areaName": "平川区" - }, - { - "areaCode": "620421", - "areaName": "靖远县" - }, - { - "areaCode": "620422", - "areaName": "会宁县" - }, - { - "areaCode": "620423", - "areaName": "景泰县" - } - ] - }, - { - "cityCode": "620500", - "cityName": "天水市", - "mallAreaList": [ - { - "areaCode": "620502", - "areaName": "秦州区" - }, - { - "areaCode": "620503", - "areaName": "麦积区" - }, - { - "areaCode": "620521", - "areaName": "清水县" - }, - { - "areaCode": "620522", - "areaName": "秦安县" - }, - { - "areaCode": "620523", - "areaName": "甘谷县" - }, - { - "areaCode": "620524", - "areaName": "武山县" - }, - { - "areaCode": "620525", - "areaName": "张家川回族自治县" - } - ] - }, - { - "cityCode": "620600", - "cityName": "武威市", - "mallAreaList": [ - { - "areaCode": "620602", - "areaName": "凉州区" - }, - { - "areaCode": "620621", - "areaName": "民勤县" - }, - { - "areaCode": "620622", - "areaName": "古浪县" - }, - { - "areaCode": "620623", - "areaName": "天祝藏族自治县" - } - ] - }, - { - "cityCode": "620700", - "cityName": "张掖市", - "mallAreaList": [ - { - "areaCode": "620702", - "areaName": "甘州区" - }, - { - "areaCode": "620721", - "areaName": "肃南裕固族自治县" - }, - { - "areaCode": "620722", - "areaName": "民乐县" - }, - { - "areaCode": "620723", - "areaName": "临泽县" - }, - { - "areaCode": "620724", - "areaName": "高台县" - }, - { - "areaCode": "620725", - "areaName": "山丹县" - } - ] - }, - { - "cityCode": "620800", - "cityName": "平凉市", - "mallAreaList": [ - { - "areaCode": "620802", - "areaName": "崆峒区" - }, - { - "areaCode": "620821", - "areaName": "泾川县" - }, - { - "areaCode": "620822", - "areaName": "灵台县" - }, - { - "areaCode": "620823", - "areaName": "崇信县" - }, - { - "areaCode": "620824", - "areaName": "华亭县" - }, - { - "areaCode": "620825", - "areaName": "庄浪县" - }, - { - "areaCode": "620826", - "areaName": "静宁县" - } - ] - }, - { - "cityCode": "620900", - "cityName": "酒泉市", - "mallAreaList": [ - { - "areaCode": "620902", - "areaName": "肃州区" - }, - { - "areaCode": "620921", - "areaName": "金塔县" - }, - { - "areaCode": "620922", - "areaName": "瓜州县" - }, - { - "areaCode": "620923", - "areaName": "肃北蒙古族自治县" - }, - { - "areaCode": "620924", - "areaName": "阿克塞哈萨克族自治县" - }, - { - "areaCode": "620981", - "areaName": "玉门市" - }, - { - "areaCode": "620982", - "areaName": "敦煌市" - } - ] - }, - { - "cityCode": "621000", - "cityName": "庆阳市", - "mallAreaList": [ - { - "areaCode": "621002", - "areaName": "西峰区" - }, - { - "areaCode": "621021", - "areaName": "庆城县" - }, - { - "areaCode": "621022", - "areaName": "环县" - }, - { - "areaCode": "621023", - "areaName": "华池县" - }, - { - "areaCode": "621024", - "areaName": "合水县" - }, - { - "areaCode": "621025", - "areaName": "正宁县" - }, - { - "areaCode": "621026", - "areaName": "宁县" - }, - { - "areaCode": "621027", - "areaName": "镇原县" - } - ] - }, - { - "cityCode": "621100", - "cityName": "定西市", - "mallAreaList": [ - { - "areaCode": "621102", - "areaName": "安定区" - }, - { - "areaCode": "621121", - "areaName": "通渭县" - }, - { - "areaCode": "621122", - "areaName": "陇西县" - }, - { - "areaCode": "621123", - "areaName": "渭源县" - }, - { - "areaCode": "621124", - "areaName": "临洮县" - }, - { - "areaCode": "621125", - "areaName": "漳县" - }, - { - "areaCode": "621126", - "areaName": "岷县" - } - ] - }, - { - "cityCode": "621200", - "cityName": "陇南市", - "mallAreaList": [ - { - "areaCode": "621202", - "areaName": "武都区" - }, - { - "areaCode": "621221", - "areaName": "成县" - }, - { - "areaCode": "621222", - "areaName": "文县" - }, - { - "areaCode": "621223", - "areaName": "宕昌县" - }, - { - "areaCode": "621224", - "areaName": "康县" - }, - { - "areaCode": "621225", - "areaName": "西和县" - }, - { - "areaCode": "621226", - "areaName": "礼县" - }, - { - "areaCode": "621227", - "areaName": "徽县" - }, - { - "areaCode": "621228", - "areaName": "两当县" - } - ] - }, - { - "cityCode": "622900", - "cityName": "临夏回族自治州", - "mallAreaList": [ - { - "areaCode": "622901", - "areaName": "临夏市" - }, - { - "areaCode": "622921", - "areaName": "临夏县" - }, - { - "areaCode": "622922", - "areaName": "康乐县" - }, - { - "areaCode": "622923", - "areaName": "永靖县" - }, - { - "areaCode": "622924", - "areaName": "广河县" - }, - { - "areaCode": "622925", - "areaName": "和政县" - }, - { - "areaCode": "622926", - "areaName": "东乡族自治县" - }, - { - "areaCode": "622927", - "areaName": "积石山保安族东乡族撒拉族自治县" - } - ] - }, - { - "cityCode": "623000", - "cityName": "甘南藏族自治州", - "mallAreaList": [ - { - "areaCode": "623001", - "areaName": "合作市" - }, - { - "areaCode": "623021", - "areaName": "临潭县" - }, - { - "areaCode": "623022", - "areaName": "卓尼县" - }, - { - "areaCode": "623023", - "areaName": "舟曲县" - }, - { - "areaCode": "623024", - "areaName": "迭部县" - }, - { - "areaCode": "623025", - "areaName": "玛曲县" - }, - { - "areaCode": "623026", - "areaName": "碌曲县" - }, - { - "areaCode": "623027", - "areaName": "夏河县" - } - ] - } - ] - }, - { - "provinceCode": "630000", - "provinceName": "青海省", - "mallCityList": [ - { - "cityCode": "630100", - "cityName": "西宁市", - "mallAreaList": [ - { - "areaCode": "630102", - "areaName": "城东区" - }, - { - "areaCode": "630103", - "areaName": "城中区" - }, - { - "areaCode": "630104", - "areaName": "城西区" - }, - { - "areaCode": "630105", - "areaName": "城北区" - }, - { - "areaCode": "630121", - "areaName": "大通回族土族自治县" - }, - { - "areaCode": "630122", - "areaName": "湟中县" - }, - { - "areaCode": "630123", - "areaName": "湟源县" - } - ] - }, - { - "cityCode": "632100", - "cityName": "海东地区", - "mallAreaList": [ - { - "areaCode": "632100", - "areaName": "海东地区" - }, - { - "areaCode": "632121", - "areaName": "平安县" - }, - { - "areaCode": "632122", - "areaName": "民和回族土族自治县" - }, - { - "areaCode": "632123", - "areaName": "乐都县" - }, - { - "areaCode": "632126", - "areaName": "互助土族自治县" - }, - { - "areaCode": "632127", - "areaName": "化隆回族自治县" - }, - { - "areaCode": "632128", - "areaName": "循化撒拉族自治县" - } - ] - }, - { - "cityCode": "632200", - "cityName": "海北藏族自治州", - "mallAreaList": [ - { - "areaCode": "632221", - "areaName": "门源回族自治县" - }, - { - "areaCode": "632222", - "areaName": "祁连县" - }, - { - "areaCode": "632223", - "areaName": "海晏县" - }, - { - "areaCode": "632224", - "areaName": "刚察县" - } - ] - }, - { - "cityCode": "632300", - "cityName": "黄南藏族自治州", - "mallAreaList": [ - { - "areaCode": "632321", - "areaName": "同仁县" - }, - { - "areaCode": "632322", - "areaName": "尖扎县" - }, - { - "areaCode": "632323", - "areaName": "泽库县" - }, - { - "areaCode": "632324", - "areaName": "河南蒙古族自治县" - } - ] - }, - { - "cityCode": "632500", - "cityName": "海南藏族自治州", - "mallAreaList": [ - { - "areaCode": "632521", - "areaName": "共和县" - }, - { - "areaCode": "632522", - "areaName": "同德县" - }, - { - "areaCode": "632523", - "areaName": "贵德县" - }, - { - "areaCode": "632524", - "areaName": "兴海县" - }, - { - "areaCode": "632525", - "areaName": "贵南县" - } - ] - }, - { - "cityCode": "632600", - "cityName": "果洛藏族自治州", - "mallAreaList": [ - { - "areaCode": "632621", - "areaName": "玛沁县" - }, - { - "areaCode": "632622", - "areaName": "班玛县" - }, - { - "areaCode": "632623", - "areaName": "甘德县" - }, - { - "areaCode": "632624", - "areaName": "达日县" - }, - { - "areaCode": "632625", - "areaName": "久治县" - }, - { - "areaCode": "632626", - "areaName": "玛多县" - } - ] - }, - { - "cityCode": "632700", - "cityName": "玉树藏族自治州", - "mallAreaList": [ - { - "areaCode": "632701", - "areaName": "玉树市" - }, - { - "areaCode": "632722", - "areaName": "杂多县" - }, - { - "areaCode": "632723", - "areaName": "称多县" - }, - { - "areaCode": "632724", - "areaName": "治多县" - }, - { - "areaCode": "632725", - "areaName": "囊谦县" - }, - { - "areaCode": "632726", - "areaName": "曲麻莱县" - } - ] - }, - { - "cityCode": "632800", - "cityName": "海西蒙古族藏族自治州", - "mallAreaList": [ - { - "areaCode": "632801", - "areaName": "格尔木市" - }, - { - "areaCode": "632802", - "areaName": "德令哈市" - }, - { - "areaCode": "632821", - "areaName": "乌兰县" - }, - { - "areaCode": "632822", - "areaName": "都兰县" - }, - { - "areaCode": "632823", - "areaName": "天峻县" - } - ] - } - ] - }, - { - "provinceCode": "640000", - "provinceName": "宁夏回族自治区", - "mallCityList": [ - { - "cityCode": "640100", - "cityName": "银川市", - "mallAreaList": [ - { - "areaCode": "640104", - "areaName": "兴庆区" - }, - { - "areaCode": "640105", - "areaName": "西夏区" - }, - { - "areaCode": "640106", - "areaName": "金凤区" - }, - { - "areaCode": "640121", - "areaName": "永宁县" - }, - { - "areaCode": "640122", - "areaName": "贺兰县" - }, - { - "areaCode": "640181", - "areaName": "灵武市" - } - ] - }, - { - "cityCode": "640200", - "cityName": "石嘴山市", - "mallAreaList": [ - { - "areaCode": "640202", - "areaName": "大武口区" - }, - { - "areaCode": "640205", - "areaName": "惠农区" - }, - { - "areaCode": "640221", - "areaName": "平罗县" - } - ] - }, - { - "cityCode": "640300", - "cityName": "吴忠市", - "mallAreaList": [ - { - "areaCode": "640302", - "areaName": "利通区" - }, - { - "areaCode": "640303", - "areaName": "红寺堡区" - }, - { - "areaCode": "640323", - "areaName": "盐池县" - }, - { - "areaCode": "640324", - "areaName": "同心县" - }, - { - "areaCode": "640381", - "areaName": "青铜峡市" - } - ] - }, - { - "cityCode": "640400", - "cityName": "固原市", - "mallAreaList": [ - { - "areaCode": "640402", - "areaName": "原州区" - }, - { - "areaCode": "640422", - "areaName": "西吉县" - }, - { - "areaCode": "640423", - "areaName": "隆德县" - }, - { - "areaCode": "640424", - "areaName": "泾源县" - }, - { - "areaCode": "640425", - "areaName": "彭阳县" - } - ] - }, - { - "cityCode": "640500", - "cityName": "中卫市", - "mallAreaList": [ - { - "areaCode": "640502", - "areaName": "沙坡头区" - }, - { - "areaCode": "640521", - "areaName": "中宁县" - }, - { - "areaCode": "640522", - "areaName": "海原县" - } - ] - } - ] - }, - { - "provinceCode": "650000", - "provinceName": "新疆维吾尔自治区", - "mallCityList": [ - { - "cityCode": "650100", - "cityName": "乌鲁木齐市", - "mallAreaList": [ - { - "areaCode": "650102", - "areaName": "天山区" - }, - { - "areaCode": "650103", - "areaName": "沙依巴克区" - }, - { - "areaCode": "650104", - "areaName": "新市区" - }, - { - "areaCode": "650105", - "areaName": "水磨沟区" - }, - { - "areaCode": "650106", - "areaName": "头屯河区" - }, - { - "areaCode": "650107", - "areaName": "达坂城区" - }, - { - "areaCode": "650109", - "areaName": "米东区" - }, - { - "areaCode": "650121", - "areaName": "乌鲁木齐县" - } - ] - }, - { - "cityCode": "650200", - "cityName": "克拉玛依市", - "mallAreaList": [ - { - "areaCode": "650202", - "areaName": "独山子区" - }, - { - "areaCode": "650203", - "areaName": "克拉玛依区" - }, - { - "areaCode": "650204", - "areaName": "白碱滩区" - }, - { - "areaCode": "650205", - "areaName": "乌尔禾区" - } - ] - }, - { - "cityCode": "652100", - "cityName": "吐鲁番地区", - "mallAreaList": [ - { - "areaCode": "652101", - "areaName": "吐鲁番市" - }, - { - "areaCode": "652122", - "areaName": "鄯善县" - }, - { - "areaCode": "652123", - "areaName": "托克逊县" - } - ] - }, - { - "cityCode": "652200", - "cityName": "哈密地区", - "mallAreaList": [ - { - "areaCode": "652201", - "areaName": "哈密市" - }, - { - "areaCode": "652222", - "areaName": "巴里坤哈萨克自治县" - }, - { - "areaCode": "652223", - "areaName": "伊吾县" - } - ] - }, - { - "cityCode": "652300", - "cityName": "昌吉回族自治州", - "mallAreaList": [ - { - "areaCode": "652301", - "areaName": "昌吉市" - }, - { - "areaCode": "652302", - "areaName": "阜康市" - }, - { - "areaCode": "652323", - "areaName": "呼图壁县" - }, - { - "areaCode": "652324", - "areaName": "玛纳斯县" - }, - { - "areaCode": "652325", - "areaName": "奇台县" - }, - { - "areaCode": "652327", - "areaName": "吉木萨尔县" - }, - { - "areaCode": "652328", - "areaName": "木垒哈萨克自治县" - } - ] - }, - { - "cityCode": "652700", - "cityName": "博尔塔拉蒙古自治州", - "mallAreaList": [ - { - "areaCode": "652701", - "areaName": "博乐市" - }, - { - "areaCode": "652702", - "areaName": "阿拉山口市" - }, - { - "areaCode": "652722", - "areaName": "精河县" - }, - { - "areaCode": "652723", - "areaName": "温泉县" - } - ] - }, - { - "cityCode": "652800", - "cityName": "巴音郭楞蒙古自治州", - "mallAreaList": [ - { - "areaCode": "652801", - "areaName": "库尔勒市" - }, - { - "areaCode": "652822", - "areaName": "轮台县" - }, - { - "areaCode": "652823", - "areaName": "尉犁县" - }, - { - "areaCode": "652824", - "areaName": "若羌县" - }, - { - "areaCode": "652825", - "areaName": "且末县" - }, - { - "areaCode": "652826", - "areaName": "焉耆回族自治县" - }, - { - "areaCode": "652827", - "areaName": "和静县" - }, - { - "areaCode": "652828", - "areaName": "和硕县" - }, - { - "areaCode": "652829", - "areaName": "博湖县" - } - ] - }, - { - "cityCode": "652900", - "cityName": "阿克苏地区", - "mallAreaList": [ - { - "areaCode": "652901", - "areaName": "阿克苏市" - }, - { - "areaCode": "652922", - "areaName": "温宿县" - }, - { - "areaCode": "652923", - "areaName": "库车县" - }, - { - "areaCode": "652924", - "areaName": "沙雅县" - }, - { - "areaCode": "652925", - "areaName": "新和县" - }, - { - "areaCode": "652926", - "areaName": "拜城县" - }, - { - "areaCode": "652927", - "areaName": "乌什县" - }, - { - "areaCode": "652928", - "areaName": "阿瓦提县" - }, - { - "areaCode": "652929", - "areaName": "柯坪县" - } - ] - }, - { - "cityCode": "653000", - "cityName": "克孜勒苏柯尔克孜自治州", - "mallAreaList": [ - { - "areaCode": "653001", - "areaName": "阿图什市" - }, - { - "areaCode": "653022", - "areaName": "阿克陶县" - }, - { - "areaCode": "653023", - "areaName": "阿合奇县" - }, - { - "areaCode": "653024", - "areaName": "乌恰县" - } - ] - }, - { - "cityCode": "653100", - "cityName": "喀什地区", - "mallAreaList": [ - { - "areaCode": "653101", - "areaName": "喀什市" - }, - { - "areaCode": "653121", - "areaName": "疏附县" - }, - { - "areaCode": "653122", - "areaName": "疏勒县" - }, - { - "areaCode": "653123", - "areaName": "英吉沙县" - }, - { - "areaCode": "653124", - "areaName": "泽普县" - }, - { - "areaCode": "653125", - "areaName": "莎车县" - }, - { - "areaCode": "653126", - "areaName": "叶城县" - }, - { - "areaCode": "653127", - "areaName": "麦盖提县" - }, - { - "areaCode": "653128", - "areaName": "岳普湖县" - }, - { - "areaCode": "653129", - "areaName": "伽师县" - }, - { - "areaCode": "653130", - "areaName": "巴楚县" - }, - { - "areaCode": "653131", - "areaName": "塔什库尔干塔吉克自治县" - } - ] - }, - { - "cityCode": "653200", - "cityName": "和田地区", - "mallAreaList": [ - { - "areaCode": "653201", - "areaName": "和田市" - }, - { - "areaCode": "653221", - "areaName": "和田县" - }, - { - "areaCode": "653222", - "areaName": "墨玉县" - }, - { - "areaCode": "653223", - "areaName": "皮山县" - }, - { - "areaCode": "653224", - "areaName": "洛浦县" - }, - { - "areaCode": "653225", - "areaName": "策勒县" - }, - { - "areaCode": "653226", - "areaName": "于田县" - }, - { - "areaCode": "653227", - "areaName": "民丰县" - } - ] - }, - { - "cityCode": "654000", - "cityName": "伊犁哈萨克自治州", - "mallAreaList": [ - { - "areaCode": "654002", - "areaName": "伊宁市" - }, - { - "areaCode": "654003", - "areaName": "奎屯市" - }, - { - "areaCode": "654021", - "areaName": "伊宁县" - }, - { - "areaCode": "654022", - "areaName": "察布查尔锡伯自治县" - }, - { - "areaCode": "654023", - "areaName": "霍城县" - }, - { - "areaCode": "654024", - "areaName": "巩留县" - }, - { - "areaCode": "654025", - "areaName": "新源县" - }, - { - "areaCode": "654026", - "areaName": "昭苏县" - }, - { - "areaCode": "654027", - "areaName": "特克斯县" - }, - { - "areaCode": "654028", - "areaName": "尼勒克县" - } - ] - }, - { - "cityCode": "654200", - "cityName": "塔城地区", - "mallAreaList": [ - { - "areaCode": "654201", - "areaName": "塔城市" - }, - { - "areaCode": "654202", - "areaName": "乌苏市" - }, - { - "areaCode": "654221", - "areaName": "额敏县" - }, - { - "areaCode": "654223", - "areaName": "沙湾县" - }, - { - "areaCode": "654224", - "areaName": "托里县" - }, - { - "areaCode": "654225", - "areaName": "裕民县" - }, - { - "areaCode": "654226", - "areaName": "和布克赛尔蒙古自治县" - } - ] - }, - { - "cityCode": "654300", - "cityName": "阿勒泰地区", - "mallAreaList": [ - { - "areaCode": "654301", - "areaName": "阿勒泰市" - }, - { - "areaCode": "654321", - "areaName": "布尔津县" - }, - { - "areaCode": "654322", - "areaName": "富蕴县" - }, - { - "areaCode": "654323", - "areaName": "福海县" - }, - { - "areaCode": "654324", - "areaName": "哈巴河县" - }, - { - "areaCode": "654325", - "areaName": "青河县" - }, - { - "areaCode": "654326", - "areaName": "吉木乃县" - } - ] - }, - { - "cityCode": "659000", - "cityName": "省直辖行政单位", - "mallAreaList": [ - { - "areaCode": "659001", - "areaName": "石河子市" - }, - { - "areaCode": "659002", - "areaName": "阿拉尔市" - }, - { - "areaCode": "659003", - "areaName": "图木舒克市" - } - ] - } - ] - }, - { - "provinceCode": "710000", - "provinceName": "台湾省", - "mallCityList": [] - }, - { - "provinceCode": "810000", - "provinceName": "香港特别行政区", - "mallCityList": [] - }, - { - "provinceCode": "820000", - "provinceName": "澳门特别行政区", - "mallCityList": [] - } -]; \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/btable_data.json b/xxpay-mgr/src/main/resources/static/datas/btable_data.json deleted file mode 100755 index e09891f437994a86aa31dc0101713bc2700f7e6b..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/btable_data.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "rel": true, - "msg": "获取成功", - "list": [ - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 1, - "name": "张三", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 2, - "name": "李四", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 3, - "name": "王五", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - }, - { - "id": 4, - "name": "赵六", - "createtime": "2017-01-10 10:42:36", - "sign": "人生就像是一场修行" - } - ], - "count": 57 -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/laytpl_laypage_data.json b/xxpay-mgr/src/main/resources/static/datas/laytpl_laypage_data.json deleted file mode 100755 index c3ede4d3b927b8daf62d3d4eb615450ce17d13e8..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/laytpl_laypage_data.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "rel": true, - "msg": "获取成功", - "list": [ - { - "id":1, - "name": "张三", - "age":21, - "createtime": "2017-01-10 10:42:36" - }, - { - "id":2, - "name": "李四", - "age":31, - "createtime": "2017-01-10 10:42:36" - },{ - "id":3, - "name": "王五", - "age":23, - "createtime": "2017-01-10 10:42:36" - },{ - "id":4, - "name": "赵六", - "age":18, - "createtime": "2017-01-10 10:42:36" - } - ], - "count": 57 -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/nav.js b/xxpay-mgr/src/main/resources/static/datas/nav.js deleted file mode 100755 index 6bcac16b0d0a2e05f3168aec620642c9c8335398..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/nav.js +++ /dev/null @@ -1,35 +0,0 @@ -var navs = [{ - "title": "基本配置", - "icon": "fa-cubes", - "spread": true, - "children": [{ - "title": "商户信息", - "icon": "", - "href": "/mch_info/list.html" - }, { - "title": "支付渠道", - "icon": "", - "href": "/pay_channel/list.html" - }, { - "title": "商户通知", - "icon": "", - "href": "/mch_notify/list.html" - }] -},{ - "title": "订单管理", - "icon": "ဂ", - "spread": false, - "children": [{ - "title": "支付订单", - "icon": "fa-check-square-o", - "href": "/pay_order/list.html" - }, { - "title": "转账订单", - "icon": "fa-check-square-o", - "href": "/trans_order/list.html" - }, { - "title": "退款订单", - "icon": "fa-check-square-o", - "href": "/refund_order/list.html" - }] -}]; \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/nav.json b/xxpay-mgr/src/main/resources/static/datas/nav.json deleted file mode 100755 index 3430754096a5a48a8b2a3105defc575123a8c4a4..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/nav.json +++ /dev/null @@ -1,89 +0,0 @@ -[ - { - "title": "基本元素", - "icon": "fa-cubes", - "spread": true, - "children": [ - { - "title": "按钮", - "icon": "", - "href": "button.html" - }, { - "title": "表单", - "icon": "", - "href": "form.html" - }, { - "title": "表格", - "icon": "", - "href": "table.html" - }, { - "title": "导航", - "icon": "", - "href": "nav.html" - }, { - "title": "Tab选项卡", - "icon": "", - "href": "tab.html" - }, { - "title": "辅助性元素", - "icon": "", - "href": "auxiliar.html" - } - ] - }, { - "title": "组件", - "icon": "fa-cogs", - "spread": false, - "children": [ - { - "title": "Datatable", - "icon": "fa-table", - "href": "begtable.html" - }, { - "title": "Navbar组件", - "icon": "fa-navicon", - "href": "navbar.html" - } - ] - }, { - "title": "第三方组件", - "icon": "ဂ", - "spread": false, - "children": [ - { - "title": "iCheck组件", - "icon": "fa-check-square-o", - "href": "icheck.html" - } - ] - }, { - "title": "地址本", - "icon": "fa-address-book", - "href": "", - "spread": false, - "children": [ - { - "title": "Github", - "icon": "fa-github", - "href": "https://www.github.com/" - }, { - "title": "QQ", - "icon": "fa-qq", - "href": "http://www.qq.com/" - }, { - "title": "Fly社区", - "icon": "", - "href": "http://fly.layui.com/" - }, { - "title": "新浪微博", - "icon": "fa-weibo", - "href": "http://weibo.com/" - } - ] - }, { - "title": "这是一级导航", - "icon": "fa-stop-circle", - "href": "https://www.baidu.com", - "spread": false - } -] \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/nav_content.json b/xxpay-mgr/src/main/resources/static/datas/nav_content.json deleted file mode 100755 index ae495c15a722fb8a950c836d061461f88a3d23a2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/nav_content.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "title": "资讯管理", - "icon": "ဂ", - "spread": true, - "children": [ - { - "title": "资讯列表", - "icon": "fa-check-square-o", - "href": "information.html" - },{ - "title": "资讯分类", - "icon": "fa-check-square-o", - "href": "category.html" - } - ] - } - ] \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/datas/nav_member.json b/xxpay-mgr/src/main/resources/static/datas/nav_member.json deleted file mode 100755 index d121cb712ca2cc9a632e25af6943a7e9b54cb3d9..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/datas/nav_member.json +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "title": "会员管理", - "icon": "ဂ", - "spread": true, - "children": [ - { - "title": "会员列表", - "icon": "fa-check-square-o", - "href": "https:www.baidu.com" - },{ - "title": "会员等级", - "icon": "fa-check-square-o", - "href": "level.html" - } - ] - } - ] \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/images/0.jpg b/xxpay-mgr/src/main/resources/static/images/0.jpg deleted file mode 100755 index ceba9507ca2b19368675cce21ea6df9209c238fd..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/images/0.jpg and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/images/favicon.ico b/xxpay-mgr/src/main/resources/static/images/favicon.ico deleted file mode 100644 index ce99f5c714d556f6070ac88b0a45b4c1376271cc..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/images/favicon.ico and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/images/logo-1.png b/xxpay-mgr/src/main/resources/static/images/logo-1.png deleted file mode 100755 index ec41e00978f3c4c512ec8a6129e7d92bc68707ff..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/images/logo-1.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/images/xx.png b/xxpay-mgr/src/main/resources/static/images/xx.png deleted file mode 100755 index 0d3438cc2bd97670aa0ea91bfe1e2cc027ab7334..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/images/xx.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/index.html b/xxpay-mgr/src/main/resources/static/index.html deleted file mode 100755 index daa0c2c431db21755f1d904c8933a2a8c3d403a0..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/index.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - XXPAY - 运营管理 - - - - - - - - - - - - - - -
- -
-
-
-
-
-
    -
  • - - 控制面板 -
  • -
-
-
- -
-
-
-
- -
- -
-
- - - - - - - - - -
- - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/area.js b/xxpay-mgr/src/main/resources/static/js/area.js deleted file mode 100755 index f786d2fde24947bbd4596e61757d785677765a99..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/area.js +++ /dev/null @@ -1,39 +0,0 @@ -/** area.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['jquery'], function(exports) { - "use strict"; - var $ = layui.jquery; - - //设置ajax可跨域 - $.support.cors = true; - var Area = function() { - this.config = { - url: undefined, //远程数据的url - type: 'json', //数据类型 json or jsonp - provinceFilter: 'province', //省的过滤器名称 - cityFilter: 'city', //市的过滤器名称 - districtFilter: 'district', // 区域的过滤器名称 - provinceName: 'province', //省名称 - cityName: 'city', //市名称 - districtName: 'district', //区域名称 - }; - this.v = '1.0'; - }; - Area.prototype.set = function(options) { - var that = this; - $.extend(true, that.config, options); - return that; - }; - Area.prototype.init = function(options) { - var that = this; - - - - return that; - }; - - var area = new Area(); - - exports('area', function(options) { - return area.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/baajax.js b/xxpay-mgr/src/main/resources/static/js/baajax.js deleted file mode 100755 index 0a9b3feb89460e234280f08c21b83a7fe5ff200b..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/baajax.js +++ /dev/null @@ -1,41 +0,0 @@ -layui.define('layer', function (exports) { - "use strict"; - var $ = layui.jquery, - layerTips = parent.layer === undefined ? layui.layer : parent.layer; - - - var baajax = { - post: function (url, params, callback) { - $.post(url, params, function (res) { - if (res.statusCode === 101) { - layerTips.alert(res.msg, { - icon: 2, title: '系统提示', cancel: function (index, layero) { - top.location.href = location.origin + '/login'; - } - }, function () { - top.location.href = location.origin + '/login'; - }); - } - callback(res); - }, 'json'); - }, - get: function (url, params, callback) { - $.getJSON(url, params, function (res) { - if (res.statusCode === 101) { - layerTips.alert(res.msg, { - icon: 2, title: '系统提示', cancel: function (index, layero) { - top.location.href = location.origin + '/login'; - } - }, function () { - top.location.href = location.origin + '/login'; - }); - } - callback(res); - }); - }, - v: '1.0.0' - }; - - - exports('baajax', baajax); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/begtable.js b/xxpay-mgr/src/main/resources/static/js/begtable.js deleted file mode 100755 index ba71f372604b41059a677c3bee6fd1d30507a2d7..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/begtable.js +++ /dev/null @@ -1,195 +0,0 @@ -layui.config({ - base: 'plugins/layui/modules/' -}); -layui.define(['layer', 'laypage', 'icheck'], function(exports) { - "use strict"; - var $ = layui.jquery, - layer = parent.layer === undefined ? layui.layer : parent.layer, - laypage = layui.laypage; - /** - * @description begtable元素 - */ - var ELEM = { - table: 'beg-table', - hover: 'beg-table-hovered', - border: 'beg-table-bordered', - strip: 'beg-table-striped' - }; - /** - * @constructor begTable 构造函数 - */ - var begTable = function() { - this.config = { - elem: undefined, //存放begtable的窗口,必填 - bordered: false, //是否加边框 - striped: false, //是否显示斑马线 - hovered: false, //鼠标悬停样式 - checked: false, //显示多选按钮 - checkboxClass: 'icheckbox_flat-green', //checkbox样式 - tips: '这是默认Tips', - columns: undefined, // 数据列 - url: undefined, //远程地址 - data: undefined, //数据 - identity: undefined, // 标识字段 - paged: true, //启用分页功能 - type: 'get', //远程读取数据的方式 - pageSet: { - jump: undefined, // - groups: 5, - } //分页设置 - }; - }; - /** - * @description 设置 - * @param {Object} options - */ - begTable.prototype.set = function(options) { - var that = this; - $.extend(true, that.config, options); - return that; - }; - /** - * @description 获取选择的行 - */ - begTable.prototype.getSelectedRows = function() { - console.log(this.config.tips); - }; - /** - * 初始化begtable - */ - begTable.prototype.init = function() { - var _that = this; - var _config = _that.config; - var elem = _config.elem; - if(typeof(elem) !== 'string' && typeof(elem) !== 'object') { - throwError('elem参数未定义或设置出错,具体设置格式请参考文档API.'); - } - var $container; - if(typeof(elem) === 'string') { - $container = $(elem); - } - if(typeof(elem) === 'object') { - $container = elem; - } - if($container.length === 0) { - throwError('找不到elem参数配置的容器,请检查.'); - } - if(typeof(_config.columns) !== 'object') { - throwError('请配置columns参数,具体设置格式请参考文档API'); - } - var tableClass = ELEM.table; - if(_config.bordered) { - tableClass += ' ' + ELEM.border; - } - if(_config.hovered) { - tableClass += ' ' + ELEM.hover; - } - if(_config.striped) { - tableClass += ' ' + ELEM.strip; - } - var tableTemp = ''; - var columns = _config.columns; - var theadTemp = ''; - //添加全选按钮 - if(_config.checked) { - theadTemp += '' - } - for(var i = 0; i < columns.length; i++) { - theadTemp += '' - } - theadTemp += ''; - var tbodyTemp = ''; - var data = _config.data; - if(data !== undefined && typeof(data) === 'object') { - for(var i = 0; i < data.length; i++) { - var tr = ''; - if(_config.checked) { - tr += ''; - } - for(var j = 0; j < columns.length; j++) { - tr += ''; - } - tr += ''; - tbodyTemp += tr; - } - } - tbodyTemp += ''; - tableTemp = tableTemp + theadTemp + tbodyTemp + '
' + columns[i].title + '
' + data[i][columns[j].field] + '
'; - //渲染table - $container.html('
' + tableTemp + '
'); - //checkbox - if(_config.checked) { - //渲染checkbox - $container.find('input[type=checkbox]').iCheck({ - checkboxClass: _config.checkboxClass - }); - } - //分页 - if(_config.paged) { - var $tableBox = $container.children('.beg-table-box'); - $tableBox.append('
'); - loadData($tableBox, 1); - } else { - $container.find('.' + ELEM.table).css('margin-bottom', '0px'); - } - - //msgErrorTips('请对begtable返回正确的JSON字符'); - return _that; - }; - begTable.prototype.getConfig = function() { - return this.config; - }; - /** - * 加载数据 - * @param {Object} $tableBox - * @param {Number} page - */ - function loadData($tableBox, page) { - //var that = ''; - /*$.ajax({ - type: that.config.type, - success: function(result) { - - } - });*/ - laypage({ - cont: $tableBox.find('.beg-table-paged'), - curr: page, - pages: 25, //总页数 - groups: 5, //连续显示分页数 - jump: function(obj, first) { - //得到了当前页,用于向服务端请求对应数据 - var curr = obj.curr; - if(!first) { - //layer.msg('第 '+ obj.curr +' 页'); - that.loadData() - } - } - }); - } - /** - * 抛出一个异常错误信息 - * @param {String} msg - */ - function throwError(msg) { - throw new Error('betTable error:' + msg); - return; - } - /** - * 弹出一个错误提示 - * @param {String} msg - */ - function msgErrorTips(msg) { - layer.msg(msg, { - icon: 5 - }); - return; - } - - var begtable = new begTable(); - //begtable.init(); - - exports('begtable', function(options) { - return begtable.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/btable.js b/xxpay-mgr/src/main/resources/static/js/btable.js deleted file mode 100755 index 670eaa1e848c6a22408a9eaaf3fc75e7c7dc5434..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/btable.js +++ /dev/null @@ -1,316 +0,0 @@ -/** BTable.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['element', 'common', 'paging', 'form'], function (exports) { - "use strict"; - var $ = layui.jquery, - layerTips = parent.layer === undefined ? layui.layer : parent.layer, - layer = layui.layer, - element = layui.element(), - common = layui.common, - paging = layui.paging(), - form = layui.form(); - - var BTable = function () { - //默认配置 - this.config = { - elem: undefined, //容器 - params: {},//发送到服务端的额外参数 - columns: [],//配置的数据列 - openWait: false,//是否打开等待框 - url: undefined, //数据源地址 - type: 'GET', //读取方式 - even: false, //是否开启偶数行背景 - skin: undefined, //风格样式 ,可选参数 line/row/nob - field: 'ID', //主键属性名 - paged: false, //是否显示分页组件 - singleSelect: false, //是否只能选择一行 - checkbox: true, //显示多选 - onSuccess: undefined //渲染成功后的回调 - }; - this.v = '1.0.1'; - }; - /** - * 配置BTable - * @param {Object} options - */ - BTable.prototype.set = function (options) { - var that = this; - $.extend(true, that.config, options); - return that; - }; - /** - * 渲染table - */ - BTable.prototype.render = function () { - var that = this; - var _config = that.config; - - var columns = _config.columns; - var th = ''; - for (var i = 0; i < columns.length; i++) { - if (columns[i].sortable) { - th += '' + columns[i].fieldName + '
'; - } else { - th += '' + columns[i].fieldName + ''; - } - } - if (_config.checkbox && !_config.singleSelect) { - th = '序号' + th; - } else if (_config.checkbox) { - th = '#序号' + th; - } else { - th = '序号' + th; - } - var tpl = '
'; - if (_config.skin !== undefined && (_config.skin === 'line' || _config.skin === 'row' || _config.skin === 'nob') && _config.even) { - tpl += ''; - } else if (_config.skin !== undefined && (_config.skin === 'line' || _config.skin === 'row' || _config.skin === 'nob')) { - tpl += '
'; - } else if (_config.even) { - tpl += '
'; - } else { - tpl += '
'; - } - tpl += '' + th + ''; - tpl += ''; - tpl += '
'; - if (_config.paged) { - tpl += '
'; - } - tpl += '
'; - $(_config.elem).html(tpl); - paging.init({ - url: _config.url, //地址 - elem: '.btable-content', //内容容器 - type: _config.type, - openWait: _config.openWait, - tempType: 1, - params: _config.params, - fail: _config.onFail, - complate: _config.onComplate, - serverError: _config.onServerError, - tempElem: getTpl({ - columns: _config.columns, - checkbox: _config.checkbox, - field: _config.field - }), //模块容器 - paged: _config.paged, - pageConfig: { //分页参数配置 - skip: true, - elem: $(_config.elem).find('div[data-type=paged]'), //'#paged', //分页容器 - pageSize: _config.pageSize || 15 //分页大小 - }, - //数据渲染之前的处理 - renderBefore: function (html, callback, data) { - var dataId = new Date().getTime(); - //创建临时节点 - $('body').append('' + html + ''); - var columns = _config.columns; - for (var i = 0; i < columns.length; i++) { - if (columns[i].format) { - $('#' + dataId).find('tr').each(function () { - var id = $(this).find('input[data-item=id]').val(); - var $field = $(this).children('td[data-field=' + columns[i].field + ']'); - var obj = undefined; - for (var j = 0; j < data.length; j++) { - if (data[j].Id == id || data[j].ID == id || data[j].id == id) { - obj = data[j]; - break; - } - } - $field.html(columns[i].format(id, obj)); - }); - } - } - //执行回调函数 - callback($('#' + dataId).find('tbody').html()); - //删除临时节点 - $('#' + dataId).remove(); - }, - success: function () { //完成的回调 - //处理排序 - $(_config.elem).find('thead > tr > th').each(function () { - var $that = $(this); - var field = $that.data('name'); - $that.find('div.up').off('click').on('click', function () { - $(this).hide(); - $(this).siblings('div.down').show(); - $that.siblings('th').each(function () { - if ($(this).attr('data-name')) { - $(this).find('div.up').show(); - $(this).find('div.down').show(); - } - }); - paging.get({ - sort: field, - order: 'asc' - }); - }); - $that.find('div.down').off('click').on('click', function () { - $(this).hide(); - $(this).siblings('div.up').show(); - $that.siblings('th').each(function () { - if ($(this).attr('data-name')) { - $(this).find('div.up').show(); - $(this).find('div.down').show(); - } - }); - paging.get({ - sort: field, - order: 'desc' - }); - }); - }); - //重新渲染复选框 - form.render('checkbox'); - form.on('checkbox(allselector)', function (data) { - var elem = data.elem; - - $(_config.elem).find('tbody.btable-content').children('tr').each(function () { - var $that = $(this); - //全选或反选 - $that.children('td').eq(0).children('input[type=checkbox]')[0].checked = elem.checked; - form.render('checkbox'); - }); - }); - if (_config.checkbox) { - //绑定选择行事件 - $(_config.elem).find('tbody.btable-content').children('tr').each(function (e) { - var $that = $(this); - $that.on('click', function () { - //只允许选择一行 - if (_config.singleSelect) { - $that.siblings().each(function () { - $(this).children('td').eq(0).children('input[type=checkbox]')[0].checked = false - }); - $that.children('td').eq(0).children('input[type=checkbox]')[0].checked = true; - } else { - //获取当前的状态 - var currState = $that.children('td').eq(0).children('input[type=checkbox]')[0].checked; - $that.children('td').eq(0).children('input[type=checkbox]')[0].checked = !currState; - - //当前已选择的总行数 - var cbxCount = 0; - $that.parent('tbody').children('tr').each(function () { - var $that = $(this); - if ($that.children('td:first-child').children('input')[0].checked) { - cbxCount++; - } - }); - $(_config.elem).find('thead').children('tr').children('th:first-child').children('input[type=checkbox]')[0].checked = - $that.parent('tbody').children('tr').length === cbxCount; - } - form.render('checkbox'); - }); - }); - } - //渲染成功后的回调 - if (_config.onSuccess) - _config.onSuccess($(_config.elem).find('tbody.btable-content')); - } - }); - return that; - }; - /** - * get方法,一般用到添加额外的条件时用到,比如搜索功能 - */ - BTable.prototype.get = function (options) { - paging.get(options); - }; - /** - * 获取选择的行。 - */ - BTable.prototype.getSelected = function (callback) { - var that = this; - var _config = that.config; - if (!_config.singleSelect) - return callback({}); - var $tbody = $(_config.elem).find('tbody.btable-content'); - $tbody.children('tr').each(function () { - var $that = $(this); - var $input = $that.children('td:first-child').children('input') - if ($input[0].checked) { - callback({ - elem: $that, - id: $input.data('id') - }); - } - }); - return that; - }; - /** - * 是否有选中的行 - */ - BTable.prototype.isSelected = function () { - var that = this; - var _config = that.config; - if (!_config.singleSelect) - return callback({}); - var $tbody = $(_config.elem).find('tbody.btable-content'); - var flag = false; - $tbody.children('tr').each(function () { - var $that = $(this); - var $input = $that.children('td:first-child').children('input') - if ($input[0].checked) { - flag = true; - } - }); - return flag; - }; - /** - * 获取选择的所有行数据 - */ - BTable.prototype.getSelections = function (callback) { - var that = this; - var _config = that.config; - var $tbody = $(_config.elem).find('tbody.btable-content'); - var dom = []; - var ids = []; - var index = 0; - $tbody.children('tr').each(function () { - var $that = $(this); - var $input = $that.children('td:first-child').children('input'); - if ($input[0].checked) { - dom[index] = $that; - ids[index] = $input.data('id'); - index++; - } - }); - return callback({ - elem: dom, - ids: ids, - count: dom.length - }); - }; - - /** - * 获取模板 - * @param {Object} options - */ - function getTpl(options) { - var columns = options.columns; - var tpl = '{{# if(d.list.length>0 && d.list!=undefined){ }}'; - tpl += '{{# layui.each(d.list, function(index, item){ }}'; - var tds = ''; - for (var i = 0; i < columns.length; i++) { - tds += '{{ item.' + columns[i].field + ' }}'; - } - if (options.checkbox) { - tds = '{{ (index+1) }}' + tds; - } else { - tds = '{{ (index+1) }}' + tds; - } - tpl += '' + tds + '' - tpl += '{{# }); }}'; - tpl += '{{# }else{ }}'; - var colLength = options.checkbox && !options.singleSelect ? columns.length + 1 : columns.length; - tpl += '暂无数据.'; - tpl += '{{# } }}'; - return tpl; - } - - var btable = new BTable(); - - exports('btable', function (options) { - return btable.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/city.js b/xxpay-mgr/src/main/resources/static/js/city.js deleted file mode 100755 index 9a168353ac43e38d127314f839d04d775e84ef8c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/city.js +++ /dev/null @@ -1,214 +0,0 @@ -/** common.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['jquery'], function(exports) { - "use strict"; - var jQuery = layui.jquery; - /** - * jquery.citys.js 1.0 - * http://jquerywidget.com - */ - ; - (function($) { - $.support.cors = true; - $.fn.citys = function(parameter, getApi) { - if(typeof parameter == 'function') { //重载 - getApi = parameter; - parameter = {}; - } else { - parameter = parameter || {}; - getApi = getApi || function() {}; - } - var defaults = { - dataUrl: 'http://passer-by.com/data_location/list.json', //数据库地址 - dataType: 'json', //数据库类型:'json'或'jsonp' - provinceField: 'province', //省份字段名 - cityField: 'city', //城市字段名 - areaField: 'area', //地区字段名 - code: 0, //地区编码 - province: 0, //省份,可以为地区编码或者名称 - city: 0, //城市,可以为地区编码或者名称 - area: 0, //地区,可以为地区编码或者名称 - required: true, //是否必须选一个 - nodata: 'hidden', //当无数据时的表现形式:'hidden'隐藏,'disabled'禁用,为空不做任何处理 - onChange: function() {} //地区切换时触发,回调函数传入地区数据 - }; - var options = $.extend({}, defaults, parameter); - return this.each(function() { - //对象定义 - var _api = {}; - var $this = $(this); - var $province = $this.find('select[name="' + options.provinceField + '"]'), - $city = $this.find('select[name="' + options.cityField + '"]'), - $area = $this.find('select[name="' + options.areaField + '"]'); - $.ajax({ - url: options.dataUrl, - type: 'GET', - crossDomain: true, - dataType: options.dataType, - jsonpCallback: 'jsonp_location', - success: function(data) { - var province, city, area, hasCity; - if(options.code) { //如果设置地区编码,则忽略单独设置的信息 - var c = options.code - options.code % 1e4; - if(data[c]) { - options.province = c; - } - c = options.code - (options.code % 1e4 ? options.code % 1e2 : options.code); - if(data[c]) { - options.city = c; - } - c = options.code % 1e2 ? options.code : 0; - if(data[c]) { - options.area = c; - } - } - var updateData = function() { - province = {}, city = {}, area = {}; - hasCity = false; //判断是非有地级城市 - for(code in data) { - if(!(code % 1e4)) { //获取所有的省级行政单位 - province[code] = data[code]; - if(options.required && !options.province) { - if(options.city && !(options.city % 1e4)) { //省未填,并判断为直辖市 - options.province = options.city; - } else { - options.province = code; - } - } else if(data[code].indexOf(options.province) > -1) { - options.province = isNaN(options.province) ? code : options.province; - } - } else { - var p = code - options.province; - if(options.province && p > 0 && p < 1e4) { //同省的城市或地区 - if(!(code % 100)) { - hasCity = true; - city[code] = data[code]; - if(options.required && !options.city) { - options.city = code; - } else if(data[code].indexOf(options.city) > -1) { - options.city = isNaN(options.city) ? code : options.city; - } - } else if(p > 9000) { //省直辖县级行政单位 - city[code] = data[code]; - } else if(hasCity) { //非直辖市 - var c = code - options.city; - if(options.city && c > 0 && c < 100) { //同个城市的地区 - area[code] = data[code]; - if(options.required && !options.area) { - options.area = code; - } else if(data[code].indexOf(options.area) > -1) { - options.area = isNaN(options.area) ? code : options.area; - } - } - } else { - city[code] = data[code]; //直辖市 - if(options.area) { - options.city = options.area; - options.area = ''; - } - if(options.required && !options.city) { - options.city = code; - } else if(data[code].indexOf(options.city) > -1) { - options.city = isNaN(options.city) ? code : options.city; - } - } - } - } - } - }; - var format = { - province: function() { - $province.empty(); - if(!options.required) { - $province.append(''); - } - for(i in province) { - $province.append(''); - } - if(options.province) { - $province.val(options.province); - } - this.city(); - }, - city: function() { - $city.empty(); - if(!options.required) { - $city.append(''); - } - if(options.nodata == 'disabled') { - $city.prop('disabled', $.isEmptyObject(city)); - } else if(options.nodata == 'hidden') { - $city.css('display', $.isEmptyObject(city) ? 'none' : ''); - } - for(i in city) { - $city.append(''); - } - if(options.city) { - $city.val(options.city); - } - this.area(); - }, - area: function() { - $area.empty(); - if(!hasCity) { - $area.css('display', 'none'); - } else { - $area.css('display', ''); - if(!options.required) { - $area.append(''); - } - if(options.nodata == 'disabled') { - $area.prop('disabled', $.isEmptyObject(area)); - } else if(options.nodata == 'hidden') { - $area.css('display', $.isEmptyObject(area) ? 'none' : ''); - } - for(i in area) { - $area.append(''); - } - if(options.area) { - $area.val(options.area); - } - } - } - }; - //获取当前地理信息 - _api.getInfo = function() { - var status = { - direct: !hasCity, - province: data[options.province] || '', - city: data[options.city] || '', - area: data[options.area] || '', - code: options.area || options.city || options.province - }; - return status; - }; - //事件绑定 - $province.on('change', function() { - options.province = $(this).val(); - options.city = 0; - options.area = 0; - updateData(); - format.city(); - options.onChange(_api.getInfo()); - }); - $city.on('change', function() { - options.city = $(this).val(); - options.area = 0; - updateData(); - format.area(); - options.onChange(_api.getInfo()); - }); - $area.on('change', function() { - options.area = $(this).val(); - options.onChange(_api.getInfo()); - }); - //初始化 - updateData(); - format.province(); - getApi(_api); - } - }); - }); - }; - })(jQuery); - exports('city', null); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/common.js b/xxpay-mgr/src/main/resources/static/js/common.js deleted file mode 100755 index 635f0b281acad920d547dd6cf2439bfdc6cfa174..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/common.js +++ /dev/null @@ -1,30 +0,0 @@ -/** common.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['layer'], function(exports) { - "use strict"; - - var $ = layui.jquery, - layer = layui.layer; - - var common = { - /** - * 抛出一个异常错误信息 - * @param {String} msg - */ - throwError: function(msg) { - throw new Error(msg); - return; - }, - /** - * 弹出一个错误提示 - * @param {String} msg - */ - msgError: function(msg) { - layer.msg(msg, { - icon: 5 - }); - return; - } - }; - - exports('common', common); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/index.js b/xxpay-mgr/src/main/resources/static/js/index.js deleted file mode 100755 index 2db7927aef800db95153f42b04cdc54c20829fb1..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/index.js +++ /dev/null @@ -1,216 +0,0 @@ -/** index.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ - -var tab; - -layui.config({ - base: 'js/', - version: new Date().getTime() -}).use(['element', 'layer', 'navbar', 'tab'], function () { - var element = layui.element(), - $ = layui.jquery, - layer = layui.layer, - navbar = layui.navbar(); - tab = layui.tab({ - elem: '.admin-nav-card' //设置选项卡容器 - , - //maxSetting: { - // max: 5, - // tipMsg: '只能开5个哇,不能再开了。真的。' - //}, - contextMenu: true, - onSwitch: function (data) { - console.log(data.id); //当前Tab的Id - console.log(data.index); //得到当前Tab的所在下标 - console.log(data.elem); //得到当前的Tab大容器 - - console.log(tab.getCurrentTabId()) - } - }); - //iframe自适应 - $(window).on('resize', function () { - var $content = $('.admin-nav-card .layui-tab-content'); - $content.height($(this).height() - 147); - $content.find('iframe').each(function () { - $(this).height($content.height()); - }); - }).resize(); - - //设置navbar - navbar.set({ - spreadOne: true, - elem: '#admin-navbar-side', - cached: true, - data: navs - /*cached:true, - url: 'datas/nav.json'*/ - }); - //渲染navbar - navbar.render(); - //监听点击事件 - navbar.on('click(side)', function (data) { - tab.tabAdd(data.field); - }); - //清除缓存 - $('#clearCached').on('click', function () { - navbar.cleanCached(); - layer.alert('清除完成!', { icon: 1, title: '系统提示' }, function () { - location.reload();//刷新 - }); - }); - - $('.admin-side-toggle').on('click', function () { - var sideWidth = $('#admin-side').width(); - if (sideWidth === 200) { - $('#admin-body').animate({ - left: '0' - }); //admin-footer - $('#admin-footer').animate({ - left: '0' - }); - $('#admin-side').animate({ - width: '0' - }); - } else { - $('#admin-body').animate({ - left: '200px' - }); - $('#admin-footer').animate({ - left: '200px' - }); - $('#admin-side').animate({ - width: '200px' - }); - } - }); - $('.admin-side-full').on('click', function () { - var docElm = document.documentElement; - //W3C - if (docElm.requestFullscreen) { - docElm.requestFullscreen(); - } - //FireFox - else if (docElm.mozRequestFullScreen) { - docElm.mozRequestFullScreen(); - } - //Chrome等 - else if (docElm.webkitRequestFullScreen) { - docElm.webkitRequestFullScreen(); - } - //IE11 - else if (elem.msRequestFullscreen) { - elem.msRequestFullscreen(); - } - layer.msg('按Esc即可退出全屏'); - }); - - $('#setting').on('click', function () { - tab.tabAdd({ - href: '/Manage/Account/Setting/', - icon: 'fa-gear', - title: '设置' - }); - }); - - //锁屏 - $(document).on('keydown', function () { - var e = window.event; - if (e.keyCode === 76 && e.altKey) { - //alert("你按下了alt+l"); - lock($, layer); - } - }); - $('#lock').on('click', function () { - lock($, layer); - }); - - //手机设备的简单适配 - var treeMobile = $('.site-tree-mobile'), - shadeMobile = $('.site-mobile-shade'); - treeMobile.on('click', function () { - $('body').addClass('site-mobile'); - }); - shadeMobile.on('click', function () { - $('body').removeClass('site-mobile'); - }); -}); - -var isShowLock = false; -function lock($, layer) { - if (isShowLock) - return; - //自定页 - layer.open({ - title: false, - type: 1, - closeBtn: 0, - anim: 6, - content: $('#lock-temp').html(), - shade: [0.9, '#393D49'], - success: function (layero, lockIndex) { - isShowLock = true; - //给显示用户名赋值 - //layero.find('div#lockUserName').text('admin'); - //layero.find('input[name=username]').val('admin'); - layero.find('input[name=password]').on('focus', function () { - var $this = $(this); - if ($this.val() === '输入密码解锁..') { - $this.val('').attr('type', 'password'); - } - }) - .on('blur', function () { - var $this = $(this); - if ($this.val() === '' || $this.length === 0) { - $this.attr('type', 'text').val('输入密码解锁..'); - } - }); - //在此处可以写一个请求到服务端删除相关身份认证,因为考虑到如果浏览器被强制刷新的时候,身份验证还存在的情况 - //do something... - //e.g. - - $.getJSON('/Account/Logout', null, function (res) { - if (!res.rel) { - layer.msg(res.msg); - } - }, 'json'); - - //绑定解锁按钮的点击事件 - layero.find('button#unlock').on('click', function () { - var $lockBox = $('div#lock-box'); - - var userName = $lockBox.find('input[name=username]').val(); - var pwd = $lockBox.find('input[name=password]').val(); - if (pwd === '输入密码解锁..' || pwd.length === 0) { - layer.msg('请输入密码..', { - icon: 2, - time: 1000 - }); - return; - } - unlock(userName, pwd); - }); - /** - * 解锁操作方法 - * @param {String} 用户名 - * @param {String} 密码 - */ - var unlock = function (un, pwd) { - console.log(un, pwd); - //这里可以使用ajax方法解锁 - $.post('/Account/UnLock', { userName: un, password: pwd }, function (res) { - //验证成功 - if (res.rel) { - //关闭锁屏层 - layer.close(lockIndex); - isShowLock = false; - } else { - layer.msg(res.msg, { icon: 2, time: 1000 }); - } - }, 'json'); - //isShowLock = false; - //演示:默认输入密码都算成功 - //关闭锁屏层 - //layer.close(lockIndex); - }; - } - }); -}; \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/layout.js b/xxpay-mgr/src/main/resources/static/js/layout.js deleted file mode 100755 index 993a8a4597882731c32d1cd19999f33d4490e541..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/layout.js +++ /dev/null @@ -1,120 +0,0 @@ -layui.config({ - base: 'js/' -}).use(['element', 'layer', 'navbar', 'tab'], function() { - var element = layui.element() - $ = layui.jquery, - layer = layui.layer, - navbar = layui.navbar(), - tab = layui.tab({ - elem: '.layout-nav-card', //设置选项卡容器 - contextMenu:true - }); - - //iframe自适应 - $(window).on('resize', function() { - var $content = $('.layout-nav-card .layui-tab-content'); - $content.height($(this).height() - 165); - $content.find('iframe').each(function() { - $(this).height($content.height()); - }); - }).resize(); - - var $menu = $('#menu'); - $menu.find('li.layui-nav-item').each(function() { - var $this = $(this); - //绑定一级导航的点击事件 - $this.on('click', function() { - //获取设置的模块ID - var id = $this.find('a').data('module-id'); - //这里的数据源只是演示时用的,实际需求可能通过远程读取(根据模块ID来获取对应模块的信息) - var url; - switch(id) { - case 1: - url = 'datas/nav_content.json'; - break; - case 3: - url = 'datas/nav_member.json'; - break; - default: - break; - } - //设置数据源有两个方式。 - //第一:在此页面通过ajax读取设置 举个栗子: - //---------这是第一个栗子---------- - /*$.getJSON('/api/xxx',{moduleId:id},function(data){ - navbar.set({ - elem: '#side', - data: data - }); - navbar.render(); - navbar.on('click(side)', function(data) { - tab.tabAdd(data.field); - }); - });*/ - //------------栗子结束-------------- - //第二:设置url - //---------这是第二个栗子---------- - /*navbar.set({ - elem: '#side', - url: '/api/xxx?moduleId='+id - }); - navbar.render(); - navbar.on('click(side)', function(data) { - tab.tabAdd(data.field); - });*/ - //------------栗子结束-------------- - - //设置navbar - navbar.set({ - elem: '#side', //存在navbar数据的容器ID - url: url - }); - //渲染navbar - navbar.render(); - //监听点击事件 - navbar.on('click(side)', function(data) { - layer.msg(data.field.href); - tab.tabAdd(data.field); - }); - }); - - }); - //模拟点击内容管理 - $('.beg-layout-menu').find('a[data-module-id=1]').click(); - - element.on('nav(user)', function(data) { - var $a = data.children('a'); - if($a.data('tab') !== undefined && $a.data('tab')) { - tab.tabAdd({ - title: $a.children('cite').text(), - //icon: 'fa-user', - href: $a.data('url') - }); - } - }); - - $('.beg-layout-side-toggle').on('click', function() { - var sideWidth = $('.beg-layout-side').width(); - if(sideWidth === 200) { - $('.beg-layout-body').animate({ - left: '0' - }); - $('.beg-layout-footer').animate({ - left: '0' - }); - $('.beg-layout-side').animate({ - width: '0' - }); - } else { - $('.beg-layout-body').animate({ - left: '200px' - }); - $('.beg-layout-footer').animate({ - left: '200px' - }); - $('.beg-layout-side').animate({ - width: '200px' - }); - } - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/navbar.js b/xxpay-mgr/src/main/resources/static/js/navbar.js deleted file mode 100755 index dd0ce256d6c9208a15b191ecbfe24c8513c6b8aa..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/navbar.js +++ /dev/null @@ -1,253 +0,0 @@ -/** navbar.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['element', 'common'], function (exports) { - "use strict"; - var $ = layui.jquery, - layer = parent.layer === undefined ? layui.layer : parent.layer, - element = layui.element(), - common = layui.common, - cacheName = 'tb_navbar'; - - var Navbar = function () { - /** - * 默认配置 - */ - this.config = { - elem: undefined, //容器 - data: undefined, //数据源 - url: undefined, //数据源地址 - type: 'GET', //读取方式 - cached: false, //是否使用缓存 - spreadOne: false //设置是否只展开一个二级菜单 - }; - this.v = '1.0.0'; - }; - //渲染 - Navbar.prototype.render = function () { - var _that = this; - var _config = _that.config; - if (typeof (_config.elem) !== 'string' && typeof (_config.elem) !== 'object') { - common.throwError('Navbar error: elem参数未定义或设置出错,具体设置格式请参考文档API.'); - } - var $container; - if (typeof (_config.elem) === 'string') { - $container = $('' + _config.elem + ''); - } - if (typeof (_config.elem) === 'object') { - $container = _config.elem; - } - if ($container.length === 0) { - common.throwError('Navbar error:找不到elem参数配置的容器,请检查.'); - } - if (_config.data === undefined && _config.url === undefined) { - common.throwError('Navbar error:请为Navbar配置数据源.') - } - if (_config.data !== undefined && typeof (_config.data) === 'object') { - var html = getHtml(_config.data); - $container.html(html); - element.init(); - _that.config.elem = $container; - } else { - if (_config.cached) { - var cacheNavbar = layui.data(cacheName); - if (cacheNavbar.navbar === undefined) { - $.ajax({ - type: _config.type, - url: _config.url, - async: false, //_config.async, - dataType: 'json', - success: function (result, status, xhr) { - //添加缓存 - layui.data(cacheName, { - key: 'navbar', - value: result - }); - var html = getHtml(result); - $container.html(html); - element.init(); - }, - error: function (xhr, status, error) { - common.msgError('Navbar error:' + error); - }, - complete: function (xhr, status) { - _that.config.elem = $container; - } - }); - } else { - var html = getHtml(cacheNavbar.navbar); - $container.html(html); - element.init(); - _that.config.elem = $container; - } - } else { - //清空缓存 - layui.data(cacheName, null); - $.ajax({ - type: _config.type, - url: _config.url, - async: false, //_config.async, - dataType: 'json', - success: function (result, status, xhr) { - var html = getHtml(result); - $container.html(html); - element.init(); - }, - error: function (xhr, status, error) { - common.msgError('Navbar error:' + error); - }, - complete: function (xhr, status) { - _that.config.elem = $container; - } - }); - } - } - - //只展开一个二级菜单 - if (_config.spreadOne) { - var $ul = $container.children('ul'); - $ul.find('li.layui-nav-item').each(function () { - $(this).on('click', function () { - $(this).siblings().removeClass('layui-nav-itemed'); - }); - }); - } - return _that; - }; - /** - * 配置Navbar - * @param {Object} options - */ - Navbar.prototype.set = function (options) { - var that = this; - that.config.data = undefined; - $.extend(true, that.config, options); - return that; - }; - /** - * 绑定事件 - * @param {String} events - * @param {Function} callback - */ - Navbar.prototype.on = function (events, callback) { - var that = this; - var _con = that.config.elem; - if (typeof (events) !== 'string') { - common.throwError('Navbar error:事件名配置出错,请参考API文档.'); - } - var lIndex = events.indexOf('('); - var eventName = events.substr(0, lIndex); - var filter = events.substring(lIndex + 1, events.indexOf(')')); - if (eventName === 'click') { - if (_con.attr('lay-filter') !== undefined) { - _con.children('ul').find('li').each(function () { - var $this = $(this); - if ($this.find('dl').length > 0) { - var $dd = $this.find('dd').each(function () { - $(this).on('click', function () { - var $a = $(this).children('a'); - var href = $a.data('url'); - var icon = $a.children('i:first').data('icon'); - var title = $a.children('cite').text(); - var data = { - elem: $a, - field: { - href: href, - icon: icon, - title: title - } - } - callback(data); - }); - }); - } else { - $this.on('click', function () { - var $a = $this.children('a'); - var href = $a.data('url'); - var icon = $a.children('i:first').data('icon'); - var title = $a.children('cite').text(); - var data = { - elem: $a, - field: { - href: href, - icon: icon, - title: title - } - } - callback(data); - }); - } - }); - } - } - }; - /** - * 清除缓存 - */ - Navbar.prototype.cleanCached = function () { - layui.data(cacheName, null); - }; - /** - * 获取html字符串 - * @param {Object} data - */ - function getHtml(data) { - //debugger; - var ulHtml = ''; - - return ulHtml; - } - - var navbar = new Navbar(); - - exports('navbar', function (options) { - return navbar.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/paging.js b/xxpay-mgr/src/main/resources/static/js/paging.js deleted file mode 100755 index 06c270324396b7171f972bdff65dbadcd8caf287..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/paging.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * Paging 组件 - * @description 基于laytpl 、laypage、layer 封装的组件 - * @author Van zheng_jinfan@126.com - * @link http://m.zhengjinfan.cn - * @license MIT - * @version 1.0.1 - */ -layui.define(['layer', 'laypage', 'laytpl'], function (exports) { - "use strict"; - var $ = layui.jquery, - layer = parent.layui.layer === undefined ? layui.layer : parent.layui.layer, - laytpl = layui.laytpl; - - var Paging = function () { - this.config = { - url: undefined, //数据远程地址 - type: 'POST', //数据的获取方式 get or post - elem: undefined, //内容容器 - params: {}, //获取数据时传递的额外参数 - openWait: false, //加载数据时是否显示等待框 - tempElem: undefined, //模板容器 - tempType: 0, //如果等于0则需要设置模板容器,1为提供模板内容 - paged: true,//是否显示分页组件 - pageConfig: { //参数应该为object类型 - elem: undefined, - pageSize: 15 //分页大小 - }, - success: undefined, //type:function - fail: function (res) { - console.log(res.msg); - //layer.msg(res.msg, { icon: 2 }); - }, //type:function - complate: undefined, //type:function - serverError: function (xhr, status, error) { //ajax的服务错误 - throwError("错误提示: " + xhr.status + " " + xhr.statusText); - } - }; - }; - /** - * 版本号 - */ - Paging.prototype.v = '1.0.3'; - - /** - * 设置 - * @param {Object} options - */ - Paging.prototype.set = function (options) { - var that = this; - $.extend(true, that.config, options); - return that; - }; - /** - * 初始化 - * @param {Object} options - */ - Paging.prototype.init = function (options) { - var that = this; - $.extend(true, that.config, options); - var _config = that.config; - if (_config.url === undefined) { - throwError('Paging Error:请配置远程URL!'); - } - if (_config.elem === undefined) { - throwError('Paging Error:请配置参数elem!'); - } - if ($(_config.elem).length === 0) { - throwError('Paging Error:找不到配置的容器elem!'); - } - if (_config.tempType === 0) { - if (_config.tempElem === undefined) { - throwError('Paging Error:请配置参数tempElem!'); - } - if ($(_config.tempElem).length === 0) { - throwError('Paging Error:找不到配置的容器tempElem!'); - } - } - if (_config.paged) { - var _pageConfig = _config.pageConfig; - if (_pageConfig.elem === undefined) { - throwError('Paging Error:请配置参数pageConfig.elem!'); - } - } - if (_config.type.toUpperCase() !== 'GET' && _config.type.toUpperCase() !== 'POST') { - throwError('Paging Error:type参数配置出错,只支持GET或都POST'); - } - that.get({ - pageIndex: 1, - pageSize: _config.pageConfig.pageSize - }); - - return that; - }; - /** - * 获取数据 - * @param {Object} options - */ - Paging.prototype.get = function (options) { - var that = this; - var _config = that.config; - var loadIndex = undefined; - if (_config.openWait) { - loadIndex = layer.load(2); - } - //默认参数 - var df = { - pageIndex: 1, - pageSize: _config.pageConfig.pageSize - }; - $.extend(true, _config.params, df, options); - $.ajax({ - type: _config.type, - url: _config.url, - data: _config.params, - dataType: 'json', - success: function (result, status, xhr) { - if (loadIndex !== undefined) - layer.close(loadIndex); //关闭等待层 - if (result.rel) { - //获取模板 - var tpl = _config.tempType === 0 ? $(_config.tempElem).html() : _config.tempElem; - //渲染数据 - laytpl(tpl).render(result, function (html) { - if (_config.renderBefore) { - _config.renderBefore(html, function (formatHtml) { - $(_config.elem).html(formatHtml); - }, result.list); - } - else { - $(_config.elem).html(html); - } - }); - if (_config.paged) { - if (result.count === null || result.count === undefined) { - throwError('Paging Error:请返回数据总数!'); - return; - } - var _pageConfig = _config.pageConfig; - var pageSize = _pageConfig.pageSize; - var pages = result.count % pageSize == 0 ? - (result.count / pageSize) : (result.count / pageSize + 1); - var defaults = { - cont: $(_pageConfig.elem), - curr: _config.params.pageIndex, - pages: pages, - jump: function (obj, first) { - //得到了当前页,用于向服务端请求对应数据 - var curr = obj.curr; - if (!first) { - that.get({ - pageIndex: curr, - pageSize: pageSize - }); - } - } - }; - $.extend(defaults, _pageConfig); //参数合并 - layui.laypage(defaults); //调用laypage组件渲染分页 - } - if (_config.success) { - _config.success(); //渲染成功 - } - } else { - var thLength = $(_config.elem).siblings('thead').find('th').length; - $(_config.elem).html('' + result.msg + ''); - if (_config.fail) { - _config.fail(result); //获取数据失败 - } - } - if (_config.complate) { - _config.complate(); //渲染完成 - } - }, - error: function (xhr, status, error) { - if (loadIndex !== undefined) - layer.close(loadIndex); //关闭等待层 - _config.serverError(xhr, status, error); //服务器错误 - } - }); - }; - /** - * 抛出一个异常错误信息 - * @param {String} msg - */ - function throwError(msg) { - throw new Error(msg); - }; - - var paging = new Paging(); - exports('paging', function (options) { - return paging.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/tab.js b/xxpay-mgr/src/main/resources/static/js/tab.js deleted file mode 100755 index d4c1e6bfcf4d0dfc2aea1a020e30478e343e8ba6..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/tab.js +++ /dev/null @@ -1,291 +0,0 @@ -/** tab.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(['element', 'common'], function (exports) { - "use strict"; - - var mod_name = 'tab', - $ = layui.jquery, - element = layui.element(), - commo = layui.common, - globalTabIdIndex = 0, - layer = layui.layer, - Tab = function () { - this.config = { - elem: undefined, - closed: true, //是否包含删除按钮 - autoRefresh: false, - contextMenu: false, - onSwitch: undefined, - openWait: true - }; - }; - var ELEM = {}; - //版本号 - Tab.prototype.v = '0.1.5'; - /** - * 参数设置 - * @param {Object} options - */ - Tab.prototype.set = function (options) { - var that = this; - $.extend(true, that.config, options); - return that; - }; - /** - * 初始化 - */ - Tab.prototype.init = function () { - var that = this; - var _config = that.config; - if (typeof (_config.elem) !== 'string' && typeof (_config.elem) !== 'object') { - common.throwError('Tab error: elem参数未定义或设置出错,具体设置格式请参考文档API.'); - } - var $container; - if (typeof (_config.elem) === 'string') { - $container = $('' + _config.elem + ''); - } - if (typeof (_config.elem) === 'object') { - $container = _config.elem; - } - if ($container.length === 0) { - common.throwError('Tab error:找不到elem参数配置的容器,请检查.'); - } - var filter = $container.attr('lay-filter'); - if (filter === undefined || filter === '') { - common.throwError('Tab error:请为elem容器设置一个lay-filter过滤器'); - } - _config.elem = $container; - ELEM.titleBox = $container.children('ul.layui-tab-title'); - ELEM.contentBox = $container.children('div.layui-tab-content'); - ELEM.tabFilter = filter; - return that; - }; - /** - * 查询tab是否存在,如果存在则返回索引值,不存在返回-1 - * @param {String} 标题 - */ - Tab.prototype.exists = function (title) { - var that = ELEM.titleBox === undefined ? this.init() : this, - tabIndex = -1; - ELEM.titleBox.find('li').each(function (i, e) { - var $cite = $(this).children('cite'); - if ($cite.text() === title) { - tabIndex = i; - }; - }); - return tabIndex; - }; - /** - * 获取tabid - * @param {String} 标题 - */ - Tab.prototype.getTabId = function (title) { - var that = ELEM.titleBox === undefined ? this.init() : this, - tabId = -1; - ELEM.titleBox.find('li').each(function (i, e) { - var $cite = $(this).children('cite'); - if ($cite.text() === title) { - tabId = $(this).attr('lay-id'); - }; - }); - return tabId; - }; - /** - * 添加选择卡,如果选择卡存在则获取焦点 - * @param {Object} data - */ - Tab.prototype.tabAdd = function (data) { - var that = this; - var _config = that.config; - var tabIndex = that.exists(data.title); - var waitLoadIndex; - if (tabIndex === -1) { - if (_config.openWait) { - waitLoadIndex = layer.load(2); - } - //设置只能同时打开多少个tab选项卡 - if (_config.maxSetting !== 'undefined') { - var currentTabCount = _config.elem.children('ul.layui-tab-title').children('li').length; - if (typeof _config.maxSetting === 'number') { - if (currentTabCount === _config.maxSetting) { - layer.msg('为了系统的流畅度,只能同时打开' + _config.maxSetting + '个选项卡。'); - return; - } - } - if (typeof _config.maxSetting === 'object') { - var max = _config.maxSetting.max || 8; - var msg = _config.maxSetting.tipMsg || '为了系统的流畅度,只能同时打开' + max + '个选项卡。'; - if (currentTabCount === max) { - layer.msg(msg); - return; - } - } - } - globalTabIdIndex++; - var content = ''; - var title = ''; - if (data.icon !== undefined) { - if (data.icon.indexOf('fa-') !== -1) { - title += ''; - } else { - title += '' + data.icon + ''; - } - } - title += '' + data.title + ''; - if (_config.closed) { - title += ''; - } - //添加tab - element.tabAdd(ELEM.tabFilter, { - title: title, - content: content, - id: new Date().getTime() - }); - //iframe 自适应 - ELEM.contentBox.find('iframe[data-id=' + globalTabIdIndex + ']').each(function () { - $(this).height(ELEM.contentBox.height()); - }); - if (_config.closed) { - //监听关闭事件 - ELEM.titleBox.find('li').children('i.layui-tab-close[data-id=' + globalTabIdIndex + ']').on('click', function () { - element.tabDelete(ELEM.tabFilter, $(this).parent('li').attr('lay-id')).init(); - if (_config.contextMenu) { - $(document).find('div.uiba-contextmenu').remove(); //移除右键菜单dom - } - }); - }; - //切换到当前打开的选项卡 - element.tabChange(ELEM.tabFilter, that.getTabId(data.title)); - - ELEM.contentBox.find('iframe[data-id=' + globalTabIdIndex + ']').on('load', function () { - //debugger; - if (_config.openWait) { - layer.close(waitLoadIndex); - } - }); - } else { - element.tabChange(ELEM.tabFilter, that.getTabId(data.title)); - //自动刷新 - if (_config.autoRefresh) { - _config.elem.find('div.layui-tab-content > div').eq(tabIndex).children('iframe')[0].contentWindow.location.reload(); - } - } - if (_config.contextMenu) { - element.on('tab(' + ELEM.tabFilter + ')', function (data) { - $(document).find('div.admin-contextmenu').remove(); - }); - ELEM.titleBox.find('li').on('contextmenu', function (e) { - var $that = $(e.target); - e.preventDefault(); - e.stopPropagation(); - - var $target = e.target.nodeName === 'LI' ? e.target : e.target.parentElement; - //判断,如果存在右键菜单的div,则移除,保存页面上只存在一个 - if ($(document).find('div.admin-contextmenu').length > 0) { - $(document).find('div.admin-contextmenu').remove(); - } - //创建一个div - var div = document.createElement('div'); - //设置一些属性 - div.className = 'admin-contextmenu'; - div.style.width = '130px'; - div.style.backgroundColor = 'white'; - - var ul = '
    '; - ul += '
  • 刷新
  • '; - ul += '
  • 关闭当前
  • '; - ul += '
  • 关闭其他
  • '; - ul += '
  • 全部关闭
  • '; - ul += '
'; - div.innerHTML = ul; - div.style.top = e.pageY + 'px'; - div.style.left = e.pageX + 'px'; - //将dom添加到body的末尾 - document.getElementsByTagName('body')[0].appendChild(div); - - //获取当前点击选项卡的id值 - var id = $($target).find('i.layui-tab-close').data('id'); - //获取当前点击选项卡的索引值 - var clickIndex = $($target).attr('lay-id'); - var $context = $(document).find('div.admin-contextmenu'); - if ($context.length > 0) { - $context.eq(0).children('ul').children('li').each(function () { - var $that = $(this); - //绑定菜单的点击事件 - $that.on('click', function () { - //获取点击的target值 - var target = $that.data('target'); - // - switch (target) { - case 'refresh': //刷新当前 - var src = ELEM.contentBox.find('iframe[data-id=' + id + ']')[0].src; - ELEM.contentBox.find('iframe[data-id=' + id + ']')[0].src = src; - break; - case 'closeCurrent': //关闭当前 - if (clickIndex !== 0) { - element.tabDelete(ELEM.tabFilter, clickIndex); - } - break; - case 'closeOther': //关闭其他 - ELEM.titleBox.children('li').each(function () { - var $t = $(this); - var id1 = $t.find('i.layui-tab-close').data('id'); - if (id1 != id && id1 !== undefined) { - element.tabDelete(ELEM.tabFilter, $t.attr('lay-id')); - } - }); - break; - case 'closeAll': //全部关闭 - ELEM.titleBox.children('li').each(function () { - var $t = $(this); - if ($t.index() !== 0) { - element.tabDelete(ELEM.tabFilter, $t.attr('lay-id')); - } - }); - break; - } - //处理完后移除右键菜单的dom - $context.remove(); - }); - }); - - $(document).on('click', function () { - $context.remove(); - }); - } - return false; - }); - } - - if (_config.onSwitch) { - element.on('tab(' + ELEM.tabFilter + ')', function (data) { - _config.onSwitch({ - index: data.index, - elem: data.elem, - id: ELEM.titleBox.children('li').eq(data.index).attr('lay-id') - }); - }); - } - }; - /** - * 获取当前获得焦点的tabid - */ - Tab.prototype.getCurrentTabId = function () { - var that = this; - var _config = that.config; - return $(_config.elem).find('ul.layui-tab-title').children('li.layui-this').attr('lay-id'); - } - /** - * 删除指定的tab选项卡 - * @param {String} id - */ - Tab.prototype.deleteTab = function (id) { - var that = this; - element.tabDelete(ELEM.tabFilter, id); - return that; - } - - var tab = new Tab(); - exports(mod_name, function (options) { - return tab.set(options); - }); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/js/validator.js b/xxpay-mgr/src/main/resources/static/js/validator.js deleted file mode 100755 index 0a5bbcf91acf4c17dabce812c98fba316a199144..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/js/validator.js +++ /dev/null @@ -1,370 +0,0 @@ -/** validator.js By Beginner Emain:zheng_jinfan@126.com HomePage:http://www.zhengjinfan.cn */ -layui.define(function(exports) { - "use strict"; - var validator = { - //验证字符串非空 - IsNotEmpty: function(input) { - if(input != '') { - return true; - } else { - return false; - } - }, - //验证数字(double类型) [可以包含负号和小数点] - IsNumber: function(input) { - var regex = /^-?\d+$|^(-?\d+)(\.\d+)?$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证整数 - IsInteger: function(input) { - var regex = /^-?\d+$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证非负整数 - IsIntegerNotNagtive: function(input) { - var regex = /^\d+$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证正整数 - IsIntegerPositive: function(input) { - var regex = /^[0-9]*[1-9][0-9]*$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证小数 - IsDecimal: function(input) { - var regex = /^([-+]?[1-9]\d*\.\d+|-?0\.\d*[1-9]\d*)$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证只包含英文字母 - IsEnglishCharacter: function(input) { - var regex = /^[A-Za-z]+$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证只包含数字和英文字母 - IsIntegerAndEnglishCharacter: function(input) { - var regex = /^[0-9A-Za-z]+$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证只包含汉字 - IsChineseCharacter: function(input) { - var regex = /^[\u4e00-\u9fa5]+$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证数字长度范围(数字前端的0计长度)[若要验证固定长度,可传入相同的两个长度数值] - IsIntegerLength: function(input, lengthBegin, lengthEnd) { - var pattern = '^\\d{' + lengthBegin + ',' + lengthEnd + '}$'; - var regex = new RegExp(pattern); - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证字符串包含内容 - IsStringInclude: function(input, withEnglishCharacter, withNumber, withChineseCharacter) { - if(!Boolean(withEnglishCharacter) && !Boolean(withNumber) && !Boolean(withChineseCharacter)) { - return false; //如果英文字母、数字和汉字都没有,则返回false - } - var pattern = '^['; - if(Boolean(withEnglishCharacter)) { - pattern += 'a-zA-Z'; - } - if(Boolean(withNumber)) { - pattern += '0-9'; - } - if(Boolean(withChineseCharacter)) { - pattern += '\\u4E00-\\u9FA5'; - } - pattern += ']+$'; - var regex = new RegExp(pattern); - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证字符串长度范围 [若要验证固定长度,可传入相同的两个长度数值] - IsStringLength: function(input, LengthBegin, LengthEnd) { - var pattern = '^.{' + lengthBegin + ',' + lengthEnd + '}$'; - var regex = new RegExp(pattern); - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证字符串长度范围(字符串内只包含数字和/或英文字母)[若要验证固定长度,可传入相同的两个长度数值] - IsStringLengthOnlyNumberAndEnglishCharacter: function(input, LengthBegin, LengthEnd) { - var pattern = '^[0-9a-zA-z]{' + lengthBegin + ',' + lengthEnd + '}$'; - var regex = new RegExp(pattern); - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证字符串长度范围 [若要验证固定长度,可传入相同的两个长度数值] - IsStringLengthByInclude: function(input, withEnglishCharacter, withNumber, withChineseCharacter, lengthBegin, lengthEnd) { - if(!withEnglishCharacter && !withNumber && !withChineseCharacter) { - return false; //如果英文字母、数字和汉字都没有,则返回false - } - var pattern = '^['; - if(Boolean(withEnglishCharacter)) - pattern += 'a-zA-Z'; - if(Boolean(withNumber)) - pattern += '0-9'; - if(Boolean(withChineseCharacter)) - pattern += '\\u4E00-\\u9FA5'; - pattern += ']{' + lengthBegin + ',' + lengthEnd + '}$'; - var regex = new RegExp(pattern); - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证字符串字节数长度范围 [若要验证固定长度,可传入相同的两个长度数值;每个汉字为两个字节长度] - IsStringByteLength: function(input, lengthBegin, lengthEnd) { - var regex = /[^\x00-\xff]/g; - var byteLength = input.replace(regex, 'ok').length; - if(byteLength >= lengthBegin && byteLength <= lengthEnd) { - return true; - } else { - return false; - } - }, - //验证日期 [只能验证日期,不能验证时间] - IsDateTime: function(input) { - var regex = /((19|20)[0-9]{2})-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])/; - if(regex.test(input)) { - var ymd = input.match(/(\d{4})-(\d+)-(\d+).*/); - var year = parseInt(ymd[1]); - var month = parseInt(ymd[2]); - var day = parseInt(ymd[3]); - if(day > 28) { - //获取当月的最后一天 - var lastDay = new Date(year, month, 0).getDate(); - return(lastDay >= day); - } - return true; - } else { - return false; - } - }, - //验证固定电话号码 [3位或4位区号;区号可以用小括号括起来;区号可以省略;区号与本地号间可以用减号或空格隔开;可以有3位数的分机号,分机号前要加减号] - IsTelePhoneNumber: function(input) { - var regex = /^(((0\d2|0\d{2})[- ]?)?\d{8}|((0\d3|0\d{3})[- ]?)?\d{7})(-\d{3})?$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证手机号码 [可匹配"(+86)013325656352",括号可以省略,+号可以省略,(+86)可以省略,11位手机号前的0可以省略;11位手机号第二位数可以是3、4、5、8中的任意一个] - IsMobilePhoneNumber: function(input) { - var regex = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证电话号码(可以是固定电话号码或手机号码) - IsPhoneNumber: function(input) { - var regex = /^((\+)?86|((\+)?86)?)0?1[3458]\d{9}$|^(((0\d2|0\d{2})[- ]?)?\d{8}|((0\d3|0\d{3})[- ]?)?\d{7})(-\d{3})?$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证邮政编码 - IsZipCode: function(input) { - var regex = /^\d{6}$/; - if(input.match(regex)) { - return true; - } else { - return false; - } - }, - //验证电子邮箱 [@字符前可以包含字母、数字、下划线和点号;@字符后可以包含字母、数字、下划线和点号;@字符后至少包含一个点号且点号不能是最后一个字符;最后一个点号后只能是字母或数字] - IsEmail: function(input) { - ////邮箱名以数字或字母开头;邮箱名可由字母、数字、点号、减号、下划线组成;邮箱名(@前的字符)长度为3~18个字符;邮箱名不能以点号、减号或下划线结尾;不能出现连续两个或两个以上的点号、减号。 - //var regex = /^[a-zA-Z0-9]((? - - - - - - - - XXPAY - 运营平台登录 - - - - - - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/main.html b/xxpay-mgr/src/main/resources/static/main.html deleted file mode 100755 index 7878d49548fa528ce67c92703eabece7c2438dda..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/main.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - -
-
-

XxPay是一个使用java开发的分布式聚合支付系统,分为spring-cloud和dubbo架构版本,已集成微信、支付宝等主流支付渠道,可以直接用于生产环境。

- 官方地址: - http://www.xxpay.org -

项目地址:
- [码云]https://gitee.com/jmdhappy/xxpay-master
- [GitHub]https://github.com/jmdhappy/xxpay-master -

-

XxPay'官方交流群:206119456(加群暗号:xxpay交流)

-

QQ:290935762

-

Email:jmdhappy@126.com

-
-

为了更好的体验运营平台,已放开所有权限,但请不要随意修改数据,感谢对XxPay的支持.

-
-
- 更新日志 -
-
- 版本号:# v1.0.0 2017-08-11 -
-

1、spring-cloud 架构版本发布

-

2、增加微信支付,包括:公众号支付,扫码支付,APP支付

-

3、增加支付宝支付,包括:wap,PC,扫码,APP支付

-
-
-
-
-
- - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.css b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.css deleted file mode 100755 index ee906a8196d0fbd581c27a9d5615db4c250860f2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.css +++ /dev/null @@ -1,2337 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */ -/* FONT PATH - * -------------------------- */ -@font-face { - font-family: 'FontAwesome'; - src: url('../fonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); - font-weight: normal; - font-style: normal; -} -.fa { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -/* makes the font 33% larger relative to the icon container */ -.fa-lg { - font-size: 1.33333333em; - line-height: 0.75em; - vertical-align: -15%; -} -.fa-2x { - font-size: 2em; -} -.fa-3x { - font-size: 3em; -} -.fa-4x { - font-size: 4em; -} -.fa-5x { - font-size: 5em; -} -.fa-fw { - width: 1.28571429em; - text-align: center; -} -.fa-ul { - padding-left: 0; - margin-left: 2.14285714em; - list-style-type: none; -} -.fa-ul > li { - position: relative; -} -.fa-li { - position: absolute; - left: -2.14285714em; - width: 2.14285714em; - top: 0.14285714em; - text-align: center; -} -.fa-li.fa-lg { - left: -1.85714286em; -} -.fa-border { - padding: .2em .25em .15em; - border: solid 0.08em #eeeeee; - border-radius: .1em; -} -.fa-pull-left { - float: left; -} -.fa-pull-right { - float: right; -} -.fa.fa-pull-left { - margin-right: .3em; -} -.fa.fa-pull-right { - margin-left: .3em; -} -/* Deprecated as of 4.4.0 */ -.pull-right { - float: right; -} -.pull-left { - float: left; -} -.fa.pull-left { - margin-right: .3em; -} -.fa.pull-right { - margin-left: .3em; -} -.fa-spin { - -webkit-animation: fa-spin 2s infinite linear; - animation: fa-spin 2s infinite linear; -} -.fa-pulse { - -webkit-animation: fa-spin 1s infinite steps(8); - animation: fa-spin 1s infinite steps(8); -} -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(359deg); - transform: rotate(359deg); - } -} -.fa-rotate-90 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; - -webkit-transform: rotate(90deg); - -ms-transform: rotate(90deg); - transform: rotate(90deg); -} -.fa-rotate-180 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; - -webkit-transform: rotate(180deg); - -ms-transform: rotate(180deg); - transform: rotate(180deg); -} -.fa-rotate-270 { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; - -webkit-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); -} -.fa-flip-horizontal { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; - -webkit-transform: scale(-1, 1); - -ms-transform: scale(-1, 1); - transform: scale(-1, 1); -} -.fa-flip-vertical { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; - -webkit-transform: scale(1, -1); - -ms-transform: scale(1, -1); - transform: scale(1, -1); -} -:root .fa-rotate-90, -:root .fa-rotate-180, -:root .fa-rotate-270, -:root .fa-flip-horizontal, -:root .fa-flip-vertical { - filter: none; -} -.fa-stack { - position: relative; - display: inline-block; - width: 2em; - height: 2em; - line-height: 2em; - vertical-align: middle; -} -.fa-stack-1x, -.fa-stack-2x { - position: absolute; - left: 0; - width: 100%; - text-align: center; -} -.fa-stack-1x { - line-height: inherit; -} -.fa-stack-2x { - font-size: 2em; -} -.fa-inverse { - color: #ffffff; -} -/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen - readers do not read off random characters that represent icons */ -.fa-glass:before { - content: "\f000"; -} -.fa-music:before { - content: "\f001"; -} -.fa-search:before { - content: "\f002"; -} -.fa-envelope-o:before { - content: "\f003"; -} -.fa-heart:before { - content: "\f004"; -} -.fa-star:before { - content: "\f005"; -} -.fa-star-o:before { - content: "\f006"; -} -.fa-user:before { - content: "\f007"; -} -.fa-film:before { - content: "\f008"; -} -.fa-th-large:before { - content: "\f009"; -} -.fa-th:before { - content: "\f00a"; -} -.fa-th-list:before { - content: "\f00b"; -} -.fa-check:before { - content: "\f00c"; -} -.fa-remove:before, -.fa-close:before, -.fa-times:before { - content: "\f00d"; -} -.fa-search-plus:before { - content: "\f00e"; -} -.fa-search-minus:before { - content: "\f010"; -} -.fa-power-off:before { - content: "\f011"; -} -.fa-signal:before { - content: "\f012"; -} -.fa-gear:before, -.fa-cog:before { - content: "\f013"; -} -.fa-trash-o:before { - content: "\f014"; -} -.fa-home:before { - content: "\f015"; -} -.fa-file-o:before { - content: "\f016"; -} -.fa-clock-o:before { - content: "\f017"; -} -.fa-road:before { - content: "\f018"; -} -.fa-download:before { - content: "\f019"; -} -.fa-arrow-circle-o-down:before { - content: "\f01a"; -} -.fa-arrow-circle-o-up:before { - content: "\f01b"; -} -.fa-inbox:before { - content: "\f01c"; -} -.fa-play-circle-o:before { - content: "\f01d"; -} -.fa-rotate-right:before, -.fa-repeat:before { - content: "\f01e"; -} -.fa-refresh:before { - content: "\f021"; -} -.fa-list-alt:before { - content: "\f022"; -} -.fa-lock:before { - content: "\f023"; -} -.fa-flag:before { - content: "\f024"; -} -.fa-headphones:before { - content: "\f025"; -} -.fa-volume-off:before { - content: "\f026"; -} -.fa-volume-down:before { - content: "\f027"; -} -.fa-volume-up:before { - content: "\f028"; -} -.fa-qrcode:before { - content: "\f029"; -} -.fa-barcode:before { - content: "\f02a"; -} -.fa-tag:before { - content: "\f02b"; -} -.fa-tags:before { - content: "\f02c"; -} -.fa-book:before { - content: "\f02d"; -} -.fa-bookmark:before { - content: "\f02e"; -} -.fa-print:before { - content: "\f02f"; -} -.fa-camera:before { - content: "\f030"; -} -.fa-font:before { - content: "\f031"; -} -.fa-bold:before { - content: "\f032"; -} -.fa-italic:before { - content: "\f033"; -} -.fa-text-height:before { - content: "\f034"; -} -.fa-text-width:before { - content: "\f035"; -} -.fa-align-left:before { - content: "\f036"; -} -.fa-align-center:before { - content: "\f037"; -} -.fa-align-right:before { - content: "\f038"; -} -.fa-align-justify:before { - content: "\f039"; -} -.fa-list:before { - content: "\f03a"; -} -.fa-dedent:before, -.fa-outdent:before { - content: "\f03b"; -} -.fa-indent:before { - content: "\f03c"; -} -.fa-video-camera:before { - content: "\f03d"; -} -.fa-photo:before, -.fa-image:before, -.fa-picture-o:before { - content: "\f03e"; -} -.fa-pencil:before { - content: "\f040"; -} -.fa-map-marker:before { - content: "\f041"; -} -.fa-adjust:before { - content: "\f042"; -} -.fa-tint:before { - content: "\f043"; -} -.fa-edit:before, -.fa-pencil-square-o:before { - content: "\f044"; -} -.fa-share-square-o:before { - content: "\f045"; -} -.fa-check-square-o:before { - content: "\f046"; -} -.fa-arrows:before { - content: "\f047"; -} -.fa-step-backward:before { - content: "\f048"; -} -.fa-fast-backward:before { - content: "\f049"; -} -.fa-backward:before { - content: "\f04a"; -} -.fa-play:before { - content: "\f04b"; -} -.fa-pause:before { - content: "\f04c"; -} -.fa-stop:before { - content: "\f04d"; -} -.fa-forward:before { - content: "\f04e"; -} -.fa-fast-forward:before { - content: "\f050"; -} -.fa-step-forward:before { - content: "\f051"; -} -.fa-eject:before { - content: "\f052"; -} -.fa-chevron-left:before { - content: "\f053"; -} -.fa-chevron-right:before { - content: "\f054"; -} -.fa-plus-circle:before { - content: "\f055"; -} -.fa-minus-circle:before { - content: "\f056"; -} -.fa-times-circle:before { - content: "\f057"; -} -.fa-check-circle:before { - content: "\f058"; -} -.fa-question-circle:before { - content: "\f059"; -} -.fa-info-circle:before { - content: "\f05a"; -} -.fa-crosshairs:before { - content: "\f05b"; -} -.fa-times-circle-o:before { - content: "\f05c"; -} -.fa-check-circle-o:before { - content: "\f05d"; -} -.fa-ban:before { - content: "\f05e"; -} -.fa-arrow-left:before { - content: "\f060"; -} -.fa-arrow-right:before { - content: "\f061"; -} -.fa-arrow-up:before { - content: "\f062"; -} -.fa-arrow-down:before { - content: "\f063"; -} -.fa-mail-forward:before, -.fa-share:before { - content: "\f064"; -} -.fa-expand:before { - content: "\f065"; -} -.fa-compress:before { - content: "\f066"; -} -.fa-plus:before { - content: "\f067"; -} -.fa-minus:before { - content: "\f068"; -} -.fa-asterisk:before { - content: "\f069"; -} -.fa-exclamation-circle:before { - content: "\f06a"; -} -.fa-gift:before { - content: "\f06b"; -} -.fa-leaf:before { - content: "\f06c"; -} -.fa-fire:before { - content: "\f06d"; -} -.fa-eye:before { - content: "\f06e"; -} -.fa-eye-slash:before { - content: "\f070"; -} -.fa-warning:before, -.fa-exclamation-triangle:before { - content: "\f071"; -} -.fa-plane:before { - content: "\f072"; -} -.fa-calendar:before { - content: "\f073"; -} -.fa-random:before { - content: "\f074"; -} -.fa-comment:before { - content: "\f075"; -} -.fa-magnet:before { - content: "\f076"; -} -.fa-chevron-up:before { - content: "\f077"; -} -.fa-chevron-down:before { - content: "\f078"; -} -.fa-retweet:before { - content: "\f079"; -} -.fa-shopping-cart:before { - content: "\f07a"; -} -.fa-folder:before { - content: "\f07b"; -} -.fa-folder-open:before { - content: "\f07c"; -} -.fa-arrows-v:before { - content: "\f07d"; -} -.fa-arrows-h:before { - content: "\f07e"; -} -.fa-bar-chart-o:before, -.fa-bar-chart:before { - content: "\f080"; -} -.fa-twitter-square:before { - content: "\f081"; -} -.fa-facebook-square:before { - content: "\f082"; -} -.fa-camera-retro:before { - content: "\f083"; -} -.fa-key:before { - content: "\f084"; -} -.fa-gears:before, -.fa-cogs:before { - content: "\f085"; -} -.fa-comments:before { - content: "\f086"; -} -.fa-thumbs-o-up:before { - content: "\f087"; -} -.fa-thumbs-o-down:before { - content: "\f088"; -} -.fa-star-half:before { - content: "\f089"; -} -.fa-heart-o:before { - content: "\f08a"; -} -.fa-sign-out:before { - content: "\f08b"; -} -.fa-linkedin-square:before { - content: "\f08c"; -} -.fa-thumb-tack:before { - content: "\f08d"; -} -.fa-external-link:before { - content: "\f08e"; -} -.fa-sign-in:before { - content: "\f090"; -} -.fa-trophy:before { - content: "\f091"; -} -.fa-github-square:before { - content: "\f092"; -} -.fa-upload:before { - content: "\f093"; -} -.fa-lemon-o:before { - content: "\f094"; -} -.fa-phone:before { - content: "\f095"; -} -.fa-square-o:before { - content: "\f096"; -} -.fa-bookmark-o:before { - content: "\f097"; -} -.fa-phone-square:before { - content: "\f098"; -} -.fa-twitter:before { - content: "\f099"; -} -.fa-facebook-f:before, -.fa-facebook:before { - content: "\f09a"; -} -.fa-github:before { - content: "\f09b"; -} -.fa-unlock:before { - content: "\f09c"; -} -.fa-credit-card:before { - content: "\f09d"; -} -.fa-feed:before, -.fa-rss:before { - content: "\f09e"; -} -.fa-hdd-o:before { - content: "\f0a0"; -} -.fa-bullhorn:before { - content: "\f0a1"; -} -.fa-bell:before { - content: "\f0f3"; -} -.fa-certificate:before { - content: "\f0a3"; -} -.fa-hand-o-right:before { - content: "\f0a4"; -} -.fa-hand-o-left:before { - content: "\f0a5"; -} -.fa-hand-o-up:before { - content: "\f0a6"; -} -.fa-hand-o-down:before { - content: "\f0a7"; -} -.fa-arrow-circle-left:before { - content: "\f0a8"; -} -.fa-arrow-circle-right:before { - content: "\f0a9"; -} -.fa-arrow-circle-up:before { - content: "\f0aa"; -} -.fa-arrow-circle-down:before { - content: "\f0ab"; -} -.fa-globe:before { - content: "\f0ac"; -} -.fa-wrench:before { - content: "\f0ad"; -} -.fa-tasks:before { - content: "\f0ae"; -} -.fa-filter:before { - content: "\f0b0"; -} -.fa-briefcase:before { - content: "\f0b1"; -} -.fa-arrows-alt:before { - content: "\f0b2"; -} -.fa-group:before, -.fa-users:before { - content: "\f0c0"; -} -.fa-chain:before, -.fa-link:before { - content: "\f0c1"; -} -.fa-cloud:before { - content: "\f0c2"; -} -.fa-flask:before { - content: "\f0c3"; -} -.fa-cut:before, -.fa-scissors:before { - content: "\f0c4"; -} -.fa-copy:before, -.fa-files-o:before { - content: "\f0c5"; -} -.fa-paperclip:before { - content: "\f0c6"; -} -.fa-save:before, -.fa-floppy-o:before { - content: "\f0c7"; -} -.fa-square:before { - content: "\f0c8"; -} -.fa-navicon:before, -.fa-reorder:before, -.fa-bars:before { - content: "\f0c9"; -} -.fa-list-ul:before { - content: "\f0ca"; -} -.fa-list-ol:before { - content: "\f0cb"; -} -.fa-strikethrough:before { - content: "\f0cc"; -} -.fa-underline:before { - content: "\f0cd"; -} -.fa-table:before { - content: "\f0ce"; -} -.fa-magic:before { - content: "\f0d0"; -} -.fa-truck:before { - content: "\f0d1"; -} -.fa-pinterest:before { - content: "\f0d2"; -} -.fa-pinterest-square:before { - content: "\f0d3"; -} -.fa-google-plus-square:before { - content: "\f0d4"; -} -.fa-google-plus:before { - content: "\f0d5"; -} -.fa-money:before { - content: "\f0d6"; -} -.fa-caret-down:before { - content: "\f0d7"; -} -.fa-caret-up:before { - content: "\f0d8"; -} -.fa-caret-left:before { - content: "\f0d9"; -} -.fa-caret-right:before { - content: "\f0da"; -} -.fa-columns:before { - content: "\f0db"; -} -.fa-unsorted:before, -.fa-sort:before { - content: "\f0dc"; -} -.fa-sort-down:before, -.fa-sort-desc:before { - content: "\f0dd"; -} -.fa-sort-up:before, -.fa-sort-asc:before { - content: "\f0de"; -} -.fa-envelope:before { - content: "\f0e0"; -} -.fa-linkedin:before { - content: "\f0e1"; -} -.fa-rotate-left:before, -.fa-undo:before { - content: "\f0e2"; -} -.fa-legal:before, -.fa-gavel:before { - content: "\f0e3"; -} -.fa-dashboard:before, -.fa-tachometer:before { - content: "\f0e4"; -} -.fa-comment-o:before { - content: "\f0e5"; -} -.fa-comments-o:before { - content: "\f0e6"; -} -.fa-flash:before, -.fa-bolt:before { - content: "\f0e7"; -} -.fa-sitemap:before { - content: "\f0e8"; -} -.fa-umbrella:before { - content: "\f0e9"; -} -.fa-paste:before, -.fa-clipboard:before { - content: "\f0ea"; -} -.fa-lightbulb-o:before { - content: "\f0eb"; -} -.fa-exchange:before { - content: "\f0ec"; -} -.fa-cloud-download:before { - content: "\f0ed"; -} -.fa-cloud-upload:before { - content: "\f0ee"; -} -.fa-user-md:before { - content: "\f0f0"; -} -.fa-stethoscope:before { - content: "\f0f1"; -} -.fa-suitcase:before { - content: "\f0f2"; -} -.fa-bell-o:before { - content: "\f0a2"; -} -.fa-coffee:before { - content: "\f0f4"; -} -.fa-cutlery:before { - content: "\f0f5"; -} -.fa-file-text-o:before { - content: "\f0f6"; -} -.fa-building-o:before { - content: "\f0f7"; -} -.fa-hospital-o:before { - content: "\f0f8"; -} -.fa-ambulance:before { - content: "\f0f9"; -} -.fa-medkit:before { - content: "\f0fa"; -} -.fa-fighter-jet:before { - content: "\f0fb"; -} -.fa-beer:before { - content: "\f0fc"; -} -.fa-h-square:before { - content: "\f0fd"; -} -.fa-plus-square:before { - content: "\f0fe"; -} -.fa-angle-double-left:before { - content: "\f100"; -} -.fa-angle-double-right:before { - content: "\f101"; -} -.fa-angle-double-up:before { - content: "\f102"; -} -.fa-angle-double-down:before { - content: "\f103"; -} -.fa-angle-left:before { - content: "\f104"; -} -.fa-angle-right:before { - content: "\f105"; -} -.fa-angle-up:before { - content: "\f106"; -} -.fa-angle-down:before { - content: "\f107"; -} -.fa-desktop:before { - content: "\f108"; -} -.fa-laptop:before { - content: "\f109"; -} -.fa-tablet:before { - content: "\f10a"; -} -.fa-mobile-phone:before, -.fa-mobile:before { - content: "\f10b"; -} -.fa-circle-o:before { - content: "\f10c"; -} -.fa-quote-left:before { - content: "\f10d"; -} -.fa-quote-right:before { - content: "\f10e"; -} -.fa-spinner:before { - content: "\f110"; -} -.fa-circle:before { - content: "\f111"; -} -.fa-mail-reply:before, -.fa-reply:before { - content: "\f112"; -} -.fa-github-alt:before { - content: "\f113"; -} -.fa-folder-o:before { - content: "\f114"; -} -.fa-folder-open-o:before { - content: "\f115"; -} -.fa-smile-o:before { - content: "\f118"; -} -.fa-frown-o:before { - content: "\f119"; -} -.fa-meh-o:before { - content: "\f11a"; -} -.fa-gamepad:before { - content: "\f11b"; -} -.fa-keyboard-o:before { - content: "\f11c"; -} -.fa-flag-o:before { - content: "\f11d"; -} -.fa-flag-checkered:before { - content: "\f11e"; -} -.fa-terminal:before { - content: "\f120"; -} -.fa-code:before { - content: "\f121"; -} -.fa-mail-reply-all:before, -.fa-reply-all:before { - content: "\f122"; -} -.fa-star-half-empty:before, -.fa-star-half-full:before, -.fa-star-half-o:before { - content: "\f123"; -} -.fa-location-arrow:before { - content: "\f124"; -} -.fa-crop:before { - content: "\f125"; -} -.fa-code-fork:before { - content: "\f126"; -} -.fa-unlink:before, -.fa-chain-broken:before { - content: "\f127"; -} -.fa-question:before { - content: "\f128"; -} -.fa-info:before { - content: "\f129"; -} -.fa-exclamation:before { - content: "\f12a"; -} -.fa-superscript:before { - content: "\f12b"; -} -.fa-subscript:before { - content: "\f12c"; -} -.fa-eraser:before { - content: "\f12d"; -} -.fa-puzzle-piece:before { - content: "\f12e"; -} -.fa-microphone:before { - content: "\f130"; -} -.fa-microphone-slash:before { - content: "\f131"; -} -.fa-shield:before { - content: "\f132"; -} -.fa-calendar-o:before { - content: "\f133"; -} -.fa-fire-extinguisher:before { - content: "\f134"; -} -.fa-rocket:before { - content: "\f135"; -} -.fa-maxcdn:before { - content: "\f136"; -} -.fa-chevron-circle-left:before { - content: "\f137"; -} -.fa-chevron-circle-right:before { - content: "\f138"; -} -.fa-chevron-circle-up:before { - content: "\f139"; -} -.fa-chevron-circle-down:before { - content: "\f13a"; -} -.fa-html5:before { - content: "\f13b"; -} -.fa-css3:before { - content: "\f13c"; -} -.fa-anchor:before { - content: "\f13d"; -} -.fa-unlock-alt:before { - content: "\f13e"; -} -.fa-bullseye:before { - content: "\f140"; -} -.fa-ellipsis-h:before { - content: "\f141"; -} -.fa-ellipsis-v:before { - content: "\f142"; -} -.fa-rss-square:before { - content: "\f143"; -} -.fa-play-circle:before { - content: "\f144"; -} -.fa-ticket:before { - content: "\f145"; -} -.fa-minus-square:before { - content: "\f146"; -} -.fa-minus-square-o:before { - content: "\f147"; -} -.fa-level-up:before { - content: "\f148"; -} -.fa-level-down:before { - content: "\f149"; -} -.fa-check-square:before { - content: "\f14a"; -} -.fa-pencil-square:before { - content: "\f14b"; -} -.fa-external-link-square:before { - content: "\f14c"; -} -.fa-share-square:before { - content: "\f14d"; -} -.fa-compass:before { - content: "\f14e"; -} -.fa-toggle-down:before, -.fa-caret-square-o-down:before { - content: "\f150"; -} -.fa-toggle-up:before, -.fa-caret-square-o-up:before { - content: "\f151"; -} -.fa-toggle-right:before, -.fa-caret-square-o-right:before { - content: "\f152"; -} -.fa-euro:before, -.fa-eur:before { - content: "\f153"; -} -.fa-gbp:before { - content: "\f154"; -} -.fa-dollar:before, -.fa-usd:before { - content: "\f155"; -} -.fa-rupee:before, -.fa-inr:before { - content: "\f156"; -} -.fa-cny:before, -.fa-rmb:before, -.fa-yen:before, -.fa-jpy:before { - content: "\f157"; -} -.fa-ruble:before, -.fa-rouble:before, -.fa-rub:before { - content: "\f158"; -} -.fa-won:before, -.fa-krw:before { - content: "\f159"; -} -.fa-bitcoin:before, -.fa-btc:before { - content: "\f15a"; -} -.fa-file:before { - content: "\f15b"; -} -.fa-file-text:before { - content: "\f15c"; -} -.fa-sort-alpha-asc:before { - content: "\f15d"; -} -.fa-sort-alpha-desc:before { - content: "\f15e"; -} -.fa-sort-amount-asc:before { - content: "\f160"; -} -.fa-sort-amount-desc:before { - content: "\f161"; -} -.fa-sort-numeric-asc:before { - content: "\f162"; -} -.fa-sort-numeric-desc:before { - content: "\f163"; -} -.fa-thumbs-up:before { - content: "\f164"; -} -.fa-thumbs-down:before { - content: "\f165"; -} -.fa-youtube-square:before { - content: "\f166"; -} -.fa-youtube:before { - content: "\f167"; -} -.fa-xing:before { - content: "\f168"; -} -.fa-xing-square:before { - content: "\f169"; -} -.fa-youtube-play:before { - content: "\f16a"; -} -.fa-dropbox:before { - content: "\f16b"; -} -.fa-stack-overflow:before { - content: "\f16c"; -} -.fa-instagram:before { - content: "\f16d"; -} -.fa-flickr:before { - content: "\f16e"; -} -.fa-adn:before { - content: "\f170"; -} -.fa-bitbucket:before { - content: "\f171"; -} -.fa-bitbucket-square:before { - content: "\f172"; -} -.fa-tumblr:before { - content: "\f173"; -} -.fa-tumblr-square:before { - content: "\f174"; -} -.fa-long-arrow-down:before { - content: "\f175"; -} -.fa-long-arrow-up:before { - content: "\f176"; -} -.fa-long-arrow-left:before { - content: "\f177"; -} -.fa-long-arrow-right:before { - content: "\f178"; -} -.fa-apple:before { - content: "\f179"; -} -.fa-windows:before { - content: "\f17a"; -} -.fa-android:before { - content: "\f17b"; -} -.fa-linux:before { - content: "\f17c"; -} -.fa-dribbble:before { - content: "\f17d"; -} -.fa-skype:before { - content: "\f17e"; -} -.fa-foursquare:before { - content: "\f180"; -} -.fa-trello:before { - content: "\f181"; -} -.fa-female:before { - content: "\f182"; -} -.fa-male:before { - content: "\f183"; -} -.fa-gittip:before, -.fa-gratipay:before { - content: "\f184"; -} -.fa-sun-o:before { - content: "\f185"; -} -.fa-moon-o:before { - content: "\f186"; -} -.fa-archive:before { - content: "\f187"; -} -.fa-bug:before { - content: "\f188"; -} -.fa-vk:before { - content: "\f189"; -} -.fa-weibo:before { - content: "\f18a"; -} -.fa-renren:before { - content: "\f18b"; -} -.fa-pagelines:before { - content: "\f18c"; -} -.fa-stack-exchange:before { - content: "\f18d"; -} -.fa-arrow-circle-o-right:before { - content: "\f18e"; -} -.fa-arrow-circle-o-left:before { - content: "\f190"; -} -.fa-toggle-left:before, -.fa-caret-square-o-left:before { - content: "\f191"; -} -.fa-dot-circle-o:before { - content: "\f192"; -} -.fa-wheelchair:before { - content: "\f193"; -} -.fa-vimeo-square:before { - content: "\f194"; -} -.fa-turkish-lira:before, -.fa-try:before { - content: "\f195"; -} -.fa-plus-square-o:before { - content: "\f196"; -} -.fa-space-shuttle:before { - content: "\f197"; -} -.fa-slack:before { - content: "\f198"; -} -.fa-envelope-square:before { - content: "\f199"; -} -.fa-wordpress:before { - content: "\f19a"; -} -.fa-openid:before { - content: "\f19b"; -} -.fa-institution:before, -.fa-bank:before, -.fa-university:before { - content: "\f19c"; -} -.fa-mortar-board:before, -.fa-graduation-cap:before { - content: "\f19d"; -} -.fa-yahoo:before { - content: "\f19e"; -} -.fa-google:before { - content: "\f1a0"; -} -.fa-reddit:before { - content: "\f1a1"; -} -.fa-reddit-square:before { - content: "\f1a2"; -} -.fa-stumbleupon-circle:before { - content: "\f1a3"; -} -.fa-stumbleupon:before { - content: "\f1a4"; -} -.fa-delicious:before { - content: "\f1a5"; -} -.fa-digg:before { - content: "\f1a6"; -} -.fa-pied-piper-pp:before { - content: "\f1a7"; -} -.fa-pied-piper-alt:before { - content: "\f1a8"; -} -.fa-drupal:before { - content: "\f1a9"; -} -.fa-joomla:before { - content: "\f1aa"; -} -.fa-language:before { - content: "\f1ab"; -} -.fa-fax:before { - content: "\f1ac"; -} -.fa-building:before { - content: "\f1ad"; -} -.fa-child:before { - content: "\f1ae"; -} -.fa-paw:before { - content: "\f1b0"; -} -.fa-spoon:before { - content: "\f1b1"; -} -.fa-cube:before { - content: "\f1b2"; -} -.fa-cubes:before { - content: "\f1b3"; -} -.fa-behance:before { - content: "\f1b4"; -} -.fa-behance-square:before { - content: "\f1b5"; -} -.fa-steam:before { - content: "\f1b6"; -} -.fa-steam-square:before { - content: "\f1b7"; -} -.fa-recycle:before { - content: "\f1b8"; -} -.fa-automobile:before, -.fa-car:before { - content: "\f1b9"; -} -.fa-cab:before, -.fa-taxi:before { - content: "\f1ba"; -} -.fa-tree:before { - content: "\f1bb"; -} -.fa-spotify:before { - content: "\f1bc"; -} -.fa-deviantart:before { - content: "\f1bd"; -} -.fa-soundcloud:before { - content: "\f1be"; -} -.fa-database:before { - content: "\f1c0"; -} -.fa-file-pdf-o:before { - content: "\f1c1"; -} -.fa-file-word-o:before { - content: "\f1c2"; -} -.fa-file-excel-o:before { - content: "\f1c3"; -} -.fa-file-powerpoint-o:before { - content: "\f1c4"; -} -.fa-file-photo-o:before, -.fa-file-picture-o:before, -.fa-file-image-o:before { - content: "\f1c5"; -} -.fa-file-zip-o:before, -.fa-file-archive-o:before { - content: "\f1c6"; -} -.fa-file-sound-o:before, -.fa-file-audio-o:before { - content: "\f1c7"; -} -.fa-file-movie-o:before, -.fa-file-video-o:before { - content: "\f1c8"; -} -.fa-file-code-o:before { - content: "\f1c9"; -} -.fa-vine:before { - content: "\f1ca"; -} -.fa-codepen:before { - content: "\f1cb"; -} -.fa-jsfiddle:before { - content: "\f1cc"; -} -.fa-life-bouy:before, -.fa-life-buoy:before, -.fa-life-saver:before, -.fa-support:before, -.fa-life-ring:before { - content: "\f1cd"; -} -.fa-circle-o-notch:before { - content: "\f1ce"; -} -.fa-ra:before, -.fa-resistance:before, -.fa-rebel:before { - content: "\f1d0"; -} -.fa-ge:before, -.fa-empire:before { - content: "\f1d1"; -} -.fa-git-square:before { - content: "\f1d2"; -} -.fa-git:before { - content: "\f1d3"; -} -.fa-y-combinator-square:before, -.fa-yc-square:before, -.fa-hacker-news:before { - content: "\f1d4"; -} -.fa-tencent-weibo:before { - content: "\f1d5"; -} -.fa-qq:before { - content: "\f1d6"; -} -.fa-wechat:before, -.fa-weixin:before { - content: "\f1d7"; -} -.fa-send:before, -.fa-paper-plane:before { - content: "\f1d8"; -} -.fa-send-o:before, -.fa-paper-plane-o:before { - content: "\f1d9"; -} -.fa-history:before { - content: "\f1da"; -} -.fa-circle-thin:before { - content: "\f1db"; -} -.fa-header:before { - content: "\f1dc"; -} -.fa-paragraph:before { - content: "\f1dd"; -} -.fa-sliders:before { - content: "\f1de"; -} -.fa-share-alt:before { - content: "\f1e0"; -} -.fa-share-alt-square:before { - content: "\f1e1"; -} -.fa-bomb:before { - content: "\f1e2"; -} -.fa-soccer-ball-o:before, -.fa-futbol-o:before { - content: "\f1e3"; -} -.fa-tty:before { - content: "\f1e4"; -} -.fa-binoculars:before { - content: "\f1e5"; -} -.fa-plug:before { - content: "\f1e6"; -} -.fa-slideshare:before { - content: "\f1e7"; -} -.fa-twitch:before { - content: "\f1e8"; -} -.fa-yelp:before { - content: "\f1e9"; -} -.fa-newspaper-o:before { - content: "\f1ea"; -} -.fa-wifi:before { - content: "\f1eb"; -} -.fa-calculator:before { - content: "\f1ec"; -} -.fa-paypal:before { - content: "\f1ed"; -} -.fa-google-wallet:before { - content: "\f1ee"; -} -.fa-cc-visa:before { - content: "\f1f0"; -} -.fa-cc-mastercard:before { - content: "\f1f1"; -} -.fa-cc-discover:before { - content: "\f1f2"; -} -.fa-cc-amex:before { - content: "\f1f3"; -} -.fa-cc-paypal:before { - content: "\f1f4"; -} -.fa-cc-stripe:before { - content: "\f1f5"; -} -.fa-bell-slash:before { - content: "\f1f6"; -} -.fa-bell-slash-o:before { - content: "\f1f7"; -} -.fa-trash:before { - content: "\f1f8"; -} -.fa-copyright:before { - content: "\f1f9"; -} -.fa-at:before { - content: "\f1fa"; -} -.fa-eyedropper:before { - content: "\f1fb"; -} -.fa-paint-brush:before { - content: "\f1fc"; -} -.fa-birthday-cake:before { - content: "\f1fd"; -} -.fa-area-chart:before { - content: "\f1fe"; -} -.fa-pie-chart:before { - content: "\f200"; -} -.fa-line-chart:before { - content: "\f201"; -} -.fa-lastfm:before { - content: "\f202"; -} -.fa-lastfm-square:before { - content: "\f203"; -} -.fa-toggle-off:before { - content: "\f204"; -} -.fa-toggle-on:before { - content: "\f205"; -} -.fa-bicycle:before { - content: "\f206"; -} -.fa-bus:before { - content: "\f207"; -} -.fa-ioxhost:before { - content: "\f208"; -} -.fa-angellist:before { - content: "\f209"; -} -.fa-cc:before { - content: "\f20a"; -} -.fa-shekel:before, -.fa-sheqel:before, -.fa-ils:before { - content: "\f20b"; -} -.fa-meanpath:before { - content: "\f20c"; -} -.fa-buysellads:before { - content: "\f20d"; -} -.fa-connectdevelop:before { - content: "\f20e"; -} -.fa-dashcube:before { - content: "\f210"; -} -.fa-forumbee:before { - content: "\f211"; -} -.fa-leanpub:before { - content: "\f212"; -} -.fa-sellsy:before { - content: "\f213"; -} -.fa-shirtsinbulk:before { - content: "\f214"; -} -.fa-simplybuilt:before { - content: "\f215"; -} -.fa-skyatlas:before { - content: "\f216"; -} -.fa-cart-plus:before { - content: "\f217"; -} -.fa-cart-arrow-down:before { - content: "\f218"; -} -.fa-diamond:before { - content: "\f219"; -} -.fa-ship:before { - content: "\f21a"; -} -.fa-user-secret:before { - content: "\f21b"; -} -.fa-motorcycle:before { - content: "\f21c"; -} -.fa-street-view:before { - content: "\f21d"; -} -.fa-heartbeat:before { - content: "\f21e"; -} -.fa-venus:before { - content: "\f221"; -} -.fa-mars:before { - content: "\f222"; -} -.fa-mercury:before { - content: "\f223"; -} -.fa-intersex:before, -.fa-transgender:before { - content: "\f224"; -} -.fa-transgender-alt:before { - content: "\f225"; -} -.fa-venus-double:before { - content: "\f226"; -} -.fa-mars-double:before { - content: "\f227"; -} -.fa-venus-mars:before { - content: "\f228"; -} -.fa-mars-stroke:before { - content: "\f229"; -} -.fa-mars-stroke-v:before { - content: "\f22a"; -} -.fa-mars-stroke-h:before { - content: "\f22b"; -} -.fa-neuter:before { - content: "\f22c"; -} -.fa-genderless:before { - content: "\f22d"; -} -.fa-facebook-official:before { - content: "\f230"; -} -.fa-pinterest-p:before { - content: "\f231"; -} -.fa-whatsapp:before { - content: "\f232"; -} -.fa-server:before { - content: "\f233"; -} -.fa-user-plus:before { - content: "\f234"; -} -.fa-user-times:before { - content: "\f235"; -} -.fa-hotel:before, -.fa-bed:before { - content: "\f236"; -} -.fa-viacoin:before { - content: "\f237"; -} -.fa-train:before { - content: "\f238"; -} -.fa-subway:before { - content: "\f239"; -} -.fa-medium:before { - content: "\f23a"; -} -.fa-yc:before, -.fa-y-combinator:before { - content: "\f23b"; -} -.fa-optin-monster:before { - content: "\f23c"; -} -.fa-opencart:before { - content: "\f23d"; -} -.fa-expeditedssl:before { - content: "\f23e"; -} -.fa-battery-4:before, -.fa-battery:before, -.fa-battery-full:before { - content: "\f240"; -} -.fa-battery-3:before, -.fa-battery-three-quarters:before { - content: "\f241"; -} -.fa-battery-2:before, -.fa-battery-half:before { - content: "\f242"; -} -.fa-battery-1:before, -.fa-battery-quarter:before { - content: "\f243"; -} -.fa-battery-0:before, -.fa-battery-empty:before { - content: "\f244"; -} -.fa-mouse-pointer:before { - content: "\f245"; -} -.fa-i-cursor:before { - content: "\f246"; -} -.fa-object-group:before { - content: "\f247"; -} -.fa-object-ungroup:before { - content: "\f248"; -} -.fa-sticky-note:before { - content: "\f249"; -} -.fa-sticky-note-o:before { - content: "\f24a"; -} -.fa-cc-jcb:before { - content: "\f24b"; -} -.fa-cc-diners-club:before { - content: "\f24c"; -} -.fa-clone:before { - content: "\f24d"; -} -.fa-balance-scale:before { - content: "\f24e"; -} -.fa-hourglass-o:before { - content: "\f250"; -} -.fa-hourglass-1:before, -.fa-hourglass-start:before { - content: "\f251"; -} -.fa-hourglass-2:before, -.fa-hourglass-half:before { - content: "\f252"; -} -.fa-hourglass-3:before, -.fa-hourglass-end:before { - content: "\f253"; -} -.fa-hourglass:before { - content: "\f254"; -} -.fa-hand-grab-o:before, -.fa-hand-rock-o:before { - content: "\f255"; -} -.fa-hand-stop-o:before, -.fa-hand-paper-o:before { - content: "\f256"; -} -.fa-hand-scissors-o:before { - content: "\f257"; -} -.fa-hand-lizard-o:before { - content: "\f258"; -} -.fa-hand-spock-o:before { - content: "\f259"; -} -.fa-hand-pointer-o:before { - content: "\f25a"; -} -.fa-hand-peace-o:before { - content: "\f25b"; -} -.fa-trademark:before { - content: "\f25c"; -} -.fa-registered:before { - content: "\f25d"; -} -.fa-creative-commons:before { - content: "\f25e"; -} -.fa-gg:before { - content: "\f260"; -} -.fa-gg-circle:before { - content: "\f261"; -} -.fa-tripadvisor:before { - content: "\f262"; -} -.fa-odnoklassniki:before { - content: "\f263"; -} -.fa-odnoklassniki-square:before { - content: "\f264"; -} -.fa-get-pocket:before { - content: "\f265"; -} -.fa-wikipedia-w:before { - content: "\f266"; -} -.fa-safari:before { - content: "\f267"; -} -.fa-chrome:before { - content: "\f268"; -} -.fa-firefox:before { - content: "\f269"; -} -.fa-opera:before { - content: "\f26a"; -} -.fa-internet-explorer:before { - content: "\f26b"; -} -.fa-tv:before, -.fa-television:before { - content: "\f26c"; -} -.fa-contao:before { - content: "\f26d"; -} -.fa-500px:before { - content: "\f26e"; -} -.fa-amazon:before { - content: "\f270"; -} -.fa-calendar-plus-o:before { - content: "\f271"; -} -.fa-calendar-minus-o:before { - content: "\f272"; -} -.fa-calendar-times-o:before { - content: "\f273"; -} -.fa-calendar-check-o:before { - content: "\f274"; -} -.fa-industry:before { - content: "\f275"; -} -.fa-map-pin:before { - content: "\f276"; -} -.fa-map-signs:before { - content: "\f277"; -} -.fa-map-o:before { - content: "\f278"; -} -.fa-map:before { - content: "\f279"; -} -.fa-commenting:before { - content: "\f27a"; -} -.fa-commenting-o:before { - content: "\f27b"; -} -.fa-houzz:before { - content: "\f27c"; -} -.fa-vimeo:before { - content: "\f27d"; -} -.fa-black-tie:before { - content: "\f27e"; -} -.fa-fonticons:before { - content: "\f280"; -} -.fa-reddit-alien:before { - content: "\f281"; -} -.fa-edge:before { - content: "\f282"; -} -.fa-credit-card-alt:before { - content: "\f283"; -} -.fa-codiepie:before { - content: "\f284"; -} -.fa-modx:before { - content: "\f285"; -} -.fa-fort-awesome:before { - content: "\f286"; -} -.fa-usb:before { - content: "\f287"; -} -.fa-product-hunt:before { - content: "\f288"; -} -.fa-mixcloud:before { - content: "\f289"; -} -.fa-scribd:before { - content: "\f28a"; -} -.fa-pause-circle:before { - content: "\f28b"; -} -.fa-pause-circle-o:before { - content: "\f28c"; -} -.fa-stop-circle:before { - content: "\f28d"; -} -.fa-stop-circle-o:before { - content: "\f28e"; -} -.fa-shopping-bag:before { - content: "\f290"; -} -.fa-shopping-basket:before { - content: "\f291"; -} -.fa-hashtag:before { - content: "\f292"; -} -.fa-bluetooth:before { - content: "\f293"; -} -.fa-bluetooth-b:before { - content: "\f294"; -} -.fa-percent:before { - content: "\f295"; -} -.fa-gitlab:before { - content: "\f296"; -} -.fa-wpbeginner:before { - content: "\f297"; -} -.fa-wpforms:before { - content: "\f298"; -} -.fa-envira:before { - content: "\f299"; -} -.fa-universal-access:before { - content: "\f29a"; -} -.fa-wheelchair-alt:before { - content: "\f29b"; -} -.fa-question-circle-o:before { - content: "\f29c"; -} -.fa-blind:before { - content: "\f29d"; -} -.fa-audio-description:before { - content: "\f29e"; -} -.fa-volume-control-phone:before { - content: "\f2a0"; -} -.fa-braille:before { - content: "\f2a1"; -} -.fa-assistive-listening-systems:before { - content: "\f2a2"; -} -.fa-asl-interpreting:before, -.fa-american-sign-language-interpreting:before { - content: "\f2a3"; -} -.fa-deafness:before, -.fa-hard-of-hearing:before, -.fa-deaf:before { - content: "\f2a4"; -} -.fa-glide:before { - content: "\f2a5"; -} -.fa-glide-g:before { - content: "\f2a6"; -} -.fa-signing:before, -.fa-sign-language:before { - content: "\f2a7"; -} -.fa-low-vision:before { - content: "\f2a8"; -} -.fa-viadeo:before { - content: "\f2a9"; -} -.fa-viadeo-square:before { - content: "\f2aa"; -} -.fa-snapchat:before { - content: "\f2ab"; -} -.fa-snapchat-ghost:before { - content: "\f2ac"; -} -.fa-snapchat-square:before { - content: "\f2ad"; -} -.fa-pied-piper:before { - content: "\f2ae"; -} -.fa-first-order:before { - content: "\f2b0"; -} -.fa-yoast:before { - content: "\f2b1"; -} -.fa-themeisle:before { - content: "\f2b2"; -} -.fa-google-plus-circle:before, -.fa-google-plus-official:before { - content: "\f2b3"; -} -.fa-fa:before, -.fa-font-awesome:before { - content: "\f2b4"; -} -.fa-handshake-o:before { - content: "\f2b5"; -} -.fa-envelope-open:before { - content: "\f2b6"; -} -.fa-envelope-open-o:before { - content: "\f2b7"; -} -.fa-linode:before { - content: "\f2b8"; -} -.fa-address-book:before { - content: "\f2b9"; -} -.fa-address-book-o:before { - content: "\f2ba"; -} -.fa-vcard:before, -.fa-address-card:before { - content: "\f2bb"; -} -.fa-vcard-o:before, -.fa-address-card-o:before { - content: "\f2bc"; -} -.fa-user-circle:before { - content: "\f2bd"; -} -.fa-user-circle-o:before { - content: "\f2be"; -} -.fa-user-o:before { - content: "\f2c0"; -} -.fa-id-badge:before { - content: "\f2c1"; -} -.fa-drivers-license:before, -.fa-id-card:before { - content: "\f2c2"; -} -.fa-drivers-license-o:before, -.fa-id-card-o:before { - content: "\f2c3"; -} -.fa-quora:before { - content: "\f2c4"; -} -.fa-free-code-camp:before { - content: "\f2c5"; -} -.fa-telegram:before { - content: "\f2c6"; -} -.fa-thermometer-4:before, -.fa-thermometer:before, -.fa-thermometer-full:before { - content: "\f2c7"; -} -.fa-thermometer-3:before, -.fa-thermometer-three-quarters:before { - content: "\f2c8"; -} -.fa-thermometer-2:before, -.fa-thermometer-half:before { - content: "\f2c9"; -} -.fa-thermometer-1:before, -.fa-thermometer-quarter:before { - content: "\f2ca"; -} -.fa-thermometer-0:before, -.fa-thermometer-empty:before { - content: "\f2cb"; -} -.fa-shower:before { - content: "\f2cc"; -} -.fa-bathtub:before, -.fa-s15:before, -.fa-bath:before { - content: "\f2cd"; -} -.fa-podcast:before { - content: "\f2ce"; -} -.fa-window-maximize:before { - content: "\f2d0"; -} -.fa-window-minimize:before { - content: "\f2d1"; -} -.fa-window-restore:before { - content: "\f2d2"; -} -.fa-times-rectangle:before, -.fa-window-close:before { - content: "\f2d3"; -} -.fa-times-rectangle-o:before, -.fa-window-close-o:before { - content: "\f2d4"; -} -.fa-bandcamp:before { - content: "\f2d5"; -} -.fa-grav:before { - content: "\f2d6"; -} -.fa-etsy:before { - content: "\f2d7"; -} -.fa-imdb:before { - content: "\f2d8"; -} -.fa-ravelry:before { - content: "\f2d9"; -} -.fa-eercast:before { - content: "\f2da"; -} -.fa-microchip:before { - content: "\f2db"; -} -.fa-snowflake-o:before { - content: "\f2dc"; -} -.fa-superpowers:before { - content: "\f2dd"; -} -.fa-wpexplorer:before { - content: "\f2de"; -} -.fa-meetup:before { - content: "\f2e0"; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.min.css b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.min.css deleted file mode 100755 index 540440ce89f2a408aa699b65100e18f15e0f09ca..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/css/font-awesome.min.css +++ /dev/null @@ -1,4 +0,0 @@ -/*! - * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome - * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/FontAwesome.otf b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/FontAwesome.otf deleted file mode 100755 index 401ec0f36e4f73b8efa40bd6f604fe80d286db70..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/FontAwesome.otf and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.eot b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.eot deleted file mode 100755 index e9f60ca953f93e35eab4108bd414bc02ddcf3928..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.svg b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.svg deleted file mode 100755 index 855c845e538b65548118279537a04eab2ec6ef0d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,2671 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 - By ,,, -Copyright Dave Gandy 2016. All rights reserved. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.ttf b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.ttf deleted file mode 100755 index 35acda2fa1196aad98c2adf4378a7611dd713aa3..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff deleted file mode 100755 index 400014a4b06eee3d0c0d54402a47ab2601b2862b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff2 b/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff2 deleted file mode 100755 index 4d13fc60404b91e398a37200c4a77b645cfd9586..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/font-awesome/fonts/fontawesome-webfont.woff2 and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.css deleted file mode 100755 index 446084086b7f7b326d6b8c0a489ade518712595e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.css +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - .layui-laypage a,a{text-decoration:none}.layui-btn,.layui-inline,img{vertical-align:middle}.layui-btn,.layui-unselect{-webkit-user-select:none;-ms-user-select:none;-moz-user-select:none}.layui-btn,.layui-tree li i,.layui-unselect{-moz-user-select:none}blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}a:active,a:hover{outline:0}img{display:inline-block;border:none}li{list-style:none}table{border-collapse:collapse;border-spacing:0}h1,h2,h3{font-size:14px;font-weight:400}h4,h5,h6{font-size:100%;font-weight:400}button,input,optgroup,option,select,textarea{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;outline:0}pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-button:vertical{display:none}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:#e2e2e2}::-webkit-scrollbar-thumb{border-radius:0;background-color:rgba(0,0,0,.3)}::-webkit-scrollbar-thumb:vertical:hover{background-color:rgba(0,0,0,.35)}::-webkit-scrollbar-thumb:vertical:active{background-color:rgba(0,0,0,.38)}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.9);src:url(../font/iconfont.eot?v=1.0.9#iefix) format('embedded-opentype'),url(../font/iconfont.svg?v=1.0.9#iconfont) format('svg'),url(../font/iconfont.woff?v=1.0.9) format('woff'),url(../font/iconfont.ttf?v=1.0.9) format('truetype')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body{line-height:24px;font:14px Helvetica Neue,Helvetica,PingFang SC,\5FAE\8F6F\96C5\9ED1,Tahoma,Arial,sans-serif}hr{height:1px;margin:10px 0;border:0;background-color:#e2e2e2;clear:both}a{color:#333}a:hover{color:#777}a cite{font-style:normal;*cursor:pointer}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-clear{clear:both;*zoom:1}.layui-clear:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge{position:absolute;width:0;height:0;border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-disabled,.layui-disabled:hover{color:#d2d2d2!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-main{position:relative;width:1140px;margin:0 auto}.layui-header{position:relative;z-index:1000;height:60px}.layui-header a:hover{transition:all .5s;-webkit-transition:all .5s}.layui-side{position:fixed;top:0;bottom:0;z-index:999;width:200px;overflow-x:hidden}.layui-side-scroll{width:220px;height:100%;overflow-x:hidden}.layui-body{position:absolute;left:200px;right:0;top:0;bottom:0;z-index:998;width:auto;overflow:hidden;overflow-y:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.layui-layout-admin .layui-header{background-color:#23262E}.layui-layout-admin .layui-side{top:60px;width:200px;overflow-x:hidden}.layui-layout-admin .layui-body{top:60px;bottom:44px}.layui-layout-admin .layui-main{width:auto;margin:0 15px}.layui-layout-admin .layui-footer{position:fixed;left:200px;right:0;bottom:0;height:44px;background-color:#eee}.layui-btn,.layui-input,.layui-select,.layui-textarea,.layui-upload-button{outline:0;-webkit-transition:border-color .3s cubic-bezier(.65,.05,.35,.5);transition:border-color .3s cubic-bezier(.65,.05,.35,.5);-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-elem-quote{margin-bottom:10px;padding:15px;line-height:22px;border-left:5px solid #009688;border-radius:0 2px 2px 0;background-color:#f2f2f2}.layui-quote-nm{border-color:#e2e2e2;border-style:solid;border-width:1px 1px 1px 5px;background:0 0}.layui-elem-field{margin-bottom:10px;padding:0;border:1px solid #e2e2e2}.layui-elem-field legend{margin-left:20px;padding:0 10px;font-size:20px;font-weight:300}.layui-field-title{margin:10px 0 20px;border:none;border-top:1px solid #e2e2e2}.layui-field-box{padding:10px 15px}.layui-field-title .layui-field-box{padding:10px 0}.layui-progress{position:relative;height:6px;border-radius:20px;background-color:#e2e2e2}.layui-progress-bar{position:absolute;width:0;max-width:100%;height:6px;border-radius:20px;text-align:right;background-color:#5FB878;transition:all .3s;-webkit-transition:all .3s}.layui-progress-big,.layui-progress-big .layui-progress-bar{height:18px;line-height:18px}.layui-progress-text{position:relative;top:-18px;line-height:18px;font-size:12px;color:#666}.layui-progress-big .layui-progress-text{position:static;padding:0 10px;color:#fff}.layui-collapse{border:1px solid #e2e2e2;border-radius:2px}.layui-colla-item{border-top:1px solid #e2e2e2}.layui-colla-item:first-child{border-top:none}.layui-colla-title{position:relative;height:42px;line-height:42px;padding:0 15px 0 35px;color:#333;background-color:#f2f2f2;cursor:pointer}.layui-colla-content{display:none;padding:10px 15px;line-height:22px;border-top:1px solid #e2e2e2;color:#666}.layui-colla-icon{position:absolute;left:15px;top:0;font-size:14px}.layui-bg-red{background-color:#FF5722}.layui-bg-orange{background-color:#F7B824}.layui-bg-green{background-color:#009688}.layui-bg-cyan{background-color:#2F4056}.layui-bg-blue{background-color:#1E9FFF}.layui-bg-black{background-color:#393D49}.layui-bg-gray{background-color:#eee}.layui-word-aux{font-size:12px;color:#999;padding:0 5px}.layui-btn{display:inline-block;height:38px;line-height:38px;padding:0 18px;background-color:#009688;color:#fff;white-space:nowrap;text-align:center;font-size:14px;border:none;border-radius:2px;cursor:pointer;opacity:.9;filter:alpha(opacity=90)}.layui-btn:hover{opacity:.8;filter:alpha(opacity=80);color:#fff}.layui-btn:active{opacity:1;filter:alpha(opacity=100)}.layui-btn+.layui-btn{margin-left:10px}.layui-btn-radius{border-radius:100px}.layui-btn .layui-icon{font-size:18px;vertical-align:bottom}.layui-btn-primary{border:1px solid #C9C9C9;background-color:#fff;color:#555}.layui-btn-primary:hover{border-color:#009688;color:#333}.layui-btn-normal{background-color:#1E9FFF}.layui-btn-warm{background-color:#F7B824}.layui-btn-danger{background-color:#FF5722}.layui-btn-disabled,.layui-btn-disabled:active,.layui-btn-disabled:hover{border:1px solid #e6e6e6;background-color:#FBFBFB;color:#C9C9C9;cursor:not-allowed;opacity:1}.layui-btn-big{height:44px;line-height:44px;padding:0 25px;font-size:16px}.layui-btn-small{height:30px;line-height:30px;padding:0 10px;font-size:12px}.layui-btn-small i{font-size:16px!important}.layui-btn-mini{height:22px;line-height:22px;padding:0 5px;font-size:12px}.layui-btn-mini i{font-size:14px!important}.layui-btn-group{display:inline-block;vertical-align:middle;font-size:0}.layui-btn-group .layui-btn{margin-left:0!important;margin-right:0!important;border-left:1px solid rgba(255,255,255,.5);border-radius:0}.layui-btn-group .layui-btn-primary{border-left:none}.layui-btn-group .layui-btn-primary:hover{border-color:#C9C9C9;color:#009688}.layui-btn-group .layui-btn:first-child{border-left:none;border-radius:2px 0 0 2px}.layui-btn-group .layui-btn-primary:first-child{border-left:1px solid #c9c9c9}.layui-btn-group .layui-btn:last-child{border-radius:0 2px 2px 0}.layui-btn-group .layui-btn+.layui-btn{margin-left:0}.layui-btn-group+.layui-btn-group{margin-left:10px}.layui-input,.layui-select,.layui-textarea{height:38px;line-height:38px;line-height:36px\9;border:1px solid #e6e6e6;background-color:#fff;border-radius:2px}.layui-form-label,.layui-form-mid,.layui-textarea{line-height:20px;position:relative}.layui-input,.layui-textarea{display:block;width:100%;padding-left:10px}.layui-input:hover,.layui-textarea:hover{border-color:#D2D2D2!important}.layui-input:focus,.layui-textarea:focus{border-color:#C9C9C9!important}.layui-textarea{min-height:100px;height:auto;padding:6px 10px;resize:vertical}.layui-select{padding:0 10px}.layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select{display:none}.layui-form-item{margin-bottom:15px;clear:both;*zoom:1}.layui-form-item:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-form-label{float:left;display:block;padding:9px 15px;width:80px;font-weight:400;text-align:right}.layui-form-item .layui-inline{margin-bottom:5px;margin-right:10px}.layui-input-block,.layui-input-inline{position:relative}.layui-input-block{margin-left:110px;min-height:36px}.layui-input-inline{display:inline-block;vertical-align:middle}.layui-form-item .layui-input-inline{float:left;width:190px;margin-right:10px}.layui-form-text .layui-input-inline{width:auto}.layui-form-mid{float:left;display:block;padding:8px 0;margin-right:10px}.layui-form-danger+.layui-form-select .layui-input,.layui-form-danger:focus{border:1px solid #FF5722!important}.layui-form-select{position:relative}.layui-form-select .layui-input{padding-right:30px;cursor:pointer}.layui-form-select .layui-edge{position:absolute;right:10px;top:50%;margin-top:-3px;cursor:pointer;border-width:6px;border-top-color:#c2c2c2;border-top-style:solid;transition:all .3s;-webkit-transition:all .3s}.layui-form-select dl{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:999;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box}.layui-form-select dl dd,.layui-form-select dl dt{padding:0 10px;line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layui-form-select dl dt{font-size:12px;color:#999}.layui-form-select dl dd{cursor:pointer}.layui-form-select dl dd:hover{background-color:#f2f2f2}.layui-form-select .layui-select-group dd{padding-left:20px}.layui-form-select dl dd.layui-this{background-color:#5FB878;color:#fff}.layui-form-checkbox,.layui-form-select dl dd.layui-disabled{background-color:#fff}.layui-form-selected dl{display:block}.layui-form-checkbox,.layui-form-checkbox *,.layui-form-radio,.layui-form-radio *,.layui-form-switch{display:inline-block;vertical-align:middle}.layui-form-selected .layui-edge{margin-top:-9px;-webkit-transform:rotate(180deg);transform:rotate(180deg);margin-top:-3px\9}:root .layui-form-selected .layui-edge{margin-top:-9px\0/IE9}.layui-select-none{margin:5px 0;text-align:center;color:#999}.layui-select-disabled .layui-disabled{border-color:#eee!important}.layui-select-disabled .layui-edge{border-top-color:#d2d2d2}.layui-form-checkbox{position:relative;height:30px;line-height:28px;margin:4px 10px 0 0;padding-right:30px;border:1px solid #d2d2d2;cursor:pointer;font-size:0;border-radius:2px;-webkit-transition:.1s linear;transition:.1s linear;box-sizing:border-box!important}.layui-form-checkbox:hover{border:1px solid #c2c2c2}.layui-form-checkbox span{padding:0 10px;height:100%;font-size:14px;background-color:#d2d2d2;color:#fff;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.layui-form-checkbox:hover span{background-color:#c2c2c2}.layui-form-checkbox i{position:absolute;right:0;width:30px;color:#fff;font-size:20px;text-align:center}.layui-form-checkbox:hover i{color:#c2c2c2}.layui-form-checked,.layui-form-checked:hover{border-color:#5FB878}.layui-form-checked span,.layui-form-checked:hover span{background-color:#5FB878}.layui-form-checked i,.layui-form-checked:hover i{color:#5FB878}.layui-form-checkbox[lay-skin=primary]{margin-top:6px;border:none!important;padding-right:0;background:0 0}.layui-form-checkbox[lay-skin=primary] span{float:right;background:0 0;color:#666}.layui-form-checkbox[lay-skin=primary] i{position:relative;top:0;width:16px;line-height:16px;border:1px solid #d2d2d2;font-size:12px;border-radius:2px;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-checkbox[lay-skin=primary]:hover i{border-color:#5FB878;color:#fff}.layui-form-checked[lay-skin=primary] i{border-color:#5FB878;background-color:#5FB878;color:#fff}.layui-checkbox-disbaled[lay-skin=primary] span{background:0 0!important}.layui-checkbox-disbaled[lay-skin=primary]:hover i{border-color:#d2d2d2}.layui-form-switch{position:relative;height:22px;line-height:22px;width:42px;padding:0 5px;margin-top:8px;border:1px solid #d2d2d2;border-radius:20px;cursor:pointer;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch i{position:absolute;left:5px;top:3px;width:16px;height:16px;border-radius:20px;background-color:#d2d2d2;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch em{position:absolute;right:5px;top:0;width:25px;padding:0!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.layui-form-onswitch{border-color:#5FB878;background-color:#5FB878}.layui-form-onswitch i{left:32px;background-color:#fff}.layui-form-onswitch em{left:5px;right:auto;color:#fff!important}.layui-checkbox-disbaled{border-color:#e2e2e2!important}.layui-checkbox-disbaled span{background-color:#e2e2e2!important}.layui-checkbox-disbaled:hover i{color:#fff!important}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio i{margin-right:8px;font-size:22px;color:#c2c2c2}.layui-form-radio span{font-size:14px}.layui-form-radio i:hover,.layui-form-radioed i{color:#5FB878}.layui-radio-disbaled i{color:#e2e2e2!important}.layui-form-pane .layui-form-label{width:110px;padding:8px 15px;height:38px;line-height:20px;border:1px solid #e6e6e6;border-radius:2px 0 0 2px;text-align:center;background-color:#FBFBFB;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-form-pane .layui-input-inline{margin-left:-1px}.layui-form-pane .layui-input-block{margin-left:110px;left:-1px}.layui-form-pane .layui-input{border-radius:0 2px 2px 0}.layui-form-pane .layui-form-text .layui-form-label{float:none;width:100%;border-right:1px solid #e6e6e6;border-radius:2px;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important;text-align:left}.layui-laypage button,.layui-laypage input,.layui-nav{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important}.layui-form-pane .layui-form-text .layui-input-inline{display:block;margin:0;top:-1px;clear:both}.layui-form-pane .layui-form-text .layui-input-block{margin:0;left:0;top:-1px}.layui-form-pane .layui-form-text .layui-textarea{min-height:100px;border-radius:0 0 2px 2px}.layui-form-pane .layui-form-checkbox{margin:4px 0 4px 10px}.layui-form-pane .layui-form-radio,.layui-form-pane .layui-form-switch{margin-top:6px;margin-left:10px}.layui-form-pane .layui-form-item[pane]{position:relative;border:1px solid #e6e6e6}.layui-form-pane .layui-form-item[pane] .layui-form-label{position:absolute;left:0;top:0;height:100%;border-width:0 1px 0 0}.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left:110px}.layui-layedit{border:1px solid #d2d2d2;border-radius:2px}.layui-layedit-tool{padding:3px 5px;border-bottom:1px solid #e2e2e2;font-size:0}.layedit-tool-fixed{position:fixed;top:0;border-top:1px solid #e2e2e2}.layui-layedit-tool .layedit-tool-mid,.layui-layedit-tool .layui-icon{display:inline-block;vertical-align:middle;text-align:center;font-size:14px}.layui-layedit-tool .layui-icon{position:relative;width:32px;height:30px;line-height:30px;margin:3px 5px;color:#777;cursor:pointer;border-radius:2px}.layui-layedit-tool .layui-icon:hover{color:#393D49}.layui-layedit-tool .layui-icon:active{color:#000}.layui-layedit-tool .layedit-tool-active{background-color:#e2e2e2;color:#000}.layui-layedit-tool .layui-disabled,.layui-layedit-tool .layui-disabled:hover{color:#d2d2d2;cursor:not-allowed}.layui-layedit-tool .layedit-tool-mid{width:1px;height:18px;margin:0 10px;background-color:#d2d2d2}.layedit-tool-html{width:50px!important;font-size:30px!important}.layedit-tool-b,.layedit-tool-code,.layedit-tool-help{font-size:16px!important}.layedit-tool-d,.layedit-tool-face,.layedit-tool-image,.layedit-tool-unlink{font-size:18px!important}.layedit-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-layedit-iframe iframe{display:block;width:100%}#LAY_layedit_code{overflow:hidden}.layui-table{width:100%;margin:10px 0;background-color:#fff}.layui-table tr{transition:all .3s;-webkit-transition:all .3s}.layui-table thead tr{background-color:#f2f2f2}.layui-table th{text-align:left}.layui-table td,.layui-table th{padding:9px 15px;min-height:20px;line-height:20px;border:1px solid #e2e2e2;font-size:14px}.layui-table tr:hover,.layui-table[lay-even] tr:nth-child(even){background-color:#f8f8f8}.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border:1px solid #e2e2e2}.layui-table[lay-skin=line] td,.layui-table[lay-skin=line] th{border:none;border-bottom:1px solid #e2e2e2}.layui-table[lay-skin=row] td,.layui-table[lay-skin=row] th{border:none;border-right:1px solid #e2e2e2}.layui-table[lay-skin=nob] td,.layui-table[lay-skin=nob] th{border:none}.layui-upload-button{position:relative;display:inline-block;vertical-align:middle;min-width:60px;height:38px;line-height:38px;border:1px solid #DFDFDF;border-radius:2px;overflow:hidden;background-color:#fff;color:#666}.layui-upload-button:hover{border:1px solid #aaa;color:#333}.layui-upload-button:active{border:1px solid #4CAF50;color:#000}.layui-upload-button input,.layui-upload-file{opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-upload-button input{position:absolute;left:0;top:0;z-index:10;font-size:100px;width:100%;height:100%}.layui-upload-icon{display:block;margin:0 15px;text-align:center}.layui-upload-icon i{margin-right:5px;vertical-align:top;font-size:20px;color:#5FB878}.layui-upload-iframe{position:absolute;width:0;height:0;border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}.layui-upload-enter .layui-upload-icon,.layui-upload-enter .layui-upload-icon i{color:#fff}.layui-flow-more{margin:10px 0;text-align:center;color:#999;font-size:14px}.layui-flow-more a{height:32px;line-height:32px}.layui-flow-more a *{display:inline-block;vertical-align:top}.layui-flow-more a cite{padding:0 20px;border-radius:3px;background-color:#eee;color:#333;font-style:normal}.layui-flow-more a cite:hover{opacity:.8}.layui-flow-more a i{font-size:30px;color:#737383}.layui-laypage{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;margin:10px 0;font-size:0}.layui-laypage>:first-child,.layui-laypage>:first-child em{border-radius:2px 0 0 2px}.layui-laypage>:last-child,.layui-laypage>:last-child em{border-radius:0 2px 2px 0}.layui-laypage a,.layui-laypage span{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding:0 15px;border:1px solid #e2e2e2;height:28px;line-height:28px;margin:0 -1px 5px 0;background-color:#fff;color:#333;font-size:12px}.layui-laypage em{font-style:normal}.layui-laypage span{color:#999;font-weight:700}.layui-laypage .layui-laypage-curr{position:relative}.layui-laypage .layui-laypage-curr em{position:relative;color:#fff;font-weight:400}.layui-laypage .layui-laypage-curr .layui-laypage-em{position:absolute;left:-1px;top:-1px;padding:1px;width:100%;height:100%;background-color:#009688}.layui-laypage-em{border-radius:2px}.layui-laypage-next em,.layui-laypage-prev em{font-family:Sim sun;font-size:16px}.layui-laypage .layui-laypage-total{height:30px;line-height:30px;margin-left:1px;border:none;font-weight:400}.layui-laypage button,.layui-laypage input{height:30px;line-height:30px;border:1px solid #e2e2e2;border-radius:2px;vertical-align:top;background-color:#fff;box-sizing:border-box!important}.layui-laypage input{width:50px;margin:0 5px;text-align:center}.layui-laypage button{margin-left:5px;padding:0 15px;cursor:pointer}.layui-code{position:relative;margin:10px 0;padding:15px;line-height:20px;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New;font-size:12px}.layui-tree{line-height:26px}.layui-tree li{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-tree li .layui-tree-spread,.layui-tree li a{display:inline-block;vertical-align:top;height:26px;*display:inline;*zoom:1;cursor:pointer}.layui-tree li a{font-size:0}.layui-tree li a i{font-size:16px}.layui-tree li a cite{padding:0 6px;font-size:14px;font-style:normal}.layui-tree li i{padding-left:6px;color:#333}.layui-tree li .layui-tree-check{font-size:13px}.layui-tree li .layui-tree-check:hover{color:#009E94}.layui-tree li ul{display:none;margin-left:20px}.layui-tree li .layui-tree-enter{line-height:24px;border:1px dotted #000}.layui-tree-drag{display:none;position:absolute;left:-666px;top:-666px;background-color:#f2f2f2;padding:5px 10px;border:1px dotted #000;white-space:nowrap}.layui-tree-drag i{padding-right:5px}.layui-nav{position:relative;padding:0 20px;background-color:#393D49;color:#c2c2c2;border-radius:2px;font-size:0;box-sizing:border-box!important}.layui-nav *{font-size:14px}.layui-nav .layui-nav-item{position:relative;display:inline-block;*display:inline;*zoom:1;vertical-align:middle;line-height:60px}.layui-nav .layui-nav-item a{display:block;padding:0 20px;color:#c2c2c2;transition:all .3s;-webkit-transition:all .3s}.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after{position:absolute;left:0;top:0;width:0;height:5px;background-color:#5FB878;transition:all .2s;-webkit-transition:all .2s}.layui-nav-bar{z-index:1000}.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{color:#fff}.layui-nav .layui-this:after{content:'';top:auto;bottom:0;width:100%}.layui-nav .layui-nav-more{content:'';width:0;height:0;border-style:solid dashed dashed;border-color:#c2c2c2 transparent transparent;overflow:hidden;cursor:pointer;transition:all .2s;-webkit-transition:all .2s;position:absolute;top:28px;right:3px;border-width:6px}.layui-nav .layui-nav-mored,.layui-nav-itemed .layui-nav-more{top:22px;border-style:dashed dashed solid;border-color:transparent transparent #c2c2c2}.layui-nav-child{display:none;position:absolute;left:0;top:65px;min-width:100%;line-height:36px;padding:5px 0;box-shadow:0 2px 4px rgba(0,0,0,.12);border:1px solid #d2d2d2;background-color:#fff;z-index:100;border-radius:2px;white-space:nowrap}.layui-nav .layui-nav-child a{color:#333}.layui-nav .layui-nav-child a:hover{background-color:#f2f2f2;color:#333}.layui-nav-child dd{position:relative}.layui-nav-child dd.layui-this{background-color:#5FB878;color:#fff}.layui-nav-child dd.layui-this a{color:#fff}.layui-nav-child dd.layui-this:after{display:none}.layui-nav-tree{width:200px;padding:0}.layui-nav-tree .layui-nav-item{display:block;width:100%;line-height:45px}.layui-nav-tree .layui-nav-item a{height:45px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-nav-tree .layui-nav-item a:hover{background-color:#4E5465}.layui-nav-tree .layui-nav-child dd.layui-this,.layui-nav-tree .layui-this,.layui-nav-tree .layui-this>a,.layui-nav-tree .layui-this>a:hover{background-color:#009688;color:#fff}.layui-nav-tree .layui-this:after{display:none}.layui-nav-itemed>a,.layui-nav-tree .layui-nav-title a,.layui-nav-tree .layui-nav-title a:hover{background-color:#2B2E37!important;color:#fff!important}.layui-nav-tree .layui-nav-bar{width:5px;height:0;background-color:#009688}.layui-nav-tree .layui-nav-child{position:relative;z-index:0;top:0;border:none;box-shadow:none}.layui-nav-tree .layui-nav-child a{height:40px;line-height:40px;color:#c2c2c2}.layui-nav-tree .layui-nav-child,.layui-nav-tree .layui-nav-child a:hover{background:0 0;color:#fff}.layui-nav-tree .layui-nav-more{top:20px;right:10px}.layui-nav-itemed .layui-nav-more{top:14px}.layui-nav-itemed .layui-nav-child{display:block;padding:0}.layui-nav-side{position:fixed;top:0;bottom:0;left:0;overflow-x:hidden;z-index:999}.layui-breadcrumb{visibility:hidden;font-size:0}.layui-breadcrumb a{padding-right:8px;line-height:22px;font-size:14px;color:#333!important}.layui-breadcrumb a:hover{color:#01AAED!important}.layui-breadcrumb a cite,.layui-breadcrumb a span{color:#666;cursor:text;font-style:normal}.layui-breadcrumb a span{padding-left:8px;font-family:Sim sun}.layui-tab{margin:10px 0;text-align:left!important}.layui-fixbar li,.layui-tab-bar,.layui-tab-title li,.layui-util-face ul li{cursor:pointer;text-align:center}.layui-tab[overflow]>.layui-tab-title{overflow:hidden}.layui-tab-title{position:relative;left:0;height:40px;white-space:nowrap;font-size:0;border-bottom:1px solid #e2e2e2;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;font-size:14px;transition:all .2s;-webkit-transition:all .2s;position:relative;line-height:40px;min-width:65px;padding:0 10px}.layui-tab-title li a{display:block}.layui-tab-title .layui-this{color:#000}.layui-tab-title .layui-this:after{position:absolute;left:0;top:0;content:'';width:100%;height:41px;border:1px solid #e2e2e2;border-bottom-color:#fff;border-radius:2px 2px 0 0;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important;pointer-events:none}.layui-tab-bar{position:absolute;right:0;top:0;z-index:10;width:30px;height:39px;line-height:39px;border:1px solid #e2e2e2;border-radius:2px;background-color:#fff}.layui-tab-bar .layui-icon{position:relative;display:inline-block;top:3px;transition:all .3s;-webkit-transition:all .3s}.layui-tab-item,.layui-util-face .layui-layer-TipsG{display:none}.layui-tab-more{padding-right:30px;height:auto;white-space:normal}.layui-tab-more li.layui-this:after{border-bottom-color:#e2e2e2;border-radius:2px}.layui-tab-more .layui-tab-bar .layui-icon{top:-2px;top:3px\9;-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root .layui-tab-more .layui-tab-bar .layui-icon{top:-2px\0/IE9}.layui-tab-content{padding:10px}.layui-tab-title li .layui-tab-close{position:relative;margin-left:8px;top:1px;color:#c2c2c2;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li .layui-tab-close:hover{border-radius:2px;background-color:#FF5722;color:#fff}.layui-tab-brief>.layui-tab-title .layui-this{color:#009688}.layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border:none;border-radius:0;border-bottom:3px solid #5FB878}.layui-tab-brief[overflow]>.layui-tab-title .layui-this:after{top:-1px}.layui-tab-card{border:1px solid #e2e2e2;border-radius:2px;box-shadow:0 2px 5px 0 rgba(0,0,0,.1)}.layui-tab-card>.layui-tab-title{background-color:#f2f2f2}.layui-tab-card>.layui-tab-title li{margin-right:-1px;margin-left:-1px}.layui-tab-card>.layui-tab-title .layui-this{background-color:#fff}.layui-tab-card>.layui-tab-title .layui-this:after{border-top:none;border-width:1px;border-bottom-color:#fff}.layui-tab-card>.layui-tab-title .layui-tab-bar{height:40px;line-height:40px;border-radius:0;border-top:none;border-right:none}.layui-tab-card>.layui-tab-more .layui-this{background:0 0;color:#5FB878}.layui-tab-card>.layui-tab-more .layui-this:after{border:none}.layui-fixbar{position:fixed;right:15px;bottom:15px;z-index:9999}.layui-fixbar li{width:50px;height:50px;line-height:50px;margin-bottom:1px;font-size:30px;background-color:#9F9F9F;color:#fff;border-radius:2px;opacity:.95}.layui-fixbar li:hover{opacity:.85}.layui-fixbar li:active{opacity:1}.layui-fixbar .layui-fixbar-top{display:none;font-size:40px}body .layui-util-face{border:none;background:0 0}body .layui-util-face .layui-layer-content{padding:0;background-color:#fff;color:#666;box-shadow:none}.layui-util-face ul{position:relative;width:372px;padding:10px;border:1px solid #D9D9D9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-util-face ul li{float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px}.layui-util-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layui-anim{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-anim-loop{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}@-webkit-keyframes layui-rotate{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes layui-rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.layui-anim-rotate{-webkit-animation-name:layui-rotate;animation-name:layui-rotate;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes layui-up{from{-webkit-transform:translate3d(0,100%,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-up{from{transform:translate3d(0,100%,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-up{-webkit-animation-name:layui-up;animation-name:layui-up}@-webkit-keyframes layui-upbit{from{-webkit-transform:translate3d(0,30px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-upbit{from{transform:translate3d(0,30px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-upbit{-webkit-animation-name:layui-upbit;animation-name:layui-upbit}@-webkit-keyframes layui-scale{0%{opacity:.3;-webkit-transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale{0%{opacity:.3;-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-ms-transform:scale(1);transform:scale(1)}}.layui-anim-scale{-webkit-animation-name:layui-scale;animation-name:layui-scale}@-webkit-keyframes layui-scale-spring{0%{opacity:.5;-webkit-transform:scale(.5)}80%{opacity:.8;-webkit-transform:scale(1.1)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale-spring{0%{opacity:.5;-ms-transform:scale(.5);transform:scale(.5)}80%{opacity:.8;-ms-transform:scale(1.1);transform:scale(1.1)}100%{opacity:1;-ms-transform:scale(1);transform:scale(1)}}.layui-anim-scaleSpring{-webkit-animation-name:layui-scale-spring;animation-name:layui-scale-spring}@media screen and (max-width:450px){.layui-form-item .layui-form-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-form-item .layui-inline{display:block;margin-right:0;margin-bottom:20px;clear:both}.layui-form-item .layui-inline:after{content:'\20';clear:both;display:block;height:0}.layui-form-item .layui-input-inline{display:block;float:none;left:-3px;width:auto;margin:0 0 10px 112px}.layui-form-item .layui-input-inline+.layui-form-mid{margin-left:110px;top:-5px;padding:0}.layui-form-item .layui-form-checkbox{margin-right:5px;margin-bottom:5px}} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.mobile.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.mobile.css deleted file mode 100755 index 06aa5f6a7cd0bb452d15588617792e0870b6ca0c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/layui.mobile.css +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/code.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/code.css deleted file mode 100755 index 704b8f3d7baa129f5df9f6d6aaff4862ed09b26d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/code.css +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:30px;line-height:30px;border-bottom:1px solid #ddd}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #ddd;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/_all.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/_all.css deleted file mode 100755 index e9d0ceb92ee138b9513f7e32c7c968a5b779d737..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/_all.css +++ /dev/null @@ -1,530 +0,0 @@ -/* iCheck plugin Flat skin ------------------------------------ */ -.icheckbox_flat, -.iradio_flat { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(flat.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat { - background-position: 0 0; -} - .icheckbox_flat.checked { - background-position: -22px 0; - } - .icheckbox_flat.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat { - background-position: -88px 0; -} - .iradio_flat.checked { - background-position: -110px 0; - } - .iradio_flat.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat, - .iradio_flat { - background-image: url(flat@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* red */ -.icheckbox_flat-red, -.iradio_flat-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-red { - background-position: 0 0; -} - .icheckbox_flat-red.checked { - background-position: -22px 0; - } - .icheckbox_flat-red.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-red.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-red { - background-position: -88px 0; -} - .iradio_flat-red.checked { - background-position: -110px 0; - } - .iradio_flat-red.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-red.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-red, - .iradio_flat-red { - background-image: url(red@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* green */ -.icheckbox_flat-green, -.iradio_flat-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-green { - background-position: 0 0; -} - .icheckbox_flat-green.checked { - background-position: -22px 0; - } - .icheckbox_flat-green.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-green.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-green { - background-position: -88px 0; -} - .iradio_flat-green.checked { - background-position: -110px 0; - } - .iradio_flat-green.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-green.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-green, - .iradio_flat-green { - background-image: url(green@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* blue */ -.icheckbox_flat-blue, -.iradio_flat-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-blue { - background-position: 0 0; -} - .icheckbox_flat-blue.checked { - background-position: -22px 0; - } - .icheckbox_flat-blue.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-blue.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-blue { - background-position: -88px 0; -} - .iradio_flat-blue.checked { - background-position: -110px 0; - } - .iradio_flat-blue.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-blue.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-blue, - .iradio_flat-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* aero */ -.icheckbox_flat-aero, -.iradio_flat-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-aero { - background-position: 0 0; -} - .icheckbox_flat-aero.checked { - background-position: -22px 0; - } - .icheckbox_flat-aero.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-aero.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-aero { - background-position: -88px 0; -} - .iradio_flat-aero.checked { - background-position: -110px 0; - } - .iradio_flat-aero.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-aero.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-aero, - .iradio_flat-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* grey */ -.icheckbox_flat-grey, -.iradio_flat-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-grey { - background-position: 0 0; -} - .icheckbox_flat-grey.checked { - background-position: -22px 0; - } - .icheckbox_flat-grey.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-grey.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-grey { - background-position: -88px 0; -} - .iradio_flat-grey.checked { - background-position: -110px 0; - } - .iradio_flat-grey.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-grey.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-grey, - .iradio_flat-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* orange */ -.icheckbox_flat-orange, -.iradio_flat-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-orange { - background-position: 0 0; -} - .icheckbox_flat-orange.checked { - background-position: -22px 0; - } - .icheckbox_flat-orange.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-orange.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-orange { - background-position: -88px 0; -} - .iradio_flat-orange.checked { - background-position: -110px 0; - } - .iradio_flat-orange.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-orange.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-orange, - .iradio_flat-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* yellow */ -.icheckbox_flat-yellow, -.iradio_flat-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-yellow { - background-position: 0 0; -} - .icheckbox_flat-yellow.checked { - background-position: -22px 0; - } - .icheckbox_flat-yellow.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-yellow.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-yellow { - background-position: -88px 0; -} - .iradio_flat-yellow.checked { - background-position: -110px 0; - } - .iradio_flat-yellow.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-yellow.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-yellow, - .iradio_flat-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* pink */ -.icheckbox_flat-pink, -.iradio_flat-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-pink { - background-position: 0 0; -} - .icheckbox_flat-pink.checked { - background-position: -22px 0; - } - .icheckbox_flat-pink.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-pink.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-pink { - background-position: -88px 0; -} - .iradio_flat-pink.checked { - background-position: -110px 0; - } - .iradio_flat-pink.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-pink.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-pink, - .iradio_flat-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} - -/* purple */ -.icheckbox_flat-purple, -.iradio_flat-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-purple { - background-position: 0 0; -} - .icheckbox_flat-purple.checked { - background-position: -22px 0; - } - .icheckbox_flat-purple.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-purple.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-purple { - background-position: -88px 0; -} - .iradio_flat-purple.checked { - background-position: -110px 0; - } - .iradio_flat-purple.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-purple.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-purple, - .iradio_flat-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.css deleted file mode 100755 index 71cbca97ec01b926839b49a040cec4af1a627d53..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, aero ------------------------------------ */ -.icheckbox_flat-aero, -.iradio_flat-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-aero { - background-position: 0 0; -} - .icheckbox_flat-aero.checked { - background-position: -22px 0; - } - .icheckbox_flat-aero.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-aero.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-aero { - background-position: -88px 0; -} - .iradio_flat-aero.checked { - background-position: -110px 0; - } - .iradio_flat-aero.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-aero.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-aero, - .iradio_flat-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.png deleted file mode 100755 index f4277aa4cf04050989b48c548ce0f9ae377bdc48..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero@2x.png deleted file mode 100755 index a9a749459d4995a42d7fa5fb50a08d4b11ac8198..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/aero@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.css deleted file mode 100755 index 56a78302976c90607927e40cd3ebd4ee10cd3f1c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, blue ------------------------------------ */ -.icheckbox_flat-blue, -.iradio_flat-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-blue { - background-position: 0 0; -} - .icheckbox_flat-blue.checked { - background-position: -22px 0; - } - .icheckbox_flat-blue.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-blue.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-blue { - background-position: -88px 0; -} - .iradio_flat-blue.checked { - background-position: -110px 0; - } - .iradio_flat-blue.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-blue.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-blue, - .iradio_flat-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.png deleted file mode 100755 index 4b6ef9825e29aabe9adc02d3263106f8cc036da0..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue@2x.png deleted file mode 100755 index d52da05771f1b9e3be774b778dca0aeebe4d7b0f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/blue@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.css deleted file mode 100755 index 0f39690b235efe90bffaeae1b69642a83bbf49e2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin flat skin, black ------------------------------------ */ -.icheckbox_flat, -.iradio_flat { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(flat.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat { - background-position: 0 0; -} - .icheckbox_flat.checked { - background-position: -22px 0; - } - .icheckbox_flat.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat { - background-position: -88px 0; -} - .iradio_flat.checked { - background-position: -110px 0; - } - .iradio_flat.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat, - .iradio_flat { - background-image: url(flat@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.png deleted file mode 100755 index 15af826e0aa13c0a22375e0cd5135c90e6ac790b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat@2x.png deleted file mode 100755 index e70e438c5d5ed00e7082929e61a0d9d162daf473..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/flat@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.css deleted file mode 100755 index b80e04d51307b34f85ca05e4350f2dcf2709c563..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, green ------------------------------------ */ -.icheckbox_flat-green, -.iradio_flat-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-green { - background-position: 0 0; -} - .icheckbox_flat-green.checked { - background-position: -22px 0; - } - .icheckbox_flat-green.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-green.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-green { - background-position: -88px 0; -} - .iradio_flat-green.checked { - background-position: -110px 0; - } - .iradio_flat-green.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-green.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-green, - .iradio_flat-green { - background-image: url(green@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.png deleted file mode 100755 index 6b303fbeadb70a90e11d83439189de9b618f0729..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green@2x.png deleted file mode 100755 index 92b4411d907f15ebc7f714ae9967981c471dc089..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/green@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.css deleted file mode 100755 index 96e62e832b47a205e08c2bb273f4b5bda4f2340e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, grey ------------------------------------ */ -.icheckbox_flat-grey, -.iradio_flat-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-grey { - background-position: 0 0; -} - .icheckbox_flat-grey.checked { - background-position: -22px 0; - } - .icheckbox_flat-grey.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-grey.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-grey { - background-position: -88px 0; -} - .iradio_flat-grey.checked { - background-position: -110px 0; - } - .iradio_flat-grey.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-grey.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-grey, - .iradio_flat-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.png deleted file mode 100755 index c6e2873ed5fc2cb1f151c333034ed85422d29a31..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey@2x.png deleted file mode 100755 index 0b47b1c6d9961460cad5143a8cb23343e5c37909..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/grey@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.css deleted file mode 100755 index f9c873ffc8db38e6ebe490a51b1bfbfb6fce4dea..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, orange ------------------------------------ */ -.icheckbox_flat-orange, -.iradio_flat-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-orange { - background-position: 0 0; -} - .icheckbox_flat-orange.checked { - background-position: -22px 0; - } - .icheckbox_flat-orange.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-orange.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-orange { - background-position: -88px 0; -} - .iradio_flat-orange.checked { - background-position: -110px 0; - } - .iradio_flat-orange.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-orange.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-orange, - .iradio_flat-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.png deleted file mode 100755 index ec2532ebe4492b949f48278fd13b46e792869083..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange@2x.png deleted file mode 100755 index 9350b50624f9017ba8bb3fc64c526428d0bda407..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/orange@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.css deleted file mode 100755 index 179f980dddf4f520656c93411f03148222fba8b5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, pink ------------------------------------ */ -.icheckbox_flat-pink, -.iradio_flat-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-pink { - background-position: 0 0; -} - .icheckbox_flat-pink.checked { - background-position: -22px 0; - } - .icheckbox_flat-pink.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-pink.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-pink { - background-position: -88px 0; -} - .iradio_flat-pink.checked { - background-position: -110px 0; - } - .iradio_flat-pink.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-pink.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-pink, - .iradio_flat-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.png deleted file mode 100755 index 3e65d9dd62f4f43faba300e95e57d48e6fb28585..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink@2x.png deleted file mode 100755 index 281ba06bec18717fc3f45e95fb08e12842169195..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/pink@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.css deleted file mode 100755 index dfedafc29a07feb05ecbc789bc5f411572a88824..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, purple ------------------------------------ */ -.icheckbox_flat-purple, -.iradio_flat-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-purple { - background-position: 0 0; -} - .icheckbox_flat-purple.checked { - background-position: -22px 0; - } - .icheckbox_flat-purple.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-purple.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-purple { - background-position: -88px 0; -} - .iradio_flat-purple.checked { - background-position: -110px 0; - } - .iradio_flat-purple.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-purple.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-purple, - .iradio_flat-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.png deleted file mode 100755 index 3699fd583289e37e1eca6be2940f22e0daa5350b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple@2x.png deleted file mode 100755 index 7f4be74a7c08a453802d46e6a7971250ee416f08..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/purple@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.css deleted file mode 100755 index 83ec91e92470f71d4ac966afede3f5627f2b1295..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, red ------------------------------------ */ -.icheckbox_flat-red, -.iradio_flat-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-red { - background-position: 0 0; -} - .icheckbox_flat-red.checked { - background-position: -22px 0; - } - .icheckbox_flat-red.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-red.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-red { - background-position: -88px 0; -} - .iradio_flat-red.checked { - background-position: -110px 0; - } - .iradio_flat-red.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-red.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-red, - .iradio_flat-red { - background-image: url(red@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.png deleted file mode 100755 index 0d5ac3819b4d2aee17a543497d3e70699a06f052..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red@2x.png deleted file mode 100755 index 38590d98526ff6b1ce5423e0941dc0640b77fd99..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/red@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.css deleted file mode 100755 index 7bb6039351dc50aabd3ba9879f5e2e26dc3809d1..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Flat skin, yellow ------------------------------------ */ -.icheckbox_flat-yellow, -.iradio_flat-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 20px; - height: 20px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_flat-yellow { - background-position: 0 0; -} - .icheckbox_flat-yellow.checked { - background-position: -22px 0; - } - .icheckbox_flat-yellow.disabled { - background-position: -44px 0; - cursor: default; - } - .icheckbox_flat-yellow.checked.disabled { - background-position: -66px 0; - } - -.iradio_flat-yellow { - background-position: -88px 0; -} - .iradio_flat-yellow.checked { - background-position: -110px 0; - } - .iradio_flat-yellow.disabled { - background-position: -132px 0; - cursor: default; - } - .iradio_flat-yellow.checked.disabled { - background-position: -154px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_flat-yellow, - .iradio_flat-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 176px 22px; - background-size: 176px 22px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.png deleted file mode 100755 index 909dadc529d6860a7a707a50feb98d27f25d6e97..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow@2x.png deleted file mode 100755 index 9fd5d7339388a8a7d5997ae52195fc49b0db91b1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/flat/yellow@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.css deleted file mode 100755 index a34a7548d344e227c60fcb190712b2a65ef42a0a..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.css +++ /dev/null @@ -1,53 +0,0 @@ -/* iCheck plugin Futurico skin ------------------------------------ */ -.icheckbox_futurico, -.iradio_futurico { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 16px; - height: 17px; - background: url(futurico.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_futurico { - background-position: 0 0; -} - .icheckbox_futurico.checked { - background-position: -18px 0; - } - .icheckbox_futurico.disabled { - background-position: -36px 0; - cursor: default; - } - .icheckbox_futurico.checked.disabled { - background-position: -54px 0; - } - -.iradio_futurico { - background-position: -72px 0; -} - .iradio_futurico.checked { - background-position: -90px 0; - } - .iradio_futurico.disabled { - background-position: -108px 0; - cursor: default; - } - .iradio_futurico.checked.disabled { - background-position: -126px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_futurico, - .iradio_futurico { - background-image: url(futurico@2x.png); - -webkit-background-size: 144px 19px; - background-size: 144px 19px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.png deleted file mode 100755 index 50d62b5d4089e51c11e085f30b39db3548ab6ea2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico@2x.png deleted file mode 100755 index f7eb45aad03aab94a6331c94ca147c5ff9b635e2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/futurico/futurico@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/icheck.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/icheck.css deleted file mode 100755 index 6439b7429b93b4092d1da164b47a3f123dbf047c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/icheck.css +++ /dev/null @@ -1,61 +0,0 @@ -/* iCheck plugin skins ------------------------------------ */ -@import url("minimal/_all.css"); -/* -@import url("minimal/minimal.css"); -@import url("minimal/red.css"); -@import url("minimal/green.css"); -@import url("minimal/blue.css"); -@import url("minimal/aero.css"); -@import url("minimal/grey.css"); -@import url("minimal/orange.css"); -@import url("minimal/yellow.css"); -@import url("minimal/pink.css"); -@import url("minimal/purple.css"); -*/ - -@import url("square/_all.css"); -/* -@import url("square/square.css"); -@import url("square/red.css"); -@import url("square/green.css"); -@import url("square/blue.css"); -@import url("square/aero.css"); -@import url("square/grey.css"); -@import url("square/orange.css"); -@import url("square/yellow.css"); -@import url("square/pink.css"); -@import url("square/purple.css"); -*/ - -@import url("flat/_all.css"); -/* -@import url("flat/flat.css"); -@import url("flat/red.css"); -@import url("flat/green.css"); -@import url("flat/blue.css"); -@import url("flat/aero.css"); -@import url("flat/grey.css"); -@import url("flat/orange.css"); -@import url("flat/yellow.css"); -@import url("flat/pink.css"); -@import url("flat/purple.css"); -*/ - -@import url("line/_all.css"); -/* -@import url("line/line.css"); -@import url("line/red.css"); -@import url("line/green.css"); -@import url("line/blue.css"); -@import url("line/aero.css"); -@import url("line/grey.css"); -@import url("line/orange.css"); -@import url("line/yellow.css"); -@import url("line/pink.css"); -@import url("line/purple.css"); -*/ - -@import url("polaris/polaris.css"); - -@import url("futurico/futurico.css"); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/_all.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/_all.css deleted file mode 100755 index 8a20ed2cad0c03093ff54435a9e62e98d822ac1d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/_all.css +++ /dev/null @@ -1,710 +0,0 @@ -/* iCheck plugin Line skin ------------------------------------ */ -.icheckbox_line, -.iradio_line { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #000; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line .icheck_line-icon, - .iradio_line .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line.hover, - .icheckbox_line.checked.hover, - .iradio_line.hover { - background: #444; - } - .icheckbox_line.checked, - .iradio_line.checked { - background: #000; - } - .icheckbox_line.checked .icheck_line-icon, - .iradio_line.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line.disabled, - .iradio_line.disabled { - background: #ccc; - cursor: default; - } - .icheckbox_line.disabled .icheck_line-icon, - .iradio_line.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line.checked.disabled, - .iradio_line.checked.disabled { - background: #ccc; - } - .icheckbox_line.checked.disabled .icheck_line-icon, - .iradio_line.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line .icheck_line-icon, - .iradio_line .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* red */ -.icheckbox_line-red, -.iradio_line-red { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #e56c69; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-red .icheck_line-icon, - .iradio_line-red .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-red.hover, - .icheckbox_line-red.checked.hover, - .iradio_line-red.hover { - background: #E98582; - } - .icheckbox_line-red.checked, - .iradio_line-red.checked { - background: #e56c69; - } - .icheckbox_line-red.checked .icheck_line-icon, - .iradio_line-red.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-red.disabled, - .iradio_line-red.disabled { - background: #F7D3D2; - cursor: default; - } - .icheckbox_line-red.disabled .icheck_line-icon, - .iradio_line-red.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-red.checked.disabled, - .iradio_line-red.checked.disabled { - background: #F7D3D2; - } - .icheckbox_line-red.checked.disabled .icheck_line-icon, - .iradio_line-red.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-red .icheck_line-icon, - .iradio_line-red .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* green */ -.icheckbox_line-green, -.iradio_line-green { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #1b7e5a; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-green .icheck_line-icon, - .iradio_line-green .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-green.hover, - .icheckbox_line-green.checked.hover, - .iradio_line-green.hover { - background: #24AA7A; - } - .icheckbox_line-green.checked, - .iradio_line-green.checked { - background: #1b7e5a; - } - .icheckbox_line-green.checked .icheck_line-icon, - .iradio_line-green.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-green.disabled, - .iradio_line-green.disabled { - background: #89E6C4; - cursor: default; - } - .icheckbox_line-green.disabled .icheck_line-icon, - .iradio_line-green.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-green.checked.disabled, - .iradio_line-green.checked.disabled { - background: #89E6C4; - } - .icheckbox_line-green.checked.disabled .icheck_line-icon, - .iradio_line-green.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-green .icheck_line-icon, - .iradio_line-green .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* blue */ -.icheckbox_line-blue, -.iradio_line-blue { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #2489c5; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-blue .icheck_line-icon, - .iradio_line-blue .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-blue.hover, - .icheckbox_line-blue.checked.hover, - .iradio_line-blue.hover { - background: #3DA0DB; - } - .icheckbox_line-blue.checked, - .iradio_line-blue.checked { - background: #2489c5; - } - .icheckbox_line-blue.checked .icheck_line-icon, - .iradio_line-blue.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-blue.disabled, - .iradio_line-blue.disabled { - background: #ADD7F0; - cursor: default; - } - .icheckbox_line-blue.disabled .icheck_line-icon, - .iradio_line-blue.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-blue.checked.disabled, - .iradio_line-blue.checked.disabled { - background: #ADD7F0; - } - .icheckbox_line-blue.checked.disabled .icheck_line-icon, - .iradio_line-blue.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-blue .icheck_line-icon, - .iradio_line-blue .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* aero */ -.icheckbox_line-aero, -.iradio_line-aero { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #9cc2cb; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-aero .icheck_line-icon, - .iradio_line-aero .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-aero.hover, - .icheckbox_line-aero.checked.hover, - .iradio_line-aero.hover { - background: #B5D1D8; - } - .icheckbox_line-aero.checked, - .iradio_line-aero.checked { - background: #9cc2cb; - } - .icheckbox_line-aero.checked .icheck_line-icon, - .iradio_line-aero.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-aero.disabled, - .iradio_line-aero.disabled { - background: #D2E4E8; - cursor: default; - } - .icheckbox_line-aero.disabled .icheck_line-icon, - .iradio_line-aero.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-aero.checked.disabled, - .iradio_line-aero.checked.disabled { - background: #D2E4E8; - } - .icheckbox_line-aero.checked.disabled .icheck_line-icon, - .iradio_line-aero.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-aero .icheck_line-icon, - .iradio_line-aero .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* grey */ -.icheckbox_line-grey, -.iradio_line-grey { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #73716e; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-grey .icheck_line-icon, - .iradio_line-grey .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-grey.hover, - .icheckbox_line-grey.checked.hover, - .iradio_line-grey.hover { - background: #8B8986; - } - .icheckbox_line-grey.checked, - .iradio_line-grey.checked { - background: #73716e; - } - .icheckbox_line-grey.checked .icheck_line-icon, - .iradio_line-grey.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-grey.disabled, - .iradio_line-grey.disabled { - background: #D5D4D3; - cursor: default; - } - .icheckbox_line-grey.disabled .icheck_line-icon, - .iradio_line-grey.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-grey.checked.disabled, - .iradio_line-grey.checked.disabled { - background: #D5D4D3; - } - .icheckbox_line-grey.checked.disabled .icheck_line-icon, - .iradio_line-grey.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-grey .icheck_line-icon, - .iradio_line-grey .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* orange */ -.icheckbox_line-orange, -.iradio_line-orange { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #f70; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-orange .icheck_line-icon, - .iradio_line-orange .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-orange.hover, - .icheckbox_line-orange.checked.hover, - .iradio_line-orange.hover { - background: #FF9233; - } - .icheckbox_line-orange.checked, - .iradio_line-orange.checked { - background: #f70; - } - .icheckbox_line-orange.checked .icheck_line-icon, - .iradio_line-orange.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-orange.disabled, - .iradio_line-orange.disabled { - background: #FFD6B3; - cursor: default; - } - .icheckbox_line-orange.disabled .icheck_line-icon, - .iradio_line-orange.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-orange.checked.disabled, - .iradio_line-orange.checked.disabled { - background: #FFD6B3; - } - .icheckbox_line-orange.checked.disabled .icheck_line-icon, - .iradio_line-orange.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-orange .icheck_line-icon, - .iradio_line-orange .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* yellow */ -.icheckbox_line-yellow, -.iradio_line-yellow { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #FFC414; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-yellow .icheck_line-icon, - .iradio_line-yellow .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-yellow.hover, - .icheckbox_line-yellow.checked.hover, - .iradio_line-yellow.hover { - background: #FFD34F; - } - .icheckbox_line-yellow.checked, - .iradio_line-yellow.checked { - background: #FFC414; - } - .icheckbox_line-yellow.checked .icheck_line-icon, - .iradio_line-yellow.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-yellow.disabled, - .iradio_line-yellow.disabled { - background: #FFE495; - cursor: default; - } - .icheckbox_line-yellow.disabled .icheck_line-icon, - .iradio_line-yellow.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-yellow.checked.disabled, - .iradio_line-yellow.checked.disabled { - background: #FFE495; - } - .icheckbox_line-yellow.checked.disabled .icheck_line-icon, - .iradio_line-yellow.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-yellow .icheck_line-icon, - .iradio_line-yellow .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* pink */ -.icheckbox_line-pink, -.iradio_line-pink { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #a77a94; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-pink .icheck_line-icon, - .iradio_line-pink .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-pink.hover, - .icheckbox_line-pink.checked.hover, - .iradio_line-pink.hover { - background: #B995A9; - } - .icheckbox_line-pink.checked, - .iradio_line-pink.checked { - background: #a77a94; - } - .icheckbox_line-pink.checked .icheck_line-icon, - .iradio_line-pink.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-pink.disabled, - .iradio_line-pink.disabled { - background: #E0D0DA; - cursor: default; - } - .icheckbox_line-pink.disabled .icheck_line-icon, - .iradio_line-pink.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-pink.checked.disabled, - .iradio_line-pink.checked.disabled { - background: #E0D0DA; - } - .icheckbox_line-pink.checked.disabled .icheck_line-icon, - .iradio_line-pink.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-pink .icheck_line-icon, - .iradio_line-pink .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} - -/* purple */ -.icheckbox_line-purple, -.iradio_line-purple { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #6a5a8c; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-purple .icheck_line-icon, - .iradio_line-purple .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-purple.hover, - .icheckbox_line-purple.checked.hover, - .iradio_line-purple.hover { - background: #8677A7; - } - .icheckbox_line-purple.checked, - .iradio_line-purple.checked { - background: #6a5a8c; - } - .icheckbox_line-purple.checked .icheck_line-icon, - .iradio_line-purple.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-purple.disabled, - .iradio_line-purple.disabled { - background: #D2CCDE; - cursor: default; - } - .icheckbox_line-purple.disabled .icheck_line-icon, - .iradio_line-purple.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-purple.checked.disabled, - .iradio_line-purple.checked.disabled { - background: #D2CCDE; - } - .icheckbox_line-purple.checked.disabled .icheck_line-icon, - .iradio_line-purple.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-purple .icheck_line-icon, - .iradio_line-purple .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/aero.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/aero.css deleted file mode 100755 index 82272230012485ddc78475d6c05b9713fa7385d7..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/aero.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, aero ------------------------------------ */ -.icheckbox_line-aero, -.iradio_line-aero { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #9cc2cb; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-aero .icheck_line-icon, - .iradio_line-aero .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-aero.hover, - .icheckbox_line-aero.checked.hover, - .iradio_line-aero.hover { - background: #B5D1D8; - } - .icheckbox_line-aero.checked, - .iradio_line-aero.checked { - background: #9cc2cb; - } - .icheckbox_line-aero.checked .icheck_line-icon, - .iradio_line-aero.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-aero.disabled, - .iradio_line-aero.disabled { - background: #D2E4E8; - cursor: default; - } - .icheckbox_line-aero.disabled .icheck_line-icon, - .iradio_line-aero.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-aero.checked.disabled, - .iradio_line-aero.checked.disabled { - background: #D2E4E8; - } - .icheckbox_line-aero.checked.disabled .icheck_line-icon, - .iradio_line-aero.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-aero .icheck_line-icon, - .iradio_line-aero .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/blue.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/blue.css deleted file mode 100755 index b3f98196f7cdc574fc9eb408d63ded30634ba676..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/blue.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, blue ------------------------------------ */ -.icheckbox_line-blue, -.iradio_line-blue { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #2489c5; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-blue .icheck_line-icon, - .iradio_line-blue .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-blue.hover, - .icheckbox_line-blue.checked.hover, - .iradio_line-blue.hover { - background: #3DA0DB; - } - .icheckbox_line-blue.checked, - .iradio_line-blue.checked { - background: #2489c5; - } - .icheckbox_line-blue.checked .icheck_line-icon, - .iradio_line-blue.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-blue.disabled, - .iradio_line-blue.disabled { - background: #ADD7F0; - cursor: default; - } - .icheckbox_line-blue.disabled .icheck_line-icon, - .iradio_line-blue.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-blue.checked.disabled, - .iradio_line-blue.checked.disabled { - background: #ADD7F0; - } - .icheckbox_line-blue.checked.disabled .icheck_line-icon, - .iradio_line-blue.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-blue .icheck_line-icon, - .iradio_line-blue .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/green.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/green.css deleted file mode 100755 index 82b426319c68b2b53ffcdcaa19dc2c67baf08a35..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/green.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, green ------------------------------------ */ -.icheckbox_line-green, -.iradio_line-green { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #1b7e5a; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-green .icheck_line-icon, - .iradio_line-green .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-green.hover, - .icheckbox_line-green.checked.hover, - .iradio_line-green.hover { - background: #24AA7A; - } - .icheckbox_line-green.checked, - .iradio_line-green.checked { - background: #1b7e5a; - } - .icheckbox_line-green.checked .icheck_line-icon, - .iradio_line-green.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-green.disabled, - .iradio_line-green.disabled { - background: #89E6C4; - cursor: default; - } - .icheckbox_line-green.disabled .icheck_line-icon, - .iradio_line-green.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-green.checked.disabled, - .iradio_line-green.checked.disabled { - background: #89E6C4; - } - .icheckbox_line-green.checked.disabled .icheck_line-icon, - .iradio_line-green.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-green .icheck_line-icon, - .iradio_line-green .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/grey.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/grey.css deleted file mode 100755 index 96a5d261a9edb17b097767f2adf5feddb1444de2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/grey.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, grey ------------------------------------ */ -.icheckbox_line-grey, -.iradio_line-grey { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #73716e; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-grey .icheck_line-icon, - .iradio_line-grey .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-grey.hover, - .icheckbox_line-grey.checked.hover, - .iradio_line-grey.hover { - background: #8B8986; - } - .icheckbox_line-grey.checked, - .iradio_line-grey.checked { - background: #73716e; - } - .icheckbox_line-grey.checked .icheck_line-icon, - .iradio_line-grey.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-grey.disabled, - .iradio_line-grey.disabled { - background: #D5D4D3; - cursor: default; - } - .icheckbox_line-grey.disabled .icheck_line-icon, - .iradio_line-grey.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-grey.checked.disabled, - .iradio_line-grey.checked.disabled { - background: #D5D4D3; - } - .icheckbox_line-grey.checked.disabled .icheck_line-icon, - .iradio_line-grey.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-grey .icheck_line-icon, - .iradio_line-grey .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.css deleted file mode 100755 index a24398aeead2b5207ed94488c294397283c614a6..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, black ------------------------------------ */ -.icheckbox_line, -.iradio_line { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #000; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line .icheck_line-icon, - .iradio_line .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line.hover, - .icheckbox_line.checked.hover, - .iradio_line.hover { - background: #444; - } - .icheckbox_line.checked, - .iradio_line.checked { - background: #000; - } - .icheckbox_line.checked .icheck_line-icon, - .iradio_line.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line.disabled, - .iradio_line.disabled { - background: #ccc; - cursor: default; - } - .icheckbox_line.disabled .icheck_line-icon, - .iradio_line.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line.checked.disabled, - .iradio_line.checked.disabled { - background: #ccc; - } - .icheckbox_line.checked.disabled .icheck_line-icon, - .iradio_line.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line .icheck_line-icon, - .iradio_line .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.png deleted file mode 100755 index d21d7a7b43d41ae5ea448a9fd28ad2fe1713b4ee..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line@2x.png deleted file mode 100755 index 62900a2d93bed8d6e70740d891ccb58d4148d627..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/line@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/orange.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/orange.css deleted file mode 100755 index 5f051b40facf35623e5e84486848618d2c38571d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/orange.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, orange ------------------------------------ */ -.icheckbox_line-orange, -.iradio_line-orange { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #f70; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-orange .icheck_line-icon, - .iradio_line-orange .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-orange.hover, - .icheckbox_line-orange.checked.hover, - .iradio_line-orange.hover { - background: #FF9233; - } - .icheckbox_line-orange.checked, - .iradio_line-orange.checked { - background: #f70; - } - .icheckbox_line-orange.checked .icheck_line-icon, - .iradio_line-orange.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-orange.disabled, - .iradio_line-orange.disabled { - background: #FFD6B3; - cursor: default; - } - .icheckbox_line-orange.disabled .icheck_line-icon, - .iradio_line-orange.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-orange.checked.disabled, - .iradio_line-orange.checked.disabled { - background: #FFD6B3; - } - .icheckbox_line-orange.checked.disabled .icheck_line-icon, - .iradio_line-orange.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-orange .icheck_line-icon, - .iradio_line-orange .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/pink.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/pink.css deleted file mode 100755 index b98bbc3da69210fc73fd76c16d8e857c75e2a95f..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/pink.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, pink ------------------------------------ */ -.icheckbox_line-pink, -.iradio_line-pink { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #a77a94; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-pink .icheck_line-icon, - .iradio_line-pink .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-pink.hover, - .icheckbox_line-pink.checked.hover, - .iradio_line-pink.hover { - background: #B995A9; - } - .icheckbox_line-pink.checked, - .iradio_line-pink.checked { - background: #a77a94; - } - .icheckbox_line-pink.checked .icheck_line-icon, - .iradio_line-pink.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-pink.disabled, - .iradio_line-pink.disabled { - background: #E0D0DA; - cursor: default; - } - .icheckbox_line-pink.disabled .icheck_line-icon, - .iradio_line-pink.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-pink.checked.disabled, - .iradio_line-pink.checked.disabled { - background: #E0D0DA; - } - .icheckbox_line-pink.checked.disabled .icheck_line-icon, - .iradio_line-pink.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-pink .icheck_line-icon, - .iradio_line-pink .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/purple.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/purple.css deleted file mode 100755 index 61f4a2f9b11ffd843169135e34aec27176db0bd5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/purple.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, purple ------------------------------------ */ -.icheckbox_line-purple, -.iradio_line-purple { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #6a5a8c; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-purple .icheck_line-icon, - .iradio_line-purple .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-purple.hover, - .icheckbox_line-purple.checked.hover, - .iradio_line-purple.hover { - background: #8677A7; - } - .icheckbox_line-purple.checked, - .iradio_line-purple.checked { - background: #6a5a8c; - } - .icheckbox_line-purple.checked .icheck_line-icon, - .iradio_line-purple.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-purple.disabled, - .iradio_line-purple.disabled { - background: #D2CCDE; - cursor: default; - } - .icheckbox_line-purple.disabled .icheck_line-icon, - .iradio_line-purple.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-purple.checked.disabled, - .iradio_line-purple.checked.disabled { - background: #D2CCDE; - } - .icheckbox_line-purple.checked.disabled .icheck_line-icon, - .iradio_line-purple.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-purple .icheck_line-icon, - .iradio_line-purple .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/red.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/red.css deleted file mode 100755 index d86c946ba91366d1394354a2462a4d3028069ca5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/red.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, red ------------------------------------ */ -.icheckbox_line-red, -.iradio_line-red { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #e56c69; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-red .icheck_line-icon, - .iradio_line-red .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-red.hover, - .icheckbox_line-red.checked.hover, - .iradio_line-red.hover { - background: #E98582; - } - .icheckbox_line-red.checked, - .iradio_line-red.checked { - background: #e56c69; - } - .icheckbox_line-red.checked .icheck_line-icon, - .iradio_line-red.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-red.disabled, - .iradio_line-red.disabled { - background: #F7D3D2; - cursor: default; - } - .icheckbox_line-red.disabled .icheck_line-icon, - .iradio_line-red.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-red.checked.disabled, - .iradio_line-red.checked.disabled { - background: #F7D3D2; - } - .icheckbox_line-red.checked.disabled .icheck_line-icon, - .iradio_line-red.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-red .icheck_line-icon, - .iradio_line-red .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/yellow.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/yellow.css deleted file mode 100755 index b34148a64573b4152e803a93b0722e0c7dbdc684..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/line/yellow.css +++ /dev/null @@ -1,71 +0,0 @@ -/* iCheck plugin Line skin, yellow ------------------------------------ */ -.icheckbox_line-yellow, -.iradio_line-yellow { - position: relative; - display: block; - margin: 0; - padding: 5px 15px 5px 38px; - font-size: 13px; - line-height: 17px; - color: #fff; - background: #FFC414; - border: none; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - cursor: pointer; -} - .icheckbox_line-yellow .icheck_line-icon, - .iradio_line-yellow .icheck_line-icon { - position: absolute; - top: 50%; - left: 13px; - width: 13px; - height: 11px; - margin: -5px 0 0 0; - padding: 0; - overflow: hidden; - background: url(line.png) no-repeat; - border: none; - } - .icheckbox_line-yellow.hover, - .icheckbox_line-yellow.checked.hover, - .iradio_line-yellow.hover { - background: #FFD34F; - } - .icheckbox_line-yellow.checked, - .iradio_line-yellow.checked { - background: #FFC414; - } - .icheckbox_line-yellow.checked .icheck_line-icon, - .iradio_line-yellow.checked .icheck_line-icon { - background-position: -15px 0; - } - .icheckbox_line-yellow.disabled, - .iradio_line-yellow.disabled { - background: #FFE495; - cursor: default; - } - .icheckbox_line-yellow.disabled .icheck_line-icon, - .iradio_line-yellow.disabled .icheck_line-icon { - background-position: -30px 0; - } - .icheckbox_line-yellow.checked.disabled, - .iradio_line-yellow.checked.disabled { - background: #FFE495; - } - .icheckbox_line-yellow.checked.disabled .icheck_line-icon, - .iradio_line-yellow.checked.disabled .icheck_line-icon { - background-position: -45px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_line-yellow .icheck_line-icon, - .iradio_line-yellow .icheck_line-icon { - background-image: url(line@2x.png); - -webkit-background-size: 60px 13px; - background-size: 60px 13px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/_all.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/_all.css deleted file mode 100755 index 8cf8aca9bd91a1c1bbf016ec074b52f59391c348..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/_all.css +++ /dev/null @@ -1,590 +0,0 @@ -/* iCheck plugin Minimal skin ------------------------------------ */ -.icheckbox_minimal, -.iradio_minimal { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(minimal.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal { - background-position: 0 0; -} - .icheckbox_minimal.hover { - background-position: -20px 0; - } - .icheckbox_minimal.checked { - background-position: -40px 0; - } - .icheckbox_minimal.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal { - background-position: -100px 0; -} - .iradio_minimal.hover { - background-position: -120px 0; - } - .iradio_minimal.checked { - background-position: -140px 0; - } - .iradio_minimal.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal, - .iradio_minimal { - background-image: url(minimal@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* red */ -.icheckbox_minimal-red, -.iradio_minimal-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-red { - background-position: 0 0; -} - .icheckbox_minimal-red.hover { - background-position: -20px 0; - } - .icheckbox_minimal-red.checked { - background-position: -40px 0; - } - .icheckbox_minimal-red.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-red.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-red { - background-position: -100px 0; -} - .iradio_minimal-red.hover { - background-position: -120px 0; - } - .iradio_minimal-red.checked { - background-position: -140px 0; - } - .iradio_minimal-red.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-red.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-red, - .iradio_minimal-red { - background-image: url(red@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* green */ -.icheckbox_minimal-green, -.iradio_minimal-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-green { - background-position: 0 0; -} - .icheckbox_minimal-green.hover { - background-position: -20px 0; - } - .icheckbox_minimal-green.checked { - background-position: -40px 0; - } - .icheckbox_minimal-green.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-green.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-green { - background-position: -100px 0; -} - .iradio_minimal-green.hover { - background-position: -120px 0; - } - .iradio_minimal-green.checked { - background-position: -140px 0; - } - .iradio_minimal-green.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-green.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-green, - .iradio_minimal-green { - background-image: url(green@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* blue */ -.icheckbox_minimal-blue, -.iradio_minimal-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-blue { - background-position: 0 0; -} - .icheckbox_minimal-blue.hover { - background-position: -20px 0; - } - .icheckbox_minimal-blue.checked { - background-position: -40px 0; - } - .icheckbox_minimal-blue.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-blue.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-blue { - background-position: -100px 0; -} - .iradio_minimal-blue.hover { - background-position: -120px 0; - } - .iradio_minimal-blue.checked { - background-position: -140px 0; - } - .iradio_minimal-blue.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-blue.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-blue, - .iradio_minimal-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* aero */ -.icheckbox_minimal-aero, -.iradio_minimal-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-aero { - background-position: 0 0; -} - .icheckbox_minimal-aero.hover { - background-position: -20px 0; - } - .icheckbox_minimal-aero.checked { - background-position: -40px 0; - } - .icheckbox_minimal-aero.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-aero.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-aero { - background-position: -100px 0; -} - .iradio_minimal-aero.hover { - background-position: -120px 0; - } - .iradio_minimal-aero.checked { - background-position: -140px 0; - } - .iradio_minimal-aero.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-aero.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-aero, - .iradio_minimal-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* grey */ -.icheckbox_minimal-grey, -.iradio_minimal-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-grey { - background-position: 0 0; -} - .icheckbox_minimal-grey.hover { - background-position: -20px 0; - } - .icheckbox_minimal-grey.checked { - background-position: -40px 0; - } - .icheckbox_minimal-grey.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-grey.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-grey { - background-position: -100px 0; -} - .iradio_minimal-grey.hover { - background-position: -120px 0; - } - .iradio_minimal-grey.checked { - background-position: -140px 0; - } - .iradio_minimal-grey.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-grey.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-grey, - .iradio_minimal-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* orange */ -.icheckbox_minimal-orange, -.iradio_minimal-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-orange { - background-position: 0 0; -} - .icheckbox_minimal-orange.hover { - background-position: -20px 0; - } - .icheckbox_minimal-orange.checked { - background-position: -40px 0; - } - .icheckbox_minimal-orange.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-orange.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-orange { - background-position: -100px 0; -} - .iradio_minimal-orange.hover { - background-position: -120px 0; - } - .iradio_minimal-orange.checked { - background-position: -140px 0; - } - .iradio_minimal-orange.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-orange.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-orange, - .iradio_minimal-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* yellow */ -.icheckbox_minimal-yellow, -.iradio_minimal-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-yellow { - background-position: 0 0; -} - .icheckbox_minimal-yellow.hover { - background-position: -20px 0; - } - .icheckbox_minimal-yellow.checked { - background-position: -40px 0; - } - .icheckbox_minimal-yellow.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-yellow.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-yellow { - background-position: -100px 0; -} - .iradio_minimal-yellow.hover { - background-position: -120px 0; - } - .iradio_minimal-yellow.checked { - background-position: -140px 0; - } - .iradio_minimal-yellow.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-yellow.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-yellow, - .iradio_minimal-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* pink */ -.icheckbox_minimal-pink, -.iradio_minimal-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-pink { - background-position: 0 0; -} - .icheckbox_minimal-pink.hover { - background-position: -20px 0; - } - .icheckbox_minimal-pink.checked { - background-position: -40px 0; - } - .icheckbox_minimal-pink.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-pink.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-pink { - background-position: -100px 0; -} - .iradio_minimal-pink.hover { - background-position: -120px 0; - } - .iradio_minimal-pink.checked { - background-position: -140px 0; - } - .iradio_minimal-pink.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-pink.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-pink, - .iradio_minimal-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} - -/* purple */ -.icheckbox_minimal-purple, -.iradio_minimal-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-purple { - background-position: 0 0; -} - .icheckbox_minimal-purple.hover { - background-position: -20px 0; - } - .icheckbox_minimal-purple.checked { - background-position: -40px 0; - } - .icheckbox_minimal-purple.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-purple.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-purple { - background-position: -100px 0; -} - .iradio_minimal-purple.hover { - background-position: -120px 0; - } - .iradio_minimal-purple.checked { - background-position: -140px 0; - } - .iradio_minimal-purple.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-purple.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-purple, - .iradio_minimal-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.css deleted file mode 100755 index 0a7a94538288bee175cfcade13772c181db1fa01..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, aero ------------------------------------ */ -.icheckbox_minimal-aero, -.iradio_minimal-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-aero { - background-position: 0 0; -} - .icheckbox_minimal-aero.hover { - background-position: -20px 0; - } - .icheckbox_minimal-aero.checked { - background-position: -40px 0; - } - .icheckbox_minimal-aero.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-aero.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-aero { - background-position: -100px 0; -} - .iradio_minimal-aero.hover { - background-position: -120px 0; - } - .iradio_minimal-aero.checked { - background-position: -140px 0; - } - .iradio_minimal-aero.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-aero.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-aero, - .iradio_minimal-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.png deleted file mode 100755 index dccf7740c9cb727f9c1eeadd6b584eec8634f23e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero@2x.png deleted file mode 100755 index 5537ee36fed55d43090160da271bdcba397e4b14..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/aero@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.css deleted file mode 100755 index c290097518d7340731bf7ef33fb8042db1a4d7f0..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, blue ------------------------------------ */ -.icheckbox_minimal-blue, -.iradio_minimal-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-blue { - background-position: 0 0; -} - .icheckbox_minimal-blue.hover { - background-position: -20px 0; - } - .icheckbox_minimal-blue.checked { - background-position: -40px 0; - } - .icheckbox_minimal-blue.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-blue.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-blue { - background-position: -100px 0; -} - .iradio_minimal-blue.hover { - background-position: -120px 0; - } - .iradio_minimal-blue.checked { - background-position: -140px 0; - } - .iradio_minimal-blue.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-blue.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-blue, - .iradio_minimal-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.png deleted file mode 100755 index af04cee596d5d2f884b03f9d8f0dd25c1cd5a0fa..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue@2x.png deleted file mode 100755 index f19210a9e570edb8acbb6d425809d8835854f190..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/blue@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.css deleted file mode 100755 index aa685f366555a895e148cf71069ba3fba11b9bbc..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, green ------------------------------------ */ -.icheckbox_minimal-green, -.iradio_minimal-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-green { - background-position: 0 0; -} - .icheckbox_minimal-green.hover { - background-position: -20px 0; - } - .icheckbox_minimal-green.checked { - background-position: -40px 0; - } - .icheckbox_minimal-green.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-green.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-green { - background-position: -100px 0; -} - .iradio_minimal-green.hover { - background-position: -120px 0; - } - .iradio_minimal-green.checked { - background-position: -140px 0; - } - .iradio_minimal-green.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-green.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-green, - .iradio_minimal-green { - background-image: url(green@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.png deleted file mode 100755 index 9171ebc7e456848eee4440b1e9975282f62fe03d..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green@2x.png deleted file mode 100755 index 7f18f96a9c30c6b2d8b726019939ec908a9067cb..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/green@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.css deleted file mode 100755 index f24269773785e2fdeba4f8b01e3e8104a489ce87..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, grey ------------------------------------ */ -.icheckbox_minimal-grey, -.iradio_minimal-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-grey { - background-position: 0 0; -} - .icheckbox_minimal-grey.hover { - background-position: -20px 0; - } - .icheckbox_minimal-grey.checked { - background-position: -40px 0; - } - .icheckbox_minimal-grey.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-grey.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-grey { - background-position: -100px 0; -} - .iradio_minimal-grey.hover { - background-position: -120px 0; - } - .iradio_minimal-grey.checked { - background-position: -140px 0; - } - .iradio_minimal-grey.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-grey.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-grey, - .iradio_minimal-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.png deleted file mode 100755 index 22dcdbcfa233960e595c3abd109345bb3b6581dd..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey@2x.png deleted file mode 100755 index 85e82ddda4ff0eee595584c2e0ebf62e5f78a23a..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/grey@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.css deleted file mode 100755 index c2c6620fc0db129d38c6af373e4c28f822c2eba9..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, black ------------------------------------ */ -.icheckbox_minimal, -.iradio_minimal { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(minimal.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal { - background-position: 0 0; -} - .icheckbox_minimal.hover { - background-position: -20px 0; - } - .icheckbox_minimal.checked { - background-position: -40px 0; - } - .icheckbox_minimal.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal { - background-position: -100px 0; -} - .iradio_minimal.hover { - background-position: -120px 0; - } - .iradio_minimal.checked { - background-position: -140px 0; - } - .iradio_minimal.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal, - .iradio_minimal { - background-image: url(minimal@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.png deleted file mode 100755 index 943be16fb15b457e5fff108bb9ccfdf822d7b3eb..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal@2x.png deleted file mode 100755 index d62291daaa78d173897d6a713e5cf26321e70cf2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/minimal@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.css deleted file mode 100755 index ba1b9c34a3b62f5f954f6c95e8183f2ba728b04c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, orange ------------------------------------ */ -.icheckbox_minimal-orange, -.iradio_minimal-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-orange { - background-position: 0 0; -} - .icheckbox_minimal-orange.hover { - background-position: -20px 0; - } - .icheckbox_minimal-orange.checked { - background-position: -40px 0; - } - .icheckbox_minimal-orange.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-orange.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-orange { - background-position: -100px 0; -} - .iradio_minimal-orange.hover { - background-position: -120px 0; - } - .iradio_minimal-orange.checked { - background-position: -140px 0; - } - .iradio_minimal-orange.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-orange.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-orange, - .iradio_minimal-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.png deleted file mode 100755 index f2a314978df05edbfe0da6ab1e51f81070079b44..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange@2x.png deleted file mode 100755 index 68c835915ac81a16716bd7b0c5d83c81a8d5840e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/orange@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.css deleted file mode 100755 index 77c574186278e0f8cc14905b588a81e31db5f2bf..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, pink ------------------------------------ */ -.icheckbox_minimal-pink, -.iradio_minimal-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-pink { - background-position: 0 0; -} - .icheckbox_minimal-pink.hover { - background-position: -20px 0; - } - .icheckbox_minimal-pink.checked { - background-position: -40px 0; - } - .icheckbox_minimal-pink.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-pink.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-pink { - background-position: -100px 0; -} - .iradio_minimal-pink.hover { - background-position: -120px 0; - } - .iradio_minimal-pink.checked { - background-position: -140px 0; - } - .iradio_minimal-pink.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-pink.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-pink, - .iradio_minimal-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.png deleted file mode 100755 index 660553c07409fce4efbc979a4985aa2eb6cf9de7..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink@2x.png deleted file mode 100755 index 7d7b385146c633079799de2d61c49a8562e15d61..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/pink@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.css deleted file mode 100755 index d509f043465cfc54bcdb1bc088725d960cc5302e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, purple ------------------------------------ */ -.icheckbox_minimal-purple, -.iradio_minimal-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-purple { - background-position: 0 0; -} - .icheckbox_minimal-purple.hover { - background-position: -20px 0; - } - .icheckbox_minimal-purple.checked { - background-position: -40px 0; - } - .icheckbox_minimal-purple.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-purple.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-purple { - background-position: -100px 0; -} - .iradio_minimal-purple.hover { - background-position: -120px 0; - } - .iradio_minimal-purple.checked { - background-position: -140px 0; - } - .iradio_minimal-purple.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-purple.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-purple, - .iradio_minimal-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.png deleted file mode 100755 index 48dec794dd5be9f8209e4392edacd345a1a42c24..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple@2x.png deleted file mode 100755 index 3bb7041718f353e0f13de29daad54bac530aae1f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/purple@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.css deleted file mode 100755 index 2280e5b0dbcceff1a8aa67239a1f19218f752e3f..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, red ------------------------------------ */ -.icheckbox_minimal-red, -.iradio_minimal-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-red { - background-position: 0 0; -} - .icheckbox_minimal-red.hover { - background-position: -20px 0; - } - .icheckbox_minimal-red.checked { - background-position: -40px 0; - } - .icheckbox_minimal-red.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-red.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-red { - background-position: -100px 0; -} - .iradio_minimal-red.hover { - background-position: -120px 0; - } - .iradio_minimal-red.checked { - background-position: -140px 0; - } - .iradio_minimal-red.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-red.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-red, - .iradio_minimal-red { - background-image: url(red@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.png deleted file mode 100755 index 4443f80976df973b85f055b77be53f0f16424f7c..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red@2x.png deleted file mode 100755 index 2eb55a65c7ea2f94073905c81396627b4967352f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/red@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.css deleted file mode 100755 index 730bb4c471944751055e114a24cb609b9ea83463..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Minimal skin, yellow ------------------------------------ */ -.icheckbox_minimal-yellow, -.iradio_minimal-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_minimal-yellow { - background-position: 0 0; -} - .icheckbox_minimal-yellow.hover { - background-position: -20px 0; - } - .icheckbox_minimal-yellow.checked { - background-position: -40px 0; - } - .icheckbox_minimal-yellow.disabled { - background-position: -60px 0; - cursor: default; - } - .icheckbox_minimal-yellow.checked.disabled { - background-position: -80px 0; - } - -.iradio_minimal-yellow { - background-position: -100px 0; -} - .iradio_minimal-yellow.hover { - background-position: -120px 0; - } - .iradio_minimal-yellow.checked { - background-position: -140px 0; - } - .iradio_minimal-yellow.disabled { - background-position: -160px 0; - cursor: default; - } - .iradio_minimal-yellow.checked.disabled { - background-position: -180px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_minimal-yellow, - .iradio_minimal-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.png deleted file mode 100755 index 0999b7ecdcea2d0ef81d0810037cebbc6d143217..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow@2x.png deleted file mode 100755 index c16f2b7dc5e975766863f9d98034c34f9eb24fe7..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/minimal/yellow@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.css deleted file mode 100755 index 2a4d519ca1b1eb3c51cda09303d1f5f22832eb63..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Polaris skin ------------------------------------ */ -.icheckbox_polaris, -.iradio_polaris { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 29px; - height: 29px; - background: url(polaris.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_polaris { - background-position: 0 0; -} - .icheckbox_polaris.hover { - background-position: -31px 0; - } - .icheckbox_polaris.checked { - background-position: -62px 0; - } - .icheckbox_polaris.disabled { - background-position: -93px 0; - cursor: default; - } - .icheckbox_polaris.checked.disabled { - background-position: -124px 0; - } - -.iradio_polaris { - background-position: -155px 0; -} - .iradio_polaris.hover { - background-position: -186px 0; - } - .iradio_polaris.checked { - background-position: -217px 0; - } - .iradio_polaris.disabled { - background-position: -248px 0; - cursor: default; - } - .iradio_polaris.checked.disabled { - background-position: -279px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_polaris, - .iradio_polaris { - background-image: url(polaris@2x.png); - -webkit-background-size: 310px 31px; - background-size: 310px 31px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.png deleted file mode 100755 index 60c14e6a88f4cc5626d63052f95f5ed87eae5ff1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris@2x.png deleted file mode 100755 index c75b82695ddd8ebefda0a05b842e89d20e7ed12b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/polaris/polaris@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/_all.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/_all.css deleted file mode 100755 index 90c3a69e4e60cf5b48d3b2699efabe91087f9344..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/_all.css +++ /dev/null @@ -1,590 +0,0 @@ -/* iCheck plugin Square skin ------------------------------------ */ -.icheckbox_square, -.iradio_square { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(square.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square { - background-position: 0 0; -} - .icheckbox_square.hover { - background-position: -24px 0; - } - .icheckbox_square.checked { - background-position: -48px 0; - } - .icheckbox_square.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square.checked.disabled { - background-position: -96px 0; - } - -.iradio_square { - background-position: -120px 0; -} - .iradio_square.hover { - background-position: -144px 0; - } - .iradio_square.checked { - background-position: -168px 0; - } - .iradio_square.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square, - .iradio_square { - background-image: url(square@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* red */ -.icheckbox_square-red, -.iradio_square-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-red { - background-position: 0 0; -} - .icheckbox_square-red.hover { - background-position: -24px 0; - } - .icheckbox_square-red.checked { - background-position: -48px 0; - } - .icheckbox_square-red.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-red.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-red { - background-position: -120px 0; -} - .iradio_square-red.hover { - background-position: -144px 0; - } - .iradio_square-red.checked { - background-position: -168px 0; - } - .iradio_square-red.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-red.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-red, - .iradio_square-red { - background-image: url(red@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* green */ -.icheckbox_square-green, -.iradio_square-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-green { - background-position: 0 0; -} - .icheckbox_square-green.hover { - background-position: -24px 0; - } - .icheckbox_square-green.checked { - background-position: -48px 0; - } - .icheckbox_square-green.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-green.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-green { - background-position: -120px 0; -} - .iradio_square-green.hover { - background-position: -144px 0; - } - .iradio_square-green.checked { - background-position: -168px 0; - } - .iradio_square-green.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-green.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-green, - .iradio_square-green { - background-image: url(green@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* blue */ -.icheckbox_square-blue, -.iradio_square-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-blue { - background-position: 0 0; -} - .icheckbox_square-blue.hover { - background-position: -24px 0; - } - .icheckbox_square-blue.checked { - background-position: -48px 0; - } - .icheckbox_square-blue.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-blue.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-blue { - background-position: -120px 0; -} - .iradio_square-blue.hover { - background-position: -144px 0; - } - .iradio_square-blue.checked { - background-position: -168px 0; - } - .iradio_square-blue.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-blue.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-blue, - .iradio_square-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* aero */ -.icheckbox_square-aero, -.iradio_square-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-aero { - background-position: 0 0; -} - .icheckbox_square-aero.hover { - background-position: -24px 0; - } - .icheckbox_square-aero.checked { - background-position: -48px 0; - } - .icheckbox_square-aero.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-aero.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-aero { - background-position: -120px 0; -} - .iradio_square-aero.hover { - background-position: -144px 0; - } - .iradio_square-aero.checked { - background-position: -168px 0; - } - .iradio_square-aero.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-aero.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-aero, - .iradio_square-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* grey */ -.icheckbox_square-grey, -.iradio_square-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-grey { - background-position: 0 0; -} - .icheckbox_square-grey.hover { - background-position: -24px 0; - } - .icheckbox_square-grey.checked { - background-position: -48px 0; - } - .icheckbox_square-grey.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-grey.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-grey { - background-position: -120px 0; -} - .iradio_square-grey.hover { - background-position: -144px 0; - } - .iradio_square-grey.checked { - background-position: -168px 0; - } - .iradio_square-grey.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-grey.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-grey, - .iradio_square-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* orange */ -.icheckbox_square-orange, -.iradio_square-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-orange { - background-position: 0 0; -} - .icheckbox_square-orange.hover { - background-position: -24px 0; - } - .icheckbox_square-orange.checked { - background-position: -48px 0; - } - .icheckbox_square-orange.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-orange.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-orange { - background-position: -120px 0; -} - .iradio_square-orange.hover { - background-position: -144px 0; - } - .iradio_square-orange.checked { - background-position: -168px 0; - } - .iradio_square-orange.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-orange.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-orange, - .iradio_square-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* yellow */ -.icheckbox_square-yellow, -.iradio_square-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-yellow { - background-position: 0 0; -} - .icheckbox_square-yellow.hover { - background-position: -24px 0; - } - .icheckbox_square-yellow.checked { - background-position: -48px 0; - } - .icheckbox_square-yellow.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-yellow.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-yellow { - background-position: -120px 0; -} - .iradio_square-yellow.hover { - background-position: -144px 0; - } - .iradio_square-yellow.checked { - background-position: -168px 0; - } - .iradio_square-yellow.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-yellow.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-yellow, - .iradio_square-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* pink */ -.icheckbox_square-pink, -.iradio_square-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-pink { - background-position: 0 0; -} - .icheckbox_square-pink.hover { - background-position: -24px 0; - } - .icheckbox_square-pink.checked { - background-position: -48px 0; - } - .icheckbox_square-pink.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-pink.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-pink { - background-position: -120px 0; -} - .iradio_square-pink.hover { - background-position: -144px 0; - } - .iradio_square-pink.checked { - background-position: -168px 0; - } - .iradio_square-pink.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-pink.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-pink, - .iradio_square-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} - -/* purple */ -.icheckbox_square-purple, -.iradio_square-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-purple { - background-position: 0 0; -} - .icheckbox_square-purple.hover { - background-position: -24px 0; - } - .icheckbox_square-purple.checked { - background-position: -48px 0; - } - .icheckbox_square-purple.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-purple.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-purple { - background-position: -120px 0; -} - .iradio_square-purple.hover { - background-position: -144px 0; - } - .iradio_square-purple.checked { - background-position: -168px 0; - } - .iradio_square-purple.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-purple.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-purple, - .iradio_square-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.css deleted file mode 100755 index e31b3abb1bcb3d3c567165c075245facc4d7dbf9..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, aero ------------------------------------ */ -.icheckbox_square-aero, -.iradio_square-aero { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(aero.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-aero { - background-position: 0 0; -} - .icheckbox_square-aero.hover { - background-position: -24px 0; - } - .icheckbox_square-aero.checked { - background-position: -48px 0; - } - .icheckbox_square-aero.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-aero.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-aero { - background-position: -120px 0; -} - .iradio_square-aero.hover { - background-position: -144px 0; - } - .iradio_square-aero.checked { - background-position: -168px 0; - } - .iradio_square-aero.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-aero.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-aero, - .iradio_square-aero { - background-image: url(aero@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.png deleted file mode 100755 index 1a332e6c578ab0b3741f69470b333ecb92a28f7b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero@2x.png deleted file mode 100755 index 07c5a02248d129c344a7bbcbbb79354c36005a06..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/aero@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.css deleted file mode 100755 index f8db2ab6a687c97a9dbdfa4d2775a4dc2318d96e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, blue ------------------------------------ */ -.icheckbox_square-blue, -.iradio_square-blue { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(blue.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-blue { - background-position: 0 0; -} - .icheckbox_square-blue.hover { - background-position: -24px 0; - } - .icheckbox_square-blue.checked { - background-position: -48px 0; - } - .icheckbox_square-blue.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-blue.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-blue { - background-position: -120px 0; -} - .iradio_square-blue.hover { - background-position: -144px 0; - } - .iradio_square-blue.checked { - background-position: -168px 0; - } - .iradio_square-blue.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-blue.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-blue, - .iradio_square-blue { - background-image: url(blue@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.png deleted file mode 100755 index a3e040fcce00622a17085d447f1a18c68989357e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue@2x.png deleted file mode 100755 index 8fdea12f96a5a4650c488a1a24cb52251a195f6b..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/blue@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.css deleted file mode 100755 index 23f149bdc32290a3d76d144c5d9b86a1cd8887ba..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, green ------------------------------------ */ -.icheckbox_square-green, -.iradio_square-green { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(green.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-green { - background-position: 0 0; -} - .icheckbox_square-green.hover { - background-position: -24px 0; - } - .icheckbox_square-green.checked { - background-position: -48px 0; - } - .icheckbox_square-green.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-green.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-green { - background-position: -120px 0; -} - .iradio_square-green.hover { - background-position: -144px 0; - } - .iradio_square-green.checked { - background-position: -168px 0; - } - .iradio_square-green.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-green.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-green, - .iradio_square-green { - background-image: url(green@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.png deleted file mode 100755 index 465824e70c4b401ad5d56f08cb6ddf1d7e88c321..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green@2x.png deleted file mode 100755 index 784e874758e52ff8cec2263857125b8c9ac574f4..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/green@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.css deleted file mode 100755 index 909db1ab742c92f9013534698431b194f4e9ca29..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, grey ------------------------------------ */ -.icheckbox_square-grey, -.iradio_square-grey { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(grey.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-grey { - background-position: 0 0; -} - .icheckbox_square-grey.hover { - background-position: -24px 0; - } - .icheckbox_square-grey.checked { - background-position: -48px 0; - } - .icheckbox_square-grey.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-grey.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-grey { - background-position: -120px 0; -} - .iradio_square-grey.hover { - background-position: -144px 0; - } - .iradio_square-grey.checked { - background-position: -168px 0; - } - .iradio_square-grey.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-grey.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-grey, - .iradio_square-grey { - background-image: url(grey@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.png deleted file mode 100755 index f69375854d3c5a283121d10352be8a1729a16cc4..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey@2x.png deleted file mode 100755 index 5d6341c05311415eee1befd49f15f3e6169e4141..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/grey@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.css deleted file mode 100755 index c6e5892d6831ce988525f63967edca5eaa6beaf6..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, orange ------------------------------------ */ -.icheckbox_square-orange, -.iradio_square-orange { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(orange.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-orange { - background-position: 0 0; -} - .icheckbox_square-orange.hover { - background-position: -24px 0; - } - .icheckbox_square-orange.checked { - background-position: -48px 0; - } - .icheckbox_square-orange.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-orange.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-orange { - background-position: -120px 0; -} - .iradio_square-orange.hover { - background-position: -144px 0; - } - .iradio_square-orange.checked { - background-position: -168px 0; - } - .iradio_square-orange.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-orange.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-orange, - .iradio_square-orange { - background-image: url(orange@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.png deleted file mode 100755 index 84608500a670b9460092d68cbf7b4dae77c7d303..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange@2x.png deleted file mode 100755 index b1f231973574dbfd2be4b81d471c524868cb432e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/orange@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.css deleted file mode 100755 index bdab9c79161fff30715d60c742713e70d912e070..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, pink ------------------------------------ */ -.icheckbox_square-pink, -.iradio_square-pink { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(pink.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-pink { - background-position: 0 0; -} - .icheckbox_square-pink.hover { - background-position: -24px 0; - } - .icheckbox_square-pink.checked { - background-position: -48px 0; - } - .icheckbox_square-pink.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-pink.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-pink { - background-position: -120px 0; -} - .iradio_square-pink.hover { - background-position: -144px 0; - } - .iradio_square-pink.checked { - background-position: -168px 0; - } - .iradio_square-pink.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-pink.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-pink, - .iradio_square-pink { - background-image: url(pink@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.png deleted file mode 100755 index 9c8b4e2b6ce76e1638ab81688b3e7f2cafd901c7..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink@2x.png deleted file mode 100755 index b1f3a6eda6cb3aafb83471a35549c4a643ae72ea..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/pink@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.css deleted file mode 100755 index 4c291b412e7c371fc8f0c34ca14e3a9dcae3a0a4..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, purple ------------------------------------ */ -.icheckbox_square-purple, -.iradio_square-purple { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(purple.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-purple { - background-position: 0 0; -} - .icheckbox_square-purple.hover { - background-position: -24px 0; - } - .icheckbox_square-purple.checked { - background-position: -48px 0; - } - .icheckbox_square-purple.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-purple.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-purple { - background-position: -120px 0; -} - .iradio_square-purple.hover { - background-position: -144px 0; - } - .iradio_square-purple.checked { - background-position: -168px 0; - } - .iradio_square-purple.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-purple.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-purple, - .iradio_square-purple { - background-image: url(purple@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.png deleted file mode 100755 index 6bfc16a38ce8d5b2246f25758f2fba8134f6243f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple@2x.png deleted file mode 100755 index 6d3c8b1af31a6ec5303ac592f5dcdddb5e2034d1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/purple@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.css deleted file mode 100755 index 7341bc62f210b0c4310a0331e8c8254eeed3dccf..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, red ------------------------------------ */ -.icheckbox_square-red, -.iradio_square-red { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(red.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-red { - background-position: 0 0; -} - .icheckbox_square-red.hover { - background-position: -24px 0; - } - .icheckbox_square-red.checked { - background-position: -48px 0; - } - .icheckbox_square-red.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-red.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-red { - background-position: -120px 0; -} - .iradio_square-red.hover { - background-position: -144px 0; - } - .iradio_square-red.checked { - background-position: -168px 0; - } - .iradio_square-red.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-red.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-red, - .iradio_square-red { - background-image: url(red@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.png deleted file mode 100755 index 749675a979b7b757b077d780d752985159366ac6..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red@2x.png deleted file mode 100755 index c05700a574071f9ccf8a6110d907440c9dc5d8d2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/red@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.css deleted file mode 100755 index fb628f913587dca4941282cc59342fa08d50eecc..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, black ------------------------------------ */ -.icheckbox_square, -.iradio_square { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(square.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square { - background-position: 0 0; -} - .icheckbox_square.hover { - background-position: -24px 0; - } - .icheckbox_square.checked { - background-position: -48px 0; - } - .icheckbox_square.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square.checked.disabled { - background-position: -96px 0; - } - -.iradio_square { - background-position: -120px 0; -} - .iradio_square.hover { - background-position: -144px 0; - } - .iradio_square.checked { - background-position: -168px 0; - } - .iradio_square.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square, - .iradio_square { - background-image: url(square@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.png deleted file mode 100755 index 2a3c88116c4d39ea9b131b07201a3ca724d097e9..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square@2x.png deleted file mode 100755 index 9b56c448d08f896d66dca620292b712a09990dc9..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/square@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.css deleted file mode 100755 index 23b11231e485501492149c0d4f4bce80e0ca27db..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.css +++ /dev/null @@ -1,59 +0,0 @@ -/* iCheck plugin Square skin, yellow ------------------------------------ */ -.icheckbox_square-yellow, -.iradio_square-yellow { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 22px; - height: 22px; - background: url(yellow.png) no-repeat; - border: none; - cursor: pointer; -} - -.icheckbox_square-yellow { - background-position: 0 0; -} - .icheckbox_square-yellow.hover { - background-position: -24px 0; - } - .icheckbox_square-yellow.checked { - background-position: -48px 0; - } - .icheckbox_square-yellow.disabled { - background-position: -72px 0; - cursor: default; - } - .icheckbox_square-yellow.checked.disabled { - background-position: -96px 0; - } - -.iradio_square-yellow { - background-position: -120px 0; -} - .iradio_square-yellow.hover { - background-position: -144px 0; - } - .iradio_square-yellow.checked { - background-position: -168px 0; - } - .iradio_square-yellow.disabled { - background-position: -192px 0; - cursor: default; - } - .iradio_square-yellow.checked.disabled { - background-position: -216px 0; - } - -/* HiDPI support */ -@media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi) { - .icheckbox_square-yellow, - .iradio_square-yellow { - background-image: url(yellow@2x.png); - -webkit-background-size: 240px 24px; - background-size: 240px 24px; - } -} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.png deleted file mode 100755 index b6c03309094d9ce47d090a6d318011a334fbe93c..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow@2x.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow@2x.png deleted file mode 100755 index 6b8e328e1abe901ffa1b472461c858516024a975..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/icheck/square/yellow@2x.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/icon.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/icon.png deleted file mode 100755 index 5a50673e0975b2bbc35c0e11d4848adcc1fb4dce..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/icon.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/laydate.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/laydate.css deleted file mode 100755 index c0eec2f810a8bfc9f91484d19b81e98f2550a65a..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/laydate/laydate.css +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - #layuicss-laydatecss{display:none;position:absolute;width:1989px}.laydate_body .laydate_box,.laydate_body .laydate_box *{margin:0;padding:0;box-sizing:content-box}.laydate-icon,.laydate-icon-dahong,.laydate-icon-danlan,.laydate-icon-default,.laydate-icon-molv{height:22px;line-height:22px;padding-right:20px;border:1px solid #C6C6C6;background-repeat:no-repeat;background-position:right center;background-color:#fff;outline:0}.laydate-icon-default{background-image:url(../skins/default/icon.png)}.laydate-icon-danlan{border:1px solid #B1D2EC;background-image:url(../skins/danlan/icon.png)}.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}.laydate_body .laydate_box{width:240px;font:12px '\5B8B\4F53';z-index:99999999;*overflow:hidden;_margin:0;_position:absolute!important}.laydate_body .laydate_box li{list-style:none}.laydate_body .laydate_box .laydate_void{cursor:text!important}.laydate_body .laydate_box cite,.laydate_body .laydate_box label{position:absolute;width:0;height:0;border-width:5px;border-style:dashed;border-color:transparent;overflow:hidden;cursor:pointer}.laydate_body .laydate_box .laydate_time,.laydate_body .laydate_box .laydate_yms{display:none}.laydate_body .laydate_box .laydate_show{display:block}.laydate_body .laydate_box input{outline:0;font-size:14px;background-color:#fff;color:#333}.laydate_body .laydate_top{position:relative;height:26px;padding:5px;*width:100%;z-index:99}.laydate_body .laydate_ym{position:relative;float:left;height:24px;cursor:pointer}.laydate_body .laydate_ym input{float:left;height:24px;line-height:24px;text-align:center;border:none;cursor:pointer}.laydate_body .laydate_ym .laydate_yms{position:absolute;left:-1px;top:24px;height:181px}.laydate_body .laydate_y{width:121px;margin-right:6px}.laydate_body .laydate_y input{width:64px;margin-right:15px}.laydate_body .laydate_y .laydate_yms{width:121px;text-align:center}.laydate_body .laydate_y .laydate_yms a{position:relative;display:block;height:20px}.laydate_body .laydate_y .laydate_yms ul{height:139px;padding:0;*overflow:hidden}.laydate_body .laydate_y .laydate_yms ul li{float:left;width:60px;height:20px;line-height:20px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate_body .laydate_m{width:99px}.laydate_body .laydate_m .laydate_yms{width:99px;padding:0}.laydate_body .laydate_m input{width:42px;margin-right:15px}.laydate_body .laydate_m .laydate_yms span{display:block;float:left;width:42px;margin:5px 0 0 5px;line-height:24px;text-align:center;_display:inline}.laydate_body .laydate_choose{display:block;float:left;position:relative;width:20px;height:24px}.laydate_body .laydate_choose cite,.laydate_body .laydate_tab cite{left:50%;top:50%}.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px;border-bottom-style:solid}.laydate_body .laydate_chdown cite,.laydate_body .laydate_ym label{top:50%;margin:-2px 0 0 -5px;border-top-style:solid}.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px}.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px}.laydate_body .laydate_ym label{right:28px}.laydate_body .laydate_table{width:230px;margin:0 5px;border-collapse:collapse;border-spacing:0}.laydate_body .laydate_table td{width:31px;text-align:center;cursor:pointer;font-size:12px}.laydate_body .laydate_table thead th{font-weight:400;font-size:12px;text-align:center}.laydate_body .laydate_bottom{position:relative;height:22px;line-height:20px;padding:5px;font-size:12px}.laydate_body .laydate_bottom #laydate_hms{position:relative;z-index:1;float:left}.laydate_body .laydate_time{position:absolute;left:5px;bottom:26px;width:129px;height:125px;*overflow:hidden}.laydate_body .laydate_time .laydate_hmsno{padding:5px 0 0 5px}.laydate_body .laydate_time .laydate_hmsno span{display:block;float:left;width:24px;height:19px;line-height:19px;text-align:center;cursor:pointer;*margin-bottom:-5px}.laydate_body .laydate_time1{width:228px;height:154px}.laydate_body .laydate_time1 .laydate_hmsno{padding:6px 0 0 8px}.laydate_body .laydate_time1 .laydate_hmsno span{width:21px;height:20px;line-height:20px}.laydate_body .laydate_msg{left:49px;bottom:67px;width:141px;height:auto;overflow:hidden}.laydate_body .laydate_msg p{padding:5px 10px}.laydate_body .laydate_bottom li{float:left;height:20px;line-height:20px;border-right:none;font-weight:900}.laydate_body .laydate_bottom .laydate_sj{width:33px;text-align:center;font-weight:400}.laydate_body .laydate_bottom input{float:left;width:21px;height:20px;line-height:20px;border:none;text-align:center;cursor:pointer;font-size:12px;font-weight:400}.laydate_body .laydate_bottom .laydte_hsmtex{height:20px;line-height:20px;text-align:center}.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute;width:20px;top:0;right:0;cursor:pointer}.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px}.laydate_body .laydate_bottom .laydate_btn{position:absolute;right:5px;top:5px}.laydate_body .laydate_bottom .laydate_btn a{float:left;height:20px;padding:0 6px;_padding:0 5px}.laydate_body .laydate_table td,.laydate_body .laydate_table thead{height:21px!important;line-height:21px!important}.laydate-icon{border:1px solid #C6C6C6;background-image:url(icon.png)}.laydate_body .laydate_bottom #laydate_hms,.laydate_body .laydate_bottom .laydate_btn a,.laydate_body .laydate_box,.laydate_body .laydate_table,.laydate_body .laydate_table td,.laydate_body .laydate_time,.laydate_body .laydate_ym,.laydate_body .laydate_ym .laydate_yms{border:1px solid #ccc}.laydate_body .laydate_bottom .laydte_hsmtex,.laydate_body .laydate_choose,.laydate_body .laydate_table thead,.laydate_body .laydate_y .laydate_yms a{background-color:#F6F6F6}.laydate_body .laydate_box,.laydate_body .laydate_time,.laydate_body .laydate_ym .laydate_yms{box-shadow:2px 2px 5px rgba(0,0,0,.1)}.laydate_body .laydate_box{border-top:none;border-bottom:none;background-color:#fff;color:#333}.laydate_body .laydate_box .laydate_void{color:#ccc!important}.laydate_body .laydate_box .laydate_void:hover{background-color:#fff!important}.laydate_body .laydate_box a,.laydate_body .laydate_box a:hover{text-decoration:none;blr:expression(this.onFocus=this.blur());cursor:pointer;color:#333}.laydate_body .laydate_box a:hover{text-decoration:none;color:#666}.laydate_body .laydate_click{background-color:#eee!important}.laydate_body .laydate_bottom #laydate_hms,.laydate_body .laydate_choose:hover,.laydate_body .laydate_table td,.laydate_body .laydate_time,.laydate_body .laydate_y .laydate_yms a:hover{background-color:#fff}.laydate_body .laydate_top{border-top:1px solid #C6C6C6}.laydate_body .laydate_ym .laydate_yms{border:1px solid #C6C6C6;background-color:#fff}.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #C6C6C6}.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #C6C6C6;border-bottom:none}.laydate_body .laydate_choose{border-left:1px solid #C6C6C6}.laydate_body .laydate_chprev{border-left:none;border-right:1px solid #C6C6C6}.laydate_body .laydate_chtop cite{border-bottom-color:#666}.laydate_body .laydate_chdown cite,.laydate_body .laydate_ym label{border-top-color:#666}.laydate_body .laydate_chprev cite{border-right-style:solid;border-right-color:#666}.laydate_body .laydate_chnext cite{border-left-style:solid;border-left-color:#666}.laydate_body .laydate_table td{border:none}.laydate_body .laydate_table .laydate_nothis{color:#999}.laydate_body .laydate_table thead th{border-bottom:1px solid #ccc}.laydate_body .laydate_bottom,.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #C6C6C6}.laydate_body .laydate_bottom .laydate_sj{border-right:1px solid #C6C6C6;background-color:#F6F6F6}.laydate_body .laydate_bottom input{background-color:#fff}.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #C6C6C6}.laydate_body .laydate_bottom .laydate_v{position:absolute;left:10px;top:6px;font-family:Courier;z-index:0;color:#999}.laydate_body .laydate_bottom .laydate_btn a{border-right:none;background-color:#F6F6F6}.laydate_body .laydate_bottom .laydate_btn a:hover{color:#000;background-color:#fff}.laydate_body .laydate_m .laydate_yms span:hover,.laydate_body .laydate_table td:hover,.laydate_body .laydate_time .laydate_hmsno span:hover,.laydate_body .laydate_y .laydate_yms ul li:hover{background-color:#F3F3F3} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon-ext.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon-ext.png deleted file mode 100755 index bbbb669bb311514baa5db3a6a00b4644d0e280f1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon-ext.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon.png b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon.png deleted file mode 100755 index 3e17da8b1aaae2935e19ac97d9015f0fe24e8770..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/icon.png and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/layer.css b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/layer.css deleted file mode 100755 index 9f2e5232159a8646a8e22ec2da594083a1814d91..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/layer.css +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}*html{background-image:url(about:blank);background-attachment:fixed}html #layuicss-skinlayercss{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layui-layer{border-radius:2px;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 10px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:6px 6px 0;padding:0 15px;border:1px solid #dedede;background-color:#f1f1f1;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#4898d5;background-color:#2e8ded;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:5px 10px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:1px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#BBB5B5;border:none}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:220px;height:30px;margin:0 auto;line-height:30px;padding:0 5px;border:1px solid #ccc;box-shadow:1px 1px 5px rgba(0,0,0,.1) inset;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;border-bottom:1px solid #ccc;background-color:#eee;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;cursor:default;overflow:hidden}.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px;border-left:1px solid #ccc;border-right:1px solid #ccc;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block}.xubox_tabclose{position:absolute;right:10px;top:5px;cursor:pointer}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-0.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-0.gif deleted file mode 100755 index 6f3c9539a22171cc2f12639492e346d97a9078e8..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-0.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-1.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-1.gif deleted file mode 100755 index db3a483e4b74971fbfb1cc0fb6499852cedfe650..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-1.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-2.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-2.gif deleted file mode 100755 index 5bb90fd6a49107a321c35b9cee4a7b810314b51f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/css/modules/layer/default/loading-2.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.eot b/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.eot deleted file mode 100755 index bd899838fd07b3f32bff5b425cb104e81f64afaa..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.eot and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.svg b/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.svg deleted file mode 100755 index 3680fcefed5daa45b9c821b2507075d28fd0f294..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.svg +++ /dev/null @@ -1,387 +0,0 @@ - - - - -Created by FontForge 20120731 at Mon Feb 27 22:32:26 2017 - By admin - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.ttf b/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.ttf deleted file mode 100755 index 7410faa92d9bca5deecaeee33012af168c5e32aa..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.ttf and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.woff b/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.woff deleted file mode 100755 index ccf64e6c420a9afb10342c142ffe36d56996e1c7..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/font/iconfont.woff and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/0.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/0.gif deleted file mode 100755 index a63f0d523561c523476e5330a0d67eb7318cb187..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/0.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/1.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/1.gif deleted file mode 100755 index b2b78b218996f70773540d0d3a8649d3c2d199a2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/1.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/10.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/10.gif deleted file mode 100755 index 556c7e326801a0ea090bd693ca43807925d3cbc2..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/10.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/11.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/11.gif deleted file mode 100755 index 2bfc58be8c70d512f4371b50b2b98c7b8adbe719..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/11.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/12.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/12.gif deleted file mode 100755 index 1c321c7eb0e5b5bdbdd10b93907b8eaeb3bf11bf..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/12.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/13.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/13.gif deleted file mode 100755 index 300bbc2a0384e5654525e7581017364dd9ceb59c..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/13.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/14.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/14.gif deleted file mode 100755 index 43b6d0a43857dc0990728155ed120c8eb66a5b81..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/14.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/15.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/15.gif deleted file mode 100755 index c9f25fa1d25412e2e929347c0db0878b0b641d58..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/15.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/16.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/16.gif deleted file mode 100755 index 34f28e4cde0cd13acdbbd7482282eb306f5b21e5..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/16.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/17.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/17.gif deleted file mode 100755 index 39cd03538a5bc595fbc46c97cf2b06c8bd8dadd1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/17.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/18.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/18.gif deleted file mode 100755 index 7bce2997f86e477a6008fb1cae8dd03cda10abf6..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/18.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/19.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/19.gif deleted file mode 100755 index adac542fd33e152fc08baf165d1c5a467f0c2747..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/19.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/2.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/2.gif deleted file mode 100755 index 7edbb58a843cec27a1641a5c9b6d30b8fc1f8c26..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/2.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/20.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/20.gif deleted file mode 100755 index 50631a6e314179d0761b4ee664616ad2162ba147..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/20.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/21.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/21.gif deleted file mode 100755 index b98421282467fb377dced2eabd72bcc5525f3e8e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/21.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/22.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/22.gif deleted file mode 100755 index 1f0bd8b0023c25e74fac444bfecd6c5d7a0dc448..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/22.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/23.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/23.gif deleted file mode 100755 index e05e0f97a3674d02e0f160c5193f54f6b3a30fdc..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/23.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/24.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/24.gif deleted file mode 100755 index f35928a264bd981595dce02cf48c1776e2b5770a..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/24.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/25.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/25.gif deleted file mode 100755 index 0b4a88322946c1b65e9236657d6f42c71e412a94..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/25.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/26.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/26.gif deleted file mode 100755 index 45c4fb5563081d684f00cc3560df41b803cf7bbf..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/26.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/27.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/27.gif deleted file mode 100755 index 7a4c0131dc926ee932804276038bf053a5cc1634..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/27.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/28.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/28.gif deleted file mode 100755 index fc5a0cfafa213e9861135c8ced7b87ebea74c269..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/28.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/29.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/29.gif deleted file mode 100755 index 5dd7442b164b2ea32b5ae97da71073a31a699c83..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/29.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/3.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/3.gif deleted file mode 100755 index 86df67b7aad1ac80079562c74945d9c4ced3c397..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/3.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/30.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/30.gif deleted file mode 100755 index b751f98abcf8173ae3c08402c99ae885a0dfe162..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/30.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/31.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/31.gif deleted file mode 100755 index c9476d79608dacdc613410702804e5ce7483cb67..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/31.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/32.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/32.gif deleted file mode 100755 index 9931b0636bc8f30b2172b608a44a90119b29ced6..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/32.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/33.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/33.gif deleted file mode 100755 index 59111a38c849fa06175a318fa98625c38d717398..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/33.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/34.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/34.gif deleted file mode 100755 index a334548e8780d66ccd2de35bb2475db92c7e0489..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/34.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/35.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/35.gif deleted file mode 100755 index a9322643dae616390d8263e8cf1bc4d9fdfa03ec..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/35.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/36.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/36.gif deleted file mode 100755 index 6de432ae96ee120b440c2448e3977587f789a410..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/36.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/37.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/37.gif deleted file mode 100755 index d05f2da45500eb37e7f723e9ddddcfd4e901d90e..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/37.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/38.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/38.gif deleted file mode 100755 index 8b1c88a3e8658cde7b25b6e063d23d010f7ed86a..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/38.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/39.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/39.gif deleted file mode 100755 index 38b84a51394e20ac33ae5c9b6fdbc66f90f94a0d..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/39.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/4.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/4.gif deleted file mode 100755 index d52200c51ee924f0b91132e5cd3737fadcf40ef8..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/4.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/40.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/40.gif deleted file mode 100755 index ae429912d6d6f74dfffd19376ec1fdee426d8036..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/40.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/41.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/41.gif deleted file mode 100755 index b9c715c5208044db4a057583efdf2bc12f099cd1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/41.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/42.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/42.gif deleted file mode 100755 index 0eb1434b4e81d4437098efe06cb4e1ab44a86211..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/42.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/43.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/43.gif deleted file mode 100755 index ac0b700850553a3d7be8d33cf6622c5a832cb1f0..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/43.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/44.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/44.gif deleted file mode 100755 index ad44497691d150ea5d02a900231e48ff519d9616..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/44.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/45.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/45.gif deleted file mode 100755 index 6837fcaf214a394d8efb68f5d48c9ec6f9ea1fa3..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/45.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/46.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/46.gif deleted file mode 100755 index d62916d4031609830f26ef77c17ad26906ac9717..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/46.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/47.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/47.gif deleted file mode 100755 index 58a083611d7c1afd95d136e3a7fa798c86d0c2ef..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/47.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/48.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/48.gif deleted file mode 100755 index 7ffd1613b5fa36c3ffa7daca94e7e8cd6f8d82ef..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/48.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/49.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/49.gif deleted file mode 100755 index 959b99296b323c0f9c6dc35e14c9f28cc66eec04..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/49.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/5.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/5.gif deleted file mode 100755 index 4e8b09f15101f3e3fad0777ad068fb559ed483a9..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/5.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/50.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/50.gif deleted file mode 100755 index 6e22e7ff12a215188dfc4d0314e91cee7526e739..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/50.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/51.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/51.gif deleted file mode 100755 index ad3f4d3a8158106dbfa48e521084e6c56fc6406f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/51.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/52.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/52.gif deleted file mode 100755 index 39f8a22846945358446ed010e2b9bd50dfcc7a25..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/52.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/53.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/53.gif deleted file mode 100755 index a181ee77882f8249f4551516085e1c2e7cf0cfec..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/53.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/54.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/54.gif deleted file mode 100755 index e289d929b9552beb7be70329b7cbefb1d0618008..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/54.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/55.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/55.gif deleted file mode 100755 index 4351083ac8e0e65a64ff362cbd480f2c86eab4fb..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/55.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/56.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/56.gif deleted file mode 100755 index e0eff222ba83ddcd3c2212e9336fb143e72204bf..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/56.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/57.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/57.gif deleted file mode 100755 index 0bf130f0d930a1fb72ca83265bb504304cb08090..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/57.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/58.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/58.gif deleted file mode 100755 index 0f065087d4720326776b26c7b9d2482c9e467bca..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/58.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/59.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/59.gif deleted file mode 100755 index 7081e4f023999fe813726fc83f39d169dedd7ecb..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/59.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/6.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/6.gif deleted file mode 100755 index f7715bf52817bc577c0d33cd0cbd17da898848a1..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/6.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/60.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/60.gif deleted file mode 100755 index 6e15f89d79ed82cdb1f53aed2378d887915528f3..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/60.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/61.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/61.gif deleted file mode 100755 index f092d7e351cb195eaf707dbec74d32ced42f432f..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/61.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/62.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/62.gif deleted file mode 100755 index 7fe49840bf69219fa40585741f901fa0b187c044..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/62.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/63.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/63.gif deleted file mode 100755 index cf8e23e5b2e83bf4f383cd994510a7a04a74f57c..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/63.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/64.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/64.gif deleted file mode 100755 index a7797198af0f3bb98361b1b8737784d0a8c2cba0..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/64.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/65.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/65.gif deleted file mode 100755 index 7bb98f2d8a2502888a61e885d0853d3d3b0661ec..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/65.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/66.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/66.gif deleted file mode 100755 index bb6d077504e3b39871f72150c1f5fa43d4e18bfe..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/66.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/67.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/67.gif deleted file mode 100755 index 6e33f7c4f762b5c4eda2a630793d681345423734..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/67.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/68.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/68.gif deleted file mode 100755 index 1a6c400d2aee3c2bf384ea98105ea143a7be97a9..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/68.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/69.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/69.gif deleted file mode 100755 index a02f0b2234a9c03bbfb9578056143ef4516bd965..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/69.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/7.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/7.gif deleted file mode 100755 index e6d4db80572a8321fa233d7efd82636fd896bf49..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/7.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/70.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/70.gif deleted file mode 100755 index 416c5c14a19fbdaf8fb8d6baf5cf7e31e54f751a..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/70.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/71.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/71.gif deleted file mode 100755 index c17d60cbd15e80d83629b2220b562a224eec5554..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/71.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/8.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/8.gif deleted file mode 100755 index 66f967b48da173b68cbfc92986e4426ea35ade74..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/8.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/9.gif b/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/9.gif deleted file mode 100755 index 60447400d31b035f56554b29af1aefc76bda1698..0000000000000000000000000000000000000000 Binary files a/xxpay-mgr/src/main/resources/static/plugins/layui/images/face/9.gif and /dev/null differ diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.all.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.all.js deleted file mode 100755 index a6e60f96b85aa7e5a7413aacfc41eef3100cc9d7..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.all.js +++ /dev/null @@ -1,5 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;!function(e){"use strict";var t=function(){this.v="1.0.9_rls"};t.fn=t.prototype;var n=document,o=t.fn.cache={},i=function(){var e=n.scripts,t=e[e.length-1].src;return t.substring(0,t.lastIndexOf("/")+1)}(),r=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},l="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),a={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"dest/layui.all"};o.modules={},o.status={},o.timeout=10,o.event={},t.fn.define=function(e,t){var n=this,i="function"==typeof e,r=function(){return"function"==typeof t&&t(function(e,t){layui[e]=t,o.status[e]=!0}),this};return i&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?r.call(n):(n.use(e,r),n)},t.fn.use=function(e,t,u){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[m]=t,y.removeChild(p),function i(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void(o.status[m]?c():setTimeout(i,4))}())}function c(){u.push(layui[m]),e.length>1?f.use(e.slice(1),t,u):"function"==typeof t&&t.apply(layui,u)}var f=this,d=o.dir=o.dir?o.dir:i,y=n.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(f.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=jQuery);var m=e[0],v=0;if(u=u||[],o.host=o.host||(d.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&a[m]||!layui["layui.all"]&&layui["layui.mobile"]&&a[m])return c(),f;var p=n.createElement("script"),h=(a[m]?d+"lay/":o.base||"")+(f.modules[m]||m)+".js";return p.async=!0,p.charset="utf-8",p.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),o.modules[m]?!function g(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void("string"==typeof o.modules[m]&&o.status[m]?c():setTimeout(g,4))}():(y.appendChild(p),!p.attachEvent||p.attachEvent.toString&&p.attachEvent.toString().indexOf("[native code")<0||l?p.addEventListener("load",function(e){s(e,h)},!1):p.attachEvent("onreadystatechange",function(e){s(e,h)})),o.modules[m]=h,f},t.fn.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},t.fn.link=function(e,t,i){var l=this,a=n.createElement("link"),u=n.getElementsByTagName("head")[0];"string"==typeof t&&(i=t);var s=(i||e).replace(/\.|\//g,""),c=a.id="layuicss-"+s,f=0;a.rel="stylesheet",a.href=e+(o.debug?"?v="+(new Date).getTime():""),a.media="all",n.getElementById(c)||u.appendChild(a),"function"==typeof t&&!function d(){return++f>1e3*o.timeout/100?r(e+" timeout"):void(1989===parseInt(l.getStyle(n.getElementById(c),"width"))?function(){t()}():setTimeout(d,100))}()},t.fn.addcss=function(e,t,n){layui.link(o.dir+"css/"+e,t,n)},t.fn.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},t.fn.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},t.fn.modules=function(){var e={};for(var t in a)e[t]=a[t];return e}(),t.fn.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?r("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},t.fn.router=function(e){for(var t,n=(e||location.hash).replace(/^#/,"").split("/")||[],o={dir:[]},i=0;i/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)});layui.define(function(a){"use strict";function t(a){new p(a)}var e=document,r="getElementById",n="getElementsByTagName",s=0,p=function(a){var t=this,e=t.config=a||{};e.item=s++,t.render(!0)};p.on=function(a,t,e){return a.attachEvent?a.attachEvent("on"+t,function(){e.call(a,window.even)}):a.addEventListener(t,e,!1),p},p.prototype.type=function(){var a=this.config;if("object"==typeof a.cont)return void 0===a.cont.length?2:3},p.prototype.view=function(){var a=this,t=a.config,e=[],r={};if(t.pages=0|t.pages,t.curr=0|t.curr||1,t.groups="groups"in t?0|t.groups:5,t.first="first"in t?t.first:"首页",t.last="last"in t?t.last:"末页",t.prev="prev"in t?t.prev:"上一页",t.next="next"in t?t.next:"下一页",t.pages<=1)return"";for(t.groups>t.pages&&(t.groups=t.pages),r.index=Math.ceil((t.curr+(t.groups>1&&t.groups!==t.pages?1:0))/(0===t.groups?1:t.groups)),t.curr>1&&t.prev&&e.push(''+t.prev+""),r.index>1&&t.first&&0!==t.groups&&e.push(''+t.first+""),r.poor=Math.floor((t.groups-1)/2),r.start=r.index>1?t.curr-r.poor:1,r.end=r.index>1?function(){var a=t.curr+(t.groups-r.poor-1);return a>t.pages?t.pages:a}():t.groups,r.end-r.start"+r.start+""):e.push(''+r.start+"");return t.pages>t.groups&&r.end'+t.last+""),r.flow=!t.prev&&0===t.groups,(t.curr!==t.pages&&t.next||r.flow)&&e.push(function(){return r.flow&&t.curr===t.pages?''+t.next+"":''+t.next+""}()),'
'+e.join("")+function(){return t.skip?'到第 ':""}()+"
"},p.prototype.jump=function(a){if(a){for(var t=this,e=t.config,r=a.children,s=a[n]("button")[0],i=a[n]("input")[0],u=0,o=r.length;un.maxs[0]?s=["y",1]:e>=n.mins[0]&&e<=n.maxs[0]&&(e==n.mins[0]&&(tn.maxs[1]?s=["m",1]:t==n.maxs[1]&&a>n.maxs[2]&&(s=["d",1]))),s},n.timeVoid=function(e,t){if(n.ymd[1]+1==n.mins[1]&&n.ymd[2]==n.mins[2]){if(0===t&&en.maxs[3])return 1;if(1===t&&e>n.maxs[4])return 1;if(2===t&&e>n.maxs[5])return 1}if(e>(t?59:23))return 1},n.check=function(){var e=n.options.format.replace(/YYYY|MM|DD|hh|mm|ss/g,"\\d+\\").replace(/\\$/g,""),t=new RegExp(e),a=n.elem[d.elemv],s=a.match(/\d+/g)||[],i=n.checkVoid(s[0],s[1],s[2]);if(""!==a.replace(/\s/g,"")){if(!t.test(a))return n.elem[d.elemv]="",n.msg("日期不符合格式,请重新选择。"),1;if(i[0])return n.elem[d.elemv]="",n.msg("日期不在有效期内,请重新选择。"),1;i.value=n.elem[d.elemv].match(t).join(),s=i.value.match(/\d+/g),s[1]<1?(s[1]=1,i.auto=1):s[1]>12?(s[1]=12,i.auto=1):s[1].length<2&&(i.auto=1),s[2]<1?(s[2]=1,i.auto=1):s[2]>n.months[(0|s[1])-1]?(s[2]=31,i.auto=1):s[2].length<2&&(i.auto=1),s.length>3&&(n.timeVoid(s[3],0)&&(i.auto=1),n.timeVoid(s[4],1)&&(i.auto=1),n.timeVoid(s[5],2)&&(i.auto=1)),i.auto?n.creation([s[0],0|s[1],0|s[2]],1):i.value!==n.elem[d.elemv]&&(n.elem[d.elemv]=i.value)}},n.months=[31,null,31,30,31,30,31,31,30,31,30,31],n.viewDate=function(e,t,a){var s=(n.query,{}),i=new Date;e<(0|n.mins[0])&&(e=0|n.mins[0]),e>(0|n.maxs[0])&&(e=0|n.maxs[0]),i.setFullYear(e,t,a),s.ymd=[i.getFullYear(),i.getMonth(),i.getDate()],n.months[1]=n.isleap(s.ymd[0])?29:28,i.setFullYear(s.ymd[0],s.ymd[1],1),s.FDay=i.getDay(),s.PDay=n.months[0===t?11:t-1]-s.FDay+1,s.NDay=1,n.each(d.tds,function(e,t){var a,i=s.ymd[0],o=s.ymd[1]+1;t.className="",e=s.FDay&&e'+e+"年":'
  • '+(e-7+t)+"年
  • "}),t("#laydate_ys").innerHTML=a,n.each(t("#laydate_ys li"),function(e,t){"y"===n.checkVoid(t.getAttribute("y"))[0]?n.addClass(t,d[1]):n.on(t,"click",function(e){n.stopmp(e).reshow(),n.viewDate(0|this.getAttribute("y"),n.ymd[1],n.ymd[2])})})},n.initDate=function(){var e=(n.query,new Date),t=n.elem[d.elemv].match(/\d+/g)||[];t.length<3&&(t=n.options.start.match(/\d+/g)||[],t.length<3&&(t=[e.getFullYear(),e.getMonth()+1,e.getDate()])),n.inymd=t,n.viewDate(t[0],t[1]-1,t[2])},n.iswrite=function(){var e=n.query,t={time:e("#laydate_hms")};n.shde(t.time,!n.options.istime),n.shde(d.oclear,!("isclear"in n.options?n.options.isclear:1)),n.shde(d.otoday,!("istoday"in n.options?n.options.istoday:1)),n.shde(d.ok,!("issure"in n.options?n.options.issure:1))},n.orien=function(e,t){var a,s=n.elem.getBoundingClientRect();e.style.left=s.left+(t?0:n.scroll(1))+"px",a=s.bottom+e.offsetHeight/1.5<=n.winarea()?s.bottom-1:s.top>e.offsetHeight/1.5?s.top-e.offsetHeight+1:n.winarea()-e.offsetHeight,e.style.top=Math.max(a+(t?0:n.scroll()),1)+"px"},n.follow=function(e){n.options.fixed?(e.style.position="fixed",n.orien(e,1)):(e.style.position="absolute",n.orien(e))},n.viewtb=function(){var e,t=[],a=["日","一","二","三","四","五","六"],o={},d=s[i]("table"),r=s[i]("thead");return r.appendChild(s[i]("tr")),o.creath=function(e){var t=s[i]("th");t.innerHTML=a[e],r[l]("tr")[0].appendChild(t),t=null},n.each(new Array(6),function(a){t.push([]),e=d.insertRow(0),n.each(new Array(7),function(n){t[a][n]=0,0===a&&o.creath(n),e.insertCell(n)})}),d.insertBefore(r,d.children[0]),d.id=d.className="laydate_table",e=t=null,d.outerHTML.toLowerCase()}(),n.view=function(e,t){var o,l=n.query,r={};t=t||e,n.elem=e,n.options=t,n.options.format||(n.options.format=a.format),n.options.start=n.options.start||"",n.mm=r.mm=[n.options.min||a.min,n.options.max||a.max],n.mins=r.mm[0].match(/\d+/g),n.maxs=r.mm[1].match(/\d+/g),n.box?n.shde(n.box):(o=s[i]("div"),o.id=d[0],o.className=d[0],o.style.cssText="position: absolute;",o.setAttribute("name","laydate-v"+laydate.v),o.innerHTML=r.html='
      '+function(){var e="";return n.each(new Array(12),function(t){e+=''+n.digit(t+1)+"月"}),e}()+"
      "+n.viewtb+'",s.body.appendChild(o),n.box=l("#"+d[0]),n.events(),o=null),n.follow(n.box),t.zIndex?n.box.style.zIndex=t.zIndex:n.removeCssAttr(n.box,"z-index"),n.stopMosup("click",n.box),n.initDate(),n.iswrite(),n.check()},n.reshow=function(){return n.each(n.query("#"+d[0]+" .laydate_show"),function(e,t){n.removeClass(t,"laydate_show")}),this},n.close=function(){n.reshow(),n.shde(n.query("#"+d[0]),1),n.elem=null},n.parse=function(e,t,s){return e=e.concat(t),s=s||(n.options?n.options.format:a.format),s.replace(/YYYY|MM|DD|hh|mm|ss/g,function(t,a){return e.index=0|++e.index,n.digit(e[e.index])})},n.creation=function(e,t){var a=(n.query,n.hmsin),s=n.parse(e,[a[0].value,a[1].value,a[2].value]);n.elem[d.elemv]=s,t||(n.close(),"function"==typeof n.options.choose&&n.options.choose(s))},n.events=function(){var e=n.query,a={box:"#"+d[0]};n.addClass(s.body,"laydate_body"),d.tds=e("#laydate_table td"),d.mms=e("#laydate_ms span"),d.year=e("#laydate_y"),d.month=e("#laydate_m"),n.each(e(a.box+" .laydate_ym"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.addClass(this[l]("div")[0],"laydate_show"),e||(a.YY=parseInt(d.year.value),n.viewYears(a.YY))})}),n.on(e(a.box),"click",function(){n.reshow()}),a.tabYear=function(e){0===e?n.ymd[0]--:1===e?n.ymd[0]++:2===e?a.YY-=14:a.YY+=14,e<2?(n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2]),n.reshow()):n.viewYears(a.YY)},n.each(e("#laydate_YY .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t),a.tabYear(e)})}),a.tabMonth=function(e){e?(n.ymd[1]++,12===n.ymd[1]&&(n.ymd[0]++,n.ymd[1]=0)):(n.ymd[1]--,n.ymd[1]===-1&&(n.ymd[0]--,n.ymd[1]=11)),n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2])},n.each(e("#laydate_MM .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),a.tabMonth(e)})}),n.each(e("#laydate_ms span"),function(e,t){n.on(t,"click",function(e){n.stopmp(e).reshow(),n.hasClass(this,d[1])||n.viewDate(n.ymd[0],0|this.getAttribute("m"),n.ymd[2])})}),n.each(e("#laydate_table td"),function(e,t){n.on(t,"click",function(e){n.hasClass(this,d[1])||(n.stopmp(e),n.creation([0|this.getAttribute("y"),0|this.getAttribute("m"),0|this.getAttribute("d")]))})}),d.oclear=e("#laydate_clear"),n.on(d.oclear,"click",function(){n.elem[d.elemv]="",n.close()}),d.otoday=e("#laydate_today"),n.on(d.otoday,"click",function(){var e=new Date;n.creation([e.getFullYear(),e.getMonth()+1,e.getDate()])}),d.ok=e("#laydate_ok"),n.on(d.ok,"click",function(){n.valid&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])}),a.times=e("#laydate_time"),n.hmsin=a.hmsin=e("#laydate_hms input"),a.hmss=["小时","分钟","秒数"],a.hmsarr=[],n.msg=function(t,s){var i='
      '+(s||"提示")+"×
      ";"string"==typeof t?(i+="

      "+t+"

      ",n.shde(e("#"+d[0])),n.removeClass(a.times,"laydate_time1").addClass(a.times,"laydate_msg")):(a.hmsarr[t]?i=a.hmsarr[t]:(i+='
      ',n.each(new Array(0===t?24:60),function(e){i+=""+e+""}),i+="
      ",a.hmsarr[t]=i),n.removeClass(a.times,"laydate_msg"),n[0===t?"removeClass":"addClass"](a.times,"laydate_time1")),n.addClass(a.times,"laydate_show"),a.times.innerHTML=i},a.hmson=function(t,a){var s=e("#laydate_hmsno span"),i=n.valid?null:1;n.each(s,function(e,s){i?n.addClass(s,d[1]):n.timeVoid(e,a)?n.addClass(s,d[1]):n.on(s,"click",function(e){n.hasClass(this,d[1])||(t.value=n.digit(0|this.innerHTML))})}),n.addClass(s[0|t.value],"laydate_click")},n.each(a.hmsin,function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.msg(e,a.hmss[e]),a.hmson(this,e)})}),n.on(s,"mouseup",function(){var t=e("#"+d[0]);t&&"none"!==t.style.display&&(n.check()||n.close())}).on(s,"keydown",function(e){e=e||t.event;var a=e.keyCode;13===a&&n.elem&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])})},laydate.reset=function(){n.box&&n.elem&&n.follow(n.box)},laydate.now=function(e,t){var a=new Date(0|e?function(e){return e<864e5?+new Date+864e5*e:e}(parseInt(e)):+new Date);return n.parse([a.getFullYear(),a.getMonth()+1,a.getDate()],[a.getHours(),a.getMinutes(),a.getSeconds()],t)},layui.addcss("modules/laydate/laydate.css",function(){},"laydatecss"),e("laydate",laydate)});!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), -l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
      a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
      ","
      "],area:[1,"",""],param:[1,"",""],thead:[1,"","
      "],tr:[2,"","
      "],col:[2,"","
      "],td:[3,"","
      "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
      ","
      "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
      a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
      ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.2",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],s=document.createElement("link");"string"==typeof n&&(a=n);var l=(a||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,i("#"+f)[0]||o.appendChild(s),"function"==typeof n&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(u,100))}()}},ready:function(e){var t="skinlayercss",i="302";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),r.ready(function(){document.body?t.creat():setTimeout(function(){t.creat()},50)})};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
      '+(f?r.title[0]:r.title)+"
      ":"";return r.zIndex=s,t([r.shade?'
      ':"",'
      '+(e&&2!=r.type?"":u)+'
      '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
      '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
      '+e+"
      "}():"")+(r.resize?'':"")+"
      "],u,i('
      ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]&&e.layero.addClass(l.anim[t.anim]).data("anim",!0)}},s.pt.auto=function(e){function t(e){e=s.find(e),e.height(f[1]-c-u-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,s=i("#"+l[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&s.width(s.innerWidth()),s.outerWidth()>o.maxWidth&&s.width(o.maxWidth));var f=[s.innerWidth(),s.innerHeight()],c=s.find(l[1]).outerHeight()||0,u=s.find("."+l[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+l[5])):t("."+l[5])}return a},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("anim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),setTimeout(function(){f()},r.ie&&r.ie<10||!t.data("anim")?0:200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n=''+t[0].title+"";i"+t[i].title+"";return n}(),content:'
        '+function(){var e=t.length,i=1,n="";if(e>0)for(n='
      • '+(t[0].content||"no content")+"
      • ";i'+(t[i].content||"no content")+"";return n}()+"
      ",success:function(t){var a=t.find(".layui-layer-title").children(),o=t.find(".layui-layer-tabmain").children();a.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),a=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),o.eq(a).show().siblings().hide(),"function"==typeof e.change&&e.change(a)}),"function"==typeof n&&n(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){u.length<=1||(f.start=s.imgIndex-1,r.close(s.index),setTimeout(function(){r.photos(t,!0,e)},200))},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
      '+(u.length>1?'':"")+'
      '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
      ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
      是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(i){"use strict";var a=layui.jquery,t=(layui.hint(),layui.device()),l="element",e="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var t=this;return a.extend(!0,t.config,i),t},s.prototype.on=function(i,a){return layui.onevent(l,i,a)},s.prototype.tabAdd=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=e.children(".layui-tab-content");return n.append('
    • '+(t.title||"unnaming")+"
    • "),s.append('
      '+(t.content||"")+"
      "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabClick(null,null,s),this},s.prototype.progress=function(i,t){var l="layui-progress",e=a("."+l+"[lay-filter="+i+"]"),n=e.find("."+l+"-bar"),s=n.find("."+l+"-text");return n.css("width",t),s.text(t),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",y="layui-anim layui-anim-upbit",f={tabClick:function(i,t,s){var o=s||a(this),t=t||o.parent().children("li").index(o),c=o.parents(".layui-tab").eq(0),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=c.attr("lay-filter");o.addClass(e).siblings().removeClass(e),r.eq(t).addClass(n).siblings().removeClass(n),layui.event.call(this,l,"tab("+u+")",{elem:c,index:t})},tabDelete:function(i,t){var l=t||a(this).parent(),n=l.index(),s=l.parents(".layui-tab").eq(0),o=s.children(".layui-tab-content").children(".layui-tab-item");l.hasClass(e)&&(l.next()[0]?f.tabClick.call(l.next()[0],null,n+1):l.prev()[0]&&f.tabClick.call(l.prev()[0],null,n-1)),l.remove(),o.eq(n).remove(),setTimeout(function(){f.tabAuto()},50)},tabAuto:function(){var i="layui-tab-more",l="layui-tab-bar",e="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=a('');if(n===window&&8!=t.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=a(this);if(!i.find("."+e)[0]){var t=a('');t.on("click",f.tabDelete),i.append(t)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+l)[0])return;o.append(r),s.attr("overflow",""),r.on("click",function(a){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+l).remove(),s.removeAttr("overflow")})},hideTabMore:function(i){var t=a(".layui-tab-title");i!==!0&&"tabmore"===a(i.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");i.find("."+d)[0]||(t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i))},clickChild:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i)},showChild:function(){var i=a(this),t=i.parents(o),l=i.parent(),e=i.siblings("."+d);t.hasClass(u)&&(e.removeClass(y),l["none"===e.css("display")?"addClass":"removeClass"](c+"ed"))},collapse:function(){var i=a(this),t=i.find(".layui-colla-icon"),e=i.siblings(".layui-colla-content"),s=i.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),c="none"===e.css("display");if("string"==typeof s.attr("lay-accordion")){var r=s.children(".layui-colla-item").children("."+n);r.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),r.removeClass(n)}e[c?"addClass":"removeClass"](n),t.html(c?"":""),layui.event.call(this,l,"collapse("+o+")",{title:i,content:e,show:c})}};s.prototype.init=function(i){var l={tab:function(){f.tabAuto.call({})},nav:function(){var i,l,e,s=200,p=function(o,c){var r=a(this),f=r.find("."+d);c.hasClass(u)?o.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(f.addClass(y),o.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-5}),i=setTimeout(function(){o.css({width:r.width(),opacity:1})},t.ie&&t.ie<10?0:s),clearTimeout(e),"block"===f.css("display")&&clearTimeout(l),l=setTimeout(function(){f.addClass(n),r.find("."+h).addClass(h+"d")},300))};a(o).each(function(){var t=a(this),o=a(''),y=t.find("."+c);t.find("."+r)[0]||(t.append(o),y.on("mouseenter",function(){p.call(this,o,t)}).on("mouseleave",function(){t.hasClass(u)||(clearTimeout(l),l=setTimeout(function(){t.find("."+d).removeClass(n),t.find("."+h).removeClass(h+"d")},300))}),t.on("mouseleave",function(){clearTimeout(i),e=setTimeout(function(){t.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},s)})),y.each(function(){var i=a(this),t=i.find("."+d);if(t[0]&&!i.find("."+h)[0]){var l=i.children("a");l.append('')}i.off("click",f.clickThis).on("click",f.clickThis),i.children("a").off("click",f.showChild).on("click",f.showChild),t.children("dd").off("click",f.clickChild).on("click",f.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";a(i).each(function(){var i=a(this),t=i.attr("lay-separator")||">",l=i.find("a");l.find(".layui-box")[0]||(l.each(function(i){i!==l.length-1&&a(this).append(''+t+"")}),i.css("visibility","visible"))})},progress:function(){var i="layui-progress";a("."+i).each(function(){var t=a(this),l=t.find(".layui-progress-bar"),e=l.attr("lay-percent");l.css("width",e),t.attr("lay-showPercent")&&setTimeout(function(){var a=Math.round(l.width()/t.width()*100);a>100&&(a=100),l.html(''+a+"%")},350)})},collapse:function(){var i="layui-collapse";a("."+i).each(function(){var i=a(this).find(".layui-colla-item");i.each(function(){var i=a(this),t=i.find(".layui-colla-title"),l=i.find(".layui-colla-content"),e="none"===l.css("display");t.find(".layui-colla-icon").remove(),t.append(''+(e?"":"")+""),t.off("click",f.collapse).on("click",f.collapse)})})}};return layui.each(l,function(i,a){a()})};var p=new s,v=a(document);p.init();var b=".layui-tab-title li";v.on("click",b,f.tabClick),v.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),i(l,function(i){return p.set(i)})});layui.define("layer",function(e){"use strict";var a=layui.jquery,t=layui.layer,i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"},s=function(e){this.options=e};s.prototype.init=function(){var e=this,t=e.options,r=a("body"),s=a(t.elem||".layui-upload-file"),u=a('');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
      ',l=s.attr("lay-type")||t.type;t.unwrap||(u='
      '+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
      "),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})});layui.define("layer",function(e){"use strict";var i=layui.jquery,t=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:[/^\d+$/,"只能填写数字"],date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var t=this;return i.extend(!0,t.config,e),t},u.prototype.verify=function(e){var t=this;return i.extend(!0,t.config.verify,e),t},u.prototype.on=function(e,i){return layui.onevent(l,e,i)},u.prototype.render=function(e){var t=this,n={select:function(){var e,t="请选择",a="layui-form-select",n="layui-select-title",u="layui-select-none",d="",f=i(r).find("select"),y=function(t,l){i(t.target).parent().hasClass(n)&&!l||(i("."+a).removeClass(a+"ed"),e&&d&&e.val(d)),e=null},v=function(t,r,f){var v=i(this),h=t.find("."+n),p=h.find("input"),m=t.find("dl"),k=m.children("dd");if(!r){var b=function(){t.addClass(a+"ed"),k.removeClass(o)},x=function(){t.removeClass(a+"ed"),p.blur(),g(p.val(),function(e){e&&(d=m.find("."+s).html(),p&&p.val(d))})};h.on("click",function(e){t.hasClass(a+"ed")?x():(y(e,!0),b()),m.find("."+u).remove()}),h.find(".layui-edge").on("click",function(){p.focus()}),p.on("keyup",function(e){var i=e.keyCode;9===i&&b()}).on("keydown",function(e){var i=e.keyCode;9===i?x():13===i&&e.preventDefault()});var g=function(e,t,a){var n=0;layui.each(k,function(){var t=i(this),l=t.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&t[r?"addClass":"removeClass"](o)});var l=n===k.length;return t(l),l},C=function(e){var i=this.value,t=e.keyCode;return 9!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&(g(i,function(e){e?m.find("."+u)[0]||m.append('

      无匹配项

      '):m.find("."+u).remove()},"keyup"),void(""===i&&m.find("."+u).remove()))};f&&p.on("keyup",C).on("blur",function(i){e=p,d=m.find("."+s).html(),setTimeout(function(){g(p.val(),function(e){e&&!d&&p.val("")},"blur")},200)}),k.on("click",function(){var e=i(this),a=e.attr("lay-value"),n=v.attr("lay-filter");return!e.hasClass(c)&&(v.val(a).removeClass("layui-form-danger"),p.val(e.text()),e.addClass(s).siblings().removeClass(s),layui.event.call(this,l,"select("+n+")",{elem:v[0],value:a,othis:t}),x(),!1)}),t.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",y).on("click",y)}};f.each(function(e,l){var r=i(this),o=r.next("."+a),u=this.disabled,d=l.value,f=i(l.options[l.selectedIndex]);if("string"==typeof r.attr("lay-ignore"))return r.show();var y="string"==typeof r.attr("lay-search"),h=i(['
      ','
      ','
      ','
      '+function(e){var i=[];return layui.each(e,function(e,t){(0!==e||t.value)&&("optgroup"===t.tagName.toLowerCase()?i.push("
      "+t.label+"
      "):i.push('
      '+t.innerHTML+"
      "))}),i.join("")}(r.find("*"))+"
      ","
      "].join(""));o[0]&&o.remove(),r.after(h),v.call(this,h,u,y)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},t=i(r).find("input[type=checkbox]"),a=function(e,t){var a=i(this);e.on("click",function(){var i=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(t[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(t[1]).find("em").text(n[0])),layui.event.call(a[0],l,t[2]+"("+i+")",{elem:a[0],value:a[0].value,othis:e}))})};t.each(function(t,n){var l=i(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=i(['
      ',{_switch:""+((n.checked?s[0]:s[1])||"")+""}[r]||(n.title.replace(/\s/g,"")?""+n.title+"":"")+''+(r?"":"")+"","
      "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",t=["",""],a=i(r).find("input[type=radio]"),n=function(a){var n=i(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=i(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(t[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(t[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=i(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();var u=i(['
      ',''+t[l.checked?0:1]+"",""+(l.title||"未命名")+"","
      "].join(""));s[0]&&s.remove(),r.after(u),n.call(this,u)})}};return e?n[e]?n[e]():a.error("不支持的"+e+"表单渲染"):layui.each(n,function(e,i){i()}),t};var d=function(){var e=i(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),y=e.parents("form")[0],v=u.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(d,function(e,l){var r=i(this),c=r.attr("lay-verify").split("|"),u="",d=r.val();if(r.removeClass(o),layui.each(c,function(e,i){var c="function"==typeof a[i];if(a[i]&&(c?u=a[i](d,l):!a[i][0].test(d)))return t.msg(u||a[i][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}),s)return s}),!s&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(c[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:c}))},f=new u,y=i(document);f.render(),y.on("reset",r,function(){setTimeout(function(){f.render()},50)}),y.on("submit",r,d).on("click","*[lay-submit]",d),e(l,function(e){return f.set(e)})});layui.define("jquery",function(e){"use strict";var o=layui.jquery,a=layui.hint(),r="layui-tree-enter",i=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};i.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},i.prototype.tree=function(e,a){var r=this,i=r.options,n=a||i.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
        '),s=o(["
      • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return i.check?''+("checkbox"===i.check?t.checkbox[0]:"radio"===i.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
      • "].join(""));l&&(s.append(c),r.tree(c,n.children)),e.append(s),"function"==typeof i.click&&r.click(s,n),r.spread(s,n),i.drag&&r.drag(s,n)})},i.prototype.click=function(e,o){var a=this,r=a.options;e.children("a").on("click",function(e){layui.stope(e),r.click(o)})},i.prototype.spread=function(e,o){var a=this,r=(a.options,e.children(".layui-tree-spread")),i=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),i.removeClass("layui-show"),r.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),i.addClass("layui-show"),r.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};i[0]&&(r.on("click",l),n.on("dblclick",l))},i.prototype.on=function(e){var a=this,i=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),i.drag&&o(document).on("mousemove",function(e){var r=a.move;if(r.from){var i=(r.to,o('
        '));e.preventDefault(),o("."+t)[0]||o("body").append(i);var n=o("."+t)[0]?o("."+t):i;n.addClass("layui-show").html(r.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(r),e.to&&e.to.elem.children("a").removeClass(r),a.move={},o("."+t).remove())})},i.prototype.move={},i.prototype.drag=function(e,a){var i=this,t=(i.options,e.children("a")),n=function(){var t=o(this),n=i.move;n.from&&(n.to={item:a,elem:e},t.addClass(r))};t.on("mousedown",function(){var o=i.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=i.move;a.from&&(delete a.to,e.removeClass(r))})},e("tree",function(e){var r=new i(e=e||{}),t=o(e.elem);return t[0]?void r.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
          ',l.bar1?'
        • '+t[0]+"
        • ":"",l.bar2?'
        • '+t[1]+"
        • ":"",'
        • '+t[2]+"
        • ","
        "].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.jquery,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var u=l(e.elem);if(u[0]){var f=l(e.scrollElem||document),m=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"没有更多了",v=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");u.find(".layui-flow-more")[0]||u.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=m&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&u(l),i++})}},u=function(e,o){var u=a?(o||n).height():l(window).height(),f=n.scrollTop(),m=f+u;if(t.lazyimg.elem=l(r),e)c(e,u);else for(var s=0;sm)break}};if(u(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){u(null,e)},50)}),o=!0}return u},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.jquery,i=layui.layer,a=layui.form(),l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",s=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};s.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},s.prototype.on=function(t,e){return layui.onevent(n,t,e)},s.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",s=e("#"+t),u="LAY_layedit_"+ ++a.index,d=s.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
        ','
        '+f+"
        ",'
        ','',"
        ","
        "].join(""));return l.ie&&l.ie<8?s.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),c.call(a,m,s[0],y),s.addClass("layui-hide").after(m),a.index)},s.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},s.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},s.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},s.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var c=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),s=o.find("head"),c=e([""].join("")),u=o.find("body");s.append(c),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,s=e(r.body);s.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

        ")}}),e(n).parents("form").on("submit",function(){var t=s.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),s.on("paste",function(e){r.execCommand("formatBlock",!1,"

        "),setTimeout(function(){f.call(t,s),n.value=s.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),s={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o({url:r.url,method:r.type,elem:e(n).find("input")[0],unwrap:!0,success:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},c=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

        "),setTimeout(function(){o.focus()},10)):s[a]&&s[a].call(this,u),h.call(t,c,i)}},d=/image/;c.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,c),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

          ','
        • ','','
          ','',"
          ","
        • ",'
        • ','','
          ','",'","
          ","
        • ",'
        • ','','',"
        • ","
        "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
      • '+e+'
      • ')}),'
          '+t.join("")+"
        "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
          ','
        • ','','
          ','","
          ","
        • ",'
        • ','','
          ','',"
          ","
        • ",'
        • ','','',"
        • ","
        "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new s;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.jquery,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
        1. '+o.replace(/[\r\t\n]+/g,"
        2. ")+"
        "),c.find(">.layui-code-h3")[0]||c.prepend('

        '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

        ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.mod.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.mod.js deleted file mode 100755 index 82d3807786e179eea66555f77d0d498a0f66d206..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/dest/layui.mod.js +++ /dev/null @@ -1,5 +0,0 @@ -/** layui-v1.0.5(All Modules) LGPL-2.1 license By http://www.layui.com */ - ;layui.define(function(i){i("layui.mod",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},n={exp:function(e){return new RegExp(e,"g")},query:function(e,n,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return c((n||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)});layui.define(function(a){"use strict";function t(a){new p(a)}var e=document,r="getElementById",n="getElementsByTagName",s=0,p=function(a){var t=this,e=t.config=a||{};e.item=s++,t.render(!0)};p.on=function(a,t,e){return a.attachEvent?a.attachEvent("on"+t,function(){e.call(a,window.even)}):a.addEventListener(t,e,!1),p},p.prototype.type=function(){var a=this.config;if("object"==typeof a.cont)return void 0===a.cont.length?2:3},p.prototype.view=function(){var a=this,t=a.config,e=[],r={};if(t.pages=0|t.pages,t.curr=0|t.curr||1,t.groups="groups"in t?0|t.groups:5,t.first="first"in t?t.first:"首页",t.last="last"in t?t.last:"末页",t.prev="prev"in t?t.prev:"上一页",t.next="next"in t?t.next:"下一页",t.pages<=1)return"";for(t.groups>t.pages&&(t.groups=t.pages),r.index=Math.ceil((t.curr+(t.groups>1&&t.groups!==t.pages?1:0))/(0===t.groups?1:t.groups)),t.curr>1&&t.prev&&e.push(''+t.prev+""),r.index>1&&t.first&&0!==t.groups&&e.push(''+t.first+""),r.poor=Math.floor((t.groups-1)/2),r.start=r.index>1?t.curr-r.poor:1,r.end=r.index>1?function(){var a=t.curr+(t.groups-r.poor-1);return a>t.pages?t.pages:a}():t.groups,r.end-r.start"+r.start+""):e.push(''+r.start+"");return t.pages>t.groups&&r.end'+t.last+""),r.flow=!t.prev&&0===t.groups,(t.curr!==t.pages&&t.next||r.flow)&&e.push(function(){return r.flow&&t.curr===t.pages?''+t.next+"":''+t.next+""}()),'
        '+e.join("")+function(){return t.skip?'到第 ':""}()+"
        "},p.prototype.jump=function(a){if(a){for(var t=this,e=t.config,r=a.children,s=a[n]("button")[0],i=a[n]("input")[0],u=0,o=r.length;un.maxs[0]?s=["y",1]:e>=n.mins[0]&&e<=n.maxs[0]&&(e==n.mins[0]&&(tn.maxs[1]?s=["m",1]:t==n.maxs[1]&&a>n.maxs[2]&&(s=["d",1]))),s},n.timeVoid=function(e,t){if(n.ymd[1]+1==n.mins[1]&&n.ymd[2]==n.mins[2]){if(0===t&&en.maxs[3])return 1;if(1===t&&e>n.maxs[4])return 1;if(2===t&&e>n.maxs[5])return 1}if(e>(t?59:23))return 1},n.check=function(){var e=n.options.format.replace(/YYYY|MM|DD|hh|mm|ss/g,"\\d+\\").replace(/\\$/g,""),t=new RegExp(e),a=n.elem[d.elemv],s=a.match(/\d+/g)||[],i=n.checkVoid(s[0],s[1],s[2]);if(""!==a.replace(/\s/g,"")){if(!t.test(a))return n.elem[d.elemv]="",n.msg("日期不符合格式,请重新选择。"),1;if(i[0])return n.elem[d.elemv]="",n.msg("日期不在有效期内,请重新选择。"),1;i.value=n.elem[d.elemv].match(t).join(),s=i.value.match(/\d+/g),s[1]<1?(s[1]=1,i.auto=1):s[1]>12?(s[1]=12,i.auto=1):s[1].length<2&&(i.auto=1),s[2]<1?(s[2]=1,i.auto=1):s[2]>n.months[(0|s[1])-1]?(s[2]=31,i.auto=1):s[2].length<2&&(i.auto=1),s.length>3&&(n.timeVoid(s[3],0)&&(i.auto=1),n.timeVoid(s[4],1)&&(i.auto=1),n.timeVoid(s[5],2)&&(i.auto=1)),i.auto?n.creation([s[0],0|s[1],0|s[2]],1):i.value!==n.elem[d.elemv]&&(n.elem[d.elemv]=i.value)}},n.months=[31,null,31,30,31,30,31,31,30,31,30,31],n.viewDate=function(e,t,a){var s=(n.query,{}),i=new Date;e<(0|n.mins[0])&&(e=0|n.mins[0]),e>(0|n.maxs[0])&&(e=0|n.maxs[0]),i.setFullYear(e,t,a),s.ymd=[i.getFullYear(),i.getMonth(),i.getDate()],n.months[1]=n.isleap(s.ymd[0])?29:28,i.setFullYear(s.ymd[0],s.ymd[1],1),s.FDay=i.getDay(),s.PDay=n.months[0===t?11:t-1]-s.FDay+1,s.NDay=1,n.each(d.tds,function(e,t){var a,i=s.ymd[0],o=s.ymd[1]+1;t.className="",e=s.FDay&&e'+e+"年":'
      • '+(e-7+t)+"年
      • "}),t("#laydate_ys").innerHTML=a,n.each(t("#laydate_ys li"),function(e,t){"y"===n.checkVoid(t.getAttribute("y"))[0]?n.addClass(t,d[1]):n.on(t,"click",function(e){n.stopmp(e).reshow(),n.viewDate(0|this.getAttribute("y"),n.ymd[1],n.ymd[2])})})},n.initDate=function(){var e=(n.query,new Date),t=n.elem[d.elemv].match(/\d+/g)||[];t.length<3&&(t=n.options.start.match(/\d+/g)||[],t.length<3&&(t=[e.getFullYear(),e.getMonth()+1,e.getDate()])),n.inymd=t,n.viewDate(t[0],t[1]-1,t[2])},n.iswrite=function(){var e=n.query,t={time:e("#laydate_hms")};n.shde(t.time,!n.options.istime),n.shde(d.oclear,!("isclear"in n.options?n.options.isclear:1)),n.shde(d.otoday,!("istoday"in n.options?n.options.istoday:1)),n.shde(d.ok,!("issure"in n.options?n.options.issure:1))},n.orien=function(e,t){var a,s=n.elem.getBoundingClientRect();e.style.left=s.left+(t?0:n.scroll(1))+"px",a=s.bottom+e.offsetHeight/1.5<=n.winarea()?s.bottom-1:s.top>e.offsetHeight/1.5?s.top-e.offsetHeight+1:n.winarea()-e.offsetHeight,e.style.top=Math.max(a+(t?0:n.scroll()),1)+"px"},n.follow=function(e){n.options.fixed?(e.style.position="fixed",n.orien(e,1)):(e.style.position="absolute",n.orien(e))},n.viewtb=function(){var e,t=[],a=["日","一","二","三","四","五","六"],o={},d=s[i]("table"),r=s[i]("thead");return r.appendChild(s[i]("tr")),o.creath=function(e){var t=s[i]("th");t.innerHTML=a[e],r[l]("tr")[0].appendChild(t),t=null},n.each(new Array(6),function(a){t.push([]),e=d.insertRow(0),n.each(new Array(7),function(n){t[a][n]=0,0===a&&o.creath(n),e.insertCell(n)})}),d.insertBefore(r,d.children[0]),d.id=d.className="laydate_table",e=t=null,d.outerHTML.toLowerCase()}(),n.view=function(e,t){var o,l=n.query,r={};t=t||e,n.elem=e,n.options=t,n.options.format||(n.options.format=a.format),n.options.start=n.options.start||"",n.mm=r.mm=[n.options.min||a.min,n.options.max||a.max],n.mins=r.mm[0].match(/\d+/g),n.maxs=r.mm[1].match(/\d+/g),n.box?n.shde(n.box):(o=s[i]("div"),o.id=d[0],o.className=d[0],o.style.cssText="position: absolute;",o.setAttribute("name","laydate-v"+laydate.v),o.innerHTML=r.html='
          '+function(){var e="";return n.each(new Array(12),function(t){e+=''+n.digit(t+1)+"月"}),e}()+"
          "+n.viewtb+'",s.body.appendChild(o),n.box=l("#"+d[0]),n.events(),o=null),n.follow(n.box),t.zIndex?n.box.style.zIndex=t.zIndex:n.removeCssAttr(n.box,"z-index"),n.stopMosup("click",n.box),n.initDate(),n.iswrite(),n.check()},n.reshow=function(){return n.each(n.query("#"+d[0]+" .laydate_show"),function(e,t){n.removeClass(t,"laydate_show")}),this},n.close=function(){n.reshow(),n.shde(n.query("#"+d[0]),1),n.elem=null},n.parse=function(e,t,s){return e=e.concat(t),s=s||(n.options?n.options.format:a.format),s.replace(/YYYY|MM|DD|hh|mm|ss/g,function(t,a){return e.index=0|++e.index,n.digit(e[e.index])})},n.creation=function(e,t){var a=(n.query,n.hmsin),s=n.parse(e,[a[0].value,a[1].value,a[2].value]);n.elem[d.elemv]=s,t||(n.close(),"function"==typeof n.options.choose&&n.options.choose(s))},n.events=function(){var e=n.query,a={box:"#"+d[0]};n.addClass(s.body,"laydate_body"),d.tds=e("#laydate_table td"),d.mms=e("#laydate_ms span"),d.year=e("#laydate_y"),d.month=e("#laydate_m"),n.each(e(a.box+" .laydate_ym"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.addClass(this[l]("div")[0],"laydate_show"),e||(a.YY=parseInt(d.year.value),n.viewYears(a.YY))})}),n.on(e(a.box),"click",function(){n.reshow()}),a.tabYear=function(e){0===e?n.ymd[0]--:1===e?n.ymd[0]++:2===e?a.YY-=14:a.YY+=14,e<2?(n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2]),n.reshow()):n.viewYears(a.YY)},n.each(e("#laydate_YY .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t),a.tabYear(e)})}),a.tabMonth=function(e){e?(n.ymd[1]++,12===n.ymd[1]&&(n.ymd[0]++,n.ymd[1]=0)):(n.ymd[1]--,n.ymd[1]===-1&&(n.ymd[0]--,n.ymd[1]=11)),n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2])},n.each(e("#laydate_MM .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),a.tabMonth(e)})}),n.each(e("#laydate_ms span"),function(e,t){n.on(t,"click",function(e){n.stopmp(e).reshow(),n.hasClass(this,d[1])||n.viewDate(n.ymd[0],0|this.getAttribute("m"),n.ymd[2])})}),n.each(e("#laydate_table td"),function(e,t){n.on(t,"click",function(e){n.hasClass(this,d[1])||(n.stopmp(e),n.creation([0|this.getAttribute("y"),0|this.getAttribute("m"),0|this.getAttribute("d")]))})}),d.oclear=e("#laydate_clear"),n.on(d.oclear,"click",function(){n.elem[d.elemv]="",n.close()}),d.otoday=e("#laydate_today"),n.on(d.otoday,"click",function(){var e=new Date;n.creation([e.getFullYear(),e.getMonth()+1,e.getDate()])}),d.ok=e("#laydate_ok"),n.on(d.ok,"click",function(){n.valid&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])}),a.times=e("#laydate_time"),n.hmsin=a.hmsin=e("#laydate_hms input"),a.hmss=["小时","分钟","秒数"],a.hmsarr=[],n.msg=function(t,s){var i='
          '+(s||"提示")+"×
          ";"string"==typeof t?(i+="

          "+t+"

          ",n.shde(e("#"+d[0])),n.removeClass(a.times,"laydate_time1").addClass(a.times,"laydate_msg")):(a.hmsarr[t]?i=a.hmsarr[t]:(i+='
          ',n.each(new Array(0===t?24:60),function(e){i+=""+e+""}),i+="
          ",a.hmsarr[t]=i),n.removeClass(a.times,"laydate_msg"),n[0===t?"removeClass":"addClass"](a.times,"laydate_time1")),n.addClass(a.times,"laydate_show"),a.times.innerHTML=i},a.hmson=function(t,a){var s=e("#laydate_hmsno span"),i=n.valid?null:1;n.each(s,function(e,s){i?n.addClass(s,d[1]):n.timeVoid(e,a)?n.addClass(s,d[1]):n.on(s,"click",function(e){n.hasClass(this,d[1])||(t.value=n.digit(0|this.innerHTML))})}),n.addClass(s[0|t.value],"laydate_click")},n.each(a.hmsin,function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.msg(e,a.hmss[e]),a.hmson(this,e)})}),n.on(s,"mouseup",function(){var t=e("#"+d[0]);t&&"none"!==t.style.display&&(n.check()||n.close())}).on(s,"keydown",function(e){e=e||t.event;var a=e.keyCode;13===a&&n.elem&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])})},laydate.reset=function(){n.box&&n.elem&&n.follow(n.box)},laydate.now=function(e,t){var a=new Date(0|e?function(e){return e<864e5?+new Date+864e5*e:e}(parseInt(e)):+new Date);return n.parse([a.getFullYear(),a.getMonth()+1,a.getDate()],[a.getHours(),a.getMinutes(),a.getSeconds()],t)},layui.addcss("modules/laydate/laydate.css",function(){},"laydatecss"),e("laydate",laydate)});!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), -l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
          a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
          ","
          "],area:[1,"",""],param:[1,"",""],thead:[1,"","
          "],tr:[2,"","
          "],col:[2,"","
          "],td:[3,"","
          "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
          ","
          "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
          a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
          ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],l=document.createElement("link");"string"==typeof n&&(a=n);var s=(a||t).replace(/\.|\//g,""),f="layuicss-"+s,c=0;l.rel="stylesheet",l.href=r.path+t,l.id=f,i("#"+f)[0]||o.appendChild(l),"function"==typeof n&&!function d(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(d,100))}()}},ready:function(e){var t="skinlayercss",i="1110";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var l="function"==typeof t;return l&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},l?{}:t))},msg:function(e,n,a){var l="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",d=s.anim.length-1;return l&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},l&&!o.config.skin?{skin:c+" layui-layer-hui",anim:d}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},l=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},50)};l.pt=l.prototype;var s=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];s.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],l.pt.config={type:0,shade:.3,fixed:!0,move:s[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},l.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,l=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),d=r.title?'
          '+(f?r.title[0]:r.title)+"
          ":"";return r.zIndex=l,t([r.shade?'
          ':"",'
          '+(e&&2!=r.type?"":d)+'
          '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
          '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
          '+e+"
          "}():"")+(r.resize?'':"")+"
          "],d,i('
          ')),n},l.pt.creat=function(){var e=this,t=e.config,a=e.index,l=t.content,f="object"==typeof l,c=i("body");if(!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var l=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,d){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){l.parents("."+s[0])[0]||(l.data("display",l.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+s[0]+a).find("."+s[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=d),e.layero=i("#"+s[0]+a),t.scrollbar||s.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",l[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),s.anim[t.anim]&&e.layero.addClass(s.anim[t.anim]).data("anim",!0)}},l.pt.auto=function(e){function t(e){e=l.find(e),e.height(f[1]-c-d-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,l=i("#"+s[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&l.width(l.innerWidth()),l.outerWidth()>o.maxWidth&&l.width(o.maxWidth));var f=[l.innerWidth(),l.innerHeight()],c=l.find(s[1]).outerHeight()||0,d=l.find("."+s[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+s[5])):t("."+s[5])}return a},l.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(s[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},l.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var l={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),l.autoLeft=function(){l.left+o[0]-n.width()>0?(l.tipLeft=l.left+l.width-o[0],f.css({right:12,left:"auto"})):l.tipLeft=l.left},l.where=[function(){l.autoLeft(),l.tipTop=l.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left+l.width+10,l.tipTop=l.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){l.autoLeft(),l.tipTop=l.top+l.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){l.tipLeft=l.left-o[0]-10,l.tipTop=l.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],l.where[c-1](),1===c?l.top-(n.scrollTop()+o[1]+16)<0&&l.where[2]():2===c?n.width()-(l.left+l.width+o[0]+16)>0||l.where[3]():3===c?l.top-n.scrollTop()+l.height+o[1]+16-n.height()>0&&l.where[0]():4===c&&o[0]+16-l.left>0&&l.where[1](),a.find("."+s[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:l.tipLeft-(t.fixed?n.scrollLeft():0),top:l.tipTop-(t.fixed?n.scrollTop():0)})},l.pt.move=function(){var e=this,t=e.config,a=i(document),l=e.layero,s=l.find(t.move),f=l.find(".layui-layer-resize"),c={};return t.move&&s.css("cursor","move"),s.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(l.css("left")),e.clientY-parseFloat(l.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[l.outerWidth(),l.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],s="fixed"===l.css("position");if(i.preventDefault(),c.stX=s?0:n.scrollLeft(),c.stY=s?0:n.scrollTop(),!t.moveOut){var f=n.width()-l.outerWidth()+c.stX,d=n.height()-l.outerHeight()+c.stY;af&&(a=f),od&&(o=d)}l.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd()),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},l.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+s[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+s[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+s[0])[0]||1==n.attr("layer")&&i("."+s[0]).length<1&&n.removeAttr("layer").show(),n=null})},l.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+s[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},l.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){s.html.attr("layer-full")==e&&(s.html[0].style.removeProperty?s.html[0].style.removeProperty("overflow"):s.html[0].style.removeAttribute("overflow"),s.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+s[4]).attr("times"),i("#"+s[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+s[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+s[0]+e),a=n.find(s[1]).outerHeight()||0,o=n.find("."+s[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+s[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+s[0]+e),r=a.find(".layui-layer-content"),l=a.attr("type"),f=a.find(s[1]).outerHeight()||0,c=a.find("."+s[6]).outerHeight()||0;a.attr("minLeft");l!==o.type[3]&&l!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+s[6]).outerHeight(),l===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+s[0]+e),l=a.find(s[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:l,left:f,top:n.height()-l,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(s[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+s[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(s[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+s[0]+e);o.record(a),s.html.attr("layer-full")||s.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+s[0]+(t||r.index)).find(s[1]);n.html(e)},r.close=function(e){var t=i("#"+s[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var l="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+s[5]+")").remove();for(var a=t.find("."+l),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(l)}else{if(n===o.type[2])try{var f=i("#"+s[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+s[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("anim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),setTimeout(function(){f()},r.ie&&r.ie<10||!t.data("anim")?0:200)}},r.closeAll=function(e){i.each(i("."+s[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var l,s=2==e.formType?'":function(){return''}();return r.open(i.extend({type:1,btn:["确定","取消"],content:s,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){l=e.find(".layui-layer-input"),l.focus()},resize:!1,yes:function(i){var n=l.val();""===n?l.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",l,{tips:1}):t&&t(n,i,l)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{};return r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n=''+t[0].title+"";i"+t[i].title+"";return n}(),content:'
            '+function(){var e=t.length,i=1,n="";if(e>0)for(n='
          • '+(t[0].content||"no content")+"
          • ";i'+(t[i].content||"no content")+"";return n}()+"
          ",success:function(t){var n=t.find(".layui-layer-title").children(),a=t.find(".layui-layer-tabmain").children();n.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),o=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),a.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)})}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var l={};if(t=t||{},t.photos){var s=t.photos.constructor===Object,f=s?t.photos:{},d=f.data||[],u=f.start||0;if(l.imgIndex=(0|u)+1,t.img=t.img||"img",s){if(0===d.length)return r.msg("没有图片")}else{var y=i(t.photos),p=function(){d=[],y.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),d.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(p(),0===d.length)return;if(n||y.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:d,tab:t.tab},full:t.full}),!0),p()}),!n)return}l.imgprev=function(e){l.imgIndex--,l.imgIndex<1&&(l.imgIndex=d.length),l.tabimg(e)},l.imgnext=function(e,t){l.imgIndex++,l.imgIndex>d.length&&(l.imgIndex=1,t)||l.tabimg(e)},l.keyup=function(e){if(!l.end){var t=e.keyCode;e.preventDefault(),37===t?l.imgprev(!0):39===t?l.imgnext(!0):27===t&&r.close(l.index)}},l.tabimg=function(e){d.length<=1||(f.start=l.imgIndex-1,r.close(l.index),r.photos(t,!0,e))},l.event=function(){l.bigimg.hover(function(){l.imgsee.show()},function(){l.imgsee.hide()}),l.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),l.imgprev()}),l.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),l.imgnext()}),i(document).on("keyup",l.keyup)},l.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(d[u].src,function(n){r.close(l.loadi),l.index=r.open(i.extend({type:1,area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(d[u].alt||
          '+(d.length>1?'':"")+'
          '+(d[u].alt||"")+""+l.imgIndex+"/"+d.length+"
          ",success:function(e,i){l.bigimg=e.find(".layui-layer-phimg"),l.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),l.event(e),t.tab&&t.tab(d[u],e)},end:function(){l.end=!0,i(document).off("keyup",l.keyup)}},t))},function(){r.close(l.loadi),r.msg("当前图片地址异常
          是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){d.length>1&&l.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),s.html=i("html"),r.open=function(e){var t=new l(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(i){"use strict";var t=layui.jquery,a=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var a=this;return t.extend(!0,a.config,i),a},s.prototype.on=function(i,t){return layui.onevent(e,i,t)},s.prototype.tabAdd=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title"),n=e.children(".layui-tab-content");return l.append("
        • "+(a.title||"unnaming")+"
        • "),n.append('
          '+(a.content||"")+"
          "),y.tabAuto(),this},s.prototype.tabDelete=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title").find(">li").eq(a);return y.tabDelete(null,l),this},s.prototype.tabChange=function(i,a){var e=t(".layui-tab[lay-filter="+i+"]"),l=e.children(".layui-tab-title").find(">li").eq(a);return y.tabClick(null,a,l),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",f="layui-anim layui-anim-upbit",y={tabClick:function(i,a,s){var o=s||t(this),a=a||o.index(),c=o.parents(".layui-tab"),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=c.attr("lay-filter");o.addClass(l).siblings().removeClass(l),r.eq(a).addClass(n).siblings().removeClass(n),layui.event.call(this,e,"tab("+u+")",{elem:c,index:a})},tabDelete:function(i,a){var e=a||t(this).parent(),n=e.index(),s=e.parents(".layui-tab"),o=s.children(".layui-tab-content").children(".layui-tab-item");e.hasClass(l)&&(e.next()[0]?y.tabClick.call(e.next()[0],null,n+1):e.prev()[0]&&y.tabClick.call(e.prev()[0],null,n-1)),e.remove(),o.eq(n).remove()},tabAuto:function(){var i="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;t(".layui-tab").each(function(){var s=t(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=t('');if(n===window&&8!=a.ie&&y.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=t(this);if(!i.find("."+l)[0]){var a=t('');a.on("click",y.tabDelete),i.append(a)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(r),r.on("click",function(t){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+e).remove()})},hideTabMore:function(i){var a=t(".layui-tab-title");i!==!0&&"tabmore"===t(i.target).attr("lay-stope")||(a.removeClass("layui-tab-more"),a.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter");i.find("."+d)[0]||(i.addClass(l).siblings().removeClass(l),layui.event.call(this,e,"nav("+n+")",i))},clickChild:function(){var i=t(this),a=i.parents(o),n=a.attr("lay-filter");i.addClass(l).siblings().removeClass(l),layui.event.call(this,e,"nav("+n+")",i)},showChild:function(){var i=t(this),a=i.parents(o),e=i.parent(),l=i.siblings("."+d);a.hasClass(u)&&(l.removeClass(f),e["none"===l.css("display")?"addClass":"removeClass"](c+"ed"))}};s.prototype.init=function(i){var e={tab:function(){y.tabAuto.call({})},nav:function(){var i,e,l,s=200,b=function(o,c){var r=t(this),y=r.find("."+d);c.hasClass(u)?o.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(y.addClass(f),o.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-5}),i=setTimeout(function(){o.css({width:r.width(),opacity:1})},a.ie&&a.ie<10?0:s),clearTimeout(l),"block"===y.css("display")&&clearTimeout(e),e=setTimeout(function(){y.addClass(n),r.find("."+h).addClass(h+"d")},300))};t(o).each(function(){var a=t(this),o=t(''),f=a.find("."+c);a.find("."+r)[0]||(a.append(o),f.on("mouseenter",function(){b.call(this,o,a)}).on("mouseleave",function(){a.hasClass(u)||(clearTimeout(e),e=setTimeout(function(){a.find("."+d).removeClass(n),a.find("."+h).removeClass(h+"d")},300))}),a.on("mouseleave",function(){clearTimeout(i),l=setTimeout(function(){a.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},s)})),f.each(function(){var i=t(this),a=i.find("."+d);if(a[0]&&!i.find("."+h)[0]){var e=i.children("a");e.append('')}i.off("click",y.clickThis).on("click",y.clickThis),i.children("a").off("click",y.showChild).on("click",y.showChild),a.children("dd").off("click",y.clickChild).on("click",y.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";t(i).each(function(){var i=t(this),a=i.attr("lay-separator")||">",e=i.find("a");e.find(".layui-box")[0]||(e.each(function(i){i!==e.length-1&&t(this).append(''+a+"")}),i.css("visibility","visible"))})}};return layui.each(e,function(i,t){t()})};var b=new s,p=t(document);b.init();var v=".layui-tab-title li";p.on("click",v,y.tabClick),p.on("click",y.hideTabMore),t(window).on("resize",y.tabAuto),i(e,function(i){return b.set(i)})});layui.define("layer",function(e){"use strict";var a=layui.jquery,t=layui.layer,i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"},s=function(e){this.options=e};s.prototype.init=function(){var e=this,t=e.options,r=a("body"),s=a(t.elem||".layui-upload-file"),u=a('');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
          ',l=s.attr("lay-type")||t.type;t.unwrap||(u='
          '+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
          "),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})});layui.define("layer",function(e){"use strict";var i=layui.jquery,a=layui.layer,t=layui.hint(),n=layui.device(),l="form",s=".layui-form",c="layui-this",r="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:[/^\d+$/,"只能填写数字"],date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var a=this;return i.extend(!0,a.config,e),a},u.prototype.verify=function(e){var a=this;return i.extend(!0,a.config.verify,e),a},u.prototype.on=function(e,i){return layui.onevent(l,e,i)},u.prototype.render=function(e){var a=this,n={select:function(){var e="请选择",a="layui-form-select",t="layui-select-title",n=i(s).find("select"),u=function(e,n){i(e.target).parent().hasClass(t)&&!n||i("."+a).removeClass(a+"ed")},o=function(e,n){var s=i(this),o=e.find("."+t);n||(o.on("click",function(i){e.hasClass(a+"ed")?e.removeClass(a+"ed"):(u(i,!0),e.addClass(a+"ed"))}),e.find("dl>dd").on("click",function(){var e=i(this),a=e.attr("lay-value"),t=s.attr("lay-filter");return!e.hasClass(r)&&(s.val(a).removeClass("layui-form-danger"),o.find("input").val(e.text()),e.addClass(c).siblings().removeClass(c),void layui.event(l,"select("+t+")",{elem:s[0],value:a}))}),e.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",u).on("click",u))};n.each(function(n,l){var s=i(this),u=s.next("."+a),d=this.disabled,f=l.value,y=i(l.options[l.selectedIndex]),v=i(['
          ','
          ','
          ','
          '+function(e){var i=[];return layui.each(e,function(e,a){(0!==e||a.value)&&("optgroup"===a.tagName.toLowerCase()?i.push("
          "+a.label+"
          "):i.push('
          '+a.innerHTML+"
          "))}),i.join("")}(s.find("*"))+"
          ","
          "].join(""));u[0]&&u.remove(),s.after(v),o.call(this,v,d)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},a=i(s).find("input[type=checkbox]"),t=function(e,a){var t=i(this);e.on("click",function(){var i=t.attr("lay-filter");t[0].disabled||(t[0].checked?(t[0].checked=!1,e.removeClass(a[1])):(t[0].checked=!0,e.addClass(a[1])),layui.event(l,a[2]+"("+i+")",{elem:t[0],value:t[0].value}))})};a.each(function(a,n){var l=i(this),s=l.attr("lay-skin"),c=this.disabled;"switch"===s&&(s="_"+s);var u=e[s]||e.checkbox,o=l.next("."+u[0]),d=i(['
          ',{_switch:""}[s]||""+(n.title||"勾选")+'',"
          "].join(""));o[0]&&o.remove(),l.after(d),t.call(this,d,u)})},radio:function(){var e="layui-form-radio",a=["",""],t=i(s).find("input[type=radio]"),n=function(t){var n=i(this),c="layui-anim-scaleSpring";t.on("click",function(){var r=n[0].name,u=n.parents(s),o=n.attr("lay-filter"),d=u.find("input[name="+r.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var t=i(this).next("."+e);this.checked=!1,t.removeClass(e+"ed"),t.find(".layui-icon").removeClass(c).html(a[1])}),n[0].checked=!0,t.addClass(e+"ed"),t.find(".layui-icon").addClass(c).html(a[0]),layui.event(l,"radio("+o+")",{elem:n[0],value:n[0].value}))})};t.each(function(t,l){var s=i(this),c=s.next("."+e),u=this.disabled,o=i(['
          ',''+a[l.checked?0:1]+"",""+(l.title||"未命名")+"","
          "].join(""));c[0]&&c.remove(),s.after(o),n.call(this,o)})}};return e?n[e]?n[e]():t.error("不支持的"+e+"表单渲染"):layui.each(n,function(e,i){i()}),a};var o=function(){var e=i(this),t=d.config.verify,c=null,r="layui-form-danger",u={},o=e.parents(s),f=o.find("*[lay-verify]"),y=e.parents("form")[0],v=o.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(f,function(e,l){var s=i(this),u=s.attr("lay-verify"),o="",d=s.val(),f="function"==typeof t[u];if(s.removeClass(r),t[u]&&(f?o=t[u](d,l):!t[u][0].test(d)))return a.msg(o||t[u][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),s.addClass(r),c=!0}),!c&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(u[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:u}))},d=new u,f=i(document);d.render(),f.on("reset",s,function(){setTimeout(function(){d.render()},50)}),f.on("submit",s,o).on("click","*[lay-submit]",o),e(l,function(e){return d.set(e)})});layui.define("jquery",function(e){"use strict";var o=layui.jquery,a=layui.hint(),r="layui-tree-enter",i=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};i.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},i.prototype.tree=function(e,a){var r=this,i=r.options,n=a||i.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
            '),s=o(["
          • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return i.check?''+("checkbox"===i.check?t.checkbox[0]:"radio"===i.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
          • "].join(""));l&&(s.append(c),r.tree(c,n.children)),e.append(s),"function"==typeof i.click&&r.click(s,n),r.spread(s,n),i.drag&&r.drag(s,n)})},i.prototype.click=function(e,o){var a=this,r=a.options;e.children("a").on("click",function(e){layui.stope(e),r.click(o)})},i.prototype.spread=function(e,o){var a=this,r=(a.options,e.children(".layui-tree-spread")),i=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),i.removeClass("layui-show"),r.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),i.addClass("layui-show"),r.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};i[0]&&(r.on("click",l),n.on("dblclick",l))},i.prototype.on=function(e){var a=this,i=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),i.drag&&o(document).on("mousemove",function(e){var r=a.move;if(r.from){var i=(r.to,o('
            '));e.preventDefault(),o("."+t)[0]||o("body").append(i);var n=o("."+t)[0]?o("."+t):i;n.addClass("layui-show").html(r.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(r),e.to&&e.to.elem.children("a").removeClass(r),a.move={},o("."+t).remove())})},i.prototype.move={},i.prototype.drag=function(e,a){var i=this,t=(i.options,e.children("a")),n=function(){var t=o(this),n=i.move;n.from&&(n.to={item:a,elem:e},t.addClass(r))};t.on("mousedown",function(){var o=i.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=i.move;a.from&&(delete a.to,e.removeClass(r))})},e("tree",function(e){var r=new i(e=e||{}),t=o(e.elem);return t[0]?void r.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})});layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
              ',l.bar1?'
            • '+t[0]+"
            • ":"",l.bar2?'
            • '+t[1]+"
            • ":"",'
            • '+t[2]+"
            • ","
            "].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.jquery,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var u=l(e.elem);if(u[0]){var f=l(e.scrollElem||document),m=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"没有更多了",v=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");u.find(".layui-flow-more")[0]||u.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=m&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&u(l),i++})}},u=function(e,o){var u=a?(o||n).height():l(window).height(),f=n.scrollTop(),m=f+u;if(t.lazyimg.elem=l(r),e)c(e,u);else for(var s=0;sm)break}};if(u(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){u(null,e)},50)}),o=!0}return u},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.jquery,i=layui.layer,a=layui.form(),l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",s=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};s.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},s.prototype.on=function(t,e){return layui.onevent(n,t,e)},s.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",s=e("#"+t),u="LAY_layedit_"+ ++a.index,d=s.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
            ','
            '+f+"
            ",'
            ','',"
            ","
            "].join(""));return l.ie&&l.ie<8?s.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),c.call(a,m,s[0],y),s.addClass("layui-hide").after(m),a.index)},s.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},s.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},s.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},s.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var c=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),s=o.find("head"),c=e([""].join("")),u=o.find("body");s.append(c),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,s=e(r.body);s.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

            ")}}),e(n).parents("form").on("submit",function(){var t=s.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),s.on("paste",function(e){r.execCommand("formatBlock",!1,"

            "),setTimeout(function(){f.call(t,s),n.value=s.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),s={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o({url:r.url,method:r.type,elem:e(n).find("input")[0],unwrap:!0,success:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},c=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

            "),setTimeout(function(){o.focus()},10)):s[a]&&s[a].call(this,u),h.call(t,c,i)}},d=/image/;c.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,c),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

              ','
            • ','','
              ','',"
              ","
            • ",'
            • ','','
              ','",'","
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
          • '+e+'
          • ')}),'
              '+t.join("")+"
            "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
              ','
            • ','','
              ','","
              ","
            • ",'
            • ','','
              ','',"
              ","
            • ",'
            • ','','',"
            • ","
            "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new s;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.jquery,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
            1. '+o.replace(/[\r\t\n]+/g,"
            2. ")+"
            "),c.find(">.layui-code-h3")[0]||c.prepend('

            '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

            ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/lib/jquery.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/lib/jquery.js deleted file mode 100755 index 916f01c65df85c4daa0f8480bf459628785de3fa..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/lib/jquery.js +++ /dev/null @@ -1,5 +0,0 @@ -/** layui-v1.0.7 LGPL License By http://www.layui.com */ - ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), -l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
            a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
            a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
            ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){e("jquery",pe)}),pe}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/code.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/code.js deleted file mode 100755 index 1e41610b920266144c4b47feb48e784858c838f2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/code.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
            1. '+o.replace(/[\r\t\n]+/g,"
            2. ")+"
            "),c.find(">.layui-code-h3")[0]||c.prepend('

            '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

            ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/element.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/element.js deleted file mode 100755 index e724324150b3bcbad03aac74ab26f1edfe7f2015..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/element.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("jquery",function(i){"use strict";var a=layui.jquery,t=(layui.hint(),layui.device()),l="element",e="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(i){var t=this;return a.extend(!0,t.config,i),t},s.prototype.on=function(i,a){return layui.onevent(l,i,a)},s.prototype.tabAdd=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=e.children(".layui-tab-content");return n.append('
          • '+(t.title||"unnaming")+"
          • "),s.append('
            '+(t.content||"")+"
            "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(i,t){var l=".layui-tab-title",e=a(".layui-tab[lay-filter="+i+"]"),n=e.children(l),s=n.find('>li[lay-id="'+t+'"]');return f.tabClick(null,null,s),this},s.prototype.progress=function(i,t){var l="layui-progress",e=a("."+l+"[lay-filter="+i+"]"),n=e.find("."+l+"-bar"),s=n.find("."+l+"-text");return n.css("width",t),s.text(t),this};var o=".layui-nav",c="layui-nav-item",r="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",h="layui-nav-more",y="layui-anim layui-anim-upbit",f={tabClick:function(i,t,s){var o=s||a(this),t=t||o.parent().children("li").index(o),c=o.parents(".layui-tab").eq(0),r=c.children(".layui-tab-content").children(".layui-tab-item"),u=c.attr("lay-filter");o.addClass(e).siblings().removeClass(e),r.eq(t).addClass(n).siblings().removeClass(n),layui.event.call(this,l,"tab("+u+")",{elem:c,index:t})},tabDelete:function(i,t){var l=t||a(this).parent(),n=l.index(),s=l.parents(".layui-tab").eq(0),o=s.children(".layui-tab-content").children(".layui-tab-item");l.hasClass(e)&&(l.next()[0]?f.tabClick.call(l.next()[0],null,n+1):l.prev()[0]&&f.tabClick.call(l.prev()[0],null,n-1)),l.remove(),o.eq(n).remove(),setTimeout(function(){f.tabAuto()},50)},tabAuto:function(){var i="layui-tab-more",l="layui-tab-bar",e="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),c=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),r=a('');if(n===window&&8!=t.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var i=a(this);if(!i.find("."+e)[0]){var t=a('');t.on("click",f.tabDelete),i.append(t)}}),o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+l)[0])return;o.append(r),s.attr("overflow",""),r.on("click",function(a){o[this.title?"removeClass":"addClass"](i),this.title=this.title?"":"收缩"})}else o.find("."+l).remove(),s.removeAttr("overflow")})},hideTabMore:function(i){var t=a(".layui-tab-title");i!==!0&&"tabmore"===a(i.target).attr("lay-stope")||(t.removeClass("layui-tab-more"),t.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");i.find("."+d)[0]||(t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i))},clickChild:function(){var i=a(this),t=i.parents(o),n=t.attr("lay-filter");t.find("."+e).removeClass(e),i.addClass(e),layui.event.call(this,l,"nav("+n+")",i)},showChild:function(){var i=a(this),t=i.parents(o),l=i.parent(),e=i.siblings("."+d);t.hasClass(u)&&(e.removeClass(y),l["none"===e.css("display")?"addClass":"removeClass"](c+"ed"))},collapse:function(){var i=a(this),t=i.find(".layui-colla-icon"),e=i.siblings(".layui-colla-content"),s=i.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),c="none"===e.css("display");if("string"==typeof s.attr("lay-accordion")){var r=s.children(".layui-colla-item").children("."+n);r.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),r.removeClass(n)}e[c?"addClass":"removeClass"](n),t.html(c?"":""),layui.event.call(this,l,"collapse("+o+")",{title:i,content:e,show:c})}};s.prototype.init=function(i){var l={tab:function(){f.tabAuto.call({})},nav:function(){var i,l,e,s=200,p=function(o,c){var r=a(this),f=r.find("."+d);c.hasClass(u)?o.css({top:r.position().top,height:r.children("a").height(),opacity:1}):(f.addClass(y),o.css({left:r.position().left+parseFloat(r.css("marginLeft")),top:r.position().top+r.height()-5}),i=setTimeout(function(){o.css({width:r.width(),opacity:1})},t.ie&&t.ie<10?0:s),clearTimeout(e),"block"===f.css("display")&&clearTimeout(l),l=setTimeout(function(){f.addClass(n),r.find("."+h).addClass(h+"d")},300))};a(o).each(function(){var t=a(this),o=a(''),y=t.find("."+c);t.find("."+r)[0]||(t.append(o),y.on("mouseenter",function(){p.call(this,o,t)}).on("mouseleave",function(){t.hasClass(u)||(clearTimeout(l),l=setTimeout(function(){t.find("."+d).removeClass(n),t.find("."+h).removeClass(h+"d")},300))}),t.on("mouseleave",function(){clearTimeout(i),e=setTimeout(function(){t.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},s)})),y.each(function(){var i=a(this),t=i.find("."+d);if(t[0]&&!i.find("."+h)[0]){var l=i.children("a");l.append('')}i.off("click",f.clickThis).on("click",f.clickThis),i.children("a").off("click",f.showChild).on("click",f.showChild),t.children("dd").off("click",f.clickChild).on("click",f.clickChild)})})},breadcrumb:function(){var i=".layui-breadcrumb";a(i).each(function(){var i=a(this),t=i.attr("lay-separator")||">",l=i.find("a");l.find(".layui-box")[0]||(l.each(function(i){i!==l.length-1&&a(this).append(''+t+"")}),i.css("visibility","visible"))})},progress:function(){var i="layui-progress";a("."+i).each(function(){var t=a(this),l=t.find(".layui-progress-bar"),e=l.attr("lay-percent");l.css("width",e),t.attr("lay-showPercent")&&setTimeout(function(){var a=Math.round(l.width()/t.width()*100);a>100&&(a=100),l.html(''+a+"%")},350)})},collapse:function(){var i="layui-collapse";a("."+i).each(function(){var i=a(this).find(".layui-colla-item");i.each(function(){var i=a(this),t=i.find(".layui-colla-title"),l=i.find(".layui-colla-content"),e="none"===l.css("display");t.find(".layui-colla-icon").remove(),t.append(''+(e?"":"")+""),t.off("click",f.collapse).on("click",f.collapse)})})}};return layui.each(l,function(i,a){a()})};var p=new s,v=a(document);p.init();var b=".layui-tab-title li";v.on("click",b,f.tabClick),v.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),i(l,function(i){return p.set(i)})}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/flow.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/flow.js deleted file mode 100755 index 295d084644dd6a7828c7f0e311497244139212a8..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/flow.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var l=layui.jquery,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var u=l(e.elem);if(u[0]){var f=l(e.scrollElem||document),m=e.mb||50,s=!("isAuto"in e)||e.isAuto,y=e.end||"没有更多了",v=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");u.find(".layui-flow-more")[0]||u.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(y):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(f.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=v?e.height():l(window).height(),n=v?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=m&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var f=e.attr("lay-src");layui.img(f,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",f).removeAttr("lay-src"),l[0]&&u(l),i++})}},u=function(e,o){var u=a?(o||n).height():l(window).height(),f=n.scrollTop(),m=f+u;if(t.lazyimg.elem=l(r),e)c(e,u);else for(var s=0;sm)break}};if(u(),!o){var f;n.on("scroll",function(){var e=l(this);f&&clearTimeout(f),f=setTimeout(function(){u(null,e)},50)}),o=!0}return u},e("flow",new o)}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/form.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/form.js deleted file mode 100755 index a47339a3379837d647c8afde2b07af8671293cf4..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/form.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("layer",function(e){"use strict";var i=layui.jquery,t=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:[/^\d+$/,"只能填写数字"],date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var t=this;return i.extend(!0,t.config,e),t},u.prototype.verify=function(e){var t=this;return i.extend(!0,t.config.verify,e),t},u.prototype.on=function(e,i){return layui.onevent(l,e,i)},u.prototype.render=function(e){var t=this,n={select:function(){var e,t="请选择",a="layui-form-select",n="layui-select-title",u="layui-select-none",d="",f=i(r).find("select"),y=function(t,l){i(t.target).parent().hasClass(n)&&!l||(i("."+a).removeClass(a+"ed"),e&&d&&e.val(d)),e=null},v=function(t,r,f){var v=i(this),h=t.find("."+n),p=h.find("input"),m=t.find("dl"),k=m.children("dd");if(!r){var b=function(){t.addClass(a+"ed"),k.removeClass(o)},x=function(){t.removeClass(a+"ed"),p.blur(),g(p.val(),function(e){e&&(d=m.find("."+s).html(),p&&p.val(d))})};h.on("click",function(e){t.hasClass(a+"ed")?x():(y(e,!0),b()),m.find("."+u).remove()}),h.find(".layui-edge").on("click",function(){p.focus()}),p.on("keyup",function(e){var i=e.keyCode;9===i&&b()}).on("keydown",function(e){var i=e.keyCode;9===i?x():13===i&&e.preventDefault()});var g=function(e,t,a){var n=0;layui.each(k,function(){var t=i(this),l=t.text(),r=l.indexOf(e)===-1;(""===e||"blur"===a?e!==l:r)&&n++,"keyup"===a&&t[r?"addClass":"removeClass"](o)});var l=n===k.length;return t(l),l},C=function(e){var i=this.value,t=e.keyCode;return 9!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&(g(i,function(e){e?m.find("."+u)[0]||m.append('

            无匹配项

            '):m.find("."+u).remove()},"keyup"),void(""===i&&m.find("."+u).remove()))};f&&p.on("keyup",C).on("blur",function(i){e=p,d=m.find("."+s).html(),setTimeout(function(){g(p.val(),function(e){e&&!d&&p.val("")},"blur")},200)}),k.on("click",function(){var e=i(this),a=e.attr("lay-value"),n=v.attr("lay-filter");return!e.hasClass(c)&&(v.val(a).removeClass("layui-form-danger"),p.val(e.text()),e.addClass(s).siblings().removeClass(s),layui.event.call(this,l,"select("+n+")",{elem:v[0],value:a,othis:t}),x(),!1)}),t.find("dl>dt").on("click",function(e){return!1}),i(document).off("click",y).on("click",y)}};f.each(function(e,l){var r=i(this),o=r.next("."+a),u=this.disabled,d=l.value,f=i(l.options[l.selectedIndex]);if("string"==typeof r.attr("lay-ignore"))return r.show();var y="string"==typeof r.attr("lay-search"),h=i(['
            ','
            ','
            ','
            '+function(e){var i=[];return layui.each(e,function(e,t){(0!==e||t.value)&&("optgroup"===t.tagName.toLowerCase()?i.push("
            "+t.label+"
            "):i.push('
            '+t.innerHTML+"
            "))}),i.join("")}(r.find("*"))+"
            ","
            "].join(""));o[0]&&o.remove(),r.after(h),v.call(this,h,u,y)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},t=i(r).find("input[type=checkbox]"),a=function(e,t){var a=i(this);e.on("click",function(){var i=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(t[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(t[1]).find("em").text(n[0])),layui.event.call(a[0],l,t[2]+"("+i+")",{elem:a[0],value:a[0].value,othis:e}))})};t.each(function(t,n){var l=i(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=i(['
            ',{_switch:""+((n.checked?s[0]:s[1])||"")+""}[r]||(n.title.replace(/\s/g,"")?""+n.title+"":"")+''+(r?"":"")+"","
            "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",t=["",""],a=i(r).find("input[type=radio]"),n=function(a){var n=i(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=i(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(t[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(t[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=i(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();var u=i(['
            ',''+t[l.checked?0:1]+"",""+(l.title||"未命名")+"","
            "].join(""));s[0]&&s.remove(),r.after(u),n.call(this,u)})}};return e?n[e]?n[e]():a.error("不支持的"+e+"表单渲染"):layui.each(n,function(e,i){i()}),t};var d=function(){var e=i(this),a=f.config.verify,s=null,o="layui-form-danger",c={},u=e.parents(r),d=u.find("*[lay-verify]"),y=e.parents("form")[0],v=u.find("input,select,textarea"),h=e.attr("lay-filter");return layui.each(d,function(e,l){var r=i(this),c=r.attr("lay-verify").split("|"),u="",d=r.val();if(r.removeClass(o),layui.each(c,function(e,i){var c="function"==typeof a[i];if(a[i]&&(c?u=a[i](d,l):!a[i][0].test(d)))return t.msg(u||a[i][1],{icon:5,shift:6}),n.android||n.ios||l.focus(),r.addClass(o),s=!0}),s)return s}),!s&&(layui.each(v,function(e,i){i.name&&(/^checkbox|radio$/.test(i.type)&&!i.checked||(c[i.name]=i.value))}),layui.event.call(this,l,"submit("+h+")",{elem:this,form:y,field:c}))},f=new u,y=i(document);f.render(),y.on("reset",r,function(){setTimeout(function(){f.render()},50)}),y.on("submit",r,d).on("click","*[lay-submit]",d),e(l,function(e){return f.set(e)})}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/jquery.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/jquery.js deleted file mode 100755 index 015155e29c2468d223435731c5a5c8663914fcd8..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/jquery.js +++ /dev/null @@ -1,5 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), -l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
            a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
            ","
            "],area:[1,"",""],param:[1,"",""],thead:[1,"","
            "],tr:[2,"","
            "],col:[2,"","
            "],td:[3,"","
            "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
            ","
            "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
            a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
            ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ -for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){e("jquery",pe)}),pe}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laydate.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laydate.js deleted file mode 100755 index 40b83f4b13c7b8242e4eb12473ba269868897168..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laydate.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define(function(e){"use strict";var t=window,a={path:"",skin:"default",format:"YYYY-MM-DD",min:"1900-01-01 00:00:00",max:"2099-12-31 23:59:59",isv:!1,init:!0},n={},s=document,i="createElement",o="getElementById",l="getElementsByTagName",d=["laydate_box","laydate_void","laydate_click","LayDateSkin","skins/","/laydate.css"];t.laydate=function(e){return e=e||{},n.run(e),laydate},laydate.v="1.1",n.trim=function(e){return e=e||"",e.replace(/^\s|\s$/g,"").replace(/\s+/g," ")},n.digit=function(e){return e<10?"0"+(0|e):e},n.stopmp=function(e){return e=e||t.event,e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this},n.each=function(e,t){for(var a=0,n=e.length;an.maxs[0]?s=["y",1]:e>=n.mins[0]&&e<=n.maxs[0]&&(e==n.mins[0]&&(tn.maxs[1]?s=["m",1]:t==n.maxs[1]&&a>n.maxs[2]&&(s=["d",1]))),s},n.timeVoid=function(e,t){if(n.ymd[1]+1==n.mins[1]&&n.ymd[2]==n.mins[2]){if(0===t&&en.maxs[3])return 1;if(1===t&&e>n.maxs[4])return 1;if(2===t&&e>n.maxs[5])return 1}if(e>(t?59:23))return 1},n.check=function(){var e=n.options.format.replace(/YYYY|MM|DD|hh|mm|ss/g,"\\d+\\").replace(/\\$/g,""),t=new RegExp(e),a=n.elem[d.elemv],s=a.match(/\d+/g)||[],i=n.checkVoid(s[0],s[1],s[2]);if(""!==a.replace(/\s/g,"")){if(!t.test(a))return n.elem[d.elemv]="",n.msg("日期不符合格式,请重新选择。"),1;if(i[0])return n.elem[d.elemv]="",n.msg("日期不在有效期内,请重新选择。"),1;i.value=n.elem[d.elemv].match(t).join(),s=i.value.match(/\d+/g),s[1]<1?(s[1]=1,i.auto=1):s[1]>12?(s[1]=12,i.auto=1):s[1].length<2&&(i.auto=1),s[2]<1?(s[2]=1,i.auto=1):s[2]>n.months[(0|s[1])-1]?(s[2]=31,i.auto=1):s[2].length<2&&(i.auto=1),s.length>3&&(n.timeVoid(s[3],0)&&(i.auto=1),n.timeVoid(s[4],1)&&(i.auto=1),n.timeVoid(s[5],2)&&(i.auto=1)),i.auto?n.creation([s[0],0|s[1],0|s[2]],1):i.value!==n.elem[d.elemv]&&(n.elem[d.elemv]=i.value)}},n.months=[31,null,31,30,31,30,31,31,30,31,30,31],n.viewDate=function(e,t,a){var s=(n.query,{}),i=new Date;e<(0|n.mins[0])&&(e=0|n.mins[0]),e>(0|n.maxs[0])&&(e=0|n.maxs[0]),i.setFullYear(e,t,a),s.ymd=[i.getFullYear(),i.getMonth(),i.getDate()],n.months[1]=n.isleap(s.ymd[0])?29:28,i.setFullYear(s.ymd[0],s.ymd[1],1),s.FDay=i.getDay(),s.PDay=n.months[0===t?11:t-1]-s.FDay+1,s.NDay=1,n.each(d.tds,function(e,t){var a,i=s.ymd[0],o=s.ymd[1]+1;t.className="",e=s.FDay&&e'+e+"年":'
          • '+(e-7+t)+"年
          • "}),t("#laydate_ys").innerHTML=a,n.each(t("#laydate_ys li"),function(e,t){"y"===n.checkVoid(t.getAttribute("y"))[0]?n.addClass(t,d[1]):n.on(t,"click",function(e){n.stopmp(e).reshow(),n.viewDate(0|this.getAttribute("y"),n.ymd[1],n.ymd[2])})})},n.initDate=function(){var e=(n.query,new Date),t=n.elem[d.elemv].match(/\d+/g)||[];t.length<3&&(t=n.options.start.match(/\d+/g)||[],t.length<3&&(t=[e.getFullYear(),e.getMonth()+1,e.getDate()])),n.inymd=t,n.viewDate(t[0],t[1]-1,t[2])},n.iswrite=function(){var e=n.query,t={time:e("#laydate_hms")};n.shde(t.time,!n.options.istime),n.shde(d.oclear,!("isclear"in n.options?n.options.isclear:1)),n.shde(d.otoday,!("istoday"in n.options?n.options.istoday:1)),n.shde(d.ok,!("issure"in n.options?n.options.issure:1))},n.orien=function(e,t){var a,s=n.elem.getBoundingClientRect();e.style.left=s.left+(t?0:n.scroll(1))+"px",a=s.bottom+e.offsetHeight/1.5<=n.winarea()?s.bottom-1:s.top>e.offsetHeight/1.5?s.top-e.offsetHeight+1:n.winarea()-e.offsetHeight,e.style.top=Math.max(a+(t?0:n.scroll()),1)+"px"},n.follow=function(e){n.options.fixed?(e.style.position="fixed",n.orien(e,1)):(e.style.position="absolute",n.orien(e))},n.viewtb=function(){var e,t=[],a=["日","一","二","三","四","五","六"],o={},d=s[i]("table"),r=s[i]("thead");return r.appendChild(s[i]("tr")),o.creath=function(e){var t=s[i]("th");t.innerHTML=a[e],r[l]("tr")[0].appendChild(t),t=null},n.each(new Array(6),function(a){t.push([]),e=d.insertRow(0),n.each(new Array(7),function(n){t[a][n]=0,0===a&&o.creath(n),e.insertCell(n)})}),d.insertBefore(r,d.children[0]),d.id=d.className="laydate_table",e=t=null,d.outerHTML.toLowerCase()}(),n.view=function(e,t){var o,l=n.query,r={};t=t||e,n.elem=e,n.options=t,n.options.format||(n.options.format=a.format),n.options.start=n.options.start||"",n.mm=r.mm=[n.options.min||a.min,n.options.max||a.max],n.mins=r.mm[0].match(/\d+/g),n.maxs=r.mm[1].match(/\d+/g),n.box?n.shde(n.box):(o=s[i]("div"),o.id=d[0],o.className=d[0],o.style.cssText="position: absolute;",o.setAttribute("name","laydate-v"+laydate.v),o.innerHTML=r.html='
              '+function(){var e="";return n.each(new Array(12),function(t){e+=''+n.digit(t+1)+"月"}),e}()+"
              "+n.viewtb+'",s.body.appendChild(o),n.box=l("#"+d[0]),n.events(),o=null),n.follow(n.box),t.zIndex?n.box.style.zIndex=t.zIndex:n.removeCssAttr(n.box,"z-index"),n.stopMosup("click",n.box),n.initDate(),n.iswrite(),n.check()},n.reshow=function(){return n.each(n.query("#"+d[0]+" .laydate_show"),function(e,t){n.removeClass(t,"laydate_show")}),this},n.close=function(){n.reshow(),n.shde(n.query("#"+d[0]),1),n.elem=null},n.parse=function(e,t,s){return e=e.concat(t),s=s||(n.options?n.options.format:a.format),s.replace(/YYYY|MM|DD|hh|mm|ss/g,function(t,a){return e.index=0|++e.index,n.digit(e[e.index])})},n.creation=function(e,t){var a=(n.query,n.hmsin),s=n.parse(e,[a[0].value,a[1].value,a[2].value]);n.elem[d.elemv]=s,t||(n.close(),"function"==typeof n.options.choose&&n.options.choose(s))},n.events=function(){var e=n.query,a={box:"#"+d[0]};n.addClass(s.body,"laydate_body"),d.tds=e("#laydate_table td"),d.mms=e("#laydate_ms span"),d.year=e("#laydate_y"),d.month=e("#laydate_m"),n.each(e(a.box+" .laydate_ym"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.addClass(this[l]("div")[0],"laydate_show"),e||(a.YY=parseInt(d.year.value),n.viewYears(a.YY))})}),n.on(e(a.box),"click",function(){n.reshow()}),a.tabYear=function(e){0===e?n.ymd[0]--:1===e?n.ymd[0]++:2===e?a.YY-=14:a.YY+=14,e<2?(n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2]),n.reshow()):n.viewYears(a.YY)},n.each(e("#laydate_YY .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t),a.tabYear(e)})}),a.tabMonth=function(e){e?(n.ymd[1]++,12===n.ymd[1]&&(n.ymd[0]++,n.ymd[1]=0)):(n.ymd[1]--,n.ymd[1]===-1&&(n.ymd[0]--,n.ymd[1]=11)),n.viewDate(n.ymd[0],n.ymd[1],n.ymd[2])},n.each(e("#laydate_MM .laydate_tab"),function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),a.tabMonth(e)})}),n.each(e("#laydate_ms span"),function(e,t){n.on(t,"click",function(e){n.stopmp(e).reshow(),n.hasClass(this,d[1])||n.viewDate(n.ymd[0],0|this.getAttribute("m"),n.ymd[2])})}),n.each(e("#laydate_table td"),function(e,t){n.on(t,"click",function(e){n.hasClass(this,d[1])||(n.stopmp(e),n.creation([0|this.getAttribute("y"),0|this.getAttribute("m"),0|this.getAttribute("d")]))})}),d.oclear=e("#laydate_clear"),n.on(d.oclear,"click",function(){n.elem[d.elemv]="",n.close()}),d.otoday=e("#laydate_today"),n.on(d.otoday,"click",function(){var e=new Date;n.creation([e.getFullYear(),e.getMonth()+1,e.getDate()])}),d.ok=e("#laydate_ok"),n.on(d.ok,"click",function(){n.valid&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])}),a.times=e("#laydate_time"),n.hmsin=a.hmsin=e("#laydate_hms input"),a.hmss=["小时","分钟","秒数"],a.hmsarr=[],n.msg=function(t,s){var i='
              '+(s||"提示")+"×
              ";"string"==typeof t?(i+="

              "+t+"

              ",n.shde(e("#"+d[0])),n.removeClass(a.times,"laydate_time1").addClass(a.times,"laydate_msg")):(a.hmsarr[t]?i=a.hmsarr[t]:(i+='
              ',n.each(new Array(0===t?24:60),function(e){i+=""+e+""}),i+="
              ",a.hmsarr[t]=i),n.removeClass(a.times,"laydate_msg"),n[0===t?"removeClass":"addClass"](a.times,"laydate_time1")),n.addClass(a.times,"laydate_show"),a.times.innerHTML=i},a.hmson=function(t,a){var s=e("#laydate_hmsno span"),i=n.valid?null:1;n.each(s,function(e,s){i?n.addClass(s,d[1]):n.timeVoid(e,a)?n.addClass(s,d[1]):n.on(s,"click",function(e){n.hasClass(this,d[1])||(t.value=n.digit(0|this.innerHTML))})}),n.addClass(s[0|t.value],"laydate_click")},n.each(a.hmsin,function(e,t){n.on(t,"click",function(t){n.stopmp(t).reshow(),n.msg(e,a.hmss[e]),a.hmson(this,e)})}),n.on(s,"mouseup",function(){var t=e("#"+d[0]);t&&"none"!==t.style.display&&(n.check()||n.close())}).on(s,"keydown",function(e){e=e||t.event;var a=e.keyCode;13===a&&n.elem&&n.creation([n.ymd[0],n.ymd[1]+1,n.ymd[2]])})},laydate.reset=function(){n.box&&n.elem&&n.follow(n.box)},laydate.now=function(e,t){var a=new Date(0|e?function(e){return e<864e5?+new Date+864e5*e:e}(parseInt(e)):+new Date);return n.parse([a.getFullYear(),a.getMonth()+1,a.getDate()],[a.getHours(),a.getMinutes(),a.getSeconds()],t)},layui.addcss("modules/laydate/laydate.css",function(){},"laydatecss"),e("laydate",laydate)}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layedit.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layedit.js deleted file mode 100755 index 891d2870cd5044552975f7ab0662b101c634c57c..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layedit.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define(["layer","form"],function(t){"use strict";var e=layui.jquery,i=layui.layer,a=layui.form(),l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",s=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};s.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},s.prototype.on=function(t,e){return layui.onevent(n,t,e)},s.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",s=e("#"+t),u="LAY_layedit_"+ ++a.index,d=s.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
              ','
              '+f+"
              ",'
              ','',"
              ","
              "].join(""));return l.ie&&l.ie<8?s.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),c.call(a,m,s[0],y),s.addClass("layui-hide").after(m),a.index)},s.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},s.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},s.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},s.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var c=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),s=o.find("head"),c=e([""].join("")),u=o.find("body");s.append(c),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,s=e(r.body);s.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

              ")}}),e(n).parents("form").on("submit",function(){var t=s.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),s.on("paste",function(e){r.execCommand("formatBlock",!1,"

              "),setTimeout(function(){f.call(t,s),n.value=s.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),s={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o({url:r.url,method:r.type,elem:e(n).find("input")[0],unwrap:!0,success:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},c=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

              "),setTimeout(function(){o.focus()},10)):s[a]&&s[a].call(this,u),h.call(t,c,i)}},d=/image/;c.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,c),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

                ','
              • ','','
                ','',"
                ","
              • ",'
              • ','','
                ','",'","
                ","
              • ",'
              • ','','',"
              • ","
              "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
            • '+e+'
            • ')}),'
                '+t.join("")+"
              "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
                ','
              • ','','
                ','","
                ","
              • ",'
              • ','','
                ','',"
                ","
              • ",'
              • ','','',"
              • ","
              "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new s;t(n,w)}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layer.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layer.js deleted file mode 100755 index 7b036fff3f483dcde228959348c37bae70dbdf50..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/layer.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.scripts,t=e[e.length-1],i=t.src;if(!t.getAttribute("merge"))return i.substring(0,i.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"]},r={v:"3.0.2",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):r.link("skin/"+e.extend),this):this},link:function(t,n,a){if(r.path){var o=i("head")[0],s=document.createElement("link");"string"==typeof n&&(a=n);var l=(a||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,i("#"+f)[0]||o.appendChild(s),"function"==typeof n&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(i("#"+f).css("width"))?n():setTimeout(u,100))}()}},ready:function(e){var t="skinlayercss",i="302";return a?layui.addcss("modules/layer/default/layer.css?v="+r.v+i,e,t):r.link("skin/default/layer.css?v="+r.v+i,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),r.ready(function(){document.body?t.creat():setTimeout(function(){t.creat()},50)})};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
              '+(f?r.title[0]:r.title)+"
              ":"";return r.zIndex=s,t([r.shade?'
              ':"",'
              '+(e&&2!=r.type?"":u)+'
              '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
              '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
              '+e+"
              "}():"")+(r.resize?'':"")+"
              "],u,i('
              ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]&&e.layero.addClass(l.anim[t.anim]).data("anim",!0)}},s.pt.auto=function(e){function t(e){e=s.find(e),e.height(f[1]-c-u-2*(0|parseFloat(e.css("padding"))))}var a=this,o=a.config,s=i("#"+l[0]+e);""===o.area[0]&&o.maxWidth>0&&(r.ie&&r.ie<8&&o.btn&&s.width(s.innerWidth()),s.outerWidth()>o.maxWidth&&s.width(o.maxWidth));var f=[s.innerWidth(),s.innerHeight()],c=s.find(l[1]).outerHeight()||0,u=s.find("."+l[6]).outerHeight()||0;switch(o.type){case 2:t("iframe");break;default:""===o.area[1]?o.fixed&&f[1]>=n.height()&&(f[1]=n.height(),t("."+l[5])):t("."+l[5])}return a},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("anim")&&t.addClass(a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),setTimeout(function(){f()},r.ie&&r.ie<10||!t.data("anim")?0:200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,n="";if(e>0)for(n=''+t[0].title+"";i"+t[i].title+"";return n}(),content:'
                '+function(){var e=t.length,i=1,n="";if(e>0)for(n='
              • '+(t[0].content||"no content")+"
              • ";i'+(t[i].content||"no content")+"";return n}()+"
              ",success:function(t){var a=t.find(".layui-layer-title").children(),o=t.find(".layui-layer-tabmain").children();a.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var n=i(this),a=n.index();n.addClass("layui-layer-tabnow").siblings().removeClass("layui-layer-tabnow"),o.eq(a).show().siblings().hide(),"function"==typeof e.change&&e.change(a)}),"function"==typeof n&&n(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){u.length<=1||(f.start=s.imgIndex-1,r.close(s.index),setTimeout(function(){r.photos(t,!0,e)},200))},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
              '+(u.length>1?'':"")+'
              '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
              ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
              是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.jquery),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laypage.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laypage.js deleted file mode 100755 index ed2ffa3fde53b619c1cc836edcbeaaeb832e9526..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/laypage.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define(function(a){"use strict";function t(a){new p(a)}var e=document,r="getElementById",n="getElementsByTagName",s=0,p=function(a){var t=this,e=t.config=a||{};e.item=s++,t.render(!0)};p.on=function(a,t,e){return a.attachEvent?a.attachEvent("on"+t,function(){e.call(a,window.even)}):a.addEventListener(t,e,!1),p},p.prototype.type=function(){var a=this.config;if("object"==typeof a.cont)return void 0===a.cont.length?2:3},p.prototype.view=function(){var a=this,t=a.config,e=[],r={};if(t.pages=0|t.pages,t.curr=0|t.curr||1,t.groups="groups"in t?0|t.groups:5,t.first="first"in t?t.first:"首页",t.last="last"in t?t.last:"末页",t.prev="prev"in t?t.prev:"上一页",t.next="next"in t?t.next:"下一页",t.pages<=1)return"";for(t.groups>t.pages&&(t.groups=t.pages),r.index=Math.ceil((t.curr+(t.groups>1&&t.groups!==t.pages?1:0))/(0===t.groups?1:t.groups)),t.curr>1&&t.prev&&e.push(''+t.prev+""),r.index>1&&t.first&&0!==t.groups&&e.push(''+t.first+""),r.poor=Math.floor((t.groups-1)/2),r.start=r.index>1?t.curr-r.poor:1,r.end=r.index>1?function(){var a=t.curr+(t.groups-r.poor-1);return a>t.pages?t.pages:a}():t.groups,r.end-r.start"+r.start+""):e.push(''+r.start+"");return t.pages>t.groups&&r.end'+t.last+""),r.flow=!t.prev&&0===t.groups,(t.curr!==t.pages&&t.next||r.flow)&&e.push(function(){return r.flow&&t.curr===t.pages?''+t.next+"":''+t.next+""}()),'
              '+e.join("")+function(){return t.skip?'到第 ':""}()+"
              "},p.prototype.jump=function(a){if(a){for(var t=this,e=t.config,r=a.children,s=a[n]("button")[0],i=a[n]("input")[0],u=0,o=r.length;u/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/mobile.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/mobile.js deleted file mode 100755 index 9c8168126100eb39b81174c6cf28a5b27393d4d5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/mobile.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},n={exp:function(e){return new RegExp(e,"g")},query:function(e,n,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return c((n||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

              '+(e?i.title[0]:i.title)+"

              ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
              '+e+"
              "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

              '+(i.content||"")+"

              "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
              ':"")+'
              "+l+'
              '+i.content+"
              "+d+"
              ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
              ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["layer-mobile","zepto"],function(e){"use strict";var t=layui.zepto,a=layui["layer-mobile"],i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"};a.msg=function(e){return a.open({content:e||"",skin:"msg",time:0})};var s=function(e){this.options=e};s.prototype.init=function(){var e=this,a=e.options,r=t("body"),s=t(a.elem||".layui-upload-file"),u=t('');return t("#"+n)[0]||r.append(u),s.each(function(r,s){s=t(s);var u='
              ',l=s.attr("lay-type")||a.type;a.unwrap||(u='
              '+u+''+(s.attr("lay-title")||a.title||"上传"+(o[l]||"图片"))+"
              "),u=t(u),a.unwrap||u.on("dragover",function(e){e.preventDefault(),t(this).addClass(i)}).on("dragleave",function(){t(this).removeClass(i)}).on("drop",function(){t(this).removeClass(i)}),s.parent("form").attr("target")===n&&(a.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=t(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return a.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return a.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return a.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return a.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=t("#"+n),f=setInterval(function(){var t;try{t=c.contents().find("body").text()}catch(i){a.msg("上传接口存在跨域",r),clearInterval(f)}if(t){clearInterval(f),c.contents().find("body").html("");try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(t,e)}},30);e.value=""}},e("upload-mobile",function(e){var t=new s(e=e||{});t.init()})});layui.define(["laytpl","upload-mobile","layer-mobile","zepto"],function(a){var e="1.0.3",i=layui.zepto,t=layui.laytpl,n=layui["layer-mobile"],l=layui["upload-mobile"],s="layui-show",c=20,o={},u=function(){this.v=e,i("body").on("click","*[layim-event]",function(a){var e=i(this),t=e.attr("layim-event");B[t]?B[t].call(this,e,a):""})};n.popBottom=function(a){n.close(n.popBottom.index),n.popBottom.index=n.open(i.extend({type:1,content:a.content||"",shade:!1,className:"layim-layer"},a))},u.prototype.config=function(a){a=a||{},a=i.extend({title:"我的IM",isfriend:!0,voice:"default.mp3",chatTitleColor:"#36373C"},a),v(a)},u.prototype.on=function(a,e){return"function"==typeof e&&(o[a]?o[a].push(e):o[a]=[e]),this},u.prototype.chat=function(a){if(window.JSON&&window.JSON.parse)return b(a),this},u.prototype.cache=function(){return h},u.prototype.getMessage=function(a){return S(a),this},u.prototype.setChatStatus=function(a){var e=x(),i=e.elem.find(".layim-chat-status");return i.html(a),this},u.prototype.content=function(a){return layui.data.content(a)};var r=function(a){var e={friend:"该分组下暂无好友",group:"暂无群组",history:"暂无消息"};return a=a||{},a.item=a.item||"d."+a.type,["{{# var length = 0; layui.each("+a.item+", function(i, data){ length++; }}",'
            • {{ data.username||data.groupname||data.name||"佚名" }}

              {{ data.remark||data.sign||"" }}

            • ',"{{# }); if(length === 0){ }}",'
            • '+(e[a.type]||"暂无数据")+"
            • ","{{# } }}"].join("")},d=['
              ','
              ',"

              {{ d.base.title }}

              ","
              ",'
                ','{{# layui.each(d.friend, function(index, item){ var spread = d.local["spread"+index]; }}',"
              • ",'
                {{# if(spread === "true"){ }}{{# } else { }}{{# } }}{{ item.groupname||"未命名分组"+index }}( {{ (item.list||[]).length }})
                ','
                  ',r({type:"friend",item:"item.list",index:"index"}),"
                ","
              • ","{{# }); if(d.friend.length === 0){ }}",'
                • 暂无联系人
                ',"{{# } }}","
              ",'
                ','
              • ','
              • ',"
              ","
              "].join(""),m=['
              ',"{{# if(d.base.chatTitleColor){ }}",'
              ','

              {{ d.data.name }}

              ',"
              ","{{# } }}",'
              ',"
                ","
                ",'","
                "].join(""),y=function(a){return a<10?"0"+(0|a):a};layui.data.date=function(a){var e=new Date(a||new Date);return y(e.getMonth()+1)+"-"+y(e.getDate())+" "+y(e.getHours())+":"+y(e.getMinutes())},layui.data.content=function(a){var e=function(a){return new RegExp("\\n*\\["+(a||"")+"(pre|div|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)\\]\\n*","g")};return a=(a||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@$1$2').replace(/face\[([^\s\[\]]+?)\]/g,function(a){var e=a.replace(/^face/g,"");return''+e+''}).replace(/img\[([^\s]+?)\]/g,function(a){return''}).replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g,function(a){var e=(a.match(/file\(([\s\S]+?)\)\[/)||[])[1],i=(a.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(i||e)+"":a}).replace(/audio\[([^\s]+?)\]/g,function(a){return'

                音频消息

                '}).replace(/video\[([^\s]+?)\]/g,function(a){return'
                '}).replace(/a\([\s\S]+?\)\[[\s\S]*?\]/g,function(a){var e=(a.match(/a\(([\s\S]+?)\)\[/)||[])[1],i=(a.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(i||e)+"":a}).replace(e(),"<$1 $2>").replace(e("/"),"").replace(/\n/g,"
                ")};var p,f=['
              • ','
                ','{{ d.username||"佚名" }}',"
                ",'
                {{ layui.data.content(d.content||" ") }}
                ',"
              • "].join(""),h={message:{},chat:[]},v=function(a){var e=a.init||{};return mine=e.mine||{},local=layui.data("layim-mobile")[mine.id]||{},obj={base:a,local:local,mine:mine,history:local.history||{}},create=function(e){var n=e.mine||{},l=layui.data("layim-mobile")[n.id]||{},s={base:a,local:l,mine:n,friend:e.friend||[],group:e.group||[],history:l.history||{}};h=i.extend(h,s),g(t(d).render(s)),layui.each(o.ready,function(a,e){e&&e(s)})},h=i.extend(h,obj),a.brief?layui.each(o.ready,function(a,e){e&&e(obj)}):void create(e)},g=function(a){return n.open({type:1,shade:!1,anim:-1,content:a,success:function(a){}})},b=function(a){a=a||{};var e=(i("#layui-layim-chat"),{data:a,base:h.base,local:h.local});return a.id?(n.close(b.index),b.index=n.open({type:1,className:"layui-layim-chat",shade:!1,anim:-1,content:t(m).render(e),success:function(a){p=i(a),$(),N(),layui.each(o.chatChange,function(a,e){e&&e(x())})},end:function(){p=null}})):n.msg("非法用户")},x=function(){var a=p.find(".layim-chat"),e=JSON.parse(decodeURIComponent(a.find(".layim-chat-tool").data("json")));return{elem:a,data:e,textarea:a.find("input")}},k=function(){var a={username:h.mine?h.mine.username:"访客",avatar:h.mine?h.mine.avatar:layui.cache.dir+"css/pc/layim/skin/logo.jpg",id:h.mine?h.mine.id:null,mine:!0},e=x(),i=e.elem.find(".layim-chat-main ul"),l=e.data,s=h.base.maxLength||3e3,c=(new Date).getTime();if(a.content=e.textarea.val(),""!==a.content){if(a.content.length>s)return n.msg("内容最长不能超过"+s+"个字符");c-(k.time||0)>6e4&&(i.append('
              • '+layui.data.date()+"
              • "),k.time=c),i.append(t(f).render(a));var u={mine:a,to:l},r={username:u.mine.username,avatar:u.mine.avatar,id:l.id,type:l.type,content:u.mine.content,timestamp:c,mine:!0};j(r),layui.each(o.sendMessage,function(a,e){e&&e(u)}),T(),e.textarea.val("").focus()}},w=function(){var a=document.createElement("audio");a.src=layui.cache.dir+"css/modules/layim/voice/"+h.base.voice,a.play()},C={},S=function(a){a=a||{};var e={};if(a.timestamp=a.timestamp||(new Date).getTime(),a.system||j(a),C=JSON.parse(JSON.stringify(a)),h.base.voice&&w(),!p&&a.content){if(h.message[a.type+a.id])h.message[a.type+a.id].push(a);else if(h.message[a.type+a.id]=[a],"friend"===a.type){var i;layui.each(h.friend,function(e,t){if(layui.each(t.list,function(e,t){if(t.id==a.id)return t.type="friend",t.name=t.username,h.chat.push(t),i=!0}),i)return!0}),i||(a.name=a.username,a.temporary=!0,h.chat.push(a))}else if("group"===a.type){var n;layui.each(h.group,function(e,i){if(i.id==a.id)return i.type="group",i.name=i.groupname,h.chat.push(i),n=!0}),n||(a.name=a.groupname,h.chat.push(a))}else a.name=a.name||a.username||a.groupname,h.chat.push(a);"group"===a.type&&layui.each(h.group,function(i,t){if(t.id==a.id)return e.avatar=t.avatar,!0}),!a.system}if(p){var l=p.find(".layim-chat"),s=l.find(".layim-chat-main ul");a.system?s.append('
              • '+a.content+"
              • "):""!==a.content.replace(/\s/g,"")&&(a.timestamp-(k.time||0)>6e4&&(s.append('
              • '+layui.data.date(a.timestamp)+"
              • "),k.time=a.timestamp),s.append(t(f).render(a))),T()}},j=function(a){var e=layui.data("layim-mobile")[h.mine.id]||{},i=e.chatlog||{};i[a.type+a.id]?(i[a.type+a.id].push(a),i[a.type+a.id].length>c&&i[a.type+a.id].shift()):i[a.type+a.id]=[a],e.chatlog=i,layui.data("layim-mobile",{key:h.mine.id,value:e})},N=function(){var a=layui.data("layim-mobile")[h.mine.id]||{},e=x(),i=a.chatlog||{},n=e.elem.find(".layim-chat-main ul");layui.each(i[e.data.type+e.data.id],function(a,e){(new Date).getTime()>e.timestamp&&e.timestamp-(k.time||0)>6e4&&(n.append('
              • '+layui.data.date(e.timestamp)+"
              • "),k.time=e.timestamp),n.append(t(f).render(e))}),T()},T=function(){var a=x(),e=a.elem.find(".layim-chat-main"),i=e.find("ul"),t=i.children(".layim-chat-li");if(t.length>=c){var n=t.eq(0);i.prev().hasClass("layim-chat-system")||i.before('
                查看更多记录
                '),n.remove()}e.scrollTop(e[0].scrollHeight+1e3)},$=function(){var a=x(),e=a.textarea,i=e.next();e.off("keyup").on("keyup",function(a){var t=a.keyCode;13===t&&(a.preventDefault(),k()),i[""===e.val()?"addClass":"removeClass"]("layui-disabled")})},D=function(){var a=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(a,function(a,i){e[i]=layui.cache.dir+"images/face/"+a+".gif"}),e}(),O=layui.stope,J=function(a,e,i){var t,n=a.value;i||a.focus(),document.selection?(t=document.selection.createRange(),document.selection.empty(),t.text=e):(t=[n.substring(0,a.selectionStart),e,n.substr(a.selectionEnd)],i||a.focus(),a.value=t.join(""))},B={chat:function(a){var e=layui.data("layim-mobile")[h.mine.id]||{},i=a.data("type"),t=a.data("index"),n=a.attr("data-list")||a.index(),l={};"friend"===i?l=h[i][t].list[n]:"group"===i?l=h[i][n]:"history"===i&&(l=(e.history||{})[t]||{}),l.name=l.name||l.username||l.groupname,"history"!==i&&(l.type=i),b(l)},spread:function(a){var e=a.attr("lay-type"),i="true"===e?"false":"true",t=layui.data("layim-mobile")[h.mine.id]||{};a.next()["true"===e?"removeClass":"addClass"](s),t["spread"+a.parent().index()]=i,layui.data("layim-mobile",{key:h.mine.id,value:t}),a.attr("lay-type",i),a.find(".layui-icon").html("true"===i?"":"")},backList:function(){n.close(b.index)},send:function(){k()},face:function(a,e){var t="",l=x(),s=l.textarea;layui.each(D,function(a,e){t+='
              • '}),t='
                  '+t+"
                ",n.popBottom({content:t,success:function(a){var e=i(a).find(".layui-layim-face>li");e.on("click",function(){return J(s[0],"face"+this.title+" ",!0),s.next()[""===s.val()?"addClass":"removeClass"]("layui-disabled"),!1})}}),i(document).off("click",B.faceHide).on("click",B.faceHide),O(e)},faceHide:function(){n.close(n.popBottom.index)},image:function(a){var e=a.data("type")||"images",i={images:"uploadImage",file:"uploadFile"},t=x(),s=h.base[i[e]]||{};l({url:s.url||"",method:s.type,elem:a.find("input")[0],unwrap:!0,type:e,success:function(a){0==a.code?(a.data=a.data||{},"images"===e?J(t.textarea[0],"img["+(a.data.src||"")+"]"):"file"===e&&J(t.textarea[0],"file("+(a.data.src||"")+")["+(a.data.name||"下载文件")+"]"),k()):n.msg(a.msg||"上传失败")}})},extend:function(a){var e=a.attr("lay-filter"),i=x();layui.each(o["tool("+e+")"],function(a,e){e&&e(function(a){J(i.textarea[0],a)})})},chatLog:function(a){var e=x();layui.each(o.chatlog,function(a,i){i&&i({id:e.data.id,type:e.data.type,elem:e.elem.find(".layim-chat-main>ul")})})}};a("layim-mobile",new u)}).addcss("modules/layim/mobile/layim.css?v=1.03","skinlayim-mobilecss");layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/tree.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/tree.js deleted file mode 100755 index 221c0629c0c70cc40b9393aef9809b95c48668c6..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/tree.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("jquery",function(e){"use strict";var o=layui.jquery,a=layui.hint(),r="layui-tree-enter",i=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};i.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},i.prototype.tree=function(e,a){var r=this,i=r.options,n=a||i.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
                  '),s=o(["
                • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return i.check?''+("checkbox"===i.check?t.checkbox[0]:"radio"===i.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
                • "].join(""));l&&(s.append(c),r.tree(c,n.children)),e.append(s),"function"==typeof i.click&&r.click(s,n),r.spread(s,n),i.drag&&r.drag(s,n)})},i.prototype.click=function(e,o){var a=this,r=a.options;e.children("a").on("click",function(e){layui.stope(e),r.click(o)})},i.prototype.spread=function(e,o){var a=this,r=(a.options,e.children(".layui-tree-spread")),i=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),i.removeClass("layui-show"),r.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),i.addClass("layui-show"),r.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};i[0]&&(r.on("click",l),n.on("dblclick",l))},i.prototype.on=function(e){var a=this,i=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),i.drag&&o(document).on("mousemove",function(e){var r=a.move;if(r.from){var i=(r.to,o('
                  '));e.preventDefault(),o("."+t)[0]||o("body").append(i);var n=o("."+t)[0]?o("."+t):i;n.addClass("layui-show").html(r.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(r),e.to&&e.to.elem.children("a").removeClass(r),a.move={},o("."+t).remove())})},i.prototype.move={},i.prototype.drag=function(e,a){var i=this,t=(i.options,e.children("a")),n=function(){var t=o(this),n=i.move;n.from&&(n.to={item:a,elem:e},t.addClass(r))};t.on("mousedown",function(){var o=i.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=i.move;a.from&&(delete a.to,e.removeClass(r))})},e("tree",function(e){var r=new i(e=e||{}),t=o(e.elem);return t[0]?void r.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/upload.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/upload.js deleted file mode 100755 index d5b78f9432b77a474bc1db3cda83a236f6141e4e..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/upload.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("layer",function(e){"use strict";var a=layui.jquery,t=layui.layer,i=(layui.device(),"layui-upload-enter"),n="layui-upload-iframe",r={icon:2,shift:6},o={file:"文件",video:"视频",audio:"音频"},s=function(e){this.options=e};s.prototype.init=function(){var e=this,t=e.options,r=a("body"),s=a(t.elem||".layui-upload-file"),u=a('');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
                  ',l=s.attr("lay-type")||t.type;t.unwrap||(u='
                  '+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
                  "),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/util.js b/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/util.js deleted file mode 100755 index 2f6938f4ef2bebb65ac3ee10af3bcc4fc2b29db1..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/lay/modules/util.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['
                    ',l.bar1?'
                  • '+t[0]+"
                  • ":"",l.bar2?'
                  • '+t[1]+"
                  • ":"",'
                  • '+t[2]+"
                  • ","
                  "].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/layui.js b/xxpay-mgr/src/main/resources/static/plugins/layui/layui.js deleted file mode 100755 index ed8835fa6c35ef3e13de2a836a2044fed06ae86f..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/layui.js +++ /dev/null @@ -1,2 +0,0 @@ -/** layui-v1.0.9_rls MIT License By http://www.layui.com */ - ;!function(e){"use strict";var t=function(){this.v="1.0.9_rls"};t.fn=t.prototype;var n=document,o=t.fn.cache={},i=function(){var e=n.scripts,t=e[e.length-1].src;return t.substring(0,t.lastIndexOf("/")+1)}(),r=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},l="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),a={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"dest/layui.all"};o.modules={},o.status={},o.timeout=10,o.event={},t.fn.define=function(e,t){var n=this,i="function"==typeof e,r=function(){return"function"==typeof t&&t(function(e,t){layui[e]=t,o.status[e]=!0}),this};return i&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?r.call(n):(n.use(e,r),n)},t.fn.use=function(e,t,u){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[m]=t,y.removeChild(p),function i(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void(o.status[m]?c():setTimeout(i,4))}())}function c(){u.push(layui[m]),e.length>1?f.use(e.slice(1),t,u):"function"==typeof t&&t.apply(layui,u)}var f=this,d=o.dir=o.dir?o.dir:i,y=n.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(f.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=jQuery);var m=e[0],v=0;if(u=u||[],o.host=o.host||(d.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&a[m]||!layui["layui.all"]&&layui["layui.mobile"]&&a[m])return c(),f;var p=n.createElement("script"),h=(a[m]?d+"lay/":o.base||"")+(f.modules[m]||m)+".js";return p.async=!0,p.charset="utf-8",p.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),o.modules[m]?!function g(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void("string"==typeof o.modules[m]&&o.status[m]?c():setTimeout(g,4))}():(y.appendChild(p),!p.attachEvent||p.attachEvent.toString&&p.attachEvent.toString().indexOf("[native code")<0||l?p.addEventListener("load",function(e){s(e,h)},!1):p.attachEvent("onreadystatechange",function(e){s(e,h)})),o.modules[m]=h,f},t.fn.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},t.fn.link=function(e,t,i){var l=this,a=n.createElement("link"),u=n.getElementsByTagName("head")[0];"string"==typeof t&&(i=t);var s=(i||e).replace(/\.|\//g,""),c=a.id="layuicss-"+s,f=0;a.rel="stylesheet",a.href=e+(o.debug?"?v="+(new Date).getTime():""),a.media="all",n.getElementById(c)||u.appendChild(a),"function"==typeof t&&!function d(){return++f>1e3*o.timeout/100?r(e+" timeout"):void(1989===parseInt(l.getStyle(n.getElementById(c),"width"))?function(){t()}():setTimeout(d,100))}()},t.fn.addcss=function(e,t,n){layui.link(o.dir+"css/"+e,t,n)},t.fn.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},t.fn.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},t.fn.modules=function(){var e={};for(var t in a)e[t]=a[t];return e}(),t.fn.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?r("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},t.fn.router=function(e){for(var t,n=(e||location.hash).replace(/^#/,"").split("/")||[],o={dir:[]},i=0;ip&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this, -b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='
                  ")[_callback]("ifCreated").parent().append(e.insert);d=f('').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return; -A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d= -b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(JQuery); - //输出接口 - exports('icheck', null); -}).addcss('modules/icheck/icheck.css','skinicheckcss'); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/static/plugins/layui/modules/pjax.js b/xxpay-mgr/src/main/resources/static/plugins/layui/modules/pjax.js deleted file mode 100755 index 9f01d99f18099089866705837e422a0ef3a0a294..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/static/plugins/layui/modules/pjax.js +++ /dev/null @@ -1,949 +0,0 @@ -//依赖layui.js - -layui.define(['jquery'], function(exports) { - var jQuery = layui.jquery; - - /*! - * Copyright 2012, Chris Wanstrath - * Released under the MIT License - * https://github.com/defunkt/jquery-pjax - */ - - (function($) { - - // When called on a container with a selector, fetches the href with - // ajax into the container or with the data-pjax attribute on the link - // itself. - // - // Tries to make sure the back button and ctrl+click work the way - // you'd expect. - // - // Exported as $.fn.pjax - // - // Accepts a jQuery ajax options object that may include these - // pjax specific options: - // - // - // container - Where to stick the response body. Usually a String selector. - // $(container).html(xhr.responseBody) - // (default: current jquery context) - // push - Whether to pushState the URL. Defaults to true (of course). - // replace - Want to use replaceState instead? That's cool. - // - // For convenience the second parameter can be either the container or - // the options object. - // - // Returns the jQuery object - function fnPjax(selector, container, options) { - var context = this - return this.on('click.pjax', selector, function(event) { - var opts = $.extend({}, optionsFor(container, options)) - if(!opts.container) - opts.container = $(this).attr('data-pjax') || context - handleClick(event, opts) - }) - } - - // Public: pjax on click handler - // - // Exported as $.pjax.click. - // - // event - "click" jQuery.Event - // options - pjax options - // - // Examples - // - // $(document).on('click', 'a', $.pjax.click) - // // is the same as - // $(document).pjax('a') - // - // $(document).on('click', 'a', function(event) { - // var container = $(this).closest('[data-pjax-container]') - // $.pjax.click(event, container) - // }) - // - // Returns nothing. - function handleClick(event, container, options) { - options = optionsFor(container, options) - - var link = event.currentTarget - - if(link.tagName.toUpperCase() !== 'A') - throw "$.fn.pjax or $.pjax.click requires an anchor element" - - // Middle click, cmd click, and ctrl click should open - // links in a new tab as normal. - if(event.which > 1 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) - return - - // Ignore cross origin links - if(location.protocol !== link.protocol || location.hostname !== link.hostname) - return - - // Ignore case when a hash is being tacked on the current URL - if(link.href.indexOf('#') > -1 && stripHash(link) == stripHash(location)) - return - - // Ignore event with default prevented - if(event.isDefaultPrevented()) - return - - var defaults = { - url: link.href, - container: $(link).attr('data-pjax'), - target: link - } - - var opts = $.extend({}, defaults, options) - var clickEvent = $.Event('pjax:click') - $(link).trigger(clickEvent, [opts]) - - if(!clickEvent.isDefaultPrevented()) { - pjax(opts) - event.preventDefault() - $(link).trigger('pjax:clicked', [opts]) - } - } - - // Public: pjax on form submit handler - // - // Exported as $.pjax.submit - // - // event - "click" jQuery.Event - // options - pjax options - // - // Examples - // - // $(document).on('submit', 'form', function(event) { - // var container = $(this).closest('[data-pjax-container]') - // $.pjax.submit(event, container) - // }) - // - // Returns nothing. - function handleSubmit(event, container, options) { - options = optionsFor(container, options) - - var form = event.currentTarget - - if(form.tagName.toUpperCase() !== 'FORM') - throw "$.pjax.submit requires a form element" - - var defaults = { - type: form.method.toUpperCase(), - url: form.action, - container: $(form).attr('data-pjax'), - target: form - } - - if(defaults.type !== 'GET' && window.FormData !== undefined) { - defaults.data = new FormData(form); - defaults.processData = false; - defaults.contentType = false; - } else { - // Can't handle file uploads, exit - if($(form).find(':file').length) { - return; - } - - // Fallback to manually serializing the fields - defaults.data = $(form).serializeArray(); - } - - pjax($.extend({}, defaults, options)) - - event.preventDefault() - } - - // Loads a URL with ajax, puts the response body inside a container, - // then pushState()'s the loaded URL. - // - // Works just like $.ajax in that it accepts a jQuery ajax - // settings object (with keys like url, type, data, etc). - // - // Accepts these extra keys: - // - // container - Where to stick the response body. - // $(container).html(xhr.responseBody) - // push - Whether to pushState the URL. Defaults to true (of course). - // replace - Want to use replaceState instead? That's cool. - // - // Use it just like $.ajax: - // - // var xhr = $.pjax({ url: this.href, container: '#main' }) - // console.log( xhr.readyState ) - // - // Returns whatever $.ajax returns. - function pjax(options) { - options = $.extend(true, {}, $.ajaxSettings, pjax.defaults, options) - - if($.isFunction(options.url)) { - options.url = options.url() - } - - var target = options.target - - var hash = parseURL(options.url).hash - - var context = options.context = findContainerFor(options.container) - - // We want the browser to maintain two separate internal caches: one - // for pjax'd partial page loads and one for normal page loads. - // Without adding this secret parameter, some browsers will often - // confuse the two. - if(!options.data) options.data = {} - if($.isArray(options.data)) { - options.data.push({ - name: '_pjax', - value: context.selector - }) - } else { - options.data._pjax = context.selector - } - - function fire(type, args, props) { - if(!props) props = {} - props.relatedTarget = target - var event = $.Event(type, props) - context.trigger(event, args) - return !event.isDefaultPrevented() - } - - var timeoutTimer - - options.beforeSend = function(xhr, settings) { - // No timeout for non-GET requests - // Its not safe to request the resource again with a fallback method. - if(settings.type !== 'GET') { - settings.timeout = 0 - } - - xhr.setRequestHeader('X-PJAX', 'true') - xhr.setRequestHeader('X-PJAX-Container', context.selector) - - if(!fire('pjax:beforeSend', [xhr, settings])) - return false - - if(settings.timeout > 0) { - timeoutTimer = setTimeout(function() { - if(fire('pjax:timeout', [xhr, options])) - xhr.abort('timeout') - }, settings.timeout) - - // Clear timeout setting so jquerys internal timeout isn't invoked - settings.timeout = 0 - } - - var url = parseURL(settings.url) - if(hash) url.hash = hash - options.requestUrl = stripInternalParams(url) - } - - options.complete = function(xhr, textStatus) { - if(timeoutTimer) - clearTimeout(timeoutTimer) - - fire('pjax:complete', [xhr, textStatus, options]) - - fire('pjax:end', [xhr, options]) - } - - options.error = function(xhr, textStatus, errorThrown) { - var container = extractContainer("", xhr, options) - - var allowed = fire('pjax:error', [xhr, textStatus, errorThrown, options]) - if(options.type == 'GET' && textStatus !== 'abort' && allowed) { - locationReplace(container.url) - } - } - - options.success = function(data, status, xhr) { - var previousState = pjax.state; - - // If $.pjax.defaults.version is a function, invoke it first. - // Otherwise it can be a static string. - var currentVersion = (typeof $.pjax.defaults.version === 'function') ? - $.pjax.defaults.version() : - $.pjax.defaults.version - - var latestVersion = xhr.getResponseHeader('X-PJAX-Version') - - var container = extractContainer(data, xhr, options) - - var url = parseURL(container.url) - if(hash) { - url.hash = hash - container.url = url.href - } - - // If there is a layout version mismatch, hard load the new url - if(currentVersion && latestVersion && currentVersion !== latestVersion) { - locationReplace(container.url) - return - } - - // If the new response is missing a body, hard load the page - if(!container.contents) { - locationReplace(container.url) - return - } - - pjax.state = { - id: options.id || uniqueId(), - url: container.url, - title: container.title, - container: context.selector, - fragment: options.fragment, - timeout: options.timeout - } - - if(options.push || options.replace) { - window.history.replaceState(pjax.state, container.title, container.url) - } - - // Clear out any focused controls before inserting new page contents. - try { - document.activeElement.blur() - } catch(e) {} - - if(container.title) document.title = container.title - - fire('pjax:beforeReplace', [container.contents, options], { - state: pjax.state, - previousState: previousState - }) - context.html(container.contents) - - // FF bug: Won't autofocus fields that are inserted via JS. - // This behavior is incorrect. So if theres no current focus, autofocus - // the last field. - // - // http://www.w3.org/html/wg/drafts/html/master/forms.html - var autofocusEl = context.find('input[autofocus], textarea[autofocus]').last()[0] - if(autofocusEl && document.activeElement !== autofocusEl) { - autofocusEl.focus(); - } - - executeScriptTags(container.scripts) - - var scrollTo = options.scrollTo - - // Ensure browser scrolls to the element referenced by the URL anchor - if(hash) { - var name = decodeURIComponent(hash.slice(1)) - var target = document.getElementById(name) || document.getElementsByName(name)[0] - if(target) scrollTo = $(target).offset().top - } - - if(typeof scrollTo == 'number') $(window).scrollTop(scrollTo) - - fire('pjax:success', [data, status, xhr, options]) - } - - // Initialize pjax.state for the initial page load. Assume we're - // using the container and options of the link we're loading for the - // back button to the initial page. This ensures good back button - // behavior. - if(!pjax.state) { - pjax.state = { - id: uniqueId(), - url: window.location.href, - title: document.title, - container: context.selector, - fragment: options.fragment, - timeout: options.timeout - } - window.history.replaceState(pjax.state, document.title) - } - - // Cancel the current request if we're already pjaxing - abortXHR(pjax.xhr) - - pjax.options = options - var xhr = pjax.xhr = $.ajax(options) - - if(xhr.readyState > 0) { - if(options.push && !options.replace) { - // Cache current container element before replacing it - cachePush(pjax.state.id, cloneContents(context)) - - window.history.pushState(null, "", options.requestUrl) - } - - fire('pjax:start', [xhr, options]) - fire('pjax:send', [xhr, options]) - } - - return pjax.xhr - } - - // Public: Reload current page with pjax. - // - // Returns whatever $.pjax returns. - function pjaxReload(container, options) { - var defaults = { - url: window.location.href, - push: false, - replace: true, - scrollTo: false - } - - return pjax($.extend(defaults, optionsFor(container, options))) - } - - // Internal: Hard replace current state with url. - // - // Work for around WebKit - // https://bugs.webkit.org/show_bug.cgi?id=93506 - // - // Returns nothing. - function locationReplace(url) { - window.history.replaceState(null, "", pjax.state.url) - window.location.replace(url) - } - - var initialPop = true - var initialURL = window.location.href - var initialState = window.history.state - - // Initialize $.pjax.state if possible - // Happens when reloading a page and coming forward from a different - // session history. - if(initialState && initialState.container) { - pjax.state = initialState - } - - // Non-webkit browsers don't fire an initial popstate event - if('state' in window.history) { - initialPop = false - } - - // popstate handler takes care of the back and forward buttons - // - // You probably shouldn't use pjax on pages with other pushState - // stuff yet. - function onPjaxPopstate(event) { - - // Hitting back or forward should override any pending PJAX request. - if(!initialPop) { - abortXHR(pjax.xhr) - } - - var previousState = pjax.state - var state = event.state - var direction - - if(state && state.container) { - // When coming forward from a separate history session, will get an - // initial pop with a state we are already at. Skip reloading the current - // page. - if(initialPop && initialURL == state.url) return - - if(previousState) { - // If popping back to the same state, just skip. - // Could be clicking back from hashchange rather than a pushState. - if(previousState.id === state.id) return - - // Since state IDs always increase, we can deduce the navigation direction - direction = previousState.id < state.id ? 'forward' : 'back' - } - - var cache = cacheMapping[state.id] || [] - var container = $(cache[0] || state.container), - contents = cache[1] - - if(container.length) { - if(previousState) { - // Cache current container before replacement and inform the - // cache which direction the history shifted. - cachePop(direction, previousState.id, cloneContents(container)) - } - - var popstateEvent = $.Event('pjax:popstate', { - state: state, - direction: direction - }) - container.trigger(popstateEvent) - - var options = { - id: state.id, - url: state.url, - container: container, - push: false, - fragment: state.fragment, - timeout: state.timeout, - scrollTo: false - } - - if(contents) { - container.trigger('pjax:start', [null, options]) - - pjax.state = state - if(state.title) document.title = state.title - var beforeReplaceEvent = $.Event('pjax:beforeReplace', { - state: state, - previousState: previousState - }) - container.trigger(beforeReplaceEvent, [contents, options]) - container.html(contents) - - container.trigger('pjax:end', [null, options]) - } else { - pjax(options) - } - - // Force reflow/relayout before the browser tries to restore the - // scroll position. - container[0].offsetHeight - } else { - locationReplace(location.href) - } - } - initialPop = false - } - - // Fallback version of main pjax function for browsers that don't - // support pushState. - // - // Returns nothing since it retriggers a hard form submission. - function fallbackPjax(options) { - var url = $.isFunction(options.url) ? options.url() : options.url, - method = options.type ? options.type.toUpperCase() : 'GET' - - var form = $('
                  ', { - method: method === 'GET' ? 'GET' : 'POST', - action: url, - style: 'display:none' - }) - - if(method !== 'GET' && method !== 'POST') { - form.append($('', { - type: 'hidden', - name: '_method', - value: method.toLowerCase() - })) - } - - var data = options.data - if(typeof data === 'string') { - $.each(data.split('&'), function(index, value) { - var pair = value.split('=') - form.append($('', { - type: 'hidden', - name: pair[0], - value: pair[1] - })) - }) - } else if($.isArray(data)) { - $.each(data, function(index, value) { - form.append($('', { - type: 'hidden', - name: value.name, - value: value.value - })) - }) - } else if(typeof data === 'object') { - var key - for(key in data) - form.append($('', { - type: 'hidden', - name: key, - value: data[key] - })) - } - - $(document.body).append(form) - form.submit() - } - - // Internal: Abort an XmlHttpRequest if it hasn't been completed, - // also removing its event handlers. - function abortXHR(xhr) { - if(xhr && xhr.readyState < 4) { - xhr.onreadystatechange = $.noop - xhr.abort() - } - } - - // Internal: Generate unique id for state object. - // - // Use a timestamp instead of a counter since ids should still be - // unique across page loads. - // - // Returns Number. - function uniqueId() { - return(new Date).getTime() - } - - function cloneContents(container) { - var cloned = container.clone() - // Unmark script tags as already being eval'd so they can get executed again - // when restored from cache. HAXX: Uses jQuery internal method. - cloned.find('script').each(function() { - if(!this.src) jQuery._data(this, 'globalEval', false) - }) - return [container.selector, cloned.contents()] - } - - // Internal: Strip internal query params from parsed URL. - // - // Returns sanitized url.href String. - function stripInternalParams(url) { - url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '') - return url.href.replace(/\?($|#)/, '$1') - } - - // Internal: Parse URL components and returns a Locationish object. - // - // url - String URL - // - // Returns HTMLAnchorElement that acts like Location. - function parseURL(url) { - var a = document.createElement('a') - a.href = url - return a - } - - // Internal: Return the `href` component of given URL object with the hash - // portion removed. - // - // location - Location or HTMLAnchorElement - // - // Returns String - function stripHash(location) { - return location.href.replace(/#.*/, '') - } - - // Internal: Build options Object for arguments. - // - // For convenience the first parameter can be either the container or - // the options object. - // - // Examples - // - // optionsFor('#container') - // // => {container: '#container'} - // - // optionsFor('#container', {push: true}) - // // => {container: '#container', push: true} - // - // optionsFor({container: '#container', push: true}) - // // => {container: '#container', push: true} - // - // Returns options Object. - function optionsFor(container, options) { - // Both container and options - if(container && options) - options.container = container - - // First argument is options Object - else if($.isPlainObject(container)) - options = container - - // Only container - else - options = { - container: container - } - - // Find and validate container - if(options.container) - options.container = findContainerFor(options.container) - - return options - } - - // Internal: Find container element for a variety of inputs. - // - // Because we can't persist elements using the history API, we must be - // able to find a String selector that will consistently find the Element. - // - // container - A selector String, jQuery object, or DOM Element. - // - // Returns a jQuery object whose context is `document` and has a selector. - function findContainerFor(container) { - container = $(container) - - if(!container.length) { - throw "no pjax container for " + container.selector - } else if(container.selector !== '' && container.context === document) { - return container - } else if(container.attr('id')) { - return $('#' + container.attr('id')) - } else { - throw "cant get selector for pjax container!" - } - } - - // Internal: Filter and find all elements matching the selector. - // - // Where $.fn.find only matches descendants, findAll will test all the - // top level elements in the jQuery object as well. - // - // elems - jQuery object of Elements - // selector - String selector to match - // - // Returns a jQuery object. - function findAll(elems, selector) { - return elems.filter(selector).add(elems.find(selector)); - } - - function parseHTML(html) { - return $.parseHTML(html, document, true) - } - - // Internal: Extracts container and metadata from response. - // - // 1. Extracts X-PJAX-URL header if set - // 2. Extracts inline tags - // 3. Builds response Element and extracts fragment if set - // - // data - String response data - // xhr - XHR response - // options - pjax options Object - // - // Returns an Object with url, title, and contents keys. - function extractContainer(data, xhr, options) { - var obj = {}, - fullDocument = /<html/i.test(data) - - // Prefer X-PJAX-URL header if it was set, otherwise fallback to - // using the original requested url. - var serverUrl = xhr.getResponseHeader('X-PJAX-URL') - obj.url = serverUrl ? stripInternalParams(parseURL(serverUrl)) : options.requestUrl - - // Attempt to parse response html into elements - if(fullDocument) { - var $head = $(parseHTML(data.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])) - var $body = $(parseHTML(data.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0])) - } else { - var $head = $body = $(parseHTML(data)) - } - - // If response data is empty, return fast - if($body.length === 0) - return obj - - // If there's a <title> tag in the header, use it as - // the page's title. - obj.title = findAll($head, 'title').last().text() - - if(options.fragment) { - // If they specified a fragment, look for it in the response - // and pull it out. - if(options.fragment === 'body') { - var $fragment = $body - } else { - var $fragment = findAll($body, options.fragment).first() - } - - if($fragment.length) { - obj.contents = options.fragment === 'body' ? $fragment : $fragment.contents() - - // If there's no title, look for data-title and title attributes - // on the fragment - if(!obj.title) - obj.title = $fragment.attr('title') || $fragment.data('title') - } - - } else if(!fullDocument) { - obj.contents = $body - } - - // Clean up any <title> tags - if(obj.contents) { - // Remove any parent title elements - obj.contents = obj.contents.not(function() { - return $(this).is('title') - }) - - // Then scrub any titles from their descendants - obj.contents.find('title').remove() - - // Gather all script[src] elements - obj.scripts = findAll(obj.contents, 'script[src]').remove() - obj.contents = obj.contents.not(obj.scripts) - } - - // Trim any whitespace off the title - if(obj.title) obj.title = $.trim(obj.title) - - return obj - } - - // Load an execute scripts using standard script request. - // - // Avoids jQuery's traditional $.getScript which does a XHR request and - // globalEval. - // - // scripts - jQuery object of script Elements - // - // Returns nothing. - function executeScriptTags(scripts) { - if(!scripts) return - - var existingScripts = $('script[src]') - - scripts.each(function() { - var src = this.src - var matchedScripts = existingScripts.filter(function() { - return this.src === src - }) - if(matchedScripts.length) return - - var script = document.createElement('script') - var type = $(this).attr('type') - if(type) script.type = type - script.src = $(this).attr('src') - document.head.appendChild(script) - }) - } - - // Internal: History DOM caching class. - var cacheMapping = {} - var cacheForwardStack = [] - var cacheBackStack = [] - - // Push previous state id and container contents into the history - // cache. Should be called in conjunction with `pushState` to save the - // previous container contents. - // - // id - State ID Number - // value - DOM Element to cache - // - // Returns nothing. - function cachePush(id, value) { - cacheMapping[id] = value - cacheBackStack.push(id) - - // Remove all entries in forward history stack after pushing a new page. - trimCacheStack(cacheForwardStack, 0) - - // Trim back history stack to max cache length. - trimCacheStack(cacheBackStack, pjax.defaults.maxCacheLength) - } - - // Shifts cache from directional history cache. Should be - // called on `popstate` with the previous state id and container - // contents. - // - // direction - "forward" or "back" String - // id - State ID Number - // value - DOM Element to cache - // - // Returns nothing. - function cachePop(direction, id, value) { - var pushStack, popStack - cacheMapping[id] = value - - if(direction === 'forward') { - pushStack = cacheBackStack - popStack = cacheForwardStack - } else { - pushStack = cacheForwardStack - popStack = cacheBackStack - } - - pushStack.push(id) - if(id = popStack.pop()) - delete cacheMapping[id] - - // Trim whichever stack we just pushed to to max cache length. - trimCacheStack(pushStack, pjax.defaults.maxCacheLength) - } - - // Trim a cache stack (either cacheBackStack or cacheForwardStack) to be no - // longer than the specified length, deleting cached DOM elements as necessary. - // - // stack - Array of state IDs - // length - Maximum length to trim to - // - // Returns nothing. - function trimCacheStack(stack, length) { - while(stack.length > length) - delete cacheMapping[stack.shift()] - } - - // Public: Find version identifier for the initial page load. - // - // Returns String version or undefined. - function findVersion() { - return $('meta').filter(function() { - var name = $(this).attr('http-equiv') - return name && name.toUpperCase() === 'X-PJAX-VERSION' - }).attr('content') - } - - // Install pjax functions on $.pjax to enable pushState behavior. - // - // Does nothing if already enabled. - // - // Examples - // - // $.pjax.enable() - // - // Returns nothing. - function enable() { - $.fn.pjax = fnPjax - $.pjax = pjax - $.pjax.enable = $.noop - $.pjax.disable = disable - $.pjax.click = handleClick - $.pjax.submit = handleSubmit - $.pjax.reload = pjaxReload - $.pjax.defaults = { - timeout: 650, - push: true, - replace: false, - type: 'GET', - dataType: 'html', - scrollTo: 0, - maxCacheLength: 20, - version: findVersion - } - $(window).on('popstate.pjax', onPjaxPopstate) - } - - // Disable pushState behavior. - // - // This is the case when a browser doesn't support pushState. It is - // sometimes useful to disable pushState for debugging on a modern - // browser. - // - // Examples - // - // $.pjax.disable() - // - // Returns nothing. - function disable() { - $.fn.pjax = function() { - return this - } - $.pjax = fallbackPjax - $.pjax.enable = enable - $.pjax.disable = $.noop - $.pjax.click = $.noop - $.pjax.submit = $.noop - $.pjax.reload = function() { - window.location.reload() - } - - $(window).off('popstate.pjax', onPjaxPopstate) - } - - // Add the state property to jQuery's event object so we can use it in - // $(window).bind('popstate') - if($.inArray('state', $.event.props) < 0) - $.event.props.push('state') - - // Is pjax supported by this browser? - $.support.pjax = - window.history && window.history.pushState && window.history.replaceState && - // pushState isn't reliable on iOS until 5. - !navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/) - - $.support.pjax ? enable() : disable() - - })(jQuery); - //输出接口 - exports('pjax', null); -}); \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/mch_info/edit.ftl b/xxpay-mgr/src/main/resources/templates/mch_info/edit.ftl deleted file mode 100755 index e65d1c01be7e394769b35e2e82fb608a7caa9543..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/mch_info/edit.ftl +++ /dev/null @@ -1,47 +0,0 @@ -<div style="margin: 15px;"> - <form class="layui-form"> - <#if (item.mchId!"") != ""> - <div class="layui-form-item"> - <label class="layui-form-label">商户ID</label> - <div class="layui-input-block"> - <input type="text" name="mchId" placeholder="请输入商户ID" autocomplete="off" class="layui-input" readonly="readonly" value="${item.mchId?if_exists }"> - </div> - </div> - </#if> - <div class="layui-form-item"> - <label class="layui-form-label">商户名称</label> - <div class="layui-input-block"> - <input type="text" name="name" lay-verify="required" placeholder="请输入商户名称" autocomplete="off" class="layui-input" value="${item.name?if_exists }"> - </div> - </div> - <div class="layui-form-item"> - <label class="layui-form-label">商户类型</label> - <div class="layui-input-block"> - <select name="type" lay-verify="required"> - <option value=""></option> - <option value="1" <#if (item.type!"") == "1">selected="selected"</#if>>平台账户</option> - <option value="2" <#if (item.type!"") == "2">selected="selected"</#if>>私有账户</option> - </select> - </div> - </div> - <div class="layui-form-item"> - <label class="layui-form-label">是否启用</label> - <div class="layui-input-block"> - <input type="checkbox" name="state" lay-skin="switch" <#if (item.state!1) == 1>checked="checked"</#if> > - </div> - </div> - <div class="layui-form-item layui-form-text"> - <label class="layui-form-label">请求私钥</label> - <div class="layui-input-block"> - <textarea name="reqKey" placeholder="请输入商户请求私钥" lay-verify="required" class="layui-textarea">${item.reqKey?if_exists }</textarea> - </div> - </div> - <div class="layui-form-item layui-form-text"> - <label class="layui-form-label">响应私钥</label> - <div class="layui-input-block"> - <textarea name="resKey" placeholder="请输入商户响应私钥" lay-verify="required" class="layui-textarea">${item.resKey?if_exists }</textarea> - </div> - </div> - <button lay-filter="edit" lay-submit style="display: none;"></button> - </form> -</div> \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/mch_info/list.ftl b/xxpay-mgr/src/main/resources/templates/mch_info/list.ftl deleted file mode 100755 index b5b9a38faf87b7a059442e5404da9f8628dbad89..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/mch_info/list.ftl +++ /dev/null @@ -1,293 +0,0 @@ -<!DOCTYPE html> -<html> - - <head> - <meta charset="UTF-8"> - <title>商户配置 - - - - - - - -
                  -
                  - -
                  -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - -
                  - 商户列表 -
                  - - - - - - - - - - - - - - -
                  商户ID商户名称商户类型状态创建时间操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/mch_info/view.ftl b/xxpay-mgr/src/main/resources/templates/mch_info/view.ftl deleted file mode 100755 index 94d71c964ae2624c5fc1797c2298128c7bcb86fc..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/mch_info/view.ftl +++ /dev/null @@ -1,62 +0,0 @@ -
                  - -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.type = "1"> - - <#elseif item.type = "2"> - - <#else> - -
                  -
                  -
                  - -
                  - <#if item.state = 1> - - <#else> - - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - - -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/mch_notify/list.ftl b/xxpay-mgr/src/main/resources/templates/mch_notify/list.ftl deleted file mode 100755 index 4bfaddce9ed8df4a10c7d90a0b570715b6fd4bc2..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/mch_notify/list.ftl +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - 商户通知 - - - - - - - -
                  - -
                  -
                  -
                  -
                  - -
                  - -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - -
                  - 通知列表 -
                  - - - - - - - - - - - - - - - -
                  订单号商户ID订单类型通知次数状态最后通知操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/mch_notify/view.ftl b/xxpay-mgr/src/main/resources/templates/mch_notify/view.ftl deleted file mode 100755 index f0f1faad40c67d6071d77f2bcd7a52542e341719..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/mch_notify/view.ftl +++ /dev/null @@ -1,86 +0,0 @@ -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.status = 1> - - <#elseif item.status = 2> - - <#elseif item.status = 3> - - <#else> - -
                  -
                  -
                  - -
                  - <#if item.status = 1> - - <#elseif item.status = 2> - - <#elseif item.status = 3> - - <#else> - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - - -
                  -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/pay_channel/edit.ftl b/xxpay-mgr/src/main/resources/templates/pay_channel/edit.ftl deleted file mode 100755 index bc4b6c261b70df590ec9f9f88b83bd5af496bb8d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/pay_channel/edit.ftl +++ /dev/null @@ -1,64 +0,0 @@ -
                  -
                  - <#if item.id?exists> - - -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - checked="checked" > -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - -
                  -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/pay_channel/list.ftl b/xxpay-mgr/src/main/resources/templates/pay_channel/list.ftl deleted file mode 100755 index 885ef31b5114802e76dd4214d0cdaf3487dbfbd5..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/pay_channel/list.ftl +++ /dev/null @@ -1,287 +0,0 @@ - - - - - - 支付渠道 - - - - - - - -
                  -
                  - -
                  -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  -
                  - 渠道列表 -
                  - - - - - - - - - - - - - - - - -
                  渠道ID商户ID渠道名称渠道商户ID状态备注创建时间操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/pay_channel/view.ftl b/xxpay-mgr/src/main/resources/templates/pay_channel/view.ftl deleted file mode 100755 index 3615781678c2abaffc0daa4e250e10148a64cf8b..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/pay_channel/view.ftl +++ /dev/null @@ -1,63 +0,0 @@ -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.state = 1> - - <#else> - - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - -
                  -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/pay_order/list.ftl b/xxpay-mgr/src/main/resources/templates/pay_order/list.ftl deleted file mode 100755 index 96a2ed27676c36b87adbc8ac98d362bdafdecb6d..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/pay_order/list.ftl +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - 支付订单 - - - - - - - -
                  - -
                  -
                  -
                  -
                  - -
                  - -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - -
                  - 订单列表 -
                  - - - - - - - - - - - - - - - -
                  支付单号商户ID渠道ID金额(元)状态创建时间操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/pay_order/view.ftl b/xxpay-mgr/src/main/resources/templates/pay_order/view.ftl deleted file mode 100755 index 6bb03c82b3e3102b7de0e9c73cda7959ddf87730..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/pay_order/view.ftl +++ /dev/null @@ -1,135 +0,0 @@ -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.status = 0> - - <#elseif item.status = 1> - - <#elseif item.status = 2> - - <#elseif item.status = 3> - - <#else> - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - - -
                  -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/refund_order/list.ftl b/xxpay-mgr/src/main/resources/templates/refund_order/list.ftl deleted file mode 100755 index a8931862647dd36a0ad0246eaf1420d4e57bb775..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/refund_order/list.ftl +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - 退款订单 - - - - - - - -
                  - -
                  -
                  -
                  -
                  - -
                  - -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - -
                  - 订单列表 -
                  - - - - - - - - - - - - - - - - -
                  退款单号商户ID渠道ID金额(元)状态退款结果创建时间操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/refund_order/view.ftl b/xxpay-mgr/src/main/resources/templates/refund_order/view.ftl deleted file mode 100755 index 6c548a575785b54014a3cdda7db3d6449fc7c21f..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/refund_order/view.ftl +++ /dev/null @@ -1,158 +0,0 @@ -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.status = 0> - - <#elseif item.status = 1> - - <#elseif item.status = 2> - - <#elseif item.status = 3> - - <#elseif item.status = 4> - - <#else> - -
                  -
                  -
                  - -
                  - <#if item.result = 0> - - <#elseif item.result = 1> - - <#elseif item.result = 2> - - <#elseif item.result = 3> - - <#else> - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - - -
                  -
                  \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/trans_order/list.ftl b/xxpay-mgr/src/main/resources/templates/trans_order/list.ftl deleted file mode 100755 index 6aa69cb4082207292f19205bd0e408ffd7ed0103..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/trans_order/list.ftl +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - 转账订单 - - - - - - - -
                  - -
                  -
                  -
                  -
                  - -
                  - -
                  - -
                  - -
                  - -
                  - -
                  -
                  - -
                  -
                  -
                  -
                  - -
                  - 订单列表 -
                  - - - - - - - - - - - - - - - - -
                  转账单号商户ID渠道ID金额(元)状态转账结果创建时间操作
                  -
                  -
                  -
                  -
                  -
                  -
                  -
                  - - - - - - - \ No newline at end of file diff --git a/xxpay-mgr/src/main/resources/templates/trans_order/view.ftl b/xxpay-mgr/src/main/resources/templates/trans_order/view.ftl deleted file mode 100755 index cca4254b2984cf6478616d3bbe4229124e42010f..0000000000000000000000000000000000000000 --- a/xxpay-mgr/src/main/resources/templates/trans_order/view.ftl +++ /dev/null @@ -1,152 +0,0 @@ -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - <#if item.status = 0> - - <#elseif item.status = 1> - - <#elseif item.status = 2> - - <#elseif item.status = 3> - - <#elseif item.status = 4> - - <#else> - -
                  -
                  -
                  - -
                  - <#if item.result = 0> - - <#elseif item.result = 1> - - <#elseif item.result = 2> - - <#elseif item.result = 3> - - <#else> - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  -
                  - -
                  - -
                  -
                  - - -
                  -
                  \ No newline at end of file diff --git a/xxpay-shop/pom.xml b/xxpay-shop/pom.xml deleted file mode 100644 index 752f950c2912e48bcbdbdd67d23a2e43701a00c1..0000000000000000000000000000000000000000 --- a/xxpay-shop/pom.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-shop - 1.0.0 - jar - xxpay-shop - xxpay-shop - - - UTF-8 - 1.8 - 5.1.34 - 3.4.1 - 1.3.0 - 1.3.2 - 1.2.54 - - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - - org.xxpay - xxpay-common - 1.0.0 - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-freemarker - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - mysql - mysql-connector-java - ${mysql.connector.java.version} - - - org.mybatis - mybatis - ${mybatis.version} - - - org.mybatis - mybatis-spring - ${mybatis.spring.version} - - - org.mybatis.generator - mybatis-generator-core - ${mybatis.generator.version} - - - - com.alibaba - druid - 1.0.26 - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - - com.github.pagehelper - pagehelper - 4.1.6 - - - com.alibaba - fastjson - ${fastjson.version} - - - - - - - src/main/resources - - **/*.* - - - - src/main/resources - - **/*.properties - **/*.xml - - true - - - - - org.mybatis.generator - mybatis-generator-maven-plugin - ${mybatis.generator.version} - - - org.xxpay - xxpay-shop - 1.0.0 - - - - true - true - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - - - \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/XxPayShopApplication.java b/xxpay-shop/src/main/java/org/xxpay/shop/XxPayShopApplication.java deleted file mode 100755 index 4c91da3b19d7709656329c6db3f4ad664d494620..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/XxPayShopApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.xxpay.shop; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.support.SpringBootServletInitializer; - -@SpringBootApplication -public class XxPayShopApplication extends SpringBootServletInitializer { - - public static void main(String[] args) { - SpringApplication.run(XxPayShopApplication.class, args); - } - - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - application.listeners(); - return application.sources(applicationClass); - } - - private static Class applicationClass = XxPayShopApplication.class; - -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/controller/GoodsOrderController.java b/xxpay-shop/src/main/java/org/xxpay/shop/controller/GoodsOrderController.java deleted file mode 100644 index 2e01821d875d7e7b36d8a402cae16b7b5db825e7..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/controller/GoodsOrderController.java +++ /dev/null @@ -1,493 +0,0 @@ -package org.xxpay.shop.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.*; -import org.xxpay.shop.dao.model.GoodsOrder; -import org.xxpay.shop.service.GoodsOrderService; -import org.xxpay.shop.util.Constant; -import org.xxpay.shop.util.OAuth2RequestParamHelper; -import org.xxpay.shop.util.vx.WxApi; -import org.xxpay.shop.util.vx.WxApiClient; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.atomic.AtomicLong; - -@Controller -@RequestMapping("/goods") -public class GoodsOrderController { - - private final static MyLog _log = MyLog.getLog(GoodsOrderController.class); - - @Autowired - private GoodsOrderService goodsOrderService; - - static final String mchId = "20001223"; - // 加签key - static final String reqKey = "M86l522AV6q613Ii4W6u8K48uW8vM1N6bFgyv769220MdYe9u37N4y7rI5mQ"; - // 验签key - static final String resKey = "Hpcl522AV6q613KIi46u6g6XuW8vM1N8bFgyv769770MdYe9u37M4y7rIpl8"; - //static final String baseUrl = "http://api.xxpay.org/api"; - static final String baseUrl = "http://127.0.0.1:3020/api"; - //static final String notifyUrl = "http://shop.xxpay.org/goods/payNotify"; - static final String notifyUrl = "http://127.0.0.1:8081/goods/payNotify"; - private AtomicLong seq = new AtomicLong(0L); - private final static String QR_PAY_URL = "http://shop.xxpay.org/goods/qrPay.html"; - static final String AppID = "wx077cb62e341f8a5c"; - static final String AppSecret = "e663ea068f3e4f952f143de1432a35c2"; - private final static String GetOpenIdURL = "http://shop.xxpay.org/goods/getOpenId"; - private final static String GetOpenIdURL2 = "http://shop.xxpay.org/goods/getOpenId2"; - - - @RequestMapping(value = "/buy/{goodsId}", method = RequestMethod.GET) - @ResponseBody - public String buy(@PathVariable("goodsId") String goodsId) { - if(!"G_0001".equals(goodsId)) { - return "fail"; - } - String goodsOrderId = String.format("%s%s%06d", "G", DateUtil.getSeqString(), (int) seq.getAndIncrement() % 1000000); - GoodsOrder goodsOrder = new GoodsOrder(); - goodsOrder.setGoodsOrderId(goodsOrderId); - goodsOrder.setGoodsId(goodsId); - goodsOrder.setGoodsName("XXPAY捐助商品G_0001"); - goodsOrder.setAmount(1l); - goodsOrder.setUserId("xxpay_000001"); - goodsOrder.setStatus(Constant.GOODS_ORDER_STATUS_INIT); - int result = goodsOrderService.addGoodsOrder(goodsOrder); - _log.info("插入商品订单,返回:{}", result); - return result+""; - } - - @RequestMapping(value = "/pay/{goodsOrderId}", method = RequestMethod.GET) - @ResponseBody - public String pay(@PathVariable("goodsOrderId") String goodsOrderId) { - GoodsOrder goodsOrder = goodsOrderService.getGoodsOrder(goodsOrderId); - if(goodsOrder == null) return "fail"; - int status = goodsOrder.getStatus(); - if(status != Constant.GOODS_ORDER_STATUS_INIT) { - return "fail_001"; - } - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", goodsOrderId); // 商户订单号 - paramMap.put("channelId", "ALIPAY_WAP"); // 支付渠道ID, WX_NATIVE,ALIPAY_WAP - paramMap.put("amount", goodsOrder.getAmount()); // 支付金额,单位分 - paramMap.put("currency", "cny"); // 币种, cny-人民币 - paramMap.put("clientIp", "114.112.124.236"); // 用户地址,IP或手机号 - paramMap.put("device", "WEB"); // 设备 - paramMap.put("subject", goodsOrder.getGoodsName()); - paramMap.put("body", goodsOrder.getGoodsName()); - paramMap.put("notifyUrl", notifyUrl); // 回调URL - paramMap.put("param1", ""); // 扩展参数1 - paramMap.put("param2", ""); // 扩展参数2 - paramMap.put("extra", "{\"productId\":\"120989823\",\"openId\":\"o2RvowBf7sOVJf8kJksUEMceaDqo\"}"); // 附加参数 - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心下单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/create_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心下单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode"))) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, resKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心下单验签成功========="); - }else { - System.err.println("=========支付中心下单验签失败========="); - return null; - } - } - String payOrderId = retMap.get("payOrderId").toString(); - - goodsOrder = new GoodsOrder(); - goodsOrder.setGoodsOrderId(goodsOrderId); - goodsOrder.setPayOrderId(payOrderId); - goodsOrder.setChannelId("ALIPAY_WAP"); - int ret = goodsOrderService.update(goodsOrder); - _log.info("修改商品订单,返回:{}", ret); - return result+""; - } - - private Map createPayOrder(GoodsOrder goodsOrder, Map params) { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", goodsOrder.getGoodsOrderId()); // 商户订单号 - paramMap.put("channelId", params.get("channelId")); // 支付渠道ID, WX_NATIVE,ALIPAY_WAP - paramMap.put("amount", goodsOrder.getAmount()); // 支付金额,单位分 - paramMap.put("currency", "cny"); // 币种, cny-人民币 - paramMap.put("clientIp", "114.112.124.236"); // 用户地址,IP或手机号 - paramMap.put("device", "WEB"); // 设备 - paramMap.put("subject", goodsOrder.getGoodsName()); - paramMap.put("body", goodsOrder.getGoodsName()); - paramMap.put("notifyUrl", notifyUrl); // 回调URL - paramMap.put("param1", ""); // 扩展参数1 - paramMap.put("param2", ""); // 扩展参数2 - - JSONObject extra = new JSONObject(); - extra.put("openId", params.get("openId")); - paramMap.put("extra", extra.toJSONString()); // 附加参数 - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心下单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/create_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心下单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode"))) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, resKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心下单验签成功========="); - }else { - System.err.println("=========支付中心下单验签失败========="); - return null; - } - } - return retMap; - } - - @RequestMapping("/openQrPay.html") - public String openQrPay(ModelMap model) { - return "openQrPay"; - } - - @RequestMapping("/qrPay.html") - public String qrPay(ModelMap model, HttpServletRequest request, Long amount) { - String logPrefix = "【二维码扫码支付】"; - String view = "qrPay"; - _log.info("====== 开始接收二维码扫码支付请求 ======"); - String ua = request.getHeader("User-Agent"); - String goodsId = "G_0001"; - _log.info("{}接收参数:goodsId={},amount={},ua={}", logPrefix, goodsId, amount, ua); - String client = "alipay"; - String channelId = "ALIPAY_WAP"; - if(StringUtils.isBlank(ua)) { - String errorMessage = "User-Agent为空!"; - _log.info("{}信息:{}", logPrefix, errorMessage); - model.put("result", "failed"); - model.put("resMsg", errorMessage); - return view; - }else { - if(ua.contains("Alipay")) { - client = "alipay"; - channelId = "ALIPAY_WAP"; - }else if(ua.contains("MicroMessenger")) { - client = "wx"; - channelId = "WX_JSAPI"; - } - } - if(client == null) { - String errorMessage = "请用微信或支付宝扫码"; - _log.info("{}信息:{}", logPrefix, errorMessage); - model.put("result", "failed"); - model.put("resMsg", errorMessage); - return view; - } - // 先插入订单数据 - GoodsOrder goodsOrder = null; - Map orderMap = null; - if ("alipay".equals(client)) { - _log.info("{}{}扫码下单", logPrefix, "支付宝"); - Map params = new HashMap<>(); - params.put("channelId", channelId); - // 下单 - goodsOrder = createGoodsOrder(goodsId, amount); - orderMap = createPayOrder(goodsOrder, params); - }else if("wx".equals(client)){ - _log.info("{}{}扫码", logPrefix, "微信"); - // 判断是否拿到openid,如果没有则去获取 - String openId = request.getParameter("openId"); - if (StringUtils.isNotBlank(openId)) { - _log.info("{}openId:{}", logPrefix, openId); - Map params = new HashMap<>(); - params.put("channelId", channelId); - params.put("openId", openId); - goodsOrder = createGoodsOrder(goodsId, amount); - // 下单 - orderMap = createPayOrder(goodsOrder, params); - }else { - String redirectUrl = QR_PAY_URL + "?amount=" + amount; - String url = GetOpenIdURL2 + "?redirectUrl=" + redirectUrl; - _log.info("跳转URL={}", url); - return "redirect:" + url; - } - } - model.put("goodsOrder", goodsOrder); - model.put("amount", AmountUtil.convertCent2Dollar(goodsOrder.getAmount()+"")); - if(orderMap != null) { - model.put("orderMap", orderMap); - String payOrderId = orderMap.get("payOrderId"); - GoodsOrder go = new GoodsOrder(); - go.setGoodsOrderId(goodsOrder.getGoodsOrderId()); - go.setPayOrderId(payOrderId); - go.setChannelId(channelId); - int ret = goodsOrderService.update(go); - _log.info("修改商品订单,返回:{}", ret); - } - model.put("client", client); - return view; - } - - GoodsOrder createGoodsOrder(String goodsId, Long amount) { - // 先插入订单数据 - String goodsOrderId = String.format("%s%s%06d", "G", DateUtil.getSeqString(), (int) seq.getAndIncrement() % 1000000); - GoodsOrder goodsOrder = new GoodsOrder(); - goodsOrder.setGoodsOrderId(goodsOrderId); - goodsOrder.setGoodsId(goodsId); - goodsOrder.setGoodsName("XXPAY捐助商品G_0001"); - goodsOrder.setAmount(amount); - goodsOrder.setUserId("xxpay_000001"); - goodsOrder.setStatus(Constant.GOODS_ORDER_STATUS_INIT); - int result = goodsOrderService.addGoodsOrder(goodsOrder); - _log.info("插入商品订单,返回:{}", result); - return goodsOrder; - } - - /** - * 获取code - * @return - */ - @RequestMapping("/getOpenId") - public void getOpenId(HttpServletRequest request, HttpServletResponse response) throws IOException { - _log.info("进入获取用户openID页面"); - String redirectUrl = request.getParameter("redirectUrl"); - String code = request.getParameter("code"); - String openId = ""; - if(!StringUtils.isBlank(code)){//如果request中包括code,则是微信回调 - try { - openId = WxApiClient.getOAuthOpenId(AppID, AppSecret, code); - _log.info("调用微信返回openId={}", openId); - } catch (Exception e) { - _log.error(e, "调用微信查询openId异常"); - } - if(redirectUrl.indexOf("?") > 0) { - redirectUrl += "&openId=" + openId; - }else { - redirectUrl += "?openId=" + openId; - } - response.sendRedirect(redirectUrl); - }else{//oauth获取code - String redirectUrl4Vx = GetOpenIdURL + "?redirectUrl=" + redirectUrl; - String state = OAuth2RequestParamHelper.prepareState(request); - String url = WxApi.getOAuthCodeUrl(AppID, redirectUrl4Vx, "snsapi_base", state); - _log.info("跳转URL={}", url); - response.sendRedirect(url); - } - } - - /** - * 获取code - * @return - */ - @RequestMapping("/getOpenId2") - public void getOpenId2(HttpServletRequest request, HttpServletResponse response) throws IOException { - _log.info("进入获取用户openID页面"); - String redirectUrl = request.getParameter("redirectUrl"); - String code = request.getParameter("code"); - String openId = ""; - if(!StringUtils.isBlank(code)){//如果request中包括code,则是微信回调 - try { - openId = WxApiClient.getOAuthOpenId(AppID, AppSecret, code); - _log.info("调用微信返回openId={}", openId); - } catch (Exception e) { - _log.error(e, "调用微信查询openId异常"); - } - if(redirectUrl.indexOf("?") > 0) { - redirectUrl += "&openId=" + openId; - }else { - redirectUrl += "?openId=" + openId; - } - response.sendRedirect(redirectUrl); - }else{//oauth获取code - //http://www.abc.com/xxx/get-weixin-code.html?appid=XXXX&scope=snsapi_base&state=hello-world&redirect_uri=http%3A%2F%2Fwww.xyz.com%2Fhello-world.html - String redirectUrl4Vx = GetOpenIdURL2 + "?redirectUrl=" + redirectUrl; - String url = String.format("http://www.xiaoshuding.com/get-weixin-code.html?appid=%s&scope=snsapi_base&state=hello-world&redirect_uri=%s", AppID, WxApi.urlEnodeUTF8(redirectUrl4Vx)); - _log.info("跳转URL={}", url); - response.sendRedirect(url); - } - } - - /** - * 接收支付中心通知 - * @param request - * @param response - * @throws Exception - */ - @RequestMapping("/payNotify") - public void payNotify(HttpServletRequest request, HttpServletResponse response) throws Exception { - _log.info("====== 开始处理支付中心通知 ======"); - Map paramMap = request2payResponseMap(request, new String[]{ - "payOrderId","mchId","mchOrderNo","channelId","amount","currency","status", "clientIp", - "device", "subject", "channelOrderNo", "param1", - "param2","paySuccTime","backType","sign" - }); - _log.info("支付中心通知请求参数,paramMap={}", paramMap); - if (!verifyPayResponse(paramMap)) { - String errorMessage = "verify request param failed."; - _log.warn(errorMessage); - outResult(response, "fail"); - return; - } - String payOrderId = (String) paramMap.get("payOrderId"); - String mchOrderNo = (String) paramMap.get("mchOrderNo"); - String resStr; - try { - GoodsOrder goodsOrder = goodsOrderService.getGoodsOrder(mchOrderNo); - if(goodsOrder != null && goodsOrder.getStatus() == Constant.GOODS_ORDER_STATUS_COMPLETE) { - outResult(response, "success"); - return; - } - // 执行业务逻辑 - int ret = goodsOrderService.updateStatus4Success(mchOrderNo); - // ret返回结果 - // 等于1表示处理成功,返回支付中心success - // 其他值,返回支付中心fail,让稍后再通知 - if(ret == 1) { - ret = goodsOrderService.updateStatus4Complete(mchOrderNo); - if(ret == 1) { - resStr = "success"; - }else { - resStr = "fail"; - } - }else { - resStr = "fail"; - } - }catch (Exception e) { - resStr = "fail"; - _log.error(e, "执行业务异常,payOrderId=%s.mchOrderNo=%s", payOrderId, mchOrderNo); - } - _log.info("响应支付中心通知结果:{},payOrderId={},mchOrderNo={}", resStr, payOrderId, mchOrderNo); - outResult(response, resStr); - _log.info("====== 支付中心通知处理完成 ======"); - } - - @RequestMapping("/notify_test") - public void notifyTest(HttpServletRequest request, HttpServletResponse response) throws Exception { - outResult(response, "success"); - } - - @RequestMapping("/toAliPay.html") - @ResponseBody - public String toAliPay(HttpServletRequest request, Long amount, String channelId) { - String logPrefix = "【支付宝支付】"; - _log.info("====== 开始接收支付宝支付请求 ======"); - String goodsId = "G_0001"; - _log.info("{}接收参数:goodsId={},amount={},channelId={}", logPrefix, goodsId, amount, channelId); - // 先插入订单数据 - Map params = new HashMap<>(); - params.put("channelId", channelId); - // 下单 - GoodsOrder goodsOrder = createGoodsOrder(goodsId, amount); - Map orderMap = createPayOrder(goodsOrder, params); - if(orderMap != null && "success".equalsIgnoreCase(orderMap.get("resCode"))) { - String payOrderId = orderMap.get("payOrderId"); - GoodsOrder go = new GoodsOrder(); - go.setGoodsOrderId(goodsOrder.getGoodsOrderId()); - go.setPayOrderId(payOrderId); - go.setChannelId(channelId); - int ret = goodsOrderService.update(go); - _log.info("修改商品订单,返回:{}", ret); - } - if(PayConstant.PAY_CHANNEL_ALIPAY_MOBILE.equalsIgnoreCase(channelId)) return orderMap.get("payParams"); - return orderMap.get("payUrl"); - } - - void outResult(HttpServletResponse response, String content) { - response.setContentType("text/html"); - PrintWriter pw; - try { - pw = response.getWriter(); - pw.print(content); - _log.error("response xxpay complete."); - } catch (IOException e) { - _log.error(e, "response xxpay write exception."); - } - } - - public Map request2payResponseMap(HttpServletRequest request, String[] paramArray) { - Map responseMap = new HashMap<>(); - for (int i = 0;i < paramArray.length; i++) { - String key = paramArray[i]; - String v = request.getParameter(key); - if (v != null) { - responseMap.put(key, v); - } - } - return responseMap; - } - - public boolean verifyPayResponse(Map map) { - String mchId = (String) map.get("mchId"); - String payOrderId = (String) map.get("payOrderId"); - String mchOrderNo = (String) map.get("mchOrderNo"); - String amount = (String) map.get("amount"); - String sign = (String) map.get("sign"); - - if (StringUtils.isEmpty(mchId)) { - _log.warn("Params error. mchId={}", mchId); - return false; - } - if (StringUtils.isEmpty(payOrderId)) { - _log.warn("Params error. payOrderId={}", payOrderId); - return false; - } - if (StringUtils.isEmpty(amount) || !NumberUtils.isNumber(amount)) { - _log.warn("Params error. amount={}", amount); - return false; - } - if (StringUtils.isEmpty(sign)) { - _log.warn("Params error. sign={}", sign); - return false; - } - - // 验证签名 - if (!verifySign(map)) { - _log.warn("verify params sign failed. payOrderId={}", payOrderId); - return false; - } - - // 根据payOrderId查询业务订单,验证订单是否存在 - GoodsOrder goodsOrder = goodsOrderService.getGoodsOrder(mchOrderNo); - if(goodsOrder == null) { - _log.warn("业务订单不存在,payOrderId={},mchOrderNo={}", payOrderId, mchOrderNo); - return false; - } - // 核对金额 - if(goodsOrder.getAmount() != Long.parseLong(amount)) { - _log.warn("支付金额不一致,dbPayPrice={},payPrice={}", goodsOrder.getAmount(), amount); - return false; - } - return true; - } - - public boolean verifySign(Map map) { - String mchId = (String) map.get("mchId"); - if(!this.mchId.equals(mchId)) return false; - String localSign = PayDigestUtil.getSign(map, resKey, "sign"); - String sign = (String) map.get("sign"); - return localSign.equalsIgnoreCase(sign); - } - -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/mapper/GoodsOrderMapper.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/mapper/GoodsOrderMapper.java deleted file mode 100644 index e0304916522dde22f25ad6fb61efd0d754f985b5..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/mapper/GoodsOrderMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.xxpay.shop.dao.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import org.xxpay.shop.dao.model.GoodsOrder; -import org.xxpay.shop.dao.model.GoodsOrderExample; - -public interface GoodsOrderMapper { - int countByExample(GoodsOrderExample example); - - int deleteByExample(GoodsOrderExample example); - - int deleteByPrimaryKey(String goodsOrderId); - - int insert(GoodsOrder record); - - int insertSelective(GoodsOrder record); - - List selectByExample(GoodsOrderExample example); - - GoodsOrder selectByPrimaryKey(String goodsOrderId); - - int updateByExampleSelective(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example); - - int updateByExample(@Param("record") GoodsOrder record, @Param("example") GoodsOrderExample example); - - int updateByPrimaryKeySelective(GoodsOrder record); - - int updateByPrimaryKey(GoodsOrder record); -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrder.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrder.java deleted file mode 100644 index 2da937bc54000731b082dd21b530d6d700c21398..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrder.java +++ /dev/null @@ -1,237 +0,0 @@ -package org.xxpay.shop.dao.model; - -import java.io.Serializable; -import java.util.Date; - -public class GoodsOrder implements Serializable { - /** - * 商品订单ID - * - * @mbggenerated - */ - private String goodsOrderId; - - /** - * 商品ID - * - * @mbggenerated - */ - private String goodsId; - - /** - * 商品名称 - * - * @mbggenerated - */ - private String goodsName; - - /** - * 金额,单位分 - * - * @mbggenerated - */ - private Long amount; - - /** - * 用户ID - * - * @mbggenerated - */ - private String userId; - - /** - * 订单状态,订单生成(0),支付成功(1),处理完成(2),处理失败(-1) - * - * @mbggenerated - */ - private Byte status; - - /** - * 支付订单号 - * - * @mbggenerated - */ - private String payOrderId; - - /** - * 渠道ID - * - * @mbggenerated - */ - private String channelId; - - /** - * 支付渠道用户ID(微信openID或支付宝账号等第三方支付账号) - * - * @mbggenerated - */ - private String channelUserId; - - /** - * 创建时间 - * - * @mbggenerated - */ - private Date createTime; - - /** - * 更新时间 - * - * @mbggenerated - */ - private Date updateTime; - - private static final long serialVersionUID = 1L; - - public String getGoodsOrderId() { - return goodsOrderId; - } - - public void setGoodsOrderId(String goodsOrderId) { - this.goodsOrderId = goodsOrderId; - } - - public String getGoodsId() { - return goodsId; - } - - public void setGoodsId(String goodsId) { - this.goodsId = goodsId; - } - - public String getGoodsName() { - return goodsName; - } - - public void setGoodsName(String goodsName) { - this.goodsName = goodsName; - } - - public Long getAmount() { - return amount; - } - - public void setAmount(Long amount) { - this.amount = amount; - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public Byte getStatus() { - return status; - } - - public void setStatus(Byte status) { - this.status = status; - } - - public String getPayOrderId() { - return payOrderId; - } - - public void setPayOrderId(String payOrderId) { - this.payOrderId = payOrderId; - } - - public String getChannelId() { - return channelId; - } - - public void setChannelId(String channelId) { - this.channelId = channelId; - } - - public String getChannelUserId() { - return channelUserId; - } - - public void setChannelUserId(String channelUserId) { - this.channelUserId = channelUserId; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", goodsOrderId=").append(goodsOrderId); - sb.append(", goodsId=").append(goodsId); - sb.append(", goodsName=").append(goodsName); - sb.append(", amount=").append(amount); - sb.append(", userId=").append(userId); - sb.append(", status=").append(status); - sb.append(", payOrderId=").append(payOrderId); - sb.append(", channelId=").append(channelId); - sb.append(", channelUserId=").append(channelUserId); - sb.append(", createTime=").append(createTime); - sb.append(", updateTime=").append(updateTime); - sb.append("]"); - return sb.toString(); - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - GoodsOrder other = (GoodsOrder) that; - return (this.getGoodsOrderId() == null ? other.getGoodsOrderId() == null : this.getGoodsOrderId().equals(other.getGoodsOrderId())) - && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) - && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName())) - && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) - && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) - && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) - && (this.getPayOrderId() == null ? other.getPayOrderId() == null : this.getPayOrderId().equals(other.getPayOrderId())) - && (this.getChannelId() == null ? other.getChannelId() == null : this.getChannelId().equals(other.getChannelId())) - && (this.getChannelUserId() == null ? other.getChannelUserId() == null : this.getChannelUserId().equals(other.getChannelUserId())) - && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) - && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getGoodsOrderId() == null) ? 0 : getGoodsOrderId().hashCode()); - result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); - result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode()); - result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); - result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); - result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); - result = prime * result + ((getPayOrderId() == null) ? 0 : getPayOrderId().hashCode()); - result = prime * result + ((getChannelId() == null) ? 0 : getChannelId().hashCode()); - result = prime * result + ((getChannelUserId() == null) ? 0 : getChannelUserId().hashCode()); - result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); - result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); - return result; - } -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrderExample.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrderExample.java deleted file mode 100644 index eca2fe5eb7d30ddea431af71cc7919eb80fa58f3..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/model/GoodsOrderExample.java +++ /dev/null @@ -1,954 +0,0 @@ -package org.xxpay.shop.dao.model; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class GoodsOrderExample implements Serializable { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - private static final long serialVersionUID = 1L; - - private Integer limit; - - private Integer offset; - - public GoodsOrderExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - - public Integer getLimit() { - return limit; - } - - public void setOffset(Integer offset) { - this.offset = offset; - } - - public Integer getOffset() { - return offset; - } - - protected abstract static class GeneratedCriteria implements Serializable { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andGoodsOrderIdIsNull() { - addCriterion("GoodsOrderId is null"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdIsNotNull() { - addCriterion("GoodsOrderId is not null"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdEqualTo(String value) { - addCriterion("GoodsOrderId =", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdNotEqualTo(String value) { - addCriterion("GoodsOrderId <>", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdGreaterThan(String value) { - addCriterion("GoodsOrderId >", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("GoodsOrderId >=", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdLessThan(String value) { - addCriterion("GoodsOrderId <", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdLessThanOrEqualTo(String value) { - addCriterion("GoodsOrderId <=", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdLike(String value) { - addCriterion("GoodsOrderId like", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdNotLike(String value) { - addCriterion("GoodsOrderId not like", value, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdIn(List values) { - addCriterion("GoodsOrderId in", values, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdNotIn(List values) { - addCriterion("GoodsOrderId not in", values, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdBetween(String value1, String value2) { - addCriterion("GoodsOrderId between", value1, value2, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsOrderIdNotBetween(String value1, String value2) { - addCriterion("GoodsOrderId not between", value1, value2, "goodsOrderId"); - return (Criteria) this; - } - - public Criteria andGoodsIdIsNull() { - addCriterion("GoodsId is null"); - return (Criteria) this; - } - - public Criteria andGoodsIdIsNotNull() { - addCriterion("GoodsId is not null"); - return (Criteria) this; - } - - public Criteria andGoodsIdEqualTo(String value) { - addCriterion("GoodsId =", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdNotEqualTo(String value) { - addCriterion("GoodsId <>", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdGreaterThan(String value) { - addCriterion("GoodsId >", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdGreaterThanOrEqualTo(String value) { - addCriterion("GoodsId >=", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdLessThan(String value) { - addCriterion("GoodsId <", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdLessThanOrEqualTo(String value) { - addCriterion("GoodsId <=", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdLike(String value) { - addCriterion("GoodsId like", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdNotLike(String value) { - addCriterion("GoodsId not like", value, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdIn(List values) { - addCriterion("GoodsId in", values, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdNotIn(List values) { - addCriterion("GoodsId not in", values, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdBetween(String value1, String value2) { - addCriterion("GoodsId between", value1, value2, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsIdNotBetween(String value1, String value2) { - addCriterion("GoodsId not between", value1, value2, "goodsId"); - return (Criteria) this; - } - - public Criteria andGoodsNameIsNull() { - addCriterion("GoodsName is null"); - return (Criteria) this; - } - - public Criteria andGoodsNameIsNotNull() { - addCriterion("GoodsName is not null"); - return (Criteria) this; - } - - public Criteria andGoodsNameEqualTo(String value) { - addCriterion("GoodsName =", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameNotEqualTo(String value) { - addCriterion("GoodsName <>", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameGreaterThan(String value) { - addCriterion("GoodsName >", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameGreaterThanOrEqualTo(String value) { - addCriterion("GoodsName >=", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameLessThan(String value) { - addCriterion("GoodsName <", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameLessThanOrEqualTo(String value) { - addCriterion("GoodsName <=", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameLike(String value) { - addCriterion("GoodsName like", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameNotLike(String value) { - addCriterion("GoodsName not like", value, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameIn(List values) { - addCriterion("GoodsName in", values, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameNotIn(List values) { - addCriterion("GoodsName not in", values, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameBetween(String value1, String value2) { - addCriterion("GoodsName between", value1, value2, "goodsName"); - return (Criteria) this; - } - - public Criteria andGoodsNameNotBetween(String value1, String value2) { - addCriterion("GoodsName not between", value1, value2, "goodsName"); - return (Criteria) this; - } - - public Criteria andAmountIsNull() { - addCriterion("Amount is null"); - return (Criteria) this; - } - - public Criteria andAmountIsNotNull() { - addCriterion("Amount is not null"); - return (Criteria) this; - } - - public Criteria andAmountEqualTo(Long value) { - addCriterion("Amount =", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotEqualTo(Long value) { - addCriterion("Amount <>", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThan(Long value) { - addCriterion("Amount >", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountGreaterThanOrEqualTo(Long value) { - addCriterion("Amount >=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThan(Long value) { - addCriterion("Amount <", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountLessThanOrEqualTo(Long value) { - addCriterion("Amount <=", value, "amount"); - return (Criteria) this; - } - - public Criteria andAmountIn(List values) { - addCriterion("Amount in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotIn(List values) { - addCriterion("Amount not in", values, "amount"); - return (Criteria) this; - } - - public Criteria andAmountBetween(Long value1, Long value2) { - addCriterion("Amount between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andAmountNotBetween(Long value1, Long value2) { - addCriterion("Amount not between", value1, value2, "amount"); - return (Criteria) this; - } - - public Criteria andUserIdIsNull() { - addCriterion("UserId is null"); - return (Criteria) this; - } - - public Criteria andUserIdIsNotNull() { - addCriterion("UserId is not null"); - return (Criteria) this; - } - - public Criteria andUserIdEqualTo(String value) { - addCriterion("UserId =", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotEqualTo(String value) { - addCriterion("UserId <>", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThan(String value) { - addCriterion("UserId >", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdGreaterThanOrEqualTo(String value) { - addCriterion("UserId >=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThan(String value) { - addCriterion("UserId <", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLessThanOrEqualTo(String value) { - addCriterion("UserId <=", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdLike(String value) { - addCriterion("UserId like", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotLike(String value) { - addCriterion("UserId not like", value, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdIn(List values) { - addCriterion("UserId in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotIn(List values) { - addCriterion("UserId not in", values, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdBetween(String value1, String value2) { - addCriterion("UserId between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andUserIdNotBetween(String value1, String value2) { - addCriterion("UserId not between", value1, value2, "userId"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("Status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("Status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Byte value) { - addCriterion("Status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Byte value) { - addCriterion("Status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Byte value) { - addCriterion("Status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Byte value) { - addCriterion("Status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Byte value) { - addCriterion("Status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Byte value) { - addCriterion("Status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("Status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("Status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Byte value1, Byte value2) { - addCriterion("Status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Byte value1, Byte value2) { - addCriterion("Status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNull() { - addCriterion("PayOrderId is null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIsNotNull() { - addCriterion("PayOrderId is not null"); - return (Criteria) this; - } - - public Criteria andPayOrderIdEqualTo(String value) { - addCriterion("PayOrderId =", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotEqualTo(String value) { - addCriterion("PayOrderId <>", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThan(String value) { - addCriterion("PayOrderId >", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdGreaterThanOrEqualTo(String value) { - addCriterion("PayOrderId >=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThan(String value) { - addCriterion("PayOrderId <", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLessThanOrEqualTo(String value) { - addCriterion("PayOrderId <=", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdLike(String value) { - addCriterion("PayOrderId like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotLike(String value) { - addCriterion("PayOrderId not like", value, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdIn(List values) { - addCriterion("PayOrderId in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotIn(List values) { - addCriterion("PayOrderId not in", values, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdBetween(String value1, String value2) { - addCriterion("PayOrderId between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andPayOrderIdNotBetween(String value1, String value2) { - addCriterion("PayOrderId not between", value1, value2, "payOrderId"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNull() { - addCriterion("ChannelId is null"); - return (Criteria) this; - } - - public Criteria andChannelIdIsNotNull() { - addCriterion("ChannelId is not null"); - return (Criteria) this; - } - - public Criteria andChannelIdEqualTo(String value) { - addCriterion("ChannelId =", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotEqualTo(String value) { - addCriterion("ChannelId <>", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThan(String value) { - addCriterion("ChannelId >", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelId >=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThan(String value) { - addCriterion("ChannelId <", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLessThanOrEqualTo(String value) { - addCriterion("ChannelId <=", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdLike(String value) { - addCriterion("ChannelId like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotLike(String value) { - addCriterion("ChannelId not like", value, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdIn(List values) { - addCriterion("ChannelId in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotIn(List values) { - addCriterion("ChannelId not in", values, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdBetween(String value1, String value2) { - addCriterion("ChannelId between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelIdNotBetween(String value1, String value2) { - addCriterion("ChannelId not between", value1, value2, "channelId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdIsNull() { - addCriterion("ChannelUserId is null"); - return (Criteria) this; - } - - public Criteria andChannelUserIdIsNotNull() { - addCriterion("ChannelUserId is not null"); - return (Criteria) this; - } - - public Criteria andChannelUserIdEqualTo(String value) { - addCriterion("ChannelUserId =", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdNotEqualTo(String value) { - addCriterion("ChannelUserId <>", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdGreaterThan(String value) { - addCriterion("ChannelUserId >", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdGreaterThanOrEqualTo(String value) { - addCriterion("ChannelUserId >=", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdLessThan(String value) { - addCriterion("ChannelUserId <", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdLessThanOrEqualTo(String value) { - addCriterion("ChannelUserId <=", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdLike(String value) { - addCriterion("ChannelUserId like", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdNotLike(String value) { - addCriterion("ChannelUserId not like", value, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdIn(List values) { - addCriterion("ChannelUserId in", values, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdNotIn(List values) { - addCriterion("ChannelUserId not in", values, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdBetween(String value1, String value2) { - addCriterion("ChannelUserId between", value1, value2, "channelUserId"); - return (Criteria) this; - } - - public Criteria andChannelUserIdNotBetween(String value1, String value2) { - addCriterion("ChannelUserId not between", value1, value2, "channelUserId"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNull() { - addCriterion("CreateTime is null"); - return (Criteria) this; - } - - public Criteria andCreateTimeIsNotNull() { - addCriterion("CreateTime is not null"); - return (Criteria) this; - } - - public Criteria andCreateTimeEqualTo(Date value) { - addCriterion("CreateTime =", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotEqualTo(Date value) { - addCriterion("CreateTime <>", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThan(Date value) { - addCriterion("CreateTime >", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("CreateTime >=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThan(Date value) { - addCriterion("CreateTime <", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeLessThanOrEqualTo(Date value) { - addCriterion("CreateTime <=", value, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeIn(List values) { - addCriterion("CreateTime in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotIn(List values) { - addCriterion("CreateTime not in", values, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeBetween(Date value1, Date value2) { - addCriterion("CreateTime between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andCreateTimeNotBetween(Date value1, Date value2) { - addCriterion("CreateTime not between", value1, value2, "createTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNull() { - addCriterion("UpdateTime is null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIsNotNull() { - addCriterion("UpdateTime is not null"); - return (Criteria) this; - } - - public Criteria andUpdateTimeEqualTo(Date value) { - addCriterion("UpdateTime =", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotEqualTo(Date value) { - addCriterion("UpdateTime <>", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThan(Date value) { - addCriterion("UpdateTime >", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { - addCriterion("UpdateTime >=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThan(Date value) { - addCriterion("UpdateTime <", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { - addCriterion("UpdateTime <=", value, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeIn(List values) { - addCriterion("UpdateTime in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotIn(List values) { - addCriterion("UpdateTime not in", values, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeBetween(Date value1, Date value2) { - addCriterion("UpdateTime between", value1, value2, "updateTime"); - return (Criteria) this; - } - - public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { - addCriterion("UpdateTime not between", value1, value2, "updateTime"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria implements Serializable { - - protected Criteria() { - super(); - } - } - - public static class Criterion implements Serializable { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/CommentGenerator.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/CommentGenerator.java deleted file mode 100644 index 64abf369bf187020950031c46a958bb5373815b5..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/CommentGenerator.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.xxpay.shop.dao.plugin; - -import org.mybatis.generator.api.IntrospectedColumn; -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.dom.java.Field; -import org.mybatis.generator.internal.DefaultCommentGenerator; - -/** - * 生成model中,字段增加注释 - */ -public class CommentGenerator extends DefaultCommentGenerator { - - @Override - public void addFieldComment(Field field, IntrospectedTable introspectedTable, IntrospectedColumn introspectedColumn) { - super.addFieldComment(field, introspectedTable, introspectedColumn); - if (introspectedColumn.getRemarks() != null && !introspectedColumn.getRemarks().equals("")) { - field.addJavaDocLine("/**"); - field.addJavaDocLine(" * " + introspectedColumn.getRemarks()); - addJavadocTag(field, false); - field.addJavaDocLine(" */"); - } - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/DruidDataSourceConfig.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/DruidDataSourceConfig.java deleted file mode 100644 index ea37abd89b6514f510c69ce755a5daf6e386a7da..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/DruidDataSourceConfig.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.xxpay.shop.dao.plugin; - -import com.alibaba.druid.pool.DruidDataSource; -import com.github.pagehelper.PageHelper; -import org.apache.ibatis.plugin.Interceptor; -import org.apache.ibatis.session.SqlSessionFactory; -import org.mybatis.spring.SqlSessionFactoryBean; -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.bind.RelaxedPropertyResolver; -import org.springframework.context.ApplicationContextException; -import org.springframework.context.EnvironmentAware; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.jdbc.datasource.DataSourceTransactionManager; -import org.springframework.transaction.PlatformTransactionManager; -import org.springframework.transaction.annotation.EnableTransactionManagement; -import org.springframework.util.StringUtils; - -import java.sql.SQLException; -import java.util.Arrays; -import java.util.Properties; - -/** - * - */ -@Configuration -@EnableTransactionManagement -@MapperScan(value = "org.xxpay.shop.dao.mapper") -public class DruidDataSourceConfig implements EnvironmentAware { - - private Environment environment; - private RelaxedPropertyResolver propertyResolver; - - public void setEnvironment(Environment environment) { - this.environment = environment; - this.propertyResolver = new RelaxedPropertyResolver(environment, "spring.datasource."); - } - - //注册dataSource - @Bean(initMethod = "init", destroyMethod = "close") - public DruidDataSource dataSource() throws SQLException { - if (StringUtils.isEmpty(propertyResolver.getProperty("url"))) { - System.out.println("Your database connection pool configuration is incorrect!" - + " Please check your Spring profile, current profiles are:" - + Arrays.toString(environment.getActiveProfiles())); - throw new ApplicationContextException( - "Database connection pool is not configured correctly"); - } - DruidDataSource druidDataSource = new DruidDataSource(); - druidDataSource.setDriverClassName(propertyResolver.getProperty("driver-class-name")); - druidDataSource.setUrl(propertyResolver.getProperty("url")); - druidDataSource.setUsername(propertyResolver.getProperty("username")); - druidDataSource.setPassword(propertyResolver.getProperty("password")); - druidDataSource.setInitialSize(Integer.parseInt(propertyResolver.getProperty("initialSize"))); - druidDataSource.setMinIdle(Integer.parseInt(propertyResolver.getProperty("minIdle"))); - druidDataSource.setMaxActive(Integer.parseInt(propertyResolver.getProperty("maxActive"))); - druidDataSource.setMaxWait(Integer.parseInt(propertyResolver.getProperty("maxWait"))); - druidDataSource.setTimeBetweenEvictionRunsMillis(Long.parseLong(propertyResolver.getProperty("timeBetweenEvictionRunsMillis"))); - druidDataSource.setMinEvictableIdleTimeMillis(Long.parseLong(propertyResolver.getProperty("minEvictableIdleTimeMillis"))); - druidDataSource.setValidationQuery(propertyResolver.getProperty("validationQuery")); - druidDataSource.setTestWhileIdle(Boolean.parseBoolean(propertyResolver.getProperty("testWhileIdle"))); - druidDataSource.setTestOnBorrow(Boolean.parseBoolean(propertyResolver.getProperty("testOnBorrow"))); - druidDataSource.setTestOnReturn(Boolean.parseBoolean(propertyResolver.getProperty("testOnReturn"))); - druidDataSource.setPoolPreparedStatements(Boolean.parseBoolean(propertyResolver.getProperty("poolPreparedStatements"))); - druidDataSource.setMaxPoolPreparedStatementPerConnectionSize(Integer.parseInt(propertyResolver.getProperty("maxPoolPreparedStatementPerConnectionSize"))); - druidDataSource.setFilters(propertyResolver.getProperty("filters")); - return druidDataSource; - } - - @Bean - public SqlSessionFactory sqlSessionFactory() throws Exception { - SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); - sqlSessionFactoryBean.setDataSource(dataSource()); - //mybatis分页 - PageHelper pageHelper = new PageHelper(); - Properties props = new Properties(); - props.setProperty("dialect", "mysql"); - props.setProperty("reasonable", "true"); - props.setProperty("supportMethodsArguments", "true"); - props.setProperty("returnPageInfo", "check"); - props.setProperty("params", "count=countSql"); - pageHelper.setProperties(props); //添加插件 - sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper}); - PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver(); - sqlSessionFactoryBean.setMapperLocations(resolver.getResources("classpath:org/xxpay/shop/dao/mapper/*.xml")); - return sqlSessionFactoryBean.getObject(); - } - - @Bean - public PlatformTransactionManager transactionManager() throws SQLException { - return new DataSourceTransactionManager(dataSource()); - } -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/PaginationPlugin.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/PaginationPlugin.java deleted file mode 100644 index 2d44212b224bb0410497185ec636abfe3f8f5687..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/PaginationPlugin.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.xxpay.shop.dao.plugin; - -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.PluginAdapter; -import org.mybatis.generator.api.dom.java.*; -import org.mybatis.generator.api.dom.xml.Attribute; -import org.mybatis.generator.api.dom.xml.TextElement; -import org.mybatis.generator.api.dom.xml.XmlElement; - -import java.util.List; - -/** - * MySQL分页插件 - */ -public class PaginationPlugin extends PluginAdapter { - - @Override - public boolean validate(List list) { - return true; - } - - /** - * 为每个Example类添加limit和offset属性和set、get方法 - */ - @Override - public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - - PrimitiveTypeWrapper integerWrapper = FullyQualifiedJavaType.getIntInstance().getPrimitiveTypeWrapper(); - - Field limit = new Field(); - limit.setName("limit"); - limit.setVisibility(JavaVisibility.PRIVATE); - limit.setType(integerWrapper); - topLevelClass.addField(limit); - - Method setLimit = new Method(); - setLimit.setVisibility(JavaVisibility.PUBLIC); - setLimit.setName("setLimit"); - setLimit.addParameter(new Parameter(integerWrapper, "limit")); - setLimit.addBodyLine("this.limit = limit;"); - topLevelClass.addMethod(setLimit); - - Method getLimit = new Method(); - getLimit.setVisibility(JavaVisibility.PUBLIC); - getLimit.setReturnType(integerWrapper); - getLimit.setName("getLimit"); - getLimit.addBodyLine("return limit;"); - topLevelClass.addMethod(getLimit); - - Field offset = new Field(); - offset.setName("offset"); - offset.setVisibility(JavaVisibility.PRIVATE); - offset.setType(integerWrapper); - topLevelClass.addField(offset); - - Method setOffset = new Method(); - setOffset.setVisibility(JavaVisibility.PUBLIC); - setOffset.setName("setOffset"); - setOffset.addParameter(new Parameter(integerWrapper, "offset")); - setOffset.addBodyLine("this.offset = offset;"); - topLevelClass.addMethod(setOffset); - - Method getOffset = new Method(); - getOffset.setVisibility(JavaVisibility.PUBLIC); - getOffset.setReturnType(integerWrapper); - getOffset.setName("getOffset"); - getOffset.addBodyLine("return offset;"); - topLevelClass.addMethod(getOffset); - - return true; - } - - /** - * 为Mapper.xml的selectByExample添加limit,offset - */ - @Override - public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, - IntrospectedTable introspectedTable) { - - XmlElement ifLimitNotNullElement = new XmlElement("if"); - ifLimitNotNullElement.addAttribute(new Attribute("test", "limit != null")); - - XmlElement ifOffsetNotNullElement = new XmlElement("if"); - ifOffsetNotNullElement.addAttribute(new Attribute("test", "offset != null")); - ifOffsetNotNullElement.addElement(new TextElement("limit ${offset}, ${limit}")); - ifLimitNotNullElement.addElement(ifOffsetNotNullElement); - - XmlElement ifOffsetNullElement = new XmlElement("if"); - ifOffsetNullElement.addAttribute(new Attribute("test", "offset == null")); - ifOffsetNullElement.addElement(new TextElement("limit ${limit}")); - ifLimitNotNullElement.addElement(ifOffsetNullElement); - - element.addElement(ifLimitNotNullElement); - - return true; - } - - - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/SerializablePlugin.java b/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/SerializablePlugin.java deleted file mode 100644 index 8806631e0b8d79b98335c5080e205a5b451d640d..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/dao/plugin/SerializablePlugin.java +++ /dev/null @@ -1,95 +0,0 @@ -package org.xxpay.shop.dao.plugin; - -import org.mybatis.generator.api.IntrospectedTable; -import org.mybatis.generator.api.PluginAdapter; -import org.mybatis.generator.api.dom.java.*; - -import java.util.List; -import java.util.Properties; - -/** - * Example类和model类实现序列化插件 - * Created by shuzheng on 2017/1/1. - */ -public class SerializablePlugin extends PluginAdapter { - private FullyQualifiedJavaType serializable = new FullyQualifiedJavaType("java.io.Serializable"); - private FullyQualifiedJavaType gwtSerializable = new FullyQualifiedJavaType("com.google.gwt.user.client.rpc.IsSerializable"); - private boolean addGWTInterface; - private boolean suppressJavaInterface; - - public SerializablePlugin() { - } - - public boolean validate(List warnings) { - return true; - } - - public void setProperties(Properties properties) { - super.setProperties(properties); - this.addGWTInterface = Boolean.valueOf(properties.getProperty("addGWTInterface")).booleanValue(); - this.suppressJavaInterface = Boolean.valueOf(properties.getProperty("suppressJavaInterface")).booleanValue(); - } - - public boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - public boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - public boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - this.makeSerializable(topLevelClass, introspectedTable); - return true; - } - - protected void makeSerializable(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) { - if(this.addGWTInterface) { - topLevelClass.addImportedType(this.gwtSerializable); - topLevelClass.addSuperInterface(this.gwtSerializable); - } - - if(!this.suppressJavaInterface) { - topLevelClass.addImportedType(this.serializable); - topLevelClass.addSuperInterface(this.serializable); - Field field = new Field(); - field.setFinal(true); - field.setInitializationString("1L"); - field.setName("serialVersionUID"); - field.setStatic(true); - field.setType(new FullyQualifiedJavaType("long")); - field.setVisibility(JavaVisibility.PRIVATE); - this.context.getCommentGenerator().addFieldComment(field, introspectedTable); - topLevelClass.addField(field); - } - - } - - /** - * 添加给Example类序列化的方法 - * @param topLevelClass - * @param introspectedTable - * @return - */ - @Override - public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable){ - makeSerializable(topLevelClass, introspectedTable); - - for (InnerClass innerClass : topLevelClass.getInnerClasses()) { - if ("GeneratedCriteria".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - if ("Criteria".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - if ("Criterion".equals(innerClass.getType().getShortName())) { - innerClass.addSuperInterface(serializable); - } - } - - return true; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/demo/MgrDemo.java b/xxpay-shop/src/main/java/org/xxpay/shop/demo/MgrDemo.java deleted file mode 100644 index fdc4046efccbbdd37e9fada7e39e538f10f98c08..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/demo/MgrDemo.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.shop.demo; - -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.util.XXPayUtil; - -/** - * Created by dingzhiwei on 16/5/5. - */ -public class MgrDemo { - - // 商户ID - - static final String baseUrl = "http://localhost:3000"; - - public static void main(String[] args) { - //addMchInfo(); - addPayChannel(); - } - - // 添加商户 - static void addMchInfo() { - JSONObject params = new JSONObject(); - params.put("mchId", "20001226"); - params.put("name", "百年树丁"); - params.put("type", "1"); - params.put("reqKey", "298332323231231313"); - params.put("resKey", "883435353534543534"); - String reqData = "params=" + params.toJSONString(); - System.out.println("请求支付中心添加商户接口,请求数据:" + reqData); - String url = baseUrl + "/mch/add?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心添加商户接口,响应数据:" + result); - - } - - // 添加渠道 - static void addPayChannel() { - JSONObject params = new JSONObject(); - params.put("channelId", "WX_NATIVE");//WX_NATIVE - params.put("channelName", "WX");//WX - params.put("channelMchId", "1481721182"); - params.put("mchId", "20001223"); - params.put("param","{\"mchId\":\"1481721182\", \"appId\":\"wx077cb62e341f8a5c\", \"key\":\"***\", \"certLocalPath\":\"wx/1481721182_cert.p12\", \"certPassword\":\"1481721182\", \"desc\":\"xxpay_shop-native(xxpay扫码支付)\"}"); - params.put("remark", "微信扫码支付"); - String reqData = "params=" + params.toJSONString(); - System.out.println("请求支付中心添加渠道接口,请求数据:" + reqData); - String url = baseUrl + "/channel/add?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心添加渠道接口,响应数据:" + result); - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/demo/PayOrderDemo.java b/xxpay-shop/src/main/java/org/xxpay/shop/demo/PayOrderDemo.java deleted file mode 100644 index caad36090efc4bd8218a3d739fe2bd08a947d718..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/demo/PayOrderDemo.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.shop.demo; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.Map; - -/** - * Created by dingzhiwei on 16/5/5. - */ -public class PayOrderDemo { - - // 商户ID - static final String mchId = "20001223";//20001223,20001245 - // 加签key - static final String reqKey = "M86l522AV6q613Ii4W6u8K48uW8vM1N6bFgyv769220MdYe9u37N4y7rI5mQ"; - // 验签key - static final String repKey = "Hpcl522AV6q613KIi46u6g6XuW8vM1N8bFgyv769770MdYe9u37M4y7rIpl8"; - - //static final String baseUrl = "http://api.xxpay.org/api"; - static final String baseUrl = "http://localhost:3020/api"; - //static final String notifyUrl = "http://www.baidu.com"; // 本地环境测试,可到ngrok.cc网站注册 - static final String notifyUrl = "http://shop.xxpay.org/goods/payNotify"; - - public static void main(String[] args) { - payOrderTest(); - //quryPayOrderTest("1494774484058", "P0020170910211048000001"); - } - - // 统一下单 - static String payOrderTest() { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", System.currentTimeMillis()); // 商户订单号 - // 支付渠道ID, WX_NATIVE(微信扫码),WX_JSAPI(微信公众号或微信小程序),WX_APP(微信APP),WX_MWEB(微信H5),ALIPAY_WAP(支付宝手机支付),ALIPAY_PC(支付宝网站支付),ALIPAY_MOBILE(支付宝移动支付) - paramMap.put("channelId", "WX_NATIVE"); - paramMap.put("amount", 1); // 支付金额,单位分 - paramMap.put("currency", "cny"); // 币种, cny-人民币 - paramMap.put("clientIp", "211.94.116.218"); // 用户地址,微信H5支付时要真实的 - paramMap.put("device", "WEB"); // 设备 - paramMap.put("subject", "XXPAY支付测试"); - paramMap.put("body", "XXPAY支付测试"); - paramMap.put("notifyUrl", notifyUrl); // 回调URL - paramMap.put("param1", ""); // 扩展参数1 - paramMap.put("param2", ""); // 扩展参数2 - paramMap.put("extra", "{\n" + - " \"productId\": \"120989823\",\n" + - " \"openId\": \"oIkQuwhPgPUgl-TvQ48_UUpZUwMs\",\n" + - " \"sceneInfo\": {\n" + - " \"h5_info\": {\n" + - " \"type\": \"Wap\",\n" + - " \"wap_url\": \"http://shop.xxpay.org\",\n" + - " \"wap_name\": \"xxpay充值\"\n" + - " }\n" + - " }\n" + - " ,\"discountable_amount\":\"0.00\"," + //面对面支付扫码参数:可打折金额 可打折金额+不可打折金额=总金额 - " \"undiscountable_amount\":\"0.00\"," + //面对面支付扫码参数:不可打折金额 - "}"); // 附加参数 - - //{"h5_info": {"type":"Wap","wap_url": "https://pay.qq.com","wap_name": "腾讯充值"}} - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心下单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/create_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心下单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心下单验签成功========="); - }else { - System.err.println("=========支付中心下单验签失败========="); - return null; - } - } - return retMap.get("payOrderId")+""; - } - - static String quryPayOrderTest(String mchOrderNo, String payOrderId) { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", mchOrderNo); // 商户订单号 - paramMap.put("payOrderId", payOrderId); // 支付订单号 - paramMap.put("executeNotify", "true"); // 是否执行回调,true或false,如果为true当订单状态为支付成功(2)时,支付中心会再次回调一次业务系统 - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心查单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/query_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心查单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心查单验签成功========="); - }else { - System.err.println("=========支付中心查单验签失败========="); - return null; - } - } - return retMap.get("payOrderId")+""; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/demo/RefundOrderDemo.java b/xxpay-shop/src/main/java/org/xxpay/shop/demo/RefundOrderDemo.java deleted file mode 100644 index 64857d33afd7482e80254f785b6c4586cf0ac862..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/demo/RefundOrderDemo.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.xxpay.shop.demo; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.Map; - -/** - * Created by dingzhiwei on 17/10/30. - */ -public class RefundOrderDemo { - - // 商户ID - static final String mchId = "20001223";//20001223,20001245 - // 加签key - static final String reqKey = "M86l522AV6q613Ii4W6u8K48uW8vM1N6bFgyv769220MdYe9u37N4y7rI5mQ"; - // 验签key - static final String repKey = "Hpcl522AV6q613KIi46u6g6XuW8vM1N8bFgyv769770MdYe9u37M4y7rIpl8"; - - //static final String baseUrl = "http://api.xxpay.org/api"; - static final String baseUrl = "http://localhost:3020/api"; - static final String notifyUrl = "http://127.0.0.1:8081/goods/notify_test?rt=success"; // 本地环境测试,可到ngrok.cc网站注册 - - public static void main(String[] args) { - refundOrderTest(); - //quryPayOrderTest("1494774484058", "P0020170910211048000001"); - } - - // 退款 - static String refundOrderTest() { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchRefundNo", "REFUND" + System.currentTimeMillis()); // 商户订单号 - // 支付渠道ID, WX_NATIVE(微信扫码),WX_JSAPI(微信公众号或微信小程序),WX_APP(微信APP),WX_MWEB(微信H5),ALIPAY_WAP(支付宝手机支付),ALIPAY_PC(支付宝网站支付),ALIPAY_MOBILE(支付宝移动支付) - paramMap.put("channelId", "ALIPAY_WAP"); - paramMap.put("amount", 1); // 退款金额 - paramMap.put("currency", "cny"); // 币种, cny-人民币 - paramMap.put("clientIp", "211.94.116.218"); // 用户地址,微信H5支付时要真实的 - paramMap.put("device", "WEB"); // 设备 - paramMap.put("subject", "XXPAY支付测试"); - paramMap.put("body", "XXPAY支付测试"); - paramMap.put("notifyUrl", notifyUrl); // 回调URL - paramMap.put("param1", ""); // 扩展参数1 - paramMap.put("param2", ""); // 扩展参数2 - paramMap.put("channelUser", "jmdhappy@126.com"); // 微信openId:oIkQuwhPgPUgl-TvQ48_UUpZUwMs(丁志伟) - paramMap.put("payOrderId", "P0020171114192121000003"); - - - //{"h5_info": {"type":"Wap","wap_url": "https://pay.qq.com","wap_name": "腾讯充值"}} - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心退款接口,请求数据:" + reqData); - String url = baseUrl + "/refund/create_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心退款接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心退款验签成功========="); - }else { - System.err.println("=========支付中心退款验签失败========="); - return null; - } - } - return retMap.get("transOrderId")+""; - } - - static String quryPayOrderTest(String mchOrderNo, String payOrderId) { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", mchOrderNo); // 商户订单号 - paramMap.put("payOrderId", payOrderId); // 支付订单号 - paramMap.put("executeNotify", "true"); // 是否执行回调,true或false,如果为true当订单状态为支付成功(2)时,支付中心会再次回调一次业务系统 - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心查单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/query_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心查单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心查单验签成功========="); - }else { - System.err.println("=========支付中心查单验签失败========="); - return null; - } - } - return retMap.get("payOrderId")+""; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/demo/TransOrderDemo.java b/xxpay-shop/src/main/java/org/xxpay/shop/demo/TransOrderDemo.java deleted file mode 100644 index e4e401fe3eaba1f8710e74d3f8a568a4733dc827..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/demo/TransOrderDemo.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.xxpay.shop.demo; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.Map; - -/** - * Created by dingzhiwei on 17/10/30. - */ -public class TransOrderDemo { - - // 商户ID - static final String mchId = "20001223";//20001223,20001245 - // 加签key - static final String reqKey = "M86l522AV6q613Ii4W6u8K48uW8vM1N6bFgyv769220MdYe9u37N4y7rI5mQ"; - // 验签key - static final String repKey = "Hpcl522AV6q613KIi46u6g6XuW8vM1N8bFgyv769770MdYe9u37M4y7rIpl8"; - - //static final String baseUrl = "http://api.xxpay.org/api"; - static final String baseUrl = "http://localhost:3020/api"; - static final String notifyUrl = "http://127.0.0.1:8081/goods/notify_test?rt=success"; // 本地环境测试,可到ngrok.cc网站注册 - - public static void main(String[] args) { - transOrderTest(); - //quryPayOrderTest("1494774484058", "P0020170910211048000001"); - } - - // 统一下单 - static String transOrderTest() { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchTransNo", "TRANS" + System.currentTimeMillis()); // 商户订单号 - // 支付渠道ID, WX_NATIVE(微信扫码),WX_JSAPI(微信公众号或微信小程序),WX_APP(微信APP),WX_MWEB(微信H5),ALIPAY_WAP(支付宝手机支付),ALIPAY_PC(支付宝网站支付),ALIPAY_MOBILE(支付宝移动支付) - paramMap.put("channelId", "WX_NATIVE"); - paramMap.put("amount", 600); // 转行金额,单位分 - paramMap.put("currency", "cny"); // 币种, cny-人民币 - paramMap.put("clientIp", "211.94.116.218"); // 用户地址,微信H5支付时要真实的 - paramMap.put("device", "WEB"); // 设备 - paramMap.put("subject", "XXPAY支付测试"); - paramMap.put("body", "XXPAY支付测试"); - paramMap.put("notifyUrl", notifyUrl); // 回调URL - paramMap.put("param1", ""); // 扩展参数1 - paramMap.put("param2", ""); // 扩展参数2 - paramMap.put("channelUser", "oIkQuwhPgPUgl-TvQ48_UUpZUwMs"); // 微信openId(丁志伟):oIkQuwhPgPUgl-TvQ48_UUpZUwMs, 支付宝(丁志伟):jmdhappy@126.com - paramMap.put("remarkInfo", "转账测试"); - - - //{"h5_info": {"type":"Wap","wap_url": "https://pay.qq.com","wap_name": "腾讯充值"}} - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心转账接口,请求数据:" + reqData); - String url = baseUrl + "/trans/create_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心转账接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心转账验签成功========="); - }else { - System.err.println("=========支付中心转账验签失败========="); - return null; - } - } - return retMap.get("transOrderId")+""; - } - - static String quryPayOrderTest(String mchOrderNo, String payOrderId) { - JSONObject paramMap = new JSONObject(); - paramMap.put("mchId", mchId); // 商户ID - paramMap.put("mchOrderNo", mchOrderNo); // 商户订单号 - paramMap.put("payOrderId", payOrderId); // 支付订单号 - paramMap.put("executeNotify", "true"); // 是否执行回调,true或false,如果为true当订单状态为支付成功(2)时,支付中心会再次回调一次业务系统 - - String reqSign = PayDigestUtil.getSign(paramMap, reqKey); - paramMap.put("sign", reqSign); // 签名 - String reqData = "params=" + paramMap.toJSONString(); - System.out.println("请求支付中心查单接口,请求数据:" + reqData); - String url = baseUrl + "/pay/query_order?"; - String result = XXPayUtil.call4Post(url + reqData); - System.out.println("请求支付中心查单接口,响应数据:" + result); - Map retMap = JSON.parseObject(result); - if("SUCCESS".equals(retMap.get("retCode")) && "SUCCESS".equalsIgnoreCase(retMap.get("resCode").toString())) { - // 验签 - String checkSign = PayDigestUtil.getSign(retMap, repKey, "sign", "payParams"); - String retSign = (String) retMap.get("sign"); - if(checkSign.equals(retSign)) { - System.out.println("=========支付中心查单验签成功========="); - }else { - System.err.println("=========支付中心查单验签失败========="); - return null; - } - } - return retMap.get("payOrderId")+""; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/service/GoodsOrderService.java b/xxpay-shop/src/main/java/org/xxpay/shop/service/GoodsOrderService.java deleted file mode 100644 index 7a81e12b366300e4a476285d0ddcd803047f995a..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/service/GoodsOrderService.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.xxpay.shop.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.shop.dao.mapper.GoodsOrderMapper; -import org.xxpay.shop.dao.model.GoodsOrder; -import org.xxpay.shop.dao.model.GoodsOrderExample; -import org.xxpay.shop.util.Constant; - -/** - * Created by dingzhiwei on 17/6/2. - */ -@Component -public class GoodsOrderService { - - @Autowired - private GoodsOrderMapper goodsOrderMapper; - - /* - `Status` tinyint(6) NOT NULL DEFAULT '0' COMMENT '订单状态,订单生成(0),支付成功(1),处理完成(2),处理失败(-1)', - */ - - public int addGoodsOrder(GoodsOrder goodsOrder) { - return goodsOrderMapper.insertSelective(goodsOrder); - } - - public GoodsOrder getGoodsOrder(String goodsOrderId) { - return goodsOrderMapper.selectByPrimaryKey(goodsOrderId); - } - - public int updateStatus4Success(String goodsOrderId) { - GoodsOrder goodsOrder = new GoodsOrder(); - goodsOrder.setStatus(Constant.GOODS_ORDER_STATUS_SUCCESS); - GoodsOrderExample example = new GoodsOrderExample(); - GoodsOrderExample.Criteria criteria = example.createCriteria(); - criteria.andGoodsOrderIdEqualTo(goodsOrderId); - criteria.andStatusEqualTo(Constant.GOODS_ORDER_STATUS_INIT); - return goodsOrderMapper.updateByExampleSelective(goodsOrder, example); - } - - public int updateStatus4Complete(String goodsOrderId) { - GoodsOrder goodsOrder = new GoodsOrder(); - goodsOrder.setStatus(Constant.GOODS_ORDER_STATUS_COMPLETE); - GoodsOrderExample example = new GoodsOrderExample(); - GoodsOrderExample.Criteria criteria = example.createCriteria(); - criteria.andGoodsOrderIdEqualTo(goodsOrderId); - criteria.andStatusEqualTo(Constant.GOODS_ORDER_STATUS_SUCCESS); - return goodsOrderMapper.updateByExampleSelective(goodsOrder, example); - } - - public int updateStatus4Fail(String goodsOrderId) { - GoodsOrder goodsOrder = new GoodsOrder(); - goodsOrder.setStatus(Constant.GOODS_ORDER_STATUS_FAIL); - GoodsOrderExample example = new GoodsOrderExample(); - GoodsOrderExample.Criteria criteria = example.createCriteria(); - criteria.andGoodsOrderIdEqualTo(goodsOrderId); - //criteria.andStatusEqualTo(Constant.GOODS_ORDER_STATUS_SUCCESS); - return goodsOrderMapper.updateByExampleSelective(goodsOrder, example); - } - - public int update(GoodsOrder goodsOrder) { - return goodsOrderMapper.updateByPrimaryKeySelective(goodsOrder); - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/CalendarUtil.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/CalendarUtil.java deleted file mode 100644 index 8f01ebcd5d3b81755d5ee3cd79d529dae1fb5b72..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/CalendarUtil.java +++ /dev/null @@ -1,446 +0,0 @@ -package org.xxpay.shop.util; - -import java.text.ParseException; -import java.util.*; - -/** - * 日期工具类 - * @author Brain - */ -public class CalendarUtil { - - public static final String YEAR = "year"; - public static final String MONTH = "month"; - public static final String MONTH_FIRST_DAY_TIME = "month_first_day_time"; - public static final String MONTH_LAST_DAY_TIME = "month_last_day_time"; - - //获取当前年的前5年数据 - public static List getPre5Years(){ - List years = new ArrayList(); - Calendar calendar = Calendar.getInstance(); - int year = calendar.get(Calendar.YEAR); - for(int i = 0; i < 5; i++){ - years.add((year - i) + ""); - } - return years; - } - - //获取12个月的数据 - public static List get12MonthStr(){ - List months = new ArrayList(); - for(int i = 1 ;i < 13 ;i++){ - months.add(i+""); - } - return months; - } - - //获取当前明天的数据 - public static String getNextDay(String format){ - Calendar calendar = Calendar.getInstance(); - Calendar tmpCalendar = Calendar.getInstance(); - tmpCalendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));//设置本月最大日期 - int maxDate = tmpCalendar.get(Calendar.DATE); - - int month = calendar.get(Calendar.MONTH); - int year = calendar.get(Calendar.YEAR); - int date = calendar.get(Calendar.DATE); - - if(date + 1 > maxDate ){ - if(month + 1 > 11){ - calendar.add(Calendar.YEAR, 1); - calendar.set(Calendar.MONTH, 0); - calendar.set(Calendar.DATE, 1); - }else{ - calendar.set(year, month, date+1); - } - }else{ - calendar.set(year, month, date+1); - } - return DateUtil.getDateText(calendar.getTime(), format); - } - - //获取n天后的日期 - public static Date getNextNDay(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, n); - return start.getTime(); - } - - //获取n天后的日期 00:00:00 - public static Date getNextNDayBegin(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, n); - start.set(Calendar.HOUR_OF_DAY, 0); - start.set(Calendar.MINUTE, 0); - start.set(Calendar.SECOND, 0); - return start.getTime(); - } - - //获取n天后的日期 23:59:59 - public static Date getNextNDayEnd(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, n); - start.set(Calendar.HOUR_OF_DAY, 23); - start.set(Calendar.MINUTE, 59); - start.set(Calendar.SECOND, 59); - return start.getTime(); - } - - //获取n天前的日期 - public static Date getPreNDay(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, -n); - return start.getTime(); - } - - //获取n天前的日期 00:00:00 - public static Date getPreNDayBegin(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, -n); - start.set(Calendar.HOUR_OF_DAY, 0); - start.set(Calendar.MINUTE, 0); - start.set(Calendar.SECOND, 0); - return start.getTime(); - } - - //获取n天前的日期 23:59:59 - public static Date getPreNDayEnd(Date startTime,Integer n){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - start.add(Calendar.DATE, -n); - start.set(Calendar.HOUR_OF_DAY, 23); - start.set(Calendar.MINUTE, 59); - start.set(Calendar.SECOND, 59); - return start.getTime(); - } - - //获取前x天的数据, x < 10; - public static String getPreXDay(int x ,String format){ - Calendar calendar = Calendar.getInstance(); - int month = calendar.get(Calendar.MONTH); - int year = calendar.get(Calendar.YEAR); - int date = calendar.get(Calendar.DATE); - - if(date - x < 0 ){ - if(month - 1 < 0){ - calendar.add(Calendar.YEAR, -1); - calendar.set(Calendar.MONTH, 11); - calendar.set(Calendar.DATE, 31 - (x-date)); - }else{ - calendar.add(Calendar.MONTH, -1); - calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));//设置本月最大日期 - int maxDate = calendar.get(Calendar.DATE); - calendar.set(year, month - 1, maxDate - (x-date)); - } - }else{ - calendar.set(year, month, date - x); - } - return DateUtil.getDateText(calendar.getTime(), format); - } - - //获取当前年 - public static String getYear(){ - Calendar calendar = Calendar.getInstance(); - int year = calendar.get(Calendar.YEAR); - return year+""; - } - - //获取当前月 - public static String getMonth(){ - Calendar calendar = Calendar.getInstance(); - int month = calendar.get(Calendar.MONTH); - month = month + 1; - if(month > 12){ - return "12"; - } - return month+""; - } - - //获取 年-月的 第一天 和 最后一天 时间 - public static Map getMonthFirstEndDayTime(String year,String month){ - Map rst = new HashMap(); - Calendar calendar = Calendar.getInstance(); - int m = Integer.parseInt(month); - m = m - 1; - if(m < 0){ - m = 0; - } - calendar.set(Integer.parseInt(year), m, 1); - String firstDayTime = DateUtil.COMMON.getDateText(calendar.getTime()) +" 00:00:00"; - - calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));//设置本月最大日期 - String lastDayTime = DateUtil.COMMON.getDateText(calendar.getTime()) +" 23:59:59"; - - rst.put(CalendarUtil.MONTH_FIRST_DAY_TIME, firstDayTime); - rst.put(CalendarUtil.MONTH_LAST_DAY_TIME, lastDayTime); - - return rst; - } - - //获取前一个月 - public static Map getPreMonth(){ - Map rst = new HashMap(); - Calendar calendar = Calendar.getInstance(); - calendar.add(Calendar.MONTH, -1); - int year = calendar.get(Calendar.YEAR); - int month = calendar.get(Calendar.MONTH); - month = month + 1; - - rst.put("year", year+""); - if(month > 12){ - rst.put("month", "12"); - }else{ - rst.put("month", month+""); - } - return rst; - } - - //获取前一个月 - public static Map getPreMonth(Integer year,Integer month){ - Map rst = new HashMap(); - if(month == 1){ - rst.put("year", (year-1)+""); - rst.put("month", "12"); - }else{ - rst.put("year", year+""); - rst.put("month", (month-1)+""); - } - return rst; - } - - //获取开始月份和结束月份中间的所有月份,包括开始月份和结束月份 - public static List getBetweenMonths(String startMonth ,String endMonth){ - String[] startArr = startMonth.split("-"); - String[] endArr = endMonth.split("-"); - - Integer startY = Integer.parseInt(startArr[0]); - Integer startM = Integer.parseInt(startArr[1]); - - Integer endY = Integer.parseInt(endArr[0]); - Integer endM = Integer.parseInt(endArr[1]); - - Calendar startCalendar = Calendar.getInstance(); - startCalendar.set(startY, startM - 1, 1, 0, 0); - - Calendar endCalendar = Calendar.getInstance(); - endCalendar.set(endY, endM - 1, 1, 0, 0); - - List months = new ArrayList(); - while(startCalendar.getTimeInMillis() <= endCalendar.getTimeInMillis()){ - months.add(DateUtil.getDateText(startCalendar.getTime(),"yyyy-MM")); - startCalendar.add(Calendar.MONTH, 1); - } - return months; - } - - //获取日期之间的天List formt = "yyyy-MM-dd" - public static List getBetweenDateStr(String startTime,String endTime){ - List dateList = new ArrayList(); - try { - Long startM = DateUtil.COMMON.getTextDate(startTime).getTime(); - Long endM = DateUtil.COMMON.getTextDate(endTime).getTime(); - long result = (endM-startM) / (24 * 60 * 60*1000); - String[] startTimeStr = startTime.split("-"); - Calendar startCalendar = Calendar.getInstance(); - startCalendar.set(Integer.parseInt(startTimeStr[0]), Integer.parseInt(startTimeStr[1]) - 1, Integer.parseInt(startTimeStr[2])); - startCalendar.add(Calendar.DATE,-1); - for(int i = 0; i <= result ; i++){ - startCalendar.add(Calendar.DATE,1); - dateList.add(DateUtil.COMMON.getDateText(startCalendar.getTime())); - } - } catch (ParseException e) { - e.printStackTrace(); - } - return dateList; - } - - public static List getBetweenDateStr(String startTime,String endTime,String format){ - List dateList = new ArrayList(); - try { - Long startM = DateUtil.COMMON.getTextDate(startTime).getTime(); - Long endM = DateUtil.COMMON.getTextDate(endTime).getTime(); - long result = (endM-startM) / (24 * 60 * 60*1000); - String[] startTimeStr = startTime.split("-"); - Calendar startCalendar = Calendar.getInstance(); - startCalendar.set(Integer.parseInt(startTimeStr[0]), Integer.parseInt(startTimeStr[1]) - 1, Integer.parseInt(startTimeStr[2])); - startCalendar.add(Calendar.DATE,-1); - for(int i = 0; i <= result ; i++){ - startCalendar.add(Calendar.DATE,1); - dateList.add(DateUtil.getDateText(startCalendar.getTime(),format)); - } - } catch (ParseException e) { - e.printStackTrace(); - } - return dateList; - } - - //获取日期的前n个月的月份(闭区间) - public static List getPreNMonths(String curMonth ,Integer n){ - String[] curArr = curMonth.split("-"); - Integer curY = Integer.parseInt(curArr[0]); - Integer curM = Integer.parseInt(curArr[1]); - - Calendar curCalendar = Calendar.getInstance(); - curCalendar.set(curY, curM - 1, 1, 0, 0); - - Calendar tmpCalendar = Calendar.getInstance(); - tmpCalendar.set(curY, curM - 1 - n, 1, 0, 0); - - List months = new ArrayList(); - while(tmpCalendar.getTimeInMillis() <= curCalendar.getTimeInMillis()){ - months.add(DateUtil.getDateText(tmpCalendar.getTime(),"yyyy-MM")); - tmpCalendar.add(Calendar.MONTH, 1); - } - return months; - } - - //获取当前天 - public static String getToday(String format){ - Calendar calendar = Calendar.getInstance(); - return DateUtil.getDateText(calendar.getTime(), format); - } - - //获取当前月的第一天 - public static String getFirstDay(String format){ - Calendar calendar = Calendar.getInstance(); - int month = calendar.get(Calendar.MONTH); - int year = calendar.get(Calendar.YEAR); - calendar.set(year, month, 1); - return DateUtil.getDateText(calendar.getTime(), format); - } - - //获取当前月的最后一天 - public static String getLastDay(String format){ - Calendar calendar = Calendar.getInstance(); - calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));//设置本月最大日期 - return DateUtil.getDateText(calendar.getTime(), format); - } - - //获取当前月的第一天 - public static Date getFirstDate(){ - Calendar calendar = Calendar.getInstance(); - int month = calendar.get(Calendar.MONTH); - int year = calendar.get(Calendar.YEAR); - calendar.set(year, month, 1); - return calendar.getTime(); - } - - //获取当前月的最后一天 - public static Date getLastDate(){ - Calendar calendar = Calendar.getInstance(); - calendar.set(Calendar.DATE, calendar.getActualMaximum(Calendar.DATE));//设置本月最大日期 - return calendar.getTime(); - } - - - //日期的天是否一样; - public static boolean isDayEqual(Date date1,Date date2){ - if(date1==null || date2 == null){ - return false; - } - String date1Str = DateUtil.COMPAT.getDateText(date1); - String date2Str = DateUtil.COMPAT.getDateText(date2); - return date1Str.equals(date2Str); - } - - /** - * 时间间距是否为xx; - * 如果在 space 之内返回true;否则返回false - * @param startTime 开始时间 - * @param endTime 结束时间 - * @param space 毫秒 - * @return - */ - public static boolean isTimeSpace(Date startTime,Date endTime,long space){ - if (startTime == null || endTime == null) { - return false; - } - return endTime.getTime() - startTime.getTime() <= space; - } - - /** - * 时间间距是否在 startSpace 和 endSpace 之间 - * @param startTime - * @param endTime - * @param startSpace - * @param endSpace - * @return - */ - public static boolean isTimeBetween(Date startTime,Date endTime,long startSpace,long endSpace){ - return endTime.getTime() - startTime.getTime() <= endSpace && - endTime.getTime() - startTime.getTime() >= startSpace; - } - - public static boolean isTimeBetween(Date time,Date startTime,Date endTime){ - return time.getTime() >= startTime.getTime() && time.getTime() <= endTime.getTime(); - } - - //获取日期之间年的距离 - public static Integer getYearSpace(Date startTime,Date endTime){ - Calendar start = Calendar.getInstance(); - start.setTime(startTime); - Calendar end = Calendar.getInstance(); - end.setTime(endTime); - return end.get(Calendar.YEAR) - start.get(Calendar.YEAR); - } - - //获取日期之间天的距离 - public static Integer getDaySpace(Date startTime,Date endTime){ - return (int)(endTime.getTime() - startTime.getTime())/(24*60*60*1000); - } - - //获取当前日期 毫秒 - public static long getTimeInMillis(){ - Calendar now = Calendar.getInstance(); - return now.getTimeInMillis(); - } - - //获取当前日期 秒 - public static long getTimeInSeconds(){ - return getTimeInMillis()/1000L; - } - - public static void main(String[] args){ - /*String startTime = "2009-12-14"; - String endTime = "2010-1-14"; - List list = getBetweenDateStr(startTime,endTime); - for(String s : list){ - System.out.println(s); - }*/ - /*String nextday = getNextDay("yyyy-MM-dd"); - String xday = getPreXDay(6,"yyyy-MM-dd"); - System.out.println(nextday); - System.out.println(xday); - System.out.println(getFirstDay("yyyy-MM-dd")); - System.out.println(getLastDay("yyyy-MM-dd"));*/ - - try { - Date startTime = DateUtil.COMMON.getTextDate("2015-06-03 00:00:00"); - Date endTime = DateUtil.COMMON_FULL.getTextDate("2015-06-03 23:59:59"); - System.out.println(isTimeBetween(new Date(),startTime,endTime)); - - List month = getPreNMonths("2015-06",11); - for(String s : month){ - System.out.println(s); - } - - String str = DateUtil.COMMON_FULL.getDateText(getPreNDayEnd(new Date(),1)); - System.out.println(str); - - List days = getBetweenDateStr("2015-03-09","2015-06-15","MM/dd"); - for(String s : days){ - System.out.println(s); - } - - } catch (ParseException e) { - e.printStackTrace(); - } - } - -} - diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/Constant.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/Constant.java deleted file mode 100644 index f2bcc8ca014c749861d9b9f4fa790bada8fa8a81..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/Constant.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.xxpay.shop.util; - -/** - * Created by dingzhiwei on 17/6/2. - */ -public class Constant { - - public static final Byte GOODS_ORDER_STATUS_INIT = 0; - public static final Byte GOODS_ORDER_STATUS_SUCCESS = 1; - public static final Byte GOODS_ORDER_STATUS_COMPLETE = 2; - public static final Byte GOODS_ORDER_STATUS_FAIL = -1; - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/DateUtil.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/DateUtil.java deleted file mode 100644 index 053ddf8352bf8607359c9d875755aca04f34afd7..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/DateUtil.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.xxpay.shop.util; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; - -/** - * - * 日期工具类 - * - */ - -public class DateUtil { - - private final SimpleDateFormat format; - - public DateUtil(SimpleDateFormat format) { - this.format = format; - } - - public SimpleDateFormat getFormat() { - return format; - } - - //紧凑型日期格式,也就是纯数字类型yyyyMMdd - public static final DateUtil COMPAT = new DateUtil(new SimpleDateFormat("yyyyMMdd")); - - //常用日期格式,yyyy-MM-dd - public static final DateUtil COMMON = new DateUtil(new SimpleDateFormat("yyyy-MM-dd")); - public static final DateUtil COMMON_FULL = new DateUtil(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); - - //使用斜线分隔的,西方多采用,yyyy/MM/dd - public static final DateUtil SLASH = new DateUtil(new SimpleDateFormat("yyyy/MM/dd")); - - //中文日期格式常用,yyyy年MM月dd日 - public static final DateUtil CHINESE = new DateUtil(new SimpleDateFormat("yyyy年MM月dd日")); - public static final DateUtil CHINESE_FULL = new DateUtil(new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒")); - - /** - * 日期获取字符串 - */ - public String getDateText(Date date){ - return getFormat().format(date); - } - - /** - * 字符串获取日期 - * @throws ParseException - */ - public Date getTextDate(String text) throws ParseException{ - return getFormat().parse(text); - } - - /** - * 日期获取字符串 - */ - public static String getDateText(Date date ,String format){ - return new SimpleDateFormat(format).format(date); - } - - /** - * 字符串获取日期 - * @throws ParseException - */ - public static Date getTextDate(String dateText ,String format) throws ParseException{ - return new SimpleDateFormat(format).parse(dateText); - } - - /** - * 根据日期,返回其星期数,周一为1,周日为7 - * @param date - * @return - */ - public static int getWeekDay(Date date) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(date); - int w = calendar.get(Calendar.DAY_OF_WEEK); - int ret; - if (w == Calendar.SUNDAY) - ret = 7; - else - ret = w - 1; - return ret; - } - - public static String getSeqString() { - SimpleDateFormat fm = new SimpleDateFormat("yyyyMMddHHmmss"); - return fm.format(new Date()); - } - -} - diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/OAuth2RequestParamHelper.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/OAuth2RequestParamHelper.java deleted file mode 100644 index 84f9fd057cf256028ae2dbfaaf09ff5d8a50152c..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/OAuth2RequestParamHelper.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.xxpay.shop.util; - -import org.apache.commons.lang3.StringUtils; - -import javax.servlet.http.HttpServletRequest; -import java.util.HashMap; -import java.util.Map; - -/** - * 微信oauth interceptor 处理参数转换; - * 对于interceptor的url如果有参数,业务中请用此类获取参数; - */ -public class OAuth2RequestParamHelper { - - //准备state参数 - public static String prepareState(HttpServletRequest request){ - Map map = request.getParameterMap(); - StringBuilder sb = new StringBuilder(""); - for(String key : map.keySet()){ - if(map.get(key) != null && map.get(key).length > 0){ - if(map.get(key)[0] != null){ - sb.append(key+"="+map.get(key)[0]+"!");//用!间隔 - } - } - } - String str = sb.toString(); - if(StringUtils.isBlank(str)){ - return ""; - }else{ - return str.substring(0, str.length() - 1); - } - } - - //获取state参数map - public static Map getStateParam(HttpServletRequest request){ - String state = request.getParameter("state"); - String[] stateArr = state.split("!");//用!间隔 - Map param = new HashMap(); - if(stateArr != null && stateArr.length > 0){ - for(String s : stateArr){ - String key = s.split("=")[0]; - String value = s.split("=")[1]; - param.put(key, value); - } - } - return param; - } - - /** - * 根据key获取;如果有state,从state中获取;否则从request中获取 - * @param request - * @param name - * @return - */ - public static String getParameter(HttpServletRequest request, String name){ - String state = request.getParameter("state"); - if(state != null){ - String[] stateArr = state.split("!");//用!间隔 - if(stateArr != null && stateArr.length > 0){ - for(String s : stateArr){ - String key = s.split("=")[0]; - String value = s.split("=")[1]; - if(name.equals(key)){ - return value; - } - } - } - return null; - }else{ - return request.getParameter(name); - } - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/AccessToken.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/AccessToken.java deleted file mode 100644 index af8a339874966aaa6d82347ac3a06628f25c8128..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/AccessToken.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.xxpay.shop.util.vx; - - -import org.xxpay.shop.util.CalendarUtil; - -public class AccessToken { - private String accessToken;// 接口访问凭证 - private int expiresIn;// 凭证有效期,单位:秒 - private long createTime;//创建时间,单位:秒 ,用于判断是否过期 - - private Integer errcode;//错误编码 - private String errmsg;//错误消息 - - public AccessToken(){ - this.createTime = CalendarUtil.getTimeInSeconds(); - } - - public AccessToken(String accessToken, int expiresIn){ - this.accessToken = accessToken; - this.expiresIn = expiresIn; - this.createTime = CalendarUtil.getTimeInSeconds(); - } - - public long getCreateTime() { - return createTime; - } - - public void setCreateTime(long createTime) { - this.createTime = createTime; - } - - public String getAccessToken() { - return accessToken; - } - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - public int getExpiresIn() { - return expiresIn; - } - public void setExpiresIn(int expiresIn) { - this.expiresIn = expiresIn; - } - public Integer getErrcode() { - return errcode; - } - public void setErrcode(Integer errcode) { - this.errcode = errcode; - this.errmsg = ErrCode.errMsg(errcode); - } - public String getErrmsg() { - return errmsg; - } - public void setErrmsg(String errmsg) { - this.errmsg = errmsg; - } - - /** - * 是否超时,微信默认7200s超时 - * @return true-超时;false-没有超时 - */ - public boolean isExpires(){ - long now = CalendarUtil.getTimeInSeconds(); - return now - this.createTime - 10 >= this.expiresIn; //预留 10s - } - - /** - * 是否超时 - * @return true-超时;false-没有超时 - */ - public boolean isExpires(Long expireTime){ - long now = CalendarUtil.getTimeInSeconds(); - return now - this.createTime - 10 >= expireTime; //预留 10s - } - - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/ErrCode.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/ErrCode.java deleted file mode 100644 index 065bbb030eadc27b01530b06b85af75c2b8b4cdc..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/ErrCode.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.shop.util.vx; - -import java.util.HashMap; -import java.util.Map; - -/** - * 微信公众平台全局返回码说明 - */ -public class ErrCode { - - private static Map codeMap = new HashMap(); - - static { - codeMap.put("-1","系统繁忙"); - codeMap.put("0","请求成功"); - codeMap.put("40001","获取access_token时AppSecret错误,或者access_token无效"); - codeMap.put("40002","不合法的凭证类型"); - codeMap.put("40003","不合法的OpenID"); - codeMap.put("40004","不合法的媒体文件类型"); - codeMap.put("40005","不合法的文件类型"); - codeMap.put("40006","不合法的文件大小"); - codeMap.put("40007","不合法的媒体文件id"); - codeMap.put("40008","不合法的消息类型"); - codeMap.put("40009","不合法的图片文件大小"); - codeMap.put("40010","不合法的语音文件大小"); - codeMap.put("40011","不合法的视频文件大小"); - codeMap.put("40012","不合法的缩略图文件大小"); - codeMap.put("40013","不合法的APPID"); - codeMap.put("40014","不合法的access_token"); - codeMap.put("40015","不合法的菜单类型"); - codeMap.put("40016","不合法的按钮个数"); - codeMap.put("40017","不合法的按钮个数"); - codeMap.put("40018","不合法的按钮名字长度"); - codeMap.put("40019","不合法的按钮KEY长度"); - codeMap.put("40020","不合法的按钮URL长度"); - codeMap.put("40021","不合法的菜单版本号"); - codeMap.put("40022","不合法的子菜单级数"); - codeMap.put("40023","不合法的子菜单按钮个数"); - codeMap.put("40024","不合法的子菜单按钮类型"); - codeMap.put("40025","不合法的子菜单按钮名字长度"); - codeMap.put("40026","不合法的子菜单按钮KEY长度"); - codeMap.put("40027","不合法的子菜单按钮URL长度"); - codeMap.put("40028","不合法的自定义菜单使用用户"); - codeMap.put("40029","不合法的oauth_code"); - codeMap.put("40030","不合法的refresh_token"); - codeMap.put("40031","不合法的openid列表"); - codeMap.put("40032","不合法的openid列表长度"); - codeMap.put("40033","不合法的请求字符,不能包含\\uxxxx格式的字符"); - codeMap.put("40035","不合法的参数"); - codeMap.put("40038","不合法的请求格式"); - codeMap.put("40039","不合法的URL长度"); - codeMap.put("40050","不合法的分组id"); - codeMap.put("40051","分组名字不合法"); - codeMap.put("41001","缺少access_token参数"); - codeMap.put("41002","缺少appid参数"); - codeMap.put("41003","缺少refresh_token参数"); - codeMap.put("41004","缺少secret参数"); - codeMap.put("41005","缺少多媒体文件数据"); - codeMap.put("41006","缺少media_id参数"); - codeMap.put("41007","缺少子菜单数据"); - codeMap.put("41008","缺少oauth code"); - codeMap.put("41009","缺少openid"); - codeMap.put("42001","access_token超时"); - codeMap.put("42002","refresh_token超时"); - codeMap.put("42003","oauth_code超时"); - codeMap.put("43001","需要GET请求"); - codeMap.put("43002","需要POST请求"); - codeMap.put("43003","需要HTTPS请求"); - codeMap.put("43004","需要接收者关注"); - codeMap.put("43005","需要好友关系"); - codeMap.put("44001","多媒体文件为空"); - codeMap.put("44002","POST的数据包为空"); - codeMap.put("44003","图文消息内容为空"); - codeMap.put("44004","文本消息内容为空"); - codeMap.put("45001","多媒体文件大小超过限制"); - codeMap.put("45002","消息内容超过限制"); - codeMap.put("45003","标题字段超过限制"); - codeMap.put("45004","描述字段超过限制"); - codeMap.put("45005","链接字段超过限制"); - codeMap.put("45006","图片链接字段超过限制"); - codeMap.put("45007","语音播放时间超过限制"); - codeMap.put("45008","图文消息超过限制"); - codeMap.put("45009","接口调用超过限制"); - codeMap.put("45010","创建菜单个数超过限制"); - codeMap.put("45015","回复时间超过限制"); - codeMap.put("45016","系统分组,不允许修改"); - codeMap.put("45017","分组名字过长"); - codeMap.put("45018","分组数量超过上限"); - codeMap.put("46001","不存在媒体数据"); - codeMap.put("46002","不存在的菜单版本"); - codeMap.put("46003","不存在的菜单数据"); - codeMap.put("46004","不存在的用户"); - codeMap.put("47001","解析JSON/XML内容错误"); - codeMap.put("48001","api功能未授权"); - codeMap.put("50001","用户未授权该api"); - codeMap.put("61451","参数错误(invalid parameter)"); - codeMap.put("61452","无效客服账号(invalid kf_account)"); - codeMap.put("61453","客服帐号已存在(kf_account exsited)"); - codeMap.put("61454","客服帐号名长度超过限制(仅允许10个英文字符,不包括@及@后的公众号的微信号)(invalid kf_acount length)"); - codeMap.put("61455","客服帐号名包含非法字符(仅允许英文+数字)(illegal character in kf_account)"); - codeMap.put("61456","客服帐号个数超过限制(10个客服账号)(kf_account count exceeded)"); - codeMap.put("61457","无效头像文件类型(invalid file type)"); - codeMap.put("61450","系统错误(system error)"); - codeMap.put("61500","日期格式错误"); - codeMap.put("61501","日期范围错误"); - } - - public static String errMsg(Integer errCode){ - if(errCode != null && codeMap.containsKey(errCode+"")){ - return codeMap.get(errCode+""); - } - return null; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/HttpMethod.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/HttpMethod.java deleted file mode 100644 index de3d5aab33569e70139b98bc850fedf783139999..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/HttpMethod.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.xxpay.shop.util.vx; - -/** - * - */ -public class HttpMethod { - - public static final String POST = "POST"; - public static final String GET = "GET"; - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/JSTicket.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/JSTicket.java deleted file mode 100644 index 170e0400e68157239e3f64a28e3abde9679f73a0..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/JSTicket.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.xxpay.shop.util.vx; - -import org.xxpay.shop.util.CalendarUtil; - -/** - * 接口凭证 - */ -public class JSTicket { - private String ticket;// 接口访问凭证 - private int expiresIn;// 凭证有效期,单位:秒 - private long createTime;//创建时间,单位:秒 ,用于判断是否过期 - - private Integer errcode;//错误编码 - private String errmsg;//错误消息 - - public JSTicket(){ - this.createTime = CalendarUtil.getTimeInSeconds(); - } - - public JSTicket(String ticket, int expiresIn){ - this.ticket = ticket; - this.expiresIn = expiresIn; - this.createTime = CalendarUtil.getTimeInSeconds(); - } - - - public String getTicket() { - return ticket; - } - - public void setTicket(String ticket) { - this.ticket = ticket; - } - - public int getExpiresIn() { - return expiresIn; - } - public void setExpiresIn(int expiresIn) { - this.expiresIn = expiresIn; - } - public Integer getErrcode() { - return errcode; - } - public void setErrcode(Integer errcode) { - this.errcode = errcode; - this.errmsg = ErrCode.errMsg(errcode); - } - public String getErrmsg() { - return errmsg; - } - public void setErrmsg(String errmsg) { - this.errmsg = errmsg; - } - - /** - * 是否超时 - * @return true-超时;false-没有超时 - */ - public boolean isExpires(){ - long now = CalendarUtil.getTimeInSeconds(); - return now - this.createTime - 10 >= this.expiresIn; //预留 10s - } - - /** - * 是否超时 - * @return true-超时;false-没有超时 - */ - public boolean isExpires(Long expireTime){ - long now = CalendarUtil.getTimeInSeconds(); - return now - this.createTime - 10 >= expireTime; //预留 10s - } - - -} - - - diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/MpAccount.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/MpAccount.java deleted file mode 100644 index 2fb66db3550c6d8e076fc93febb108d05324f855..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/MpAccount.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.xxpay.shop.util.vx; - -import java.io.Serializable; - -/** - * 微信公众号信息 - */ -public class MpAccount implements Serializable{ - private static final long serialVersionUID = -6315146640254918207L; - - private String account;//账号 - private String appid;//appid - private String appsecret;//appsecret - private String url;//验证时用的url - private String token;//token - - //ext - private Integer msgcount;//自动回复消息条数;默认是5条 - - - public String getAccount() { - return account; - } - public void setAccount(String account) { - this.account = account; - } - public String getAppid() { - return appid; - } - public void setAppid(String appid) { - this.appid = appid; - } - public String getAppsecret() { - return appsecret; - } - public void setAppsecret(String appsecret) { - this.appsecret = appsecret; - } - public String getUrl() { - return url; - } - public void setUrl(String url) { - this.url = url; - } - public String getToken() { - return token; - } - public void setToken(String token) { - this.token = token; - } - public Integer getMsgcount() { - if(msgcount == null) - msgcount = 5;//默认5条 - return msgcount; - } - public void setMsgcount(Integer msgcount) { - this.msgcount = msgcount; - } - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/OAuthAccessToken.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/OAuthAccessToken.java deleted file mode 100644 index 537d08d1d86ce2d1512b31338afbe40164c5aa13..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/OAuthAccessToken.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.xxpay.shop.util.vx; - -/** - * OAuth token - */ -public class OAuthAccessToken extends AccessToken { - - //oauth2.0 - private String oauthAccessToken;//刷新token - private String openid; - private String scope; - - - public String getOauthAccessToken() { - return oauthAccessToken; - } - public void setOauthAccessToken(String oauthAccessToken) { - this.oauthAccessToken = oauthAccessToken; - } - public String getOpenid() { - return openid; - } - public void setOpenid(String openid) { - this.openid = openid; - } - public String getScope() { - return scope; - } - public void setScope(String scope) { - this.scope = scope; - } - -} - diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/TemplateMessage.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/TemplateMessage.java deleted file mode 100644 index ec209c85bbef4d649d4e36da4cde06afb94306e8..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/TemplateMessage.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.xxpay.shop.util.vx; - -import com.alibaba.fastjson.JSONObject; - -import java.util.Map; - -/** - * 发送的模板消息对象 - */ -public class TemplateMessage { - - private String openid;//粉丝id - private String templateId;//模板id - private String url;//链接 - private String color = "#173177";//颜色 - private Map dataMap;//参数数据 - - - public String getOpenid() { - return openid; - } - - public void setOpenid(String openid) { - this.openid = openid; - } - - public String getTemplateId() { - return templateId; - } - - public void setTemplateId(String templateId) { - this.templateId = templateId; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Map getDataMap() { - return dataMap; - } - - public void setDataMap(Map dataMap) { - this.dataMap = dataMap; - } - - public String getColor() { - return color; - } - - public void setColor(String color) { - this.color = color; - } - - @Override - public String toString(){ - JSONObject jsObj = new JSONObject(); - jsObj.put("touser", openid); - jsObj.put("template_id", templateId); - jsObj.put("url", url); - - JSONObject data = new JSONObject(); - if(dataMap != null){ - for(String key : dataMap.keySet()){ - JSONObject item = new JSONObject(); - item.put("value", dataMap.get(key)); - item.put("color", color); - data.put(key,item); - } - } - jsObj.put("data", data); - return jsObj.toString(); - } - - -} diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApi.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApi.java deleted file mode 100644 index aebabfafb1b1c6e1ac7d47619bd5dbcb1a209b9b..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApi.java +++ /dev/null @@ -1,351 +0,0 @@ -package org.xxpay.shop.util.vx; - - - - -import com.alibaba.fastjson.JSONException; -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.util.MyLog; - -import javax.net.ssl.*; -import java.io.*; -import java.net.URL; -import java.net.URLEncoder; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -/** - * 微信 API、微信基本接口 - * - */ - -public class WxApi { - - private static final MyLog _log = MyLog.getLog(WxApi.class); - - //token 接口 - private static final String TOKEN = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"; - - //创建菜单 - private static final String MENU_CREATE = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=%s"; - - //创建个性化菜单 - private static final String MENU_ADDCONDITIONAL = "https://api.weixin.qq.com/cgi-bin/menu/addconditional?access_token=%s"; - - //删除菜单 - private static final String MENU_DELETE = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=%s"; - - //获取账号粉丝信息 - private static final String GET_FANS_INFO = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=%s&openid=%s&lang=zh_CN"; - - //获取账号粉丝列表 - private static final String GET_FANS_LIST = "https://api.weixin.qq.com/cgi-bin/user/get?access_token=%s"; - - //获取批量素材 - private static final String GET_BATCH_MATERIAL = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=%s"; - - //上传多媒体资料接口 - private static final String UPLOAD_MEDIA = "http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token=%s&type=%s"; - - //上传永久素材:图文 - private static final String UPLOAD_NEWS = "https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token=%s"; - - //群发接口 - private static final String MASS_SEND = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=%s"; - - //网页授权OAuth2.0获取code - private static final String GET_OAUTH_CODE = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=%s&scope=%s&state=%s#wechat_redirect"; - - //网页授权OAuth2.0获取token - private static final String GET_OAUTH_TOKEN = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code"; - - //网页授权OAuth2.0获取用户信息 - private static final String GET_OAUTH_USERINFO = "https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s&lang=zh_CN"; - - //生成二维码 - private static final String CREATE_QRCODE = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=%s"; - - //根据ticket获取二维码图片 - private static final String SHOW_QRCODE = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s"; - - //js ticket - private static final String GET_JSAPI_TICKET="https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=%s&type=jsapi"; - - //发送客服消息 - private static final String SEND_CUSTOM_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=%s"; - - //模板消息接口 - private static final String SEND_TEMPLATE_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=%s"; - - - - //获取token接口 - public static String getTokenUrl(String appId,String appSecret){ - return String.format(TOKEN, appId, appSecret); - } - - //获取上传Media接口 - public static String getUploadMediaUrl(String token,String type){ - return String.format(UPLOAD_MEDIA, token, type); - } - - //获取菜单创建接口 - public static String getMenuCreateUrl(String token){ - return String.format(MENU_CREATE, token); - } - - //获取个性化菜单创建接口 - public static String getMenuAddconditionalUrl(String token){ - return String.format(MENU_ADDCONDITIONAL, token); - } - - //获取菜单删除接口 - public static String getMenuDeleteUrl(String token){ - return String.format(MENU_DELETE, token); - } - - //获取粉丝信息接口 - public static String getFansInfoUrl(String token,String openid){ - return String.format(GET_FANS_INFO, token, openid); - } - - //获取粉丝列表接口 - public static String getFansListUrl(String token,String nextOpenId){ - if(nextOpenId == null){ - return String.format(GET_FANS_LIST, token); - }else{ - return String.format(GET_FANS_LIST + "&next_openid=%s", token, nextOpenId); - } - } - - //获取素材列表接口 - public static String getBatchMaterialUrl(String token){ - return String.format(GET_BATCH_MATERIAL, token); - } - - //获取上传图文消息接口 - public static String getUploadNewsUrl(String token){ - return String.format(UPLOAD_NEWS, token); - } - - //群发接口 - public static String getMassSendUrl(String token){ - return String.format(MASS_SEND, token); - } - - //网页授权OAuth2.0获取code - public static String getOAuthCodeUrl(String appId ,String redirectUrl ,String scope ,String state){ - return String.format(GET_OAUTH_CODE, appId, urlEnodeUTF8(redirectUrl), "code", scope, state); - } - - //网页授权OAuth2.0获取token - public static String getOAuthTokenUrl(String appId ,String appSecret ,String code ){ - return String.format(GET_OAUTH_TOKEN, appId, appSecret, code); - } - - //网页授权OAuth2.0获取用户信息 - public static String getOAuthUserinfoUrl(String token ,String openid){ - return String.format(GET_OAUTH_USERINFO, token, openid); - } - - //获取创建二维码接口url - public static String getCreateQrcodeUrl(String token){ - return String.format(CREATE_QRCODE, token); - } - - //获取显示二维码接口 - public static String getShowQrcodeUrl(String ticket){ - return String.format(SHOW_QRCODE, ticket); - } - - //获取js ticket url - public static String getJsApiTicketUrl(String token){ - return String.format(GET_JSAPI_TICKET, token); - } - - //获取发送客服消息 url - public static String getSendCustomMessageUrl(String token){ - return String.format(SEND_CUSTOM_MESSAGE, token); - } - - //获取发送模板消息 url - public static String getSendTemplateMessageUrl(String token){ - return String.format(SEND_TEMPLATE_MESSAGE, token); - } - - - - /** - * 获取创建临时二维码post data - * @param expireSecodes 该二维码有效时间,以秒为单位。 最大不超过2592000(即30天),此字段如果不填,则默认有效期为30秒。 - * @param scene 临时二维码时为32位非0整型,永久二维码时最大值为100000(目前参数只支持1--100000) - * @return - */ - public static String getQrcodeJson(Integer expireSecodes, Integer scene){ - String postStr = "{\"expire_seconds\":%d,\"action_name\":\"QR_SCENE\",\"action_info\":{\"scene\":{\"scene_id\":%d}}"; - return String.format(postStr, expireSecodes, scene); - } - /** - * 获取创建临时二维码post data - * @param scene 临时二维码时为32位非0整型,永久二维码时最大值为100000(目前参数只支持1--100000) - * @return - */ - public static String getQrcodeLimitJson(Integer scene){ - String postStr = "{\"action_name\":\"QR_LIMIT_SCENE\",\"action_info\":{\"scene\":{\"scene_id\":%d}}"; - return String.format(postStr, scene); - } - //获取永久二维码 - public static String getQrcodeLimitJson(String sceneStr){ - String postStr = "{\"action_name\":\"QR_LIMIT_STR_SCENE\",\"action_info\":{\"scene\":{\"scene_str\":%s}}"; - return String.format(postStr, sceneStr); - } - - //获取OAuth2.0 Token - public static OAuthAccessToken getOAuthAccessToken(String appId, String appSecret, String code) { - OAuthAccessToken token = null; - String tockenUrl = getOAuthTokenUrl(appId, appSecret, code); - JSONObject jsonObject = httpsRequest(tockenUrl, HttpMethod.GET, null); - if (null != jsonObject && !jsonObject.containsKey("errcode")) { - try { - token = new OAuthAccessToken(); - token.setAccessToken(jsonObject.getString("access_token")); - token.setExpiresIn(jsonObject.getInteger("expires_in")); - token.setOpenid(jsonObject.getString("openid")); - token.setScope(jsonObject.getString("scope")); - } catch (JSONException e) { - token = null;//获取token失败 - } - }else if(null != jsonObject){ - token = new OAuthAccessToken(); - token.setErrcode(jsonObject.getInteger("errcode")); - } - return token; - } - - //发送请求 - public static JSONObject httpsRequest(String requestUrl, String requestMethod) { - return httpsRequest(requestUrl,requestMethod,null); - } - - //获取接口访问凭证 - public static AccessToken getAccessToken(String appId, String appSecret) { - AccessToken token = null; - String tockenUrl = WxApi.getTokenUrl(appId, appSecret); - JSONObject jsonObject = httpsRequest(tockenUrl, HttpMethod.GET, null); - if (null != jsonObject && !jsonObject.containsKey("errcode")) { - try { - token = new AccessToken(); - token.setAccessToken(jsonObject.getString("access_token")); - token.setExpiresIn(jsonObject.getInteger("expires_in")); - } catch (JSONException e) { - token = null;//获取token失败 - } - }else if(null != jsonObject){ - token = new AccessToken(); - token.setErrcode(jsonObject.getInteger("errcode")); - } - return token; - } - - public static JSONObject httpsRequest(String requestUrl, String requestMethod, String outputStr) { - JSONObject jsonObject = null; - try { - _log.info("发送HTTPS请求,requestMethod={},requestUrl={},outputStr={}", requestMethod, requestUrl, outputStr); - TrustManager[] tm = { new JEEWeiXinX509TrustManager() }; - SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); - sslContext.init(null, tm, new java.security.SecureRandom()); - SSLSocketFactory ssf = sslContext.getSocketFactory(); - - URL url = new URL(requestUrl); - HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); - conn.setSSLSocketFactory(ssf); - - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setUseCaches(false); - conn.setRequestMethod(requestMethod); - if (null != outputStr) { - OutputStream outputStream = conn.getOutputStream(); - outputStream.write(outputStr.getBytes("UTF-8")); - outputStream.close(); - } - InputStream inputStream = conn.getInputStream(); - InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8"); - BufferedReader bufferedReader = new BufferedReader(inputStreamReader); - String str = null; - StringBuffer buffer = new StringBuffer(); - while ((str = bufferedReader.readLine()) != null) { - buffer.append(str); - } - bufferedReader.close(); - inputStreamReader.close(); - inputStream.close(); - inputStream = null; - conn.disconnect(); - _log.info("响应数据,rtn={}", buffer); - jsonObject = JSONObject.parseObject(buffer.toString()); - } catch (Exception e) { - e.printStackTrace(); - } - return jsonObject; - } - - public static byte[] httpsRequestByte(String requestUrl, String requestMethod) { - return httpsRequestByte(requestUrl,requestMethod,null); - } - - public static byte[] httpsRequestByte(String requestUrl, String requestMethod, String outputStr) { - try { - TrustManager[] tm = { new JEEWeiXinX509TrustManager() }; - SSLContext sslContext = SSLContext.getInstance("SSL", "SunJSSE"); - sslContext.init(null, tm, new java.security.SecureRandom()); - SSLSocketFactory ssf = sslContext.getSocketFactory(); - - URL url = new URL(requestUrl); - HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); - conn.setSSLSocketFactory(ssf); - - conn.setDoOutput(true); - conn.setDoInput(true); - conn.setUseCaches(false); - conn.setRequestMethod(requestMethod); - if (null != outputStr) { - OutputStream outputStream = conn.getOutputStream(); - outputStream.write(outputStr.getBytes("UTF-8")); - outputStream.close(); - } - InputStream inputStream = conn.getInputStream(); - ByteArrayOutputStream output = new ByteArrayOutputStream(); - byte[] buffer = new byte[4096]; - int n = 0; - while (-1 != (n = inputStream.read(buffer))) { - output.write(buffer, 0, n); - } - return output.toByteArray(); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - public static String urlEnodeUTF8(String str){ - String result = str; - try { - result = URLEncoder.encode(str,"UTF-8"); - } catch (Exception e) { - e.printStackTrace(); - } - return result; - } - -} - -class JEEWeiXinX509TrustManager implements X509TrustManager { - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { - } - public X509Certificate[] getAcceptedIssuers() { - return null; - } -} \ No newline at end of file diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApiClient.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApiClient.java deleted file mode 100644 index f1a3b285e0d43f84ccb2060585bc3f56ad3a5d3a..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxApiClient.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.xxpay.shop.util.vx; - - -import com.alibaba.fastjson.JSONObject; - -/** - * 微信 客户端,统一处理微信相关接口 - */ - -public class WxApiClient { - - //获取openId - public static String getOAuthOpenId(String appid, String secret, String code){ - OAuthAccessToken token = WxApi.getOAuthAccessToken(appid, secret, code); - if(token != null){ - if(token.getErrcode() != null){//获取失败 - System.out.println("## getOAuthAccessToken Error = " + token.getErrmsg()); - }else{ - return token.getOpenid(); - } - } - return null; - } - - //获取accessToken - public static String getAccessToken(MpAccount mpAccount){ - //获取唯一的accessToken,如果是多账号,请自行处理 - AccessToken token = WxMemoryCacheClient.getSingleAccessToken(); - if(token != null && !token.isExpires()){//不为空,并且没有过期 - return token.getAccessToken(); - }else{ - token = WxApi.getAccessToken(mpAccount.getAppid(),mpAccount.getAppsecret()); - if(token != null){ - if(token.getErrcode() != null){//获取失败 - System.out.println("## getAccessToken Error = " + token.getErrmsg()); - }else{ - WxMemoryCacheClient.addAccessToken(mpAccount.getAccount(), token); - return token.getAccessToken(); - } - } - return null; - } - } - - /** - * 发送模板消息 - * @param tplMsg - * @param mpAccount - * @return - */ - public static JSONObject sendTemplateMessage(TemplateMessage tplMsg, MpAccount mpAccount){ - if(tplMsg != null){ - String accessToken = getAccessToken(mpAccount); - return WxApi.httpsRequest(WxApi.getSendTemplateMessageUrl(accessToken), HttpMethod.POST, tplMsg.toString()); - } - return null; - } - - -} - - - diff --git a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxMemoryCacheClient.java b/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxMemoryCacheClient.java deleted file mode 100644 index 6beab4ef228c8ec342bc04d91f855ca558c0d3a9..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/java/org/xxpay/shop/util/vx/WxMemoryCacheClient.java +++ /dev/null @@ -1,172 +0,0 @@ -package org.xxpay.shop.util.vx; - -import org.xxpay.common.util.MyLog; - -import java.util.HashMap; -import java.util.Map; - -/** - * 缓存工具类; - * 目前使用 服务器内存的方式; - * - * 1、开发者可以根据自己的需求使用不同的缓存方式,比如memcached - * 2、系统默认使用单个公众账号的缓存处理,如果有多个账号,请开发者自行处理 - * - */ -public class WxMemoryCacheClient { - - private static final MyLog _log = MyLog.getLog(WxMemoryCacheClient.class); - - //服务器内存的方式缓存account、accessToken、jsTicket - private static Map mpAccountMap = new HashMap(); - private static Map accountAccessTokenMap = new HashMap(); - private static Map accountJSTicketMap = new HashMap(); - - //微信OAuth认证的时候,服务器内存的方式缓存openid; key=sessionid ,value=openid - - private static Map accountOAuthTokenMap = new HashMap(); - - - public static void addMpAccount(MpAccount account){ - if(account != null && !mpAccountMap.containsKey(account.getAccount())){ - mpAccountMap.put(account.getAccount(), account); - } - } - - public static MpAccount getMpAccount(String account){ - return mpAccountMap.get(account); - } - - //获取唯一的公众号,如果需要多账号,请自行处理 - public static MpAccount getSingleMpAccount(){ - MpAccount sigleAccount = null; - for(String key : mpAccountMap.keySet()){ - sigleAccount = mpAccountMap.get(key); - break; - } - return sigleAccount; - } - - public static AccessToken addAccessToken(String account ,AccessToken token){ - if(token != null){ - accountAccessTokenMap.put(account, token); - -// JSONObject tokenObject = new JSONObject(); -// tokenObject.put("access_token", token.getAccessToken()); -// tokenObject.put("expires_in", token.getExpiresIn()); -// tokenObject.put("create_time", token.getCreateTime()); -// MyJedis.set(ConstUtil.RedisCache.REDIS_CACHE_NAME_ROOM, ConstUtil.RedisKey.VVLIVE_VX_ACCESS_TOKEN + account, tokenObject.toJSONString(), token.getExpiresIn()); -// _log.info("将access_token保存到redis中,key={},value={},expires={}", ConstUtil.RedisKey.VVLIVE_VX_ACCESS_TOKEN + account, tokenObject.toJSONString(), token.getExpiresIn()); - - } - return token; - } - - /** - * accessToken的获取,绝对不要从缓存中直接获取,请从WxApiClient中获取; - * @param account - * @return - */ - public static AccessToken getAccessToken(String account){ - return accountAccessTokenMap.get(account); - } - - /** - * 获取唯一的公众号的accessToken,如果需要多账号,请自行处理 - * accessToken的获取,绝对不要从缓存中直接获取,请从WxApiClient中获取; - * @return - */ - public static AccessToken getSingleAccessToken(){ - AccessToken accessToken = null; - for(String key : accountAccessTokenMap.keySet()){ - accessToken = accountAccessTokenMap.get(key); - - // 从redis中取 -// String tokenJson = MyJedis.get(ConstUtil.RedisCache.REDIS_CACHE_NAME_ROOM, ConstUtil.RedisKey.VVLIVE_VX_ACCESS_TOKEN + key); -// _log.info("从redis中获取access_token,key={},value={}", ConstUtil.RedisKey.VVLIVE_VX_ACCESS_TOKEN + key, tokenJson); -// if(StringUtils.isNotBlank(tokenJson)) { -// JSONObject tokenObject = JSON.parseObject(tokenJson); -// accessToken.setAccessToken(tokenObject.getString("access_token")); -// accessToken.setExpiresIn(tokenObject.getInteger("expires_in")); -// accessToken.setCreateTime(tokenObject.getLong("create_time")); -// } - - if (accessToken != null) break; - } - return accessToken; - } - - /** - * 添加JSTicket到缓存 - * @param account - * @param jsTicket - * @return - */ - public static JSTicket addJSTicket(String account , JSTicket jsTicket){ - if(jsTicket != null){ - accountJSTicketMap.put(account, jsTicket); - } - return jsTicket; - } - - /** - * JSTicket的获取,绝对不要从缓存中直接获取,请从JSTicket中获取; - * @param account - * @return - */ - public static JSTicket getJSTicket(String account){ - return accountJSTicketMap.get(account); - } - - /** - * 获取唯一的公众号的JSTicket,如果需要多账号,请自行处理 - * JSTicket的获取,绝对不要从缓存中直接获取,请从WxApiClient中获取; - * @return - */ - public static JSTicket getSingleJSTicket(){ - JSTicket jsTicket = null; - for(String key : accountJSTicketMap.keySet()){ - jsTicket = accountJSTicketMap.get(key); - break; - } - return jsTicket; - } - - - - - //处理OAuth的Token - public static AccessToken addOAuthAccessToken(String account ,OAuthAccessToken token){ - if(token != null){ - accountOAuthTokenMap.put(account, token); - } - return token; - } - - /** - * OAuthAccessToken的获取,绝对不要从缓存中直接获取,请从WxApiClient中获取; - * @param account - * @return - */ - public static OAuthAccessToken getOAuthAccessToken(String account){ - return accountOAuthTokenMap.get(account); - } - - /** - * 获取唯一的公众号的accessToken,如果需要多账号,请自行处理 - * OAuthAccessToken的获取,绝对不要从缓存中直接获取,请从WxApiClient中获取; - * @return - */ - public static OAuthAccessToken getSingleOAuthAccessToken(){ - OAuthAccessToken token = null; - for(String key : accountOAuthTokenMap.keySet()){ - token = accountOAuthTokenMap.get(key); - break; - } - return token; - } - - -} - - diff --git a/xxpay-shop/src/main/resources/application.properties b/xxpay-shop/src/main/resources/application.properties deleted file mode 100755 index 8fcac6b7547bfffade15b843efa92949b062cc0e..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/application.properties +++ /dev/null @@ -1,47 +0,0 @@ -server.port=8081 - -spring.freemarker.cache=false -spring.freemarker.charset=UTF-8 -spring.freemarker.check-template-location=true -spring.freemarker.content-type=text/html -spring.freemarker.expose-request-attributes=true -spring.freemarker.expose-session-attributes=true -spring.freemarker.request-context-attribute=request -spring.freemarker.suffix=.ftl -spring.freemarker.templateEncoding=UTF-8 -spring.freemarker.templateLoaderPath=classpath:/templates/ - -#\u6570\u636E\u5E93\u914D\u7F6E -spring.datasource.type=com.alibaba.druid.pool.DruidDataSource -spring.datasource.driver-class-name=com.mysql.jdbc.Driver -spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true -spring.datasource.username=xxpay -spring.datasource.password=xxpay -# \u4E0B\u9762\u4E3A\u8FDE\u63A5\u6C60\u7684\u8865\u5145\u8BBE\u7F6E\uFF0C\u5E94\u7528\u5230\u4E0A\u9762\u6240\u6709\u6570\u636E\u6E90\u4E2D# \u521D\u59CB\u5316\u5927\u5C0F\uFF0C\u6700\u5C0F\uFF0C\u6700\u5927 -spring.datasource.initialSize=5 -spring.datasource.minIdle=5 -spring.datasource.maxActive=20 -# \u914D\u7F6E\u83B7\u53D6\u8FDE\u63A5\u7B49\u5F85\u8D85\u65F6\u7684\u65F6\u95F4 -spring.datasource.maxWait=60000 -# \u914D\u7F6E\u95F4\u9694\u591A\u4E45\u624D\u8FDB\u884C\u4E00\u6B21\u68C0\u6D4B\uFF0C\u68C0\u6D4B\u9700\u8981\u5173\u95ED\u7684\u7A7A\u95F2\u8FDE\u63A5\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 -spring.datasource.timeBetweenEvictionRunsMillis=60000 -# \u914D\u7F6E\u4E00\u4E2A\u8FDE\u63A5\u5728\u6C60\u4E2D\u6700\u5C0F\u751F\u5B58\u7684\u65F6\u95F4\uFF0C\u5355\u4F4D\u662F\u6BEB\u79D2 -spring.datasource.minEvictableIdleTimeMillis=300000 -spring.datasource.validationQuery=SELECT 1 FROM DUAL -spring.datasource.testWhileIdle=true -spring.datasource.testOnBorrow=false -spring.datasource.testOnReturn=false -# \u6253\u5F00PSCache\uFF0C\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F -spring.datasource.poolPreparedStatements=true -spring.datasource.maxPoolPreparedStatementPerConnectionSize=20 -# \u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters\uFF0C\u53BB\u6389\u540E\u76D1\u63A7\u754C\u9762sql\u65E0\u6CD5\u7EDF\u8BA1\uFF0C'wall'\u7528\u4E8E\u9632\u706B\u5899 -spring.datasource.filters=stat,wall,log4j -# \u901A\u8FC7connectProperties\u5C5E\u6027\u6765\u6253\u5F00mergeSql\u529F\u80FD\uFF1B\u6162SQL\u8BB0\u5F55 -spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 -# \u5408\u5E76\u591A\u4E2ADruidDataSource\u7684\u76D1\u63A7\u6570\u636E -#spring.datasource.useGlobalDataSourceStat=true - -### \u65E5\u5FD7 -logging.file=./log/xxpay-shop.log - -spring.mvc.favicon.enabled = false \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/generator.properties b/xxpay-shop/src/main/resources/generator.properties deleted file mode 100644 index cf2e6ef8fb1c19d54ac47bb46ba9b79cc983f1df..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/generator.properties +++ /dev/null @@ -1,5 +0,0 @@ -generator.jdbc.driver=com.mysql.jdbc.Driver -generator.jdbc.url=jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true -generator.jdbc.username=xxpay -generator.jdbc.password=xxpay -classPathEntry=/Users/dingzhiwei/java/repository/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/generatorConfig.xml b/xxpay-shop/src/main/resources/generatorConfig.xml deleted file mode 100644 index fe8db414ee0f34c5c487a2b54610f13ced840661..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/generatorConfig.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  -
                  -
                  \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/org/xxpay/shop/dao/mapper/GoodsOrderMapper.xml b/xxpay-shop/src/main/resources/org/xxpay/shop/dao/mapper/GoodsOrderMapper.xml deleted file mode 100644 index f4e52c3beee4630b93affa69b859d43be6e3eaae..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/org/xxpay/shop/dao/mapper/GoodsOrderMapper.xml +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - GoodsOrderId, GoodsId, GoodsName, Amount, UserId, Status, PayOrderId, ChannelId, - ChannelUserId, CreateTime, UpdateTime - - - - - delete from t_goods_order - where GoodsOrderId = #{goodsOrderId,jdbcType=VARCHAR} - - - delete from t_goods_order - - - - - - insert into t_goods_order (GoodsOrderId, GoodsId, GoodsName, - Amount, UserId, Status, - PayOrderId, ChannelId, ChannelUserId, - CreateTime, UpdateTime) - values (#{goodsOrderId,jdbcType=VARCHAR}, #{goodsId,jdbcType=VARCHAR}, #{goodsName,jdbcType=VARCHAR}, - #{amount,jdbcType=BIGINT}, #{userId,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, - #{payOrderId,jdbcType=VARCHAR}, #{channelId,jdbcType=VARCHAR}, #{channelUserId,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) - - - insert into t_goods_order - - - GoodsOrderId, - - - GoodsId, - - - GoodsName, - - - Amount, - - - UserId, - - - Status, - - - PayOrderId, - - - ChannelId, - - - ChannelUserId, - - - CreateTime, - - - UpdateTime, - - - - - #{goodsOrderId,jdbcType=VARCHAR}, - - - #{goodsId,jdbcType=VARCHAR}, - - - #{goodsName,jdbcType=VARCHAR}, - - - #{amount,jdbcType=BIGINT}, - - - #{userId,jdbcType=VARCHAR}, - - - #{status,jdbcType=TINYINT}, - - - #{payOrderId,jdbcType=VARCHAR}, - - - #{channelId,jdbcType=VARCHAR}, - - - #{channelUserId,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=TIMESTAMP}, - - - #{updateTime,jdbcType=TIMESTAMP}, - - - - - - update t_goods_order - - - GoodsOrderId = #{record.goodsOrderId,jdbcType=VARCHAR}, - - - GoodsId = #{record.goodsId,jdbcType=VARCHAR}, - - - GoodsName = #{record.goodsName,jdbcType=VARCHAR}, - - - Amount = #{record.amount,jdbcType=BIGINT}, - - - UserId = #{record.userId,jdbcType=VARCHAR}, - - - Status = #{record.status,jdbcType=TINYINT}, - - - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - - - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - - - ChannelUserId = #{record.channelUserId,jdbcType=VARCHAR}, - - - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP}, - - - - - - - - update t_goods_order - set GoodsOrderId = #{record.goodsOrderId,jdbcType=VARCHAR}, - GoodsId = #{record.goodsId,jdbcType=VARCHAR}, - GoodsName = #{record.goodsName,jdbcType=VARCHAR}, - Amount = #{record.amount,jdbcType=BIGINT}, - UserId = #{record.userId,jdbcType=VARCHAR}, - Status = #{record.status,jdbcType=TINYINT}, - PayOrderId = #{record.payOrderId,jdbcType=VARCHAR}, - ChannelId = #{record.channelId,jdbcType=VARCHAR}, - ChannelUserId = #{record.channelUserId,jdbcType=VARCHAR}, - CreateTime = #{record.createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{record.updateTime,jdbcType=TIMESTAMP} - - - - - - update t_goods_order - - - GoodsId = #{goodsId,jdbcType=VARCHAR}, - - - GoodsName = #{goodsName,jdbcType=VARCHAR}, - - - Amount = #{amount,jdbcType=BIGINT}, - - - UserId = #{userId,jdbcType=VARCHAR}, - - - Status = #{status,jdbcType=TINYINT}, - - - PayOrderId = #{payOrderId,jdbcType=VARCHAR}, - - - ChannelId = #{channelId,jdbcType=VARCHAR}, - - - ChannelUserId = #{channelUserId,jdbcType=VARCHAR}, - - - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - - - UpdateTime = #{updateTime,jdbcType=TIMESTAMP}, - - - where GoodsOrderId = #{goodsOrderId,jdbcType=VARCHAR} - - - update t_goods_order - set GoodsId = #{goodsId,jdbcType=VARCHAR}, - GoodsName = #{goodsName,jdbcType=VARCHAR}, - Amount = #{amount,jdbcType=BIGINT}, - UserId = #{userId,jdbcType=VARCHAR}, - Status = #{status,jdbcType=TINYINT}, - PayOrderId = #{payOrderId,jdbcType=VARCHAR}, - ChannelId = #{channelId,jdbcType=VARCHAR}, - ChannelUserId = #{channelUserId,jdbcType=VARCHAR}, - CreateTime = #{createTime,jdbcType=TIMESTAMP}, - UpdateTime = #{updateTime,jdbcType=TIMESTAMP} - where GoodsOrderId = #{goodsOrderId,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/static/app/app.js b/xxpay-shop/src/main/resources/static/app/app.js deleted file mode 100755 index 87cf1d19437531d5174623fdd4ee061bd07709d0..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/app/app.js +++ /dev/null @@ -1,5 +0,0 @@ -(function (angular) { - angular.module("myApp.controllers", []); - angular.module("myApp.services", []); - angular.module("myApp", ["ngResource", "myApp.controllers", "myApp.services"]); -}(angular)); \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/static/app/controllers.js b/xxpay-shop/src/main/resources/static/app/controllers.js deleted file mode 100755 index b073702d422aea219836ef18e497895db1b06e85..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/app/controllers.js +++ /dev/null @@ -1,30 +0,0 @@ -(function (angular) { - var AppController = function ($scope, Item) { - Item.query(function (response) { - $scope.items = response ? response : []; - }); - - $scope.addItem = function (content) { - new Item({ - content: content, - checked: false - }).$save(function (item) { - $scope.items.push(item); - }); - $scope.newItem = ""; - }; - - $scope.updateItem = function (item) { - item.$update(); - }; - - $scope.deleteItem = function (item) { - item.$remove(function () { - $scope.items.splice($scope.items.indexOf(item), 1); - }); - }; - }; - - AppController.$inject = ['$scope', 'Item']; - angular.module("myApp.controllers").controller("AppController", AppController); -}(angular)); \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/static/app/services.js b/xxpay-shop/src/main/resources/static/app/services.js deleted file mode 100755 index 8a496bdd058b72e6b8614bee7bfcd118cb1fb0a2..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/app/services.js +++ /dev/null @@ -1,17 +0,0 @@ -(function (angular) { - var ItemFactory = function ($resource) { - return $resource('/todos/:id', { - id: '@id' - }, { - update: { - method: "PUT" - }, - remove: { - method: "DELETE" - } - }); - }; - - ItemFactory.$inject = ['$resource']; - angular.module("myApp.services").factory("Item", ItemFactory); -}(angular)); \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/static/css/main.css b/xxpay-shop/src/main/resources/static/css/main.css deleted file mode 100755 index 55a570a9768bcda630f7567154bea83a872f3f60..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/css/main.css +++ /dev/null @@ -1,25 +0,0 @@ -html { - position: relative; - min-height: 100%; -} -body { - /* Margin bottom by footer height */ - margin-bottom: 60px; -} -.footer { - position: absolute; - bottom: 0; - width: 100%; - /* Set the fixed height of the footer here */ - height: 60px; - background-color: #f5f5f5; -} - -.container { - width: auto; - max-width: 680px; - padding: 0 15px; -} -.container .text-muted { - margin: 20px 0; -} \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/static/favicon.ico b/xxpay-shop/src/main/resources/static/favicon.ico deleted file mode 100644 index ce99f5c714d556f6070ac88b0a45b4c1376271cc..0000000000000000000000000000000000000000 Binary files a/xxpay-shop/src/main/resources/static/favicon.ico and /dev/null differ diff --git a/xxpay-shop/src/main/resources/static/js/qrcode.js b/xxpay-shop/src/main/resources/static/js/qrcode.js deleted file mode 100755 index 5507c154ffc1b9d061c55d88268a26eeba49a36e..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/js/qrcode.js +++ /dev/null @@ -1,614 +0,0 @@ -/** - * @fileoverview - * - Using the 'QRCode for Javascript library' - * - Fixed dataset of 'QRCode for Javascript library' for support full-spec. - * - this library has no dependencies. - * - * @author davidshimjs - * @see http://www.d-project.com/ - * @see http://jeromeetienne.github.com/jquery-qrcode/ - */ -var QRCode; - -(function () { - //--------------------------------------------------------------------- - // QRCode for JavaScript - // - // Copyright (c) 2009 Kazuhiko Arase - // - // URL: http://www.d-project.com/ - // - // Licensed under the MIT license: - // http://www.opensource.org/licenses/mit-license.php - // - // The word "QR Code" is registered trademark of - // DENSO WAVE INCORPORATED - // http://www.denso-wave.com/qrcode/faqpatent-e.html - // - //--------------------------------------------------------------------- - function QR8bitByte(data) { - this.mode = QRMode.MODE_8BIT_BYTE; - this.data = data; - this.parsedData = []; - - // Added to support UTF-8 Characters - for (var i = 0, l = this.data.length; i < l; i++) { - var byteArray = []; - var code = this.data.charCodeAt(i); - - if (code > 0x10000) { - byteArray[0] = 0xF0 | ((code & 0x1C0000) >>> 18); - byteArray[1] = 0x80 | ((code & 0x3F000) >>> 12); - byteArray[2] = 0x80 | ((code & 0xFC0) >>> 6); - byteArray[3] = 0x80 | (code & 0x3F); - } else if (code > 0x800) { - byteArray[0] = 0xE0 | ((code & 0xF000) >>> 12); - byteArray[1] = 0x80 | ((code & 0xFC0) >>> 6); - byteArray[2] = 0x80 | (code & 0x3F); - } else if (code > 0x80) { - byteArray[0] = 0xC0 | ((code & 0x7C0) >>> 6); - byteArray[1] = 0x80 | (code & 0x3F); - } else { - byteArray[0] = code; - } - - this.parsedData.push(byteArray); - } - - this.parsedData = Array.prototype.concat.apply([], this.parsedData); - - if (this.parsedData.length != this.data.length) { - this.parsedData.unshift(191); - this.parsedData.unshift(187); - this.parsedData.unshift(239); - } - } - - QR8bitByte.prototype = { - getLength: function (buffer) { - return this.parsedData.length; - }, - write: function (buffer) { - for (var i = 0, l = this.parsedData.length; i < l; i++) { - buffer.put(this.parsedData[i], 8); - } - } - }; - - function QRCodeModel(typeNumber, errorCorrectLevel) { - this.typeNumber = typeNumber; - this.errorCorrectLevel = errorCorrectLevel; - this.modules = null; - this.moduleCount = 0; - this.dataCache = null; - this.dataList = []; - } - - QRCodeModel.prototype={addData:function(data){var newData=new QR8bitByte(data);this.dataList.push(newData);this.dataCache=null;},isDark:function(row,col){if(row<0||this.moduleCount<=row||col<0||this.moduleCount<=col){throw new Error(row+","+col);} - return this.modules[row][col];},getModuleCount:function(){return this.moduleCount;},make:function(){this.makeImpl(false,this.getBestMaskPattern());},makeImpl:function(test,maskPattern){this.moduleCount=this.typeNumber*4+17;this.modules=new Array(this.moduleCount);for(var row=0;row=7){this.setupTypeNumber(test);} - if(this.dataCache==null){this.dataCache=QRCodeModel.createData(this.typeNumber,this.errorCorrectLevel,this.dataList);} - this.mapData(this.dataCache,maskPattern);},setupPositionProbePattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.moduleCount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.moduleCount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true;}else{this.modules[row+r][col+c]=false;}}}},getBestMaskPattern:function(){var minLostPoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeImpl(true,i);var lostPoint=QRUtil.getLostPoint(this);if(i==0||minLostPoint>lostPoint){minLostPoint=lostPoint;pattern=i;}} - return pattern;},createMovieClip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createEmptyMovieClip(instance_name,depth);var cs=1;this.make();for(var row=0;row>i)&1)==1);this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=mod;} - for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=mod;}},setupTypeInfo:function(test,maskPattern){var data=(this.errorCorrectLevel<<3)|maskPattern;var bits=QRUtil.getBCHTypeInfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod;}else if(i<8){this.modules[i+1][8]=mod;}else{this.modules[this.moduleCount-15+i][8]=mod;}} - for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.moduleCount-i-1]=mod;}else if(i<9){this.modules[8][15-i-1+1]=mod;}else{this.modules[8][15-i-1]=mod;}} - this.modules[this.moduleCount-8][8]=(!test);},mapData:function(data,maskPattern){var inc=-1;var row=this.moduleCount-1;var bitIndex=7;var byteIndex=0;for(var col=this.moduleCount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteIndex>>bitIndex)&1)==1);} - var mask=QRUtil.getMask(maskPattern,row,col-c);if(mask){dark=!dark;} - this.modules[row][col-c]=dark;bitIndex--;if(bitIndex==-1){byteIndex++;bitIndex=7;}}} - row+=inc;if(row<0||this.moduleCount<=row){row-=inc;inc=-inc;break;}}}}};QRCodeModel.PAD0=0xEC;QRCodeModel.PAD1=0x11;QRCodeModel.createData=function(typeNumber,errorCorrectLevel,dataList){var rsBlocks=QRRSBlock.getRSBlocks(typeNumber,errorCorrectLevel);var buffer=new QRBitBuffer();for(var i=0;itotalDataCount*8){throw new Error("code length overflow. (" - +buffer.getLengthInBits() - +">" - +totalDataCount*8 - +")");} - if(buffer.getLengthInBits()+4<=totalDataCount*8){buffer.put(0,4);} - while(buffer.getLengthInBits()%8!=0){buffer.putBit(false);} - while(true){if(buffer.getLengthInBits()>=totalDataCount*8){break;} - buffer.put(QRCodeModel.PAD0,8);if(buffer.getLengthInBits()>=totalDataCount*8){break;} - buffer.put(QRCodeModel.PAD1,8);} - return QRCodeModel.createBytes(buffer,rsBlocks);};QRCodeModel.createBytes=function(buffer,rsBlocks){var offset=0;var maxDcCount=0;var maxEcCount=0;var dcdata=new Array(rsBlocks.length);var ecdata=new Array(rsBlocks.length);for(var r=0;r=0)?modPoly.get(modIndex):0;}} - var totalCodeCount=0;for(var i=0;i=0){d^=(QRUtil.G15<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G15)));} - return((data<<10)|d)^QRUtil.G15_MASK;},getBCHTypeNumber:function(data){var d=data<<12;while(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)>=0){d^=(QRUtil.G18<<(QRUtil.getBCHDigit(d)-QRUtil.getBCHDigit(QRUtil.G18)));} - return(data<<12)|d;},getBCHDigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1;} - return digit;},getPatternPosition:function(typeNumber){return QRUtil.PATTERN_POSITION_TABLE[typeNumber-1];},getMask:function(maskPattern,i,j){switch(maskPattern){case QRMaskPattern.PATTERN000:return(i+j)%2==0;case QRMaskPattern.PATTERN001:return i%2==0;case QRMaskPattern.PATTERN010:return j%3==0;case QRMaskPattern.PATTERN011:return(i+j)%3==0;case QRMaskPattern.PATTERN100:return(Math.floor(i/2)+Math.floor(j/3))%2==0;case QRMaskPattern.PATTERN101:return(i*j)%2+(i*j)%3==0;case QRMaskPattern.PATTERN110:return((i*j)%2+(i*j)%3)%2==0;case QRMaskPattern.PATTERN111:return((i*j)%3+(i+j)%2)%2==0;default:throw new Error("bad maskPattern:"+maskPattern);}},getErrorCorrectPolynomial:function(errorCorrectLength){var a=new QRPolynomial([1],0);for(var i=0;i5){lostPoint+=(3+sameCount-5);}}} - for(var row=0;row=256){n-=255;} - return QRMath.EXP_TABLE[n];},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(var i=0;i<8;i++){QRMath.EXP_TABLE[i]=1<>>(7-index%8))&1)==1;},put:function(num,length){for(var i=0;i>>(length-i-1))&1)==1);}},getLengthInBits:function(){return this.length;},putBit:function(bit){var bufIndex=Math.floor(this.length/8);if(this.buffer.length<=bufIndex){this.buffer.push(0);} - if(bit){this.buffer[bufIndex]|=(0x80>>>(this.length%8));} - this.length++;}};var QRCodeLimitLength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]]; - - function _isSupportCanvas() { - return typeof CanvasRenderingContext2D != "undefined"; - } - - // android 2.x doesn't support Data-URI spec - function _getAndroid() { - var android = false; - var sAgent = navigator.userAgent; - - if (/android/i.test(sAgent)) { // android - android = true; - var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i); - - if (aMat && aMat[1]) { - android = parseFloat(aMat[1]); - } - } - - return android; - } - - var svgDrawer = (function() { - - var Drawing = function (el, htOption) { - this._el = el; - this._htOption = htOption; - }; - - Drawing.prototype.draw = function (oQRCode) { - var _htOption = this._htOption; - var _el = this._el; - var nCount = oQRCode.getModuleCount(); - var nWidth = Math.floor(_htOption.width / nCount); - var nHeight = Math.floor(_htOption.height / nCount); - - this.clear(); - - function makeSVG(tag, attrs) { - var el = document.createElementNS('http://www.w3.org/2000/svg', tag); - for (var k in attrs) - if (attrs.hasOwnProperty(k)) el.setAttribute(k, attrs[k]); - return el; - } - - var svg = makeSVG("svg" , {'viewBox': '0 0 ' + String(nCount) + " " + String(nCount), 'width': '100%', 'height': '100%', 'fill': _htOption.colorLight}); - svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); - _el.appendChild(svg); - - svg.appendChild(makeSVG("rect", {"fill": _htOption.colorLight, "width": "100%", "height": "100%"})); - svg.appendChild(makeSVG("rect", {"fill": _htOption.colorDark, "width": "1", "height": "1", "id": "template"})); - - for (var row = 0; row < nCount; row++) { - for (var col = 0; col < nCount; col++) { - if (oQRCode.isDark(row, col)) { - var child = makeSVG("use", {"x": String(col), "y": String(row)}); - child.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#template") - svg.appendChild(child); - } - } - } - }; - Drawing.prototype.clear = function () { - while (this._el.hasChildNodes()) - this._el.removeChild(this._el.lastChild); - }; - return Drawing; - })(); - - var useSVG = document.documentElement.tagName.toLowerCase() === "svg"; - - // Drawing in DOM by using Table tag - var Drawing = useSVG ? svgDrawer : !_isSupportCanvas() ? (function () { - var Drawing = function (el, htOption) { - this._el = el; - this._htOption = htOption; - }; - - /** - * Draw the QRCode - * - * @param {QRCode} oQRCode - */ - Drawing.prototype.draw = function (oQRCode) { - var _htOption = this._htOption; - var _el = this._el; - var nCount = oQRCode.getModuleCount(); - var nWidth = Math.floor(_htOption.width / nCount); - var nHeight = Math.floor(_htOption.height / nCount); - var aHTML = ['']; - - for (var row = 0; row < nCount; row++) { - aHTML.push(''); - - for (var col = 0; col < nCount; col++) { - aHTML.push(''); - } - - aHTML.push(''); - } - - aHTML.push('
                  '); - _el.innerHTML = aHTML.join(''); - - // Fix the margin values as real size. - var elTable = _el.childNodes[0]; - var nLeftMarginTable = (_htOption.width - elTable.offsetWidth) / 2; - var nTopMarginTable = (_htOption.height - elTable.offsetHeight) / 2; - - if (nLeftMarginTable > 0 && nTopMarginTable > 0) { - elTable.style.margin = nTopMarginTable + "px " + nLeftMarginTable + "px"; - } - }; - - /** - * Clear the QRCode - */ - Drawing.prototype.clear = function () { - this._el.innerHTML = ''; - }; - - return Drawing; - })() : (function () { // Drawing in Canvas - function _onMakeImage() { - this._elImage.src = this._elCanvas.toDataURL("image/png"); - this._elImage.style.display = "block"; - this._elCanvas.style.display = "none"; - } - - // Android 2.1 bug workaround - // http://code.google.com/p/android/issues/detail?id=5141 - if (this._android && this._android <= 2.1) { - var factor = 1 / window.devicePixelRatio; - var drawImage = CanvasRenderingContext2D.prototype.drawImage; - CanvasRenderingContext2D.prototype.drawImage = function (image, sx, sy, sw, sh, dx, dy, dw, dh) { - if (("nodeName" in image) && /img/i.test(image.nodeName)) { - for (var i = arguments.length - 1; i >= 1; i--) { - arguments[i] = arguments[i] * factor; - } - } else if (typeof dw == "undefined") { - arguments[1] *= factor; - arguments[2] *= factor; - arguments[3] *= factor; - arguments[4] *= factor; - } - - drawImage.apply(this, arguments); - }; - } - - /** - * Check whether the user's browser supports Data URI or not - * - * @private - * @param {Function} fSuccess Occurs if it supports Data URI - * @param {Function} fFail Occurs if it doesn't support Data URI - */ - function _safeSetDataURI(fSuccess, fFail) { - var self = this; - self._fFail = fFail; - self._fSuccess = fSuccess; - - // Check it just once - if (self._bSupportDataURI === null) { - var el = document.createElement("img"); - var fOnError = function() { - self._bSupportDataURI = false; - - if (self._fFail) { - self._fFail.call(self); - } - }; - var fOnSuccess = function() { - self._bSupportDataURI = true; - - if (self._fSuccess) { - self._fSuccess.call(self); - } - }; - - el.onabort = fOnError; - el.onerror = fOnError; - el.onload = fOnSuccess; - el.src = "data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=="; // the Image contains 1px data. - return; - } else if (self._bSupportDataURI === true && self._fSuccess) { - self._fSuccess.call(self); - } else if (self._bSupportDataURI === false && self._fFail) { - self._fFail.call(self); - } - }; - - /** - * Drawing QRCode by using canvas - * - * @constructor - * @param {HTMLElement} el - * @param {Object} htOption QRCode Options - */ - var Drawing = function (el, htOption) { - this._bIsPainted = false; - this._android = _getAndroid(); - - this._htOption = htOption; - this._elCanvas = document.createElement("canvas"); - this._elCanvas.width = htOption.width; - this._elCanvas.height = htOption.height; - el.appendChild(this._elCanvas); - this._el = el; - this._oContext = this._elCanvas.getContext("2d"); - this._bIsPainted = false; - this._elImage = document.createElement("img"); - this._elImage.alt = "Scan me!"; - this._elImage.style.display = "none"; - this._el.appendChild(this._elImage); - this._bSupportDataURI = null; - }; - - /** - * Draw the QRCode - * - * @param {QRCode} oQRCode - */ - Drawing.prototype.draw = function (oQRCode) { - var _elImage = this._elImage; - var _oContext = this._oContext; - var _htOption = this._htOption; - - var nCount = oQRCode.getModuleCount(); - var nWidth = _htOption.width / nCount; - var nHeight = _htOption.height / nCount; - var nRoundedWidth = Math.round(nWidth); - var nRoundedHeight = Math.round(nHeight); - - _elImage.style.display = "none"; - this.clear(); - - for (var row = 0; row < nCount; row++) { - for (var col = 0; col < nCount; col++) { - var bIsDark = oQRCode.isDark(row, col); - var nLeft = col * nWidth; - var nTop = row * nHeight; - _oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight; - _oContext.lineWidth = 1; - _oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight; - _oContext.fillRect(nLeft, nTop, nWidth, nHeight); - - // 안티 앨리어싱 방지 처리 - _oContext.strokeRect( - Math.floor(nLeft) + 0.5, - Math.floor(nTop) + 0.5, - nRoundedWidth, - nRoundedHeight - ); - - _oContext.strokeRect( - Math.ceil(nLeft) - 0.5, - Math.ceil(nTop) - 0.5, - nRoundedWidth, - nRoundedHeight - ); - } - } - - this._bIsPainted = true; - }; - - /** - * Make the image from Canvas if the browser supports Data URI. - */ - Drawing.prototype.makeImage = function () { - if (this._bIsPainted) { - _safeSetDataURI.call(this, _onMakeImage); - } - }; - - /** - * Return whether the QRCode is painted or not - * - * @return {Boolean} - */ - Drawing.prototype.isPainted = function () { - return this._bIsPainted; - }; - - /** - * Clear the QRCode - */ - Drawing.prototype.clear = function () { - this._oContext.clearRect(0, 0, this._elCanvas.width, this._elCanvas.height); - this._bIsPainted = false; - }; - - /** - * @private - * @param {Number} nNumber - */ - Drawing.prototype.round = function (nNumber) { - if (!nNumber) { - return nNumber; - } - - return Math.floor(nNumber * 1000) / 1000; - }; - - return Drawing; - })(); - - /** - * Get the type by string length - * - * @private - * @param {String} sText - * @param {Number} nCorrectLevel - * @return {Number} type - */ - function _getTypeNumber(sText, nCorrectLevel) { - var nType = 1; - var length = _getUTF8Length(sText); - - for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) { - var nLimit = 0; - - switch (nCorrectLevel) { - case QRErrorCorrectLevel.L : - nLimit = QRCodeLimitLength[i][0]; - break; - case QRErrorCorrectLevel.M : - nLimit = QRCodeLimitLength[i][1]; - break; - case QRErrorCorrectLevel.Q : - nLimit = QRCodeLimitLength[i][2]; - break; - case QRErrorCorrectLevel.H : - nLimit = QRCodeLimitLength[i][3]; - break; - } - - if (length <= nLimit) { - break; - } else { - nType++; - } - } - - if (nType > QRCodeLimitLength.length) { - throw new Error("Too long data"); - } - - return nType; - } - - function _getUTF8Length(sText) { - var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a'); - return replacedText.length + (replacedText.length != sText ? 3 : 0); - } - - /** - * @class QRCode - * @constructor - * @example - * new QRCode(document.getElementById("test"), "http://jindo.dev.naver.com/collie"); - * - * @example - * var oQRCode = new QRCode("test", { - * text : "http://naver.com", - * width : 128, - * height : 128 - * }); - * - * oQRCode.clear(); // Clear the QRCode. - * oQRCode.makeCode("http://map.naver.com"); // Re-create the QRCode. - * - * @param {HTMLElement|String} el target element or 'id' attribute of element. - * @param {Object|String} vOption - * @param {String} vOption.text QRCode link data - * @param {Number} [vOption.width=256] - * @param {Number} [vOption.height=256] - * @param {String} [vOption.colorDark="#000000"] - * @param {String} [vOption.colorLight="#ffffff"] - * @param {QRCode.CorrectLevel} [vOption.correctLevel=QRCode.CorrectLevel.H] [L|M|Q|H] - */ - QRCode = function (el, vOption) { - this._htOption = { - width : 256, - height : 256, - typeNumber : 4, - colorDark : "#000000", - colorLight : "#ffffff", - correctLevel : QRErrorCorrectLevel.H - }; - - if (typeof vOption === 'string') { - vOption = { - text : vOption - }; - } - - // Overwrites options - if (vOption) { - for (var i in vOption) { - this._htOption[i] = vOption[i]; - } - } - - if (typeof el == "string") { - el = document.getElementById(el); - } - - if (this._htOption.useSVG) { - Drawing = svgDrawer; - } - - this._android = _getAndroid(); - this._el = el; - this._oQRCode = null; - this._oDrawing = new Drawing(this._el, this._htOption); - - if (this._htOption.text) { - this.makeCode(this._htOption.text); - } - }; - - /** - * Make the QRCode - * - * @param {String} sText link data - */ - QRCode.prototype.makeCode = function (sText) { - this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel); - this._oQRCode.addData(sText); - this._oQRCode.make(); - this._el.title = sText; - this._oDrawing.draw(this._oQRCode); - this.makeImage(); - }; - - /** - * Make the Image from Canvas element - * - It occurs automatically - * - Android below 3 doesn't support Data-URI spec. - * - * @private - */ - QRCode.prototype.makeImage = function () { - if (typeof this._oDrawing.makeImage == "function" && (!this._android || this._android >= 3)) { - this._oDrawing.makeImage(); - } - }; - - /** - * Clear the QRCode - */ - QRCode.prototype.clear = function () { - this._oDrawing.clear(); - }; - - /** - * @name QRCode.CorrectLevel - */ - QRCode.CorrectLevel = QRErrorCorrectLevel; -})(); diff --git a/xxpay-shop/src/main/resources/static/js/qrcode.min.js b/xxpay-shop/src/main/resources/static/js/qrcode.min.js deleted file mode 100755 index 993e88f396640f881b69f98db7a4d17401ef83ca..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/static/js/qrcode.min.js +++ /dev/null @@ -1 +0,0 @@ -var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h8*l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j=0?p.get(q):0}}for(var r=0,m=0;mm;m++)for(var j=0;jm;m++)for(var j=0;j=0;)b^=f.G15<=0;)b^=f.G18<>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error("glog("+a+")");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;cf;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=[''],h=0;d>h;h++){g.push("");for(var i=0;d>i;i++)g.push('');g.push("")}g.push("
                  "),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}(); \ No newline at end of file diff --git a/xxpay-shop/src/main/resources/templates/openQrPay.ftl b/xxpay-shop/src/main/resources/templates/openQrPay.ftl deleted file mode 100755 index 83e5d11c40709b9522cc445c0ec9cb6ea75ed97c..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/templates/openQrPay.ftl +++ /dev/null @@ -1,105 +0,0 @@ -<#assign base = request.contextPath /> - - - - - - - - - - 【XXPAY】分布式开源聚合支付 - - - - - - - - - - - - -
                  - -
                  -
                  -

                  #扫码测试#

                  -
                  - 0.01 元   - 1.00 元   - 10.00 元   - 任意: 元 -
                  -
                  -
                  -

                  0.01元

                  -

                  请使用支付宝或微信手机客户端扫一扫

                  -
                  -
                  -
                  -
                  - -
                  -
                  -

                  ©2017 xxpay

                  -
                  -
                  - - - - - - - - - - - - diff --git a/xxpay-shop/src/main/resources/templates/qrPay.ftl b/xxpay-shop/src/main/resources/templates/qrPay.ftl deleted file mode 100644 index fa8e243949ffd72ed84b77b4aa67946f72321ed8..0000000000000000000000000000000000000000 --- a/xxpay-shop/src/main/resources/templates/qrPay.ftl +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - XXPAY支付中心 - - - - -<#if (orderMap.resCode == 'SUCCESS')> -
                  ¥ ${amount}
                  -
                  - - - - - - - - - -
                  购买商品${goodsOrder.goodsName}
                  收款方北京骏易科技有限公司
                  -
                  - <#if (client == 'alipay')> - ${orderMap.payUrl} - - <#if (client == 'wx')> - - -<#else> -
                  - <#if (result == 'failed')> - ${resMsg} - -
                  - - - \ No newline at end of file diff --git a/xxpay4dubbo/pom.xml b/xxpay4dubbo/pom.xml deleted file mode 100755 index dd81159abc1323f86126c12b2a4b5754dd6f6f20..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4dubbo - 1.0.0 - pom - xxpay4dubbo - xxpay4dubbo - - - xxpay4dubbo-api - xxpay4dubbo-web - xxpay4dubbo-service - - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - UTF-8 - UTF-8 - 1.8 - 1.5.6.RELEASE - 1.0.0 - - - - - - io.dubbo.springboot - spring-boot-starter-dubbo - ${springboot.dubbo.version} - - - org.springframework.boot - spring-boot-starter-web - ${springboot.version} - - - - - \ No newline at end of file diff --git a/xxpay4dubbo/xxpay4dubbo-api/pom.xml b/xxpay4dubbo/xxpay4dubbo-api/pom.xml deleted file mode 100755 index 3d9127111cd728faa0d47e00fc8e24394094054b..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4dubbo-api - 1.0.0 - jar - xxpay4dubbo-api - xxpay4dubbo-api - - - org.xxpay - xxpay4dubbo - 1.0.0 - - - - 1.7.0 - - - - - - org.xxpay - xxpay-common - 1.0.0 - - - - \ No newline at end of file diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchInfoService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchInfoService.java deleted file mode 100644 index d166ca23bbe303b2d0982b57ce438d011c25dfab..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchInfoService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IMchInfoService { - - Map selectMchInfo(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchNotifyService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchNotifyService.java deleted file mode 100644 index c4ca11555d3e2e5a24e09e186b90a398b7c8e66a..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IMchNotifyService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/26 - * @description: 商户通知业务 - */ -public interface IMchNotifyService { - - - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/INotifyPayService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/INotifyPayService.java deleted file mode 100644 index 07cf6d19f5404ba79f0229a234abb086492b4e4c..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/INotifyPayService.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -public interface INotifyPayService { - - Map doAliPayNotify(String jsonParam); - - Map doWxPayNotify(String jsonParam); - - Map sendBizPayNotify(String jsonParam); -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4AliService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4AliService.java deleted file mode 100644 index 2096e67c93ce38155c2cfa5433895d6c7ad4437b..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4AliService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -public interface IPayChannel4AliService { - - Map doAliPayWapReq(String jsonParam); - - Map doAliPayPcReq(String jsonParam); - - Map doAliPayMobileReq(String jsonParam); - - Map doAliPayQrReq(String jsonParam); - - Map doAliTransReq(String jsonParam); - - Map getAliTransReq(String jsonParam); - - Map doAliRefundReq(String jsonParam); - - Map getAliRefundReq(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4WxService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4WxService.java deleted file mode 100644 index 78b022564233cdf45edf780d5f9397570cd098f5..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannel4WxService.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -public interface IPayChannel4WxService { - - Map doWxPayReq(String jsonParam); - - Map doWxTransReq(String jsonParam); - - Map getWxTransReq(String jsonParam); - - Map doWxRefundReq(String jsonParam); - - Map getWxRefundReq(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannelService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannelService.java deleted file mode 100644 index 8fdbc956cb2988252a863d53a43c00312c8e5df3..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayChannelService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IPayChannelService { - - Map selectPayChannel(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayOrderService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayOrderService.java deleted file mode 100644 index 79a32ba5fcba945af324f97962429d0ad46cff1e..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IPayOrderService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IPayOrderService { - - Map create(String jsonParam); - - Map select(String jsonParam); - - Map selectByMchIdAndPayOrderId(String jsonParam); - - Map selectByMchIdAndMchOrderNo(String jsonParam); - - Map updateStatus4Ing(String jsonParam); - - Map updateStatus4Success(String jsonParam); - - Map updateStatus4Complete(String jsonParam); - - Map updateNotify(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IRefundOrderService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IRefundOrderService.java deleted file mode 100644 index 8429474e4eb135b9982941914276b6b3fea2e61d..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/IRefundOrderService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/26 - * @description: 退款业务 - */ -public interface IRefundOrderService { - - Map create(String jsonParam); - - Map select(String jsonParam); - - Map selectByMchIdAndRefundOrderId(String jsonParam); - - Map selectByMchIdAndMchRefundNo(String jsonParam); - - Map updateStatus4Ing(String jsonParam); - - Map updateStatus4Success(String jsonParam); - - Map updateStatus4Complete(String jsonParam); - - Map sendRefundNotify(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/ITransOrderService.java b/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/ITransOrderService.java deleted file mode 100644 index b1c671e6cae43087fe26158550e66c002a12b0d4..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-api/src/main/java/org/xxpay/dubbo/api/service/ITransOrderService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.xxpay.dubbo.api.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/26 - * @description: 转账业务 - */ -public interface ITransOrderService { - - Map create(String jsonParam); - - Map select(String jsonParam); - - Map selectByMchIdAndTransOrderId(String jsonParam); - - Map selectByMchIdAndMchTransNo(String jsonParam); - - Map updateStatus4Ing(String jsonParam); - - Map updateStatus4Success(String jsonParam); - - Map updateStatus4Complete(String jsonParam); - - Map sendTransNotify(String jsonParam); - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/pom.xml b/xxpay4dubbo/xxpay4dubbo-service/pom.xml deleted file mode 100755 index a9e6a5f7e08cf6f85a68de57ccd5fb7384380d09..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4dubbo-service - 1.0.0 - jar - xxpay4dubbo-service - xxpay4dubbo-service - - - org.xxpay - xxpay4dubbo - 1.0.0 - - - - - org.xxpay - xxpay4dubbo-api - 1.0.0 - - - org.xxpay - xxpay-dal - 1.0.0 - - - io.dubbo.springboot - spring-boot-starter-dubbo - - - org.springframework.boot - spring-boot-starter-activemq - - - org.apache.activemq - activemq-pool - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - org.springframework.boot - spring-boot-configuration-processor - - - org.springframework.boot - spring-boot-starter-test - test - - - - com.github.binarywang - weixin-java-pay - 2.8.0 - - - - com.alipay - sdk - 1.5 - system - ${basedir}/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar - - - - - - - src/main/webapp/WEB-INF/lib/ - BOOT-INF/lib/ - - **/*.jar - - - - src/main/resources - BOOT-INF/classes/ - - - src/main/resources - - - - - org.springframework.boot - spring-boot-maven-plugin - ${springboot.version} - - - - \ No newline at end of file diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/XxPayDubboServiceAppliaction.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/XxPayDubboServiceAppliaction.java deleted file mode 100755 index 5c179c09345e70e0fec6c38843a7c0e61db5bde8..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/XxPayDubboServiceAppliaction.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.xxpay.dubbo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; - -/** - * - */ -@SpringBootApplication -@ComponentScan(basePackages={"org.xxpay"}) -public class XxPayDubboServiceAppliaction { - public static void main(String[] args) { - SpringApplication.run(XxPayDubboServiceAppliaction.class, args); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchPay.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchPay.java deleted file mode 100644 index 08b24bba889ee6bfb951bd3bf4cab656e7bd4305..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchPay.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.xxpay.dubbo.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dubbo.service.mq.Mq4MchPayNotify; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 商户支付通知处理基类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-11-01 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class BaseNotify4MchPay extends BaseService4PayOrder { - - private static final MyLog _log = MyLog.getLog(BaseNotify4MchPay.class); - - @Autowired - private Mq4MchPayNotify mq4MchPayNotify; - - /** - * 创建响应URL - * @param payOrder - * @param backType 1:前台页面;2:后台接口 - * @return - */ - public String createNotifyUrl(PayOrder payOrder, String backType) { - String mchId = payOrder.getMchId(); - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - String resKey = mchInfo.getResKey(); - Map paramMap = new HashMap<>(); - paramMap.put("payOrderId", ObjectUtils.defaultIfNull(payOrder.getPayOrderId(), "")); // 支付订单号 - paramMap.put("mchId", ObjectUtils.defaultIfNull(payOrder.getMchId(), "")); // 商户ID - paramMap.put("mchOrderNo", ObjectUtils.defaultIfNull(payOrder.getMchOrderNo(), "")); // 商户订单号 - paramMap.put("channelId", ObjectUtils.defaultIfNull(payOrder.getChannelId(), "")); // 渠道ID - paramMap.put("amount", ObjectUtils.defaultIfNull(payOrder.getAmount(), "")); // 支付金额 - paramMap.put("currency", ObjectUtils.defaultIfNull(payOrder.getCurrency(), "")); // 货币类型 - paramMap.put("status", ObjectUtils.defaultIfNull(payOrder.getStatus(), "")); // 支付状态 - paramMap.put("clientIp", ObjectUtils.defaultIfNull(payOrder.getClientIp(), "")); // 客户端IP - paramMap.put("device", ObjectUtils.defaultIfNull(payOrder.getDevice(), "")); // 设备 - paramMap.put("subject", ObjectUtils.defaultIfNull(payOrder.getSubject(), "")); // 商品标题 - paramMap.put("channelOrderNo", ObjectUtils.defaultIfNull(payOrder.getChannelOrderNo(), "")); // 渠道订单号 - paramMap.put("param1", ObjectUtils.defaultIfNull(payOrder.getParam1(), "")); // 扩展参数1 - paramMap.put("param2", ObjectUtils.defaultIfNull(payOrder.getParam2(), "")); // 扩展参数2 - paramMap.put("paySuccTime", ObjectUtils.defaultIfNull(payOrder.getPaySuccTime(), "")); // 支付成功时间 - paramMap.put("backType", ObjectUtils.defaultIfNull(backType, "")); - // 先对原文签名 - String reqSign = PayDigestUtil.getSign(paramMap, resKey); - paramMap.put("sign", reqSign); // 签名 - // 签名后再对有中文参数编码 - try { - paramMap.put("device", URLEncoder.encode(ObjectUtils.defaultIfNull(payOrder.getDevice(), ""), PayConstant.RESP_UTF8)); - paramMap.put("subject", URLEncoder.encode(ObjectUtils.defaultIfNull(payOrder.getSubject(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param1", URLEncoder.encode(ObjectUtils.defaultIfNull(payOrder.getParam1(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param2", URLEncoder.encode(ObjectUtils.defaultIfNull(payOrder.getParam2(), ""), PayConstant.RESP_UTF8)); - }catch (UnsupportedEncodingException e) { - _log.error("URL Encode exception.", e); - return null; - } - String param = XXPayUtil.genUrlParams(paramMap); - StringBuffer sb = new StringBuffer(); - sb.append(payOrder.getNotifyUrl()).append("?").append(param); - return sb.toString(); - } - - /** - * 处理支付结果后台服务器通知 - */ - public void doNotify(PayOrder payOrder, boolean isFirst) { - _log.info(">>>>>> PAY开始回调通知业务系统 <<<<<<"); - // 发起后台通知业务系统 - JSONObject object = createNotifyInfo(payOrder, isFirst); - try { - mq4MchPayNotify.send(object.toJSONString()); - } catch (Exception e) { - _log.error(e, "payOrderId=%s,sendMessage error.", ObjectUtils.defaultIfNull(payOrder.getPayOrderId(), "")); - } - _log.info(">>>>>> PAY回调通知业务系统完成 <<<<<<"); - } - - public JSONObject createNotifyInfo(PayOrder payOrder, boolean isFirst) { - String url = createNotifyUrl(payOrder, "2"); - if(isFirst) { - int result = baseInsertMchNotify(payOrder.getPayOrderId(), payOrder.getMchId(), payOrder.getMchOrderNo(), PayConstant.MCH_NOTIFY_TYPE_PAY, url); - _log.info("增加商户通知记录,orderId={},result:{}", payOrder.getPayOrderId(), result); - } - int count = 0; - if(!isFirst) { - MchNotify mchNotify = baseSelectMchNotify(payOrder.getPayOrderId()); - if(mchNotify != null) count = mchNotify.getNotifyCount(); - } - JSONObject object = new JSONObject(); - object.put("method", "GET"); - object.put("url", url); - object.put("orderId", payOrder.getPayOrderId()); - object.put("count", count); - object.put("createTime", System.currentTimeMillis()); - return object; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchRefund.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchRefund.java deleted file mode 100644 index 103f6f6d39f3022a6c79d7f28fa330b3ae260ca1..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchRefund.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.dubbo.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dubbo.service.mq.Mq4MchRefundNotify; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 商户转账通知处理基类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-11-01 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class BaseNotify4MchRefund extends BaseService4RefundOrder { - - private static final MyLog _log = MyLog.getLog(BaseNotify4MchRefund.class); - - @Autowired - private Mq4MchRefundNotify mq4MchRefundNotify; - - /** - * 创建响应URL - * @param refundOrder - * @param backType 1:前台页面;2:后台接口 - * @return - */ - public String createNotifyUrl(RefundOrder refundOrder, String backType) { - String mchId = refundOrder.getMchId(); - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - String resKey = mchInfo.getResKey(); - Map paramMap = new HashMap<>(); - paramMap.put("refundOrderId", ObjectUtils.defaultIfNull(refundOrder.getRefundOrderId(), "")); // 退款订单号 - paramMap.put("mchId", ObjectUtils.defaultIfNull(refundOrder.getMchId(), "")); // 商户ID - paramMap.put("mchOrderNo", ObjectUtils.defaultIfNull(refundOrder.getMchRefundNo(), "")); // 商户订单号 - paramMap.put("channelId", ObjectUtils.defaultIfNull(refundOrder.getChannelId(), "")); // 渠道ID - paramMap.put("refundAmount", ObjectUtils.defaultIfNull(refundOrder.getRefundAmount(), "")); // 退款金额 - paramMap.put("currency", ObjectUtils.defaultIfNull(refundOrder.getCurrency(), "")); // 货币类型 - paramMap.put("status", ObjectUtils.defaultIfNull(refundOrder.getStatus(), "")); // 退款状态 - paramMap.put("result", ObjectUtils.defaultIfNull(refundOrder.getResult(), "")); // 退款结果 - paramMap.put("clientIp", ObjectUtils.defaultIfNull(refundOrder.getClientIp(), "")); // 客户端IP - paramMap.put("device", ObjectUtils.defaultIfNull(refundOrder.getDevice(), "")); // 设备 - paramMap.put("channelOrderNo", ObjectUtils.defaultIfNull(refundOrder.getChannelOrderNo(), "")); // 渠道订单号 - paramMap.put("param1", ObjectUtils.defaultIfNull(refundOrder.getParam1(), "")); // 扩展参数1 - paramMap.put("param2", ObjectUtils.defaultIfNull(refundOrder.getParam2(), "")); // 扩展参数2 - paramMap.put("refundSuccTime", ObjectUtils.defaultIfNull(refundOrder.getRefundSuccTime(), "")); // 退款成功时间 - paramMap.put("backType", backType==null ? "" : backType); - // 先对原文签名 - String reqSign = PayDigestUtil.getSign(paramMap, resKey); - paramMap.put("sign", reqSign); // 签名 - // 签名后再对有中文参数编码 - try { - paramMap.put("device", URLEncoder.encode(ObjectUtils.defaultIfNull(refundOrder.getDevice(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param1", URLEncoder.encode(ObjectUtils.defaultIfNull(refundOrder.getParam1(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param2", URLEncoder.encode(ObjectUtils.defaultIfNull(refundOrder.getParam2(), ""), PayConstant.RESP_UTF8)); - }catch (UnsupportedEncodingException e) { - _log.error("URL Encode exception.", e); - return null; - } - String param = XXPayUtil.genUrlParams(paramMap); - StringBuffer sb = new StringBuffer(); - sb.append(refundOrder.getNotifyUrl()).append("?").append(param); - return sb.toString(); - } - - /** - * 处理商户转账后台服务器通知 - */ - public void doNotify(RefundOrder refundOrder, boolean isFirst) { - _log.info(">>>>>> REFUND开始回调通知业务系统 <<<<<<"); - // 发起后台通知业务系统 - JSONObject object = createNotifyInfo(refundOrder, isFirst); - try { - mq4MchRefundNotify.send(object.toJSONString()); - } catch (Exception e) { - _log.error(e, "refundOrderId=%s,sendMessage error.", ObjectUtils.defaultIfNull(refundOrder.getRefundOrderId(), "")); - } - _log.info(">>>>>> REFUND回调通知业务系统完成 <<<<<<"); - } - - public JSONObject createNotifyInfo(RefundOrder refundOrder, boolean isFirst) { - String url = createNotifyUrl(refundOrder, "2"); - if(isFirst) { - int result = baseInsertMchNotify(refundOrder.getRefundOrderId(), refundOrder.getMchId(), refundOrder.getMchRefundNo(), PayConstant.MCH_NOTIFY_TYPE_REFUND, url); - _log.info("增加商户通知记录,orderId={},result:{}", refundOrder.getRefundOrderId(), result); - } - int count = 0; - if(!isFirst) { - MchNotify mchNotify = baseSelectMchNotify(refundOrder.getRefundOrderId()); - if(mchNotify != null) count = mchNotify.getNotifyCount(); - } - JSONObject object = new JSONObject(); - object.put("method", "GET"); - object.put("url", url); - object.put("orderId", refundOrder.getRefundOrderId()); - object.put("count", count); - object.put("createTime", System.currentTimeMillis()); - return object; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchTrans.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchTrans.java deleted file mode 100644 index bc26d367e2d6355ded13cdb6f9ec98c0b8ac20b2..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseNotify4MchTrans.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.dubbo.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.MchNotify; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.service.mq.Mq4MchTransNotify; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 商户转账通知处理基类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-11-01 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class BaseNotify4MchTrans extends BaseService4TransOrder { - - private static final MyLog _log = MyLog.getLog(BaseNotify4MchTrans.class); - - @Autowired - private Mq4MchTransNotify mq4MchTransNotify; - - /** - * 创建响应URL - * @param transOrder - * @param backType 1:前台页面;2:后台接口 - * @return - */ - public String createNotifyUrl(TransOrder transOrder, String backType) { - String mchId = transOrder.getMchId(); - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - String resKey = mchInfo.getResKey(); - Map paramMap = new HashMap<>(); - paramMap.put("transOrderId", ObjectUtils.defaultIfNull(transOrder.getTransOrderId(), "")); // 转账订单号 - paramMap.put("mchId", ObjectUtils.defaultIfNull(transOrder.getMchId(), "")); // 商户ID - paramMap.put("mchOrderNo", ObjectUtils.defaultIfNull(transOrder.getMchTransNo(), "")); // 商户订单号 - paramMap.put("channelId", ObjectUtils.defaultIfNull(transOrder.getChannelId(), "")); // 渠道ID - paramMap.put("amount", ObjectUtils.defaultIfNull(transOrder.getAmount(), "")); // 支付金额 - paramMap.put("currency", ObjectUtils.defaultIfNull(transOrder.getCurrency(), "")); // 货币类型 - paramMap.put("status", ObjectUtils.defaultIfNull(transOrder.getStatus(), "")); // 转账状态 - paramMap.put("result", ObjectUtils.defaultIfNull(transOrder.getResult(), "")); // 转账结果 - paramMap.put("clientIp", ObjectUtils.defaultIfNull(transOrder.getClientIp(), "")); // 客户端IP - paramMap.put("device", ObjectUtils.defaultIfNull(transOrder.getDevice(), "")); // 设备 - paramMap.put("channelOrderNo", ObjectUtils.defaultIfNull(transOrder.getChannelOrderNo(), "")); // 渠道订单号 - paramMap.put("param1", ObjectUtils.defaultIfNull(transOrder.getParam1(), "")); // 扩展参数1 - paramMap.put("param2", ObjectUtils.defaultIfNull(transOrder.getParam2(), "")); // 扩展参数2 - paramMap.put("transSuccTime", ObjectUtils.defaultIfNull(transOrder.getTransSuccTime(), "")); // 转账成功时间 - paramMap.put("backType", backType==null ? "" : backType); - // 先对原文签名 - String reqSign = PayDigestUtil.getSign(paramMap, resKey); - paramMap.put("sign", reqSign); // 签名 - // 签名后再对有中文参数编码 - try { - paramMap.put("device", URLEncoder.encode(ObjectUtils.defaultIfNull(transOrder.getDevice(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param1", URLEncoder.encode(ObjectUtils.defaultIfNull(transOrder.getParam1(), ""), PayConstant.RESP_UTF8)); - paramMap.put("param2", URLEncoder.encode(ObjectUtils.defaultIfNull(transOrder.getParam2(), ""), PayConstant.RESP_UTF8)); - }catch (UnsupportedEncodingException e) { - _log.error("URL Encode exception.", e); - return null; - } - String param = XXPayUtil.genUrlParams(paramMap); - StringBuffer sb = new StringBuffer(); - sb.append(transOrder.getNotifyUrl()).append("?").append(param); - return sb.toString(); - } - - /** - * 处理商户转账后台服务器通知 - */ - public void doNotify(TransOrder transOrder, boolean isFirst) { - _log.info(">>>>>> TRANS开始回调通知业务系统 <<<<<<"); - // 发起后台通知业务系统 - JSONObject object = createNotifyInfo(transOrder, isFirst); - try { - mq4MchTransNotify.send(object.toJSONString()); - } catch (Exception e) { - _log.error(e, "transOrderId=%s,sendMessage error.", ObjectUtils.defaultIfNull(transOrder.getTransOrderId(), "")); - } - _log.info(">>>>>> TRANS回调通知业务系统完成 <<<<<<"); - } - - public JSONObject createNotifyInfo(TransOrder transOrder, boolean isFirst) { - String url = createNotifyUrl(transOrder, "2"); - if(isFirst) { - int result = baseInsertMchNotify(transOrder.getTransOrderId(), transOrder.getMchId(), transOrder.getMchTransNo(), PayConstant.MCH_NOTIFY_TYPE_TRANS, url); - _log.info("增加商户通知记录,orderId={},result:{}", transOrder.getTransOrderId(), result); - } - int count = 0; - if(!isFirst) { - MchNotify mchNotify = baseSelectMchNotify(transOrder.getTransOrderId()); - if(mchNotify != null) count = mchNotify.getNotifyCount(); - } - JSONObject object = new JSONObject(); - object.put("method", "GET"); - object.put("url", url); - object.put("orderId", transOrder.getTransOrderId()); - object.put("count", count); - object.put("createTime", System.currentTimeMillis()); - return object; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService.java deleted file mode 100644 index ee7336707d96c95ec263e067d2c01289cf6f435e..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService.java +++ /dev/null @@ -1,94 +0,0 @@ -package org.xxpay.dubbo.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.MchInfoMapper; -import org.xxpay.dal.dao.mapper.MchNotifyMapper; -import org.xxpay.dal.dao.mapper.PayChannelMapper; -import org.xxpay.dal.dao.model.*; - -import java.util.Date; -import java.util.LinkedList; -import java.util.List; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -@Service -public class BaseService { - - @Autowired - private MchInfoMapper mchInfoMapper; - - @Autowired - private PayChannelMapper payChannelMapper; - - @Autowired - private MchNotifyMapper mchNotifyMapper; - - public MchInfo baseSelectMchInfo(String mchId) { - return mchInfoMapper.selectByPrimaryKey(mchId); - } - - public PayChannel baseSelectPayChannel(String mchId, String channelId) { - PayChannelExample example = new PayChannelExample(); - PayChannelExample.Criteria criteria = example.createCriteria(); - criteria.andChannelIdEqualTo(channelId); - criteria.andMchIdEqualTo(mchId); - List payChannelList = payChannelMapper.selectByExample(example); - if(CollectionUtils.isEmpty(payChannelList)) return null; - return payChannelList.get(0); - } - - public MchNotify baseSelectMchNotify(String orderId) { - return mchNotifyMapper.selectByPrimaryKey(orderId); - } - - public int baseInsertMchNotify(String orderId, String mchId, String mchOrderNo, String orderType, String notifyUrl) { - MchNotify mchNotify = new MchNotify(); - mchNotify.setOrderId(orderId); - mchNotify.setMchId(mchId); - mchNotify.setMchOrderNo(mchOrderNo); - mchNotify.setOrderType(orderType); - mchNotify.setNotifyUrl(notifyUrl); - return mchNotifyMapper.insertSelectiveOnDuplicateKeyUpdate(mchNotify); - } - - public int baseUpdateMchNotifySuccess(String orderId, String result, byte notifyCount) { - MchNotify mchNotify = new MchNotify(); - mchNotify.setStatus(PayConstant.MCH_NOTIFY_STATUS_SUCCESS); - mchNotify.setResult(result); - mchNotify.setNotifyCount(notifyCount); - mchNotify.setLastNotifyTime(new Date()); - MchNotifyExample example = new MchNotifyExample(); - MchNotifyExample.Criteria criteria = example.createCriteria(); - criteria.andOrderIdEqualTo(orderId); - List values = new LinkedList<>(); - values.add(PayConstant.MCH_NOTIFY_STATUS_NOTIFYING); - values.add(PayConstant.MCH_NOTIFY_STATUS_FAIL); - criteria.andStatusIn(values); - return mchNotifyMapper.updateByExampleSelective(mchNotify, example); - } - - public int baseUpdateMchNotifyFail(String orderId, String result, byte notifyCount) { - MchNotify mchNotify = new MchNotify(); - mchNotify.setStatus(PayConstant.MCH_NOTIFY_STATUS_FAIL); - mchNotify.setResult(result); - mchNotify.setNotifyCount(notifyCount); - mchNotify.setLastNotifyTime(new Date()); - MchNotifyExample example = new MchNotifyExample(); - MchNotifyExample.Criteria criteria = example.createCriteria(); - criteria.andOrderIdEqualTo(orderId); - List values = new LinkedList<>(); - values.add(PayConstant.MCH_NOTIFY_STATUS_NOTIFYING); - values.add(PayConstant.MCH_NOTIFY_STATUS_FAIL); - return mchNotifyMapper.updateByExampleSelective(mchNotify, example); - } - - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4PayOrder.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4PayOrder.java deleted file mode 100644 index 1fc40e1956d40768426ce92cd925d715ba86bce3..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4PayOrder.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.xxpay.dubbo.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.PayOrderMapper; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.PayOrderExample; - -import java.util.List; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service -public class BaseService4PayOrder extends BaseService{ - - @Autowired - private PayOrderMapper payOrderMapper; - - public int baseCreatePayOrder(PayOrder payOrder) { - return payOrderMapper.insertSelective(payOrder); - } - - public PayOrder baseSelectPayOrder(String payOrderId) { - return payOrderMapper.selectByPrimaryKey(payOrderId); - } - - public PayOrder baseSelectByMchIdAndPayOrderId(String mchId, String payOrderId) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andPayOrderIdEqualTo(payOrderId); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public PayOrder baseSelectByMchIdAndMchOrderNo(String mchId, String mchOrderNo) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andMchOrderNoEqualTo(mchOrderNo); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public int baseUpdateStatus4Ing(String payOrderId, String channelOrderNo) { - PayOrder payOrder = new PayOrder(); - payOrder.setStatus(PayConstant.PAY_STATUS_PAYING); - if(channelOrderNo != null) payOrder.setChannelOrderNo(channelOrderNo); - payOrder.setPaySuccTime(System.currentTimeMillis()); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_INIT); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateStatus4Success(String payOrderId) { - return baseUpdateStatus4Success(payOrderId, null); - } - - public int baseUpdateStatus4Success(String payOrderId, String channelOrderNo) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - payOrder.setPaySuccTime(System.currentTimeMillis()); - if(StringUtils.isNotBlank(channelOrderNo)) payOrder.setChannelOrderNo(channelOrderNo); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_PAYING); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateStatus4Complete(String payOrderId) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_COMPLETE); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_SUCCESS); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateNotify(String payOrderId, byte count) { - PayOrder newPayOrder = new PayOrder(); - newPayOrder.setNotifyCount(count); - newPayOrder.setLastNotifyTime(System.currentTimeMillis()); - newPayOrder.setPayOrderId(payOrderId); - return payOrderMapper.updateByPrimaryKeySelective(newPayOrder); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4RefundOrder.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4RefundOrder.java deleted file mode 100644 index a4cf6a8183b469784cb0a620d3ea6312e1d6119a..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4RefundOrder.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.xxpay.dubbo.service; - -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.RefundOrderMapper; -import org.xxpay.dal.dao.mapper.TransOrderMapper; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.RefundOrderExample; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dal.dao.model.TransOrderExample; - -import java.util.Date; -import java.util.List; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service -public class BaseService4RefundOrder extends BaseService{ - - @Autowired - private RefundOrderMapper refundOrderMapper; - - public int baseCreateRefundOrder(RefundOrder refundOrder) { - return refundOrderMapper.insertSelective(refundOrder); - } - - public RefundOrder baseSelectRefundOrder(String refundOrderId) { - return refundOrderMapper.selectByPrimaryKey(refundOrderId); - } - - public RefundOrder baseSelectByMchIdAndRefundOrderId(String mchId, String refundOrderId) { - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andRefundOrderIdEqualTo(refundOrderId); - List refundOrderList = refundOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(refundOrderList) ? null : refundOrderList.get(0); - } - - public RefundOrder baseSelectByMchIdAndMchRefundNo(String mchId, String mchRefundNo) { - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andMchRefundNoEqualTo(mchRefundNo); - List refundOrderList = refundOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(refundOrderList) ? null : refundOrderList.get(0); - } - - public int baseUpdateStatus4Ing(String refundOrderId, String channelOrderNo) { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setStatus(PayConstant.REFUND_STATUS_REFUNDING); - if(channelOrderNo != null) refundOrder.setChannelOrderNo(channelOrderNo); - refundOrder.setRefundSuccTime(new Date()); - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andRefundOrderIdEqualTo(refundOrderId); - criteria.andStatusEqualTo(PayConstant.REFUND_STATUS_INIT); - return refundOrderMapper.updateByExampleSelective(refundOrder, example); - } - - public int baseUpdateStatus4Success(String refundOrderId) { - return baseUpdateStatus4Success(refundOrderId, null); - } - - public int baseUpdateStatus4Success(String refundOrderId, String channelOrderNo) { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId(refundOrderId); - refundOrder.setStatus(PayConstant.REFUND_STATUS_SUCCESS); - refundOrder.setResult(PayConstant.REFUND_RESULT_SUCCESS); - refundOrder.setRefundSuccTime(new Date()); - if(StringUtils.isNotBlank(channelOrderNo)) refundOrder.setChannelOrderNo(channelOrderNo); - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andRefundOrderIdEqualTo(refundOrderId); - criteria.andStatusEqualTo(PayConstant.REFUND_STATUS_REFUNDING); - return refundOrderMapper.updateByExampleSelective(refundOrder, example); - } - - public int baseUpdateStatus4Complete(String refundOrderId) { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId(refundOrderId); - refundOrder.setStatus(PayConstant.REFUND_STATUS_COMPLETE); - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andRefundOrderIdEqualTo(refundOrderId); - List values = CollectionUtils.arrayToList(new Byte[] { - PayConstant.REFUND_STATUS_SUCCESS, PayConstant.REFUND_STATUS_FAIL - }); - criteria.andStatusIn(values); - return refundOrderMapper.updateByExampleSelective(refundOrder, example); - } - - public int baseUpdateStatus4Fail(String refundOrderId, String channelErrCode, String channelErrMsg) { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setStatus(PayConstant.REFUND_STATUS_FAIL); - refundOrder.setResult(PayConstant.REFUND_RESULT_FAIL); - if(channelErrCode != null) refundOrder.setChannelErrCode(channelErrCode); - if(channelErrMsg != null) refundOrder.setChannelErrMsg(channelErrMsg); - RefundOrderExample example = new RefundOrderExample(); - RefundOrderExample.Criteria criteria = example.createCriteria(); - criteria.andRefundOrderIdEqualTo(refundOrderId); - criteria.andStatusEqualTo(PayConstant.REFUND_STATUS_REFUNDING); - return refundOrderMapper.updateByExampleSelective(refundOrder, example); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4TransOrder.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4TransOrder.java deleted file mode 100644 index 804fe8d6874101dea097cd1b0e38dc0994a34bb1..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/BaseService4TransOrder.java +++ /dev/null @@ -1,114 +0,0 @@ -package org.xxpay.dubbo.service; - -import org.apache.commons.lang3.ArrayUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.TransOrderMapper; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dal.dao.model.TransOrderExample; - -import java.util.Date; -import java.util.LinkedList; -import java.util.List; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service -public class BaseService4TransOrder extends BaseService{ - - @Autowired - private TransOrderMapper transOrderMapper; - - public int baseCreateTransOrder(TransOrder transOrder) { - return transOrderMapper.insertSelective(transOrder); - } - - public TransOrder baseSelectTransOrder(String transOrderId) { - return transOrderMapper.selectByPrimaryKey(transOrderId); - } - - public TransOrder baseSelectByMchIdAndTransOrderId(String mchId, String transOrderId) { - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andTransOrderIdEqualTo(transOrderId); - List transOrderList = transOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(transOrderList) ? null : transOrderList.get(0); - } - - public TransOrder baseSelectByMchIdAndMchTransNo(String mchId, String mchTransNo) { - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andMchTransNoEqualTo(mchTransNo); - List transOrderList = transOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(transOrderList) ? null : transOrderList.get(0); - } - - public int baseUpdateStatus4Ing(String transOrderId, String channelOrderNo) { - TransOrder transOrder = new TransOrder(); - transOrder.setStatus(PayConstant.TRANS_STATUS_TRANING); - if(channelOrderNo != null) transOrder.setChannelOrderNo(channelOrderNo); - transOrder.setTransSuccTime(new Date()); - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andTransOrderIdEqualTo(transOrderId); - List list = new LinkedList<>(); - list.add(PayConstant.TRANS_STATUS_INIT); - list.add(PayConstant.TRANS_STATUS_FAIL); - criteria.andStatusIn(list); - return transOrderMapper.updateByExampleSelective(transOrder, example); - } - - public int baseUpdateStatus4Success(String transOrderId) { - return baseUpdateStatus4Success(transOrderId, null); - } - - public int baseUpdateStatus4Success(String transOrderId, String channelOrderNo) { - TransOrder transOrder = new TransOrder(); - transOrder.setTransOrderId(transOrderId); - transOrder.setStatus(PayConstant.TRANS_STATUS_SUCCESS); - transOrder.setResult(PayConstant.TRANS_RESULT_SUCCESS); - transOrder.setTransSuccTime(new Date()); - if(StringUtils.isNotBlank(channelOrderNo)) transOrder.setChannelOrderNo(channelOrderNo); - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andTransOrderIdEqualTo(transOrderId); - criteria.andStatusEqualTo(PayConstant.TRANS_STATUS_TRANING); - return transOrderMapper.updateByExampleSelective(transOrder, example); - } - - public int baseUpdateStatus4Complete(String transOrderId) { - TransOrder transOrder = new TransOrder(); - transOrder.setTransOrderId(transOrderId); - transOrder.setStatus(PayConstant.TRANS_STATUS_COMPLETE); - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andTransOrderIdEqualTo(transOrderId); - List values = CollectionUtils.arrayToList(new Byte[] { - PayConstant.TRANS_STATUS_SUCCESS, PayConstant.TRANS_STATUS_FAIL - }); - criteria.andStatusIn(values); - return transOrderMapper.updateByExampleSelective(transOrder, example); - } - - public int baseUpdateStatus4Fail(String transOrderId, String channelErrCode, String channelErrMsg) { - TransOrder transOrder = new TransOrder(); - transOrder.setStatus(PayConstant.TRANS_STATUS_FAIL); - transOrder.setResult(PayConstant.TRANS_RESULT_FAIL); - if(channelErrCode != null) transOrder.setChannelErrCode(channelErrCode); - if(channelErrMsg != null) transOrder.setChannelErrMsg(channelErrMsg); - TransOrderExample example = new TransOrderExample(); - TransOrderExample.Criteria criteria = example.createCriteria(); - criteria.andTransOrderIdEqualTo(transOrderId); - criteria.andStatusEqualTo(PayConstant.TRANS_STATUS_TRANING); - return transOrderMapper.updateByExampleSelective(transOrder, example); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/alipay/AlipayConfig.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/alipay/AlipayConfig.java deleted file mode 100644 index 840f86a56d4abc9fe237253a666db388c4c927be..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/alipay/AlipayConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.dubbo.service.channel.alipay; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; -import org.springframework.util.Assert; - -/** - * @author: dingzhiwei - * @date: 17/8/21 - * @description: - */ -@Component -@ConfigurationProperties(prefix="config.ali") -public class AlipayConfig { - - // 商户appid - private String app_id; - // 私钥 pkcs8格式的 - private String rsa_private_key; - // 服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 - - private String notify_url; - // 页面跳转同步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 商户可以自定义同步跳转地址 - - private String return_url; - // 请求网关地址 - private String url = "https://openapi.alipay.com/gateway.do"; - - // 编码 - public static String CHARSET = "UTF-8"; - // 返回格式 - public static String FORMAT = "json"; - // 支付宝公钥 - public String alipay_public_key; - // RSA2 - public static String SIGNTYPE = "RSA2"; - - // 是否沙箱环境,1:沙箱,0:正式环境 - private Short isSandbox = 0; - - /** - * 初始化支付宝配置 - * @param configParam - * @return - */ - public AlipayConfig init(String configParam) { - Assert.notNull(configParam, "init alipay config error"); - JSONObject paramObj = JSON.parseObject(configParam); - this.setApp_id(paramObj.getString("appid")); - this.setRsa_private_key(paramObj.getString("private_key")); - this.setAlipay_public_key(paramObj.getString("alipay_public_key")); - this.setIsSandbox(paramObj.getShortValue("isSandbox")); - if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do"); - return this; - } - - public String getApp_id() { - return app_id; - } - - public void setApp_id(String app_id) { - this.app_id = app_id; - } - - public String getRsa_private_key() { - return rsa_private_key; - } - - public void setRsa_private_key(String rsa_private_key) { - this.rsa_private_key = rsa_private_key; - } - - public String getNotify_url() { - return notify_url; - } - - public void setNotify_url(String notify_url) { - this.notify_url = notify_url; - } - - public String getReturn_url() { - return return_url; - } - - public void setReturn_url(String return_url) { - this.return_url = return_url; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Short getIsSandbox() { - return isSandbox; - } - - public void setIsSandbox(Short isSandbox) { - this.isSandbox = isSandbox; - } - - public String getAlipay_public_key() { - return alipay_public_key; - } - - public void setAlipay_public_key(String alipay_public_key) { - this.alipay_public_key = alipay_public_key; - } -} - diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayProperties.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayProperties.java deleted file mode 100755 index 94680a5e894c11b7780743d1f875fce12aefaae4..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayProperties.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay.dubbo.service.channel.wechat; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * User: rizenguo - * Date: 2014/10/29 - * Time: 14:40 - * 这里放置各种配置数据 - */ -@Component -@ConfigurationProperties(prefix="config.wx") -public class WxPayProperties { - - private String certRootPath; - - private String notifyUrl; - - public String getCertRootPath() { - return certRootPath; - } - - public void setCertRootPath(String certRootPath) { - this.certRootPath = certRootPath; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayUtil.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayUtil.java deleted file mode 100644 index 62e8269de63c8ec891fe0e138920e66b9285943f..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/channel/wechat/WxPayUtil.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.xxpay.dubbo.service.channel.wechat; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.config.WxPayConfig; - -import java.io.File; - -/** - * @author: dingzhiwei - * @date: 17/8/25 - * @description: - */ -public class WxPayUtil { - - /** - * 获取微信支付配置 - * @param configParam - * @param tradeType - * @param certRootPath - * @param notifyUrl - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam, String tradeType, String certRootPath, String notifyUrl) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setKeyPath(certRootPath + File.separator + paramObj.getString("certLocalPath")); - wxPayConfig.setMchKey(paramObj.getString("key")); - wxPayConfig.setNotifyUrl(notifyUrl); - wxPayConfig.setTradeType(tradeType); - return wxPayConfig; - } - - /** - * 获取微信支付配置 - * @param configParam - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setMchKey(paramObj.getString("key")); - return wxPayConfig; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/MchInfoServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/MchInfoServiceImpl.java deleted file mode 100644 index e698ca830a10f531173defd8a42b76a24e9f03d9..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/MchInfoServiceImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.JsonUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.ObjectValidUtil; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dubbo.api.service.IMchInfoService; -import org.xxpay.dubbo.service.BaseService; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service(version = "1.0.0") -public class MchInfoServiceImpl extends BaseService implements IMchInfoService { - - private static final MyLog _log = MyLog.getLog(MchInfoServiceImpl.class); - - @Override - public Map selectMchInfo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("查询商户信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - if (ObjectValidUtil.isInvalid(mchId)) { - _log.warn("查询商户信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - if(mchInfo == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(mchInfo); - return RpcUtil.createBizResult(baseParam, jsonResult); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/NotifyPayServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/NotifyPayServiceImpl.java deleted file mode 100644 index 44585613f08593130224a13865490a0d2d9bec83..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/NotifyPayServiceImpl.java +++ /dev/null @@ -1,292 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alipay.api.AlipayApiException; -import com.alipay.api.internal.util.AlipaySignature; -import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse; -import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StringUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dubbo.api.service.INotifyPayService; -import org.xxpay.dubbo.service.BaseNotify4MchPay; -import org.xxpay.dubbo.service.channel.alipay.AlipayConfig; -import org.xxpay.dubbo.service.channel.wechat.WxPayUtil; - -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service(version = "1.0.0") -public class NotifyPayServiceImpl extends BaseNotify4MchPay implements INotifyPayService { - - private static final MyLog _log = MyLog.getLog(NotifyPayServiceImpl.class); - - @Autowired - private AlipayConfig alipayConfig; - - @Override - public Map doAliPayNotify(String jsonParam) { - String logPrefix = "【处理支付宝支付回调】"; - _log.info("====== 开始处理支付宝支付回调通知 ======"); - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("处理支付宝支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - Map params = baseParam.isNullValue("params") ? null : (Map) bizParamMap.get("params"); - if (ObjectValidUtil.isInvalid(params)) { - _log.warn("处理支付宝支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - Map payContext = new HashMap(); - PayOrder payOrder; - payContext.put("parameters", params); - if(!verifyAliPayParams(payContext)) { - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_PAY_NOTIFY_VERIFY_FAIL); - } - _log.info("{}验证支付通知数据及签名通过", logPrefix); - String trade_status = params.get("trade_status").toString(); // 交易状态 - // 支付状态成功或者完成 - if (trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_SUCCESS) || - trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_FINISHED)) { - int updatePayOrderRows; - payOrder = (PayOrder)payContext.get("payOrder"); - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - updatePayOrderRows = super.baseUpdateStatus4Success(payOrder.getPayOrderId(), StrUtil.toString(params.get("trade_no"), null)); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_FAIL); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_FAIL); - } - _log.info("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - } - }else{ - // 其他状态 - _log.info("{}支付状态trade_status={},不做业务处理", logPrefix, trade_status); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - } - doNotify(payOrder, true); - _log.info("====== 完成处理支付宝支付回调通知 ======"); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - } - - @Override - public Map doWxPayNotify(String jsonParam) { - String logPrefix = "【处理微信支付回调】"; - _log.info("====== 开始处理微信支付回调通知 ======"); - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - try { - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("处理微信支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(RetEnum.RET_PARAM_NOT_FOUND.getMessage())); - //return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String xmlResult = baseParam.isNullValue("xmlResult") ? null : bizParamMap.get("xmlResult").toString(); - if (ObjectValidUtil.isInvalid(xmlResult)) { - _log.warn("处理微信支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(RetEnum.RET_PARAM_INVALID.getMessage())); - //return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - WxPayService wxPayService = new WxPayServiceImpl(); - WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlResult); - Map payContext = new HashMap(); - payContext.put("parameters", result); - // 验证业务数据是否正确,验证通过后返回PayOrder和WxPayConfig对象 - if(!verifyWxPayParams(payContext)) { - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail((String) payContext.get("retMsg"))); - } - PayOrder payOrder = (PayOrder) payContext.get("payOrder"); - WxPayConfig wxPayConfig = (WxPayConfig) payContext.get("wxPayConfig"); - wxPayService.setConfig(wxPayConfig); - // 这里做了签名校验(这里又做了一次xml转换对象,可以考虑优化) - wxPayService.parseOrderNotifyResult(xmlResult); - // 处理订单 - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - int updatePayOrderRows = super.baseUpdateStatus4Success(payOrder.getPayOrderId(), result.getTransactionId()); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail("处理订单失败")); - } - _log.error("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - } - // 业务系统后端通知 - doNotify(payOrder, true); - _log.info("====== 完成处理微信支付回调通知 ======"); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.success("OK")); - } catch (WxPayException e) { - //出现业务错误 - _log.error(e, "微信回调结果异常,异常原因"); - _log.info("{}请求数据result_code=FAIL", logPrefix); - _log.info("err_code:", e.getErrCode()); - _log.info("err_code_des:", e.getErrCodeDes()); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(e.getMessage())); - } catch (Exception e) { - _log.error(e, "微信回调结果异常,异常原因"); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(e.getMessage())); - } - } - - @Override - public Map sendBizPayNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("发送业务支付通知失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if(ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("发送业务支付通知失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - try { - // 发送业务支付通知 - super.doNotify(payOrder, false); - }catch (Exception e) { - return RpcUtil.createBizResult(baseParam, 0); - } - return RpcUtil.createBizResult(baseParam, 1); - } - - - /** - * 验证支付宝支付通知参数 - * @return - */ - public boolean verifyAliPayParams(Map payContext) { - Map params = (Map)payContext.get("parameters"); - String out_trade_no = params.get("out_trade_no"); // 商户订单号 - String total_amount = params.get("total_amount"); // 支付金额 - if (StringUtils.isEmpty(out_trade_no)) { - _log.error("AliPay Notify parameter out_trade_no is empty. out_trade_no={}", out_trade_no); - payContext.put("retMsg", "out_trade_no is empty"); - return false; - } - if (StringUtils.isEmpty(total_amount)) { - _log.error("AliPay Notify parameter total_amount is empty. total_fee={}", total_amount); - payContext.put("retMsg", "total_amount is empty"); - return false; - } - String errorMessage; - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if (payOrder == null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - boolean verify_result = false; - try { - verify_result = AlipaySignature.rsaCheckV1(params, alipayConfig.init(payChannel.getParam()).getAlipay_public_key(), AlipayConfig.CHARSET, "RSA2"); - } catch (AlipayApiException e) { - _log.error(e, "AlipaySignature.rsaCheckV1 error"); - } - - // 验证签名 - if (!verify_result) { - errorMessage = "rsaCheckV1 failed."; - _log.error("AliPay Notify parameter {}", errorMessage); - payContext.put("retMsg", errorMessage); - return false; - } - - // 核对金额 - long aliPayAmt = new BigDecimal(total_amount).movePointRight(2).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != aliPayAmt) { - _log.error("db payOrder record payPrice not equals total_amount. total_amount={},payOrderId={}", total_amount, payOrderId); - payContext.put("retMsg", ""); - return false; - } - payContext.put("payOrder", payOrder); - return true; - } - - /** - * 验证微信支付通知参数 - * @return - */ - public boolean verifyWxPayParams(Map payContext) { - WxPayOrderNotifyResult params = (WxPayOrderNotifyResult)payContext.get("parameters"); - - //校验结果是否成功 - if (!PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getResultCode()) - && !PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getReturnCode())) { - _log.error("returnCode={},resultCode={},errCode={},errCodeDes={}", params.getReturnCode(), params.getResultCode(), params.getErrCode(), params.getErrCodeDes()); - payContext.put("retMsg", "notify data failed"); - return false; - } - - Integer total_fee = params.getTotalFee(); // 总金额 - String out_trade_no = params.getOutTradeNo(); // 商户系统订单号 - - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if (payOrder==null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - payContext.put("wxPayConfig", WxPayUtil.getWxPayConfig(payChannel.getParam())); - - // 核对金额 - long wxPayAmt = new BigDecimal(total_fee).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != wxPayAmt) { - _log.error("db payOrder record payPrice not equals total_fee. total_fee={},payOrderId={}", total_fee, payOrderId); - payContext.put("retMsg", "total_fee is not the same"); - return false; - } - - payContext.put("payOrder", payOrder); - return true; - } - - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4AliServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4AliServiceImpl.java deleted file mode 100644 index 7551e7965fedf84ad8d9ea1803d01dd30892b50c..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4AliServiceImpl.java +++ /dev/null @@ -1,497 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.alipay.api.AlipayApiException; -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.domain.*; -import com.alipay.api.request.*; -import com.alipay.api.response.AlipayFundTransOrderQueryResponse; -import com.alipay.api.response.AlipayFundTransToaccountTransferResponse; -import com.alipay.api.response.AlipayTradeFastpayRefundQueryResponse; -import com.alipay.api.response.AlipayTradeRefundResponse; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.api.service.IPayChannel4AliService; -import org.xxpay.dubbo.service.BaseService; -import org.xxpay.dubbo.service.BaseService4PayOrder; -import org.xxpay.dubbo.service.BaseService4RefundOrder; -import org.xxpay.dubbo.service.BaseService4TransOrder; -import org.xxpay.dubbo.service.channel.alipay.AlipayConfig; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service(version = "1.0.0") -public class PayChannel4AliServiceImpl implements IPayChannel4AliService { - - private static final MyLog _log = MyLog.getLog(PayChannel4AliServiceImpl.class); - - @Autowired - private AlipayConfig alipayConfig; - - @Autowired - private BaseService4PayOrder baseService4PayOrder; - - @Autowired - private BaseService4TransOrder baseService4TransOrder; - - @Autowired - private BaseService4RefundOrder baseService4RefundOrder; - - @Override - public Map doAliPayWapReq(String jsonParam) { - String logPrefix = "【支付宝WAP支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = JSON.toJavaObject(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeWapPayRequest alipay_request = new AlipayTradeWapPayRequest(); - // 封装请求支付信息 - AlipayTradeWapPayModel model=new AlipayTradeWapPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_WAP_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("quit_url"))) { - model.setQuitUrl(objParamsJson.getString("quit_url")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - baseService4PayOrder.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayPcReq(String jsonParam) { - String logPrefix = "【支付宝PC支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = JSON.toJavaObject(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePagePayRequest alipay_request = new AlipayTradePagePayRequest(); - // 封装请求支付信息 - AlipayTradePagePayModel model=new AlipayTradePagePayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("FAST_INSTANT_TRADE_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - String qr_pay_mode = "2"; - String qrcode_width = "200"; - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - qr_pay_mode = ObjectUtils.toString(objParamsJson.getString("qr_pay_mode"), "2"); - qrcode_width = ObjectUtils.toString(objParamsJson.getString("qrcode_width"), "200"); - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - model.setQrPayMode(qr_pay_mode); - model.setQrcodeWidth(Long.parseLong(qrcode_width)); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - baseService4PayOrder.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayMobileReq(String jsonParam) { - String logPrefix = "【支付宝APP支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = JSON.toJavaObject(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeAppPayRequest alipay_request = new AlipayTradeAppPayRequest(); - // 封装请求支付信息 - AlipayTradeAppPayModel model=new AlipayTradeAppPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_MSECURITY_PAY"); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payParams = null; - try { - payParams = client.sdkExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - baseService4PayOrder.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payParams", payParams); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayQrReq(String jsonParam) { - String logPrefix = "【支付宝当面付之扫码支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = JSON.toJavaObject(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePrecreateRequest alipay_request = new AlipayTradePrecreateRequest(); - // 封装请求支付信息 - AlipayTradePrecreateModel model=new AlipayTradePrecreateModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("discountable_amount"))) { - //可打折金额 - model.setDiscountableAmount(objParamsJson.getString("discountable_amount")); - } - if(StringUtils.isNotBlank(objParamsJson.getString("undiscountable_amount"))) { - //不可打折金额 - model.setUndiscountableAmount(objParamsJson.getString("undiscountable_amount")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.execute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - baseService4PayOrder.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - - /** - * 支付宝转账,文档:https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer - * @param jsonParam - * @return - */ - @Override - public Map doAliTransReq(String jsonParam) { - String logPrefix = "【支付宝转账】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject transOrderObj = baseParam.isNullValue("transOrder") ? null : JSONObject.parseObject(bizParamMap.get("transOrder").toString()); - TransOrder transOrder = JSON.toJavaObject(transOrderObj, TransOrder.class); - if (ObjectValidUtil.isInvalid(transOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String transOrderId = transOrder.getTransOrderId(); - String mchId = transOrder.getMchId(); - String channelId = transOrder.getChannelId(); - PayChannel payChannel = baseService4TransOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayFundTransToaccountTransferRequest request = new AlipayFundTransToaccountTransferRequest(); - AlipayFundTransToaccountTransferModel model = new AlipayFundTransToaccountTransferModel(); - model.setOutBizNo(transOrderId); - model.setPayeeType("ALIPAY_LOGONID"); // 收款方账户类型 - model.setPayeeAccount(transOrder.getChannelUser()); // 收款方账户 - model.setAmount(AmountUtil.convertCent2Dollar(transOrder.getAmount().toString())); - model.setPayerShowName("支付转账"); - model.setPayeeRealName(transOrder.getUserName()); - model.setRemark(transOrder.getRemarkInfo()); - request.setBizModel(model); - Map map = new HashMap<>(); - map.put("transOrderId", transOrderId); - map.put("isSuccess", false); - try { - AlipayFundTransToaccountTransferResponse response = client.execute(request); - if(response.isSuccess()) { - map.put("isSuccess", true); - map.put("channelOrderNo", response.getOrderId()); - }else { - //出现业务错误 - _log.info("{}返回失败", logPrefix); - _log.info("sub_code:{},sub_msg:{}", response.getSubCode(), response.getSubMsg()); - map.put("channelErrCode", response.getSubCode()); - map.put("channelErrMsg", response.getSubMsg()); - } - } catch (AlipayApiException e) { - _log.error(e, ""); - } - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map getAliTransReq(String jsonParam) { - String logPrefix = "【支付宝转账查询】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject transOrderObj = baseParam.isNullValue("transOrder") ? null : JSONObject.parseObject(bizParamMap.get("transOrder").toString()); - TransOrder transOrder = JSON.toJavaObject(transOrderObj, TransOrder.class); - if (ObjectValidUtil.isInvalid(transOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String transOrderId = transOrder.getTransOrderId(); - String mchId = transOrder.getMchId(); - String channelId = transOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayFundTransOrderQueryRequest request = new AlipayFundTransOrderQueryRequest(); - AlipayFundTransOrderQueryModel model = new AlipayFundTransOrderQueryModel(); - model.setOutBizNo(transOrderId); - model.setOrderId(transOrder.getChannelOrderNo()); - request.setBizModel(model); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("transOrderId", transOrderId); - try { - AlipayFundTransOrderQueryResponse response = client.execute(request); - if(response.isSuccess()){ - map.putAll((Map) JSON.toJSON(response)); - map.put("isSuccess", true); - }else { - _log.info("{}返回失败", logPrefix); - _log.info("sub_code:{},sub_msg:{}", response.getSubCode(), response.getSubMsg()); - map.put("channelErrCode", response.getSubCode()); - map.put("channelErrMsg", response.getSubMsg()); - } - } catch (AlipayApiException e) { - _log.error(e, ""); - } - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliRefundReq(String jsonParam) { - String logPrefix = "【支付宝退款】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject refundOrderObj = baseParam.isNullValue("refundOrder") ? null : JSONObject.parseObject(bizParamMap.get("refundOrder").toString()); - RefundOrder refundOrder = JSON.toJavaObject(refundOrderObj, RefundOrder.class); - if (ObjectValidUtil.isInvalid(refundOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String refundOrderId = refundOrder.getRefundOrderId(); - String mchId = refundOrder.getMchId(); - String channelId = refundOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeRefundRequest request = new AlipayTradeRefundRequest(); - AlipayTradeRefundModel model = new AlipayTradeRefundModel(); - model.setOutTradeNo(refundOrder.getPayOrderId()); - model.setTradeNo(refundOrder.getChannelPayOrderNo()); - model.setOutRequestNo(refundOrderId); - model.setRefundAmount(AmountUtil.convertCent2Dollar(refundOrder.getRefundAmount().toString())); - model.setRefundReason("正常退款"); - request.setBizModel(model); - Map map = new HashMap<>(); - map.put("refundOrderId", refundOrderId); - map.put("isSuccess", false); - try { - AlipayTradeRefundResponse response = client.execute(request); - if(response.isSuccess()){ - map.put("isSuccess", true); - map.put("channelOrderNo", response.getTradeNo()); - }else { - _log.info("{}返回失败", logPrefix); - _log.info("sub_code:{},sub_msg:{}", response.getSubCode(), response.getSubMsg()); - map.put("channelErrCode", response.getSubCode()); - map.put("channelErrMsg", response.getSubMsg()); - } - } catch (AlipayApiException e) { - _log.error(e, ""); - } - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map getAliRefundReq(String jsonParam) { - String logPrefix = "【支付宝退款查询】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject refundOrderObj = baseParam.isNullValue("refundOrder") ? null : JSONObject.parseObject(bizParamMap.get("refundOrder").toString()); - RefundOrder refundOrder = JSON.toJavaObject(refundOrderObj, RefundOrder.class); - if (ObjectValidUtil.isInvalid(refundOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String refundOrderId = refundOrder.getRefundOrderId(); - String mchId = refundOrder.getMchId(); - String channelId = refundOrder.getChannelId(); - PayChannel payChannel = baseService4PayOrder.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeFastpayRefundQueryRequest request = new AlipayTradeFastpayRefundQueryRequest(); - AlipayTradeFastpayRefundQueryModel model = new AlipayTradeFastpayRefundQueryModel(); - model.setOutTradeNo(refundOrder.getPayOrderId()); - model.setTradeNo(refundOrder.getChannelPayOrderNo()); - model.setOutRequestNo(refundOrderId); - request.setBizModel(model); - Map map = new HashMap<>(); - map.put("refundOrderId", refundOrderId); - try { - AlipayTradeFastpayRefundQueryResponse response = client.execute(request); - if(response.isSuccess()){ - map.putAll((Map) JSON.toJSON(response)); - map.put("isSuccess", true); - }else { - _log.info("{}返回失败", logPrefix); - _log.info("sub_code:{},sub_msg:{}", response.getSubCode(), response.getSubMsg()); - map.put("channelErrCode", response.getSubCode()); - map.put("channelErrMsg", response.getSubMsg()); - } - } catch (AlipayApiException e) { - _log.error(e, ""); - } - return RpcUtil.createBizResult(baseParam, map); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4WxServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4WxServiceImpl.java deleted file mode 100644 index 0028e1c923935118df2b83a11839103c83a24cee..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannel4WxServiceImpl.java +++ /dev/null @@ -1,437 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.bean.request.*; -import com.github.binarywang.wxpay.bean.result.*; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.constant.WxPayConstants; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import com.github.binarywang.wxpay.util.SignUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.api.service.IPayChannel4WxService; -import org.xxpay.dubbo.service.BaseService; -import org.xxpay.dubbo.service.BaseService4PayOrder; -import org.xxpay.dubbo.service.channel.wechat.WxPayProperties; -import org.xxpay.dubbo.service.channel.wechat.WxPayUtil; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付渠道接口:微信 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-09-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Service(version = "1.0.0") -public class PayChannel4WxServiceImpl extends BaseService implements IPayChannel4WxService { - - private final MyLog _log = MyLog.getLog(PayChannel4WxServiceImpl.class); - - @Resource - private WxPayProperties wxPayProperties; - - @Autowired - private BaseService4PayOrder baseService4PayOrder; - - public Map doWxPayReq(String jsonParam) { - String logPrefix = "【微信支付统一下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - String tradeType = baseParam.isNullValue("tradeType") ? null : bizParamMap.get("tradeType").toString(); - PayOrder payOrder = JSON.toJavaObject(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder, tradeType)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), tradeType, wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - WxPayUnifiedOrderRequest wxPayUnifiedOrderRequest = buildUnifiedOrderRequest(payOrder, wxPayConfig); - String payOrderId = payOrder.getPayOrderId(); - WxPayUnifiedOrderResult wxPayUnifiedOrderResult; - try { - wxPayUnifiedOrderResult = wxPayService.unifiedOrder(wxPayUnifiedOrderRequest); - _log.info("{} >>> 下单成功", logPrefix); - Map map = new HashMap<>(); - map.put("payOrderId", payOrderId); - map.put("prepayId", wxPayUnifiedOrderResult.getPrepayId()); - int result = baseService4PayOrder.baseUpdateStatus4Ing(payOrderId, null); - _log.info("更新第三方支付订单号:payOrderId={},prepayId={},result={}", payOrderId, wxPayUnifiedOrderResult.getPrepayId(), result); - switch (tradeType) { - case PayConstant.WxConstant.TRADE_TYPE_NATIVE : { - map.put("codeUrl", wxPayUnifiedOrderResult.getCodeURL()); // 二维码支付链接 - break; - } - case PayConstant.WxConstant.TRADE_TYPE_APP : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - // APP支付绑定的是微信开放平台上的账号,APPID为开放平台上绑定APP后发放的参数 - String appId = wxPayConfig.getAppId(); - Map configMap = new HashMap<>(); - // 此map用于参与调起sdk支付的二次签名,格式全小写,timestamp只能是10位,格式固定,切勿修改 - String partnerId = wxPayConfig.getMchId(); - configMap.put("prepayid", wxPayUnifiedOrderResult.getPrepayId()); - configMap.put("partnerid", partnerId); - String packageValue = "Sign=WXPay"; - configMap.put("package", packageValue); - configMap.put("timestamp", timestamp); - configMap.put("noncestr", nonceStr); - configMap.put("appid", appId); - // 此map用于客户端与微信服务器交互 - payInfo.put("sign", SignUtils.createSign(configMap, wxPayConfig.getMchKey(), null)); - payInfo.put("prepayId", wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("partnerId", partnerId); - payInfo.put("appId", appId); - payInfo.put("packageValue", packageValue); - payInfo.put("timeStamp", timestamp); - payInfo.put("nonceStr", nonceStr); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_JSPAI : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - payInfo.put("appId", wxPayUnifiedOrderResult.getAppid()); - // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 - payInfo.put("timeStamp", timestamp); - payInfo.put("nonceStr", nonceStr); - payInfo.put("package", "prepay_id=" + wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("signType", WxPayConstants.SignType.MD5); - payInfo.put("paySign", SignUtils.createSign(payInfo, wxPayConfig.getMchKey(), null)); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_MWEB : { - map.put("payUrl", wxPayUnifiedOrderResult.getMwebUrl()); // h5支付链接地址 - break; - } - } - return RpcUtil.createBizResult(baseParam, map); - } catch (WxPayException e) { - _log.error(e, "下单失败"); - //出现业务错误 - _log.info("{}下单返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - }catch (Exception e) { - _log.error(e, "微信支付统一下单异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - } - - @Override - public Map doWxTransReq(String jsonParam) { - String logPrefix = "【微信企业付款】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject transOrderObj = baseParam.isNullValue("transOrder") ? null : JSONObject.parseObject(bizParamMap.get("transOrder").toString()); - TransOrder transOrder = JSON.toJavaObject(transOrderObj, TransOrder.class); - if (ObjectValidUtil.isInvalid(transOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = transOrder.getMchId(); - String channelId = transOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), "", wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - WxEntPayRequest wxEntPayRequest = buildWxEntPayRequest(transOrder, wxPayConfig); - String transOrderId = transOrder.getTransOrderId(); - Map map = new HashMap<>(); - WxEntPayResult result; - try { - result = wxPayService.entPay(wxEntPayRequest); - _log.info("{} >>> 转账成功", logPrefix); - map.put("transOrderId", transOrderId); - map.put("isSuccess", true); - map.put("channelOrderNo", result.getPaymentNo()); - } catch (WxPayException e) { - _log.error(e, "转账失败"); - //出现业务错误 - _log.info("{}转账返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - map.put("transOrderId", transOrderId); - map.put("isSuccess", false); - map.put("channelErrCode", e.getErrCode()); - map.put("channelErrMsg", e.getErrCodeDes()); - } - return RpcUtil.createBizResult(baseParam, map); - }catch (Exception e) { - _log.error(e, "微信转账异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - } - - @Override - public Map getWxTransReq(String jsonParam) { - String logPrefix = "【微信企业付款查询】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject transOrderObj = baseParam.isNullValue("transOrder") ? null : JSONObject.parseObject(bizParamMap.get("transOrder").toString()); - TransOrder transOrder = JSON.toJavaObject(transOrderObj, TransOrder.class); - if (ObjectValidUtil.isInvalid(transOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = transOrder.getMchId(); - String channelId = transOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), "", wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - String transOrderId = transOrder.getTransOrderId(); - Map map = new HashMap<>(); - WxEntPayQueryResult result; - try { - result = wxPayService.queryEntPay(transOrderId); - _log.info("{} >>> 成功", logPrefix); - map.putAll((Map) JSON.toJSON(result)); - map.put("isSuccess", true); - map.put("transOrderId", transOrderId); - } catch (WxPayException e) { - _log.error(e, "失败"); - //出现业务错误 - _log.info("{}返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - map.put("channelErrCode", e.getErrCode()); - map.put("channelErrMsg", e.getErrCodeDes()); - map.put("isSuccess", false); - } - return RpcUtil.createBizResult(baseParam, map); - }catch (Exception e) { - _log.error(e, "微信企业付款查询异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - } - - @Override - public Map doWxRefundReq(String jsonParam) { - String logPrefix = "【微信退款】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject refundOrderObj = baseParam.isNullValue("refundOrder") ? null : JSONObject.parseObject(bizParamMap.get("refundOrder").toString()); - RefundOrder refundOrder = JSON.toJavaObject(refundOrderObj, RefundOrder.class); - if (ObjectValidUtil.isInvalid(refundOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = refundOrder.getMchId(); - String channelId = refundOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), "", wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - WxPayRefundRequest wxPayRefundRequest = buildWxPayRefundRequest(refundOrder, wxPayConfig); - String refundOrderId = refundOrder.getRefundOrderId(); - Map map = new HashMap<>(); - WxPayRefundResult result; - try { - result = wxPayService.refund(wxPayRefundRequest); - _log.info("{} >>> 下单成功", logPrefix); - map.put("isSuccess", true); - map.put("refundOrderId", refundOrderId); - map.put("channelOrderNo", result.getRefundId()); - } catch (WxPayException e) { - _log.error(e, "下单失败"); - //出现业务错误 - _log.info("{}下单返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - map.put("isSuccess", false); - map.put("channelErrCode", e.getErrCode()); - map.put("channelErrMsg", e.getErrCodeDes()); - } - return RpcUtil.createBizResult(baseParam, map); - }catch (Exception e) { - _log.error(e, "微信退款异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - } - - @Override - public Map getWxRefundReq(String jsonParam) { - String logPrefix = "【微信退款查询】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject refundOrderObj = baseParam.isNullValue("refundOrder") ? null : JSONObject.parseObject(bizParamMap.get("refundOrder").toString()); - RefundOrder refundOrder = JSON.toJavaObject(refundOrderObj, RefundOrder.class); - if (ObjectValidUtil.isInvalid(refundOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = refundOrder.getMchId(); - String channelId = refundOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), "", wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - String refundOrderId = refundOrder.getRefundOrderId(); - Map map = new HashMap<>(); - WxPayRefundQueryResult result; - try { - result = wxPayService.refundQuery(refundOrder.getChannelPayOrderNo(), refundOrder.getPayOrderId(), refundOrder.getRefundOrderId(), refundOrder.getChannelOrderNo()); - _log.info("{} >>> 成功", logPrefix); - map.putAll((Map) JSON.toJSON(result)); - map.put("isSuccess", true); - map.put("refundOrderId", refundOrderId); - } catch (WxPayException e) { - _log.error(e, "失败"); - //出现业务错误 - _log.info("{}返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - map.put("channelErrCode", e.getErrCode()); - map.put("channelErrMsg", e.getErrCodeDes()); - map.put("isSuccess", false); - } - return RpcUtil.createBizResult(baseParam, map); - }catch (Exception e) { - _log.error(e, "微信退款查询异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - } - } - - /** - * 构建微信统一下单请求数据 - * @param payOrder - * @param wxPayConfig - * @return - */ - WxPayUnifiedOrderRequest buildUnifiedOrderRequest(PayOrder payOrder, WxPayConfig wxPayConfig) { - String tradeType = wxPayConfig.getTradeType(); - String payOrderId = payOrder.getPayOrderId(); - Integer totalFee = payOrder.getAmount().intValue();// 支付金额,单位分 - String deviceInfo = payOrder.getDevice(); - String body = payOrder.getBody(); - String detail = null; - String attach = null; - String outTradeNo = payOrderId; - String feeType = "CNY"; - String spBillCreateIP = payOrder.getClientIp(); - String timeStart = null; - String timeExpire = null; - String goodsTag = null; - String notifyUrl = wxPayConfig.getNotifyUrl(); - String productId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_NATIVE)) productId = JSON.parseObject(payOrder.getExtra()).getString("productId"); - String limitPay = null; - String openId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_JSPAI)) openId = JSON.parseObject(payOrder.getExtra()).getString("openId"); - String sceneInfo = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_MWEB)) sceneInfo = JSON.parseObject(payOrder.getExtra()).getString("sceneInfo"); - // 微信统一下单请求对象 - WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest(); - request.setDeviceInfo(deviceInfo); - request.setBody(body); - request.setDetail(detail); - request.setAttach(attach); - request.setOutTradeNo(outTradeNo); - request.setFeeType(feeType); - request.setTotalFee(totalFee); - request.setSpbillCreateIp(spBillCreateIP); - request.setTimeStart(timeStart); - request.setTimeExpire(timeExpire); - request.setGoodsTag(goodsTag); - request.setNotifyURL(notifyUrl); - request.setTradeType(tradeType); - request.setProductId(productId); - request.setLimitPay(limitPay); - request.setOpenid(openId); - request.setSceneInfo(sceneInfo); - return request; - } - - /** - * 构建微信企业付款请求数据 - * @param transOrder - * @param wxPayConfig - * @return - */ - WxEntPayRequest buildWxEntPayRequest(TransOrder transOrder, WxPayConfig wxPayConfig) { - // 微信企业付款请求对象 - WxEntPayRequest request = new WxEntPayRequest(); - request.setAmount(transOrder.getAmount().intValue()); // 金额,单位分 - String checkName = "NO_CHECK"; - if(transOrder.getExtra() != null) checkName = JSON.parseObject(transOrder.getExtra()).getString("checkName"); - request.setCheckName(checkName); - request.setDescription(transOrder.getRemarkInfo()); - request.setReUserName(transOrder.getUserName()); - request.setPartnerTradeNo(transOrder.getTransOrderId()); - request.setDeviceInfo(transOrder.getDevice()); - request.setSpbillCreateIp(transOrder.getClientIp()); - request.setOpenid(transOrder.getChannelUser()); - return request; - } - - /** - * 构建微信退款请求数据 - * @param refundOrder - * @param wxPayConfig - * @return - */ - WxPayRefundRequest buildWxPayRefundRequest(RefundOrder refundOrder, WxPayConfig wxPayConfig) { - // 微信退款请求对象 - WxPayRefundRequest request = new WxPayRefundRequest(); - request.setTransactionId(refundOrder.getChannelPayOrderNo()); - request.setOutTradeNo(refundOrder.getPayOrderId()); - request.setDeviceInfo(refundOrder.getDevice()); - request.setOutRefundNo(refundOrder.getRefundOrderId()); - request.setRefundDesc(refundOrder.getRemarkInfo()); - request.setRefundFee(refundOrder.getRefundAmount().intValue()); - request.setRefundFeeType("CNY"); - request.setTotalFee(refundOrder.getPayAmount().intValue()); - return request; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannelServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannelServiceImpl.java deleted file mode 100644 index a3440be4a41efcb30d17f0703b1d75d40a318b23..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayChannelServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import org.springframework.beans.factory.annotation.Autowired; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.JsonUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.ObjectValidUtil; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.mapper.PayChannelMapper; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dubbo.api.service.IPayChannelService; -import org.xxpay.dubbo.service.BaseService; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service(version = "1.0.0") -public class PayChannelServiceImpl extends BaseService implements IPayChannelService { - - private static final MyLog _log = MyLog.getLog(PayChannelServiceImpl.class); - - @Override - public Map selectPayChannel(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("查询支付渠道信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String channelId = baseParam.isNullValue("channelId") ? null : bizParamMap.get("channelId").toString(); - if (ObjectValidUtil.isInvalid(mchId, channelId)) { - _log.warn("查询支付渠道信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payChannel); - return RpcUtil.createBizResult(baseParam, jsonResult); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayOrderServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayOrderServiceImpl.java deleted file mode 100644 index d095f479fdc3956ae2f8d8c22a0a0429aec1401c..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/PayOrderServiceImpl.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSONObject; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dubbo.api.service.IPayOrderService; -import org.xxpay.dubbo.service.BaseService4PayOrder; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service(version = "1.0.0") -public class PayOrderServiceImpl extends BaseService4PayOrder implements IPayOrderService { - - private static final MyLog _log = MyLog.getLog(PayOrderServiceImpl.class); - - @Override - public Map create(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - if(payOrderObj == null) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if(payOrder == null) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseCreatePayOrder(payOrder); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map select(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("根据支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndPayOrderId(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(mchId, payOrderId)) { - _log.warn("根据商户号和支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectByMchIdAndPayOrderId(mchId, payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndMchOrderNo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String mchOrderNo = baseParam.isNullValue("mchOrderNo") ? null : bizParamMap.get("mchOrderNo").toString(); - if (ObjectValidUtil.isInvalid(mchId, mchOrderNo)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectByMchIdAndMchOrderNo(mchId, mchOrderNo); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map updateStatus4Ing(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付中失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - String channelOrderNo = baseParam.isNullValue("channelOrderNo") ? null : bizParamMap.get("channelOrderNo").toString(); - if (ObjectValidUtil.isInvalid(payOrderId, channelOrderNo)) { - _log.warn("修改支付订单状态为支付中失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Ing(payOrderId, channelOrderNo); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Success(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付成功失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("修改支付订单状态为支付成功失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Success(payOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Complete(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付完成失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("修改支付订单状态为支付完成失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Complete(payOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单通知次数失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - Byte count = baseParam.isNullValue("count") ? null : Byte.parseByte(bizParamMap.get("count").toString()); - if (ObjectValidUtil.isInvalid(payOrderId, count)) { - _log.warn("修改支付订单通知次数失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateNotify(payOrderId, count); - return RpcUtil.createBizResult(baseParam, result); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/RefundOrderServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/RefundOrderServiceImpl.java deleted file mode 100644 index f21f05b57bd72a8423bd0136268bbe4449bc5b41..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/RefundOrderServiceImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dubbo.api.service.IRefundOrderService; -import org.xxpay.dubbo.service.BaseService4RefundOrder; -import org.xxpay.dubbo.service.mq.Mq4RefundNotify; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service(version = "1.0.0") -public class RefundOrderServiceImpl extends BaseService4RefundOrder implements IRefundOrderService { - - private static final MyLog _log = MyLog.getLog(RefundOrderServiceImpl.class); - - @Autowired - private Mq4RefundNotify mq4RefundNotify; - - @Override - public Map create(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("新增退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject refundOrderObj = baseParam.isNullValue("refundOrder") ? null : JSONObject.parseObject(bizParamMap.get("refundOrder").toString()); - if(refundOrderObj == null) { - _log.warn("新增退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - RefundOrder refundOrder = BeanConvertUtils.map2Bean(refundOrderObj, RefundOrder.class); - if(refundOrder == null) { - _log.warn("新增退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseCreateRefundOrder(refundOrder); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map select(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据退款订单号查询退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String refundOrderId = baseParam.isNullValue("refundOrderId") ? null : bizParamMap.get("refundOrderId").toString(); - if (ObjectValidUtil.isInvalid(refundOrderId)) { - _log.warn("根据退款订单号查询退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - RefundOrder refundOrder = super.baseSelectRefundOrder(refundOrderId); - if(refundOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(refundOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndRefundOrderId(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和退款订单号查询退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String refundOrderId = baseParam.isNullValue("refundOrderId") ? null : bizParamMap.get("refundOrderId").toString(); - if (ObjectValidUtil.isInvalid(mchId, refundOrderId)) { - _log.warn("根据商户号和退款订单号查询退款订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - RefundOrder refundOrder = super.baseSelectByMchIdAndRefundOrderId(mchId, refundOrderId); - if(refundOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(refundOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndMchRefundNo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String mchRefundNo = baseParam.isNullValue("mchRefundNo") ? null : bizParamMap.get("mchRefundNo").toString(); - if (ObjectValidUtil.isInvalid(mchId, mchRefundNo)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - RefundOrder refundOrder = super.baseSelectByMchIdAndMchRefundNo(mchId, mchRefundNo); - if(refundOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(refundOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map updateStatus4Ing(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String refundOrderId = baseParam.isNullValue("refundOrderId") ? null : bizParamMap.get("refundOrderId").toString(); - String channelOrderNo = baseParam.isNullValue("channelOrderNo") ? null : bizParamMap.get("channelOrderNo").toString(); - if (ObjectValidUtil.isInvalid(refundOrderId)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Ing(refundOrderId, channelOrderNo); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Success(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String refundOrderId = baseParam.isNullValue("refundOrderId") ? null : bizParamMap.get("refundOrderId").toString(); - if (ObjectValidUtil.isInvalid(refundOrderId)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Success(refundOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Complete(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String refundOrderId = baseParam.isNullValue("refundOrderId") ? null : bizParamMap.get("refundOrderId").toString(); - if (ObjectValidUtil.isInvalid(refundOrderId)) { - _log.warn("修改退款订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Complete(refundOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map sendRefundNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("发送退款订单处理失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String msg = baseParam.isNullValue("msg") ? null : bizParamMap.get("msg").toString(); - if (ObjectValidUtil.isInvalid(msg)) { - _log.warn("发送退款订单处理失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = 1; - try { - mq4RefundNotify.send(msg); - }catch (Exception e) { - _log.error(e, ""); - result = 0; - } - return RpcUtil.createBizResult(baseParam, result); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/TransOrderServiceImpl.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/TransOrderServiceImpl.java deleted file mode 100644 index 1bd3ece150f06d588027fc35f1e7472ec75f17f0..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/impl/TransOrderServiceImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -package org.xxpay.dubbo.service.impl; - -import com.alibaba.dubbo.config.annotation.Service; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.api.service.ITransOrderService; -import org.xxpay.dubbo.service.BaseService4TransOrder; -import org.xxpay.dubbo.service.mq.Mq4TransNotify; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service(version = "1.0.0") -public class TransOrderServiceImpl extends BaseService4TransOrder implements ITransOrderService { - - private static final MyLog _log = MyLog.getLog(TransOrderServiceImpl.class); - - @Autowired - private Mq4TransNotify mq4TransNotify; - - @Override - public Map create(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("新增转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject transOrderObj = baseParam.isNullValue("transOrder") ? null : JSONObject.parseObject(bizParamMap.get("transOrder").toString()); - if(transOrderObj == null) { - _log.warn("新增转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - TransOrder transOrder = BeanConvertUtils.map2Bean(transOrderObj, TransOrder.class); - if(transOrder == null) { - _log.warn("新增转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseCreateTransOrder(transOrder); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map select(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据转账订单号查询转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String transOrderId = baseParam.isNullValue("transOrderId") ? null : bizParamMap.get("transOrderId").toString(); - if (ObjectValidUtil.isInvalid(transOrderId)) { - _log.warn("根据转账订单号查询转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - TransOrder transOrder = super.baseSelectTransOrder(transOrderId); - if(transOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(transOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndTransOrderId(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和转账订单号查询转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String transOrderId = baseParam.isNullValue("transOrderId") ? null : bizParamMap.get("transOrderId").toString(); - if (ObjectValidUtil.isInvalid(mchId, transOrderId)) { - _log.warn("根据商户号和转账订单号查询转账订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - TransOrder transOrder = super.baseSelectByMchIdAndTransOrderId(mchId, transOrderId); - if(transOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(transOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectByMchIdAndMchTransNo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String mchTransNo = baseParam.isNullValue("mchTransNo") ? null : bizParamMap.get("mchTransNo").toString(); - if (ObjectValidUtil.isInvalid(mchId, mchTransNo)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - TransOrder transOrder = super.baseSelectByMchIdAndMchTransNo(mchId, mchTransNo); - if(transOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(transOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map updateStatus4Ing(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String transOrderId = baseParam.isNullValue("transOrderId") ? null : bizParamMap.get("transOrderId").toString(); - String channelOrderNo = baseParam.isNullValue("channelOrderNo") ? null : bizParamMap.get("channelOrderNo").toString(); - if (ObjectValidUtil.isInvalid(transOrderId)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Ing(transOrderId, channelOrderNo); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Success(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String transOrderId = baseParam.isNullValue("transOrderId") ? null : bizParamMap.get("transOrderId").toString(); - if (ObjectValidUtil.isInvalid(transOrderId)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Success(transOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Complete(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String transOrderId = baseParam.isNullValue("transOrderId") ? null : bizParamMap.get("transOrderId").toString(); - if (ObjectValidUtil.isInvalid(transOrderId)) { - _log.warn("修改转账订单状态失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Complete(transOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map sendTransNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("发送转账订单处理失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String msg = baseParam.isNullValue("msg") ? null : bizParamMap.get("msg").toString(); - if (ObjectValidUtil.isInvalid(msg)) { - _log.warn("发送转账订单处理失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = 1; - try { - mq4TransNotify.send(msg); - }catch (Exception e) { - _log.error(e, ""); - result = 0; - } - return RpcUtil.createBizResult(baseParam, result); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchNotify.java deleted file mode 100644 index 3b18fd51be6f5f1b54dfa785fbf6c7c3b30fce85..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchNotify.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import org.apache.activemq.ScheduledMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.service.BaseService4PayOrder; - -import javax.jms.*; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; - -/** - * @Description: 商户通知MQ统一处理 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4MchNotify extends BaseService4PayOrder { - - @Autowired - private JmsTemplate jmsTemplate; - - private static final MyLog _log = MyLog.getLog(Mq4MchNotify.class); - - public void send(Queue queue, String msg) { - _log.info("发送MQ消息:msg={}", msg); - this.jmsTemplate.convertAndSend(queue, msg); - } - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public void send(Queue queue, String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(queue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - private static class TrustAnyTrustManager implements X509TrustManager { - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; - } - } - - public String httpPost(String url) { - StringBuffer sb = new StringBuffer(); - try { - URL console = new URL(url); - if("https".equals(console.getProtocol())) { - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, - new java.security.SecureRandom()); - HttpsURLConnection con = (HttpsURLConnection) console.openConnection(); - con.setSSLSocketFactory(sc.getSocketFactory()); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(30 * 1000); - con.setReadTimeout(60 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else if("http".equals(console.getProtocol())) { - HttpURLConnection con = (HttpURLConnection) console.openConnection(); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(30 * 1000); - con.setReadTimeout(60 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else { - _log.error("not do protocol. protocol=%s", console.getProtocol()); - } - } catch(Exception e) { - _log.error(e, "httpPost exception. url:%s", url); - } - return sb.toString(); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchPayNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchPayNotify.java deleted file mode 100644 index c4790b8be324858c6a43023117144588155b9cab..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchPayNotify.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.service.BaseService4PayOrder; - -import javax.jms.Queue; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 商户通知MQ统一处理 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4MchPayNotify extends Mq4MchNotify { - - @Autowired - private Queue mchPayNotifyQueue; - - @Autowired - private BaseService4PayOrder baseService4PayOrder; - - private static final MyLog _log = MyLog.getLog(Mq4MchPayNotify.class); - - public void send(String msg) { - super.send(mchPayNotifyQueue, msg); - } - - @JmsListener(destination = MqConfig.MCH_PAY_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - String logPrefix = "【商户支付通知】"; - _log.info("{}接收消息:msg={}", logPrefix, msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("{}商户通知URL为空,respUrl={}", logPrefix, respUrl); - return; - } - String httpResult = httpPost(respUrl); - int cnt = count + 1; - _log.info("{}notifyCount={}", logPrefix, cnt); - if("success".equalsIgnoreCase(httpResult)){ - // 修改支付订单表 - try { - int result = baseService4PayOrder.baseUpdateStatus4Complete(orderId); - _log.info("{}修改payOrderId={},订单状态为处理完成->{}", logPrefix, orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知 - try { - int result = super.baseUpdateMchNotifySuccess(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - return ; // 通知成功结束 - }else { - // 修改通知次数 - try { - int result = super.baseUpdateMchNotifyFail(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - if (cnt > 5) { - _log.info("{}通知次数notifyCount()>5,停止通知", respUrl, cnt); - return ; - } - // 通知失败,延时再通知 - msgObj.put("count", cnt); - this.send(mchPayNotifyQueue, msgObj.toJSONString(), cnt * 60 * 1000); - _log.info("{}发送延时通知完成,通知次数:{},{}秒后执行通知", respUrl, cnt, cnt * 60); - } - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchRefundNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchRefundNotify.java deleted file mode 100644 index 5d5777162b5353cad1e0ca4431ed16c3835f0cf3..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchRefundNotify.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.service.BaseService4RefundOrder; - -import javax.jms.Queue; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 商户通知MQ统一处理 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4MchRefundNotify extends Mq4MchNotify { - - @Autowired - private Queue mchRefundNotifyQueue; - - @Autowired - private BaseService4RefundOrder baseService4RefundOrder; - - private static final MyLog _log = MyLog.getLog(Mq4MchRefundNotify.class); - - public void send(String msg) { - super.send(mchRefundNotifyQueue, msg); - } - - @JmsListener(destination = MqConfig.MCH_REFUND_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - String logPrefix = "【商户退款通知】"; - _log.info("{}接收消息:msg={}", logPrefix, msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("{}商户通知URL为空,respUrl={}", logPrefix, respUrl); - return; - } - String httpResult = httpPost(respUrl); - int cnt = count + 1; - _log.info("{}notifyCount={}", logPrefix, cnt); - if("success".equalsIgnoreCase(httpResult)){ - // 修改支付订单表 - try { - int result = baseService4RefundOrder.baseUpdateStatus4Complete(orderId); - _log.info("{}修改payOrderId={},订单状态为处理完成->{}", logPrefix, orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知 - try { - int result = super.baseUpdateMchNotifySuccess(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - return ; // 通知成功结束 - }else { - // 修改通知次数 - try { - int result = super.baseUpdateMchNotifyFail(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - if (cnt > 5) { - _log.info("{}通知次数notifyCount()>5,停止通知", respUrl, cnt); - return ; - } - // 通知失败,延时再通知 - msgObj.put("count", cnt); - this.send(mchRefundNotifyQueue, msgObj.toJSONString(), cnt * 60 * 1000); - _log.info("{}发送延时通知完成,通知次数:{},{}秒后执行通知", respUrl, cnt, cnt * 60); - } - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchTransNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchTransNotify.java deleted file mode 100644 index 5481da76f553ccdfd648511538108368db681ec6..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4MchTransNotify.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.service.BaseService4TransOrder; - -import javax.jms.Queue; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 商户通知MQ统一处理 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4MchTransNotify extends Mq4MchNotify { - - @Autowired - private Queue mchTransNotifyQueue; - - @Autowired - private BaseService4TransOrder baseService4TransOrder; - - private static final MyLog _log = MyLog.getLog(Mq4MchTransNotify.class); - - public void send(String msg) { - super.send(mchTransNotifyQueue, msg); - } - - @JmsListener(destination = MqConfig.MCH_TRANS_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - String logPrefix = "【商户转账通知】"; - _log.info("{}接收消息:msg={}", logPrefix, msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("{}商户通知URL为空,respUrl={}", logPrefix, respUrl); - return; - } - String httpResult = httpPost(respUrl); - int cnt = count + 1; - _log.info("{}notifyCount={}", logPrefix, cnt); - if("success".equalsIgnoreCase(httpResult)){ - // 修改支付订单表 - try { - int result = baseService4TransOrder.baseUpdateStatus4Complete(orderId); - _log.info("{}修改payOrderId={},订单状态为处理完成->{}", logPrefix, orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知 - try { - int result = super.baseUpdateMchNotifySuccess(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - return ; // 通知成功结束 - }else { - // 修改通知次数 - try { - int result = super.baseUpdateMchNotifyFail(orderId, httpResult, (byte) cnt); - _log.info("{}修改商户通知,orderId={},result={},notifyCount={},结果:{}", logPrefix, orderId, httpResult, cnt, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改商户支付通知异常"); - } - if (cnt > 5) { - _log.info("{}通知次数notifyCount()>5,停止通知", respUrl, cnt); - return ; - } - // 通知失败,延时再通知 - msgObj.put("count", cnt); - this.send(mchTransNotifyQueue, msgObj.toJSONString(), cnt * 60 * 1000); - _log.info("{}发送延时通知完成,通知次数:{},{}秒后执行通知", respUrl, cnt, cnt * 60); - } - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4PayNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4PayNotify.java deleted file mode 100644 index baae87ad8bc76aebb306aaaaa8aabde7df385cc6..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4PayNotify.java +++ /dev/null @@ -1,191 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.activemq.ScheduledMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.service.BaseService; -import org.xxpay.dubbo.service.BaseService4PayOrder; - -import javax.jms.*; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 业务通知MQ实现 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4PayNotify extends BaseService4PayOrder { - - @Autowired - private Queue payNotifyQueue; - - @Autowired - private JmsTemplate jmsTemplate; - - private static final MyLog _log = MyLog.getLog(Mq4PayNotify.class); - - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - this.jmsTemplate.convertAndSend(this.payNotifyQueue, msg); - } - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(this.payNotifyQueue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - private static class TrustAnyTrustManager implements X509TrustManager { - - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; - } - } - - @JmsListener(destination = MqConfig.PAY_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - _log.info("do notify task, msg={}", msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("notify url is empty. respUrl={}", respUrl); - return; - } - try { - StringBuffer sb = new StringBuffer(); - URL console = new URL(respUrl); - _log.info("==>MQ通知业务系统开始[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - if("https".equals(console.getProtocol())) { - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, - new java.security.SecureRandom()); - HttpsURLConnection con = (HttpsURLConnection) console.openConnection(); - con.setSSLSocketFactory(sc.getSocketFactory()); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(10 * 1000); - con.setReadTimeout(5 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else if("http".equals(console.getProtocol())) { - HttpURLConnection con = (HttpURLConnection) console.openConnection(); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(10 * 1000); - con.setReadTimeout(5 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else { - _log.error("not do protocol. protocol=%s", console.getProtocol()); - return; - } - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - // 验证结果 - _log.info("notify response , OrderID={}", orderId); - if(sb.toString().trim().equalsIgnoreCase("success")){ - //_log.info("{} notify success, url:{}", _notifyInfo.getBusiId(), respUrl); - //修改订单表 - try { - int result = super.baseUpdateStatus4Complete(orderId); - _log.info("修改payOrderId={},订单状态为处理完成->{}", orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知次数 - try { - int result = super.baseUpdateNotify(orderId, (byte) 1); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - return ; // 通知成功结束 - }else { - // 通知失败,延时再通知 - int cnt = count+1; - _log.info("notify count={}", cnt); - // 修改通知次数 - try { - int result = super.baseUpdateNotify(orderId, (byte) cnt); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - - if (cnt > 5) { - _log.info("notify count>5 stop. url={}", respUrl); - return ; - } - msgObj.put("count", cnt); - this.send(msgObj.toJSONString(), cnt * 60 * 1000); - } - _log.warn("notify failed. url:{}, response body:{}", respUrl, sb.toString()); - } catch(Exception e) { - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - _log.error(e, "notify exception. url:%s", respUrl); - } - - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4RefundNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4RefundNotify.java deleted file mode 100644 index 5c4a97255157d1ad643ba11c6b1970c944a22d9a..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4RefundNotify.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.activemq.ScheduledMessage; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.common.util.StrUtil; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dubbo.api.service.IPayChannel4AliService; -import org.xxpay.dubbo.api.service.IPayChannel4WxService; -import org.xxpay.dubbo.service.BaseNotify4MchRefund; -import org.xxpay.dubbo.service.BaseService4RefundOrder; - -import javax.jms.*; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 业务通知MQ实现 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-30 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4RefundNotify extends BaseService4RefundOrder { - - @Autowired - private Queue refundNotifyQueue; - - @Autowired - private JmsTemplate jmsTemplate; - - @Autowired - private IPayChannel4WxService payChannel4WxService; - - @Autowired - private IPayChannel4AliService payChannel4AliService; - - @Autowired - private BaseNotify4MchRefund baseNotify4MchRefund; - - private static final MyLog _log = MyLog.getLog(Mq4RefundNotify.class); - - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - this.jmsTemplate.convertAndSend(this.refundNotifyQueue, msg); - } - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(this.refundNotifyQueue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - @JmsListener(destination = MqConfig.REFUND_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - _log.info("处理退款任务.msg={}", msg); - JSONObject msgObj = JSON.parseObject(msg); - String refundOrderId = msgObj.getString("refundOrderId"); - String channelName = msgObj.getString("channelName"); - RefundOrder refundOrder = baseSelectRefundOrder(refundOrderId); - if(refundOrder == null) { - _log.warn("查询退款订单为空,不能退款.refundOrderId={}", refundOrderId); - return; - } - if(refundOrder.getStatus() != PayConstant.REFUND_STATUS_INIT) { - _log.warn("退款状态不是初始({})或失败({}),不能退款.refundOrderId={}", PayConstant.REFUND_STATUS_INIT, PayConstant.REFUND_STATUS_FAIL, refundOrderId); - return; - } - int result = this.baseUpdateStatus4Ing(refundOrderId, ""); - if(result != 1) { - _log.warn("更改退款为退款中({})失败,不能退款.refundOrderId={}", PayConstant.REFUND_STATUS_REFUNDING, refundOrderId); - return; - } - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map resultMap; - if(PayConstant.CHANNEL_NAME_WX.equalsIgnoreCase(channelName)) { - resultMap = payChannel4WxService.doWxRefundReq(jsonParam); - }else if(PayConstant.CHANNEL_NAME_ALIPAY.equalsIgnoreCase(channelName)) { - resultMap = payChannel4AliService.doAliRefundReq(jsonParam); - }else { - _log.warn("不支持的退款渠道,停止退款处理.refundOrderId={},channelName={}", refundOrderId, channelName); - return; - } - if(!RpcUtil.isSuccess(resultMap)) { - _log.warn("发起退款返回异常,停止退款处理.refundOrderId={}", refundOrderId); - return; - } - Map bizResult = (Map) resultMap.get("bizResult"); - Boolean isSuccess = false; - if(bizResult.get("isSuccess") != null) isSuccess = Boolean.parseBoolean(bizResult.get("isSuccess").toString()); - if(isSuccess) { - // 更新退款状态为成功 - String channelOrderNo = StrUtil.toString(bizResult.get("channelOrderNo")); - result = baseUpdateStatus4Success(refundOrderId, channelOrderNo); - _log.info("更新退款订单状态为成功({}),refundOrderId={},返回结果:{}", PayConstant.REFUND_STATUS_SUCCESS, refundOrderId, result); - // 发送商户通知 - baseNotify4MchRefund.doNotify(refundOrder, true); - }else { - // 更新退款状态为失败 - String channelErrCode = StrUtil.toString(bizResult.get("channelErrCode")); - String channelErrMsg = StrUtil.toString(bizResult.get("channelErrMsg")); - result = baseUpdateStatus4Fail(refundOrderId, channelErrCode, channelErrMsg); - _log.info("更新退款订单状态为失败({}),refundOrderId={},返回结果:{}", PayConstant.REFUND_STATUS_FAIL, refundOrderId, result); - // 发送商户通知 - baseNotify4MchRefund.doNotify(refundOrder, true); - } - - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4TransNotify.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4TransNotify.java deleted file mode 100644 index 0d65421a6548645a6dd2b3b01a8facfb9bfd2f2e..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/Mq4TransNotify.java +++ /dev/null @@ -1,146 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.activemq.ScheduledMessage; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.api.service.IPayChannel4AliService; -import org.xxpay.dubbo.api.service.IPayChannel4WxService; -import org.xxpay.dubbo.service.BaseNotify4MchTrans; -import org.xxpay.dubbo.service.BaseService; -import org.xxpay.dubbo.service.BaseService4TransOrder; - -import javax.jms.*; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 业务通知MQ实现 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-30 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4TransNotify extends BaseService4TransOrder { - - @Autowired - private Queue transNotifyQueue; - - @Autowired - private JmsTemplate jmsTemplate; - - @Autowired - private IPayChannel4WxService payChannel4WxService; - - @Autowired - private IPayChannel4AliService payChannel4AliService; - - @Autowired - private BaseNotify4MchTrans baseNotify4MchTrans; - - private static final MyLog _log = MyLog.getLog(Mq4TransNotify.class); - - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - this.jmsTemplate.convertAndSend(this.transNotifyQueue, msg); - } - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(this.transNotifyQueue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - @JmsListener(destination = MqConfig.TRANS_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - _log.info("处理转账任务.msg={}", msg); - JSONObject msgObj = JSON.parseObject(msg); - String transOrderId = msgObj.getString("transOrderId"); - String channelName = msgObj.getString("channelName"); - TransOrder transOrder = baseSelectTransOrder(transOrderId); - if(transOrder == null) { - _log.warn("查询转账订单为空,不能转账.transOrderId={}", transOrderId); - return; - } - if(transOrder.getStatus() != PayConstant.TRANS_STATUS_INIT) { - _log.warn("转账状态不是初始({})或失败({}),不能转账.transOrderId={}", PayConstant.TRANS_STATUS_INIT, PayConstant.TRANS_STATUS_FAIL, transOrderId); - return; - } - int result = this.baseUpdateStatus4Ing(transOrderId, ""); - if(result != 1) { - _log.warn("更改转账为转账中({})失败,不能转账.transOrderId={}", PayConstant.TRANS_STATUS_TRANING, transOrderId); - return; - } - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map resultMap; - if(PayConstant.CHANNEL_NAME_WX.equalsIgnoreCase(channelName)) { - resultMap = payChannel4WxService.doWxTransReq(jsonParam); - }else if(PayConstant.CHANNEL_NAME_ALIPAY.equalsIgnoreCase(channelName)) { - resultMap = payChannel4AliService.doAliTransReq(jsonParam); - }else { - _log.warn("不支持的转账渠道,停止转账处理.transOrderId={},channelName={}", transOrderId, channelName); - return; - } - if(!RpcUtil.isSuccess(resultMap)) { - _log.warn("发起转账返回异常,停止转账处理.transOrderId={}", transOrderId); - return; - } - Map bizResult = (Map) resultMap.get("bizResult"); - Boolean isSuccess = false; - if(bizResult.get("isSuccess") != null) isSuccess = Boolean.parseBoolean(bizResult.get("isSuccess").toString()); - if(isSuccess) { - // 更新转账状态为成功 - String channelOrderNo = bizResult.get("channelOrderNo") == null ? "" : bizResult.get("channelOrderNo").toString(); - result = baseUpdateStatus4Success(transOrderId, channelOrderNo); - _log.info("更新转账订单状态为成功({}),transOrderId={},返回结果:{}", PayConstant.TRANS_STATUS_SUCCESS, transOrderId, result); - // 发送商户通知 - baseNotify4MchTrans.doNotify(transOrder, true); - }else { - // 更新转账状态为成功 - String channelErrCode = bizResult.get("channelErrCode") == null ? "" : bizResult.get("channelErrCode").toString(); - String channelErrMsg = bizResult.get("channelErrMsg") == null ? "" : bizResult.get("channelErrMsg").toString(); - result = baseUpdateStatus4Fail(transOrderId, channelErrCode, channelErrMsg); - _log.info("更新转账订单状态为失败({}),transOrderId={},返回结果:{}", PayConstant.TRANS_STATUS_FAIL, transOrderId, result); - // 发送商户通知 - baseNotify4MchTrans.doNotify(transOrder, true); - } - - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/MqConfig.java b/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/MqConfig.java deleted file mode 100644 index 0f9ddb17c1a9a16127f69b98b09232d41346df80..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/java/org/xxpay/dubbo/service/mq/MqConfig.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.xxpay.dubbo.service.mq; - -import org.apache.activemq.command.ActiveMQQueue; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.jms.Queue; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Configuration -public class MqConfig { - - public static final String PAY_NOTIFY_QUEUE_NAME = "pay.notify.queue"; - - public static final String MCH_NOTIFY_QUEUE_NAME = "queue.notify.mch"; - - public static final String MCH_PAY_NOTIFY_QUEUE_NAME = "queue.notify.mch.pay"; - - public static final String MCH_TRANS_NOTIFY_QUEUE_NAME = "queue.notify.mch.trans"; - - public static final String MCH_REFUND_NOTIFY_QUEUE_NAME = "queue.notify.mch.refund"; - - public static final String TRANS_NOTIFY_QUEUE_NAME = "queue.notify.trans"; - - public static final String REFUND_NOTIFY_QUEUE_NAME = "queue.notify.refund"; - - @Bean - public Queue payNotifyQueue() { - return new ActiveMQQueue(PAY_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue mchNotifyQueue() { - return new ActiveMQQueue(MCH_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue transNotifyQueue() { - return new ActiveMQQueue(TRANS_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue refundNotifyQueue() { - return new ActiveMQQueue(REFUND_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue mchPayNotifyQueue() { - return new ActiveMQQueue(MCH_PAY_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue mchTransNotifyQueue() { - return new ActiveMQQueue(MCH_TRANS_NOTIFY_QUEUE_NAME); - } - - @Bean - public Queue mchRefundNotifyQueue() { - return new ActiveMQQueue(MCH_REFUND_NOTIFY_QUEUE_NAME); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/resources/application.yml b/xxpay4dubbo/xxpay4dubbo-service/src/main/resources/application.yml deleted file mode 100755 index 6f7abf199888f73e5e9b3aae5b271abb68adcc6c..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/main/resources/application.yml +++ /dev/null @@ -1,47 +0,0 @@ -spring: - dubbo: - application: - name: xxpay4dubbo-service - registry: - address: zookeeper://127.0.0.1:2181 - protocol: - name: dubbo - port: 20880 - scan: org.xxpay.dubbo - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: xxpay - password: xxpay - initialSize: 5 # 初始化大小 - minIdle: 5 # 最小 - maxActive: 20 # 最大 - maxWait: 60000 # 获取连接等待超时的时间 - timeBetweenEvictionRunsMillis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - poolPreparedStatements: true # 打开PSCache - maxPoolPreparedStatementPerConnectionSize: 20 # 指定每个连接上PSCache的大小 - filters: stat,wall,log4j # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 - profiles: - active: prod - - activemq: - broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) - in-memory: true - -logging: - file: ./log/xxpay4dubbo-service.log - -config: - ali: - notify_url: http://xxpay.nat100.top/notify/pay/aliPayNotifyRes.htm - return_url: http://www.xxpay.org - wx: - certRootPath: /Users/dingzhiwei/java/tmp/cert - notifyUrl: http://xxpay.nat100.top/notify/pay/wxPayNotifyRes.htm \ No newline at end of file diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar b/xxpay4dubbo/xxpay4dubbo-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar deleted file mode 100755 index 6cc1c44ac982e57cb83296e0e2912120a0411131..0000000000000000000000000000000000000000 Binary files a/xxpay4dubbo/xxpay4dubbo-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar and /dev/null differ diff --git a/xxpay4dubbo/xxpay4dubbo-service/src/test/java/org/xxpay/dubbo/service/PayServiceTest.java b/xxpay4dubbo/xxpay4dubbo-service/src/test/java/org/xxpay/dubbo/service/PayServiceTest.java deleted file mode 100644 index 4431a44938511c6c9e4c0e146a999fbb8b9bb60d..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-service/src/test/java/org/xxpay/dubbo/service/PayServiceTest.java +++ /dev/null @@ -1,178 +0,0 @@ -package org.xxpay.dubbo.service; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.RefundOrder; -import org.xxpay.dal.dao.model.TransOrder; -import org.xxpay.dubbo.api.service.IPayChannel4AliService; -import org.xxpay.dubbo.api.service.IPayChannel4WxService; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/27 - * @description: - */ -@RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest -public class PayServiceTest { - - @Autowired - IPayChannel4AliService payChannel4AliService; - - @Autowired - IPayChannel4WxService payChannel4WxService; - - String TransOrderId = System.currentTimeMillis()+""; - - @Test - public void testDoAliTransReq() { - TransOrder transOrder = new TransOrder(); - transOrder.setTransOrderId(TransOrderId); - transOrder.setMchId("20001223"); - transOrder.setChannelId("ALIPAY_PC"); - transOrder.setChannelUser("jmdhappy@126.com"); - transOrder.setAmount(10l); - transOrder.setRemarkInfo("测试XxPay转账"); - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4AliService.doAliTransReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void testGetAliTransReq() { - TransOrder transOrder = new TransOrder(); - //transOrder.setTransOrderId("1509098344835"); - transOrder.setChannelOrderNo("302892158947140"); - transOrder.setMchId("20001223"); - transOrder.setChannelId("ALIPAY_PC"); - - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4AliService.getAliTransReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void testDoAliRefundReq() { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId(MySeq.getRefund()); - refundOrder.setPayOrderId("P0020171028110830000001"); - refundOrder.setChannelPayOrderNo("2017102821001003030281781741"); - refundOrder.setRefundAmount(100l); - - refundOrder.setMchId("20001223"); - refundOrder.setChannelId("ALIPAY_PC"); - refundOrder.setChannelUser("jmdhappy@126.com"); - - - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4AliService.doAliRefundReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void testetAliRefundReq() { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId(MySeq.getRefund()); - refundOrder.setPayOrderId(""); - refundOrder.setChannelPayOrderNo(""); - refundOrder.setRefundAmount(10l); - - refundOrder.setMchId("20001223"); - refundOrder.setChannelId("ALIPAY_PC"); - refundOrder.setChannelUser("jmdhappy@126.com"); - - - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4AliService.getAliRefundReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void testDoWxTransReq() { - TransOrder transOrder = new TransOrder(); - transOrder.setTransOrderId(TransOrderId); - transOrder.setMchId("20001222"); - transOrder.setChannelId("WX_JSAPI"); - transOrder.setChannelUser("oIkQuwhPgPUgl-TvQ48_UUpZUwMs"); - transOrder.setAmount(100l); - transOrder.setUserName("丁志伟"); - transOrder.setRemarkInfo("测试XxPay转账"); - transOrder.setExtra("{\"checkName\":\"FORCE_CHECK\"}"); // 附加参数 - transOrder.setClientIp("210.73.211.141"); - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4WxService.doWxTransReq(jsonParam); - System.out.println("map=" + map); - } - // - - @Test - public void testGetWxTransReq() { - TransOrder transOrder = new TransOrder(); - transOrder.setTransOrderId("1509276544421"); - transOrder.setMchId("20001222"); - transOrder.setChannelId("WX_JSAPI"); - - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4WxService.getWxTransReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void testDoWxRefundReq() { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId(MySeq.getRefund()); - refundOrder.setPayOrderId("P0020171029202216000002"); - //refundOrder.setChannelPayOrderNo("wx201710292022176ff41580340020277393"); - refundOrder.setRefundAmount(1l); - refundOrder.setPayAmount(1l); - refundOrder.setMchId("20001223"); - refundOrder.setChannelId("WX_JSAPI"); - refundOrder.setChannelUser("oIkQuwhPgPUgl-TvQ48_UUpZUwMs"); - - - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4WxService.doWxRefundReq(jsonParam); - System.out.println("map=" + map); - } - - @Test - public void tesGetWxRefundReq() { - RefundOrder refundOrder = new RefundOrder(); - refundOrder.setRefundOrderId("R0020171029202641000000"); - refundOrder.setPayOrderId(""); - refundOrder.setChannelPayOrderNo(""); - - refundOrder.setMchId("20001223"); - refundOrder.setChannelId("WX_JSAPI"); - - - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map map = payChannel4WxService.getWxRefundReq(jsonParam); - System.out.println("map=" + map); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/pom.xml b/xxpay4dubbo/xxpay4dubbo-web/pom.xml deleted file mode 100755 index 4924de62cc4df3a9aa718a64e560adadc1339f3d..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/pom.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4dubbo-web - 1.0.0 - jar - xxpay4dubbo-web - xxpay4dubbo-web - - - org.xxpay - xxpay4dubbo - 1.0.0 - - - - - org.xxpay - xxpay4dubbo-api - 1.0.0 - - - io.dubbo.springboot - spring-boot-starter-dubbo - - - org.springframework.boot - spring-boot-starter-web - - - commons-io - commons-io - 2.4 - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${springboot.version} - - - - \ No newline at end of file diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/XxPayDubboWebAppliaction.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/XxPayDubboWebAppliaction.java deleted file mode 100755 index bd242156798499c8305bef10d028faa45644d322..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/XxPayDubboWebAppliaction.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.xxpay.dubbo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; - -/** - * - */ -@SpringBootApplication -@ComponentScan(basePackages={"org.xxpay"}) -public class XxPayDubboWebAppliaction { - public static void main(String[] args) { - SpringApplication.run(XxPayDubboWebAppliaction.class, args); - } -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4AliPayController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4AliPayController.java deleted file mode 100644 index 0bd0f65f3067115d8f58407661d8517bdbcff779..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4AliPayController.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.web.service.NotifyPayService; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * @Description: 接收处理支付宝通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4AliPayController { - - private static final MyLog _log = MyLog.getLog(Notify4AliPayController.class); - - @Autowired - private NotifyPayService notifyPayService; - - /** - * 支付宝移动支付后台通知响应 - * @param request - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping(value = "/notify/pay/aliPayNotifyRes.htm") - @ResponseBody - public String aliPayNotifyRes(HttpServletRequest request) throws ServletException, IOException { - _log.info("====== 开始接收支付宝支付回调通知 ======"); - String notifyRes = doAliPayRes(request); - _log.info("响应给支付宝:{}", notifyRes); - _log.info("====== 完成接收支付宝支付回调通知 ======"); - return notifyRes; - } - - public String doAliPayRes(HttpServletRequest request) throws ServletException, IOException { - String logPrefix = "【支付宝支付回调通知】"; - //获取支付宝POST过来反馈信息 - Map params = new HashMap(); - Map requestParams = request.getParameterMap(); - for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) { - String name = (String) iter.next(); - String[] values = (String[]) requestParams.get(name); - String valueStr = ""; - for (int i = 0; i < values.length; i++) { - valueStr = (i == values.length - 1) ? valueStr + values[i] - : valueStr + values[i] + ","; - } - //乱码解决,这段代码在出现乱码时使用。如果mysign和sign不相等也可以使用这段代码转化 - //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "gbk"); - params.put(name, valueStr); - } - _log.info("{}通知请求数据:reqStr={}", logPrefix, params); - if(params.isEmpty()) { - _log.error("{}请求参数为空", logPrefix); - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - return notifyPayService.doAliPayNotify(params); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4WxPayController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4WxPayController.java deleted file mode 100644 index 41fbbabe14165a98aed1ea0b052eecb51682f794..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/Notify4WxPayController.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import org.apache.commons.io.IOUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.util.MyLog; -import org.xxpay.dubbo.web.service.NotifyPayService; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; - -/** - * @Description: 接收处理微信通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4WxPayController { - - private static final MyLog _log = MyLog.getLog(Notify4WxPayController.class); - - @Autowired - private NotifyPayService notifyPayService; - - /** - * 微信支付(统一下单接口)后台通知响应 - * @param request - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping("/notify/pay/wxPayNotifyRes.htm") - @ResponseBody - public String wxPayNotifyRes(HttpServletRequest request) throws ServletException, IOException { - _log.info("====== 开始接收微信支付回调通知 ======"); - String notifyRes = doWxPayRes(request); - _log.info("响应给微信:{}", notifyRes); - _log.info("====== 完成接收微信支付回调通知 ======"); - return notifyRes; - } - - public String doWxPayRes(HttpServletRequest request) throws ServletException, IOException { - String logPrefix = "【微信支付回调通知】"; - String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding()); - _log.info("{}通知请求数据:reqStr={}", logPrefix, xmlResult); - return notifyPayService.doWxPayNotify(xmlResult); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/PayOrderController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/PayOrderController.java deleted file mode 100644 index d2cbdaa4775ece62aca804ac401955a9d1bff538..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/PayOrderController.java +++ /dev/null @@ -1,254 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dubbo.web.service.MchInfoService; -import org.xxpay.dubbo.web.service.PayChannelService; -import org.xxpay.dubbo.web.service.PayOrderService; - -/** - * @Description: 支付订单,包括:统一下单,订单查询,补单等接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayOrderController { - - private final MyLog _log = MyLog.getLog(PayOrderController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 统一下单接口: - * 1)先验证接口参数以及签名信息 - * 2)验证通过创建支付订单 - * 3)根据商户选择渠道,调用支付服务进行下单 - * 4)返回下单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/pay/create_order") - public String payOrder(@RequestParam String params) { - _log.info("###### 开始接收商户统一下单请求 ######"); - String logPrefix = "【商户统一下单】"; - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject payContext = new JSONObject(); - JSONObject payOrder = null; - // 验证参数有效性 - Object object = validateParams(po, payContext); - if (object instanceof String) { - _log.info("{}参数校验不通过:{}", logPrefix, object); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null)); - } - if (object instanceof JSONObject) payOrder = (JSONObject) object; - if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null)); - int result = payOrderService.create(payOrder); - _log.info("{}创建支付订单,结果:{}", logPrefix, result); - if(result != 1) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null)); - } - String channelId = payOrder.getString("channelId"); - switch (channelId) { - case PayConstant.PAY_CHANNEL_WX_APP : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_APP, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_JSAPI : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_JSPAI, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_NATIVE : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_NATIVE, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_MWEB : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_MWEB, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_PC : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_WAP : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_QR : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - default: - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null)); - } - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private Object validateParams(JSONObject params, JSONObject payContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String channelId = params.getString("channelId"); // 渠道ID - String amount = params.getString("amount"); // 支付金额(单位分) - String currency = params.getString("currency"); // 币种 - String clientIp = params.getString("clientIp"); // 客户端IP - String device = params.getString("device"); // 设备 - String extra = params.getString("extra"); // 特定渠道发起时额外参数 - String param1 = params.getString("param1"); // 扩展参数1 - String param2 = params.getString("param2"); // 扩展参数2 - String notifyUrl = params.getString("notifyUrl"); // 支付结果回调URL - String sign = params.getString("sign"); // 签名 - String subject = params.getString("subject"); // 商品主题 - String body = params.getString("body"); // 商品描述信息 - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo)) { - errorMessage = "request params[mchOrderNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelId)) { - errorMessage = "request params[channelId] error."; - return errorMessage; - } - if(!NumberUtils.isNumber(amount)) { - errorMessage = "request params[amount] error."; - return errorMessage; - } - if(StringUtils.isBlank(currency)) { - errorMessage = "request params[currency] error."; - return errorMessage; - } - if(StringUtils.isBlank(notifyUrl)) { - errorMessage = "request params[notifyUrl] error."; - return errorMessage; - } - if(StringUtils.isBlank(subject)) { - errorMessage = "request params[subject] error."; - return errorMessage; - } - if(StringUtils.isBlank(body)) { - errorMessage = "request params[body] error."; - return errorMessage; - } - // 根据不同渠道,判断extra参数 - if(PayConstant.PAY_CHANNEL_WX_JSAPI.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String openId = extraObject.getString("openId"); - if(StringUtils.isBlank(openId)) { - errorMessage = "request params[extra.openId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_NATIVE.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("productId"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.productId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_MWEB.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("sceneInfo"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.sceneInfo] error."; - return errorMessage; - } - if(StringUtils.isBlank(clientIp)) { - errorMessage = "request params[clientIp] error."; - return errorMessage; - } - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - payContext.put("resKey", mchInfo.getString("resKey")); - - // 查询商户对应的支付渠道 - JSONObject payChannel = payChannelService.getByMchIdAndChannelId(mchId, channelId); - if(payChannel == null) { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - return errorMessage; - } - if(payChannel.getByte("state") != 1) { - errorMessage = "channel not available [channelId="+channelId+",mchId="+mchId+"]"; - return errorMessage; - } - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - // 验证参数通过,返回JSONObject对象 - JSONObject payOrder = new JSONObject(); - payOrder.put("payOrderId", MySeq.getPay()); - payOrder.put("mchId", mchId); - payOrder.put("mchOrderNo", mchOrderNo); - payOrder.put("channelId", channelId); - payOrder.put("amount", Long.parseLong(amount)); - payOrder.put("currency", currency); - payOrder.put("clientIp", clientIp); - payOrder.put("device", device); - payOrder.put("subject", subject); - payOrder.put("body", body); - payOrder.put("extra", extra); - payOrder.put("channelMchId", payChannel.getString("channelMchId")); - payOrder.put("param1", param1); - payOrder.put("param2", param2); - payOrder.put("notifyUrl", notifyUrl); - return payOrder; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/QueryPayOrderController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/QueryPayOrderController.java deleted file mode 100644 index 75e98a5d54930f9ac6302ac3ed6e3acadacc1991..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/QueryPayOrderController.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dubbo.web.service.MchInfoService; -import org.xxpay.dubbo.web.service.PayOrderService; - -import java.util.Map; - -/** - * @Description: 支付订单查询 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-08-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class QueryPayOrderController { - - private final MyLog _log = MyLog.getLog(QueryPayOrderController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 查询支付订单接口: - * 1)先验证接口参数以及签名信息 - * 2)根据参数查询订单 - * 3)返回订单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/pay/query_order") - public String queryPayOrder(@RequestParam String params) { - _log.info("###### 开始接收商户查询支付订单请求 ######"); - String logPrefix = "【商户支付订单查询】"; - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject payContext = new JSONObject(); - // 验证参数有效性 - String errorMessage = validateParams(po, payContext); - if (!"success".equalsIgnoreCase(errorMessage)) { - _log.warn(errorMessage); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null)); - } - _log.debug("请求参数及签名校验通过"); - String mchId = po.getString("mchId"); // 商户ID - String mchOrderNo = po.getString("mchOrderNo"); // 商户订单号 - String payOrderId = po.getString("payOrderId"); // 支付订单号 - String executeNotify = po.getString("executeNotify"); // 是否执行回调 - JSONObject payOrder = payOrderService.query(mchId, payOrderId, mchOrderNo, executeNotify); - _log.info("{}查询支付订单,结果:{}", logPrefix, payOrder); - if (payOrder == null) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null)); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("result", payOrder); - _log.info("###### 商户查询订单处理完成 ######"); - return XXPayUtil.makeRetData(map, payContext.getString("resKey")); - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private String validateParams(JSONObject params, JSONObject payContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String payOrderId = params.getString("payOrderId"); // 支付订单号 - - String sign = params.getString("sign"); // 签名 - - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo) && StringUtils.isBlank(payOrderId)) { - errorMessage = "request params[mchOrderNo or payOrderId] error."; - return errorMessage; - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - payContext.put("resKey", mchInfo.getString("resKey")); - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - - return "success"; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/RefundOrderController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/RefundOrderController.java deleted file mode 100644 index a2b6431b9bd27b968c99924c8fa3546d06794d64..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/RefundOrderController.java +++ /dev/null @@ -1,224 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dubbo.web.service.*; - -import java.util.Map; - -/** - * @Description: 转账订单 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-30 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class RefundOrderController { - - private final MyLog _log = MyLog.getLog(RefundOrderController.class); - - @Autowired - private RefundOrderService refundOrderService; - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 统一转账接口: - * 1)先验证接口参数以及签名信息 - * 2)验证通过创建支付订单 - * 3)根据商户选择渠道,调用支付服务进行下单 - * 4)返回下单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/refund/create_order") - public String payOrder(@RequestParam String params) { - _log.info("###### 开始接收商户统一退款请求 ######"); - String logPrefix = "【商户统一退款】"; - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject refundContext = new JSONObject(); - JSONObject refundOrder = null; - // 验证参数有效性 - Object object = validateParams(po, refundContext); - if (object instanceof String) { - _log.info("{}参数校验不通过:{}", logPrefix, object); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null)); - } - if (object instanceof JSONObject) refundOrder = (JSONObject) object; - if(refundOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心退款失败", null, null)); - int result = refundOrderService.create(refundOrder); - _log.info("{}创建退款订单,结果:{}", logPrefix, result); - if(result != 1) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建退款订单失败", null, null)); - } - // 发送异步退款消息 - String transOrderId = refundOrder.getString("refundOrderId"); - String channelName = refundContext.getString("channelName"); - refundOrderService.sendRefundNotify(transOrderId, channelName); - _log.info("{}发送转账任务完成,transOrderId={}", logPrefix, transOrderId); - - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("refundOrderId", refundOrder.getString("refundOrderId")); - return XXPayUtil.makeRetData(map, refundContext.getString("resKey")); - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private Object validateParams(JSONObject params, JSONObject refundContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String payOrderId = params.getString("payOrderId"); // 支付订单号 - String mchOrderNo = params.getString("mchOrderNo"); // 商户支付单号 - String mchRefundNo = params.getString("mchRefundNo"); // 商户退款单号 - String channelId = params.getString("channelId"); // 渠道ID - String amount = params.getString("amount"); // 退款金额(单位分) - String currency = params.getString("currency"); // 币种 - String clientIp = params.getString("clientIp"); // 客户端IP - String device = params.getString("device"); // 设备 - String extra = params.getString("extra"); // 特定渠道发起时额外参数 - String param1 = params.getString("param1"); // 扩展参数1 - String param2 = params.getString("param2"); // 扩展参数2 - String notifyUrl = params.getString("notifyUrl"); // 转账结果回调URL - String sign = params.getString("sign"); // 签名 - String channelUser = params.getString("channelUser"); // 渠道用户标识,如微信openId,支付宝账号 - String userName = params.getString("userName"); // 用户姓名 - String remarkInfo = params.getString("remarkInfo"); // 备注 - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(payOrderId) && StringUtils.isBlank(mchOrderNo)) { - errorMessage = "request params[payOrderId,mchOrderNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchRefundNo)) { - errorMessage = "request params[mchRefundNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelId)) { - errorMessage = "request params[channelId] error."; - return errorMessage; - } - if(!NumberUtils.isNumber(amount)) { - errorMessage = "request params[amount] error."; - return errorMessage; - } - if(StringUtils.isBlank(currency)) { - errorMessage = "request params[currency] error."; - return errorMessage; - } - if(StringUtils.isBlank(notifyUrl)) { - errorMessage = "request params[notifyUrl] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelUser)) { - errorMessage = "request params[channelUser] error."; - return errorMessage; - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - refundContext.put("resKey", mchInfo.getString("resKey")); - - // 查询商户对应的支付渠道 - JSONObject payChannel = payChannelService.getByMchIdAndChannelId(mchId, channelId); - if(payChannel == null) { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - return errorMessage; - } - if(payChannel.getByte("state") != 1) { - errorMessage = "channel not available [channelId="+channelId+",mchId="+mchId+"]"; - return errorMessage; - } - refundContext.put("channelName", payChannel.getString("channelName")); - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX refund sign failed."; - return errorMessage; - } - - // 验证支付订单是否存在 - JSONObject payOrder = payOrderService.query(mchId, payOrderId, mchOrderNo, "false"); - if(payOrder == null) { - errorMessage = "payOrder is not exist."; - return errorMessage; - } - - String channelPayOrderNo = payOrder.getString("channelOrderNo"); // 渠道测支付单号 - Long payAmount = payOrder.getLong("amount"); - - // 验证参数通过,返回JSONObject对象 - JSONObject refundOrder = new JSONObject(); - refundOrder.put("refundOrderId", MySeq.getRefund()); - refundOrder.put("payOrderId", payOrderId); - refundOrder.put("channelPayOrderNo", channelPayOrderNo); - refundOrder.put("mchId", mchId); - refundOrder.put("mchRefundNo", mchRefundNo); - refundOrder.put("channelId", channelId); - refundOrder.put("refundAmount", Long.parseLong(amount)); // 退款金额 - refundOrder.put("payAmount", payAmount); // 退款金额 - refundOrder.put("currency", currency); - refundOrder.put("clientIp", clientIp); - refundOrder.put("device", device); - refundOrder.put("channelUser", channelUser); - refundOrder.put("userName", userName); - refundOrder.put("remarkInfo", remarkInfo); - refundOrder.put("extra", extra); - refundOrder.put("channelMchId", payChannel.getString("channelMchId")); - refundOrder.put("param1", param1); - refundOrder.put("param2", param2); - refundOrder.put("notifyUrl", notifyUrl); - return refundOrder; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/TransOrderController.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/TransOrderController.java deleted file mode 100644 index d71e906063d4b742606e3797bd603a56b2ab5d20..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/ctrl/TransOrderController.java +++ /dev/null @@ -1,206 +0,0 @@ -package org.xxpay.dubbo.web.ctrl; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dubbo.web.service.MchInfoService; -import org.xxpay.dubbo.web.service.PayChannelService; -import org.xxpay.dubbo.web.service.TransOrderService; - -import java.util.Map; - -/** - * @Description: 转账订单 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-10-30 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class TransOrderController { - - private final MyLog _log = MyLog.getLog(TransOrderController.class); - - @Autowired - private TransOrderService transOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 统一转账接口: - * 1)先验证接口参数以及签名信息 - * 2)验证通过创建支付订单 - * 3)根据商户选择渠道,调用支付服务进行下单 - * 4)返回下单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/trans/create_order") - public String payOrder(@RequestParam String params) { - _log.info("###### 开始接收商户统一转账请求 ######"); - String logPrefix = "【商户统一转账】"; - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject transContext = new JSONObject(); - JSONObject transOrder = null; - // 验证参数有效性 - Object object = validateParams(po, transContext); - if (object instanceof String) { - _log.info("{}参数校验不通过:{}", logPrefix, object); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null)); - } - if (object instanceof JSONObject) transOrder = (JSONObject) object; - if(transOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心转账失败", null, null)); - int result = transOrderService.create(transOrder); - _log.info("{}创建转账订单,结果:{}", logPrefix, result); - if(result != 1) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建转账订单失败", null, null)); - } - // 发送异步转账消息 - String transOrderId = transOrder.getString("transOrderId"); - String channelName = transContext.getString("channelName"); - transOrderService.sendTransNotify(transOrderId, channelName); - _log.info("{}发送转账任务完成,transOrderId={}", logPrefix, transOrderId); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("transOrderId", transOrderId); - return XXPayUtil.makeRetData(map, transContext.getString("resKey")); - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private Object validateParams(JSONObject params, JSONObject transContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchTransNo = params.getString("mchTransNo"); // 商户转账单号 - String channelId = params.getString("channelId"); // 渠道ID - String amount = params.getString("amount"); // 转账金额(单位分) - String currency = params.getString("currency"); // 币种 - String clientIp = params.getString("clientIp"); // 客户端IP - String device = params.getString("device"); // 设备 - String extra = params.getString("extra"); // 特定渠道发起时额外参数 - String param1 = params.getString("param1"); // 扩展参数1 - String param2 = params.getString("param2"); // 扩展参数2 - String notifyUrl = params.getString("notifyUrl"); // 转账结果回调URL - String sign = params.getString("sign"); // 签名 - String channelUser = params.getString("channelUser"); // 渠道用户标识,如微信openId,支付宝账号 - String userName = params.getString("userName"); // 用户姓名 - String remarkInfo = params.getString("remarkInfo"); // 备注 - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchTransNo)) { - errorMessage = "request params[mchTransNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelId)) { - errorMessage = "request params[channelId] error."; - return errorMessage; - } - if(!NumberUtils.isNumber(amount)) { - errorMessage = "request params[amount] error."; - return errorMessage; - } - if(StringUtils.isBlank(currency)) { - errorMessage = "request params[currency] error."; - return errorMessage; - } - if(StringUtils.isBlank(notifyUrl)) { - errorMessage = "request params[notifyUrl] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelUser)) { - errorMessage = "request params[channelUser] error."; - return errorMessage; - } - if(StringUtils.isBlank(remarkInfo)) { - errorMessage = "request params[remarkInfo] error."; - return errorMessage; - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - transContext.put("resKey", mchInfo.getString("resKey")); - - // 查询商户对应的支付渠道 - JSONObject payChannel = payChannelService.getByMchIdAndChannelId(mchId, channelId); - if(payChannel == null) { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - return errorMessage; - } - if(payChannel.getByte("state") != 1) { - errorMessage = "channel not available [channelId="+channelId+",mchId="+mchId+"]"; - return errorMessage; - } - transContext.put("channelName", payChannel.getString("channelName")); - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX trans sign failed."; - return errorMessage; - } - // 验证参数通过,返回JSONObject对象 - JSONObject transOrder = new JSONObject(); - transOrder.put("transOrderId", MySeq.getTrans()); - transOrder.put("mchId", mchId); - transOrder.put("mchTransNo", mchTransNo); - transOrder.put("channelId", channelId); - transOrder.put("amount", Long.parseLong(amount)); - transOrder.put("currency", currency); - transOrder.put("clientIp", clientIp); - transOrder.put("device", device); - transOrder.put("channelUser", channelUser); - transOrder.put("userName", userName); - transOrder.put("remarkInfo", remarkInfo); - transOrder.put("extra", extra); - transOrder.put("channelMchId", payChannel.getString("channelMchId")); - transOrder.put("param1", param1); - transOrder.put("param2", param2); - transOrder.put("notifyUrl", notifyUrl); - return transOrder; - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/MchInfoService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/MchInfoService.java deleted file mode 100644 index 91d2b1da5017f3a12d14308605f53d48c1865cff..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/MchInfoService.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.util.RpcUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -@Service -public class MchInfoService { - - @Autowired - private RpcCommonService rpcCommonService; - - public JSONObject getByMchId(String mchId) { - Map paramMap = new HashMap<>(); - paramMap.put("mchId", mchId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcMchInfoService.selectMchInfo(jsonParam); - String s = RpcUtil.mkRet(result); - if(s==null) return null; - return JSONObject.parseObject(s); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/NotifyPayService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/NotifyPayService.java deleted file mode 100644 index 7ba0b4cbd0c935d4f4544562802677c4c9aa9ec7..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/NotifyPayService.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.RpcUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service -public class NotifyPayService { - - @Autowired - private RpcCommonService rpcCommonService; - - public String doAliPayNotify(Map params) { - Map paramMap = new HashMap<>(); - paramMap.put("params", params); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcNotifyPayService.doAliPayNotify(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - return s; - } - - public String doWxPayNotify(String xmlResult) { - Map paramMap = new HashMap<>(); - paramMap.put("xmlResult", xmlResult); - String jsonParam = RpcUtil.createBaseParam(paramMap); - // 返回给微信的数据格式已经有service处理(包括正确与错误),肯定会返回result - Map result = rpcCommonService.rpcNotifyPayService.doWxPayNotify(jsonParam); - return RpcUtil.mkRet(result); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayChannelService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayChannelService.java deleted file mode 100644 index 270fc68a0f77ac8486696ef39dfaa5a263d17888..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayChannelService.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.util.RpcUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -@Service -public class PayChannelService { - - @Autowired - private RpcCommonService rpcCommonService; - - public JSONObject getByMchIdAndChannelId(String mchId, String channelId) { - Map paramMap = new HashMap<>(); - paramMap.put("mchId", mchId); - paramMap.put("channelId", channelId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcPayChannelService.selectPayChannel(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return null; - return JSONObject.parseObject(s); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayOrderService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayOrderService.java deleted file mode 100644 index 65f8736ef2d4f384a7963e44e66428a6f0a57d74..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/PayOrderService.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -@Service -public class PayOrderService { - - private static final MyLog _log = MyLog.getLog(PayOrderService.class); - - @Autowired - private RpcCommonService rpcCommonService; - - public int create(JSONObject payOrder) { - Map paramMap = new HashMap<>(); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcPayOrderService.create(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return 0; - return Integer.parseInt(s); - } - - public JSONObject query(String mchId, String payOrderId, String mchOrderNo, String executeNotify) { - Map paramMap = new HashMap<>(); - Map result; - if(StringUtils.isNotBlank(payOrderId)) { - paramMap.put("mchId", mchId); - paramMap.put("payOrderId", payOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcPayOrderService.selectByMchIdAndPayOrderId(jsonParam); - }else { - paramMap.put("mchId", mchId); - paramMap.put("mchOrderNo", mchOrderNo); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcPayOrderService.selectByMchIdAndMchOrderNo(jsonParam); - } - String s = RpcUtil.mkRet(result); - if(s == null) return null; - boolean isNotify = Boolean.parseBoolean(executeNotify); - JSONObject payOrder = JSONObject.parseObject(s); - if(isNotify) { - paramMap = new HashMap<>(); - paramMap.put("payOrderId", payOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcNotifyPayService.sendBizPayNotify(jsonParam); - s = RpcUtil.mkRet(result); - _log.info("业务查单完成,并再次发送业务支付通知.发送结果:{}", s); - } - return payOrder; - } - - public String doWxPayReq(String tradeType, JSONObject payOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("tradeType", tradeType); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcPayChannel4WxService.doWxPayReq(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - - public String doAliPayReq(String channelId, JSONObject payOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result; - switch (channelId) { - case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE : - result = rpcCommonService.rpcPayChannel4AliService.doAliPayMobileReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_PC : - result = rpcCommonService.rpcPayChannel4AliService.doAliPayPcReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_WAP : - result = rpcCommonService.rpcPayChannel4AliService.doAliPayWapReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_QR : - result = rpcCommonService.rpcPayChannel4AliService.doAliPayQrReq(jsonParam); - break; - default: - result = null; - break; - } - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用支付宝支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RefundOrderService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RefundOrderService.java deleted file mode 100644 index 88932ad694ae2cdfda484928bf2d6f344870a438..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RefundOrderService.java +++ /dev/null @@ -1,92 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service -public class RefundOrderService { - - private static final MyLog _log = MyLog.getLog(RefundOrderService.class); - - @Autowired - private RpcCommonService rpcCommonService; - - public int create(JSONObject refundOrder) { - Map paramMap = new HashMap<>(); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcRefundOrderService.create(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return 0; - return Integer.parseInt(s); - } - - public void sendRefundNotify(String refundOrderId, String channelName) { - JSONObject object = new JSONObject(); - object.put("refundOrderId", refundOrderId); - object.put("channelName", channelName); - Map paramMap = new HashMap<>(); - paramMap.put("msg", object); - String jsonParam = RpcUtil.createBaseParam(paramMap); - rpcCommonService.rpcRefundOrderService.sendRefundNotify(jsonParam); - } - - public JSONObject query(String mchId, String refundOrderId, String mchRefundNo, String executeNotify) { - Map paramMap = new HashMap<>(); - Map result; - if(StringUtils.isNotBlank(refundOrderId)) { - paramMap.put("mchId", mchId); - paramMap.put("refundOrderId", refundOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcRefundOrderService.selectByMchIdAndRefundOrderId(jsonParam); - }else { - paramMap.put("mchId", mchId); - paramMap.put("mchRefundNo", mchRefundNo); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcRefundOrderService.selectByMchIdAndMchRefundNo(jsonParam); - } - String s = RpcUtil.mkRet(result); - if(s == null) return null; - boolean isNotify = Boolean.parseBoolean(executeNotify); - JSONObject payOrder = JSONObject.parseObject(s); - if(isNotify) { - paramMap = new HashMap<>(); - paramMap.put("refundOrderId", refundOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcNotifyPayService.sendBizPayNotify(jsonParam); - s = RpcUtil.mkRet(result); - _log.info("业务查单完成,并再次发送业务支付通知.发送结果:{}", s); - } - return payOrder; - } - - public String doWxRefundReq(String tradeType, JSONObject refundOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("tradeType", tradeType); - paramMap.put("refundOrder", refundOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcPayChannel4AliService.doAliRefundReq(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RpcCommonService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RpcCommonService.java deleted file mode 100644 index 23e7beb1d420bb56334996d16079bd17ea8e21a2..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/RpcCommonService.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.dubbo.config.annotation.Reference; -import org.springframework.stereotype.Service; -import org.xxpay.dubbo.api.service.*; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service -public class RpcCommonService { - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IMchInfoService rpcMchInfoService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IPayChannelService rpcPayChannelService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IPayOrderService rpcPayOrderService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IPayChannel4WxService rpcPayChannel4WxService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IPayChannel4AliService rpcPayChannel4AliService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public INotifyPayService rpcNotifyPayService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public ITransOrderService rpcTransOrderService; - - @Reference(version = "1.0.0", timeout = 10000, retries = 0) - public IRefundOrderService rpcRefundOrderService; - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/TransOrderService.java b/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/TransOrderService.java deleted file mode 100644 index ee8175031e56c803a59013c7dbea01a714ac1ecc..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/java/org/xxpay/dubbo/web/service/TransOrderService.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.xxpay.dubbo.web.service; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.common.util.XXPayUtil; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/10/30 - * @description: - */ -@Service -public class TransOrderService { - - private static final MyLog _log = MyLog.getLog(TransOrderService.class); - - @Autowired - private RpcCommonService rpcCommonService; - - public int create(JSONObject transOrder) { - Map paramMap = new HashMap<>(); - paramMap.put("transOrder", transOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcTransOrderService.create(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return 0; - return Integer.parseInt(s); - } - - public void sendTransNotify(String transOrderId, String channelName) { - JSONObject object = new JSONObject(); - object.put("transOrderId", transOrderId); - object.put("channelName", channelName); - Map paramMap = new HashMap<>(); - paramMap.put("msg", object); - String jsonParam = RpcUtil.createBaseParam(paramMap); - rpcCommonService.rpcTransOrderService.sendTransNotify(jsonParam); - } - - public JSONObject query(String mchId, String transOrderId, String mchTransNo, String executeNotify) { - Map paramMap = new HashMap<>(); - Map result; - if(StringUtils.isNotBlank(transOrderId)) { - paramMap.put("mchId", mchId); - paramMap.put("transOrderId", transOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcTransOrderService.selectByMchIdAndTransOrderId(jsonParam); - }else { - paramMap.put("mchId", mchId); - paramMap.put("mchTransNo", mchTransNo); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcTransOrderService.selectByMchIdAndMchTransNo(jsonParam); - } - String s = RpcUtil.mkRet(result); - if(s == null) return null; - boolean isNotify = Boolean.parseBoolean(executeNotify); - JSONObject payOrder = JSONObject.parseObject(s); - if(isNotify) { - paramMap = new HashMap<>(); - paramMap.put("transOrderId", transOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = rpcCommonService.rpcNotifyPayService.sendBizPayNotify(jsonParam); - s = RpcUtil.mkRet(result); - _log.info("业务查单完成,并再次发送业务支付通知.发送结果:{}", s); - } - return payOrder; - } - - public String doWxTransReq(String tradeType, JSONObject payOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("tradeType", tradeType); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = rpcCommonService.rpcPayChannel4WxService.doWxPayReq(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - - -} diff --git a/xxpay4dubbo/xxpay4dubbo-web/src/main/resources/application.yml b/xxpay4dubbo/xxpay4dubbo-web/src/main/resources/application.yml deleted file mode 100755 index ecbef4c08ff4b1ab5ebbbb9efad4228228f7a5d3..0000000000000000000000000000000000000000 --- a/xxpay4dubbo/xxpay4dubbo-web/src/main/resources/application.yml +++ /dev/null @@ -1,13 +0,0 @@ -server: - port: 3020 - -spring: - dubbo: - application: - name: xxpay4dubbo-web - registry: - address: zookeeper://127.0.0.1:2181 - scan: org.xxpay.dubbo - -logging: - file: ./log/xxpay4dubbo-web.log \ No newline at end of file diff --git a/xxpay4spring-boot/pom.xml b/xxpay4spring-boot/pom.xml deleted file mode 100755 index 79a19ebe886368c539c5a577ea0ea8df734466f8..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4spring-boot - 1.0.0 - jar - xxpay4spring-boot - xxpay4spring-boot - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - UTF-8 - UTF-8 - 1.8 - 1.5.6.RELEASE - 1.0.0 - - - - - org.xxpay - xxpay-dal - 1.0.0 - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-freemarker - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-configuration-processor - - - org.springframework.boot - spring-boot-starter-activemq - - - org.apache.activemq - activemq-pool - - - org.springframework.boot - spring-boot-starter-amqp - - - - com.github.binarywang - weixin-java-pay - 2.8.0 - - - - com.alipay - sdk - 1.5 - system - ${basedir}/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar - - - - - - - src/main/webapp/WEB-INF/lib/ - BOOT-INF/lib/ - - **/*.jar - - - - src/main/resources - BOOT-INF/classes/ - - - src/main/resources - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - - - \ No newline at end of file diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/XxPayBootAppliaction.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/XxPayBootAppliaction.java deleted file mode 100755 index 8c93745381aa220e32256e9ecd33717f497f3caf..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/XxPayBootAppliaction.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.xxpay.boot; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.web.client.RestTemplateBuilder; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.web.client.RestTemplate; - -/** - * - */ -@SpringBootApplication -@ComponentScan(basePackages={"org.xxpay"}) -public class XxPayBootAppliaction { - - @Bean - public RestTemplate restTemplate(RestTemplateBuilder builder) { - // Do any additional configuration here - return builder.build(); - } - - public static void main(String[] args) { - SpringApplication.run(XxPayBootAppliaction.class, args); - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4AliPayController.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4AliPayController.java deleted file mode 100644 index 3b0863048385851c9717b4a1dc3d93344b898d46..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4AliPayController.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.xxpay.boot.ctrl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.boot.service.INotifyPayService; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * @Description: 接收处理支付宝通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4AliPayController { - - private static final MyLog _log = MyLog.getLog(Notify4AliPayController.class); - - @Autowired - private INotifyPayService notifyPayService; - - /** - * 支付宝移动支付后台通知响应 - * @param request - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping(value = "/notify/pay/aliPayNotifyRes.htm") - @ResponseBody - public String aliPayNotifyRes(HttpServletRequest request) throws ServletException, IOException { - _log.info("====== 开始接收支付宝支付回调通知 ======"); - String notifyRes = doAliPayRes(request); - _log.info("响应给支付宝:{}", notifyRes); - _log.info("====== 完成接收支付宝支付回调通知 ======"); - return notifyRes; - } - - public String doAliPayRes(HttpServletRequest request) throws ServletException, IOException { - String logPrefix = "【支付宝支付回调通知】"; - //获取支付宝POST过来反馈信息 - Map params = new HashMap(); - Map requestParams = request.getParameterMap(); - for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) { - String name = (String) iter.next(); - String[] values = (String[]) requestParams.get(name); - String valueStr = ""; - for (int i = 0; i < values.length; i++) { - valueStr = (i == values.length - 1) ? valueStr + values[i] - : valueStr + values[i] + ","; - } - //乱码解决,这段代码在出现乱码时使用。如果mysign和sign不相等也可以使用这段代码转化 - //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "gbk"); - params.put(name, valueStr); - } - _log.info("{}通知请求数据:reqStr={}", logPrefix, params); - if(params.isEmpty()) { - _log.error("{}请求参数为空", logPrefix); - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - return notifyPayService.handleAliPayNotify(params); - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4WxPayController.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4WxPayController.java deleted file mode 100644 index d59791985e23573d9f4462f8a74dc7bc215d1a39..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/Notify4WxPayController.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.xxpay.boot.ctrl; - -import org.apache.commons.io.IOUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.boot.service.INotifyPayService; -import org.xxpay.common.util.MyLog; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; - -/** - * @Description: 接收处理微信通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4WxPayController { - - private static final MyLog _log = MyLog.getLog(Notify4WxPayController.class); - - @Autowired - private INotifyPayService notifyPayService; - - /** - * 微信支付(统一下单接口)后台通知响应 - * @param request - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping("/notify/pay/wxPayNotifyRes.htm") - @ResponseBody - public String wxPayNotifyRes(HttpServletRequest request) throws ServletException, IOException { - _log.info("====== 开始接收微信支付回调通知 ======"); - String notifyRes = doWxPayRes(request); - _log.info("响应给微信:{}", notifyRes); - _log.info("====== 完成接收微信支付回调通知 ======"); - return notifyRes; - } - - public String doWxPayRes(HttpServletRequest request) throws ServletException, IOException { - String logPrefix = "【微信支付回调通知】"; - String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding()); - _log.info("{}通知请求数据:reqStr={}", logPrefix, xmlResult); - return notifyPayService.handleWxPayNotify(xmlResult); - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/PayOrderController.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/PayOrderController.java deleted file mode 100644 index 9bfc57a8571a313f15ade8e4807373fae17da787..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/PayOrderController.java +++ /dev/null @@ -1,261 +0,0 @@ -package org.xxpay.boot.ctrl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -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.xxpay.boot.service.IMchInfoService; -import org.xxpay.boot.service.IPayChannelService; -import org.xxpay.boot.service.IPayOrderService; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.XXPayUtil; - -/** - * @Description: 支付订单,包括:统一下单,订单查询,补单等接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayOrderController { - - private final MyLog _log = MyLog.getLog(PayOrderController.class); - - @Autowired - private IPayOrderService payOrderService; - - @Autowired - private IPayChannelService payChannelService; - - @Autowired - private IMchInfoService mchInfoService; - - /** - * 统一下单接口: - * 1)先验证接口参数以及签名信息 - * 2)验证通过创建支付订单 - * 3)根据商户选择渠道,调用支付服务进行下单 - * 4)返回下单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/pay/create_order") - public String payOrder(@RequestParam String params) { - JSONObject po = JSONObject.parseObject(params); - return payOrder(po); - } - - @RequestMapping(value = "/api/pay/create_order", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public String payOrder(@RequestBody JSONObject params) { - _log.info("###### 开始接收商户统一下单请求 ######"); - String logPrefix = "【商户统一下单】"; - try { - JSONObject payContext = new JSONObject(); - JSONObject payOrder = null; - // 验证参数有效性 - Object object = validateParams(params, payContext); - if (object instanceof String) { - _log.info("{}参数校验不通过:{}", logPrefix, object); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null)); - } - if (object instanceof JSONObject) payOrder = (JSONObject) object; - if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null)); - int result = payOrderService.createPayOrder(payOrder); - _log.info("{}创建支付订单,结果:{}", logPrefix, result); - if(result != 1) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null)); - } - String channelId = payOrder.getString("channelId"); - switch (channelId) { - case PayConstant.PAY_CHANNEL_WX_APP : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_APP, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_JSAPI : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_JSPAI, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_NATIVE : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_NATIVE, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_WX_MWEB : - return payOrderService.doWxPayReq(PayConstant.WxConstant.TRADE_TYPE_MWEB, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_PC : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_WAP : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - case PayConstant.PAY_CHANNEL_ALIPAY_QR : - return payOrderService.doAliPayReq(channelId, payOrder, payContext.getString("resKey")); - default: - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null)); - } - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private Object validateParams(JSONObject params, JSONObject payContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String channelId = params.getString("channelId"); // 渠道ID - String amount = params.getString("amount"); // 支付金额(单位分) - String currency = params.getString("currency"); // 币种 - String clientIp = params.getString("clientIp"); // 客户端IP - String device = params.getString("device"); // 设备 - String extra = params.getString("extra"); // 特定渠道发起时额外参数 - String param1 = params.getString("param1"); // 扩展参数1 - String param2 = params.getString("param2"); // 扩展参数2 - String notifyUrl = params.getString("notifyUrl"); // 支付结果回调URL - String sign = params.getString("sign"); // 签名 - String subject = params.getString("subject"); // 商品主题 - String body = params.getString("body"); // 商品描述信息 - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo)) { - errorMessage = "request params[mchOrderNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelId)) { - errorMessage = "request params[channelId] error."; - return errorMessage; - } - if(!NumberUtils.isNumber(amount)) { - errorMessage = "request params[amount] error."; - return errorMessage; - } - if(StringUtils.isBlank(currency)) { - errorMessage = "request params[currency] error."; - return errorMessage; - } - if(StringUtils.isBlank(notifyUrl)) { - errorMessage = "request params[notifyUrl] error."; - return errorMessage; - } - if(StringUtils.isBlank(subject)) { - errorMessage = "request params[subject] error."; - return errorMessage; - } - if(StringUtils.isBlank(body)) { - errorMessage = "request params[body] error."; - return errorMessage; - } - // 根据不同渠道,判断extra参数 - if(PayConstant.PAY_CHANNEL_WX_JSAPI.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String openId = extraObject.getString("openId"); - if(StringUtils.isBlank(openId)) { - errorMessage = "request params[extra.openId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_NATIVE.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("productId"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.productId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_MWEB.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("sceneInfo"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.sceneInfo] error."; - return errorMessage; - } - if(StringUtils.isBlank(clientIp)) { - errorMessage = "request params[clientIp] error."; - return errorMessage; - } - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - payContext.put("resKey", mchInfo.getString("resKey")); - - // 查询商户对应的支付渠道 - JSONObject payChannel = payChannelService.getByMchIdAndChannelId(mchId, channelId); - if(payChannel == null) { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - return errorMessage; - } - if(payChannel.getByte("state") != 1) { - errorMessage = "channel not available [channelId="+channelId+",mchId="+mchId+"]"; - return errorMessage; - } - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - // 验证参数通过,返回JSONObject对象 - JSONObject payOrder = new JSONObject(); - payOrder.put("payOrderId", MySeq.getPay()); - payOrder.put("mchId", mchId); - payOrder.put("mchOrderNo", mchOrderNo); - payOrder.put("channelId", channelId); - payOrder.put("amount", Long.parseLong(amount)); - payOrder.put("currency", currency); - payOrder.put("clientIp", clientIp); - payOrder.put("device", device); - payOrder.put("subject", subject); - payOrder.put("body", body); - payOrder.put("extra", extra); - payOrder.put("channelMchId", payChannel.getString("channelMchId")); - payOrder.put("param1", param1); - payOrder.put("param2", param2); - payOrder.put("notifyUrl", notifyUrl); - return payOrder; - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/QueryPayOrderController.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/QueryPayOrderController.java deleted file mode 100644 index 818bc4b8bd03b0ea1f21ed06f467c7b28bdb9fc9..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/ctrl/QueryPayOrderController.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.xxpay.boot.ctrl; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -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.xxpay.boot.service.IMchInfoService; -import org.xxpay.boot.service.IPayOrderService; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.XXPayUtil; - -import java.util.Map; - -/** - * @Description: 支付订单查询 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-08-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class QueryPayOrderController { - - private final MyLog _log = MyLog.getLog(QueryPayOrderController.class); - - @Autowired - private IPayOrderService payOrderService; - - @Autowired - private IMchInfoService mchInfoService; - - /** - * 查询支付订单接口: - * 1)先验证接口参数以及签名信息 - * 2)根据参数查询订单 - * 3)返回订单数据 - * @param params - * @return - */ - @RequestMapping(value = "/api/pay/query_order") - public String queryPayOrder(@RequestParam String params) { - JSONObject po = JSONObject.parseObject(params); - return queryPayOrder(po); - } - - @RequestMapping(value = "/api/pay/query_order", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - public String queryPayOrder(@RequestBody JSONObject params) { - _log.info("###### 开始接收商户查询支付订单请求 ######"); - String logPrefix = "【商户支付订单查询】"; - try { - JSONObject payContext = new JSONObject(); - // 验证参数有效性 - String errorMessage = validateParams(params, payContext); - if (!"success".equalsIgnoreCase(errorMessage)) { - _log.warn(errorMessage); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null)); - } - _log.debug("请求参数及签名校验通过"); - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String payOrderId = params.getString("payOrderId"); // 支付订单号 - String executeNotify = params.getString("executeNotify"); // 是否执行回调 - JSONObject payOrder = payOrderService.queryPayOrder(mchId, payOrderId, mchOrderNo, executeNotify); - _log.info("{}查询支付订单,结果:{}", logPrefix, payOrder); - if (payOrder == null) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null)); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("result", payOrder); - _log.info("###### 商户查询订单处理完成 ######"); - return XXPayUtil.makeRetData(map, payContext.getString("resKey")); - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private String validateParams(JSONObject params, JSONObject payContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String payOrderId = params.getString("payOrderId"); // 支付订单号 - - String sign = params.getString("sign"); // 签名 - - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo) && StringUtils.isBlank(payOrderId)) { - errorMessage = "request params[mchOrderNo or payOrderId] error."; - return errorMessage; - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo = mchInfoService.getByMchId(mchId); - if(mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - payContext.put("resKey", mchInfo.getString("resKey")); - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - - return "success"; - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/BaseService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/BaseService.java deleted file mode 100644 index 05322918342c82d366ba009a1f6441d437f7dfa1..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/BaseService.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.xxpay.boot.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.MchInfoMapper; -import org.xxpay.dal.dao.mapper.PayChannelMapper; -import org.xxpay.dal.dao.mapper.PayOrderMapper; -import org.xxpay.dal.dao.model.*; - -import java.util.List; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -@Service -public class BaseService { - - @Autowired - private PayOrderMapper payOrderMapper; - - @Autowired - private MchInfoMapper mchInfoMapper; - - @Autowired - private PayChannelMapper payChannelMapper; - - - public MchInfo baseSelectMchInfo(String mchId) { - return mchInfoMapper.selectByPrimaryKey(mchId); - } - - public PayChannel baseSelectPayChannel(String mchId, String channelId) { - PayChannelExample example = new PayChannelExample(); - PayChannelExample.Criteria criteria = example.createCriteria(); - criteria.andChannelIdEqualTo(channelId); - criteria.andMchIdEqualTo(mchId); - List payChannelList = payChannelMapper.selectByExample(example); - if(CollectionUtils.isEmpty(payChannelList)) return null; - return payChannelList.get(0); - } - - public int baseCreatePayOrder(PayOrder payOrder) { - return payOrderMapper.insertSelective(payOrder); - } - - public PayOrder baseSelectPayOrder(String payOrderId) { - return payOrderMapper.selectByPrimaryKey(payOrderId); - } - - public PayOrder baseSelectPayOrderByMchIdAndPayOrderId(String mchId, String payOrderId) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andPayOrderIdEqualTo(payOrderId); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public PayOrder baseSelectPayOrderByMchIdAndMchOrderNo(String mchId, String mchOrderNo) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andMchOrderNoEqualTo(mchOrderNo); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public int baseUpdateStatus4Ing(String payOrderId, String channelOrderNo) { - PayOrder payOrder = new PayOrder(); - payOrder.setStatus(PayConstant.PAY_STATUS_PAYING); - if(channelOrderNo != null) payOrder.setChannelOrderNo(channelOrderNo); - payOrder.setPaySuccTime(System.currentTimeMillis()); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_INIT); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateStatus4Success(String payOrderId, String channelOrderNo) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - if(channelOrderNo != null) payOrder.setChannelOrderNo(channelOrderNo); - payOrder.setPaySuccTime(System.currentTimeMillis()); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_PAYING); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateStatus4Complete(String payOrderId) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_COMPLETE); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_SUCCESS); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int baseUpdateNotify(String payOrderId, byte count) { - PayOrder newPayOrder = new PayOrder(); - newPayOrder.setNotifyCount(count); - newPayOrder.setLastNotifyTime(System.currentTimeMillis()); - newPayOrder.setPayOrderId(payOrderId); - return payOrderMapper.updateByPrimaryKeySelective(newPayOrder); - } - - public int baseUpdateNotify(PayOrder payOrder) { - return payOrderMapper.updateByPrimaryKeySelective(payOrder); - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IMchInfoService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IMchInfoService.java deleted file mode 100644 index 4bdf0ea518c36c472a00ccec690b327d547a0630..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IMchInfoService.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.xxpay.boot.service; - -import com.alibaba.fastjson.JSONObject; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IMchInfoService { - - Map selectMchInfo(String jsonParam); - - JSONObject getByMchId(String mchId); - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/INotifyPayService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/INotifyPayService.java deleted file mode 100644 index b91802db8c6fa721dd669603612f2430f0b7ce3e..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/INotifyPayService.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.xxpay.boot.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -public interface INotifyPayService { - - Map doAliPayNotify(String jsonParam); - - Map doWxPayNotify(String jsonParam); - - Map sendBizPayNotify(String jsonParam); - - String handleAliPayNotify(Map params); - - String handleWxPayNotify(String xmlResult); -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4AliService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4AliService.java deleted file mode 100644 index 535bb0bbba5932be10d8a99156771f9186f48230..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4AliService.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.xxpay.boot.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -public interface IPayChannel4AliService { - - Map doAliPayWapReq(String jsonParam); - - Map doAliPayPcReq(String jsonParam); - - Map doAliPayMobileReq(String jsonParam); - - Map doAliPayQrReq(String jsonParam); - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4WxService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4WxService.java deleted file mode 100644 index c0078030ca265cbd62e9e8d46fb710dfcdc0d8df..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannel4WxService.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.xxpay.boot.service; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/9 - * @description: - */ -public interface IPayChannel4WxService { - - Map doWxPayReq(String jsonParam); - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannelService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannelService.java deleted file mode 100644 index db8ff2238be04327119abfcf55c26be8ce05aeb3..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayChannelService.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.xxpay.boot.service; - -import com.alibaba.fastjson.JSONObject; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IPayChannelService { - - Map selectPayChannel(String jsonParam); - - JSONObject getByMchIdAndChannelId(String mchId, String channelId); -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayOrderService.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayOrderService.java deleted file mode 100644 index 690de23ceb35e6b4667fc5471f4fc68de9ac541f..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/IPayOrderService.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.xxpay.boot.service; - -import com.alibaba.fastjson.JSONObject; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -public interface IPayOrderService { - - Map createPayOrder(String jsonParam); - - Map selectPayOrder(String jsonParam); - - Map selectPayOrderByMchIdAndPayOrderId(String jsonParam); - - Map selectPayOrderByMchIdAndMchOrderNo(String jsonParam); - - Map updateStatus4Ing(String jsonParam); - - Map updateStatus4Success(String jsonParam); - - Map updateStatus4Complete(String jsonParam); - - Map updateNotify(String jsonParam); - - int createPayOrder(JSONObject payOrder); - - JSONObject queryPayOrder(String mchId, String payOrderId, String mchOrderNo, String executeNotify); - - String doWxPayReq(String tradeType, JSONObject payOrder, String resKey); - - String doAliPayReq(String channelId, JSONObject payOrder, String resKey); - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/Notify4BasePay.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/Notify4BasePay.java deleted file mode 100644 index f215e2d402944c34e622e6978cf35cf2d17f6518..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/Notify4BasePay.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.xxpay.boot.service; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.boot.service.mq.Mq4PayNotify; - -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付通知处理基类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Notify4BasePay extends BaseService { - - private static final MyLog _log = MyLog.getLog(Notify4BasePay.class); - - @Autowired - private Mq4PayNotify mq4PayNotify; - - /** - * 创建响应URL - * @param payOrder - * @param backType 1:前台页面;2:后台接口 - * @return - */ - public String createNotifyUrl(PayOrder payOrder, String backType) { - String mchId = payOrder.getMchId(); - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - String resKey = mchInfo.getResKey(); - Map paramMap = new HashMap<>(); - paramMap.put("payOrderId", payOrder.getPayOrderId() == null ? "" : payOrder.getPayOrderId()); // 支付订单号 - paramMap.put("mchId", payOrder.getMchId() == null ? "" : payOrder.getMchId()); // 商户ID - paramMap.put("mchOrderNo", payOrder.getMchOrderNo() == null ? "" : payOrder.getMchOrderNo()); // 商户订单号 - paramMap.put("channelId", payOrder.getChannelId() == null ? "" : payOrder.getChannelId()); // 渠道ID - paramMap.put("amount", payOrder.getAmount() == null ? "" : payOrder.getAmount()); // 支付金额 - paramMap.put("currency", payOrder.getCurrency() == null ? "" : payOrder.getCurrency()); // 货币类型 - paramMap.put("status", payOrder.getStatus() == null ? "" : payOrder.getStatus()); // 支付状态 - paramMap.put("clientIp", payOrder.getClientIp()==null ? "" : payOrder.getClientIp()); // 客户端IP - paramMap.put("device", payOrder.getDevice()==null ? "" : payOrder.getDevice()); // 设备 - paramMap.put("subject", payOrder.getSubject()==null ? "" : payOrder.getSubject()); // 商品标题 - paramMap.put("channelOrderNo", payOrder.getChannelOrderNo()==null ? "" : payOrder.getChannelOrderNo()); // 渠道订单号 - paramMap.put("param1", payOrder.getParam1()==null ? "" : payOrder.getParam1()); // 扩展参数1 - paramMap.put("param2", payOrder.getParam2()==null ? "" : payOrder.getParam2()); // 扩展参数2 - paramMap.put("paySuccTime", payOrder.getPaySuccTime()==null ? "" : payOrder.getPaySuccTime()); // 支付成功时间 - paramMap.put("backType", backType==null ? "" : backType); - // 先对原文签名 - String reqSign = PayDigestUtil.getSign(paramMap, resKey); - paramMap.put("sign", reqSign); // 签名 - // 签名后再对有中文参数编码 - try { - paramMap.put("device", URLEncoder.encode(payOrder.getDevice()==null ? "" : payOrder.getDevice(), PayConstant.RESP_UTF8)); - paramMap.put("subject", URLEncoder.encode(payOrder.getSubject()==null ? "" : payOrder.getSubject(), PayConstant.RESP_UTF8)); - paramMap.put("param1", URLEncoder.encode(payOrder.getParam1()==null ? "" : payOrder.getParam1(), PayConstant.RESP_UTF8)); - paramMap.put("param2", URLEncoder.encode(payOrder.getParam2()==null ? "" : payOrder.getParam2(), PayConstant.RESP_UTF8)); - }catch (UnsupportedEncodingException e) { - _log.error("URL Encode exception.", e); - return null; - } - String param = XXPayUtil.genUrlParams(paramMap); - StringBuffer sb = new StringBuffer(); - sb.append(payOrder.getNotifyUrl()).append("?").append(param); - return sb.toString(); - } - - /** - * 处理支付结果前台页面跳转 - */ - public boolean doPage(PayOrder payOrder) { - String redirectUrl = createNotifyUrl(payOrder, "1"); - _log.info("redirect to respUrl:"+redirectUrl); - // 前台跳转业务系统 - /*try { - response.sendRedirect(redirectUrl); - } catch (IOException e) { - _log.error("XxPay sendRedirect exception. respUrl="+redirectUrl, e); - return false; - }*/ - return true; - } - - /** - * 处理支付结果后台服务器通知 - */ - public void doNotify(PayOrder payOrder) { - _log.info(">>>>>> PAY开始回调通知业务系统 <<<<<<"); - // 发起后台通知业务系统 - JSONObject object = createNotifyInfo(payOrder); - try { - mq4PayNotify.send(object.toJSONString()); - } catch (Exception e) { - _log.error("payOrderId={},sendMessage error.", payOrder != null ? payOrder.getPayOrderId() : "", e); - } - _log.info(">>>>>> PAY回调通知业务系统完成 <<<<<<"); - } - - public JSONObject createNotifyInfo(PayOrder payOrder) { - JSONObject object = new JSONObject(); - object.put("method", "GET"); - object.put("url", createNotifyUrl(payOrder, "2")); - object.put("orderId", payOrder.getPayOrderId()); - object.put("count", payOrder.getNotifyCount()); - object.put("createTime", System.currentTimeMillis()); - return object; - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/alipay/AlipayConfig.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/alipay/AlipayConfig.java deleted file mode 100644 index e63d27bd5cbec4124d2b3f9f1f0b5c6d0ebd56d7..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/alipay/AlipayConfig.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.xxpay.boot.service.channel.alipay; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; -import org.springframework.util.Assert; - -/** - * @author: dingzhiwei - * @date: 17/8/21 - * @description: - */ -@Component -@ConfigurationProperties(prefix="config.ali") -public class AlipayConfig { - - // 商户appid - private String app_id; - // 私钥 pkcs8格式的 - private String rsa_private_key; - // 服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 - - private String notify_url; - // 页面跳转同步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 商户可以自定义同步跳转地址 - - private String return_url; - // 请求网关地址 - private String url = "https://openapi.alipay.com/gateway.do"; - - // 编码 - public static String CHARSET = "UTF-8"; - // 返回格式 - public static String FORMAT = "json"; - // 支付宝公钥 - public String alipay_public_key; - // RSA2 - public static String SIGNTYPE = "RSA2"; - - // 是否沙箱环境,1:沙箱,0:正式环境 - private Short isSandbox = 0; - - /** - * 初始化支付宝配置 - * @param configParam - * @return - */ - public AlipayConfig init(String configParam) { - Assert.notNull(configParam, "init alipay config error"); - JSONObject paramObj = JSON.parseObject(configParam); - this.setApp_id(paramObj.getString("appid")); - this.setRsa_private_key(paramObj.getString("private_key")); - this.setAlipay_public_key(paramObj.getString("alipay_public_key")); - this.setIsSandbox(paramObj.getShortValue("isSandbox")); - if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do"); - return this; - } - - public String getApp_id() { - return app_id; - } - - public void setApp_id(String app_id) { - this.app_id = app_id; - } - - public String getRsa_private_key() { - return rsa_private_key; - } - - public void setRsa_private_key(String rsa_private_key) { - this.rsa_private_key = rsa_private_key; - } - - public String getNotify_url() { - return notify_url; - } - - public void setNotify_url(String notify_url) { - this.notify_url = notify_url; - } - - public String getReturn_url() { - return return_url; - } - - public void setReturn_url(String return_url) { - this.return_url = return_url; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Short getIsSandbox() { - return isSandbox; - } - - public void setIsSandbox(Short isSandbox) { - this.isSandbox = isSandbox; - } - - public String getAlipay_public_key() { - return alipay_public_key; - } - - public void setAlipay_public_key(String alipay_public_key) { - this.alipay_public_key = alipay_public_key; - } -} - diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayProperties.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayProperties.java deleted file mode 100755 index 56d3b42160c32a413d29f7e01cd525446d6620f8..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayProperties.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay.boot.service.channel.wechat; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * User: rizenguo - * Date: 2014/10/29 - * Time: 14:40 - * 这里放置各种配置数据 - */ -@Component -@ConfigurationProperties(prefix="config.wx") -public class WxPayProperties { - - private String certRootPath; - - private String notifyUrl; - - public String getCertRootPath() { - return certRootPath; - } - - public void setCertRootPath(String certRootPath) { - this.certRootPath = certRootPath; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayUtil.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayUtil.java deleted file mode 100644 index ae598e3f82278144df61cf34e563f9e28fdb3325..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/channel/wechat/WxPayUtil.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.xxpay.boot.service.channel.wechat; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.config.WxPayConfig; - -import java.io.File; - -/** - * @author: dingzhiwei - * @date: 17/8/25 - * @description: - */ -public class WxPayUtil { - - /** - * 获取微信支付配置 - * @param configParam - * @param tradeType - * @param certRootPath - * @param notifyUrl - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam, String tradeType, String certRootPath, String notifyUrl) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setKeyPath(certRootPath + File.separator + paramObj.getString("certLocalPath")); - wxPayConfig.setMchKey(paramObj.getString("key")); - wxPayConfig.setNotifyUrl(notifyUrl); - wxPayConfig.setTradeType(tradeType); - return wxPayConfig; - } - - /** - * 获取微信支付配置 - * @param configParam - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setMchKey(paramObj.getString("key")); - return wxPayConfig; - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/MchInfoServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/MchInfoServiceImpl.java deleted file mode 100644 index 2304f5a1eec2eac473f4fd57416c7bdac36e9c60..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/MchInfoServiceImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.stereotype.Service; -import org.xxpay.boot.service.BaseService; -import org.xxpay.boot.service.IMchInfoService; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.JsonUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.ObjectValidUtil; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.MchInfo; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service -public class MchInfoServiceImpl extends BaseService implements IMchInfoService { - - private static final MyLog _log = MyLog.getLog(MchInfoServiceImpl.class); - - @Override - public Map selectMchInfo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("查询商户信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - if (ObjectValidUtil.isInvalid(mchId)) { - _log.warn("查询商户信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - MchInfo mchInfo = super.baseSelectMchInfo(mchId); - if(mchInfo == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(mchInfo); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - public JSONObject getByMchId(String mchId) { - Map paramMap = new HashMap<>(); - paramMap.put("mchId", mchId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = selectMchInfo(jsonParam); - String s = RpcUtil.mkRet(result); - if(s==null) return null; - return JSONObject.parseObject(s); - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/NotifyPayServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/NotifyPayServiceImpl.java deleted file mode 100644 index 1f6626a24aaa67a3c2e46a37adfb9680f9147e1d..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/NotifyPayServiceImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alipay.api.AlipayApiException; -import com.alipay.api.internal.util.AlipaySignature; -import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse; -import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; -import org.xxpay.boot.service.INotifyPayService; -import org.xxpay.boot.service.Notify4BasePay; -import org.xxpay.boot.service.channel.alipay.AlipayConfig; -import org.xxpay.boot.service.channel.wechat.WxPayUtil; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.JsonUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.ObjectValidUtil; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; - -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service -public class NotifyPayServiceImpl extends Notify4BasePay implements INotifyPayService { - - private static final MyLog _log = MyLog.getLog(NotifyPayServiceImpl.class); - - @Autowired - private AlipayConfig alipayConfig; - - @Override - public Map doAliPayNotify(String jsonParam) { - String logPrefix = "【处理支付宝支付回调】"; - _log.info("====== 开始处理支付宝支付回调通知 ======"); - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("处理支付宝支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - Map params = baseParam.isNullValue("params") ? null : (Map) bizParamMap.get("params"); - if (ObjectValidUtil.isInvalid(params)) { - _log.warn("处理支付宝支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - Map payContext = new HashMap<>(); - PayOrder payOrder; - payContext.put("parameters", params); - if(!verifyAliPayParams(payContext)) { - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_PAY_NOTIFY_VERIFY_FAIL); - } - _log.info("{}验证支付通知数据及签名通过", logPrefix); - String trade_status = String.valueOf(params.get("trade_status")); // 交易状态 - String trade_no = String.valueOf(params.get("trade_no")); // 渠道订单号 - // 支付状态成功或者完成 - if (trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_SUCCESS) || - trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_FINISHED)) { - int updatePayOrderRows; - payOrder = (PayOrder)payContext.get("payOrder"); - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - updatePayOrderRows = super.baseUpdateStatus4Success(payOrder.getPayOrderId(), trade_no); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_FAIL); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_FAIL); - } - _log.info("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - payOrder.setChannelOrderNo(trade_no); - } - }else{ - // 其他状态 - _log.info("{}支付状态trade_status={},不做业务处理", logPrefix, trade_status); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - } - doNotify(payOrder); - _log.info("====== 完成处理支付宝支付回调通知 ======"); - return RpcUtil.createBizResult(baseParam, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - } - - @Override - public Map doWxPayNotify(String jsonParam) { - String logPrefix = "【处理微信支付回调】"; - _log.info("====== 开始处理微信支付回调通知 ======"); - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - try { - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("处理微信支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(RetEnum.RET_PARAM_NOT_FOUND.getMessage())); - //return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String xmlResult = baseParam.isNullValue("xmlResult") ? null : bizParamMap.get("xmlResult").toString(); - if (ObjectValidUtil.isInvalid(xmlResult)) { - _log.warn("处理微信支付回调失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(RetEnum.RET_PARAM_INVALID.getMessage())); - //return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - WxPayService wxPayService = new WxPayServiceImpl(); - WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlResult); - Map payContext = new HashMap<>(); - payContext.put("parameters", result); - // 验证业务数据是否正确,验证通过后返回PayOrder和WxPayConfig对象 - if(!verifyWxPayParams(payContext)) { - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail((String) payContext.get("retMsg"))); - } - PayOrder payOrder = (PayOrder) payContext.get("payOrder"); - WxPayConfig wxPayConfig = (WxPayConfig) payContext.get("wxPayConfig"); - wxPayService.setConfig(wxPayConfig); - // 这里做了签名校验(这里又做了一次xml转换对象,可以考虑优化) - wxPayService.parseOrderNotifyResult(xmlResult); - // 处理订单 - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - int updatePayOrderRows = super.baseUpdateStatus4Success(payOrder.getPayOrderId(), result.getTransactionId()); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail("处理订单失败")); - } - _log.error("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - payOrder.setChannelOrderNo(result.getTransactionId()); - } - // 业务系统后端通知 - doNotify(payOrder); - _log.info("====== 完成处理微信支付回调通知 ======"); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.success("OK")); - } catch (WxPayException e) { - //出现业务错误 - _log.error(e, "微信回调结果异常,异常原因"); - _log.info("{}请求数据result_code=FAIL", logPrefix); - _log.info("err_code:", e.getErrCode()); - _log.info("err_code_des:", e.getErrCodeDes()); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(e.getMessage())); - } catch (Exception e) { - _log.error(e, "微信回调结果异常,异常原因"); - return RpcUtil.createBizResult(baseParam, WxPayNotifyResponse.fail(e.getMessage())); - } - } - - @Override - public Map sendBizPayNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("发送业务支付通知失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if(ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("发送业务支付通知失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - try { - // 发送业务支付通知 - super.doNotify(payOrder); - }catch (Exception e) { - return RpcUtil.createBizResult(baseParam, 0); - } - return RpcUtil.createBizResult(baseParam, 1); - } - - - /** - * 验证支付宝支付通知参数 - * @return - */ - public boolean verifyAliPayParams(Map payContext) { - Map params = (Map)payContext.get("parameters"); - String out_trade_no = params.get("out_trade_no"); // 商户订单号 - String total_amount = params.get("total_amount"); // 支付金额 - if (StringUtils.isEmpty(out_trade_no)) { - _log.error("AliPay Notify parameter out_trade_no is empty. out_trade_no={}", out_trade_no); - payContext.put("retMsg", "out_trade_no is empty"); - return false; - } - if (StringUtils.isEmpty(total_amount)) { - _log.error("AliPay Notify parameter total_amount is empty. total_fee={}", total_amount); - payContext.put("retMsg", "total_amount is empty"); - return false; - } - String errorMessage; - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if (payOrder == null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - boolean verify_result = false; - try { - verify_result = AlipaySignature.rsaCheckV1(params, alipayConfig.init(payChannel.getParam()).getAlipay_public_key(), AlipayConfig.CHARSET, "RSA2"); - } catch (AlipayApiException e) { - _log.error(e, "AlipaySignature.rsaCheckV1 error"); - } - - // 验证签名 - if (!verify_result) { - errorMessage = "rsaCheckV1 failed."; - _log.error("AliPay Notify parameter {}", errorMessage); - payContext.put("retMsg", errorMessage); - return false; - } - - // 核对金额 - long aliPayAmt = new BigDecimal(total_amount).movePointRight(2).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != aliPayAmt) { - _log.error("db payOrder record payPrice not equals total_amount. total_amount={},payOrderId={}", total_amount, payOrderId); - payContext.put("retMsg", ""); - return false; - } - payContext.put("payOrder", payOrder); - return true; - } - - /** - * 验证微信支付通知参数 - * @return - */ - public boolean verifyWxPayParams(Map payContext) { - WxPayOrderNotifyResult params = (WxPayOrderNotifyResult)payContext.get("parameters"); - - //校验结果是否成功 - if (!PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getResultCode()) - && !PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getReturnCode())) { - _log.error("returnCode={},resultCode={},errCode={},errCodeDes={}", params.getReturnCode(), params.getResultCode(), params.getErrCode(), params.getErrCodeDes()); - payContext.put("retMsg", "notify data failed"); - return false; - } - - Integer total_fee = params.getTotalFee(); // 总金额 - String out_trade_no = params.getOutTradeNo(); // 商户系统订单号 - - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if (payOrder==null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - payContext.put("wxPayConfig", WxPayUtil.getWxPayConfig(payChannel.getParam())); - - // 核对金额 - long wxPayAmt = new BigDecimal(total_fee).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != wxPayAmt) { - _log.error("db payOrder record payPrice not equals total_fee. total_fee={},payOrderId={}", total_fee, payOrderId); - payContext.put("retMsg", "total_fee is not the same"); - return false; - } - - payContext.put("payOrder", payOrder); - return true; - } - - public String handleAliPayNotify(Map params) { - Map paramMap = new HashMap<>(); - paramMap.put("params", params); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = doAliPayNotify(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - return s; - } - - public String handleWxPayNotify(String xmlResult) { - Map paramMap = new HashMap<>(); - paramMap.put("xmlResult", xmlResult); - String jsonParam = RpcUtil.createBaseParam(paramMap); - // 返回给微信的数据格式已经有service处理(包括正确与错误),肯定会返回result - Map result = doWxPayNotify(jsonParam); - return RpcUtil.mkRet(result); - } - - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4AliServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4AliServiceImpl.java deleted file mode 100644 index 63f39f7d472942d057e88ee2d632be1959630770..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4AliServiceImpl.java +++ /dev/null @@ -1,287 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.alipay.api.AlipayApiException; -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.domain.AlipayTradeAppPayModel; -import com.alipay.api.domain.AlipayTradePagePayModel; -import com.alipay.api.domain.AlipayTradePrecreateModel; -import com.alipay.api.domain.AlipayTradeWapPayModel; -import com.alipay.api.request.AlipayTradeAppPayRequest; -import com.alipay.api.request.AlipayTradePagePayRequest; -import com.alipay.api.request.AlipayTradePrecreateRequest; -import com.alipay.api.request.AlipayTradeWapPayRequest; -import org.apache.commons.lang3.ObjectUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.boot.service.BaseService; -import org.xxpay.boot.service.IPayChannel4AliService; -import org.xxpay.boot.service.channel.alipay.AlipayConfig; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; - -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/10 - * @description: - */ -@Service -public class PayChannel4AliServiceImpl extends BaseService implements IPayChannel4AliService { - - private static final MyLog _log = MyLog.getLog(PayChannel4AliServiceImpl.class); - - @Autowired - private AlipayConfig alipayConfig; - - @Override - public Map doAliPayWapReq(String jsonParam) { - String logPrefix = "【支付宝WAP支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeWapPayRequest alipay_request = new AlipayTradeWapPayRequest(); - // 封装请求支付信息 - AlipayTradeWapPayModel model=new AlipayTradeWapPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_WAP_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("quit_url"))) { - model.setQuitUrl(objParamsJson.getString("quit_url")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - super.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayPcReq(String jsonParam) { - String logPrefix = "【支付宝PC支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePagePayRequest alipay_request = new AlipayTradePagePayRequest(); - // 封装请求支付信息 - AlipayTradePagePayModel model=new AlipayTradePagePayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("FAST_INSTANT_TRADE_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - String qr_pay_mode = "2"; - String qrcode_width = "200"; - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - qr_pay_mode = ObjectUtils.toString(objParamsJson.getString("qr_pay_mode"), "2"); - qrcode_width = ObjectUtils.toString(objParamsJson.getString("qrcode_width"), "200"); - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - model.setQrPayMode(qr_pay_mode); - model.setQrcodeWidth(Long.parseLong(qrcode_width)); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - super.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayMobileReq(String jsonParam) { - String logPrefix = "【支付宝APP支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeAppPayRequest alipay_request = new AlipayTradeAppPayRequest(); - // 封装请求支付信息 - AlipayTradeAppPayModel model=new AlipayTradeAppPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_MSECURITY_PAY"); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payParams = null; - try { - payParams = client.sdkExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - super.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payParams", payParams); - return RpcUtil.createBizResult(baseParam, map); - } - - @Override - public Map doAliPayQrReq(String jsonParam) { - String logPrefix = "【支付宝当面付之扫码支付下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePrecreateRequest alipay_request = new AlipayTradePrecreateRequest(); - // 封装请求支付信息 - AlipayTradePrecreateModel model=new AlipayTradePrecreateModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("discountable_amount"))) { - //可打折金额 - model.setDiscountableAmount(objParamsJson.getString("discountable_amount")); - } - if(StringUtils.isNotBlank(objParamsJson.getString("undiscountable_amount"))) { - //不可打折金额 - model.setUndiscountableAmount(objParamsJson.getString("undiscountable_amount")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.execute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - super.baseUpdateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return RpcUtil.createBizResult(baseParam, map); - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4WxServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4WxServiceImpl.java deleted file mode 100644 index 5cb273663f412acf177c122342c44f3c2ea95066..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannel4WxServiceImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; -import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.constant.WxPayConstants; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import com.github.binarywang.wxpay.util.SignUtils; -import org.springframework.stereotype.Service; -import org.xxpay.boot.service.BaseService; -import org.xxpay.boot.service.IPayChannel4WxService; -import org.xxpay.boot.service.channel.wechat.WxPayProperties; -import org.xxpay.boot.service.channel.wechat.WxPayUtil; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付渠道接口:微信 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-09-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Service -public class PayChannel4WxServiceImpl extends BaseService implements IPayChannel4WxService { - - private final MyLog _log = MyLog.getLog(PayChannel4WxServiceImpl.class); - - @Resource - private WxPayProperties wxPayProperties; - - public Map doWxPayReq(String jsonParam) { - String logPrefix = "【微信支付统一下单】"; - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - try{ - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - String tradeType = baseParam.isNullValue("tradeType") ? null : bizParamMap.get("tradeType").toString(); - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if (ObjectValidUtil.isInvalid(payOrder, tradeType)) { - _log.warn("{}失败, {}. jsonParam={}", logPrefix, RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), tradeType, wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - WxPayUnifiedOrderRequest wxPayUnifiedOrderRequest = buildUnifiedOrderRequest(payOrder, wxPayConfig); - String payOrderId = payOrder.getPayOrderId(); - WxPayUnifiedOrderResult wxPayUnifiedOrderResult; - try { - wxPayUnifiedOrderResult = wxPayService.unifiedOrder(wxPayUnifiedOrderRequest); - _log.info("{} >>> 下单成功", logPrefix); - Map map = new HashMap<>(); - map.put("payOrderId", payOrderId); - map.put("prepayId", wxPayUnifiedOrderResult.getPrepayId()); - int result = super.baseUpdateStatus4Ing(payOrderId, wxPayUnifiedOrderResult.getPrepayId()); - _log.info("更新第三方支付订单号:payOrderId={},prepayId={},result={}", payOrderId, wxPayUnifiedOrderResult.getPrepayId(), result); - switch (tradeType) { - case PayConstant.WxConstant.TRADE_TYPE_NATIVE : { - map.put("codeUrl", wxPayUnifiedOrderResult.getCodeURL()); // 二维码支付链接 - break; - } - case PayConstant.WxConstant.TRADE_TYPE_APP : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - // APP支付绑定的是微信开放平台上的账号,APPID为开放平台上绑定APP后发放的参数 - String appId = wxPayConfig.getAppId(); - Map configMap = new HashMap<>(); - // 此map用于参与调起sdk支付的二次签名,格式全小写,timestamp只能是10位,格式固定,切勿修改 - String partnerId = wxPayConfig.getMchId(); - configMap.put("prepayid", wxPayUnifiedOrderResult.getPrepayId()); - configMap.put("partnerid", partnerId); - String packageValue = "Sign=WXPay"; - configMap.put("package", packageValue); - configMap.put("timestamp", timestamp); - configMap.put("noncestr", nonceStr); - configMap.put("appid", appId); - // 此map用于客户端与微信服务器交互 - payInfo.put("sign", SignUtils.createSign(configMap, wxPayConfig.getMchKey(), null)); - payInfo.put("prepayid", wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("partnerid", partnerId); - payInfo.put("appid", appId); - payInfo.put("package", packageValue); - payInfo.put("timestamp", timestamp); - payInfo.put("noncestr", nonceStr); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_JSPAI : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - payInfo.put("appId", wxPayUnifiedOrderResult.getAppid()); - // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 - payInfo.put("timeStamp", timestamp); - payInfo.put("nonceStr", nonceStr); - payInfo.put("package", "prepay_id=" + wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("signType", WxPayConstants.SignType.MD5); - payInfo.put("paySign", SignUtils.createSign(payInfo, wxPayConfig.getMchKey(), null)); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_MWEB : { - map.put("payUrl", wxPayUnifiedOrderResult.getMwebUrl()); // h5支付链接地址 - break; - } - } - return RpcUtil.createBizResult(baseParam, map); - } catch (WxPayException e) { - _log.error(e, "下单失败"); - //出现业务错误 - _log.info("{}下单返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - - // return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败," + e.getErrCode() + ":" + e.getErrCodeDes()), resKey); - } - }catch (Exception e) { - _log.error(e, "微信支付统一下单异常"); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_WX_PAY_CREATE_FAIL); - - //return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - } - } - - /** - * 构建微信统一下单请求数据 - * @param payOrder - * @param wxPayConfig - * @return - */ - WxPayUnifiedOrderRequest buildUnifiedOrderRequest(PayOrder payOrder, WxPayConfig wxPayConfig) { - String tradeType = wxPayConfig.getTradeType(); - String payOrderId = payOrder.getPayOrderId(); - Integer totalFee = payOrder.getAmount().intValue();// 支付金额,单位分 - String deviceInfo = payOrder.getDevice(); - String body = payOrder.getBody(); - String detail = null; - String attach = null; - String outTradeNo = payOrderId; - String feeType = "CNY"; - String spBillCreateIP = payOrder.getClientIp(); - String timeStart = null; - String timeExpire = null; - String goodsTag = null; - String notifyUrl = wxPayConfig.getNotifyUrl(); - String productId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_NATIVE)) productId = JSON.parseObject(payOrder.getExtra()).getString("productId"); - String limitPay = null; - String openId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_JSPAI)) openId = JSON.parseObject(payOrder.getExtra()).getString("openId"); - String sceneInfo = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_MWEB)) sceneInfo = JSON.parseObject(payOrder.getExtra()).getString("sceneInfo"); - // 微信统一下单请求对象 - WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest(); - request.setDeviceInfo(deviceInfo); - request.setBody(body); - request.setDetail(detail); - request.setAttach(attach); - request.setOutTradeNo(outTradeNo); - request.setFeeType(feeType); - request.setTotalFee(totalFee); - request.setSpbillCreateIp(spBillCreateIP); - request.setTimeStart(timeStart); - request.setTimeExpire(timeExpire); - request.setGoodsTag(goodsTag); - request.setNotifyURL(notifyUrl); - request.setTradeType(tradeType); - request.setProductId(productId); - request.setLimitPay(limitPay); - request.setOpenid(openId); - request.setSceneInfo(sceneInfo); - - return request; - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannelServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannelServiceImpl.java deleted file mode 100644 index b8770826b8228b159f45ae0d14ccc53cc8590157..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayChannelServiceImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.stereotype.Service; -import org.xxpay.boot.service.BaseService; -import org.xxpay.boot.service.IPayChannelService; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.JsonUtil; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.ObjectValidUtil; -import org.xxpay.common.util.RpcUtil; -import org.xxpay.dal.dao.model.PayChannel; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service -public class PayChannelServiceImpl extends BaseService implements IPayChannelService { - - private static final MyLog _log = MyLog.getLog(PayChannelServiceImpl.class); - - @Override - public Map selectPayChannel(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("查询支付渠道信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String channelId = baseParam.isNullValue("channelId") ? null : bizParamMap.get("channelId").toString(); - if (ObjectValidUtil.isInvalid(mchId, channelId)) { - _log.warn("查询支付渠道信息失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayChannel payChannel = super.baseSelectPayChannel(mchId, channelId); - if(payChannel == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payChannel); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - public JSONObject getByMchIdAndChannelId(String mchId, String channelId) { - Map paramMap = new HashMap<>(); - paramMap.put("mchId", mchId); - paramMap.put("channelId", channelId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = selectPayChannel(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return null; - return JSONObject.parseObject(s); - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayOrderServiceImpl.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayOrderServiceImpl.java deleted file mode 100644 index eefa30faf172cf72a89273c84a4d75b8fe8323dc..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/impl/PayOrderServiceImpl.java +++ /dev/null @@ -1,271 +0,0 @@ -package org.xxpay.boot.service.impl; - -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.xxpay.boot.service.*; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.domain.BaseParam; -import org.xxpay.common.enumm.RetEnum; -import org.xxpay.common.util.*; -import org.xxpay.dal.dao.model.PayOrder; - -import java.util.HashMap; -import java.util.Map; - -/** - * @author: dingzhiwei - * @date: 17/9/8 - * @description: - */ -@Service -public class PayOrderServiceImpl extends BaseService implements IPayOrderService { - - private static final MyLog _log = MyLog.getLog(PayOrderServiceImpl.class); - - @Autowired - private INotifyPayService notifyPayService; - - @Autowired - private IPayChannel4WxService payChannel4WxService; - - @Autowired - private IPayChannel4AliService payChannel4AliService; - - public int createPayOrder(JSONObject payOrder) { - Map paramMap = new HashMap<>(); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = createPayOrder(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) return 0; - return Integer.parseInt(s); - } - - public JSONObject queryPayOrder(String mchId, String payOrderId, String mchOrderNo, String executeNotify) { - Map paramMap = new HashMap<>(); - Map result; - if(StringUtils.isNotBlank(payOrderId)) { - paramMap.put("mchId", mchId); - paramMap.put("payOrderId", payOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = selectPayOrderByMchIdAndPayOrderId(jsonParam); - }else { - paramMap.put("mchId", mchId); - paramMap.put("mchOrderNo", mchOrderNo); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = selectPayOrderByMchIdAndMchOrderNo(jsonParam); - } - String s = RpcUtil.mkRet(result); - if(s == null) return null; - boolean isNotify = Boolean.parseBoolean(executeNotify); - JSONObject payOrder = JSONObject.parseObject(s); - if(isNotify) { - paramMap = new HashMap<>(); - paramMap.put("payOrderId", payOrderId); - String jsonParam = RpcUtil.createBaseParam(paramMap); - result = notifyPayService.sendBizPayNotify(jsonParam); - s = RpcUtil.mkRet(result); - _log.info("业务查单完成,并再次发送业务支付通知.发送结果:{}", s); - } - return payOrder; - } - - public String doWxPayReq(String tradeType, JSONObject payOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("tradeType", tradeType); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result = payChannel4WxService.doWxPayReq(jsonParam); - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - - public String doAliPayReq(String channelId, JSONObject payOrder, String resKey) { - Map paramMap = new HashMap<>(); - paramMap.put("payOrder", payOrder); - String jsonParam = RpcUtil.createBaseParam(paramMap); - Map result; - switch (channelId) { - case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE : - result = payChannel4AliService.doAliPayMobileReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_PC : - result = payChannel4AliService.doAliPayPcReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_WAP : - result = payChannel4AliService.doAliPayWapReq(jsonParam); - break; - case PayConstant.PAY_CHANNEL_ALIPAY_QR : - result = payChannel4AliService.doAliPayQrReq(jsonParam); - break; - default: - result = null; - break; - } - String s = RpcUtil.mkRet(result); - if(s == null) { - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用支付宝支付失败"), resKey); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.putAll((Map) result.get("bizResult")); - return XXPayUtil.makeRetData(map, resKey); - } - - @Override - public Map createPayOrder(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - JSONObject payOrderObj = baseParam.isNullValue("payOrder") ? null : JSONObject.parseObject(bizParamMap.get("payOrder").toString()); - if(payOrderObj == null) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = BeanConvertUtils.map2Bean(payOrderObj, PayOrder.class); - if(payOrder == null) { - _log.warn("新增支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseCreatePayOrder(payOrder); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map selectPayOrder(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("根据支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrder(payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectPayOrderByMchIdAndPayOrderId(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(mchId, payOrderId)) { - _log.warn("根据商户号和支付订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrderByMchIdAndPayOrderId(mchId, payOrderId); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map selectPayOrderByMchIdAndMchOrderNo(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String mchId = baseParam.isNullValue("mchId") ? null : bizParamMap.get("mchId").toString(); - String mchOrderNo = baseParam.isNullValue("mchOrderNo") ? null : bizParamMap.get("mchOrderNo").toString(); - if (ObjectValidUtil.isInvalid(mchId, mchOrderNo)) { - _log.warn("根据商户号和商户订单号查询支付订单失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - PayOrder payOrder = super.baseSelectPayOrderByMchIdAndMchOrderNo(mchId, mchOrderNo); - if(payOrder == null) return RpcUtil.createFailResult(baseParam, RetEnum.RET_BIZ_DATA_NOT_EXISTS); - String jsonResult = JsonUtil.object2Json(payOrder); - return RpcUtil.createBizResult(baseParam, jsonResult); - } - - @Override - public Map updateStatus4Ing(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付中失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - String channelOrderNo = baseParam.isNullValue("channelOrderNo") ? null : bizParamMap.get("channelOrderNo").toString(); - if (ObjectValidUtil.isInvalid(payOrderId, channelOrderNo)) { - _log.warn("修改支付订单状态为支付中失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Ing(payOrderId, channelOrderNo); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Success(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付成功失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("修改支付订单状态为支付成功失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Success(payOrderId, null); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateStatus4Complete(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单状态为支付完成失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - if (ObjectValidUtil.isInvalid(payOrderId)) { - _log.warn("修改支付订单状态为支付完成失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateStatus4Complete(payOrderId); - return RpcUtil.createBizResult(baseParam, result); - } - - @Override - public Map updateNotify(String jsonParam) { - BaseParam baseParam = JsonUtil.getObjectFromJson(jsonParam, BaseParam.class); - Map bizParamMap = baseParam.getBizParamMap(); - if (ObjectValidUtil.isInvalid(bizParamMap)) { - _log.warn("修改支付订单通知次数失败, {}. jsonParam={}", RetEnum.RET_PARAM_NOT_FOUND.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_NOT_FOUND); - } - String payOrderId = baseParam.isNullValue("payOrderId") ? null : bizParamMap.get("payOrderId").toString(); - Byte count = baseParam.isNullValue("count") ? null : Byte.parseByte(bizParamMap.get("count").toString()); - if (ObjectValidUtil.isInvalid(payOrderId, count)) { - _log.warn("修改支付订单通知次数失败, {}. jsonParam={}", RetEnum.RET_PARAM_INVALID.getMessage(), jsonParam); - return RpcUtil.createFailResult(baseParam, RetEnum.RET_PARAM_INVALID); - } - int result = super.baseUpdateNotify(payOrderId, count); - return RpcUtil.createBizResult(baseParam, result); - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/Mq4PayNotify.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/Mq4PayNotify.java deleted file mode 100644 index 40f71c4e52d20c5b29aac76a59ea03e30934d107..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/Mq4PayNotify.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.xxpay.boot.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; -import org.xxpay.common.util.MyLog; -import org.xxpay.boot.service.BaseService; - -import java.net.URI; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 业务通知MQ实现 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public abstract class Mq4PayNotify extends BaseService { - - @Autowired - private RestTemplate restTemplate; - - protected static final MyLog _log = MyLog.getLog(Mq4PayNotify.class); - - public abstract void send(String msg); - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public abstract void send(String msg, long delay); - - public void receive(String msg) { - _log.info("do notify task, msg={}", msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("notify url is empty. respUrl={}", respUrl); - return; - } - try { - String notifyResult = ""; - _log.info("==>MQ通知业务系统开始[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - try { - URI uri = new URI(respUrl); - notifyResult = restTemplate.postForObject(uri, null, String.class); - }catch (Exception e) { - _log.error(e, "通知商户系统异常"); - } - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - // 验证结果 - _log.info("notify response , OrderID={}", orderId); - if(notifyResult.trim().equalsIgnoreCase("success")){ - //_log.info("{} notify success, url:{}", _notifyInfo.getBusiId(), respUrl); - //修改订单表 - try { - int result = super.baseUpdateStatus4Complete(orderId); - _log.info("修改payOrderId={},订单状态为处理完成->{}", orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知次数 - try { - int result = super.baseUpdateNotify(orderId, (byte) 1); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - return ; // 通知成功结束 - }else { - // 通知失败,延时再通知 - int cnt = count+1; - _log.info("notify count={}", cnt); - // 修改通知次数 - try { - int result = super.baseUpdateNotify(orderId, (byte) cnt); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - - if (cnt > 5) { - _log.info("notify count>5 stop. url={}", respUrl); - return ; - } - msgObj.put("count", cnt); - this.send(msgObj.toJSONString(), cnt * 60 * 1000); - } - _log.warn("notify failed. url:{}, response body:{}", respUrl, notifyResult.toString()); - } catch(Exception e) { - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - _log.error(e, "notify exception. url:%s", respUrl); - } - - } -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/MqConfig.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/MqConfig.java deleted file mode 100644 index 7b001db88e80e2862c52331310d18008fd9e3d1c..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/MqConfig.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.xxpay.boot.service.mq; - -import org.springframework.context.annotation.Configuration; - - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Configuration -public class MqConfig { - - public static final String PAY_NOTIFY_QUEUE_NAME = "pay.notify.queue"; - - public static final String PAY_NOTIFY_EXCHANGE_NAME = "pay.notify.exchange"; - - public static class Impl{ - public static final String ACTIVE_MQ = "activeMQ"; - public static final String RABBIT_MQ = "rabbitMQ"; - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/ActiveMq4PayNotify.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/ActiveMq4PayNotify.java deleted file mode 100644 index d3c0475b3849375b8d4a8823a1194571fc1f197c..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/ActiveMq4PayNotify.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.xxpay.boot.service.mq.impl; - -import javax.jms.*; - -import org.apache.activemq.ScheduledMessage; -import org.apache.activemq.command.ActiveMQQueue; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Profile; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.xxpay.boot.service.mq.Mq4PayNotify; -import org.xxpay.boot.service.mq.MqConfig; - -import static org.xxpay.boot.service.mq.MqConfig.PAY_NOTIFY_QUEUE_NAME; - -@Component -@Profile(MqConfig.Impl.ACTIVE_MQ) -public class ActiveMq4PayNotify extends Mq4PayNotify{ - - @Bean - public Queue payNotifyQueue() { - return new ActiveMQQueue(PAY_NOTIFY_QUEUE_NAME); - } - - @Autowired - private Queue payNotifyQueue; - - @Autowired - private JmsTemplate jmsTemplate; - - - @Override - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - jmsTemplate.convertAndSend(payNotifyQueue, msg); - } - - @Override - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(this.payNotifyQueue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - @JmsListener(destination = PAY_NOTIFY_QUEUE_NAME) - public void onMessage(String msg) { - receive(msg); - } - -} diff --git a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/RabbitMq4PayNotify.java b/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/RabbitMq4PayNotify.java deleted file mode 100644 index 76d56cb2bf6a17be0c40b30577495149f63af1e8..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/java/org/xxpay/boot/service/mq/impl/RabbitMq4PayNotify.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.xxpay.boot.service.mq.impl; - -import javax.annotation.PostConstruct; - -import org.springframework.amqp.AmqpException; -import org.springframework.amqp.core.AmqpAdmin; -import org.springframework.amqp.core.AmqpTemplate; -import org.springframework.amqp.core.Binding; -import org.springframework.amqp.core.BindingBuilder; -import org.springframework.amqp.core.DirectExchange; -import org.springframework.amqp.core.Message; -import org.springframework.amqp.core.MessagePostProcessor; -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.annotation.RabbitListener; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Profile; -import org.springframework.stereotype.Component; -import org.xxpay.boot.service.mq.Mq4PayNotify; -import org.xxpay.boot.service.mq.MqConfig; - -import static org.xxpay.boot.service.mq.MqConfig.PAY_NOTIFY_QUEUE_NAME; -import static org.xxpay.boot.service.mq.MqConfig.PAY_NOTIFY_EXCHANGE_NAME; - -@Component -@Profile(MqConfig.Impl.RABBIT_MQ) -public class RabbitMq4PayNotify extends Mq4PayNotify { - - @Autowired - private AmqpAdmin amqpAdmin; - - @PostConstruct - public void init() { - DirectExchange exchange = new DirectExchange(PAY_NOTIFY_EXCHANGE_NAME); - exchange.setDelayed(true); - Queue queue = new Queue(PAY_NOTIFY_QUEUE_NAME); - Binding binding = BindingBuilder.bind(queue).to(exchange).withQueueName(); - amqpAdmin.declareExchange(exchange); - amqpAdmin.declareQueue(queue); - amqpAdmin.declareBinding(binding); - } - - @Autowired - private AmqpTemplate rabbitTemplate; - - @Override - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - rabbitTemplate.convertAndSend(PAY_NOTIFY_QUEUE_NAME, msg); - } - - @Override - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - rabbitTemplate.convertAndSend(PAY_NOTIFY_EXCHANGE_NAME, PAY_NOTIFY_QUEUE_NAME, msg, new MessagePostProcessor() { - public Message postProcessMessage(Message message) throws AmqpException { - message.getMessageProperties().setDelay((int) delay); - return message; - } - }); - } - - @RabbitListener(queues = PAY_NOTIFY_QUEUE_NAME) - public void onMessage(String msg) { - receive(msg); - } - -} diff --git a/xxpay4spring-boot/src/main/resources/application.yml b/xxpay4spring-boot/src/main/resources/application.yml deleted file mode 100755 index ffa1be8ed908063bdf4d57a49d4f961bc320277b..0000000000000000000000000000000000000000 --- a/xxpay4spring-boot/src/main/resources/application.yml +++ /dev/null @@ -1,52 +0,0 @@ -server: - port: 3020 - -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://127.0.0.1:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: xxpay - password: xxpay - initialSize: 5 # 初始化大小 - minIdle: 5 # 最小 - maxActive: 20 # 最大 - maxWait: 60000 # 获取连接等待超时的时间 - timeBetweenEvictionRunsMillis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - poolPreparedStatements: true # 打开PSCache - maxPoolPreparedStatementPerConnectionSize: 20 # 指定每个连接上PSCache的大小 - filters: stat,wall,log4j # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 - profiles: - active: prod - include: - - activeMQ - #- rabbitMQ # 需要安装延迟队列插件:https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq/ - - activemq: - broker-url: failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0) - in-memory: true - pool: - enabled: true # 如果此处设置为true,需要加activemq-pool依赖包,否则会自动配置失败,报JmsMessagingTemplate注入失败 - - rabbitmq: - addresses: 127.0.0.1:5672 - username: guest - password: guest - dynamic: true - -config: - ali: - notify_url: http://api.xxpay.org/notify/pay/aliPayNotifyRes.htm - return_url: http://www.xxpay.org - wx: - certRootPath: /home/xxpay/service/cert - notifyUrl: http://api.xxpay.org/notify/pay/wxPayNotifyRes.htm - -logging: - file: ./log/xxpay4spring-boot.log \ No newline at end of file diff --git a/xxpay4spring-boot/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar b/xxpay4spring-boot/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar deleted file mode 100755 index 6cc1c44ac982e57cb83296e0e2912120a0411131..0000000000000000000000000000000000000000 Binary files a/xxpay4spring-boot/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar and /dev/null differ diff --git a/xxpay4spring-cloud/docker-compose.yml b/xxpay4spring-cloud/docker-compose.yml deleted file mode 100644 index 2556efb08b70cb62d415e47c4ef8b008e51ce5ab..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/docker-compose.yml +++ /dev/null @@ -1,58 +0,0 @@ -eureka: - image: "xxpay-server:1.0.0" - volumes: - - /log:/log - hostname: eureka - ports: - - "2000:2000" - net: "host" - -config: - image: "xxpay-config:1.0.0" - volumes: - - /log:/app/log - hostname: config - environment: - EUREKA_HOST: eureka - EUREKA_PORT: 2000 - ports: - - "2020:2020" - net: "host" - -service: - image: "xxpay-service:1.0.0" - volumes: - - /log:/app/log - hostname: service - environment: - EUREKA_HOST: eureka - EUREKA_PORT: 2000 - SERVER_PORT: 3000 - ports: - - "3000:3000" - net: "host" - -web: - image: "xxpay-web:1.0.0" - volumes: - - /log:/app/log - hostname: web - environment: - EUREKA_HOST: eureka - EUREKA_PORT: 2000 - SERVER_PORT: 3010 - ports: - - "3010:3010" - net: "host" - -zuul: - image: "xxpay-gateway:1.0.0" - volumes: - - /log:/app/log - hostname: zuul - environment: - EUREKA_HOST: eureka - EUREKA_PORT: 2000 - ports: - - "3020:3020" - net: "host" \ No newline at end of file diff --git a/xxpay4spring-cloud/pom.xml b/xxpay4spring-cloud/pom.xml deleted file mode 100755 index d29384d5a69934ee3b87066c818ee71168ac4a8f..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay4spring-cloud - 1.0.0 - pom - xxpay4spring-cloud - xxpay4spring-cloud - - - xxpay-server - xxpay-config - xxpay-service - xxpay-web - xxpay-gateway - - - - org.springframework.boot - spring-boot-starter-parent - 1.5.6.RELEASE - - - - UTF-8 - UTF-8 - 1.8 - http://192.168.188.165:2375 - - - - - org.xxpay - xxpay-common - 1.0.0 - - - org.springframework.cloud - spring-cloud-starter-eureka - - - org.springframework.cloud - spring-cloud-starter-config - - - org.springframework.boot - spring-boot-starter-test - test - - - - - - - org.springframework.cloud - spring-cloud-dependencies - Dalston.SR2 - pom - import - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - - com.spotify - docker-maven-plugin - 0.4.13 - - true - - - - - - diff --git a/xxpay4spring-cloud/xxpay-config/pom.xml b/xxpay4spring-cloud/xxpay-config/pom.xml deleted file mode 100755 index a276ce651f5778d8648f5dd79c4db139f9130f05..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-config - 1.0.0 - jar - xxpay-config - xxpay-config - - - org.xxpay - xxpay4spring-cloud - 1.0.0 - - - - - org.springframework.cloud - spring-cloud-config-server - - - org.springframework.boot - spring-boot-starter-security - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - com.spotify - docker-maven-plugin - - ${docker.url} - ${project.name}:${project.version} - ${project.basedir}/src/main/docker - false - - - / - ${project.build.directory} - ${project.artifactId}.jar - - - - - - - - diff --git a/xxpay4spring-cloud/xxpay-config/src/main/docker/Dockerfile b/xxpay4spring-cloud/xxpay-config/src/main/docker/Dockerfile deleted file mode 100644 index 7c0b107f0c92282ca2285a5ae4a044d0d8172e52..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM java:8 -VOLUME /tmp -RUN mkdir /app -ADD xxpay-config.jar /app/app.jar -ADD runboot.sh /app/ -RUN bash -c 'touch /app/app.jar' -WORKDIR /app -RUN chmod a+x runboot.sh -EXPOSE 2020 -CMD /app/runboot.sh \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-config/src/main/docker/runboot.sh b/xxpay4spring-cloud/xxpay-config/src/main/docker/runboot.sh deleted file mode 100644 index 32e9c0a685b7f18007d0ef8639ffa8967f2f43b6..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/docker/runboot.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -sleep 30 -java -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-config/src/main/java/org/xxpay/XxPayConfigApplication.java b/xxpay4spring-cloud/xxpay-config/src/main/java/org/xxpay/XxPayConfigApplication.java deleted file mode 100644 index c0a8ae34b81c0dd5bd3fa6b98ad1b0ce4c5c3bd5..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/java/org/xxpay/XxPayConfigApplication.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.xxpay; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.config.server.EnableConfigServer; - -/** - * @Description: xxpay配置中心服务端 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@SpringBootApplication -@EnableConfigServer -@EnableDiscoveryClient -public class XxPayConfigApplication { - public static void main(String[] args) { - SpringApplication.run(XxPayConfigApplication.class, args); - } -} diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/application.yml b/xxpay4spring-cloud/xxpay-config/src/main/resources/application.yml deleted file mode 100755 index 0b2c49760eab175c71994e87530471acaf163703..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/application.yml +++ /dev/null @@ -1,26 +0,0 @@ -server: - port: 2020 - -spring: - application: - name: xxpay-config - cloud: - config: - server: - native: - search-locations: classpath:/shared - profiles: - active: native - -security: - user: - password: xxpay - -eureka: - client: - serviceUrl: - defaultZone: http://localhost:2000/eureka/ - -logging: - file: ./log/xxpay-config.log - diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/application.yml b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/application.yml deleted file mode 100755 index 5b9d41188f07e7e813cd6bda3e69a314540f62f0..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/application.yml +++ /dev/null @@ -1,18 +0,0 @@ -logging: - level: - org.springframework.security: INFO - -hystrix: - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 10000 - -eureka: - instance: - prefer-ip-address: true - client: - serviceUrl: - defaultZone: http://localhost:2000/eureka/ diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-gateway.yml b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-gateway.yml deleted file mode 100755 index 1770dad1948fb44586b7e5eae20f2b724f03448a..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-gateway.yml +++ /dev/null @@ -1,32 +0,0 @@ -server: - port: 3020 - -hystrix: - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 60000 - -ribbon: - ReadTimeout: 60000 - ConnectTimeout: 60000 - -zuul: - ignoredServices: '*' - host: - connect-timeout-millis: 60000 - socket-timeout-millis: 60000 - - routes: - xxpay-service: - path: /api/** - serviceId: xxpay-web - - xxpay-web: - path: /notify/** - serviceId: xxpay-service - -logging: - file: ./log/xxpay-gateway.log diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-dev.properties b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-dev.properties deleted file mode 100644 index 0c8986826d2f8f85a81636119f32e3e757220d83..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-dev.properties +++ /dev/null @@ -1,10 +0,0 @@ -# \u652F\u4ED8\u5B9D\u670D\u52A1\u5668\u5F02\u6B65\u901A\u77E5\u9875\u9762\u8DEF\u5F84 -ali.notify_url=http://xxpay.ngrok.cc/notify/pay/aliPayNotifyRes.htm -# \u652F\u4ED8\u5B9D\u9875\u9762\u8DF3\u8F6C\u540C\u6B65\u901A\u77E5\u9875\u9762\u8DEF\u5F84(\u81EA\u884C\u914D\u7F6E) -ali.return_url=http://www.xxpay.org - -# \u5FAE\u4FE1\u652F\u4ED8\u56DE\u8C03\u5730\u5740 -wx.notify_url=http://xxpay.ngrok.cc/notify/pay/wxPayNotifyRes.htm - -# \u652F\u4ED8\u8BC1\u4E66\u6839\u8DEF\u5F84 -cert.root.path=/Users/dingzhiwei/java/tmp/cert \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-prod.properties b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-prod.properties deleted file mode 100644 index 3dc314e5aa9623ad869e9e5a2eee0f55415123b8..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-prod.properties +++ /dev/null @@ -1,9 +0,0 @@ -# \u652F\u4ED8\u5B9D\u56DE\u8C03\u5730\u5740 -ali.notify_url=http://api.xxpay.org/notify/pay/aliPayNotifyRes.htm -ali.return_url=http://www.xxpay.org - -# \u5FAE\u4FE1\u652F\u4ED8\u56DE\u8C03\u5730\u5740 -wx.notify_url=http://api.xxpay.org/notify/pay/wxPayNotifyRes.htm - -# \u652F\u4ED8\u8BC1\u4E66\u6839\u8DEF\u5F84 -cert.root.path=/home/xxpay/service/cert \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-test.properties b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-test.properties deleted file mode 100644 index 3dc314e5aa9623ad869e9e5a2eee0f55415123b8..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service-test.properties +++ /dev/null @@ -1,9 +0,0 @@ -# \u652F\u4ED8\u5B9D\u56DE\u8C03\u5730\u5740 -ali.notify_url=http://api.xxpay.org/notify/pay/aliPayNotifyRes.htm -ali.return_url=http://www.xxpay.org - -# \u5FAE\u4FE1\u652F\u4ED8\u56DE\u8C03\u5730\u5740 -wx.notify_url=http://api.xxpay.org/notify/pay/wxPayNotifyRes.htm - -# \u652F\u4ED8\u8BC1\u4E66\u6839\u8DEF\u5F84 -cert.root.path=/home/xxpay/service/cert \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service.yml b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service.yml deleted file mode 100755 index 1a4996e4681aa3bd3a95a61948bedaa72469b07b..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-service.yml +++ /dev/null @@ -1,38 +0,0 @@ -server: - port: 3000 - -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driver-class-name: com.mysql.jdbc.Driver - url: jdbc:mysql://139.129.231.219:3306/xxpaydb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false - username: xxpay - password: xxpay3qw13uM - initialSize: 5 # 初始化大小 - minIdle: 5 # 最小 - maxActive: 20 # 最大 - maxWait: 60000 # 获取连接等待超时的时间 - timeBetweenEvictionRunsMillis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - poolPreparedStatements: true # 打开PSCache - maxPoolPreparedStatementPerConnectionSize: 20 # 指定每个连接上PSCache的大小 - filters: stat,wall,log4j # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 - connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 # 通过connectProperties属性来打开mergeSql功能;慢SQL记录 - profiles: - active: prod - - activemq: - broker-url: failover:(tcp://101.200.130.72:61616?wireFormat.maxInactivityDuration=0) - in-memory: true - pool: - enabled: true # 如果此处设置为true,需要加activemq-pool依赖包,否则会自动配置失败,报JmsMessagingTemplate注入失败 - -logging: - file: ./log/xxpay-service.log - - - diff --git a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-web.yml b/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-web.yml deleted file mode 100755 index 1efc7ae04f863ea825ae8c07672eec30688fe192..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-config/src/main/resources/shared/xxpay-web.yml +++ /dev/null @@ -1,15 +0,0 @@ -server: - port: 3010 - -hystrix: - command: - default: - execution: - isolation: - thread: - timeoutInMilliseconds: 60000 - -logging: - file: ./log/xxpay-web.log - - diff --git a/xxpay4spring-cloud/xxpay-gateway/pom.xml b/xxpay4spring-cloud/xxpay-gateway/pom.xml deleted file mode 100644 index 8ae3c55840ad6edf24ed6379d7f978fc47b3e4b7..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-gateway - 1.0.0 - jar - xxpay-gateway - xxpay-gateway - - - org.xxpay - xxpay4spring-cloud - 1.0.0 - - - - - org.springframework.cloud - spring-cloud-starter-zuul - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - com.spotify - docker-maven-plugin - - ${docker.url} - ${project.name}:${project.version} - ${project.basedir}/src/main/docker - false - - - / - ${project.build.directory} - ${project.artifactId}.jar - - - - - - - - \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-gateway/src/main/docker/Dockerfile b/xxpay4spring-cloud/xxpay-gateway/src/main/docker/Dockerfile deleted file mode 100644 index 9360c23525fcf4ed2bf13fa1fd64760849bd1836..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/src/main/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM java:8 -VOLUME /tmp -RUN mkdir /app -ADD xxpay-gateway.jar /app/app.jar -ADD runboot.sh /app/ -RUN bash -c 'touch /app/app.jar' -WORKDIR /app -RUN chmod a+x runboot.sh -EXPOSE 3020 -CMD /app/runboot.sh \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-gateway/src/main/docker/runboot.sh b/xxpay4spring-cloud/xxpay-gateway/src/main/docker/runboot.sh deleted file mode 100644 index c3bebe94d06bcfe5e32d8cbdd51d42dc232dbc68..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/src/main/docker/runboot.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -sleep 150 -java -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/XxPayGatewayApplication.java b/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/XxPayGatewayApplication.java deleted file mode 100644 index b29945d26eb7bcbcf2f62a860d968aebc1806236..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/XxPayGatewayApplication.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.xxpay; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.cloud.client.SpringCloudApplication; -import org.springframework.cloud.netflix.zuul.EnableZuulProxy; -import org.springframework.context.annotation.Bean; -import org.xxpay.gateway.filter.AccessFilter; - -/** - * @Description: xxpay网关服务 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@EnableZuulProxy -@SpringCloudApplication -public class XxPayGatewayApplication { - - public static void main(String[] args) { - new SpringApplicationBuilder(XxPayGatewayApplication.class).web(true).run(args); - } - - @Bean - public AccessFilter accessFilter() { - return new AccessFilter(); - } - -} diff --git a/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/gateway/filter/AccessFilter.java b/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/gateway/filter/AccessFilter.java deleted file mode 100644 index aecfb11734bc4e41b34d96b698410afdfac32103..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/src/main/java/org/xxpay/gateway/filter/AccessFilter.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.gateway.filter; - -import com.netflix.zuul.ZuulFilter; -import com.netflix.zuul.context.RequestContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.xxpay.common.util.MyLog; - -import javax.servlet.http.HttpServletRequest; - -/** - * @Description: Zuul过滤器 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -public class AccessFilter extends ZuulFilter { - - private static final MyLog _log = MyLog.getLog(ZuulFilter.class); - - @Override - public String filterType() { - return "pre"; - } - - @Override - public int filterOrder() { - return 0; - } - - @Override - public boolean shouldFilter() { - return true; - } - - @Override - public Object run() { - RequestContext ctx = RequestContext.getCurrentContext(); - HttpServletRequest request = ctx.getRequest(); - _log.info(String.format("%s request to %s", request.getMethod(), request.getRequestURL().toString())); - Object accessToken = request.getParameter("accessToken"); - /*if(accessToken == null) { - log.warn("access token is empty"); - ctx.setSendZuulResponse(false); - ctx.setResponseStatusCode(401); - return null; - }*/ - return null; - } - -} diff --git a/xxpay4spring-cloud/xxpay-gateway/src/main/resources/bootstrap.yml b/xxpay4spring-cloud/xxpay-gateway/src/main/resources/bootstrap.yml deleted file mode 100755 index 0bcada1d221801f38b5f6c2e022eb4b6c2b1fcf5..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-gateway/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,16 +0,0 @@ -spring: - application: - name: xxpay-gateway - cloud: - config: - discovery: - enabled: true # 默认false,设为true表示使用注册中心中的configserver配置而不自己配置configserver的uri - serviceId: xxpay-config # 指定config server在服务发现中的serviceId,默认为:configserver - fail-fast: true - password: xxpay - username: user - -eureka: - client: - serviceUrl: - defaultZone: http://localhost:2000/eureka/ \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-server/pom.xml b/xxpay4spring-cloud/xxpay-server/pom.xml deleted file mode 100644 index 34bc33db458385adb79f99d69d6303cb7dc37c88..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/pom.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-server - 1.0.0 - jar - xxpay-server - xxpay-server - - - org.xxpay - xxpay4spring-cloud - 1.0.0 - - - - - org.springframework.cloud - spring-cloud-starter-eureka-server - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - com.spotify - docker-maven-plugin - - ${docker.url} - ${project.name}:${project.version} - ${project.basedir}/src/main/docker - false - - - / - ${project.build.directory} - ${project.artifactId}.jar - - - - - - - - \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-server/src/main/assembly/package.xml b/xxpay4spring-cloud/xxpay-server/src/main/assembly/package.xml deleted file mode 100644 index f09268d774bfaf3c583fa0426946fc9c7564ed69..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/src/main/assembly/package.xml +++ /dev/null @@ -1,78 +0,0 @@ - - bin - - - tar.gz - - - - - - - false - lib - false - - - - - - - ${project.basedir} - / - - README* - LICENSE* - NOTICE* - - - - - - - - - ${project.build.scriptSourceDirectory} - bin - - *.* - - - - - - ${project.build.scriptSourceDirectory} - - - startup.* - - - - - - - - ${project.build.outputDirectory} - classes - - **/*.class - **/*.xml - **/*.properties - - - - - \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-server/src/main/docker/Dockerfile b/xxpay4spring-cloud/xxpay-server/src/main/docker/Dockerfile deleted file mode 100644 index c040cd137662d3b201d5378240a3c35152009cbf..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/src/main/docker/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM java:8 -VOLUME /tmp -ADD xxpay-server.jar /app.jar -RUN bash -c 'touch /app.jar' -CMD ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-server/src/main/java/org/xxpay/server/XxPayServerApplication.java b/xxpay4spring-cloud/xxpay-server/src/main/java/org/xxpay/server/XxPayServerApplication.java deleted file mode 100644 index 985446fd9f07c5ae8d3614bae75032d1052bdc13..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/src/main/java/org/xxpay/server/XxPayServerApplication.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.xxpay.server; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; - -/** - * @Description: xxpay服务注册中心 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@EnableEurekaServer -@SpringBootApplication -public class XxPayServerApplication { - - public static void main(String[] args) { - new SpringApplicationBuilder(XxPayServerApplication.class).web(true).run(args); - } - -} diff --git a/xxpay4spring-cloud/xxpay-server/src/main/resources/application.properties b/xxpay4spring-cloud/xxpay-server/src/main/resources/application.properties deleted file mode 100644 index fe536dd7602cd81cf231b5232ed7608157ce9f53..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/src/main/resources/application.properties +++ /dev/null @@ -1,10 +0,0 @@ -server.port=2000 - -eureka.client.register-with-eureka=false -eureka.client.fetch-registry=false -#\u7981\u7528\u81EA\u6211\u4FDD\u62A4\u6A21\u5F0F -eureka.server.enable-self-preservation = false -eureka.client.serviceUrl.defaultZone=http://localhost:${server.port}/eureka/ - -### \u65E5\u5FD7 -logging.file=./log/xxpay-server.log \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-server/src/main/scripts/server.sh b/xxpay4spring-cloud/xxpay-server/src/main/scripts/server.sh deleted file mode 100755 index b896424026ab86e03d412cc8b060822c3a688b3c..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-server/src/main/scripts/server.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/sh -# -#该脚本为Linux下启动java程序的通用脚本。即可以作为开机自启动service脚本被调用, -#也可以作为启动java程序的独立脚本来使用。 -# -#JDK所在路径 -JAVA_HOME="/usr/local/jdk/jdk1.8.0_121" - -#Java程序所在的目录(classes的上一级目录) -APP_HOME=/home/xxpay/service/xxpay-service - -#需要启动的Java主程序(main方法类) -APP_MAINCLASS=org.xxpay.XxpayServiceApplication - -#拼凑完整的classpath参数,包括指定lib目录下所有的jar -CLASSPATH=$APP_HOME/classes -for i in "$APP_HOME"/lib/*.jar; do - CLASSPATH="$CLASSPATH":"$i" -done - -#java虚拟机启动参数 -JAVA_OPTS="-ms1024m -mx1024m -Xmn256m -Djava.awt.headless=true -XX:MaxPermSize=128m" - -################################### -#(函数)判断程序是否已启动 -# -#说明: -#使用JDK自带的JPS命令及grep命令组合,准确查找pid -#jps 加 l 参数,表示显示java的完整包路径 -#使用awk,分割出pid ($1部分),及Java程序名称($2部分) -#当jps命令不可用时,使用: ps -ef | grep $APP_MAINCLASS | grep -v "grep" | awk '{print $2}' 代替 -################################### -#初始化psid变量(全局) -psid=0 - -checkpid() { - javaps=`$JAVA_HOME/bin/jps -l | grep $APP_MAINCLASS` - #javaps=`ps -ef | grep $APP_MAINCLASS | grep -v "grep" | awk '{print $2}'` - - if [ -n "$javaps" ]; then - psid=`echo $javaps | awk '{print $1}'` - else - psid=0 - fi -} - -################################### -#(函数)启动程序 -# -#说明: -#1. 首先调用checkpid函数,刷新$psid全局变量 -#2. 如果程序已经启动($psid不等于0),则提示程序已启动 -#3. 如果程序没有被启动,则执行启动命令行 -#4. 启动命令执行后,再次调用checkpid函数 -#5. 如果步骤4的结果能够确认程序的pid,则打印[OK],否则打印[Failed] -#注意:echo -n 表示打印字符后,不换行 -#注意: "nohup 某命令 >/dev/null 2>&1 &" 的用法 -################################### -start() { - checkpid - - if [ $psid -ne 0 ]; then - echo "================================" - echo "warn: $APP_MAINCLASS already started! (pid=$psid)" - echo "================================" - else - echo -n "Starting $APP_MAINCLASS ..." - # -DlogFn=active 指的是生产日志文件名为active - nohup $JAVA_HOME/bin/java $JAVA_OPTS -DlogFn=level -classpath $CLASSPATH $APP_MAINCLASS >/dev/null 2>&1 & - checkpid - if [ $psid -ne 0 ]; then - echo "(pid=$psid) [OK]" - else - echo "[Failed]" - fi - fi -} - -################################### -#(函数)停止程序 -# -#说明: -#1. 首先调用checkpid函数,刷新$psid全局变量 -#2. 如果程序已经启动($psid不等于0),则开始执行停止,否则,提示程序未运行 -#3. 使用kill -9 pid命令进行强制杀死进程 -#4. 执行kill命令行紧接其后,马上查看上一句命令的返回值: $? -#5. 如果步骤4的结果$?等于0,则打印[OK],否则打印[Failed] -#6. 为了防止java程序被启动多次,这里增加反复检查进程,反复杀死的处理(递归调用stop)。 -#注意:echo -n 表示打印字符后,不换行 -#注意: 在shell编程中,"$?" 表示上一句命令或者一个函数的返回值 -################################### -stop() { - checkpid - - if [ $psid -ne 0 ]; then - echo -n "Stopping $APP_MAINCLASS ...(pid=$psid) " - kill -9 $psid - if [ $? -eq 0 ]; then - echo "[OK]" - else - echo "[Failed]" - fi - - checkpid - if [ $psid -ne 0 ]; then - stop - fi - else - echo "================================" - echo "warn: $APP_MAINCLASS is not running" - echo "================================" - fi -} - -################################### -#(函数)检查程序运行状态 -# -#说明: -#1. 首先调用checkpid函数,刷新$psid全局变量 -#2. 如果程序已经启动($psid不等于0),则提示正在运行并表示出pid -#3. 否则,提示程序未运行 -################################### -status() { - checkpid - - if [ $psid -ne 0 ]; then - echo "$APP_MAINCLASS is running! (pid=$psid)" - else - echo "$APP_MAINCLASS is not running" - fi -} - -################################### -#(函数)打印系统环境参数 -################################### -info() { - echo "System Information:" - echo "****************************" - echo `head -n 1 /etc/issue` - echo `uname -a` - echo - echo "JAVA_HOME=$JAVA_HOME" - echo `$JAVA_HOME/bin/java -version` - echo - echo "APP_HOME=$APP_HOME" - echo "APP_MAINCLASS=$APP_MAINCLASS" - echo "****************************" -} - -################################### -#读取脚本的第一个参数($1),进行判断 -#参数取值范围:{start|stop|restart|status|info} -#如参数不在指定范围之内,则打印帮助信息 -################################### -case "$1" in - 'start') - start - ;; - 'stop') - stop - ;; - 'restart') - stop - start - ;; - 'status') - status - ;; - 'info') - info - ;; - *) - echo "Usage: $0 {start|stop|restart|status|info}" - exit 1 -esac -exit 0 \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-service/pom.xml b/xxpay4spring-cloud/xxpay-service/pom.xml deleted file mode 100644 index 92d8833ddb7cf1298b00daf62b3c537b63d0a718..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-service - 1.0.0 - jar - xxpay-service - xxpay-service - - - org.xxpay - xxpay4spring-cloud - 1.0.0 - - - - - org.xxpay - xxpay-dal - 1.0.0 - - - - org.springframework.boot - spring-boot-starter-activemq - - - org.apache.activemq - activemq-pool - - - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.3.0 - - - - com.github.binarywang - weixin-java-pay - 2.8.0 - - - - com.alipay - sdk - 1.5 - system - ${basedir}/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar - - - - - - - src/main/webapp/WEB-INF/lib/ - BOOT-INF/lib/ - - **/*.jar - - - - src/main/resources - BOOT-INF/classes/ - - - src/main/resources - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - com.spotify - docker-maven-plugin - - ${docker.url} - ${project.name}:${project.version} - ${project.basedir}/src/main/docker - false - - - / - ${project.build.directory} - ${project.artifactId}.jar - - - - - - - - \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-service/src/main/docker/Dockerfile b/xxpay4spring-cloud/xxpay-service/src/main/docker/Dockerfile deleted file mode 100644 index 0177e4e38b5f764553b7e38a9f214c64ab7aa6af..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM java:8 -VOLUME /tmp -RUN mkdir /app -ADD xxpay-service.jar /app/app.jar -ADD runboot.sh /app/ -RUN bash -c 'touch /app/app.jar' -WORKDIR /app -RUN chmod a+x runboot.sh -EXPOSE 3000 -CMD /app/runboot.sh \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-service/src/main/docker/runboot.sh b/xxpay4spring-cloud/xxpay-service/src/main/docker/runboot.sh deleted file mode 100644 index dd3c827bad8d87811d4eef8164a1abfdf5e9fef6..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/docker/runboot.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -sleep 90 -java -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/XxPayServiceApplication.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/XxPayServiceApplication.java deleted file mode 100644 index a760b50f8cdfab4e8fdcbf3b933a8ec2fd601a9c..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/XxPayServiceApplication.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.xxpay; - -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; - -/** - * @Description: xxpay支付核心服务,包括:各支付渠道接口,通知处理 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@EnableDiscoveryClient -@SpringBootApplication -public class XxPayServiceApplication { - - public static void main(String[] args) { - new SpringApplicationBuilder(XxPayServiceApplication.class).web(true).run(args); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/alipay/AlipayConfig.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/alipay/AlipayConfig.java deleted file mode 100644 index f254fab01e3f2168e73c4ed02fa33d9a4b0a74bd..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/alipay/AlipayConfig.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.xxpay.service.channel.alipay; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Service; -import org.springframework.util.Assert; - -/** - * @author: dingzhiwei - * @date: 17/8/21 - * @description: - */ -@RefreshScope -@Service -public class AlipayConfig { - - // 商户appid - private String app_id; - // 私钥 pkcs8格式的 - private String rsa_private_key; - // 服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 - @Value("${ali.notify_url}") - private String notify_url; - // 页面跳转同步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 商户可以自定义同步跳转地址 - @Value("${ali.return_url}") - private String return_url; - // 请求网关地址 - private String url = "https://openapi.alipay.com/gateway.do"; - - // 编码 - public static String CHARSET = "UTF-8"; - // 返回格式 - public static String FORMAT = "json"; - // 支付宝公钥 - public String alipay_public_key; - // RSA2 - public static String SIGNTYPE = "RSA2"; - - // 是否沙箱环境,1:沙箱,0:正式环境 - private Short isSandbox = 0; - - /** - * 初始化支付宝配置 - * @param configParam - * @return - */ - public AlipayConfig init(String configParam) { - Assert.notNull(configParam, "init alipay config error"); - JSONObject paramObj = JSON.parseObject(configParam); - this.setApp_id(paramObj.getString("appid")); - this.setRsa_private_key(paramObj.getString("private_key")); - this.setAlipay_public_key(paramObj.getString("alipay_public_key")); - this.setIsSandbox(paramObj.getShortValue("isSandbox")); - if(this.getIsSandbox() == 1) this.setUrl("https://openapi.alipaydev.com/gateway.do"); - return this; - } - - public String getApp_id() { - return app_id; - } - - public void setApp_id(String app_id) { - this.app_id = app_id; - } - - public String getRsa_private_key() { - return rsa_private_key; - } - - public void setRsa_private_key(String rsa_private_key) { - this.rsa_private_key = rsa_private_key; - } - - public String getNotify_url() { - return notify_url; - } - - public void setNotify_url(String notify_url) { - this.notify_url = notify_url; - } - - public String getReturn_url() { - return return_url; - } - - public void setReturn_url(String return_url) { - this.return_url = return_url; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public Short getIsSandbox() { - return isSandbox; - } - - public void setIsSandbox(Short isSandbox) { - this.isSandbox = isSandbox; - } - - public String getAlipay_public_key() { - return alipay_public_key; - } - - public void setAlipay_public_key(String alipay_public_key) { - this.alipay_public_key = alipay_public_key; - } -} - diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayProperties.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayProperties.java deleted file mode 100755 index 1a5679ae656097305b2106162028ae7ba8bbace6..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayProperties.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.xxpay.service.channel.wechat; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.cloud.context.config.annotation.RefreshScope; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -/** - * User: rizenguo - * Date: 2014/10/29 - * Time: 14:40 - * 这里放置各种配置数据 - */ -@RefreshScope -@Service -public class WxPayProperties { - - @Value("${cert.root.path}") - private String certRootPath; - - @Value("${wx.notify_url}") - private String notifyUrl; - - public String getCertRootPath() { - return certRootPath; - } - - public void setCertRootPath(String certRootPath) { - this.certRootPath = certRootPath; - } - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayUtil.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayUtil.java deleted file mode 100644 index 0d345fcce7ee9d1c0505929f0e62b17e2f72084b..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/channel/wechat/WxPayUtil.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.xxpay.service.channel.wechat; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.config.WxPayConfig; - -import java.io.File; - -/** - * @author: dingzhiwei - * @date: 17/8/25 - * @description: - */ -public class WxPayUtil { - - /** - * 获取微信支付配置 - * @param configParam - * @param tradeType - * @param certRootPath - * @param notifyUrl - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam, String tradeType, String certRootPath, String notifyUrl) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setKeyPath(certRootPath + File.separator + paramObj.getString("certLocalPath")); - wxPayConfig.setMchKey(paramObj.getString("key")); - wxPayConfig.setNotifyUrl(notifyUrl); - wxPayConfig.setTradeType(tradeType); - return wxPayConfig; - } - - /** - * 获取微信支付配置 - * @param configParam - * @return - */ - public static WxPayConfig getWxPayConfig(String configParam) { - WxPayConfig wxPayConfig = new WxPayConfig(); - JSONObject paramObj = JSON.parseObject(configParam); - wxPayConfig.setMchId(paramObj.getString("mchId")); - wxPayConfig.setAppId(paramObj.getString("appId")); - wxPayConfig.setMchKey(paramObj.getString("key")); - return wxPayConfig; - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/MchInfoServiceController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/MchInfoServiceController.java deleted file mode 100644 index d71a501db288198a9710f53d67fa789c549d9e03..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/MchInfoServiceController.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.util.MyBase64; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.service.service.MchInfoService; - -/** - * @Description: 商户信息接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class MchInfoServiceController { - - private final MyLog _log = MyLog.getLog(MchInfoServiceController.class); - - @Autowired - private MchInfoService mchInfoService; - - @RequestMapping(value = "/mch_info/select") - public String selectMchInfo(@RequestParam String jsonParam) { - // TODO 参数校验 - String param = new String(MyBase64.decode(jsonParam)); - JSONObject paramObj = JSON.parseObject(param); - String mchId = paramObj.getString("mchId"); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - JSONObject retObj = new JSONObject(); - retObj.put("code", "0000"); - if(StringUtils.isBlank(jsonParam)) { - retObj.put("code", "0001"); // 参数错误 - retObj.put("msg", "缺少参数"); - return retObj.toJSONString(); - } - if(mchInfo == null) { - retObj.put("code", "0002"); - retObj.put("msg", "数据对象不存在"); - return retObj.toJSONString(); - } - retObj.put("result", JSON.toJSON(mchInfo)); - _log.info("result:{}", retObj.toJSONString()); - return retObj.toJSONString(); - } - - - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4AliPayController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4AliPayController.java deleted file mode 100644 index c09c4244ca20d895a78c5d07f6c544896d3e50cf..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4AliPayController.java +++ /dev/null @@ -1,196 +0,0 @@ -package org.xxpay.service.controller; - -import com.alipay.api.AlipayApiException; -import com.alipay.api.internal.util.AlipaySignature; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.channel.alipay.AlipayConfig; -import org.xxpay.service.service.PayChannelService; -import org.xxpay.service.service.PayOrderService; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * @Description: 接收处理支付宝通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4AliPayController extends Notify4BasePay { - - private static final MyLog _log = MyLog.getLog(Notify4AliPayController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private AlipayConfig alipayConfig; - - /** - * 支付宝移动支付后台通知响应 - * @param request - * @param response - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping(value = "/pay/aliPayNotifyRes.htm") - public void aliPayNotifyRes(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String result = doAliPayRes(request, response); - if(result != null) { - _log.info("alipay notify response: {}", result); - response.setContentType("text/html"); - PrintWriter pw; - try { - pw = response.getWriter(); - pw.print(result); - - } catch (IOException e) { - _log.error("Pay response write exception.", e); - } - } - - } - - public String doAliPayRes(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String logPrefix = "【支付宝支付回调通知】"; - _log.info("====== 开始接收支付宝支付回调通知 ======"); - //获取支付宝POST过来反馈信息 - Map params = new HashMap(); - Map requestParams = request.getParameterMap(); - for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) { - String name = (String) iter.next(); - String[] values = (String[]) requestParams.get(name); - String valueStr = ""; - for (int i = 0; i < values.length; i++) { - valueStr = (i == values.length - 1) ? valueStr + values[i] - : valueStr + values[i] + ","; - } - //乱码解决,这段代码在出现乱码时使用。如果mysign和sign不相等也可以使用这段代码转化 - //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "gbk"); - params.put(name, valueStr); - } - _log.info("{}通知请求数据:reqStr={}", logPrefix, params); - if(params.isEmpty()) { - _log.error("{}请求参数为空", logPrefix); - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - Map payContext = new HashMap(); - PayOrder payOrder; - payContext.put("parameters", params); - - if(!verifyAliPayParams(payContext)) { - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - _log.info("{}验证请求数据及签名通过", logPrefix); - String trade_status = params.get("trade_status"); // 交易状态 - // 支付状态成功或者完成 - if (trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_SUCCESS) || - trade_status.equals(PayConstant.AlipayConstant.TRADE_STATUS_FINISHED)) { - int updatePayOrderRows; - payOrder = (PayOrder)payContext.get("payOrder"); - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - updatePayOrderRows = payOrderService.updateStatus4Success(payOrder.getPayOrderId()); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_FAIL); - return PayConstant.RETURN_ALIPAY_VALUE_FAIL; - } - _log.info("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - } - }else{ - // 其他状态 - _log.info("{}支付状态trade_status={},不做业务处理", logPrefix, trade_status); - _log.info("{}响应给支付宝结果:{}", logPrefix, PayConstant.RETURN_ALIPAY_VALUE_SUCCESS); - return PayConstant.RETURN_ALIPAY_VALUE_SUCCESS; - } - doNotify(payOrder); - _log.info("====== 完成接收支付宝支付回调通知 ======"); - return PayConstant.RETURN_ALIPAY_VALUE_SUCCESS; - } - - /** - * 验证支付宝支付通知参数 - * @return - */ - public boolean verifyAliPayParams(Map payContext) { - Map params = (Map)payContext.get("parameters"); - String out_trade_no = params.get("out_trade_no"); // 商户订单号 - String total_amount = params.get("total_amount"); // 支付金额 - if (StringUtils.isEmpty(out_trade_no)) { - _log.error("AliPay Notify parameter out_trade_no is empty. out_trade_no={}", out_trade_no); - payContext.put("retMsg", "out_trade_no is empty"); - return false; - } - if (StringUtils.isEmpty(total_amount)) { - _log.error("AliPay Notify parameter total_amount is empty. total_fee={}", total_amount); - payContext.put("retMsg", "total_amount is empty"); - return false; - } - String errorMessage; - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = payOrderService.selectPayOrder(payOrderId); - if (payOrder == null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - boolean verify_result = false; - try { - verify_result = AlipaySignature.rsaCheckV1(params, alipayConfig.init(payChannel.getParam()).getAlipay_public_key(), AlipayConfig.CHARSET, "RSA2"); - } catch (AlipayApiException e) { - _log.error(e, "AlipaySignature.rsaCheckV1 error"); - } - - // 验证签名 - if (!verify_result) { - errorMessage = "rsaCheckV1 failed."; - _log.error("AliPay Notify parameter {}", errorMessage); - payContext.put("retMsg", errorMessage); - return false; - } - - // 核对金额 - long aliPayAmt = new BigDecimal(total_amount).movePointRight(2).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != aliPayAmt) { - _log.error("db payOrder record payPrice not equals total_amount. total_amount={},payOrderId={}", total_amount, payOrderId); - payContext.put("retMsg", ""); - return false; - } - payContext.put("payOrder", payOrder); - return true; - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4BasePay.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4BasePay.java deleted file mode 100644 index 4aece5e85e241c1f17e3226bae2aebcf8bdc3846..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4BasePay.java +++ /dev/null @@ -1,127 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSONObject; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.service.mq.Mq4PayNotify; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.service.MchInfoService; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付通知处理基类 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Notify4BasePay { - - private static final MyLog _log = MyLog.getLog(Notify4BasePay.class); - - @Autowired - private Mq4PayNotify mq4PayNotify; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 创建响应URL - * @param payOrder - * @param backType 1:前台页面;2:后台接口 - * @return - */ - public String createNotifyUrl(PayOrder payOrder, String backType) { - String mchId = payOrder.getMchId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo.getResKey(); - Map paramMap = new HashMap<>(); - paramMap.put("payOrderId", payOrder.getPayOrderId() == null ? "" : payOrder.getPayOrderId()); // 支付订单号 - paramMap.put("mchId", payOrder.getMchId() == null ? "" : payOrder.getMchId()); // 商户ID - paramMap.put("mchOrderNo", payOrder.getMchOrderNo() == null ? "" : payOrder.getMchOrderNo()); // 商户订单号 - paramMap.put("channelId", payOrder.getChannelId() == null ? "" : payOrder.getChannelId()); // 渠道ID - paramMap.put("amount", payOrder.getAmount() == null ? "" : payOrder.getAmount()); // 支付金额 - paramMap.put("currency", payOrder.getCurrency() == null ? "" : payOrder.getCurrency()); // 货币类型 - paramMap.put("status", payOrder.getStatus() == null ? "" : payOrder.getStatus()); // 支付状态 - paramMap.put("clientIp", payOrder.getClientIp()==null ? "" : payOrder.getClientIp()); // 客户端IP - paramMap.put("device", payOrder.getDevice()==null ? "" : payOrder.getDevice()); // 设备 - paramMap.put("subject", payOrder.getSubject()==null ? "" : payOrder.getSubject()); // 商品标题 - paramMap.put("channelOrderNo", payOrder.getChannelOrderNo()==null ? "" : payOrder.getChannelOrderNo()); // 渠道订单号 - paramMap.put("param1", payOrder.getParam1()==null ? "" : payOrder.getParam1()); // 扩展参数1 - paramMap.put("param2", payOrder.getParam2()==null ? "" : payOrder.getParam2()); // 扩展参数2 - paramMap.put("paySuccTime", payOrder.getPaySuccTime()==null ? "" : payOrder.getPaySuccTime()); // 支付成功时间 - paramMap.put("backType", backType==null ? "" : backType); - // 先对原文签名 - String reqSign = PayDigestUtil.getSign(paramMap, resKey); - paramMap.put("sign", reqSign); // 签名 - // 签名后再对有中文参数编码 - try { - paramMap.put("device", URLEncoder.encode(payOrder.getDevice()==null ? "" : payOrder.getDevice(), PayConstant.RESP_UTF8)); - paramMap.put("subject", URLEncoder.encode(payOrder.getSubject()==null ? "" : payOrder.getSubject(), PayConstant.RESP_UTF8)); - paramMap.put("param1", URLEncoder.encode(payOrder.getParam1()==null ? "" : payOrder.getParam1(), PayConstant.RESP_UTF8)); - paramMap.put("param2", URLEncoder.encode(payOrder.getParam2()==null ? "" : payOrder.getParam2(), PayConstant.RESP_UTF8)); - }catch (UnsupportedEncodingException e) { - _log.error("URL Encode exception.", e); - return null; - } - String param = XXPayUtil.genUrlParams(paramMap); - StringBuffer sb = new StringBuffer(); - sb.append(payOrder.getNotifyUrl()).append("?").append(param); - return sb.toString(); - } - - /** - * 处理支付结果前台页面跳转 - */ - public boolean doPage(PayOrder payOrder, HttpServletResponse response) { - String redirectUrl = createNotifyUrl(payOrder, "1"); - _log.info("redirect to respUrl:"+redirectUrl); - // 前台跳转业务系统 - try { - response.sendRedirect(redirectUrl); - } catch (IOException e) { - _log.error("XxPay sendRedirect exception. respUrl="+redirectUrl, e); - return false; - } - return true; - } - - /** - * 处理支付结果后台服务器通知 - */ - public void doNotify(PayOrder payOrder) { - _log.info(">>>>>> PAY开始回调通知业务系统 <<<<<<"); - // 发起后台通知业务系统 - JSONObject object = createNotifyInfo(payOrder); - try { - mq4PayNotify.send(object.toJSONString()); - } catch (Exception e) { - _log.error("payOrderId={},sendMessage error.", payOrder != null ? payOrder.getPayOrderId() : "", e); - } - _log.info(">>>>>> PAY回调通知业务系统完成 <<<<<<"); - } - - public JSONObject createNotifyInfo(PayOrder payOrder) { - JSONObject object = new JSONObject(); - object.put("method", "GET"); - object.put("url", createNotifyUrl(payOrder, "2")); - object.put("orderId", payOrder.getPayOrderId()); - object.put("count", payOrder.getNotifyCount()); - object.put("createTime", System.currentTimeMillis()); - return object; - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4WxPayController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4WxPayController.java deleted file mode 100644 index 978dd6eef6edcb16f5de421b8e062986bc18f149..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/Notify4WxPayController.java +++ /dev/null @@ -1,159 +0,0 @@ -package org.xxpay.service.controller; - -import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse; -import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import org.apache.commons.io.IOUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.channel.wechat.WxPayUtil; -import org.xxpay.service.service.PayChannelService; -import org.xxpay.service.service.PayOrderService; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 接收处理微信通知 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class Notify4WxPayController extends Notify4BasePay { - - private static final MyLog _log = MyLog.getLog(Notify4WxPayController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - /** - * 微信支付(统一下单接口)后台通知响应 - * @param request - * @param response - * @return - * @throws ServletException - * @throws IOException - */ - @RequestMapping("/pay/wxPayNotifyRes.htm") - @ResponseBody - public String wxPayNotifyRes(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - return doWxPayRes(request, response); - } - - public String doWxPayRes(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - String logPrefix = "【微信支付回调通知】"; - _log.info("====== 开始接收微信支付回调通知 ======"); - try { - String xmlResult = IOUtils.toString(request.getInputStream(), request.getCharacterEncoding()); - WxPayService wxPayService = new WxPayServiceImpl(); - WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlResult); - Map payContext = new HashMap(); - payContext.put("parameters", result); - // 验证业务数据是否正确,验证通过后返回PayOrder和WxPayConfig对象 - if(!verifyWxPayParams(payContext)) { - return WxPayNotifyResponse.fail((String) payContext.get("retMsg")); - } - PayOrder payOrder = (PayOrder) payContext.get("payOrder"); - WxPayConfig wxPayConfig = (WxPayConfig) payContext.get("wxPayConfig"); - wxPayService.setConfig(wxPayConfig); - // 这里做了签名校验(这里又做了一次xml转换对象,可以考虑优化) - wxPayService.parseOrderNotifyResult(xmlResult); - // 处理订单 - byte payStatus = payOrder.getStatus(); // 0:订单生成,1:支付中,-1:支付失败,2:支付成功,3:业务处理完成,-2:订单过期 - if (payStatus != PayConstant.PAY_STATUS_SUCCESS && payStatus != PayConstant.PAY_STATUS_COMPLETE) { - int updatePayOrderRows = payOrderService.updateStatus4Success(payOrder.getPayOrderId()); - if (updatePayOrderRows != 1) { - _log.error("{}更新支付状态失败,将payOrderId={},更新payStatus={}失败", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - return WxPayNotifyResponse.fail("处理订单失败"); - } - _log.error("{}更新支付状态成功,将payOrderId={},更新payStatus={}成功", logPrefix, payOrder.getPayOrderId(), PayConstant.PAY_STATUS_SUCCESS); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - } - // 业务系统后端通知 - doNotify(payOrder); - _log.info("====== 完成接收微信支付回调通知 ======"); - return WxPayNotifyResponse.success("处理成功"); - } catch (WxPayException e) { - //出现业务错误 - _log.error(e, "微信回调结果异常,异常原因"); - _log.info("{}请求数据result_code=FAIL", logPrefix); - _log.info("err_code:", e.getErrCode()); - _log.info("err_code_des:", e.getErrCodeDes()); - return WxPayNotifyResponse.fail(e.getMessage()); - } catch (Exception e) { - _log.error(e, "微信回调结果异常,异常原因"); - return WxPayNotifyResponse.fail(e.getMessage()); - } - } - - /** - * 验证微信支付通知参数 - * @return - */ - public boolean verifyWxPayParams(Map payContext) { - WxPayOrderNotifyResult params = (WxPayOrderNotifyResult)payContext.get("parameters"); - - //校验结果是否成功 - if (!PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getResultCode()) - && !PayConstant.RETURN_VALUE_SUCCESS.equalsIgnoreCase(params.getReturnCode())) { - _log.error("returnCode={},resultCode={},errCode={},errCodeDes={}", params.getReturnCode(), params.getResultCode(), params.getErrCode(), params.getErrCodeDes()); - payContext.put("retMsg", "notify data failed"); - return false; - } - - Integer total_fee = params.getTotalFee(); // 总金额 - String out_trade_no = params.getOutTradeNo(); // 商户系统订单号 - - // 查询payOrder记录 - String payOrderId = out_trade_no; - PayOrder payOrder = payOrderService.selectPayOrder(payOrderId); - if (payOrder==null) { - _log.error("Can't found payOrder form db. payOrderId={}, ", payOrderId); - payContext.put("retMsg", "Can't found payOrder"); - return false; - } - - // 查询payChannel记录 - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - if(payChannel == null) { - _log.error("Can't found payChannel form db. mchId={} channelId={}, ", payOrderId, mchId, channelId); - payContext.put("retMsg", "Can't found payChannel"); - return false; - } - payContext.put("wxPayConfig", WxPayUtil.getWxPayConfig(payChannel.getParam())); - - // 核对金额 - long wxPayAmt = new BigDecimal(total_fee).longValue(); - long dbPayAmt = payOrder.getAmount().longValue(); - if (dbPayAmt != wxPayAmt) { - _log.error("db payOrder record payPrice not equals total_fee. total_fee={},payOrderId={}", total_fee, payOrderId); - payContext.put("retMsg", "total_fee is not the same"); - return false; - } - - payContext.put("payOrder", payOrder); - return true; - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4AlipayController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4AlipayController.java deleted file mode 100644 index 9a07aa35c1bf556e296d2bf6942f6ce20394c85a..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4AlipayController.java +++ /dev/null @@ -1,300 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.alipay.api.AlipayApiException; -import com.alipay.api.AlipayClient; -import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.domain.AlipayTradeAppPayModel; -import com.alipay.api.domain.AlipayTradePagePayModel; -import com.alipay.api.domain.AlipayTradePrecreateModel; -import com.alipay.api.domain.AlipayTradeWapPayModel; -import com.alipay.api.request.AlipayTradeAppPayRequest; -import com.alipay.api.request.AlipayTradePagePayRequest; -import com.alipay.api.request.AlipayTradePrecreateRequest; -import com.alipay.api.request.AlipayTradeWapPayRequest; -import org.apache.commons.lang.ObjectUtils; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.constant.PayEnum; -import org.xxpay.common.util.AmountUtil; -import org.xxpay.common.util.MyBase64; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.channel.alipay.AlipayConfig; -import org.xxpay.service.service.MchInfoService; -import org.xxpay.service.service.PayChannelService; -import org.xxpay.service.service.PayOrderService; - -import java.util.Map; - -/** - * @Description: 支付渠道接口:支付宝 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayChannel4AlipayController { - - private final MyLog _log = MyLog.getLog(PayChannel4AlipayController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private AlipayConfig alipayConfig; - - @Autowired - private MchInfoService mchInfoService; - - /** - * 支付宝手机网站支付 - * 文档:https://docs.open.alipay.com/203/107090/ - * @param jsonParam - * @return - */ - @RequestMapping(value = "/pay/channel/ali_wap") - public String doAliPayWapReq(@RequestParam String jsonParam) { - String logPrefix = "【支付宝WAP支付下单】"; - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - PayOrder payOrder = paramObj.getObject("payOrder", PayOrder.class); - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo == null ? "" : mchInfo.getResKey(); - if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeWapPayRequest alipay_request = new AlipayTradeWapPayRequest(); - // 封装请求支付信息 - AlipayTradeWapPayModel model=new AlipayTradeWapPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_WAP_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("quit_url"))) { - model.setQuitUrl(objParamsJson.getString("quit_url")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - payOrderService.updateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return XXPayUtil.makeRetData(map, resKey); - } - - /** - * 支付宝电脑网站支付 - * 文档:https://docs.open.alipay.com/270/105899/ - * @param jsonParam - * @return - */ - @RequestMapping(value = "/pay/channel/ali_pc") - public String doAliPayPcReq(@RequestParam String jsonParam) { - String logPrefix = "【支付宝PC支付下单】"; - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - PayOrder payOrder = paramObj.getObject("payOrder", PayOrder.class); - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo == null ? "" : mchInfo.getResKey(); - if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePagePayRequest alipay_request = new AlipayTradePagePayRequest(); - // 封装请求支付信息 - AlipayTradePagePayModel model=new AlipayTradePagePayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("FAST_INSTANT_TRADE_PAY"); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - String qr_pay_mode = "2"; - String qrcode_width = "200"; - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - qr_pay_mode = ObjectUtils.toString(objParamsJson.getString("qr_pay_mode"), "2"); - qrcode_width = ObjectUtils.toString(objParamsJson.getString("qrcode_width"), "200"); - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - model.setQrPayMode(qr_pay_mode); - model.setQrcodeWidth(Long.parseLong(qrcode_width)); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.pageExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - payOrderService.updateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return XXPayUtil.makeRetData(map, resKey); - } - - /** - * 支付宝APP支付,生产签名及请求支付宝的参数(注:不会向支付宝发请求) - * 文档: https://docs.open.alipay.com/204/105465/ - * @param jsonParam - * @return - */ - @RequestMapping(value = "/pay/channel/ali_mobile") - public String doAliPayMobileReq(@RequestParam String jsonParam) { - String logPrefix = "【支付宝APP支付下单】"; - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - PayOrder payOrder = paramObj.getObject("payOrder", PayOrder.class); - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo == null ? "" : mchInfo.getResKey(); - if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradeAppPayRequest alipay_request = new AlipayTradeAppPayRequest(); - // 封装请求支付信息 - AlipayTradeAppPayModel model=new AlipayTradeAppPayModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - model.setProductCode("QUICK_MSECURITY_PAY"); - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payParams = null; - try { - payParams = client.sdkExecute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - payOrderService.updateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,payParams={}", logPrefix, payParams); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payParams", payParams); - return XXPayUtil.makeRetData(map, resKey); - } - - /** - * 支付宝当面付之扫码支付 - * 文档:https://docs.open.alipay.com/api_1/alipay.trade.precreate - * @param jsonParam - * @return - */ - @RequestMapping(value = "/pay/channel/ali_qr") - public String doAliPayQrReq(@RequestParam String jsonParam) { - String logPrefix = "【支付宝当面付之扫码支付下单】"; - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - PayOrder payOrder = paramObj.getObject("payOrder", PayOrder.class); - String payOrderId = payOrder.getPayOrderId(); - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo == null ? "" : mchInfo.getResKey(); - if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - alipayConfig.init(payChannel.getParam()); - AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(), alipayConfig.getApp_id(), alipayConfig.getRsa_private_key(), AlipayConfig.FORMAT, AlipayConfig.CHARSET, alipayConfig.getAlipay_public_key(), AlipayConfig.SIGNTYPE); - AlipayTradePrecreateRequest alipay_request = new AlipayTradePrecreateRequest(); - // 封装请求支付信息 - AlipayTradePrecreateModel model=new AlipayTradePrecreateModel(); - model.setOutTradeNo(payOrderId); - model.setSubject(payOrder.getSubject()); - model.setTotalAmount(AmountUtil.convertCent2Dollar(payOrder.getAmount().toString())); - model.setBody(payOrder.getBody()); - // 获取objParams参数 - String objParams = payOrder.getExtra(); - if (StringUtils.isNotEmpty(objParams)) { - try { - JSONObject objParamsJson = JSON.parseObject(objParams); - if(StringUtils.isNotBlank(objParamsJson.getString("discountable_amount"))) { - //可打折金额 - model.setDiscountableAmount(objParamsJson.getString("discountable_amount")); - } - if(StringUtils.isNotBlank(objParamsJson.getString("undiscountable_amount"))) { - //不可打折金额 - model.setUndiscountableAmount(objParamsJson.getString("undiscountable_amount")); - } - } catch (Exception e) { - _log.error("{}objParams参数格式错误!", logPrefix); - } - } - alipay_request.setBizModel(model); - // 设置异步通知地址 - alipay_request.setNotifyUrl(alipayConfig.getNotify_url()); - // 设置同步地址 - alipay_request.setReturnUrl(alipayConfig.getReturn_url()); - String payUrl = null; - try { - payUrl = client.execute(alipay_request).getBody(); - } catch (AlipayApiException e) { - e.printStackTrace(); - } - _log.info("{}生成跳转路径:payUrl={}", logPrefix, payUrl); - payOrderService.updateStatus4Ing(payOrderId, null); - _log.info("{}生成请求支付宝数据,req={}", logPrefix, alipay_request.getBizModel()); - _log.info("###### 商户统一下单处理完成 ######"); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("payUrl", payUrl); - return XXPayUtil.makeRetData(map, resKey); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4WxController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4WxController.java deleted file mode 100644 index 640c0b3c98ad06ef4465e29c4a98308ea35ab2e0..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannel4WxController.java +++ /dev/null @@ -1,207 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; -import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult; -import com.github.binarywang.wxpay.config.WxPayConfig; -import com.github.binarywang.wxpay.constant.WxPayConstants; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; -import com.github.binarywang.wxpay.util.SignUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.constant.PayEnum; -import org.xxpay.common.util.MyBase64; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.dal.dao.model.MchInfo; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.channel.wechat.WxPayProperties; -import org.xxpay.service.channel.wechat.WxPayUtil; -import org.xxpay.service.service.MchInfoService; -import org.xxpay.service.service.PayChannelService; -import org.xxpay.service.service.PayOrderService; - -import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; - -/** - * @Description: 支付渠道接口:微信 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayChannel4WxController{ - - private final MyLog _log = MyLog.getLog(PayChannel4WxController.class); - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private PayChannelService payChannelService; - - @Autowired - private MchInfoService mchInfoService; - - @Resource - private WxPayProperties wxPayProperties; - - /** - * 发起微信支付(统一下单) - * @param - * @return - */ - @RequestMapping(value = "/pay/channel/wx") - public String doWxPayReq(@RequestParam String jsonParam) { - try{ - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - PayOrder payOrder = paramObj.getObject("payOrder", PayOrder.class); - String tradeType = paramObj.getString("tradeType"); - String logPrefix = "【微信支付统一下单】"; - String mchId = payOrder.getMchId(); - String channelId = payOrder.getChannelId(); - MchInfo mchInfo = mchInfoService.selectMchInfo(mchId); - String resKey = mchInfo == null ? "" : mchInfo.getResKey(); - if("".equals(resKey)) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - WxPayConfig wxPayConfig = WxPayUtil.getWxPayConfig(payChannel.getParam(), tradeType, wxPayProperties.getCertRootPath(), wxPayProperties.getNotifyUrl()); - WxPayService wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(wxPayConfig); - WxPayUnifiedOrderRequest wxPayUnifiedOrderRequest = buildUnifiedOrderRequest(payOrder, wxPayConfig); - String payOrderId = payOrder.getPayOrderId(); - WxPayUnifiedOrderResult wxPayUnifiedOrderResult; - try { - wxPayUnifiedOrderResult = wxPayService.unifiedOrder(wxPayUnifiedOrderRequest); - _log.info("{} >>> 下单成功", logPrefix); - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("payOrderId", payOrderId); - map.put("prepayId", wxPayUnifiedOrderResult.getPrepayId()); - int result = payOrderService.updateStatus4Ing(payOrderId, wxPayUnifiedOrderResult.getPrepayId()); - _log.info("更新第三方支付订单号:payOrderId={},prepayId={},result={}", payOrderId, wxPayUnifiedOrderResult.getPrepayId(), result); - switch (tradeType) { - case PayConstant.WxConstant.TRADE_TYPE_NATIVE : { - map.put("codeUrl", wxPayUnifiedOrderResult.getCodeURL()); // 二维码支付链接 - break; - } - case PayConstant.WxConstant.TRADE_TYPE_APP : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - // APP支付绑定的是微信开放平台上的账号,APPID为开放平台上绑定APP后发放的参数 - String appId = wxPayConfig.getAppId(); - Map configMap = new HashMap<>(); - // 此map用于参与调起sdk支付的二次签名,格式全小写,timestamp只能是10位,格式固定,切勿修改 - String partnerId = wxPayConfig.getMchId(); - configMap.put("prepayid", wxPayUnifiedOrderResult.getPrepayId()); - configMap.put("partnerid", partnerId); - String packageValue = "Sign=WXPay"; - configMap.put("package", packageValue); - configMap.put("timestamp", timestamp); - configMap.put("noncestr", nonceStr); - configMap.put("appid", appId); - // 此map用于客户端与微信服务器交互 - payInfo.put("sign", SignUtils.createSign(configMap, wxPayConfig.getMchKey(), null)); - payInfo.put("prepayId", wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("partnerId", partnerId); - payInfo.put("appId", appId); - payInfo.put("packageValue", packageValue); - payInfo.put("timeStamp", timestamp); - payInfo.put("nonceStr", nonceStr); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_JSPAI : { - Map payInfo = new HashMap<>(); - String timestamp = String.valueOf(System.currentTimeMillis() / 1000); - String nonceStr = String.valueOf(System.currentTimeMillis()); - payInfo.put("appId", wxPayUnifiedOrderResult.getAppid()); - // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符 - payInfo.put("timeStamp", timestamp); - payInfo.put("nonceStr", nonceStr); - payInfo.put("package", "prepay_id=" + wxPayUnifiedOrderResult.getPrepayId()); - payInfo.put("signType", WxPayConstants.SignType.MD5); - payInfo.put("paySign", SignUtils.createSign(payInfo, wxPayConfig.getMchKey(), null)); - map.put("payParams", payInfo); - break; - } - case PayConstant.WxConstant.TRADE_TYPE_MWEB : { - map.put("payUrl", wxPayUnifiedOrderResult.getMwebUrl()); // h5支付链接地址 - break; - } - } - return XXPayUtil.makeRetData(map, resKey); - } catch (WxPayException e) { - _log.error(e, "下单失败"); - //出现业务错误 - _log.info("{}下单返回失败", logPrefix); - _log.info("err_code:{}", e.getErrCode()); - _log.info("err_code_des:{}", e.getErrCodeDes()); - return XXPayUtil.makeRetData(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_FAIL, "0111", "调用微信支付失败," + e.getErrCode() + ":" + e.getErrCodeDes()), resKey); - } - }catch (Exception e) { - _log.error(e, "微信支付统一下单异常"); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "", PayConstant.RETURN_VALUE_FAIL, PayEnum.ERR_0001)); - } - } - - /** - * 构建微信统一下单请求数据 - * @param payOrder - * @param wxPayConfig - * @return - */ - WxPayUnifiedOrderRequest buildUnifiedOrderRequest(PayOrder payOrder, WxPayConfig wxPayConfig) { - String tradeType = wxPayConfig.getTradeType(); - String payOrderId = payOrder.getPayOrderId(); - Integer totalFee = payOrder.getAmount().intValue();// 支付金额,单位分 - String deviceInfo = payOrder.getDevice(); - String body = payOrder.getBody(); - String detail = null; - String attach = null; - String outTradeNo = payOrderId; - String feeType = "CNY"; - String spBillCreateIP = payOrder.getClientIp(); - String timeStart = null; - String timeExpire = null; - String goodsTag = null; - String notifyUrl = wxPayConfig.getNotifyUrl(); - String productId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_NATIVE)) productId = JSON.parseObject(payOrder.getExtra()).getString("productId"); - String limitPay = null; - String openId = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_JSPAI)) openId = JSON.parseObject(payOrder.getExtra()).getString("openId"); - String sceneInfo = null; - if(tradeType.equals(PayConstant.WxConstant.TRADE_TYPE_MWEB)) sceneInfo = JSON.parseObject(payOrder.getExtra()).getString("sceneInfo"); - // 微信统一下单请求对象 - WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest(); - request.setDeviceInfo(deviceInfo); - request.setBody(body); - request.setDetail(detail); - request.setAttach(attach); - request.setOutTradeNo(outTradeNo); - request.setFeeType(feeType); - request.setTotalFee(totalFee); - request.setSpbillCreateIp(spBillCreateIP); - request.setTimeStart(timeStart); - request.setTimeExpire(timeExpire); - request.setGoodsTag(goodsTag); - request.setNotifyURL(notifyUrl); - request.setTradeType(tradeType); - request.setProductId(productId); - request.setLimitPay(limitPay); - request.setOpenid(openId); - request.setSceneInfo(sceneInfo); - - return request; - } -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannelServiceController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannelServiceController.java deleted file mode 100644 index ec6078835ffda0763576183646a22a89f77a58cf..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayChannelServiceController.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.util.MyBase64; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.service.service.PayChannelService; - -/** - * @Description: 支付渠道接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayChannelServiceController { - - private final MyLog _log = MyLog.getLog(PayChannelServiceController.class); - - @Autowired - private PayChannelService payChannelService; - - @RequestMapping(value = "/pay_channel/select") - public String selectPayChannel(@RequestParam String jsonParam) { - // TODO 参数校验 - _log.info("selectPayChannel << {}", jsonParam); - JSONObject retObj = new JSONObject(); - retObj.put("code", "0000"); - if(StringUtils.isBlank(jsonParam)) { - retObj.put("code", "0001"); // 参数错误 - retObj.put("msg", "缺少参数"); - return retObj.toJSONString(); - } - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - String channelId = paramObj.getString("channelId"); - String mchId = paramObj.getString("mchId"); - PayChannel payChannel = payChannelService.selectPayChannel(channelId, mchId); - if(payChannel == null) { - retObj.put("code", "0002"); - retObj.put("msg", "数据对象不存在"); - return retObj.toJSONString(); - } - retObj.put("result", JSON.toJSON(payChannel)); - _log.info("selectPayChannel >> {}", retObj); - return retObj.toJSONString(); - } - - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayOrderServiceController.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayOrderServiceController.java deleted file mode 100644 index 2e323697c03f0a85831a102962bfb91de3bc0c72..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/controller/PayOrderServiceController.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.xxpay.service.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyBase64; -import org.xxpay.common.util.MyLog; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.service.service.PayOrderService; - -/** - * @Description: 支付订单接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayOrderServiceController extends Notify4BasePay { - - private final MyLog _log = MyLog.getLog(PayOrderServiceController.class); - - @Autowired - private PayOrderService payOrderService; - - @RequestMapping(value = "/pay/create") - public String createPayOrder(@RequestParam String jsonParam) { - _log.info("接收创建支付订单请求,jsonParam={}", jsonParam); - JSONObject retObj = new JSONObject(); - retObj.put("code", "0000"); - if(StringUtils.isBlank(jsonParam)) { - retObj.put("code", "0001"); - retObj.put("msg", "缺少参数"); - return retObj.toJSONString(); - } - try { - PayOrder payOrder = JSON.parseObject(new String(MyBase64.decode(jsonParam)), PayOrder.class); - int result = payOrderService.createPayOrder(payOrder); - retObj.put("result", result); - }catch (Exception e) { - retObj.put("code", "9999"); // 系统错误 - retObj.put("msg", "系统错误"); - } - return retObj.toJSONString(); - } - - @RequestMapping(value = "/pay/query") - public String queryPayOrder(@RequestParam String jsonParam) { - _log.info("selectPayOrder << {}", jsonParam); - JSONObject retObj = new JSONObject(); - retObj.put("code", "0000"); - if(StringUtils.isBlank(jsonParam)) { - retObj.put("code", "0001"); // 参数错误 - retObj.put("msg", "缺少参数"); - return retObj.toJSONString(); - } - JSONObject paramObj = JSON.parseObject(new String(MyBase64.decode(jsonParam))); - String mchId = paramObj.getString("mchId"); - String payOrderId = paramObj.getString("payOrderId"); - String mchOrderNo = paramObj.getString("mchOrderNo"); - PayOrder payOrder; - if(StringUtils.isNotBlank(payOrderId)) { - payOrder = payOrderService.selectPayOrderByMchIdAndPayOrderId(mchId, payOrderId); - }else { - payOrder = payOrderService.selectPayOrderByMchIdAndMchOrderNo(mchId, mchOrderNo); - } - if(payOrder == null) { - retObj.put("code", "0002"); - retObj.put("msg", "支付订单不存在"); - return retObj.toJSONString(); - } - - // - boolean executeNotify = paramObj.getBooleanValue("executeNotify"); - // 如果选择回调且支付状态为支付成功,则回调业务系统 - if(executeNotify && payOrder.getStatus() == PayConstant.PAY_STATUS_SUCCESS) { - this.doNotify(payOrder); - } - retObj.put("result", JSON.toJSON(payOrder)); - _log.info("selectPayOrder >> {}", retObj); - return retObj.toJSONString(); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/Mq4PayNotify.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/Mq4PayNotify.java deleted file mode 100644 index 606f116ae306f9a0a5264956a70c8481aa238122..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/Mq4PayNotify.java +++ /dev/null @@ -1,194 +0,0 @@ -package org.xxpay.service.mq; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.activemq.ScheduledMessage; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jms.annotation.JmsListener; -import org.springframework.jms.core.JmsTemplate; -import org.springframework.jms.core.MessageCreator; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; -import org.xxpay.common.util.MyLog; -import org.xxpay.service.service.PayOrderService; - -import javax.jms.*; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.net.HttpURLConnection; -import java.net.URL; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * @Description: 业务通知MQ实现 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class Mq4PayNotify { - - @Autowired - private Queue payNotifyQueue; - - @Autowired - private PayOrderService payOrderService; - - @Autowired - private JmsTemplate jmsTemplate; - - private static final MyLog _log = MyLog.getLog(Mq4PayNotify.class); - - public void send(String msg) { - _log.info("发送MQ消息:msg={}", msg); - this.jmsTemplate.convertAndSend(this.payNotifyQueue, msg); - } - - /** - * 发送延迟消息 - * @param msg - * @param delay - */ - public void send(String msg, long delay) { - _log.info("发送MQ延时消息:msg={},delay={}", msg, delay); - jmsTemplate.send(this.payNotifyQueue, new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - TextMessage tm = session.createTextMessage(msg); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_DELAY, delay); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_PERIOD, 1*1000); - tm.setLongProperty(ScheduledMessage.AMQ_SCHEDULED_REPEAT, 1); - return tm; - } - }); - } - - private static class TrustAnyTrustManager implements X509TrustManager { - - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - } - - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; - } - } - - @JmsListener(destination = MqConfig.PAY_NOTIFY_QUEUE_NAME) - public void receive(String msg) { - _log.info("do notify task, msg={}", msg); - JSONObject msgObj = JSON.parseObject(msg); - String respUrl = msgObj.getString("url"); - String orderId = msgObj.getString("orderId"); - int count = msgObj.getInteger("count"); - if(StringUtils.isEmpty(respUrl)) { - _log.warn("notify url is empty. respUrl={}", respUrl); - return; - } - try { - StringBuffer sb = new StringBuffer(); - URL console = new URL(respUrl); - _log.info("==>MQ通知业务系统开始[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - if("https".equals(console.getProtocol())) { - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, new TrustManager[] { new TrustAnyTrustManager() }, - new java.security.SecureRandom()); - HttpsURLConnection con = (HttpsURLConnection) console.openConnection(); - con.setSSLSocketFactory(sc.getSocketFactory()); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(10 * 1000); - con.setReadTimeout(5 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else if("http".equals(console.getProtocol())) { - HttpURLConnection con = (HttpURLConnection) console.openConnection(); - con.setRequestMethod("POST"); - con.setDoInput(true); - con.setDoOutput(true); - con.setUseCaches(false); - con.setConnectTimeout(10 * 1000); - con.setReadTimeout(5 * 1000); - con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); - BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()), 1024*1024); - while (true) { - String line = in.readLine(); - if (line == null) { - break; - } - sb.append(line); - } - in.close(); - }else { - _log.error("not do protocol. protocol=%s", console.getProtocol()); - return; - } - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - // 验证结果 - _log.info("notify response , OrderID={}", orderId); - if(sb.toString().trim().equalsIgnoreCase("success")){ - //_log.info("{} notify success, url:{}", _notifyInfo.getBusiId(), respUrl); - //修改订单表 - try { - int result = payOrderService.updateStatus4Complete(orderId); - _log.info("修改payOrderId={},订单状态为处理完成->{}", orderId, result == 1 ? "成功" : "失败"); - } catch (Exception e) { - _log.error(e, "修改订单状态为处理完成异常"); - } - // 修改通知次数 - try { - int result = payOrderService.updateNotify(orderId, (byte) 1); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - return ; // 通知成功结束 - }else { - // 通知失败,延时再通知 - int cnt = count+1; - _log.info("notify count={}", cnt); - // 修改通知次数 - try { - int result = payOrderService.updateNotify(orderId, (byte) cnt); - _log.info("修改payOrderId={},通知业务系统次数->{}", orderId, result == 1 ? "成功" : "失败"); - }catch (Exception e) { - _log.error(e, "修改通知次数异常"); - } - - if (cnt > 5) { - _log.info("notify count>5 stop. url={}", respUrl); - return ; - } - msgObj.put("count", cnt); - this.send(msgObj.toJSONString(), cnt * 60 * 1000); - } - _log.warn("notify failed. url:{}, response body:{}", respUrl, sb.toString()); - } catch(Exception e) { - _log.info("<==MQ通知业务系统结束[orderId:{}][count:{}][time:{}]", orderId, count, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); - _log.error(e, "notify exception. url:%s", respUrl); - } - - } -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/MqConfig.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/MqConfig.java deleted file mode 100644 index 30fc756d9ae216bb99ebda945dc4b3fbc34602ce..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/mq/MqConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.xxpay.service.mq; - -import org.apache.activemq.command.ActiveMQQueue; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import javax.jms.Queue; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Configuration -public class MqConfig { - - public static final String PAY_NOTIFY_QUEUE_NAME = "pay.notify.queue"; - - @Bean - public Queue payNotifyQueue() { - return new ActiveMQQueue(PAY_NOTIFY_QUEUE_NAME); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/MchInfoService.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/MchInfoService.java deleted file mode 100644 index 133368ead47425e751fd906437145e27258353d8..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/MchInfoService.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.xxpay.service.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.xxpay.dal.dao.mapper.MchInfoMapper; -import org.xxpay.dal.dao.model.MchInfo; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class MchInfoService { - - @Autowired - private MchInfoMapper mchInfoMapper; - - public MchInfo selectMchInfo(String mchId) { - return mchInfoMapper.selectByPrimaryKey(mchId); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayChannelService.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayChannelService.java deleted file mode 100644 index c99e7d872d312e99789ba01cb77c3935ee553ed8..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayChannelService.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay.service.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.xxpay.dal.dao.mapper.PayChannelMapper; -import org.xxpay.dal.dao.model.PayChannel; -import org.xxpay.dal.dao.model.PayChannelExample; - -import java.util.List; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class PayChannelService { - - @Autowired - private PayChannelMapper payChannelMapper; - - public PayChannel selectPayChannel(String channelId, String mchId) { - PayChannelExample example = new PayChannelExample(); - PayChannelExample.Criteria criteria = example.createCriteria(); - criteria.andChannelIdEqualTo(channelId); - criteria.andMchIdEqualTo(mchId); - List payChannelList = payChannelMapper.selectByExample(example); - if(CollectionUtils.isEmpty(payChannelList)) return null; - return payChannelList.get(0); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayOrderService.java b/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayOrderService.java deleted file mode 100644 index 090ed8dbda0cd1cf544d06b0792b766434b680fb..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/java/org/xxpay/service/service/PayOrderService.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.xxpay.service.service; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.dal.dao.mapper.PayOrderMapper; -import org.xxpay.dal.dao.model.PayOrder; -import org.xxpay.dal.dao.model.PayOrderExample; - -import java.util.List; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Component -public class PayOrderService { - - @Autowired - private PayOrderMapper payOrderMapper; - - public int createPayOrder(PayOrder payOrder) { - return payOrderMapper.insertSelective(payOrder); - } - - public PayOrder selectPayOrder(String payOrderId) { - return payOrderMapper.selectByPrimaryKey(payOrderId); - } - - public PayOrder selectPayOrderByMchIdAndPayOrderId(String mchId, String payOrderId) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andPayOrderIdEqualTo(payOrderId); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public PayOrder selectPayOrderByMchIdAndMchOrderNo(String mchId, String mchOrderNo) { - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andMchIdEqualTo(mchId); - criteria.andMchOrderNoEqualTo(mchOrderNo); - List payOrderList = payOrderMapper.selectByExample(example); - return CollectionUtils.isEmpty(payOrderList) ? null : payOrderList.get(0); - } - - public int updateStatus4Ing(String payOrderId, String channelOrderNo) { - PayOrder payOrder = new PayOrder(); - payOrder.setStatus(PayConstant.PAY_STATUS_PAYING); - if(channelOrderNo != null) payOrder.setChannelOrderNo(channelOrderNo); - payOrder.setPaySuccTime(System.currentTimeMillis()); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_INIT); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int updateStatus4Success(String payOrderId) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_SUCCESS); - payOrder.setPaySuccTime(System.currentTimeMillis()); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_PAYING); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int updateStatus4Complete(String payOrderId) { - PayOrder payOrder = new PayOrder(); - payOrder.setPayOrderId(payOrderId); - payOrder.setStatus(PayConstant.PAY_STATUS_COMPLETE); - PayOrderExample example = new PayOrderExample(); - PayOrderExample.Criteria criteria = example.createCriteria(); - criteria.andPayOrderIdEqualTo(payOrderId); - criteria.andStatusEqualTo(PayConstant.PAY_STATUS_SUCCESS); - return payOrderMapper.updateByExampleSelective(payOrder, example); - } - - public int updateNotify(String payOrderId, byte count) { - PayOrder newPayOrder = new PayOrder(); - // TODO 并发下次数问题待解决 - newPayOrder.setNotifyCount(count); - newPayOrder.setLastNotifyTime(System.currentTimeMillis()); - newPayOrder.setPayOrderId(payOrderId); - return payOrderMapper.updateByPrimaryKeySelective(newPayOrder); - } - - public int updateNotify(PayOrder payOrder) { - return payOrderMapper.updateByPrimaryKeySelective(payOrder); - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/main/resources/bootstrap.yml b/xxpay4spring-cloud/xxpay-service/src/main/resources/bootstrap.yml deleted file mode 100755 index 613d32fd359807173b32850da0556b97419cf333..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,17 +0,0 @@ -spring: - application: - name: xxpay-service - cloud: - config: - discovery: - enabled: true # 默认false,设为true表示使用注册中心中的configserver配置而不自己配置configserver的uri - serviceId: xxpay-config # 指定config server在服务发现中的serviceId,默认为:configserver - profile: dev - fail-fast: true - password: xxpay - username: user - -eureka: - client: - serviceUrl: - defaultZone: http://localhost:2000/eureka/ \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar b/xxpay4spring-cloud/xxpay-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar deleted file mode 100755 index 6cc1c44ac982e57cb83296e0e2912120a0411131..0000000000000000000000000000000000000000 Binary files a/xxpay4spring-cloud/xxpay-service/src/main/webapp/WEB-INF/lib/alipay-sdk-java20170818173712.jar and /dev/null differ diff --git a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/ApplicationTests.java b/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/ApplicationTests.java deleted file mode 100644 index 6a725c71688f8b01b6d931c735d5747b8bba5d9e..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/ApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.xxpay.service.dal; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.test.web.servlet.MockMvc; - - -@RunWith(SpringJUnit4ClassRunner.class) -@WebAppConfiguration -public class ApplicationTests { - - private MockMvc mvc; - - @Before - /*public void setUp() throws Exception { - mvc = MockMvcBuilders.standaloneSetup(new ComputeController()).build(); - }*/ - - @Test - public void getHello() throws Exception { - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/MchInfoTest.java b/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/MchInfoTest.java deleted file mode 100644 index a3e3592a2d21cd8c6c7f0c1b0a0b56af9119e89a..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/MchInfoTest.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.xxpay.service.dal; - -import com.alibaba.fastjson.JSONObject; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.result.MockMvcResultHandlers; - - -@RunWith(SpringJUnit4ClassRunner.class) -@WebAppConfiguration -public class MchInfoTest { - - private MockMvc mockMvc; - - @Before - public void setUp() throws Exception { - /*MockitoAnnotations.initMocks(this); - - mockMvc = MockMvcBuilders.standaloneSetup( - new MgrController() - ).build();*/ - } - - @Test - public void addMchInfo() throws Exception { - - - JSONObject params = new JSONObject(); - params.put("mchId", "20001222"); - params.put("name", "骏易科技"); - params.put("type", "1"); - params.put("reqKey", "298332323231231313"); - params.put("resKey", "883435353534543534"); - - - - - MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/mch/add").param("params", params.toJSONString())) -// .andExpect(MockMvcResultMatchers.status().isOk()) -// .andExpect(MockMvcResultMatchers.model().attributeExists("user")) - .andDo(MockMvcResultHandlers.print()) - .andReturn(); - - } - -} diff --git a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/PayOrderTest.java b/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/PayOrderTest.java deleted file mode 100644 index 4c15b03494de2fa8ab28530e3ab59bde78d20309..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-service/src/test/java/org/xxpay/service/dal/PayOrderTest.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.xxpay.service.dal; - -import com.alibaba.fastjson.JSONObject; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.MvcResult; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.result.MockMvcResultHandlers; - - -@RunWith(SpringJUnit4ClassRunner.class) -@WebAppConfiguration -public class PayOrderTest { - - private MockMvc mockMvc; - - @Before - public void setUp() throws Exception { - /*MockitoAnnotations.initMocks(this); - - mockMvc = MockMvcBuilders.standaloneSetup( - new PayOrderController() - ).build();*/ - } - - @Test - public void payOrder() throws Exception { - -// mockMvc.perform(MockMvcRequestBuilders.post("/secured/resources/incoterms/create").accept(MediaType.APPLICATION_JSON).contentType(MediaType.APPLICATION_JSON) -// .content("{\"code\" : \"EXW\", \"description\" : \"code exw\", \"locationQualifier\" : \"DEPARTURE\"}".getBytes())) -// //.andDo(print()) -// .andExpect(status().isOk()) -// .andExpect(jsonPath("id.value").exists()) -// .andExpect(jsonPath("id.value").value("6305ff33-295e-11e5-ae37-54ee7534021a")) -// .andExpect(jsonPath("code").value("EXW")); - - //params={mchId:20001222,mchOrderNo:3132121212,channelId:"alipay-app",amount:100,currentcy:"cny",clientIp:"127.0.0.1",device:"app",notifyUrl:"www.baidu.com",sign:1111111} - - JSONObject params = new JSONObject(); - params.put("mchId", "20001222"); - params.put("mchOrderNo", "20001222"); - params.put("channelId", "20001222"); - params.put("amount", "20001222"); - params.put("currentcy", "20001222"); - params.put("clientIp", "20001222"); - params.put("device", "20001222"); - params.put("notifyUrl", "20001222"); - params.put("sign", "20001222"); - - - - - MvcResult result = mockMvc.perform(MockMvcRequestBuilders.post("/pay_order").param("params", params.toJSONString())) -// .andExpect(MockMvcResultMatchers.status().isOk()) -// .andExpect(MockMvcResultMatchers.model().attributeExists("user")) - .andDo(MockMvcResultHandlers.print()) - .andReturn(); - - } - -} diff --git a/xxpay4spring-cloud/xxpay-web/pom.xml b/xxpay4spring-cloud/xxpay-web/pom.xml deleted file mode 100644 index 37bc40050730fc78435004ead56caf07224800be..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/pom.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - 4.0.0 - - org.xxpay - xxpay-web - 1.0.0 - jar - xxpay-web - xxpay-web - - - org.xxpay - xxpay4spring-cloud - 1.0.0 - - - - - org.xxpay - xxpay-common - 1.0.0 - - - org.springframework.cloud - spring-cloud-starter-hystrix - - - org.springframework.cloud - spring-cloud-starter-ribbon - - - org.springframework.cloud - spring-cloud-starter-feign - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - ${project.name} - - - - com.spotify - docker-maven-plugin - - ${docker.url} - ${project.name}:${project.version} - ${project.basedir}/src/main/docker - false - - - / - ${project.build.directory} - ${project.artifactId}.jar - - - - - - - - \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/docker/Dockerfile b/xxpay4spring-cloud/xxpay-web/src/main/docker/Dockerfile deleted file mode 100644 index 86dd099be35de862a27908c5d2df33e14820165e..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM java:8 -VOLUME /tmp -RUN mkdir /app -ADD xxpay-web.jar /app/app.jar -ADD runboot.sh /app/ -RUN bash -c 'touch /app/app.jar' -WORKDIR /app -RUN chmod a+x runboot.sh -EXPOSE 3010 -CMD /app/runboot.sh \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/docker/runboot.sh b/xxpay4spring-cloud/xxpay-web/src/main/docker/runboot.sh deleted file mode 100644 index 7fc7fee65b4e606938a21be773d61f53455258e9..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/docker/runboot.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -sleep 120 -java -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/XxPayWebApplication.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/XxPayWebApplication.java deleted file mode 100644 index cebac4c8893fc57cd41436100eeca0d2868c51ed..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/XxPayWebApplication.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.xxpay; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.client.loadbalancer.LoadBalanced; -import org.springframework.cloud.netflix.feign.EnableFeignClients; -import org.springframework.context.annotation.Bean; -import org.springframework.web.client.RestTemplate; - -/** - * @Description: xxpay支付产品服务,提供各商户支付产品接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@SpringBootApplication -@EnableDiscoveryClient -@EnableFeignClients -@EnableCircuitBreaker -public class XxPayWebApplication { - - @Bean - @LoadBalanced - RestTemplate restTemplate() { - return new RestTemplate(); - } - - public static void main(String[] args) { - SpringApplication.run(XxPayWebApplication.class, args); - } - -} diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/PayOrderController.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/PayOrderController.java deleted file mode 100644 index 753c8e84f3be48e7c4013bcaf6e3933f5cc40732..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/PayOrderController.java +++ /dev/null @@ -1,299 +0,0 @@ -package org.xxpay.web.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.math.NumberUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.client.ServiceInstance; -import org.springframework.cloud.client.discovery.DiscoveryClient; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.MySeq; -import org.xxpay.common.util.PayDigestUtil; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.web.service.MchInfoServiceClient; -import org.xxpay.web.service.PayChannelServiceClient; -import org.xxpay.web.service.PayOrderServiceClient; - -import java.util.Map; - -/** - * @Description: 支付订单,包括:统一下单,订单查询,补单等接口 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class PayOrderController { - - private final MyLog _log = MyLog.getLog(PayOrderController.class); - - @Autowired - private DiscoveryClient client; - - @Autowired - private PayOrderServiceClient payOrderServiceClient; - - @Autowired - private MchInfoServiceClient mchInfoServiceClient; - - @Autowired - private PayChannelServiceClient payChannelServiceClient; - - /** - * 统一下单接口: - * 1)先验证接口参数以及签名信息 - * 2)验证通过创建支付订单 - * 3)根据商户选择渠道,调用支付服务进行下单 - * 4)返回下单数据 - * @param params - * @return - */ - @RequestMapping(value = "/pay/create_order") - public String payOrder(@RequestParam String params) { - _log.info("###### 开始接收商户统一下单请求 ######"); - String logPrefix = "【商户统一下单】"; - ServiceInstance instance = client.getLocalServiceInstance(); - _log.info("{}/pay/create_order, host:{}, service_id:{}, params:{}", logPrefix, instance.getHost(), instance.getServiceId(), params); - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject payOrder = null; - // 验证参数有效性 - Object object = validateParams(po); - if (object instanceof String) { - _log.info("{}参数校验不通过:{}", logPrefix, object); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, object.toString(), null, null)); - } - if (object instanceof JSONObject) payOrder = (JSONObject) object; - if(payOrder == null) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心下单失败", null, null)); - String result = payOrderServiceClient.createPayOrder(payOrder.toJSONString()); - _log.info("{}创建支付订单,结果:{}", logPrefix, result); - if(StringUtils.isEmpty(result)) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null)); - } - JSONObject resObj = JSON.parseObject(result); - if(resObj == null || !"1".equals(resObj.getString("result"))) return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "创建支付订单失败", null, null)); - String channelId = payOrder.getString("channelId"); - switch (channelId) { - case PayConstant.PAY_CHANNEL_WX_APP : - return payOrderServiceClient.doWxPayReq(getJsonParam(new String[]{"tradeType", "payOrder"}, new Object[]{PayConstant.WxConstant.TRADE_TYPE_APP, payOrder})); - case PayConstant.PAY_CHANNEL_WX_JSAPI : - return payOrderServiceClient.doWxPayReq(getJsonParam(new String[]{"tradeType", "payOrder"}, new Object[]{PayConstant.WxConstant.TRADE_TYPE_JSPAI, payOrder})); - case PayConstant.PAY_CHANNEL_WX_NATIVE : - return payOrderServiceClient.doWxPayReq(getJsonParam(new String[]{"tradeType", "payOrder"}, new Object[]{PayConstant.WxConstant.TRADE_TYPE_NATIVE, payOrder})); - case PayConstant.PAY_CHANNEL_WX_MWEB : - return payOrderServiceClient.doWxPayReq(getJsonParam(new String[]{"tradeType", "payOrder"}, new Object[]{PayConstant.WxConstant.TRADE_TYPE_MWEB, payOrder})); - case PayConstant.PAY_CHANNEL_ALIPAY_MOBILE : - return payOrderServiceClient.doAliPayMobileReq(getJsonParam("payOrder", payOrder)); - case PayConstant.PAY_CHANNEL_ALIPAY_PC : - return payOrderServiceClient.doAliPayPcReq(getJsonParam("payOrder", payOrder)); - case PayConstant.PAY_CHANNEL_ALIPAY_WAP : - return payOrderServiceClient.doAliPayWapReq(getJsonParam("payOrder", payOrder)); - case PayConstant.PAY_CHANNEL_ALIPAY_QR : - return payOrderServiceClient.doAliPayQrReq(getJsonParam("payOrder", payOrder)); - default: - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "不支持的支付渠道类型[channelId="+channelId+"]", null, null)); - } - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private Object validateParams(JSONObject params) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String channelId = params.getString("channelId"); // 渠道ID - String amount = params.getString("amount"); // 支付金额(单位分) - String currency = params.getString("currency"); // 币种 - String clientIp = params.getString("clientIp"); // 客户端IP - String device = params.getString("device"); // 设备 - String extra = params.getString("extra"); // 特定渠道发起时额外参数 - String param1 = params.getString("param1"); // 扩展参数1 - String param2 = params.getString("param2"); // 扩展参数2 - String notifyUrl = params.getString("notifyUrl"); // 支付结果回调URL - String sign = params.getString("sign"); // 签名 - String subject = params.getString("subject"); // 商品主题 - String body = params.getString("body"); // 商品描述信息 - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo)) { - errorMessage = "request params[mchOrderNo] error."; - return errorMessage; - } - if(StringUtils.isBlank(channelId)) { - errorMessage = "request params[channelId] error."; - return errorMessage; - } - if(!NumberUtils.isNumber(amount)) { - errorMessage = "request params[amount] error."; - return errorMessage; - } - if(StringUtils.isBlank(currency)) { - errorMessage = "request params[currency] error."; - return errorMessage; - } - if(StringUtils.isBlank(notifyUrl)) { - errorMessage = "request params[notifyUrl] error."; - return errorMessage; - } - if(StringUtils.isBlank(subject)) { - errorMessage = "request params[subject] error."; - return errorMessage; - } - if(StringUtils.isBlank(body)) { - errorMessage = "request params[body] error."; - return errorMessage; - } - // 根据不同渠道,判断extra参数 - if(PayConstant.PAY_CHANNEL_WX_JSAPI.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String openId = extraObject.getString("openId"); - if(StringUtils.isBlank(openId)) { - errorMessage = "request params[extra.openId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_NATIVE.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("productId"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.productId] error."; - return errorMessage; - } - }else if(PayConstant.PAY_CHANNEL_WX_MWEB.equalsIgnoreCase(channelId)) { - if(StringUtils.isEmpty(extra)) { - errorMessage = "request params[extra] error."; - return errorMessage; - } - JSONObject extraObject = JSON.parseObject(extra); - String productId = extraObject.getString("sceneInfo"); - if(StringUtils.isBlank(productId)) { - errorMessage = "request params[extra.sceneInfo] error."; - return errorMessage; - } - if(StringUtils.isBlank(clientIp)) { - errorMessage = "request params[clientIp] error."; - return errorMessage; - } - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo; - String retStr = mchInfoServiceClient.selectMchInfo(getJsonParam("mchId", mchId)); - - JSONObject retObj = JSON.parseObject(retStr); - if("0000".equals(retObj.getString("code"))) { - mchInfo = retObj.getJSONObject("result"); - if (mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - }else { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - _log.info("查询商户没有正常返回数据,code={},msg={}", retObj.getString("code"), retObj.getString("msg")); - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - - // 查询商户对应的支付渠道 - JSONObject payChannel; - retStr = payChannelServiceClient.selectPayChannel(getJsonParam(new String[]{"channelId", "mchId"}, new String[]{channelId, mchId})); - retObj = JSON.parseObject(retStr); - if("0000".equals(retObj.getString("code"))) { - payChannel = JSON.parseObject(retObj.getString("result")); - if(payChannel == null) { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - return errorMessage; - } - if(payChannel.getByte("state") != 1) { - errorMessage = "channel not available [channelId="+channelId+",mchId="+mchId+"]"; - return errorMessage; - } - }else { - errorMessage = "Can't found payChannel[channelId="+channelId+",mchId="+mchId+"] record in db."; - _log.info("查询渠道没有正常返回数据,code={},msg={}", retObj.getString("code"), retObj.getString("msg")); - return errorMessage; - } - - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - // 验证参数通过,返回JSONObject对象 - JSONObject payOrder = new JSONObject(); - payOrder.put("payOrderId", MySeq.getPay()); - payOrder.put("mchId", mchId); - payOrder.put("mchOrderNo", mchOrderNo); - payOrder.put("channelId", channelId); - payOrder.put("amount", Long.parseLong(amount)); - payOrder.put("currency", currency); - payOrder.put("clientIp", clientIp); - payOrder.put("device", device); - payOrder.put("subject", subject); - payOrder.put("body", body); - payOrder.put("extra", extra); - payOrder.put("channelMchId", payChannel.getString("channelMchId")); - payOrder.put("param1", param1); - payOrder.put("param2", param2); - payOrder.put("notifyUrl", notifyUrl); - return payOrder; - } - - String getJsonParam(String[] names, Object[] values) { - JSONObject jsonParam = new JSONObject(); - for (int i = 0; i < names.length; i++) { - jsonParam.put(names[i], values[i]); - } - return jsonParam.toJSONString(); - } - - String getJsonParam(String name, Object value) { - JSONObject jsonParam = new JSONObject(); - jsonParam.put(name, value); - return jsonParam.toJSONString(); - } - -} diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/QueryPayOrderController.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/QueryPayOrderController.java deleted file mode 100644 index 3dfa9cbed97fb33f6e6ecc34f43d6f72a75210c9..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/controller/QueryPayOrderController.java +++ /dev/null @@ -1,174 +0,0 @@ -package org.xxpay.web.controller; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.client.ServiceInstance; -import org.springframework.cloud.client.discovery.DiscoveryClient; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.xxpay.common.constant.PayConstant; -import org.xxpay.common.util.MyLog; -import org.xxpay.common.util.XXPayUtil; -import org.xxpay.web.service.MchInfoServiceClient; -import org.xxpay.web.service.PayOrderServiceClient; - -import java.util.Map; - -/** - * @Description: 支付订单查询 - * @author dingzhiwei jmdhappy@126.com - * @date 2017-08-31 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@RestController -public class QueryPayOrderController { - - private final MyLog _log = MyLog.getLog(QueryPayOrderController.class); - - @Autowired - private DiscoveryClient client; - - @Autowired - private PayOrderServiceClient payOrderServiceClient; - - @Autowired - private MchInfoServiceClient mchInfoServiceClient; - - /** - * 查询支付订单接口: - * 1)先验证接口参数以及签名信息 - * 2)根据参数查询订单 - * 3)返回订单数据 - * @param params - * @return - */ - @RequestMapping(value = "/pay/query_order") - public String queryPayOrder(@RequestParam String params) { - _log.info("###### 开始接收商户查询支付订单请求 ######"); - String logPrefix = "【商户支付订单查询】"; - ServiceInstance instance = client.getLocalServiceInstance(); - _log.info("{}/pay/query_order, host:{}, service_id:{}, params:{}", logPrefix, instance.getHost(), instance.getServiceId(), params); - try { - JSONObject po = JSONObject.parseObject(params); - JSONObject payContext = new JSONObject(); - // 验证参数有效性 - String errorMessage = validateParams(po, payContext); - if (!"success".equalsIgnoreCase(errorMessage)) { - _log.warn(errorMessage); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, errorMessage, null, null)); - } - _log.debug("请求参数及签名校验通过"); - String mchId = po.getString("mchId"); // 商户ID - String mchOrderNo = po.getString("mchOrderNo"); // 商户订单号 - String payOrderId = po.getString("payOrderId"); // 支付订单号 - String executeNotify = po.getString("executeNotify"); // 是否执行回调 - JSONObject payOrder; - String retStr = payOrderServiceClient.queryPayOrder(getJsonParam(new String[]{"mchId", "payOrderId", "mchOrderNo", "executeNotify"}, new Object[]{mchId, payOrderId, mchOrderNo, executeNotify})); - JSONObject retObj = JSON.parseObject(retStr); - _log.info("{}查询支付订单,结果:{}", logPrefix, retObj); - if(!"0000".equals(retObj.getString("code"))) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, retObj.getString("msg"), null, null)); - } - payOrder = retObj.getJSONObject("result"); - if (payOrder == null) { - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付订单不存在", null, null)); - } - Map map = XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_SUCCESS, "", PayConstant.RETURN_VALUE_SUCCESS, null); - map.put("result", payOrder); - _log.info("商户查询订单成功,payOrder={}", payOrder); - _log.info("###### 商户查询订单处理完成 ######"); - return XXPayUtil.makeRetData(map, payContext.getString("resKey")); - }catch (Exception e) { - _log.error(e, ""); - return XXPayUtil.makeRetFail(XXPayUtil.makeRetMap(PayConstant.RETURN_VALUE_FAIL, "支付中心系统异常", null, null)); - } - } - - /** - * 验证创建订单请求参数,参数通过返回JSONObject对象,否则返回错误文本信息 - * @param params - * @return - */ - private String validateParams(JSONObject params, JSONObject payContext) { - // 验证请求参数,参数有问题返回错误提示 - String errorMessage; - // 支付参数 - String mchId = params.getString("mchId"); // 商户ID - String mchOrderNo = params.getString("mchOrderNo"); // 商户订单号 - String payOrderId = params.getString("payOrderId"); // 支付订单号 - - String sign = params.getString("sign"); // 签名 - - // 验证请求参数有效性(必选项) - if(StringUtils.isBlank(mchId)) { - errorMessage = "request params[mchId] error."; - return errorMessage; - } - if(StringUtils.isBlank(mchOrderNo) && StringUtils.isBlank(payOrderId)) { - errorMessage = "request params[mchOrderNo or payOrderId] error."; - return errorMessage; - } - - // 签名信息 - if (StringUtils.isEmpty(sign)) { - errorMessage = "request params[sign] error."; - return errorMessage; - } - - // 查询商户信息 - JSONObject mchInfo; - String retStr = mchInfoServiceClient.selectMchInfo(getJsonParam("mchId", mchId)); - - JSONObject retObj = JSON.parseObject(retStr); - if("0000".equals(retObj.getString("code"))) { - mchInfo = retObj.getJSONObject("result"); - if (mchInfo == null) { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - return errorMessage; - } - if(mchInfo.getByte("state") != 1) { - errorMessage = "mchInfo not available [mchId="+mchId+"] record in db."; - return errorMessage; - } - }else { - errorMessage = "Can't found mchInfo[mchId="+mchId+"] record in db."; - _log.info("查询商户没有正常返回数据,code={},msg={}", retObj.getString("code"), retObj.getString("msg")); - return errorMessage; - } - - String reqKey = mchInfo.getString("reqKey"); - if (StringUtils.isBlank(reqKey)) { - errorMessage = "reqKey is null[mchId="+mchId+"] record in db."; - return errorMessage; - } - payContext.put("resKey", mchInfo.getString("resKey")); - - // 验证签名数据 - boolean verifyFlag = XXPayUtil.verifyPaySign(params, reqKey); - if(!verifyFlag) { - errorMessage = "Verify XX pay sign failed."; - return errorMessage; - } - - return "success"; - } - - String getJsonParam(String[] names, Object[] values) { - JSONObject jsonParam = new JSONObject(); - for (int i = 0; i < names.length; i++) { - jsonParam.put(names[i], values[i]); - } - return jsonParam.toJSONString(); - } - - String getJsonParam(String name, Object value) { - JSONObject jsonParam = new JSONObject(); - jsonParam.put(name, value); - return jsonParam.toJSONString(); - } - -} diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/MchInfoServiceClient.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/MchInfoServiceClient.java deleted file mode 100644 index a79539d7aa36e8fe2bff77185138192ce071ea29..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/MchInfoServiceClient.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.xxpay.web.service; - -import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; -import org.xxpay.common.util.MyBase64; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Service -public class MchInfoServiceClient { - - @Autowired - RestTemplate restTemplate; - - @HystrixCommand(fallbackMethod = "selectMchInfoFallback") - public String selectMchInfo(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/mch_info/select?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String selectMchInfoFallback(String jsonParam) { - return "error"; - } - -} \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayChannelServiceClient.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayChannelServiceClient.java deleted file mode 100644 index 5c5032f6a479618b0eba21426dcdafd16616f96a..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayChannelServiceClient.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.xxpay.web.service; - -import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.cloud.netflix.feign.FeignClient; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.client.RestTemplate; -import org.xxpay.common.util.MyBase64; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Service -public class PayChannelServiceClient { - - @Autowired - RestTemplate restTemplate; - - @HystrixCommand(fallbackMethod = "selectPayChannelFallback") - public String selectPayChannel(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay_channel/select?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String selectPayChannelFallback(String jsonParam) { - return "error"; - } - -} \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayOrderServiceClient.java b/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayOrderServiceClient.java deleted file mode 100644 index 004f4cf7ecaebf9fbd818358e6c9596c8288b457..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/java/org/xxpay/web/service/PayOrderServiceClient.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.xxpay.web.service; - -import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; -import org.xxpay.common.util.MyBase64; - -/** - * @Description: - * @author dingzhiwei jmdhappy@126.com - * @date 2017-07-05 - * @version V1.0 - * @Copyright: www.xxpay.org - */ -@Service -public class PayOrderServiceClient { - - @Autowired - RestTemplate restTemplate; - - /** - * 创建支付订单 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "createPayOrderFallback") - public String createPayOrder(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/create?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String createPayOrderFallback(String jsonParam) { - return "error"; - } - - /** - * 查询支付订单 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "queryPayOrderFallback") - public String queryPayOrder(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/query?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String queryPayOrderFallback(String jsonParam) { - return "error"; - } - - /** - * 处理微信支付 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "doWxPayReqFallback") - public String doWxPayReq(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/channel/wx?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String doWxPayReqFallback(String jsonParam) { - return "error"; - } - - /** - * 处理支付宝wap支付 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "doAliPayWapReqFallback") - public String doAliPayWapReq(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/channel/ali_wap?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String doAliPayWapReqFallback(String jsonParam) { - return "error"; - } - - /** - * 处理支付宝即时到账支付 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "doAliPayPcReqFallback") - public String doAliPayPcReq(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/channel/ali_pc?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String doAliPayPcReqFallback(String jsonParam) { - return "error"; - } - - /** - * 处理支付宝手机支付 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "doAliPayMobileReqFallback") - public String doAliPayMobileReq(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/channel/ali_mobile?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String doAliPayMobileReqFallback(String jsonParam) { - return "error"; - } - - /** - * 处理支付宝当面付扫码支付 - * @param jsonParam - * @return - */ - @HystrixCommand(fallbackMethod = "doAliPayQrReqFallback") - public String doAliPayQrReq(String jsonParam) { - return restTemplate.getForEntity("http://XXPAY-SERVICE/pay/channel/ali_qr?jsonParam=" + MyBase64.encode(jsonParam.getBytes()), String.class).getBody(); - } - - public String doAliPayQrReqFallback(String jsonParam) { - return "error"; - } - -} \ No newline at end of file diff --git a/xxpay4spring-cloud/xxpay-web/src/main/resources/bootstrap.yml b/xxpay4spring-cloud/xxpay-web/src/main/resources/bootstrap.yml deleted file mode 100755 index c27753664585e7118ea3dfad4ba64720c00bcac7..0000000000000000000000000000000000000000 --- a/xxpay4spring-cloud/xxpay-web/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,16 +0,0 @@ -spring: - application: - name: xxpay-web - cloud: - config: - discovery: - enabled: true # 默认false,设为true表示使用注册中心中的configserver配置而不自己配置configserver的uri - serviceId: xxpay-config # 指定config server在服务发现中的serviceId,默认为:configserver - fail-fast: true - password: xxpay - username: user - -eureka: - client: - serviceUrl: - defaultZone: http://localhost:2000/eureka/ \ No newline at end of file