From 54c3f3148c83ed79a1e291e7bd2d8312c0d4bdfa Mon Sep 17 00:00:00 2001
From: xuwenbo <717567226@qq.com>
Date: Tue, 12 May 2020 09:37:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0mybatisplus=E7=88=B6=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BE=9D=E8=B5=96=E5=85=B3?=
=?UTF-8?q?=E7=B3=BB=EF=BC=8C=E5=A2=9E=E5=8A=A0P=E7=BB=93=E5=B0=BE?=
=?UTF-8?q?=E7=9A=84mp=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 15 +-
LICENSE | 191 --
README.md | 89 +-
pom.xml | 10 +-
shell/jar-run2.sh | 64 -
shell/log.sh | 1 -
shell/start.sh | 1 -
shell/stop.sh | 7 -
shell/yshop.sh | 81 -
sql/2.1升级yx_system_group_data.sql | 78 -
sql/yshop2.1升级sql.txt | 29 -
sql/yxshop2.1.sql | 2861 -----------------
sql/数据库说明.txt | 5 -
.../main/resources/config/application-dev.yml | 2 +-
yshop-common/pom.xml | 38 +-
.../java/co/yixiang/annotation/Query.java | 36 +-
.../java/co/yixiang/config/SwaggerConfig.java | 6 +
.../co/yixiang/constant/ShopConstants.java | 31 +-
.../dozer/config/DozerMapperConfig.java | 31 +
.../yixiang/dozer/service/EJBGenerator.java | 63 +
.../co/yixiang/dozer/service/IGenerator.java | 78 +
.../java/co/yixiang/print/OrderPrint.java | 19 +
.../co/yixiang/print/PrintOrderDataVO.java | 38 +
.../co/yixiang/print/PrintStoreOrderVO.java | 37 +
.../java/co/yixiang/print/PrintUtil4.java | 587 ++++
.../main/java/co/yixiang/utils/BigNum.java | 196 ++
.../main/java/co/yixiang/utils/DateUtils.java | 133 +
.../java/co/yixiang/utils/FeiEHttpUtil.java | 12 +
.../main/java/co/yixiang/utils/FileUtil.java | 33 +
.../main/java/co/yixiang/utils/FontUtil.java | 80 +
.../main/java/co/yixiang/utils/OrderUtil.java | 106 +-
.../main/java/co/yixiang/utils/PageUtil.java | 2 +
.../java/co/yixiang/utils/RecodeUtil.java | 67 +
.../java/co/yixiang/utils/SecurityUtils.java | 2 +-
.../knife4j/spring/util/ArrayRefProperty.java | 30 +
.../knife4j/spring/util/SwaggerUtil.java | 245 ++
.../knife4j/spring/web/Knife4jController.java | 419 +++
.../swagger2/web/Swagger2Controller.java | 117 +
.../main/resources/META-INF/spring.factories | 2 +
.../main/resources/dozer/bean-mappings.xml | 5 +
.../resources/dozer/global-configuration.xml | 17 +
.../main/java/co/yixiang/utils/GenUtil.java | 42 +-
yshop-logging/pom.xml | 8 +-
.../java/co/yixiang/rest/LogController.java | 16 +-
.../yixiang/service/dto/LogQueryCriteria.java | 2 +-
yshop-mproot/pom.xml | 42 +
.../java/co/yixiang/annotation/Query.java | 73 +
.../co/yixiang/common/entity/BaseEntity.java | 10 +
.../co/yixiang/common/mapper/CoreMapper.java | 10 +
.../yixiang/common/service/BaseService.java | 8 +
.../common/service/impl/BaseServiceImpl.java | 67 +
.../yixiang/common/utils/QueryHelpPlus.java | 210 ++
.../common/web/param/OrderQueryParam.java | 34 +
.../yixiang/common/web/param/QueryParam.java | 38 +
.../java/co/yixiang/common/web/vo/Paging.java | 60 +
.../java/co/yixiang/config/MetaHandler.java | 91 +
.../java/co/yixiang/config/MybatisConfig.java | 35 +
.../main/resources/META-INF/spring.factories | 3 +
yshop-system/pom.xml | 8 +-
.../src/main/java/co/yixiang/AppRun.java | 2 +-
.../service/impl/RedisServiceImpl.java | 2 +-
.../security/config/SecurityConfig.java | 3 +
.../modules/security/rest/AuthController.java | 7 +-
.../main/resources/config/application-dev.yml | 25 +-
.../resources/config/application-prod.yml | 33 +-
.../src/main/resources/config/application.yml | 10 +-
yshop-system/src/main/resources/logback.xml | 53 +-
.../template/generator/admin/ControllerP.ftl | 77 +
.../template/generator/admin/DtoP.ftl | 39 +
.../template/generator/admin/EntityP.ftl | 80 +
.../template/generator/admin/MapperP.ftl | 16 +
.../generator/admin/QueryCriteriaP.ftl | 65 +
.../template/generator/admin/ServiceImplP.ftl | 99 +
.../template/generator/admin/ServiceP.ftl | 40 +
.../template/generator/front/index.ftl | 94 +-
.../test/java/co/yixiang/Api_java_demo.java | 538 ++++
.../src/test/java/co/yixiang/FileTest.java | 99 +
.../src/test/java/co/yixiang/Order.java | 37 +
.../src/test/java/co/yixiang/PrintUtil4.java | 346 ++
.../co/yixiang/rest/UploadController.java | 39 +-
.../service/impl/LocalStorageServiceImpl.java | 2 +-
81 files changed, 4864 insertions(+), 3463 deletions(-)
delete mode 100644 LICENSE
delete mode 100644 shell/jar-run2.sh
delete mode 100644 shell/log.sh
delete mode 100644 shell/start.sh
delete mode 100644 shell/stop.sh
delete mode 100644 shell/yshop.sh
delete mode 100644 sql/2.1升级yx_system_group_data.sql
delete mode 100644 sql/yshop2.1升级sql.txt
delete mode 100644 sql/yxshop2.1.sql
delete mode 100644 sql/数据库说明.txt
create mode 100644 yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java
create mode 100644 yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java
create mode 100644 yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java
create mode 100644 yshop-common/src/main/java/co/yixiang/print/OrderPrint.java
create mode 100644 yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java
create mode 100644 yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java
create mode 100644 yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java
create mode 100644 yshop-common/src/main/java/co/yixiang/utils/BigNum.java
create mode 100644 yshop-common/src/main/java/co/yixiang/utils/DateUtils.java
create mode 100644 yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java
create mode 100644 yshop-common/src/main/java/co/yixiang/utils/FontUtil.java
create mode 100644 yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java
create mode 100644 yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/ArrayRefProperty.java
create mode 100644 yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/SwaggerUtil.java
create mode 100644 yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/web/Knife4jController.java
create mode 100644 yshop-common/src/main/java/springfox/documentation/swagger2/web/Swagger2Controller.java
create mode 100644 yshop-common/src/main/resources/META-INF/spring.factories
create mode 100644 yshop-common/src/main/resources/dozer/bean-mappings.xml
create mode 100644 yshop-common/src/main/resources/dozer/global-configuration.xml
create mode 100644 yshop-mproot/pom.xml
create mode 100644 yshop-mproot/src/main/java/co/yixiang/annotation/Query.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/service/impl/BaseServiceImpl.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/web/param/OrderQueryParam.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/web/param/QueryParam.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/common/web/vo/Paging.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java
create mode 100644 yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java
create mode 100644 yshop-mproot/src/main/resources/META-INF/spring.factories
create mode 100644 yshop-system/src/main/resources/template/generator/admin/ControllerP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/DtoP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/EntityP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/MapperP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/QueryCriteriaP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/ServiceImplP.ftl
create mode 100644 yshop-system/src/main/resources/template/generator/admin/ServiceP.ftl
create mode 100644 yshop-system/src/test/java/co/yixiang/Api_java_demo.java
create mode 100644 yshop-system/src/test/java/co/yixiang/FileTest.java
create mode 100644 yshop-system/src/test/java/co/yixiang/Order.java
create mode 100644 yshop-system/src/test/java/co/yixiang/PrintUtil4.java
diff --git a/.gitignore b/.gitignore
index 9363e7a5..a1415862 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,7 @@
-### IDEA ###
-.idea/*
+*.classpath
+*.project
*.iml
-*/target/*
-*/*.iml
-/fx.jpg
-/poster.jpg
-/simsunb.ttf
-/spy.log
-/Alibaba-PuHuiTi-Regular.otf
+*.factorypath
+target
+.idea/
+*.log
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 91e3c252..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,191 +0,0 @@
-Apache License
-Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
-"License" shall mean the terms and conditions for use, reproduction, and
-distribution as defined by Sections 1 through 9 of this document.
-
-"Licensor" shall mean the copyright owner or entity authorized by the copyright
-owner that is granting the License.
-
-"Legal Entity" shall mean the union of the acting entity and all other entities
-that control, are controlled by, or are under common control with that entity.
-For the purposes of this definition, "control" means (i) the power, direct or
-indirect, to cause the direction or management of such entity, whether by
-contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
-outstanding shares, or (iii) beneficial ownership of such entity.
-
-"You" (or "Your") shall mean an individual or Legal Entity exercising
-permissions granted by this License.
-
-"Source" form shall mean the preferred form for making modifications, including
-but not limited to software source code, documentation source, and configuration
-files.
-
-"Object" form shall mean any form resulting from mechanical transformation or
-translation of a Source form, including but not limited to compiled object code,
-generated documentation, and conversions to other media types.
-
-"Work" shall mean the work of authorship, whether in Source or Object form, made
-available under the License, as indicated by a copyright notice that is included
-in or attached to the work (an example is provided in the Appendix below).
-
-"Derivative Works" shall mean any work, whether in Source or Object form, that
-is based on (or derived from) the Work and for which the editorial revisions,
-annotations, elaborations, or other modifications represent, as a whole, an
-original work of authorship. For the purposes of this License, Derivative Works
-shall not include works that remain separable from, or merely link (or bind by
-name) to the interfaces of, the Work and Derivative Works thereof.
-
-"Contribution" shall mean any work of authorship, including the original version
-of the Work and any modifications or additions to that Work or Derivative Works
-thereof, that is intentionally submitted to Licensor for inclusion in the Work
-by the copyright owner or by an individual or Legal Entity authorized to submit
-on behalf of the copyright owner. For the purposes of this definition,
-"submitted" means any form of electronic, verbal, or written communication sent
-to the Licensor or its representatives, including but not limited to
-communication on electronic mailing lists, source code control systems, and
-issue tracking systems that are managed by, or on behalf of, the Licensor for
-the purpose of discussing and improving the Work, but excluding communication
-that is conspicuously marked or otherwise designated in writing by the copyright
-owner as "Not a Contribution."
-
-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
-of whom a Contribution has been received by Licensor and subsequently
-incorporated within the Work.
-
-2. Grant of Copyright License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable copyright license to reproduce, prepare Derivative Works of,
-publicly display, publicly perform, sublicense, and distribute the Work and such
-Derivative Works in Source or Object form.
-
-3. Grant of Patent License.
-
-Subject to the terms and conditions of this License, each Contributor hereby
-grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
-irrevocable (except as stated in this section) patent license to make, have
-made, use, offer to sell, sell, import, and otherwise transfer the Work, where
-such license applies only to those patent claims licensable by such Contributor
-that are necessarily infringed by their Contribution(s) alone or by combination
-of their Contribution(s) with the Work to which such Contribution(s) was
-submitted. If You institute patent litigation against any entity (including a
-cross-claim or counterclaim in a lawsuit) alleging that the Work or a
-Contribution incorporated within the Work constitutes direct or contributory
-patent infringement, then any patent licenses granted to You under this License
-for that Work shall terminate as of the date such litigation is filed.
-
-4. Redistribution.
-
-You may reproduce and distribute copies of the Work or Derivative Works thereof
-in any medium, with or without modifications, and in Source or Object form,
-provided that You meet the following conditions:
-
-You must give any other recipients of the Work or Derivative Works a copy of
-this License; and
-You must cause any modified files to carry prominent notices stating that You
-changed the files; and
-You must retain, in the Source form of any Derivative Works that You distribute,
-all copyright, patent, trademark, and attribution notices from the Source form
-of the Work, excluding those notices that do not pertain to any part of the
-Derivative Works; and
-If the Work includes a "NOTICE" text file as part of its distribution, then any
-Derivative Works that You distribute must include a readable copy of the
-attribution notices contained within such NOTICE file, excluding those notices
-that do not pertain to any part of the Derivative Works, in at least one of the
-following places: within a NOTICE text file distributed as part of the
-Derivative Works; within the Source form or documentation, if provided along
-with the Derivative Works; or, within a display generated by the Derivative
-Works, if and wherever such third-party notices normally appear. The contents of
-the NOTICE file are for informational purposes only and do not modify the
-License. You may add Your own attribution notices within Derivative Works that
-You distribute, alongside or as an addendum to the NOTICE text from the Work,
-provided that such additional attribution notices cannot be construed as
-modifying the License.
-You may add Your own copyright statement to Your modifications and may provide
-additional or different license terms and conditions for use, reproduction, or
-distribution of Your modifications, or for any such Derivative Works as a whole,
-provided Your use, reproduction, and distribution of the Work otherwise complies
-with the conditions stated in this License.
-
-5. Submission of Contributions.
-
-Unless You explicitly state otherwise, any Contribution intentionally submitted
-for inclusion in the Work by You to the Licensor shall be under the terms and
-conditions of this License, without any additional terms or conditions.
-Notwithstanding the above, nothing herein shall supersede or modify the terms of
-any separate license agreement you may have executed with Licensor regarding
-such Contributions.
-
-6. Trademarks.
-
-This License does not grant permission to use the trade names, trademarks,
-service marks, or product names of the Licensor, except as required for
-reasonable and customary use in describing the origin of the Work and
-reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty.
-
-Unless required by applicable law or agreed to in writing, Licensor provides the
-Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
-including, without limitation, any warranties or conditions of TITLE,
-NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
-solely responsible for determining the appropriateness of using or
-redistributing the Work and assume any risks associated with Your exercise of
-permissions under this License.
-
-8. Limitation of Liability.
-
-In no event and under no legal theory, whether in tort (including negligence),
-contract, or otherwise, unless required by applicable law (such as deliberate
-and grossly negligent acts) or agreed to in writing, shall any Contributor be
-liable to You for damages, including any direct, indirect, special, incidental,
-or consequential damages of any character arising as a result of this License or
-out of the use or inability to use the Work (including but not limited to
-damages for loss of goodwill, work stoppage, computer failure or malfunction, or
-any and all other commercial damages or losses), even if such Contributor has
-been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability.
-
-While redistributing the Work or Derivative Works thereof, You may choose to
-offer, and charge a fee for, acceptance of support, warranty, indemnity, or
-other liability obligations and/or rights consistent with this License. However,
-in accepting such obligations, You may act only on Your own behalf and on Your
-sole responsibility, not on behalf of any other Contributor, and only if You
-agree to indemnify, defend, and hold each Contributor harmless for any liability
-incurred by, or claims asserted against, such Contributor by reason of your
-accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work
-
-To apply the Apache License to your work, attach the following boilerplate
-notice, with the fields enclosed by brackets "{}" replaced with your own
-identifying information. (Don't include the brackets!) The text should be
-enclosed in the appropriate comment syntax for the file format. We also
-recommend that a file or class name and description of purpose be included on
-the same "printed page" as the copyright notice for easier identification within
-third-party archives.
-
- Copyright 2018 Elune
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
\ No newline at end of file
diff --git a/README.md b/README.md
index 6770b0ca..e7e0aa82 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,16 @@
#### 项目简介
-yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2+Jpa+MybatisPlus+SpringSecurity+jwt+redis+Vue的前后端分离的商城系统, 包含商城、拼团、砍价、商户管理、 秒杀、优惠券、积分、分销、会员、充值、多门店等功能,更适合企业或个人二次开发;;
+yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2+Jpa+MybatisPlus+SpringSecurity+jwt+redis+Vue的前后端分离的商城系统, 包含商城、拼团、砍价、商户管理、 秒杀、优惠券、积分、分销、会员、充值、到店核销等功能,更适合企业或个人二次开发;;
+**开发文档** 【[查看文档](https://gitee.com/guchengwuyue/yshopmall/wikis/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83?sort_id=1718722)】
-#### 体验地址(里面有演示地址与文档)
+#### 体验地址
-| | 官网文档地址 | https://www.yixiang.co |
+| | 后台系统 | 前端(公众号+小程序(mpvue2.0),关注公众号即可体验公众号与小程序) |
|--- |--- | --- |
-
+| | https://www.yixiang.co |H5:https://h5.yixiang.co 测试号:hupeng/123456,也可以自行注册 |
+| | 后台体验账号/密码:admin/123456 | 公众号: |
#### 项目源码
@@ -19,19 +21,38 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
| 码云 | https://gitee.com/guchengwuyue/yshopmall | https://gitee.com/guchengwuyue/yshopmall_qd |
| github | https://github.com/guchengwuyue/yshopmall |https://github.com/guchengwuyue/yshopmall_qd |
+#### 开源版本与VIP版本说明
+### 开源版
+1.包括整个商城系统后台、数据库
+
+2.开源整个商城的管理后台(后台已经封装好了图片素材库、编辑器、配置等等组件), 它可以用于所有的Web应用程序,如网站商城管理后台,网站会员中心,
+CMS,CRM,OA等等本版本本身属于独立后台商城管理系统;
+
+3.可以个人、企业直接使用。
+
+### VIP版
+1.包括了开源版,还包括了移动端(H5+公众号)、小程序(mpvue2框架)、移动端API
+
+2.本版本是演示的所有功能代码;
+
+3.加入VIP、享有后续所有功能免费升级及其技术支持等。
+
+4、VIP为终身,【[详情请查看](https://gitee.com/guchengwuyue/yshopmall/wikis/pages?sort_id=1715823&doc_id=441578)】
## 商城功能
* 一:商品模块:商品添加、规格设置,商品上下架等
* 二:订单模块:下单、购物车、支付,发货、收货、评价、退款等
-* 三:营销模块:积分、优惠券、分销、砍价、拼团、秒杀、多门店等
+* 三:营销模块:积分、优惠券、分销、砍价、拼团、秒杀(、到店核销等
* 四:微信模块:自定义菜单、自动回复、微信授权、图文管理、模板消息推送
* 五:配置模块:各种配置
-* 六:用户模块:登陆、注册、会员卡、充值等
+* 六:用户模块:登陆、注册、会员卡等
* 七:其他等
+#### 已经完成功能
+- 可以具体查看演示地址查看当前版本已经完成的功能,不再絮叨啦
#### 项目结构
项目采用分模块开发方式
@@ -65,8 +86,16 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
@@ -94,9 +123,49 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2
* 前端使用技术
* 2.1 Vue 全家桶
* 2.2 Element
- * 2.3 mpvue
- * 2.3 uniapp
+ * 2.3 mpvue
+#### 项目发布明细
+
+- 1.0版本
+- 1.1版本新增积分与优惠券抵扣
+- 1.2版本分销功能已经发布
+- 1.2.1增加了未付款订单取消功能库存销量退出、优惠券、积分功能,个人中心增加了积分流水
+- 1.3版本新增拼团功能,已经发布
+- 1.3.1版本手机端新增商户管理、后台新增统计
+- 1.3.2新增后台微信相关及其支付配置,新增自动回复配置
+- 1.3.3新增 后台微信图文发送功能,小程序配置,增加小程序授权等,修复一些bug等
+- yshop1.6.1发布:新增移动端浏览记录,下单增加简单ReentrantLock锁
+- yshop1.6.2发布:修复用户昵称带有表情导致入库失败问题,修复下单订单金额为0不能支付的问题
+- yshop1.6.4发布:后台新增修改订单价格与备注优化订单详情显示明细,修复积分记录标题不显示的问题
+- yshop1.9.1,新增城市接口,修复小程序登陆与支付问题,发布mpvue1.0小程序
+- yshop1.9.4,新增小程序普通二维码功能及其修复小程序其他问题,详情登陆演示后台查看明细
+- yshop2.0发布更新如下:
+- 1、优化代码结构与名称,修改get请求参数其统一继承分页参数
+- 2、新增redis监听未付款30分钟取消功能与7天自动收货功能,mq队列作为备选(注释掉)
+- 3、新增门店到店核销功能
+- 4、新增分销全局开关#I19HB1
+- 5、积分新增消费限制#I19TUR
+- 6、新增充值功能#I18V5D
+- 7、后台菜单调整,新增财务模块
+- 8、优化后台配置赋值写法
+- 9、修复管理后台新增表单之后如果直接再新增数据导致默认数据缺失问题#I1AFBK
+- 10、修复提交购物车可能查询多条数据的问题
+- 11、后台登陆背景图固定#I1A0LS
+- 12、增加常量与枚举优化硬编码问题
+- 13、微信支付、公众号、模板消息修改
+- 14、修复代码生成器不全的问题#I1AIO4
+- 15、修复营销产品拼团等轮播图不能修改的问题#I1AHXR
+- 16、移除yshop-monitor模块
+- 17、修复退货理由文字错误#I1AQ7D
+- 18、修复新增分类的图片自动显示上次一次的图片#I1AQBK
+- 19、新增微信jssdk接口返回所需js权限
+- 20、新增余额充值变动模板消息通知
+- 21、首页数据缓存优化
+- 22、新增未支付订单显示到期时间
+- 23、修复加入购物车购买后,后台订单中的商品信息数据重复#I1AXNX
+- 24、修复后台-管理商品-规格属性 属性无法删除问题#I1AYL2
+- 25、修复公众号商品直接微信分享标题不显示的问题#I1AX0R
diff --git a/pom.xml b/pom.xml
index 87a09e42..d6b3fbc5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,6 +18,7 @@
yshop-api
yshop-mp
yshop-shop
+ yshop-mybatis
YSHOP商城管理系统
@@ -125,12 +126,17 @@
swagger-models
1.5.21
-
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ 2.0.1
-
mysql
diff --git a/shell/jar-run2.sh b/shell/jar-run2.sh
deleted file mode 100644
index 83af7664..00000000
--- a/shell/jar-run2.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#cription: 启动重启server服务
-#端口号,根据此端口号确定PID
-PORT=767
-#启动命令所在目录
-HOME='/home/sszn/task-agc'
-
-#查询出监听了test.jar端口TCP协议的程序
-pid=$(ps -ef | grep gdw-agc-task-1.0.0.0.jar | grep -v grep | awk '{print $2}')
-
-start(){
- echo "start running cloud-core ............... "
- if [ -n "$pid" ]; then
- echo "server already start,pid:$pid"
- echo "pid:$pid agc-job port:$PORT 服务已经在运行了,请停止后再 执行 sh run.sh start "
- return 0
- fi
- #进入命令所在目录
- cd $HOME
- # 启动服务控制台日志输出到nohup.out文件中
- nohup java -jar gdw-agc-task-1.0.0.0.jar >> /home/sszn/task-agc/log/agc-$(date +%Y-%m-%d).log 2>&1 &
- echo "running success agc-job port:$PORT"
- echo "agc-job port:$PORT 服务启动成功 ..... "
-}
-
-stop(){
- echo "stopping running cloud-core ............... "
- if [ -z "$pid" ]; then
- echo "not find program on port:$PORT"
- echo "agc-job port:$PORT 服务已经被关闭了请执行 sh run.sh start "
- return 0
- fi
- #结束程序,使用讯号2,如果不行可以尝试讯号9强制结束
- kill -9 $pid
- rm -rf $pid
- echo "kill program use signal 2,pid:$pid"
-}
-
-status(){
- if [ -z "$pid" ]; then
- echo "not find program on port:$PORT"
- else
- echo "program is running,pid:$pid"
- fi
-}
-
-case $1 in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- $0 stop
- sleep 2
- $0 start
- ;;
- status)
- status
- ;;
- *)
- echo $"Usage: $0 {start|stop|status}"
- exit 0
-esac
diff --git a/shell/log.sh b/shell/log.sh
deleted file mode 100644
index a4737c51..00000000
--- a/shell/log.sh
+++ /dev/null
@@ -1 +0,0 @@
-tail -f nohup.out
\ No newline at end of file
diff --git a/shell/start.sh b/shell/start.sh
deleted file mode 100644
index fa305a27..00000000
--- a/shell/start.sh
+++ /dev/null
@@ -1 +0,0 @@
-nohup java -jar yshop-api-2.0.jar --spring.profiles.active=prod &
\ No newline at end of file
diff --git a/shell/stop.sh b/shell/stop.sh
deleted file mode 100644
index f87788a5..00000000
--- a/shell/stop.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-PID=$(ps -ef | grep yshop-api-2.0.jar | grep -v grep | awk '{ print $2 }')
-if [ -z "$PID" ];then
- echo Application is already stopped
-else
- echo kill $PID
- kill $PID
-fi
diff --git a/shell/yshop.sh b/shell/yshop.sh
deleted file mode 100644
index 6b2c8716..00000000
--- a/shell/yshop.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env bash
-
-INPUT=$2
-FILE_PATH=`readlink -f ${INPUT}`
-SERVICE=${INPUT##*/}
-SERVICE_NAME=${SERVICE%.*}
-DEPLOY_DIR=`pwd`
-JVM_OPTS="-server -Xms64m -Xmx128m"
-
-if [[ "$1" = "" ]];
-then
- echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m"
- exit 1
-fi
-
-if [[ "$SERVICE" = "" ]];
-then
- echo -e "\033[0;31m 未输入应用名 \033[0m"
- exit 1
-fi
-
-LOGS_DIR="$DEPLOY_DIR/logs/$SERVICE_NAME"
-echo "$LOGS_DIR"
-if [[ ! -d "$LOGS_DIR" ]]; then
- mkdir -p ${LOGS_DIR}
-fi
-
-LOG_PATH="$LOGS_DIR/stdout.out"
-pid=0
-
-start()
-{
- checkPid
- if [[ ! -n "$pid" ]]; then
- BUILD_ID=dontKillMe nohup java ${JVM_OPTS} -jar ${FILE_PATH} >> ${LOG_PATH} 2>&1 &
- echo "$SERVICE_NAME is starting you can check the $LOG_PATH"
- else
- echo "$SERVICE_NAME is runing PID: $pid"
- fi
-}
-
-checkPid()
-{
- pid=`ps -ef |grep ${FILE_PATH} |grep -v grep |awk '{print $2}'`
-}
-
-stop()
-{
- checkPid
- if [[ ! -n "$pid" ]]; then
- echo "$SERVICE_NAME not runing"
- else
- echo "$SERVICE_NAME stop..."
- kill -9 ${pid}
- fi
-}
-
-restart()
-{
- stop
- sleep 2
- start
-}
-
-status()
-{
- checkPid
- if [[ ! -n "$pid" ]]; then
- echo "$SERVICE_NAME not runing"
- else
- echo "$SERVICE_NAME runing PID: $pid"
- fi
-}
-
-case $1 in
- start) start;;
- stop) stop;;
- restart) restart;;
- status) status;;
- *) echo "require start|stop|restart|status" ;;
-esac
diff --git a/sql/2.1升级yx_system_group_data.sql b/sql/2.1升级yx_system_group_data.sql
deleted file mode 100644
index cd6a33a5..00000000
--- a/sql/2.1升级yx_system_group_data.sql
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server : localhost
- Source Server Type : MySQL
- Source Server Version : 50723
- Source Host : localhost:3306
- Source Schema : yxshop
-
- Target Server Type : MySQL
- Target Server Version : 50723
- File Encoding : 65001
-
- Date: 08/04/2020 14:33:54
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- Table structure for yx_system_group_data
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_group_data`;
-CREATE TABLE `yx_system_group_data` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组合数据详情ID',
- `group_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对应的数据名称',
- `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据组对应的数据值(json数据)',
- `add_time` int(10) NOT NULL DEFAULT 0 COMMENT '添加数据时间',
- `sort` int(11) NULL DEFAULT 0 COMMENT '数据排序',
- `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态(1:开启;2:关闭;)',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 237 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组合数据详情表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_group_data
--- ----------------------------
-INSERT INTO `yx_system_group_data` VALUES (177, 'yshop_home_banner', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\"],\"name\":\"banner\",\"id\":177,\"pic\":\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\",\"sort\":1,\"url\":\"wwww\",\"status\":1}', 1571387677, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (180, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e85bfa61251d.png\"],\"uniapp_url\":\"/pages/shop/GoodsClass/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa61251d.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1}', 1571390842, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (182, 'yshop_home_roll_news', '{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"id\":182,\"pic\":\"https://i.loli.net/2019/10/18/DqOUgNf7wjuFpPT.png\",\"sort\":2,\"title\":\"分销、拼团、商户功能上线啦!\",\"url\":\"/news_list\",\"info\":\"yshop2.0上线啦\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (183, 'yshop_hot_search', '{\"id\":183,\"title\":\"照片\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (184, 'yshop_hot_search', '{\"id\":184,\"title\":\"springboot\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (187, 'yshop_home_roll_news', '{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"id\":187,\"sort\":1,\"url\":\"/news_list\",\"info\":\"springboot2+JPA+Mybatisplus商城系统\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 1572086163, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (188, 'yshop_hot_search', '{\"id\":188,\"title\":\"打印\"}', 1572086172, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (189, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5dec896eeb25a.png\"],\"uniapp_url\":\"/pages/user/UserVip/index\",\"name\":\"会员中心\",\"id\":189,\"pic\":\"https://image.dayouqiantu.cn/5dec896eeb25a.png\",\"sort\":9,\"url\":\"/user/vip\",\"wxapp_url\":\"/pages/user/UserVip/main\",\"status\":1}', 1572087722, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (190, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428984d64d.png\"],\"uniapp_url\":\"/pages/user/coupon/UserCoupon/index\",\"name\":\"优惠券\",\"id\":190,\"pic\":\"https://image.dayouqiantu.cn/5db428984d64d.png\",\"sort\":8,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/UserCoupon/main\",\"status\":1}', 0, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (191, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428a8d3ab0.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"收藏商品\",\"id\":191,\"pic\":\"https://image.dayouqiantu.cn/5db428a8d3ab0.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', 0, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (192, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428bd61b73.png\"],\"uniapp_url\":\"/pages/user/address/AddressManagement/index\",\"name\":\"地址管理\",\"id\":192,\"pic\":\"https://image.dayouqiantu.cn/5db428bd61b73.png\",\"sort\":6,\"url\":\"/user/add_manage\",\"wxapp_url\":\"/pages/user/address/AddressManagement/main\",\"status\":1}', 0, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (193, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428e28dd48.png\"],\"uniapp_url\":\"/pages/user/promotion/UserPromotion/index\",\"name\":\"我的推广\",\"id\":193,\"pic\":\"https://image.dayouqiantu.cn/5db428e28dd48.png\",\"sort\":5,\"url\":\"/user/user_promotion\",\"wxapp_url\":\"/pages/user/promotion/UserPromotion/main\",\"status\":1}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (194, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db42a4208c55.png\"],\"uniapp_url\":\"/pages/user/UserAccount/index\",\"name\":\"我的余额\",\"id\":194,\"pic\":\"https://image.dayouqiantu.cn/5db42a4208c55.png\",\"sort\":4,\"url\":\"/user/account\",\"wxapp_url\":\"/pages/user/UserAccount/main\",\"status\":1}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (195, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428f410462.png\"],\"uniapp_url\":\"/pages/user/signIn/Integral/index\",\"name\":\"我的积分\",\"id\":195,\"pic\":\"https://image.dayouqiantu.cn/5db428f410462.png\",\"sort\":3,\"url\":\"/user/integral\",\"wxapp_url\":\"/pages/user/signIn/Integral/main\",\"status\":1}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (196, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93f004713.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/5e85bfea151b7.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 1573109648, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (197, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e939507b5e.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa55f352.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', 1573109723, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (199, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93c9a8304.png\"],\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa6621ca.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1}', 1573387422, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (200, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e925140b57.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa4b273f.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (201, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5ddb7a37d58d9.png\"],\"uniapp_url\":\"/pages/orderAdmin/OrderIndex/index\",\"name\":\"商户管理\",\"id\":201,\"pic\":\"https://image.dayouqiantu.cn/5ddb7a37d58d9.png\",\"sort\":2,\"url\":\"/customer/index\",\"wxapp_url\":\"/pages/orderAdmin/OrderIndex/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (202, 'yshop_sign_day_num', '{\"sign_num\":\"10\",\"id\":205,\"day\":\"第一天\"}', 0, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (203, 'yshop_sign_day_num', '{\"sign_num\":\"20\",\"id\":\"\",\"day\":\"第二天\"}', 0, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (204, 'yshop_sign_day_num', '{\"sign_num\":\"30\",\"id\":\"\",\"day\":\"第三天\"}', 0, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (205, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"40\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第四天\",\"status\":\"\"}', 0, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (206, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"50\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第五天\",\"status\":\"\"}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (207, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"60\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第六天\",\"status\":\"\"}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (208, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"100\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"奖励\",\"status\":\"\"}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (209, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93010a248.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/5e85bf8e494f2.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (210, 'yshop_seckill_time', '{\"continued\":2,\"id\":\"\",\"time\":5}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (211, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"7\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (212, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"2\",\"id\":\"\",\"sort\":\"\",\"time\":\"10\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (213, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"12\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (214, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"4\",\"id\":\"\",\"sort\":\"\",\"time\":\"15\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (215, 'yshop_seckill_time', '{\"continued\":\"2\",\"id\":223,\"time\":\"19\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (216, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e929f9be59.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa5a9f85.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (217, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e9276c608f.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/5e85bfe9b1da8.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (218, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5dfd7b748e053.png\"],\"uniapp_url\":\"/pages/activity/BargainRecord/index\",\"name\":\"砍价记录\",\"id\":218,\"pic\":\"https://image.dayouqiantu.cn/5dfd7b748e053.png\",\"sort\":1,\"url\":\"/activity/bargain/record\",\"wxapp_url\":\"/pages/activity/BargainRecord/main\",\"status\":1}', 0, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (219, 'yshop_home_banner', '{\"name\":\"222\",\"id\":\"\",\"pic\":\"https://image.dayouqiantu.cn/5c9f117f624ee.jpg\",\"sort\":\"\",\"url\":\"/\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (221, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e60da498cfdd.png\"],\"name\":\"订单核销\",\"id\":230,\"pic\":\"https://image.dayouqiantu.cn/5e60da498cfdd.png\",\"sort\":0,\"url\":\"/order/order_cancellation\",\"wxapp_url\":\"\",\"status\":1}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (222, 'yshop_recharge_price_ways', '{\"give_price\":\"10\",\"price\":\"100\",\"id\":\"\",\"sort\":0,\"status\":1}', 0, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (223, 'yshop_recharge_price_ways', '{\"give_price\":\"1\",\"price\":1,\"id\":\"\",\"sort\":0,\"status\":1}', 0, 0, 1);
-
-SET FOREIGN_KEY_CHECKS = 1;
diff --git a/sql/yshop2.1升级sql.txt b/sql/yshop2.1升级sql.txt
deleted file mode 100644
index 4b99ab42..00000000
--- a/sql/yshop2.1升级sql.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-CREATE TABLE `yx_system_store_staff` (
- `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
- `uid` int(10) unsigned NOT NULL COMMENT '微信用户id',
- `nickname` varchar(50) NOT NULL,
- `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '店员头像',
- `store_id` int(11) NOT NULL COMMENT '门店id',
- `store_name` varchar(50) DEFAULT NULL,
- `staff_name` varchar(64) DEFAULT '' COMMENT '店员名称',
- `phone` char(15) DEFAULT NULL COMMENT '手机号码',
- `verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '核销开关',
- `status` tinyint(2) DEFAULT '1' COMMENT '状态',
- `add_time` int(10) DEFAULT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='门店店员表';
-
-
-ALTER TABLE `yx_user_recharge`
-ADD COLUMN `give_price` decimal(8, 2) NULL DEFAULT 0 COMMENT '赠送金额' AFTER `price`
-
-ALTER TABLE `yx_system_attachment`
-ADD COLUMN `uid` int(0) UNSIGNED NULL DEFAULT 0 COMMENT '用户id' AFTER `module_type`,
-ADD COLUMN `invite_code` varchar(50) NULL DEFAULT '' COMMENT '邀请码' AFTER `uid`
-
-ALTER TABLE `yx_store_seckill`
-ADD COLUMN `time_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '时间段id' AFTER `start_time_date`
-
-ALTER TABLE `yx_store_category`
-ADD COLUMN `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态' AFTER `add_time`
-
diff --git a/sql/yxshop2.1.sql b/sql/yxshop2.1.sql
deleted file mode 100644
index 4388f403..00000000
--- a/sql/yxshop2.1.sql
+++ /dev/null
@@ -1,2861 +0,0 @@
-/*
- Navicat Premium Data Transfer
-
- Source Server : localhost
- Source Server Type : MySQL
- Source Server Version : 50723
- Source Host : localhost:3306
- Source Schema : yxshop
-
- Target Server Type : MySQL
- Target Server Version : 50723
- File Encoding : 65001
-
- Date: 07/04/2020 17:02:09
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- Table structure for alipay_config
--- ----------------------------
-DROP TABLE IF EXISTS `alipay_config`;
-CREATE TABLE `alipay_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
- `app_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应用ID',
- `charset` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编码',
- `format` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型 固定格式json',
- `gateway_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '网关地址',
- `notify_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '异步回调',
- `private_key` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '私钥',
- `public_key` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '公钥',
- `return_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '回调地址',
- `sign_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签名方式',
- `sys_service_provider_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商户号',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '支付宝配置类' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of alipay_config
--- ----------------------------
-INSERT INTO `alipay_config` VALUES (1, '2016091700532697', 'utf-8', 'JSON', 'https://openapi.alipaydev.com/gateway.do', 'http://api.auauz.net/api/aliPay/notify', 'MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC5js8sInU10AJ0cAQ8UMMyXrQ+oHZEkVt5lBwsStmTJ7YikVYgbskx1YYEXTojRsWCb+SH/kDmDU4pK/u91SJ4KFCRMF2411piYuXU/jF96zKrADznYh/zAraqT6hvAIVtQAlMHN53nx16rLzZ/8jDEkaSwT7+HvHiS+7sxSojnu/3oV7BtgISoUNstmSe8WpWHOaWv19xyS+Mce9MY4BfseFhzTICUymUQdd/8hXA28/H6osUfAgsnxAKv7Wil3aJSgaJczWuflYOve0dJ3InZkhw5Cvr0atwpk8YKBQjy5CdkoHqvkOcIB+cYHXJKzOE5tqU7inSwVbHzOLQ3XbnAgMBAAECggEAVJp5eT0Ixg1eYSqFs9568WdetUNCSUchNxDBu6wxAbhUgfRUGZuJnnAll63OCTGGck+EGkFh48JjRcBpGoeoHLL88QXlZZbC/iLrea6gcDIhuvfzzOffe1RcZtDFEj9hlotg8dQj1tS0gy9pN9g4+EBH7zeu+fyv+qb2e/v1l6FkISXUjpkD7RLQr3ykjiiEw9BpeKb7j5s7Kdx1NNIzhkcQKNqlk8JrTGDNInbDM6inZfwwIO2R1DHinwdfKWkvOTODTYa2MoAvVMFT9Bec9FbLpoWp7ogv1JMV9svgrcF9XLzANZ/OQvkbe9TV9GWYvIbxN6qwQioKCWO4GPnCAQKBgQDgW5MgfhX8yjXqoaUy/d1VjI8dHeIyw8d+OBAYwaxRSlCfyQ+tieWcR2HdTzPca0T0GkWcKZm0ei5xRURgxt4DUDLXNh26HG0qObbtLJdu/AuBUuCqgOiLqJ2f1uIbrz6OZUHns+bT/jGW2Ws8+C13zTCZkZt9CaQsrp3QOGDx5wKBgQDTul39hp3ZPwGNFeZdkGoUoViOSd5Lhowd5wYMGAEXWRLlU8z+smT5v0POz9JnIbCRchIY2FAPKRdVTICzmPk2EPJFxYTcwaNbVqL6lN7J2IlXXMiit5QbiLauo55w7plwV6LQmKm9KV7JsZs5XwqF7CEovI7GevFzyD3w+uizAQKBgC3LY1eRhOlpWOIAhpjG6qOoohmeXOphvdmMlfSHq6WYFqbWwmV4rS5d/6LNpNdL6fItXqIGd8I34jzql49taCmi+A2nlR/E559j0mvM20gjGDIYeZUz5MOE8k+K6/IcrhcgofgqZ2ZED1ksHdB/E8DNWCswZl16V1FrfvjeWSNnAoGAMrBplCrIW5xz+J0Hm9rZKrs+AkK5D4fUv8vxbK/KgxZ2KaUYbNm0xv39c+PZUYuFRCz1HDGdaSPDTE6WeWjkMQd5mS6ikl9hhpqFRkyh0d0fdGToO9yLftQKOGE/q3XUEktI1XvXF0xyPwNgUCnq0QkpHyGVZPtGFxwXiDvpvgECgYA5PoB+nY8iDiRaJNko9w0hL4AeKogwf+4TbCw+KWVEn6jhuJa4LFTdSqp89PktQaoVpwv92el/AhYjWOl/jVCm122f9b7GyoelbjMNolToDwe5pF5RnSpEuDdLy9MfE8LnE3PlbE7E5BipQ3UjSebkgNboLHH/lNZA5qvEtvbfvQ==', 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAut9evKRuHJ/2QNfDlLwvN/S8l9hRAgPbb0u61bm4AtzaTGsLeMtScetxTWJnVvAVpMS9luhEJjt+Sbk5TNLArsgzzwARgaTKOLMT1TvWAK5EbHyI+eSrc3s7Awe1VYGwcubRFWDm16eQLv0k7iqiw+4mweHSz/wWyvBJVgwLoQ02btVtAQErCfSJCOmt0Q/oJQjj08YNRV4EKzB19+f5A+HQVAKy72dSybTzAK+3FPtTtNen/+b5wGeat7c32dhYHnGorPkPeXLtsqqUTp1su5fMfd4lElNdZaoCI7osZxWWUo17vBCZnyeXc9fk0qwD9mK6yRAxNbrY72Xx5VqIqwIDAQAB', 'http://api.auauz.net/api/aliPay/return', 'RSA2', '2088102176044281');
-
--- ----------------------------
--- Table structure for column_config
--- ----------------------------
-DROP TABLE IF EXISTS `column_config`;
-CREATE TABLE `column_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `column_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `column_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `dict_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `extra` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `form_show` bit(1) NULL DEFAULT NULL,
- `form_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `key_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `list_show` bit(1) NULL DEFAULT NULL,
- `not_null` bit(1) NULL DEFAULT NULL,
- `query_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `date_annotation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 292 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成字段信息存储' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of column_config
--- ----------------------------
-INSERT INTO `column_config` VALUES (1, 'gen_test', 'id', 'int', NULL, 'auto_increment', b'0', NULL, 'PRI', b'0', b'1', NULL, 'ID', NULL);
-INSERT INTO `column_config` VALUES (2, 'gen_test', 'sex', 'int', NULL, '', b'1', NULL, '', b'1', b'0', 'NotNull', '性别', NULL);
-INSERT INTO `column_config` VALUES (3, 'gen_test', 'create_time', 'datetime', NULL, '', b'0', NULL, '', b'1', b'0', 'BetWeen', '', NULL);
-INSERT INTO `column_config` VALUES (139, 'users_roles', 'user_id', 'bigint', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, '用户ID', NULL);
-INSERT INTO `column_config` VALUES (140, 'users_roles', 'role_id', 'bigint', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, '角色ID', NULL);
-INSERT INTO `column_config` VALUES (141, 'user_avatar', 'id', 'bigint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (142, 'user_avatar', 'real_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '真实文件名', NULL);
-INSERT INTO `column_config` VALUES (143, 'user_avatar', 'path', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '路径', NULL);
-INSERT INTO `column_config` VALUES (144, 'user_avatar', 'size', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '大小', NULL);
-INSERT INTO `column_config` VALUES (145, 'user_avatar', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '创建时间', NULL);
-INSERT INTO `column_config` VALUES (146, 'yx_material_group', 'id', 'varchar', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, 'PK', NULL);
-INSERT INTO `column_config` VALUES (147, 'yx_material_group', 'user_id', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '所属租户', NULL);
-INSERT INTO `column_config` VALUES (148, 'yx_material_group', 'del_flag', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '逻辑删除标记(0:显示;1:隐藏)', NULL);
-INSERT INTO `column_config` VALUES (149, 'yx_material_group', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '创建时间', NULL);
-INSERT INTO `column_config` VALUES (150, 'yx_material_group', 'update_time', 'timestamp', NULL, 'on update CURRENT_TIMESTAMP', b'1', NULL, '', b'1', b'1', NULL, '最后更新时间', NULL);
-INSERT INTO `column_config` VALUES (151, 'yx_material_group', 'create_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '创建者ID', NULL);
-INSERT INTO `column_config` VALUES (152, 'yx_material_group', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '分组名', NULL);
-INSERT INTO `column_config` VALUES (153, 'yx_material', 'id', 'varchar', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, 'PK', NULL);
-INSERT INTO `column_config` VALUES (154, 'yx_material', 'user_id', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '所属租户', NULL);
-INSERT INTO `column_config` VALUES (155, 'yx_material', 'del_flag', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '逻辑删除标记(0:显示;1:隐藏)', NULL);
-INSERT INTO `column_config` VALUES (156, 'yx_material', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '创建时间', NULL);
-INSERT INTO `column_config` VALUES (157, 'yx_material', 'update_time', 'timestamp', NULL, 'on update CURRENT_TIMESTAMP', b'1', NULL, '', b'1', b'1', NULL, '最后更新时间', NULL);
-INSERT INTO `column_config` VALUES (158, 'yx_material', 'create_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '创建者ID', NULL);
-INSERT INTO `column_config` VALUES (159, 'yx_material', 'type', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '类型1、图片;2、视频', NULL);
-INSERT INTO `column_config` VALUES (160, 'yx_material', 'group_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '分组ID', NULL);
-INSERT INTO `column_config` VALUES (161, 'yx_material', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '素材名', NULL);
-INSERT INTO `column_config` VALUES (162, 'yx_material', 'url', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '素材链接', NULL);
-INSERT INTO `column_config` VALUES (163, 'yx_user', 'uid', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '用户id', NULL);
-INSERT INTO `column_config` VALUES (164, 'yx_user', 'username', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '用户账户(跟accout一样)', NULL);
-INSERT INTO `column_config` VALUES (165, 'yx_user', 'account', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '用户账号', NULL);
-INSERT INTO `column_config` VALUES (166, 'yx_user', 'password', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户密码(跟pwd)', NULL);
-INSERT INTO `column_config` VALUES (167, 'yx_user', 'pwd', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户密码', NULL);
-INSERT INTO `column_config` VALUES (168, 'yx_user', 'real_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '真实姓名', NULL);
-INSERT INTO `column_config` VALUES (169, 'yx_user', 'birthday', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '生日', NULL);
-INSERT INTO `column_config` VALUES (170, 'yx_user', 'card_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '身份证号码', NULL);
-INSERT INTO `column_config` VALUES (171, 'yx_user', 'mark', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户备注', NULL);
-INSERT INTO `column_config` VALUES (172, 'yx_user', 'partner_id', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '合伙人id', NULL);
-INSERT INTO `column_config` VALUES (173, 'yx_user', 'group_id', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户分组id', NULL);
-INSERT INTO `column_config` VALUES (174, 'yx_user', 'nickname', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户昵称', NULL);
-INSERT INTO `column_config` VALUES (175, 'yx_user', 'avatar', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户头像', NULL);
-INSERT INTO `column_config` VALUES (176, 'yx_user', 'phone', 'char', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '手机号码', NULL);
-INSERT INTO `column_config` VALUES (177, 'yx_user', 'add_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '添加时间', NULL);
-INSERT INTO `column_config` VALUES (178, 'yx_user', 'add_ip', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '添加ip', NULL);
-INSERT INTO `column_config` VALUES (179, 'yx_user', 'last_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '最后一次登录时间', NULL);
-INSERT INTO `column_config` VALUES (180, 'yx_user', 'last_ip', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '最后一次登录ip', NULL);
-INSERT INTO `column_config` VALUES (181, 'yx_user', 'now_money', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户余额', NULL);
-INSERT INTO `column_config` VALUES (182, 'yx_user', 'brokerage_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '佣金金额', NULL);
-INSERT INTO `column_config` VALUES (183, 'yx_user', 'integral', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户剩余积分', NULL);
-INSERT INTO `column_config` VALUES (184, 'yx_user', 'sign_num', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '连续签到天数', NULL);
-INSERT INTO `column_config` VALUES (185, 'yx_user', 'status', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '1为正常,0为禁止', NULL);
-INSERT INTO `column_config` VALUES (186, 'yx_user', 'level', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '等级', NULL);
-INSERT INTO `column_config` VALUES (187, 'yx_user', 'spread_uid', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '推广元id', NULL);
-INSERT INTO `column_config` VALUES (188, 'yx_user', 'spread_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '推广员关联时间', NULL);
-INSERT INTO `column_config` VALUES (189, 'yx_user', 'user_type', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户类型', NULL);
-INSERT INTO `column_config` VALUES (190, 'yx_user', 'is_promoter', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '是否为推广员', NULL);
-INSERT INTO `column_config` VALUES (191, 'yx_user', 'pay_count', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户购买次数', NULL);
-INSERT INTO `column_config` VALUES (192, 'yx_user', 'spread_count', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '下级人数', NULL);
-INSERT INTO `column_config` VALUES (193, 'yx_user', 'clean_time', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '清理会员时间', NULL);
-INSERT INTO `column_config` VALUES (194, 'yx_user', 'addres', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '详细地址', NULL);
-INSERT INTO `column_config` VALUES (195, 'yx_user', 'adminid', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '管理员编号 ', NULL);
-INSERT INTO `column_config` VALUES (196, 'yx_user', 'login_type', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户登陆类型,h5,wechat,routine', NULL);
-INSERT INTO `column_config` VALUES (197, 'yx_wechat_media', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '微信视频音频id', NULL);
-INSERT INTO `column_config` VALUES (198, 'yx_wechat_media', 'type', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '回复类型', NULL);
-INSERT INTO `column_config` VALUES (199, 'yx_wechat_media', 'path', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '文件路径', NULL);
-INSERT INTO `column_config` VALUES (200, 'yx_wechat_media', 'media_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '微信服务器返回的id', NULL);
-INSERT INTO `column_config` VALUES (201, 'yx_wechat_media', 'url', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '地址', NULL);
-INSERT INTO `column_config` VALUES (202, 'yx_wechat_media', 'temporary', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否永久或者临时 0永久1临时', NULL);
-INSERT INTO `column_config` VALUES (203, 'yx_wechat_media', 'add_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '添加时间', NULL);
-INSERT INTO `column_config` VALUES (204, 'yx_store_order', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '订单ID', NULL);
-INSERT INTO `column_config` VALUES (205, 'yx_store_order', 'order_id', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '订单号', NULL);
-INSERT INTO `column_config` VALUES (206, 'yx_store_order', 'extend_order_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '额外订单号', NULL);
-INSERT INTO `column_config` VALUES (207, 'yx_store_order', 'uid', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '用户id', NULL);
-INSERT INTO `column_config` VALUES (208, 'yx_store_order', 'real_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户姓名', NULL);
-INSERT INTO `column_config` VALUES (209, 'yx_store_order', 'user_phone', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户电话', NULL);
-INSERT INTO `column_config` VALUES (210, 'yx_store_order', 'user_address', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '详细地址', NULL);
-INSERT INTO `column_config` VALUES (211, 'yx_store_order', 'cart_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '购物车id', NULL);
-INSERT INTO `column_config` VALUES (212, 'yx_store_order', 'freight_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '运费金额', NULL);
-INSERT INTO `column_config` VALUES (213, 'yx_store_order', 'total_num', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '订单商品总数', NULL);
-INSERT INTO `column_config` VALUES (214, 'yx_store_order', 'total_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '订单总价', NULL);
-INSERT INTO `column_config` VALUES (215, 'yx_store_order', 'total_postage', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '邮费', NULL);
-INSERT INTO `column_config` VALUES (216, 'yx_store_order', 'pay_price', 'decimal', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '实际支付金额', NULL);
-INSERT INTO `column_config` VALUES (217, 'yx_store_order', 'pay_postage', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '支付邮费', NULL);
-INSERT INTO `column_config` VALUES (218, 'yx_store_order', 'deduction_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '抵扣金额', NULL);
-INSERT INTO `column_config` VALUES (219, 'yx_store_order', 'coupon_id', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '优惠券id', NULL);
-INSERT INTO `column_config` VALUES (220, 'yx_store_order', 'coupon_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '优惠券金额', NULL);
-INSERT INTO `column_config` VALUES (221, 'yx_store_order', 'paid', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '支付状态', NULL);
-INSERT INTO `column_config` VALUES (222, 'yx_store_order', 'pay_time', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '支付时间', NULL);
-INSERT INTO `column_config` VALUES (223, 'yx_store_order', 'pay_type', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '支付方式', NULL);
-INSERT INTO `column_config` VALUES (224, 'yx_store_order', 'add_time', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '创建时间', NULL);
-INSERT INTO `column_config` VALUES (225, 'yx_store_order', 'status', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)', NULL);
-INSERT INTO `column_config` VALUES (226, 'yx_store_order', 'refund_status', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '0 未退款 1 申请中 2 已退款', NULL);
-INSERT INTO `column_config` VALUES (227, 'yx_store_order', 'refund_reason_wap_img', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '退款图片', NULL);
-INSERT INTO `column_config` VALUES (228, 'yx_store_order', 'refund_reason_wap_explain', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '退款用户说明', NULL);
-INSERT INTO `column_config` VALUES (229, 'yx_store_order', 'refund_reason_time', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '退款时间', NULL);
-INSERT INTO `column_config` VALUES (230, 'yx_store_order', 'refund_reason_wap', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '前台退款原因', NULL);
-INSERT INTO `column_config` VALUES (231, 'yx_store_order', 'refund_reason', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '不退款的理由', NULL);
-INSERT INTO `column_config` VALUES (232, 'yx_store_order', 'refund_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '退款金额', NULL);
-INSERT INTO `column_config` VALUES (233, 'yx_store_order', 'delivery_sn', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '快递公司编号', NULL);
-INSERT INTO `column_config` VALUES (234, 'yx_store_order', 'delivery_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '快递名称/送货人姓名', NULL);
-INSERT INTO `column_config` VALUES (235, 'yx_store_order', 'delivery_type', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '发货类型', NULL);
-INSERT INTO `column_config` VALUES (236, 'yx_store_order', 'delivery_id', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '快递单号/手机号', NULL);
-INSERT INTO `column_config` VALUES (237, 'yx_store_order', 'gain_integral', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '消费赚取积分', NULL);
-INSERT INTO `column_config` VALUES (238, 'yx_store_order', 'use_integral', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '使用积分', NULL);
-INSERT INTO `column_config` VALUES (239, 'yx_store_order', 'back_integral', 'decimal', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '给用户退了多少积分', NULL);
-INSERT INTO `column_config` VALUES (240, 'yx_store_order', 'mark', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '备注', NULL);
-INSERT INTO `column_config` VALUES (241, 'yx_store_order', 'is_del', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '是否删除', NULL);
-INSERT INTO `column_config` VALUES (242, 'yx_store_order', 'unique', 'char', NULL, '', b'1', NULL, 'UNI', b'1', b'1', NULL, '唯一id(md5加密)类似id', NULL);
-INSERT INTO `column_config` VALUES (243, 'yx_store_order', 'remark', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '管理员备注', NULL);
-INSERT INTO `column_config` VALUES (244, 'yx_store_order', 'mer_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '商户ID', NULL);
-INSERT INTO `column_config` VALUES (245, 'yx_store_order', 'is_mer_check', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (246, 'yx_store_order', 'combination_id', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '拼团产品id0一般产品', NULL);
-INSERT INTO `column_config` VALUES (247, 'yx_store_order', 'pink_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '拼团id 0没有拼团', NULL);
-INSERT INTO `column_config` VALUES (248, 'yx_store_order', 'cost', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '成本价', NULL);
-INSERT INTO `column_config` VALUES (249, 'yx_store_order', 'seckill_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '秒杀产品ID', NULL);
-INSERT INTO `column_config` VALUES (250, 'yx_store_order', 'bargain_id', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '砍价id', NULL);
-INSERT INTO `column_config` VALUES (251, 'yx_store_order', 'verify_code', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '核销码', NULL);
-INSERT INTO `column_config` VALUES (252, 'yx_store_order', 'store_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '门店id', NULL);
-INSERT INTO `column_config` VALUES (253, 'yx_store_order', 'shipping_type', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '配送方式 1=快递 ,2=门店自提', NULL);
-INSERT INTO `column_config` VALUES (254, 'yx_store_order', 'is_channel', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '支付渠道(0微信公众号1微信小程序)', NULL);
-INSERT INTO `column_config` VALUES (255, 'yx_store_order', 'is_remind', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (256, 'yx_store_order', 'is_system_del', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (257, 'yx_user_recharge', 'id', 'int', NULL, 'auto_increment', b'0', NULL, 'PRI', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (258, 'yx_user_recharge', 'uid', 'int', NULL, '', b'0', NULL, 'MUL', b'0', b'0', NULL, '充值用户UID', NULL);
-INSERT INTO `column_config` VALUES (259, 'yx_user_recharge', 'order_id', 'varchar', NULL, '', b'0', NULL, 'UNI', b'1', b'0', NULL, '订单号', NULL);
-INSERT INTO `column_config` VALUES (260, 'yx_user_recharge', 'price', 'decimal', NULL, '', b'0', NULL, '', b'1', b'0', NULL, '充值金额', NULL);
-INSERT INTO `column_config` VALUES (261, 'yx_user_recharge', 'recharge_type', 'varchar', NULL, '', b'0', NULL, 'MUL', b'1', b'0', NULL, '充值类型', NULL);
-INSERT INTO `column_config` VALUES (262, 'yx_user_recharge', 'paid', 'tinyint', NULL, '', b'0', NULL, 'MUL', b'1', b'0', NULL, '是否充值', NULL);
-INSERT INTO `column_config` VALUES (263, 'yx_user_recharge', 'pay_time', 'int', NULL, '', b'0', NULL, '', b'1', b'0', NULL, '充值支付时间', NULL);
-INSERT INTO `column_config` VALUES (264, 'yx_user_recharge', 'add_time', 'int', NULL, '', b'0', NULL, '', b'1', b'0', NULL, '充值时间', NULL);
-INSERT INTO `column_config` VALUES (265, 'yx_user_recharge', 'refund_price', 'decimal', NULL, '', b'0', NULL, '', b'0', b'0', NULL, '退款金额', NULL);
-INSERT INTO `column_config` VALUES (266, 'yx_user_recharge', 'nickname', 'varchar', NULL, '', b'0', NULL, '', b'1', b'0', 'Like', '昵称', NULL);
-INSERT INTO `column_config` VALUES (267, 'yx_system_store', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (268, 'yx_system_store', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '门店名称', NULL);
-INSERT INTO `column_config` VALUES (269, 'yx_system_store', 'introduction', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '简介', NULL);
-INSERT INTO `column_config` VALUES (270, 'yx_system_store', 'phone', 'char', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '手机号码', NULL);
-INSERT INTO `column_config` VALUES (271, 'yx_system_store', 'address', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '省市区', NULL);
-INSERT INTO `column_config` VALUES (272, 'yx_system_store', 'detailed_address', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '详细地址', NULL);
-INSERT INTO `column_config` VALUES (273, 'yx_system_store', 'image', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '门店logo', NULL);
-INSERT INTO `column_config` VALUES (274, 'yx_system_store', 'latitude', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '纬度', NULL);
-INSERT INTO `column_config` VALUES (275, 'yx_system_store', 'longitude', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '经度', NULL);
-INSERT INTO `column_config` VALUES (276, 'yx_system_store', 'valid_time', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '核销有效日期', NULL);
-INSERT INTO `column_config` VALUES (277, 'yx_system_store', 'day_time', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '每日营业开关时间', NULL);
-INSERT INTO `column_config` VALUES (278, 'yx_system_store', 'add_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '添加时间', NULL);
-INSERT INTO `column_config` VALUES (279, 'yx_system_store', 'is_show', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否显示', NULL);
-INSERT INTO `column_config` VALUES (280, 'yx_system_store', 'is_del', 'tinyint', NULL, '', b'1', NULL, '', b'0', b'1', NULL, '是否删除', NULL);
-INSERT INTO `column_config` VALUES (281, 'yx_system_store_staff', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL);
-INSERT INTO `column_config` VALUES (282, 'yx_system_store_staff', 'uid', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '微信用户id', NULL);
-INSERT INTO `column_config` VALUES (283, 'yx_system_store_staff', 'avatar', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '店员头像', NULL);
-INSERT INTO `column_config` VALUES (284, 'yx_system_store_staff', 'store_id', 'int', NULL, '', b'1', 'Select', '', b'1', b'1', NULL, '门店id', NULL);
-INSERT INTO `column_config` VALUES (285, 'yx_system_store_staff', 'staff_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', 'Like', '店员名称', NULL);
-INSERT INTO `column_config` VALUES (286, 'yx_system_store_staff', 'phone', 'char', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '手机号码', NULL);
-INSERT INTO `column_config` VALUES (287, 'yx_system_store_staff', 'verify_status', 'tinyint', NULL, '', b'1', 'Radio', '', b'1', b'1', NULL, '核销开关', NULL);
-INSERT INTO `column_config` VALUES (288, 'yx_system_store_staff', 'status', 'tinyint', NULL, '', b'1', 'Radio', '', b'1', b'0', NULL, '状态', NULL);
-INSERT INTO `column_config` VALUES (289, 'yx_system_store_staff', 'add_time', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '添加时间', NULL);
-INSERT INTO `column_config` VALUES (290, 'yx_system_store_staff', 'nickname', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', 'Like', '微信昵称', NULL);
-INSERT INTO `column_config` VALUES (291, 'yx_system_store_staff', 'store_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '所属门店', NULL);
-
--- ----------------------------
--- Table structure for dept
--- ----------------------------
-DROP TABLE IF EXISTS `dept`;
-CREATE TABLE `dept` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
- `pid` bigint(20) NOT NULL COMMENT '上级部门',
- `enabled` bit(1) NOT NULL COMMENT '状态',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of dept
--- ----------------------------
-INSERT INTO `dept` VALUES (1, 'YSHOP', 0, b'1', '2019-03-01 12:07:37');
-INSERT INTO `dept` VALUES (2, '研发部', 7, b'1', '2019-03-25 09:15:32');
-INSERT INTO `dept` VALUES (5, '运维部', 7, b'1', '2019-03-25 09:20:44');
-INSERT INTO `dept` VALUES (6, '测试部', 8, b'1', '2019-03-25 09:52:18');
-INSERT INTO `dept` VALUES (7, '华南分部', 1, b'1', '2019-03-25 11:04:50');
-INSERT INTO `dept` VALUES (8, '华北分部', 1, b'1', '2019-03-25 11:04:53');
-INSERT INTO `dept` VALUES (11, '人事部', 8, b'1', '2019-03-25 11:07:58');
-
--- ----------------------------
--- Table structure for dict
--- ----------------------------
-DROP TABLE IF EXISTS `dict`;
-CREATE TABLE `dict` (
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典名称',
- `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of dict
--- ----------------------------
-INSERT INTO `dict` VALUES (1, 'user_status', '用户状态', '2019-10-27 20:31:36');
-INSERT INTO `dict` VALUES (4, 'dept_status', '部门状态', '2019-10-27 20:31:36');
-INSERT INTO `dict` VALUES (5, 'job_status', '岗位状态', '2019-10-27 20:31:36');
-
--- ----------------------------
--- Table structure for dict_detail
--- ----------------------------
-DROP TABLE IF EXISTS `dict_detail`;
-CREATE TABLE `dict_detail` (
- `id` bigint(11) NOT NULL AUTO_INCREMENT,
- `label` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典标签',
- `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字典值',
- `sort` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '排序',
- `dict_id` bigint(11) NULL DEFAULT NULL COMMENT '字典id',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `FK5tpkputc6d9nboxojdbgnpmyb`(`dict_id`) USING BTREE,
- CONSTRAINT `FK5tpkputc6d9nboxojdbgnpmyb` FOREIGN KEY (`dict_id`) REFERENCES `dict` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典详情' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of dict_detail
--- ----------------------------
-INSERT INTO `dict_detail` VALUES (1, '激活', 'true', '1', 1, '2019-10-27 20:31:36');
-INSERT INTO `dict_detail` VALUES (2, '禁用', 'false', '2', 1, NULL);
-INSERT INTO `dict_detail` VALUES (3, '启用', 'true', '1', 4, NULL);
-INSERT INTO `dict_detail` VALUES (4, '停用', 'false', '2', 4, '2019-10-27 20:31:36');
-INSERT INTO `dict_detail` VALUES (5, '启用', 'true', '1', 5, NULL);
-INSERT INTO `dict_detail` VALUES (6, '停用', 'false', '2', 5, '2019-10-27 20:31:36');
-
--- ----------------------------
--- Table structure for email_config
--- ----------------------------
-DROP TABLE IF EXISTS `email_config`;
-CREATE TABLE `email_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `from_user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收件人',
- `host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮件服务器SMTP地址',
- `pass` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
- `port` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '端口',
- `user` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发件者用户名',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮箱配置' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of email_config
--- ----------------------------
-INSERT INTO `email_config` VALUES (1, '111@qq.com', '111', '111', '111', '1');
-
--- ----------------------------
--- Table structure for gen_config
--- ----------------------------
-DROP TABLE IF EXISTS `gen_config`;
-CREATE TABLE `gen_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `table_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表名',
- `author` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '作者',
- `cover` bit(1) NULL DEFAULT NULL COMMENT '是否覆盖',
- `module_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模块名称',
- `pack` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '至于哪个包下',
- `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端代码生成的路径',
- `api_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前端Api文件路径',
- `prefix` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表前缀',
- `api_alias` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接口名称',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成器配置' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of gen_config
--- ----------------------------
-INSERT INTO `gen_config` VALUES (3, 'gen_test', 'Zheng Jie', b'1', 'eladmin-system', 'me.zhengjie.gen', 'E:\\workspace\\me\\front\\eladmin-web\\src\\views\\gen', 'E:\\workspace\\me\\front\\eladmin-web\\src\\api', NULL, '测试生成');
-INSERT INTO `gen_config` VALUES (4, 'yx_material_group', 'hupeng', b'0', 'yshop-shop', 'co.yixiang.modules.shop', 'E:\\output', 'E:\\output\\', NULL, '素材');
-INSERT INTO `gen_config` VALUES (5, 'yx_material', 'hupeng', b'0', 'yshop-shop', 'co.yixiang.modules.shop', 'E:\\output', 'E:\\output\\', NULL, '素材管理');
-INSERT INTO `gen_config` VALUES (6, 'yx_user', 'hupeng', b'0', 'yshop-system', 'co.yixiang.modules', 'aa', 'aa\\', NULL, '用户');
-INSERT INTO `gen_config` VALUES (7, 'yx_wechat_media', 'hupeng', b'0', 'yshop-system', 'co.yixiang.modules', 'E:\\book\\img', 'E:\\book\\img\\', NULL, 'ceshi');
-INSERT INTO `gen_config` VALUES (8, 'yx_user_recharge', 'hupeng', b'0', 'yshop-shop', 'co.yixiang.modules.shop', 'E:\\java\\yxshop-private\\yshop-web\\src\\views\\shop\\recharge', 'E:\\java\\yxshop-private\\yshop-web\\src\\api', '', '充值管理');
-INSERT INTO `gen_config` VALUES (9, 'yx_system_store', 'hupeng', b'0', 'yshop-shop', 'co.yixiang.modules.shop', 'E:\\java\\yxshop-private\\yshop-web\\src\\views\\shop\\store', 'E:\\java\\yxshop-private\\yshop-web\\src\\api', NULL, '门店');
-INSERT INTO `gen_config` VALUES (10, 'yx_system_store_staff', 'hupeng', b'1', 'yshop-shop', 'co.yixiang.modules.shop', 'E:\\java\\yxshop-private\\yshop-web\\src\\views\\shop\\storestaff', 'E:\\java\\yxshop-private\\yshop-web\\src\\api', NULL, '门店店员');
-
--- ----------------------------
--- Table structure for gen_test
--- ----------------------------
-DROP TABLE IF EXISTS `gen_test`;
-CREATE TABLE `gen_test` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `sex` int(255) NULL DEFAULT NULL COMMENT '性别',
- `create_time` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成测试' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for job
--- ----------------------------
-DROP TABLE IF EXISTS `job`;
-CREATE TABLE `job` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位名称',
- `enabled` bit(1) NOT NULL COMMENT '岗位状态',
- `sort` bigint(20) NOT NULL COMMENT '岗位排序',
- `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `FKmvhj0rogastlctflsxf1d6k3i`(`dept_id`) USING BTREE,
- CONSTRAINT `FKmvhj0rogastlctflsxf1d6k3i` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '岗位' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of job
--- ----------------------------
-INSERT INTO `job` VALUES (8, '人事专员', b'1', 3, 11, '2019-03-29 14:52:28');
-INSERT INTO `job` VALUES (10, '产品经理', b'1', 4, 2, '2019-03-29 14:55:51');
-INSERT INTO `job` VALUES (11, '全栈开发', b'1', 2, 2, '2019-03-31 13:39:30');
-INSERT INTO `job` VALUES (12, '软件测试', b'1', 5, 2, '2019-03-31 13:39:43');
-
--- ----------------------------
--- Table structure for local_storage
--- ----------------------------
-DROP TABLE IF EXISTS `local_storage`;
-CREATE TABLE `local_storage` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `real_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件真实的名称',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名',
- `suffix` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '后缀',
- `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径',
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型',
- `size` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '大小',
- `operate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '本地存储' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of local_storage
--- ----------------------------
-INSERT INTO `local_storage` VALUES (1, 'list_30-20200107120524671.png', 'list_30', 'png', 'E:\\yshop\\file\\图片\\list_30-20200107120524671.png', '图片', '28.57KB ', 'admin', '2020-01-07 12:05:25');
-INSERT INTO `local_storage` VALUES (2, 'list_34-20200109071140374.png', 'list_34', 'png', 'E:\\yshop\\file\\图片\\list_34-20200109071140374.png', '图片', '27.05KB ', 'admin', '2020-01-09 19:11:40');
-INSERT INTO `local_storage` VALUES (3, 'list_22-20200109072256534.png', 'list_22', 'png', 'E:\\yshop\\file\\pic\\list_22-20200109072256534.png', 'pic', '28.23KB ', 'admin', '2020-01-09 19:22:57');
-INSERT INTO `local_storage` VALUES (4, 'list_32-20200109093407741.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109093407741.png', 'pic', '27.65KB ', 'admin', '2020-01-09 21:34:08');
-INSERT INTO `local_storage` VALUES (5, 'list_32-20200109094223500.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109094223500.png', 'pic', '27.65KB ', 'admin', '2020-01-09 21:42:24');
-INSERT INTO `local_storage` VALUES (6, 'list_32-20200109094413459.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109094413459.png', 'pic', '27.65KB ', 'admin', '2020-01-09 21:44:13');
-INSERT INTO `local_storage` VALUES (7, 'list_32-20200109094652138.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109094652138.png', 'pic', '27.65KB ', 'admin', '2020-01-09 21:46:52');
-INSERT INTO `local_storage` VALUES (8, 'list_34-20200109095146476.png', 'list_34', 'png', 'E:\\yshop\\file\\pic\\list_34-20200109095146476.png', 'pic', '27.05KB ', 'admin', '2020-01-09 21:51:47');
-INSERT INTO `local_storage` VALUES (9, 'list_32-20200109095700685.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109095700685.png', 'pic', '27.65KB ', 'admin', '2020-01-09 21:57:01');
-INSERT INTO `local_storage` VALUES (10, 'list_20-20200109095936988.png', 'list_20', 'png', 'E:\\yshop\\file\\pic\\list_20-20200109095936988.png', 'pic', '22.92KB ', 'admin', '2020-01-09 21:59:37');
-INSERT INTO `local_storage` VALUES (11, 'list_32-20200109100213309.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200109100213309.png', 'pic', '27.65KB ', 'admin', '2020-01-09 22:02:13');
-INSERT INTO `local_storage` VALUES (12, 'list_30-20200109104513493.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-20200109104513493.png', 'pic', '28.57KB ', 'admin', '2020-01-09 22:45:13');
-INSERT INTO `local_storage` VALUES (13, 'list_16-20200110120838173.png', 'list_16', 'png', 'E:\\yshop\\file\\pic\\list_16-20200110120838173.png', 'pic', '28.93KB ', 'admin', '2020-01-10 12:08:38');
-INSERT INTO `local_storage` VALUES (14, 'list_32-20200110035831202.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200110035831202.png', 'pic', '27.65KB ', 'admin', '2020-01-10 15:58:31');
-INSERT INTO `local_storage` VALUES (15, 'list_32-2020011004054091.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-2020011004054091.png', 'pic', '27.65KB ', 'admin', '2020-01-10 16:05:40');
-INSERT INTO `local_storage` VALUES (16, 'list_30-20200110053337209.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-20200110053337209.png', 'pic', '28.57KB ', 'admin', '2020-01-10 17:33:37');
-INSERT INTO `local_storage` VALUES (17, 'list_32-20200110064436937.png', 'list_32', 'png', 'E:\\yshop\\file\\pic\\list_32-20200110064436937.png', 'pic', '27.65KB ', 'admin', '2020-01-10 18:44:37');
-INSERT INTO `local_storage` VALUES (18, 'list_22-20200110104217508.png', 'list_22', 'png', 'E:\\yshop\\file\\pic\\list_22-20200110104217508.png', 'pic', '28.23KB ', 'admin', '2020-01-10 22:42:18');
-INSERT INTO `local_storage` VALUES (19, 'list_18-20200111051038569.png', 'list_18', 'png', 'E:\\yshop\\file\\pic\\list_18-20200111051038569.png', 'pic', '29.62KB ', '15136175246', '2020-01-11 17:10:39');
-INSERT INTO `local_storage` VALUES (20, 'list_30-2020011105115469.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-2020011105115469.png', 'pic', '28.57KB ', '15136175246', '2020-01-11 17:11:54');
-INSERT INTO `local_storage` VALUES (21, 'list_30-20200111051343335.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-20200111051343335.png', 'pic', '28.57KB ', '15136175246', '2020-01-11 17:13:43');
-INSERT INTO `local_storage` VALUES (22, 'list_16-20200111051622984.png', 'list_16', 'png', 'E:\\yshop\\file\\pic\\list_16-20200111051622984.png', 'pic', '28.93KB ', '15136175246', '2020-01-11 17:16:23');
-INSERT INTO `local_storage` VALUES (23, 'list_24-20200111051630227.png', 'list_24', 'png', 'E:\\yshop\\file\\pic\\list_24-20200111051630227.png', 'pic', '27.31KB ', '15136175246', '2020-01-11 17:16:30');
-INSERT INTO `local_storage` VALUES (24, 'logo-20200131103905417.png', 'logo', 'png', 'E:\\yshop\\file\\pic\\logo-20200131103905417.png', 'pic', '48.39KB ', 'admin', '2020-01-31 10:39:05');
-INSERT INTO `local_storage` VALUES (25, 'avatar-20200131103928688.png', 'avatar', 'png', 'E:\\yshop\\file\\pic\\avatar-20200131103928688.png', 'pic', '1.82KB ', 'admin', '2020-01-31 10:39:29');
-INSERT INTO `local_storage` VALUES (26, 'list_13-2020013110394473.png', 'list_13', 'png', 'E:\\yshop\\file\\pic\\list_13-2020013110394473.png', 'pic', '23.05KB ', 'admin', '2020-01-31 10:39:44');
-INSERT INTO `local_storage` VALUES (27, 'list_18-2020013110394988.png', 'list_18', 'png', 'E:\\yshop\\file\\pic\\list_18-2020013110394988.png', 'pic', '29.62KB ', 'admin', '2020-01-31 10:39:49');
-INSERT INTO `local_storage` VALUES (28, 'list_22-20200131103952926.png', 'list_22', 'png', 'E:\\yshop\\file\\pic\\list_22-20200131103952926.png', 'pic', '28.23KB ', 'admin', '2020-01-31 10:39:53');
-INSERT INTO `local_storage` VALUES (29, 'list_26-20200131103956836.png', 'list_26', 'png', 'E:\\yshop\\file\\pic\\list_26-20200131103956836.png', 'pic', '28.36KB ', 'admin', '2020-01-31 10:39:57');
-INSERT INTO `local_storage` VALUES (30, 'list_28-20200131104001169.png', 'list_28', 'png', 'E:\\yshop\\file\\pic\\list_28-20200131104001169.png', 'pic', '28.38KB ', 'admin', '2020-01-31 10:40:01');
-INSERT INTO `local_storage` VALUES (31, 'list_16-20200207061544740.png', 'list_16', 'png', 'E:\\yshop\\file\\pic\\list_16-20200207061544740.png', 'pic', '28.93KB ', 'hupeng', '2020-02-07 18:15:45');
-INSERT INTO `local_storage` VALUES (32, 'list_30-2020020706162996.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-2020020706162996.png', 'pic', '28.57KB ', 'hupeng', '2020-02-07 18:16:29');
-INSERT INTO `local_storage` VALUES (33, 'list_16-20200207061714702.png', 'list_16', 'png', 'E:\\yshop\\file\\pic\\list_16-20200207061714702.png', 'pic', '28.93KB ', 'hupeng', '2020-02-07 18:17:15');
-INSERT INTO `local_storage` VALUES (34, 'list_18-20200207061743361.png', 'list_18', 'png', 'E:\\yshop\\file\\pic\\list_18-20200207061743361.png', 'pic', '29.62KB ', 'hupeng', '2020-02-07 18:17:43');
-INSERT INTO `local_storage` VALUES (35, 'list_30-20200207062920744.png', 'list_30', 'png', 'E:\\yshop\\file\\pic\\list_30-20200207062920744.png', 'pic', '28.57KB ', 'hupeng', '2020-02-07 18:29:21');
-INSERT INTO `local_storage` VALUES (36, '05ea40b831858a8cf423aa709840507c-20200228083801500.png', '05ea40b831858a8cf423aa709840507c', 'png', 'E:\\yshop\\file\\pic\\05ea40b831858a8cf423aa709840507c-20200228083801500.png', 'pic', '5.19KB ', 'admin', '2020-02-28 20:38:02');
-INSERT INTO `local_storage` VALUES (37, '05ea40b831858a8cf423aa709840507c-20200311043711341.png', '05ea40b831858a8cf423aa709840507c', 'png', 'E:\\yshop\\file\\pic\\05ea40b831858a8cf423aa709840507c-20200311043711341.png', 'pic', '5.19KB ', 'admin', '2020-03-11 16:37:11');
-INSERT INTO `local_storage` VALUES (38, '秒杀-2020031104371672.png', '秒杀', 'png', 'E:\\yshop\\file\\pic\\秒杀-2020031104371672.png', 'pic', '6.07KB ', 'admin', '2020-03-11 16:37:16');
-INSERT INTO `local_storage` VALUES (39, '砍价-20200311043720679.png', '砍价', 'png', 'E:\\yshop\\file\\pic\\砍价-20200311043720679.png', 'pic', '6.13KB ', 'admin', '2020-03-11 16:37:21');
-INSERT INTO `local_storage` VALUES (40, '优惠券-20200311043724709.png', '优惠券', 'png', 'E:\\yshop\\file\\pic\\优惠券-20200311043724709.png', 'pic', '5.45KB ', 'admin', '2020-03-11 16:37:25');
-INSERT INTO `local_storage` VALUES (41, '资讯-20200311043727918.png', '资讯', 'png', 'E:\\yshop\\file\\pic\\资讯-20200311043727918.png', 'pic', '5.19KB ', 'admin', '2020-03-11 16:37:28');
-INSERT INTO `local_storage` VALUES (42, 'list_16-20200322071324803.png', 'list_16', 'png', 'E:\\yshop\\file\\pic\\list_16-20200322071324803.png', 'pic', '28.93KB ', 'admin', '2020-03-22 19:13:25');
-INSERT INTO `local_storage` VALUES (43, 'list_22-20200322071348844.png', 'list_22', 'png', 'E:\\yshop\\file\\pic\\list_22-20200322071348844.png', 'pic', '28.23KB ', 'admin', '2020-03-22 19:13:49');
-INSERT INTO `local_storage` VALUES (44, 'list_34-2020032207154023.png', 'list_34', 'png', 'E:\\yshop\\file\\pic\\list_34-2020032207154023.png', 'pic', '27.05KB ', 'admin', '2020-03-22 19:15:40');
-INSERT INTO `local_storage` VALUES (45, '钻石-20200328094531898.jpg', '钻石', 'jpg', 'E:\\yshop\\file\\pic\\钻石-20200328094531898.jpg', 'pic', '32.42KB ', 'admin', '2020-03-28 21:45:32');
-
--- ----------------------------
--- Table structure for log
--- ----------------------------
-DROP TABLE IF EXISTS `log`;
-CREATE TABLE `log` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `create_time` datetime(0) NULL DEFAULT NULL,
- `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `exception_detail` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
- `log_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
- `method` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `params` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
- `request_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `time` bigint(20) NULL DEFAULT NULL,
- `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `browser` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `type` int(1) NULL DEFAULT 0,
- `uid` bigint(20) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 416611 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统日志' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for menu
--- ----------------------------
-DROP TABLE IF EXISTS `menu`;
-CREATE TABLE `menu` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `i_frame` bit(1) NULL DEFAULT NULL COMMENT '是否外链',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
- `component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件',
- `pid` bigint(20) NOT NULL COMMENT '上级菜单ID',
- `sort` bigint(20) NOT NULL COMMENT '排序',
- `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标',
- `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '链接地址',
- `cache` bit(1) NULL DEFAULT b'0' COMMENT '缓存',
- `hidden` bit(1) NULL DEFAULT b'0' COMMENT '是否隐藏',
- `component_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '-' COMMENT '组件名称',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- `permission` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限',
- `type` int(11) NULL DEFAULT NULL COMMENT '类型',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `FKqcf9gem97gqa5qjm4d3elcqt5`(`pid`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 184 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of menu
--- ----------------------------
-INSERT INTO `menu` VALUES (1, b'0', '系统管理', NULL, 0, 99, 'system', 'system', b'0', b'0', NULL, '2018-12-18 15:11:29', NULL, 1);
-INSERT INTO `menu` VALUES (2, b'0', '用户管理', 'system/user/index', 1, 2, 'peoples', 'user', b'0', b'0', 'User', '2018-12-18 15:14:44', NULL, 1);
-INSERT INTO `menu` VALUES (3, b'0', '角色管理', 'system/role/index', 1, 3, 'role', 'role', b'0', b'0', 'Role', '2018-12-18 15:16:07', NULL, 1);
-INSERT INTO `menu` VALUES (5, b'0', '菜单管理', 'system/menu/index', 1, 5, 'menu', 'menu', b'0', b'0', 'Menu', '2018-12-18 15:17:28', 'admin,menu:list,roles:list', 1);
-INSERT INTO `menu` VALUES (6, b'0', '系统监控', NULL, 0, 100, 'monitor', 'monitor', b'0', b'0', NULL, '2018-12-18 15:17:48', NULL, 1);
-INSERT INTO `menu` VALUES (7, b'0', '操作日志', 'monitor/log/index', 6, 11, 'log', 'logs', b'1', b'0', 'Log', '2018-12-18 15:18:26', NULL, 1);
-INSERT INTO `menu` VALUES (9, b'0', 'SQL监控', 'monitor/sql/index', 6, 14, 'sqlMonitor', 'druid', b'0', b'0', 'Sql', '2018-12-18 15:19:34', NULL, 1);
-INSERT INTO `menu` VALUES (14, b'0', '邮件工具', 'tools/email/index', 36, 24, 'email', 'email', b'0', b'0', 'Email', '2018-12-27 10:13:09', NULL, 1);
-INSERT INTO `menu` VALUES (16, b'0', '图床管理', 'tools/picture/index', 36, 25, 'image', 'pictures', b'0', b'0', 'Pictures', '2018-12-28 09:36:53', 'pictures:list', 1);
-INSERT INTO `menu` VALUES (18, b'0', '存储管理', 'tools/storage/index', 36, 23, 'qiniu', 'storage', b'0', b'0', 'Storage', '2018-12-31 11:12:15', 'storage:list', 1);
-INSERT INTO `menu` VALUES (19, b'0', '支付宝工具', 'tools/aliPay/index', 36, 27, 'alipay', 'aliPay', b'0', b'0', 'AliPay', '2018-12-31 14:52:38', NULL, 1);
-INSERT INTO `menu` VALUES (28, b'0', '定时任务', 'system/timing/index', 36, 21, 'timing', 'timing', b'0', b'0', 'Timing', '2019-01-07 20:34:40', 'timing:list', 1);
-INSERT INTO `menu` VALUES (30, b'0', '代码生成', 'generator/index', 36, 22, 'dev', 'generator', b'0', b'0', 'GeneratorIndex', '2019-01-11 15:45:55', NULL, 1);
-INSERT INTO `menu` VALUES (32, b'0', '异常日志', 'monitor/log/errorLog', 6, 12, 'error', 'errorLog', b'0', b'0', 'ErrorLog', '2019-01-13 13:49:03', NULL, 1);
-INSERT INTO `menu` VALUES (35, b'0', '部门管理', 'system/dept/index', 1, 6, 'dept', 'dept', b'0', b'0', 'Dept', '2019-03-25 09:46:00', NULL, 1);
-INSERT INTO `menu` VALUES (36, b'0', '系统工具', '', 0, 101, 'sys-tools', 'sys-tools', b'0', b'0', NULL, '2019-03-29 10:57:35', NULL, 1);
-INSERT INTO `menu` VALUES (37, b'0', '岗位管理', 'system/job/index', 1, 7, 'Steve-Jobs', 'job', b'0', b'0', 'Job', '2019-03-29 13:51:18', NULL, 1);
-INSERT INTO `menu` VALUES (39, b'0', '字典管理', 'system/dict/index', 1, 8, 'dictionary', 'dict', b'0', b'0', 'Dict', '2019-04-10 11:49:04', NULL, 1);
-INSERT INTO `menu` VALUES (40, b'0', '商品管理', '', 0, 1, 'shop', 'shop', b'1', b'0', '', '2019-10-03 17:40:19', NULL, 1);
-INSERT INTO `menu` VALUES (41, b'0', '商品分类', 'shop/cate/index', 40, 11, 'icon', 'cate', b'0', b'0', 'Cate', '2019-10-03 17:42:35', 'YXSTORECATEGORY_SELECT', 1);
-INSERT INTO `menu` VALUES (45, b'0', '管理商品', 'shop/goods/tab', 40, 12, 'develop', 'goods', b'1', b'0', 'Goods', '2019-10-04 15:34:35', 'YXSTOREPRODUCT_SELECT', 1);
-INSERT INTO `menu` VALUES (46, b'0', '会员管理', '', 0, 2, 'peoples', 'member', b'0', b'0', '', '2019-10-06 16:18:05', NULL, 1);
-INSERT INTO `menu` VALUES (47, b'0', '会员', 'shop/user/index', 46, 21, 'peoples', 'member', b'0', b'0', 'Member', '2019-10-06 16:20:17', 'YXUSER_SELECT', 1);
-INSERT INTO `menu` VALUES (48, b'0', '微信管理', '', 0, 3, 'weixin', 'wechat', b'0', b'0', '', '2019-10-06 18:28:54', NULL, 1);
-INSERT INTO `menu` VALUES (49, b'0', '微信菜单', 'wechat/menu/index', 48, 31, 'menu', 'wemenu', b'0', b'0', 'WeMenu', '2019-10-06 18:31:06', NULL, 1);
-INSERT INTO `menu` VALUES (50, b'0', '图文管理', 'wechat/article/index', 48, 32, 'article', 'wearticle', b'0', b'0', 'WeArticle', '2019-10-07 17:33:45', NULL, 1);
-INSERT INTO `menu` VALUES (51, b'0', '自动回复', 'wechat/reply/index', 48, 33, 'reply', 'wereply', b'0', b'0', 'Wereply', '2019-10-10 09:58:31', NULL, 1);
-INSERT INTO `menu` VALUES (52, b'0', '公众号配置', 'wechat/config/index', 48, 34, 'configure', 'weconfig', b'0', b'0', 'WeConfig', '2019-10-10 15:52:24', NULL, 1);
-INSERT INTO `menu` VALUES (53, b'0', '订单管理', '', 0, 4, 'lock', 'order', b'0', b'0', '', '2019-10-14 14:35:18', NULL, 1);
-INSERT INTO `menu` VALUES (54, b'0', '订单', 'shop/order/index', 53, 41, 'order', 'order', b'0', b'0', 'Order', '2019-10-14 14:36:28', 'YXSTOREORDER_SELECT', 1);
-INSERT INTO `menu` VALUES (55, b'0', '商城配置', '', 0, 5, 'configure', 'set', b'0', b'0', '', '2019-10-18 15:21:26', NULL, 1);
-INSERT INTO `menu` VALUES (56, b'0', '首页幻灯片', 'shop/set/index', 55, 51, 'banner', 'homeBanner', b'0', b'0', 'HomeBanner', '2019-10-18 15:24:30', NULL, 1);
-INSERT INTO `menu` VALUES (57, b'0', '首页导航按钮', 'shop/set/menu', 55, 52, 'button', 'homeMenus', b'0', b'0', 'HomeMenus', '2019-10-18 17:23:35', NULL, 1);
-INSERT INTO `menu` VALUES (59, b'0', '首页滚动新闻', 'shop/set/roll', 55, 54, 'news', 'roll', b'0', b'0', 'Roll', '2019-10-21 16:41:30', NULL, 1);
-INSERT INTO `menu` VALUES (60, b'0', '热门搜索', 'shop/set/hot', 55, 55, 'search', 'hot', b'0', b'0', 'Hot', '2019-10-26 18:21:54', NULL, 1);
-INSERT INTO `menu` VALUES (61, b'0', '个人中心菜单', 'shop/set/usermenu', 55, 56, 'menu', 'userMenu', b'0', b'0', 'UserMenu', '2019-10-26 18:42:18', NULL, 1);
-INSERT INTO `menu` VALUES (62, b'0', '评论管理', 'shop/reply/index', 53, 42, 'comment', 'reply', b'0', b'0', 'Reply', '2019-11-03 14:39:09', 'YXSTOREPRODUCTREPLY_SELECT', 1);
-INSERT INTO `menu` VALUES (63, b'0', '营销管理', '', 0, 6, 'yingxiao', 'activity', b'0', b'0', '', '2019-11-09 14:17:42', NULL, 1);
-INSERT INTO `menu` VALUES (64, b'0', '优惠券制作', 'activity/coupon/index', 63, 61, 'coupon', 'coupon', b'0', b'0', 'Coupon', '2019-11-09 14:18:58', 'YXSTORECOUPON_SELECT', 1);
-INSERT INTO `menu` VALUES (65, b'0', '已发布优惠券', 'activity/couponissue/index', 63, 62, 'coupon2', 'couponissue', b'0', b'0', 'Couponissue', '2019-11-09 14:20:35', 'YXSTORECOUPONISSUE_SELECT', 1);
-INSERT INTO `menu` VALUES (66, b'0', '优惠券领取记录', 'activity/storecouponuser/index', 63, 63, 'log', 'couponuser', b'0', b'0', 'Couponuser', '2019-11-09 14:21:35', NULL, 1);
-INSERT INTO `menu` VALUES (67, b'0', '优惠券配置', 'activity/coupon/set', 63, 64, 'log', 'couponset', b'0', b'1', 'Couponset', '2019-11-09 14:22:17', NULL, 1);
-INSERT INTO `menu` VALUES (68, b'0', '积分配置', 'wechat/config/point', 55, 59, 'configure', 'pointConfig', b'0', b'0', 'PointConfig', '2019-11-10 18:45:55', NULL, 1);
-INSERT INTO `menu` VALUES (69, b'0', '分销管理', '', 0, 7, 'fenxiao', 'promoter', b'0', b'0', '', '2019-11-11 10:42:16', NULL, 1);
-INSERT INTO `menu` VALUES (70, b'0', '分销配置', 'wechat/config/promoter', 69, 71, 'configure', 'promoterconfig', b'0', b'0', 'Promoterconfig', '2019-11-11 10:48:37', NULL, 1);
-INSERT INTO `menu` VALUES (71, b'0', '分销员', 'shop/user/aindex', 69, 72, 'user', 'agent', b'0', b'0', 'Agent', '2019-11-13 18:32:00', NULL, 1);
-INSERT INTO `menu` VALUES (72, b'0', '提现管理', 'activity/extract/index', 176, 81, 'tixian', 'extract', b'0', b'0', 'Extract', '2019-11-14 10:49:39', NULL, 1);
-INSERT INTO `menu` VALUES (73, b'0', '拼团产品', 'activity/combination/index', 63, 64, 'peoples', 'combination', b'0', b'0', 'Combination', '2019-11-18 14:23:04', 'YXSTORECOMBINATION_SELECT', 1);
-INSERT INTO `menu` VALUES (74, b'0', '拼团列表', 'activity/combinlist/index', 63, 65, 'list', 'pink', b'0', b'0', 'Pink', '2019-11-21 19:35:58', NULL, 1);
-INSERT INTO `menu` VALUES (75, b'0', '微信支付配置', 'wechat/config/pay', 48, 35, 'wxpay', 'wxpayconfig', b'0', b'0', 'Wxpayconfig', '2019-11-28 17:06:22', NULL, 1);
-INSERT INTO `menu` VALUES (76, b'0', '小程序配置', 'wechat/config/wxapp', 48, 36, 'configure', 'wxapp', b'0', b'0', 'Wxapp', '2019-11-29 15:13:46', NULL, 1);
-INSERT INTO `menu` VALUES (77, b'0', '会员等级', 'shop/userlevel/index', 46, 22, 'dengji', 'userlevel', b'0', b'0', 'Userlevel', '2019-12-04 16:35:41', 'YXSYSTEMUSERLEVEL_SELECT', 1);
-INSERT INTO `menu` VALUES (78, b'0', '等级任务', 'shop/usertask/index', 46, 23, 'task manege', 'usertask', b'0', b'0', 'Usertask', '2019-12-04 17:26:19', 'YXSYSTEMUSERTASK_SELECT', 1);
-INSERT INTO `menu` VALUES (79, b'0', '签到天数配置', 'shop/set/sign', 55, 57, 'sign2', 'signday', b'0', b'0', 'Signday', '2019-12-05 14:12:16', NULL, 1);
-INSERT INTO `menu` VALUES (80, b'0', '用户账单', 'shop/user/bill', 46, 24, 'list', 'bill', b'0', b'0', 'Bill', '2019-12-11 17:28:38', NULL, 1);
-INSERT INTO `menu` VALUES (81, b'0', '物流快递', 'shop/express/index', 53, 43, 'express', 'express', b'0', b'0', 'Express', '2019-12-12 16:36:00', 'YXEXPRESS_SELECT', 1);
-INSERT INTO `menu` VALUES (82, b'0', '微信模板消息', 'wechat/template/index', 48, 35, 'anq', 'template', b'0', b'0', 'Template', '2019-12-13 14:42:50', NULL, 1);
-INSERT INTO `menu` VALUES (83, b'0', '秒杀产品', 'activity/seckill/index', 63, 66, 'seckill', 'seckill', b'0', b'0', 'Seckill', '2019-12-16 13:06:29', 'YXSTORESECKILL_SELECT', 1);
-INSERT INTO `menu` VALUES (84, b'0', '秒杀配置', 'shop/set/seckill', 63, 67, 'configure', 'seckillconfig', b'0', b'0', 'Seckillconfig', '2019-12-16 16:07:42', NULL, 1);
-INSERT INTO `menu` VALUES (86, b'0', '砍价产品', 'activity/bargain/index', 63, 956, 'Sign', 'bargain', b'0', b'0', 'Bargain', '2019-12-22 12:25:55', 'YXSTOREBARGAIN_SELECT', 1);
-INSERT INTO `menu` VALUES (87, b'0', '生成配置', 'generator/config', 36, 33, 'dev', 'generator/config/:tableName', b'1', b'1', 'GeneratorConfig', '2019-11-17 20:08:56', '', 1);
-INSERT INTO `menu` VALUES (88, b'0', '生成预览', 'generator/preview', 36, 999, 'java', 'generator/preview/:tableName', b'1', b'1', 'Preview', '2019-11-26 14:54:36', NULL, 1);
-INSERT INTO `menu` VALUES (116, b'0', '生成配置', 'generator/config', 36, 33, 'dev', 'generator/config/:tableName', b'1', b'1', 'GeneratorConfig', '2019-11-17 20:08:56', '', 1);
-INSERT INTO `menu` VALUES (117, b'0', '图表库', 'components/Echarts', 10, 50, 'chart', 'echarts', b'1', b'0', 'Echarts', '2019-11-21 09:04:32', '', 1);
-INSERT INTO `menu` VALUES (118, b'0', '新增', NULL, 45, 1, NULL, NULL, b'0', b'0', NULL, '2019-12-24 13:00:47', 'YXSTOREPRODUCT_EDIT', 2);
-INSERT INTO `menu` VALUES (119, b'0', '修改', NULL, 45, 3, NULL, NULL, b'0', b'0', NULL, '2019-12-24 13:02:23', 'YXSTOREPRODUCT_CREATE', 2);
-INSERT INTO `menu` VALUES (120, b'0', '删除', NULL, 45, 4, NULL, NULL, b'0', b'0', NULL, '2019-12-24 13:03:51', 'YXSTOREPRODUCT_DELETE', 2);
-INSERT INTO `menu` VALUES (121, b'0', '在线用户', 'monitor/online/index', 6, 10, 'Steve-Jobs', 'online', b'0', b'0', 'OnlineUser', '2020-01-06 22:46:43', NULL, 1);
-INSERT INTO `menu` VALUES (122, b'0', '浏览记录', 'monitor/log/mlog', 40, 13, 'log', 'viewlog', b'0', b'0', 'Viewlog', '2020-01-07 13:17:21', NULL, 1);
-INSERT INTO `menu` VALUES (123, b'0', '后台接口文档', 'tools/swagger/index', 36, 31, 'swagger', 'swagger2', b'0', b'0', 'Swagger', '2020-01-07 18:05:52', NULL, 1);
-INSERT INTO `menu` VALUES (124, b'0', '在线会员', 'monitor/online/indext', 46, 25, 'Steve-Jobs', 'onlinet', b'0', b'0', 'OnlineMember', '2020-01-13 10:53:07', NULL, 1);
-INSERT INTO `menu` VALUES (125, b'0', '邮费配置', 'wechat/config/postage', 55, 58, 'configure', 'postageConfig', b'0', b'0', 'PostageConfig', '2020-02-13 15:38:24', NULL, 1);
-INSERT INTO `menu` VALUES (126, b'0', '编辑', NULL, 54, 1, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:05:28', 'YXSTOREORDER_EDIT', 2);
-INSERT INTO `menu` VALUES (127, b'0', '用户新增', NULL, 2, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:12:21', 'user:add', 2);
-INSERT INTO `menu` VALUES (128, b'0', '用户编辑', NULL, 2, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:12:47', 'user:edit', 2);
-INSERT INTO `menu` VALUES (129, b'0', '用户删除', NULL, 2, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:13:08', 'user:del', 2);
-INSERT INTO `menu` VALUES (130, b'0', '角色创建', NULL, 3, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:13:49', 'roles:add', 2);
-INSERT INTO `menu` VALUES (131, b'0', '角色修改', NULL, 3, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:14:11', 'roles:edit', 2);
-INSERT INTO `menu` VALUES (132, b'0', '角色删除', NULL, 3, 999, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:14:38', '4', 2);
-INSERT INTO `menu` VALUES (133, b'0', '菜单新增', NULL, 5, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:15:05', 'menu:add', 2);
-INSERT INTO `menu` VALUES (134, b'0', '菜单编辑', NULL, 5, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:18:44', 'menu:edit', 2);
-INSERT INTO `menu` VALUES (135, b'0', '菜单删除', NULL, 5, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:19:05', 'menu:del', 2);
-INSERT INTO `menu` VALUES (136, b'0', '部门新增', NULL, 35, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:07', 'dept:add', 2);
-INSERT INTO `menu` VALUES (137, b'0', '部门编辑', NULL, 35, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:33', 'dept:edit', 2);
-INSERT INTO `menu` VALUES (138, b'0', '部门删除', NULL, 35, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:53', 'dept:del', 2);
-INSERT INTO `menu` VALUES (139, b'0', '岗位新增', NULL, 37, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:29:04', 'job:add', 2);
-INSERT INTO `menu` VALUES (140, b'0', '岗位编辑', NULL, 37, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:48:38', 'job:edit', 2);
-INSERT INTO `menu` VALUES (141, b'0', '岗位删除', NULL, 37, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:00', 'job:del', 2);
-INSERT INTO `menu` VALUES (142, b'0', '字典新增', NULL, 39, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:26', 'dict:add', 2);
-INSERT INTO `menu` VALUES (143, b'0', '字典编辑', NULL, 39, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:39', 'dict:edit', 2);
-INSERT INTO `menu` VALUES (144, b'0', '字典删除', NULL, 39, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:56', 'dict:del', 2);
-INSERT INTO `menu` VALUES (145, b'0', '图片上传', NULL, 16, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:52:31', 'pictures:add', 2);
-INSERT INTO `menu` VALUES (146, b'0', '图片删除', NULL, 16, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:52:56', 'pictures:del', 2);
-INSERT INTO `menu` VALUES (147, b'0', '上传文件', NULL, 18, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:53:49', 'storage:add', 2);
-INSERT INTO `menu` VALUES (148, b'0', '文件编辑', NULL, 18, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:54:06', 'storage:edit', 2);
-INSERT INTO `menu` VALUES (149, b'0', '文件删除', NULL, 18, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:54:27', 'storage:del', 2);
-INSERT INTO `menu` VALUES (150, b'0', '任务新增', NULL, 28, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:55:58', 'timing:add', 2);
-INSERT INTO `menu` VALUES (151, b'0', '任务编辑', NULL, 28, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:56:54', 'timing:edit', 2);
-INSERT INTO `menu` VALUES (152, b'0', '任务删除', NULL, 28, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:57:10', 'timing:del', 2);
-INSERT INTO `menu` VALUES (153, b'0', '新增分类', NULL, 41, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:00:41', 'YXSTORECATEGORY_CREATE', 2);
-INSERT INTO `menu` VALUES (154, b'0', '分类编辑', NULL, 41, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:01:15', 'YXSTORECATEGORY_EDIT', 2);
-INSERT INTO `menu` VALUES (155, b'0', '分类删除', NULL, 41, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:01:37', 'YXSTORECATEGORY_DELETE', 2);
-INSERT INTO `menu` VALUES (156, b'0', '修改会员', NULL, 47, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:03:40', 'YXUSER_EDIT', 2);
-INSERT INTO `menu` VALUES (157, b'0', '等级新增', NULL, 77, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:06:55', 'YXSYSTEMUSERLEVEL_CREATE', 2);
-INSERT INTO `menu` VALUES (158, b'0', '等级编辑', NULL, 77, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:08:03', 'YXSYSTEMUSERLEVEL_EDIT', 2);
-INSERT INTO `menu` VALUES (159, b'0', '等级删除', NULL, 77, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:08:41', 'YXSYSTEMUSERLEVEL_DELETE', 2);
-INSERT INTO `menu` VALUES (160, b'0', '编辑任务', NULL, 78, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:10:08', 'YXSYSTEMUSERTASK_EDIT', 2);
-INSERT INTO `menu` VALUES (161, b'0', '评论删除', NULL, 62, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:14:22', 'YXSTOREPRODUCTREPLY_DELETE', 2);
-INSERT INTO `menu` VALUES (162, b'0', '新增物流', NULL, 81, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:15:33', 'YXEXPRESS_CREATE', 2);
-INSERT INTO `menu` VALUES (163, b'0', '编辑物流', NULL, 81, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:15:53', 'YXEXPRESS_EDIT', 2);
-INSERT INTO `menu` VALUES (164, b'0', '删除物流', NULL, 81, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:16:11', 'YXEXPRESS_DELETE', 2);
-INSERT INTO `menu` VALUES (165, b'0', '新增优惠券', NULL, 64, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:18:32', 'YXSTORECOUPON_CREATE', 2);
-INSERT INTO `menu` VALUES (166, b'0', '编辑优惠券', NULL, 64, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:18:50', 'YXSTORECOUPON_EDIT', 2);
-INSERT INTO `menu` VALUES (167, b'0', '删除优惠券', NULL, 64, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:19:10', 'YXSTORECOUPON_DELETE', 2);
-INSERT INTO `menu` VALUES (168, b'0', '编辑已发布', NULL, 65, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:20:23', 'YXSTORECOUPONISSUE_EDIT', 2);
-INSERT INTO `menu` VALUES (169, b'0', '删除已发布', NULL, 65, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:20:42', 'YXSTORECOUPONISSUE_DELETE', 2);
-INSERT INTO `menu` VALUES (170, b'0', '编辑拼团', NULL, 73, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:24:15', 'YXSTORECOMBINATION_EDIT', 2);
-INSERT INTO `menu` VALUES (171, b'0', '删除拼团', NULL, 73, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:24:37', 'YXSTORECOMBINATION_DELETE', 2);
-INSERT INTO `menu` VALUES (172, b'0', '编辑秒杀', NULL, 83, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:25:23', 'YXSTORESECKILL_EDIT', 2);
-INSERT INTO `menu` VALUES (173, b'0', '删除秒杀', NULL, 83, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:25:41', 'YXSTORESECKILL_DELETE', 2);
-INSERT INTO `menu` VALUES (174, b'0', '编辑砍价', NULL, 86, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:26:20', 'YXSTOREBARGAIN_EDIT', 2);
-INSERT INTO `menu` VALUES (175, b'0', '删除砍价', NULL, 86, 999, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:26:40', 'YXSTOREBARGAIN_DELETE', 2);
-INSERT INTO `menu` VALUES (176, b'0', '财务管理', NULL, 0, 8, 'price', 'price', b'0', b'0', NULL, '2020-03-02 22:30:23', NULL, 1);
-INSERT INTO `menu` VALUES (177, b'0', '充值管理', 'shop/recharge/index', 176, 82, 'rec', 'recharge', b'0', b'0', 'Recharge', '2020-03-02 23:05:26', NULL, 1);
-INSERT INTO `menu` VALUES (178, b'0', '门店管理', NULL, 0, 9, 'store', 'store', b'0', b'0', NULL, '2020-03-03 17:27:53', NULL, 1);
-INSERT INTO `menu` VALUES (179, b'0', '门店列表', 'shop/store/index', 178, 92, 'edit', 'storeinfo', b'0', b'0', 'Storeinfo', '2020-03-03 17:29:09', NULL, 1);
-INSERT INTO `menu` VALUES (180, b'0', '门店配置', 'shop/store/set', 178, 91, 'configure', 'storeset', b'0', b'0', 'Storeset', '2020-03-04 13:09:54', NULL, 1);
-INSERT INTO `menu` VALUES (181, b'0', '核销订单', 'shop/order/indext', 178, 95, 'order', 'ordert', b'0', b'0', 'Ordert', '2020-03-05 17:04:12', NULL, 1);
-INSERT INTO `menu` VALUES (182, b'0', '充值金额配置', 'shop/set/recharge', 55, 60, 'money', 'rechargeset', b'0', b'0', 'Rechargeset', '2020-03-21 14:24:05', NULL, 1);
-INSERT INTO `menu` VALUES (183, b'0', '店员列表', 'shop/storestaff/index', 178, 94, 'peoples', 'staff', b'0', b'0', 'Staff', '2020-03-22 14:11:36', NULL, 1);
-
--- ----------------------------
--- Table structure for mnt_app
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_app`;
-CREATE TABLE `mnt_app` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '应用ID',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '应用名称',
- `upload_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上传目录',
- `deploy_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署路径',
- `backup_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备份路径',
- `port` int(255) NULL DEFAULT NULL COMMENT '应用端口',
- `start_script` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '启动脚本',
- `deploy_script` varchar(4000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署脚本',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '应用管理' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for mnt_database
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_database`;
-CREATE TABLE `mnt_database` (
- `id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
- `jdbc_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'jdbc连接',
- `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号',
- `pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
- `create_time` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据库管理' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for mnt_deploy
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_deploy`;
-CREATE TABLE `mnt_deploy` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
- `app_id` bigint(20) NULL DEFAULT NULL COMMENT '应用编号',
- `create_time` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `FK6sy157pseoxx4fmcqr1vnvvhy`(`app_id`) USING BTREE,
- CONSTRAINT `FK6sy157pseoxx4fmcqr1vnvvhy` FOREIGN KEY (`app_id`) REFERENCES `mnt_app` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部署管理' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for mnt_deploy_history
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_deploy_history`;
-CREATE TABLE `mnt_deploy_history` (
- `id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '编号',
- `app_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '应用名称',
- `deploy_date` datetime(0) NOT NULL COMMENT '部署日期',
- `deploy_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '部署用户',
- `ip` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '服务器IP',
- `deploy_id` bigint(20) NULL DEFAULT NULL COMMENT '部署编号',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部署历史管理' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for mnt_deploy_server
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_deploy_server`;
-CREATE TABLE `mnt_deploy_server` (
- `deploy_id` bigint(20) NOT NULL,
- `server_id` bigint(20) NOT NULL,
- PRIMARY KEY (`deploy_id`, `server_id`) USING BTREE,
- INDEX `FKeaaha7jew9a02b3bk9ghols53`(`server_id`) USING BTREE,
- CONSTRAINT `FK3cehr56tedph6nk3gxsmeq0pb` FOREIGN KEY (`deploy_id`) REFERENCES `mnt_deploy` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKeaaha7jew9a02b3bk9ghols53` FOREIGN KEY (`server_id`) REFERENCES `mnt_server` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '应用与服务器关联' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for mnt_server
--- ----------------------------
-DROP TABLE IF EXISTS `mnt_server`;
-CREATE TABLE `mnt_server` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'IP地址',
- `account` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '账号',
- `ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'IP地址',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
- `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
- `port` int(11) NULL DEFAULT NULL COMMENT '端口',
- `create_time` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '服务器管理' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for monitor_server
--- ----------------------------
-DROP TABLE IF EXISTS `monitor_server`;
-CREATE TABLE `monitor_server` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `cpu_core` int(11) NULL DEFAULT NULL COMMENT 'CPU内核数',
- `cpu_rate` double NULL DEFAULT NULL COMMENT 'CPU使用率',
- `disk_total` double NULL DEFAULT NULL COMMENT '磁盘总量',
- `disk_used` double NULL DEFAULT NULL COMMENT '磁盘使用量',
- `mem_total` double NULL DEFAULT NULL COMMENT '内存总数',
- `mem_used` double NULL DEFAULT NULL COMMENT '内存使用量',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
- `port` int(11) NULL DEFAULT NULL COMMENT '访问端口',
- `sort` int(11) NULL DEFAULT NULL COMMENT '排序',
- `state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
- `swap_total` double NULL DEFAULT NULL COMMENT '交换区总量',
- `swap_used` double NULL DEFAULT NULL COMMENT '交换区使用量',
- `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '服务地址',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '服务监控' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of monitor_server
--- ----------------------------
-INSERT INTO `monitor_server` VALUES (1, 8, 0.05924018, 465.12402, 91.66521, 7.849415, 7.6052284, '本地', 8777, 999, '0', 14.599415, 11.263367, 'localhost');
-
--- ----------------------------
--- Table structure for picture
--- ----------------------------
-DROP TABLE IF EXISTS `picture`;
-CREATE TABLE `picture` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '上传日期',
- `delete_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除的URL',
- `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片名称',
- `height` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片高度',
- `size` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片大小',
- `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片地址',
- `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名称',
- `width` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片宽度',
- `md5code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件的MD5值',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'Sm.Ms图床' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for qiniu_config
--- ----------------------------
-DROP TABLE IF EXISTS `qiniu_config`;
-CREATE TABLE `qiniu_config` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `access_key` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'accessKey',
- `bucket` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Bucket 识别符',
- `host` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '外链域名',
- `secret_key` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'secretKey',
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '空间类型',
- `zone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '机房',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '七牛云配置' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of qiniu_config
--- ----------------------------
-INSERT INTO `qiniu_config` VALUES (1, '111111', 'yixiang', 'https://image.dayouqiantu.cn', '22222', '公开', '华东');
-
--- ----------------------------
--- Table structure for qiniu_content
--- ----------------------------
-DROP TABLE IF EXISTS `qiniu_content`;
-CREATE TABLE `qiniu_content` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `bucket` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Bucket 识别符',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名称',
- `size` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件大小',
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型:私有或公开',
- `update_time` datetime(0) NULL DEFAULT NULL COMMENT '上传或同步的时间',
- `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件url',
- `suffix` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '七牛云文件存储' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of qiniu_content
--- ----------------------------
-INSERT INTO `qiniu_content` VALUES (1, 'yixiang', 'list_34', '27.05KB ', '公开', '2020-01-07 12:05:41', 'https://pic.dayouqiantu.cn/list_34.png', 'png');
-INSERT INTO `qiniu_content` VALUES (2, 'yixiang', 'list_32', '27.65KB ', '公开', '2020-01-07 12:11:15', 'https://pic.dayouqiantu.cn/list_32.png', 'png');
-INSERT INTO `qiniu_content` VALUES (3, 'yixiang', 'list_30', '28.57KB ', '公开', '2020-01-07 12:13:26', 'https://image.dayouqiantu.cn/list_30.png', 'png');
-INSERT INTO `qiniu_content` VALUES (4, 'yixiang', 'list_34', '27.05KB ', '公开', '2020-01-07 12:32:15', 'https://image.dayouqiantu.cn/list_34.png', 'png');
-INSERT INTO `qiniu_content` VALUES (5, 'yixiang', 'list_32', '27.65KB ', '公开', '2020-01-07 12:53:11', 'https://image.dayouqiantu.cn/list_32.png', 'png');
-INSERT INTO `qiniu_content` VALUES (6, 'yixiang', 'list_34', '27.05KB ', '公开', '2020-01-07 13:05:55', 'https://image.dayouqiantu.cn/list_34.png', 'png');
-INSERT INTO `qiniu_content` VALUES (7, 'yixiang', 'list_32', '27.65KB ', '公开', '2020-01-07 13:08:32', 'https://image.dayouqiantu.cn/list_32.png', 'png');
-INSERT INTO `qiniu_content` VALUES (8, 'yixiang', 'list_22', '28.23KB ', '公开', '2020-01-07 13:08:38', 'https://image.dayouqiantu.cn/list_22.png', 'png');
-INSERT INTO `qiniu_content` VALUES (9, 'yixiang', 'list_32', '27.65KB ', '公开', '2020-01-07 13:08:49', 'https://image.dayouqiantu.cn/list_32.png', 'png');
-INSERT INTO `qiniu_content` VALUES (10, 'yixiang', 'list_34', '27.05KB ', '公开', '2020-01-10 12:02:24', 'https://image.dayouqiantu.cn/list_34.png', 'png');
-INSERT INTO `qiniu_content` VALUES (11, 'yixiang', 'list_32', '27.65KB ', '公开', '2020-01-10 16:49:48', 'https://image.dayouqiantu.cn/list_32.png', 'png');
-INSERT INTO `qiniu_content` VALUES (12, 'yixiang', 'list_20', '22.92KB ', '公开', '2020-01-10 22:43:47', 'https://image.dayouqiantu.cn/list_20.png', 'png');
-INSERT INTO `qiniu_content` VALUES (13, 'yixiang', 'list_24', '27.31KB ', '公开', '2020-01-10 22:44:21', 'https://image.dayouqiantu.cn/list_24.png', 'png');
-INSERT INTO `qiniu_content` VALUES (14, 'yixiang', 'list_28', '28.38KB ', '公开', '2020-01-11 17:06:00', 'https://image.dayouqiantu.cn/list_28.png', 'png');
-
--- ----------------------------
--- Table structure for quartz_job
--- ----------------------------
-DROP TABLE IF EXISTS `quartz_job`;
-CREATE TABLE `quartz_job` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `bean_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'Spring Bean名称',
- `cron_expression` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'cron 表达式',
- `is_pause` bit(1) NULL DEFAULT NULL COMMENT '状态:1暂停、0启用',
- `job_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务名称',
- `method_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '方法名称',
- `params` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数',
- `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of quartz_job
--- ----------------------------
-INSERT INTO `quartz_job` VALUES (1, 'visitsTask', '0 0 0 * * ?', b'0', '更新访客记录', 'run', NULL, '每日0点创建新的访客记录', '2019-01-08 14:53:31');
-INSERT INTO `quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '2019-08-22 14:08:29');
-INSERT INTO `quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', '2019-09-26 16:44:39');
-
--- ----------------------------
--- Table structure for quartz_log
--- ----------------------------
-DROP TABLE IF EXISTS `quartz_log`;
-CREATE TABLE `quartz_log` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `baen_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `create_time` datetime(0) NULL DEFAULT NULL,
- `cron_expression` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `exception_detail` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
- `is_success` bit(1) NULL DEFAULT NULL,
- `job_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `method_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `params` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `time` bigint(20) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务日志' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of quartz_log
--- ----------------------------
-INSERT INTO `quartz_log` VALUES (1, 'visitsTask', '2020-01-10 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 160);
-INSERT INTO `quartz_log` VALUES (2, 'visitsTask', '2020-03-10 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 42);
-INSERT INTO `quartz_log` VALUES (3, 'visitsTask', '2020-04-02 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 60);
-
--- ----------------------------
--- Table structure for role
--- ----------------------------
-DROP TABLE IF EXISTS `role`;
-CREATE TABLE `role` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
- `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
- `data_scope` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '数据权限',
- `level` int(255) NULL DEFAULT NULL COMMENT '角色级别',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- `permission` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '功能权限',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of role
--- ----------------------------
-INSERT INTO `role` VALUES (1, '超级管理员', '-', '全部', 1, '2018-11-23 11:04:37', 'admin');
-INSERT INTO `role` VALUES (2, '普通用户', '-', '本级', 2, '2018-11-23 13:09:06', 'common');
-INSERT INTO `role` VALUES (3, '管理员2', '222', '全部', 3, '2020-01-31 16:53:25', '22');
-
--- ----------------------------
--- Table structure for roles_depts
--- ----------------------------
-DROP TABLE IF EXISTS `roles_depts`;
-CREATE TABLE `roles_depts` (
- `role_id` bigint(20) NOT NULL,
- `dept_id` bigint(20) NOT NULL,
- PRIMARY KEY (`role_id`, `dept_id`) USING BTREE,
- INDEX `FK7qg6itn5ajdoa9h9o78v9ksur`(`dept_id`) USING BTREE,
- CONSTRAINT `FK7qg6itn5ajdoa9h9o78v9ksur` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKrg1ci4cxxfbja0sb0pddju7k` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色部门关联' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for roles_menus
--- ----------------------------
-DROP TABLE IF EXISTS `roles_menus`;
-CREATE TABLE `roles_menus` (
- `menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
- `role_id` bigint(20) NOT NULL COMMENT '角色ID',
- PRIMARY KEY (`menu_id`, `role_id`) USING BTREE,
- INDEX `FKcngg2qadojhi3a651a5adkvbq`(`role_id`) USING BTREE,
- CONSTRAINT `FKo7wsmlrrxb2osfaoavp46rv2r` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKtag324maketmxffly3pdyh193` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色菜单关联' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of roles_menus
--- ----------------------------
-INSERT INTO `roles_menus` VALUES (1, 1);
-INSERT INTO `roles_menus` VALUES (2, 1);
-INSERT INTO `roles_menus` VALUES (3, 1);
-INSERT INTO `roles_menus` VALUES (5, 1);
-INSERT INTO `roles_menus` VALUES (6, 1);
-INSERT INTO `roles_menus` VALUES (7, 1);
-INSERT INTO `roles_menus` VALUES (9, 1);
-INSERT INTO `roles_menus` VALUES (10, 1);
-INSERT INTO `roles_menus` VALUES (11, 1);
-INSERT INTO `roles_menus` VALUES (14, 1);
-INSERT INTO `roles_menus` VALUES (15, 1);
-INSERT INTO `roles_menus` VALUES (16, 1);
-INSERT INTO `roles_menus` VALUES (18, 1);
-INSERT INTO `roles_menus` VALUES (19, 1);
-INSERT INTO `roles_menus` VALUES (21, 1);
-INSERT INTO `roles_menus` VALUES (22, 1);
-INSERT INTO `roles_menus` VALUES (23, 1);
-INSERT INTO `roles_menus` VALUES (24, 1);
-INSERT INTO `roles_menus` VALUES (27, 1);
-INSERT INTO `roles_menus` VALUES (28, 1);
-INSERT INTO `roles_menus` VALUES (30, 1);
-INSERT INTO `roles_menus` VALUES (32, 1);
-INSERT INTO `roles_menus` VALUES (33, 1);
-INSERT INTO `roles_menus` VALUES (34, 1);
-INSERT INTO `roles_menus` VALUES (35, 1);
-INSERT INTO `roles_menus` VALUES (36, 1);
-INSERT INTO `roles_menus` VALUES (37, 1);
-INSERT INTO `roles_menus` VALUES (38, 1);
-INSERT INTO `roles_menus` VALUES (39, 1);
-INSERT INTO `roles_menus` VALUES (40, 1);
-INSERT INTO `roles_menus` VALUES (41, 1);
-INSERT INTO `roles_menus` VALUES (44, 1);
-INSERT INTO `roles_menus` VALUES (45, 1);
-INSERT INTO `roles_menus` VALUES (46, 1);
-INSERT INTO `roles_menus` VALUES (47, 1);
-INSERT INTO `roles_menus` VALUES (48, 1);
-INSERT INTO `roles_menus` VALUES (49, 1);
-INSERT INTO `roles_menus` VALUES (50, 1);
-INSERT INTO `roles_menus` VALUES (51, 1);
-INSERT INTO `roles_menus` VALUES (52, 1);
-INSERT INTO `roles_menus` VALUES (53, 1);
-INSERT INTO `roles_menus` VALUES (54, 1);
-INSERT INTO `roles_menus` VALUES (55, 1);
-INSERT INTO `roles_menus` VALUES (56, 1);
-INSERT INTO `roles_menus` VALUES (57, 1);
-INSERT INTO `roles_menus` VALUES (58, 1);
-INSERT INTO `roles_menus` VALUES (59, 1);
-INSERT INTO `roles_menus` VALUES (60, 1);
-INSERT INTO `roles_menus` VALUES (61, 1);
-INSERT INTO `roles_menus` VALUES (62, 1);
-INSERT INTO `roles_menus` VALUES (63, 1);
-INSERT INTO `roles_menus` VALUES (64, 1);
-INSERT INTO `roles_menus` VALUES (65, 1);
-INSERT INTO `roles_menus` VALUES (66, 1);
-INSERT INTO `roles_menus` VALUES (67, 1);
-INSERT INTO `roles_menus` VALUES (68, 1);
-INSERT INTO `roles_menus` VALUES (69, 1);
-INSERT INTO `roles_menus` VALUES (70, 1);
-INSERT INTO `roles_menus` VALUES (71, 1);
-INSERT INTO `roles_menus` VALUES (72, 1);
-INSERT INTO `roles_menus` VALUES (73, 1);
-INSERT INTO `roles_menus` VALUES (74, 1);
-INSERT INTO `roles_menus` VALUES (75, 1);
-INSERT INTO `roles_menus` VALUES (76, 1);
-INSERT INTO `roles_menus` VALUES (77, 1);
-INSERT INTO `roles_menus` VALUES (78, 1);
-INSERT INTO `roles_menus` VALUES (79, 1);
-INSERT INTO `roles_menus` VALUES (80, 1);
-INSERT INTO `roles_menus` VALUES (81, 1);
-INSERT INTO `roles_menus` VALUES (82, 1);
-INSERT INTO `roles_menus` VALUES (83, 1);
-INSERT INTO `roles_menus` VALUES (84, 1);
-INSERT INTO `roles_menus` VALUES (86, 1);
-INSERT INTO `roles_menus` VALUES (87, 1);
-INSERT INTO `roles_menus` VALUES (88, 1);
-INSERT INTO `roles_menus` VALUES (116, 1);
-INSERT INTO `roles_menus` VALUES (118, 1);
-INSERT INTO `roles_menus` VALUES (119, 1);
-INSERT INTO `roles_menus` VALUES (120, 1);
-INSERT INTO `roles_menus` VALUES (121, 1);
-INSERT INTO `roles_menus` VALUES (122, 1);
-INSERT INTO `roles_menus` VALUES (123, 1);
-INSERT INTO `roles_menus` VALUES (124, 1);
-INSERT INTO `roles_menus` VALUES (125, 1);
-INSERT INTO `roles_menus` VALUES (176, 1);
-INSERT INTO `roles_menus` VALUES (177, 1);
-INSERT INTO `roles_menus` VALUES (178, 1);
-INSERT INTO `roles_menus` VALUES (179, 1);
-INSERT INTO `roles_menus` VALUES (180, 1);
-INSERT INTO `roles_menus` VALUES (181, 1);
-INSERT INTO `roles_menus` VALUES (182, 1);
-INSERT INTO `roles_menus` VALUES (183, 1);
-INSERT INTO `roles_menus` VALUES (1, 2);
-INSERT INTO `roles_menus` VALUES (2, 2);
-INSERT INTO `roles_menus` VALUES (3, 2);
-INSERT INTO `roles_menus` VALUES (5, 2);
-INSERT INTO `roles_menus` VALUES (6, 2);
-INSERT INTO `roles_menus` VALUES (9, 2);
-INSERT INTO `roles_menus` VALUES (10, 2);
-INSERT INTO `roles_menus` VALUES (11, 2);
-INSERT INTO `roles_menus` VALUES (14, 2);
-INSERT INTO `roles_menus` VALUES (15, 2);
-INSERT INTO `roles_menus` VALUES (18, 2);
-INSERT INTO `roles_menus` VALUES (19, 2);
-INSERT INTO `roles_menus` VALUES (21, 2);
-INSERT INTO `roles_menus` VALUES (23, 2);
-INSERT INTO `roles_menus` VALUES (24, 2);
-INSERT INTO `roles_menus` VALUES (27, 2);
-INSERT INTO `roles_menus` VALUES (28, 2);
-INSERT INTO `roles_menus` VALUES (30, 2);
-INSERT INTO `roles_menus` VALUES (33, 2);
-INSERT INTO `roles_menus` VALUES (34, 2);
-INSERT INTO `roles_menus` VALUES (35, 2);
-INSERT INTO `roles_menus` VALUES (36, 2);
-INSERT INTO `roles_menus` VALUES (37, 2);
-INSERT INTO `roles_menus` VALUES (38, 2);
-INSERT INTO `roles_menus` VALUES (39, 2);
-INSERT INTO `roles_menus` VALUES (40, 2);
-INSERT INTO `roles_menus` VALUES (41, 2);
-INSERT INTO `roles_menus` VALUES (44, 2);
-INSERT INTO `roles_menus` VALUES (45, 2);
-INSERT INTO `roles_menus` VALUES (48, 2);
-INSERT INTO `roles_menus` VALUES (49, 2);
-INSERT INTO `roles_menus` VALUES (50, 2);
-INSERT INTO `roles_menus` VALUES (53, 2);
-INSERT INTO `roles_menus` VALUES (54, 2);
-INSERT INTO `roles_menus` VALUES (77, 2);
-INSERT INTO `roles_menus` VALUES (78, 2);
-INSERT INTO `roles_menus` VALUES (79, 2);
-INSERT INTO `roles_menus` VALUES (118, 2);
-INSERT INTO `roles_menus` VALUES (119, 2);
-INSERT INTO `roles_menus` VALUES (126, 2);
-INSERT INTO `roles_menus` VALUES (154, 2);
-
--- ----------------------------
--- Table structure for user
--- ----------------------------
-DROP TABLE IF EXISTS `user`;
-CREATE TABLE `user` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `avatar_id` bigint(20) NULL DEFAULT NULL COMMENT '头像',
- `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
- `enabled` bigint(20) NULL DEFAULT NULL COMMENT '状态:1启用、0禁用',
- `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
- `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
- `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门名称',
- `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
- `job_id` bigint(20) NULL DEFAULT NULL COMMENT '岗位名称',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- `last_password_reset_time` datetime(0) NULL DEFAULT NULL COMMENT '最后修改密码的日期',
- `nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `sex` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `UK_kpubos9gc2cvtkb0thktkbkes`(`email`) USING BTREE,
- UNIQUE INDEX `username`(`username`) USING BTREE,
- INDEX `FK5rwmryny6jthaaxkogownknqp`(`dept_id`) USING BTREE,
- INDEX `FKfftoc2abhot8f2wu6cl9a5iky`(`job_id`) USING BTREE,
- INDEX `FKpq2dhypk2qgt68nauh2by22jb`(`avatar_id`) USING BTREE,
- CONSTRAINT `FK5rwmryny6jthaaxkogownknqp` FOREIGN KEY (`dept_id`) REFERENCES `dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKfftoc2abhot8f2wu6cl9a5iky` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKpq2dhypk2qgt68nauh2by22jb` FOREIGN KEY (`avatar_id`) REFERENCES `user_avatar` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of user
--- ----------------------------
-INSERT INTO `user` VALUES (1, NULL, 'yshop@qq.com', 1, '$2a$10$fP.426qKaTmix50Oln8L.uav55gELhAd0Eg66Av4oG86u8km7D/Ky', 'admin', 2, '18888888888', 11, '2018-08-23 09:11:56', '2019-05-18 17:34:21', '管理员', '男');
-INSERT INTO `user` VALUES (3, NULL, 'test@yshopnet', 1, '$2a$10$HhxyGZy.ulf3RvAwaHUGb.k.2i9PBpv4YbLMJWp8pES7pPhTyRCF.', 'test', 2, '17777777777', 12, '2018-12-27 20:05:26', '2019-04-01 09:15:24', '测试', '男');
-INSERT INTO `user` VALUES (4, NULL, 'test2@qq.com', 1, '$2a$10$IjehtV8MiXb8ni.Qz0wBteE7FjVn49cEcsSj2.ZBUqqHjnC3umSh.', 'test2', 2, '15136175247', 11, '2020-02-15 20:39:16', NULL, 'test2', '男');
-INSERT INTO `user` VALUES (5, NULL, '444@qq.com', 0, '$2a$10$f/VH35NBOBszycV9KEA1HenQ0qVjazDm8LacQU9PO.A4UizFxLMuq', 'qqqqq', 11, '15136175249', 8, '2020-02-17 11:12:01', NULL, 'eeeeee', '男');
-
--- ----------------------------
--- Table structure for user_avatar
--- ----------------------------
-DROP TABLE IF EXISTS `user_avatar`;
-CREATE TABLE `user_avatar` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `real_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '真实文件名',
- `path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路径',
- `size` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '大小',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户头像' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for users_roles
--- ----------------------------
-DROP TABLE IF EXISTS `users_roles`;
-CREATE TABLE `users_roles` (
- `user_id` bigint(20) NOT NULL COMMENT '用户ID',
- `role_id` bigint(20) NOT NULL COMMENT '角色ID',
- PRIMARY KEY (`user_id`, `role_id`) USING BTREE,
- INDEX `FKq4eq273l04bpu4efj0jd0jb98`(`role_id`) USING BTREE,
- CONSTRAINT `FKgd3iendaoyh04b95ykqise6qh` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
- CONSTRAINT `FKt4v0rrweyk393bdgt107vdx0x` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户角色关联' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of users_roles
--- ----------------------------
-INSERT INTO `users_roles` VALUES (1, 1);
-INSERT INTO `users_roles` VALUES (3, 2);
-INSERT INTO `users_roles` VALUES (4, 2);
-INSERT INTO `users_roles` VALUES (5, 2);
-
--- ----------------------------
--- Table structure for verification_code
--- ----------------------------
-DROP TABLE IF EXISTS `verification_code`;
-CREATE TABLE `verification_code` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
- `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证码',
- `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
- `status` bit(1) NULL DEFAULT NULL COMMENT '状态:1有效、0过期',
- `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '验证码类型:email或者短信',
- `value` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '接收邮箱或者手机号码',
- `scenes` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '业务名称:如重置邮箱、重置密码等',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '验证码' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Table structure for visits
--- ----------------------------
-DROP TABLE IF EXISTS `visits`;
-CREATE TABLE `visits` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `create_time` datetime(0) NULL DEFAULT NULL,
- `date` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `ip_counts` bigint(20) NULL DEFAULT NULL,
- `pv_counts` bigint(20) NULL DEFAULT NULL,
- `week_day` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `UK_11aksgq87euk9bcyeesfs4vtp`(`date`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 94 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '访客记录' ROW_FORMAT = Compact;
-
--- ----------------------------
--- Records of visits
--- ----------------------------
-INSERT INTO `visits` VALUES (21, '2019-12-31 11:40:24', '2019-12-31', 2, 4, 'Tue');
-INSERT INTO `visits` VALUES (22, '2020-01-06 16:55:15', '2020-01-06', 4, 25, 'Mon');
-INSERT INTO `visits` VALUES (23, '2020-01-07 11:32:57', '2020-01-07', 4, 8, 'Tue');
-INSERT INTO `visits` VALUES (24, '2020-01-08 00:04:57', '2020-01-08', 2, 17, 'Wed');
-INSERT INTO `visits` VALUES (25, '2020-01-09 14:28:38', '2020-01-09', 3, 3, 'Thu');
-INSERT INTO `visits` VALUES (26, '2020-01-10 00:00:00', '2020-01-10', 6, 16, 'Fri');
-INSERT INTO `visits` VALUES (27, '2020-01-11 11:06:01', '2020-01-11', 1, 2, 'Sat');
-INSERT INTO `visits` VALUES (28, '2020-01-12 17:19:42', '2020-01-12', 1, 1, 'Sun');
-INSERT INTO `visits` VALUES (29, '2020-01-13 10:18:00', '2020-01-13', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (30, '2020-01-14 17:34:40', '2020-01-14', 1, 3, 'Tue');
-INSERT INTO `visits` VALUES (31, '2020-01-15 11:23:03', '2020-01-15', 1, 1, 'Wed');
-INSERT INTO `visits` VALUES (32, '2020-01-16 10:45:22', '2020-01-16', 1, 1, 'Thu');
-INSERT INTO `visits` VALUES (33, '2020-01-17 18:07:10', '2020-01-17', 1, 1, 'Fri');
-INSERT INTO `visits` VALUES (34, '2020-01-18 18:19:03', '2020-01-18', 1, 2, 'Sat');
-INSERT INTO `visits` VALUES (35, '2020-01-19 09:53:20', '2020-01-19', 1, 1, 'Sun');
-INSERT INTO `visits` VALUES (36, '2020-01-20 14:01:00', '2020-01-20', 1, 1, 'Mon');
-INSERT INTO `visits` VALUES (37, '2020-01-31 10:38:18', '2020-01-31', 1, 2, 'Fri');
-INSERT INTO `visits` VALUES (38, '2020-02-02 14:27:41', '2020-02-02', 1, 2, 'Sun');
-INSERT INTO `visits` VALUES (39, '2020-02-03 14:11:42', '2020-02-03', 1, 1, 'Mon');
-INSERT INTO `visits` VALUES (40, '2020-02-04 10:27:33', '2020-02-04', 1, 1, 'Tue');
-INSERT INTO `visits` VALUES (41, '2020-02-05 10:40:14', '2020-02-05', 1, 2, 'Wed');
-INSERT INTO `visits` VALUES (42, '2020-02-07 10:17:32', '2020-02-07', 1, 1, 'Fri');
-INSERT INTO `visits` VALUES (43, '2020-02-09 13:31:49', '2020-02-09', 1, 1, 'Sun');
-INSERT INTO `visits` VALUES (44, '2020-02-10 10:07:12', '2020-02-10', 1, 3, 'Mon');
-INSERT INTO `visits` VALUES (45, '2020-02-11 21:31:13', '2020-02-11', 1, 1, 'Tue');
-INSERT INTO `visits` VALUES (46, '2020-02-13 14:47:22', '2020-02-13', 1, 3, 'Thu');
-INSERT INTO `visits` VALUES (47, '2020-02-14 13:32:26', '2020-02-14', 3, 5, 'Fri');
-INSERT INTO `visits` VALUES (48, '2020-02-15 20:37:36', '2020-02-15', 1, 4, 'Sat');
-INSERT INTO `visits` VALUES (49, '2020-02-16 20:11:40', '2020-02-16', 1, 4, 'Sun');
-INSERT INTO `visits` VALUES (50, '2020-02-17 09:48:36', '2020-02-17', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (51, '2020-02-19 10:34:18', '2020-02-19', 1, 3, 'Wed');
-INSERT INTO `visits` VALUES (52, '2020-02-20 21:19:04', '2020-02-20', 1, 1, 'Thu');
-INSERT INTO `visits` VALUES (53, '2020-02-21 10:25:10', '2020-02-21', 1, 1, 'Fri');
-INSERT INTO `visits` VALUES (54, '2020-02-23 16:34:09', '2020-02-23', 1, 2, 'Sun');
-INSERT INTO `visits` VALUES (55, '2020-02-24 14:30:06', '2020-02-24', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (56, '2020-02-26 15:24:09', '2020-02-26', 1, 1, 'Wed');
-INSERT INTO `visits` VALUES (57, '2020-02-27 12:55:34', '2020-02-27', 2, 3, 'Thu');
-INSERT INTO `visits` VALUES (58, '2020-02-28 15:31:37', '2020-02-28', 2, 4, 'Fri');
-INSERT INTO `visits` VALUES (59, '2020-02-29 14:37:48', '2020-02-29', 2, 3, 'Sat');
-INSERT INTO `visits` VALUES (60, '2020-03-01 13:43:01', '2020-03-01', 2, 5, 'Sun');
-INSERT INTO `visits` VALUES (61, '2020-03-02 18:36:56', '2020-03-02', 2, 7, 'Mon');
-INSERT INTO `visits` VALUES (62, '2020-03-03 02:51:42', '2020-03-03', 2, 9, 'Tue');
-INSERT INTO `visits` VALUES (63, '2020-03-04 12:55:53', '2020-03-04', 1, 11, 'Wed');
-INSERT INTO `visits` VALUES (64, '2020-03-05 12:55:28', '2020-03-05', 1, 2, 'Thu');
-INSERT INTO `visits` VALUES (65, '2020-03-06 02:48:11', '2020-03-06', 2, 2, 'Fri');
-INSERT INTO `visits` VALUES (66, '2020-03-07 09:58:45', '2020-03-07', 1, 2, 'Sat');
-INSERT INTO `visits` VALUES (67, '2020-03-08 10:24:41', '2020-03-08', 1, 1, 'Sun');
-INSERT INTO `visits` VALUES (68, '2020-03-09 22:57:23', '2020-03-09', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (69, '2020-03-10 00:00:00', '2020-03-10', 1, 2, 'Tue');
-INSERT INTO `visits` VALUES (70, '2020-03-11 16:10:12', '2020-03-11', 2, 10, 'Wed');
-INSERT INTO `visits` VALUES (71, '2020-03-12 12:37:42', '2020-03-12', 1, 1, 'Thu');
-INSERT INTO `visits` VALUES (72, '2020-03-13 13:13:48', '2020-03-13', 1, 5, 'Fri');
-INSERT INTO `visits` VALUES (73, '2020-03-14 09:59:04', '2020-03-14', 1, 7, 'Sat');
-INSERT INTO `visits` VALUES (74, '2020-03-15 12:38:59', '2020-03-15', 1, 5, 'Sun');
-INSERT INTO `visits` VALUES (75, '2020-03-18 20:37:00', '2020-03-18', 1, 1, 'Wed');
-INSERT INTO `visits` VALUES (76, '2020-03-19 14:19:16', '2020-03-19', 1, 2, 'Thu');
-INSERT INTO `visits` VALUES (77, '2020-03-21 13:23:28', '2020-03-21', 1, 4, 'Sat');
-INSERT INTO `visits` VALUES (78, '2020-03-22 14:01:05', '2020-03-22', 1, 6, 'Sun');
-INSERT INTO `visits` VALUES (79, '2020-03-23 13:08:06', '2020-03-23', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (80, '2020-03-24 13:52:07', '2020-03-24', 1, 6, 'Tue');
-INSERT INTO `visits` VALUES (81, '2020-03-25 11:18:01', '2020-03-25', 1, 2, 'Wed');
-INSERT INTO `visits` VALUES (82, '2020-03-26 13:40:28', '2020-03-26', 1, 2, 'Thu');
-INSERT INTO `visits` VALUES (83, '2020-03-27 11:11:32', '2020-03-27', 1, 2, 'Fri');
-INSERT INTO `visits` VALUES (84, '2020-03-28 15:24:09', '2020-03-28', 1, 3, 'Sat');
-INSERT INTO `visits` VALUES (85, '2020-03-29 21:56:39', '2020-03-29', 1, 1, 'Sun');
-INSERT INTO `visits` VALUES (86, '2020-03-31 16:50:56', '2020-03-31', 1, 2, 'Tue');
-INSERT INTO `visits` VALUES (87, '2020-04-01 13:52:04', '2020-04-01', 1, 3, 'Wed');
-INSERT INTO `visits` VALUES (88, '2020-04-02 00:00:00', '2020-04-02', 1, 8, 'Thu');
-INSERT INTO `visits` VALUES (89, '2020-04-03 10:50:28', '2020-04-03', 1, 29, 'Fri');
-INSERT INTO `visits` VALUES (90, '2020-04-04 17:56:12', '2020-04-04', 1, 1, 'Sat');
-INSERT INTO `visits` VALUES (91, '2020-04-05 09:24:56', '2020-04-05', 1, 3, 'Sun');
-INSERT INTO `visits` VALUES (92, '2020-04-06 21:38:54', '2020-04-06', 1, 2, 'Mon');
-INSERT INTO `visits` VALUES (93, '2020-04-07 15:06:27', '2020-04-07', 1, 2, 'Tue');
-
--- ----------------------------
--- Table structure for yx_article
--- ----------------------------
-DROP TABLE IF EXISTS `yx_article`;
-CREATE TABLE `yx_article` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '文章管理ID',
- `cid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '分类id',
- `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章标题',
- `author` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章作者',
- `image_input` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文章图片',
- `synopsis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章简介',
- `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
- `share_title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章分享标题',
- `share_synopsis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章分享简介',
- `visit` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '浏览次数',
- `sort` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
- `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原文链接',
- `status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '状态',
- `add_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
- `hide` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否隐藏',
- `admin_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '管理员id',
- `mer_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '商户id',
- `product_id` int(10) NULL DEFAULT 0 COMMENT '产品关联id',
- `is_hot` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否热门(小程序)',
- `is_banner` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否轮播图(小程序)',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文章管理表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_article
--- ----------------------------
-INSERT INTO `yx_article` VALUES (2, '', 'yshop1.3版本上线了', 'yshop', 'http://localhost:8000/file/pic/list_16-20200110120838173.png', 'yshop1.3版本上线了', 'yshop1.3版本上线了
', '', '', '4', NULL, '', NULL, '2019-08-22 12:26', NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `yx_article` VALUES (3, '', '333', '333', 'http://localhost:8000/file/pic/list_16-20200110120838173.png', '11111', '11111
', '', '', '', NULL, '', NULL, '1580631108', NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `yx_article` VALUES (5, '', '444', '4444', 'http://localhost:8000/file/pic/砍价-20200311043720679.png', '444', '4444
', '', '', '', NULL, '', NULL, '2020-03-13 14:15', NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO `yx_article` VALUES (6, '', '555', '555', 'http://localhost:8000/file/pic/秒杀-2020031104371672.png', '555', '555
', '', '', '5', NULL, '', NULL, '2020-03-13 14:55', NULL, NULL, NULL, NULL, NULL, NULL);
-
--- ----------------------------
--- Table structure for yx_wechat_menu
--- ----------------------------
-DROP TABLE IF EXISTS `yx_wechat_menu`;
-CREATE TABLE `yx_wechat_menu` (
- `key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
- `result` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '缓存数据',
- `add_time` int(10) NULL DEFAULT NULL COMMENT '缓存时间',
- PRIMARY KEY (`key`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信缓存表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_wechat_menu
--- ----------------------------
-INSERT INTO `yx_wechat_menu` VALUES ('wechat_menus', '[{\"subButtons\":[{\"name\":\"公众号演示\",\"type\":\"view\",\"url\":\"https://h5.dayouqiantu.cn\"}],\"name\":\"Yshop商城3\",\"type\":\"click\",\"key\":\"yshop\"},{\"subButtons\":[{\"appId\":\"wxa82b5b7fcb0ec161\",\"name\":\"小程序演示\",\"pagePath\":\"pages/index\",\"type\":\"miniprogram\",\"url\":\"pages/index\"}],\"name\":\"供货商城\",\"type\":\"click\",\"key\":\"supply\"},{\"subButtons\":[],\"name\":\"3333\",\"type\":\"click\",\"key\":\"2222\"}]', 1570435277);
-
--- ----------------------------
--- Table structure for yx_express
--- ----------------------------
-DROP TABLE IF EXISTS `yx_express`;
-CREATE TABLE `yx_express` (
- `id` mediumint(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '快递公司id',
- `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '快递公司简称',
- `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '快递公司全称',
- `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
- `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `code`(`code`) USING BTREE,
- INDEX `is_show`(`is_show`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 430 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '快递公司表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_express
--- ----------------------------
-INSERT INTO `yx_express` VALUES (426, 'STO', '申通快递', 0, 0);
-INSERT INTO `yx_express` VALUES (427, 'SF', '顺丰速运', 0, 0);
-INSERT INTO `yx_express` VALUES (428, 'ZTO', '中通快递', 0, 0);
-INSERT INTO `yx_express` VALUES (429, 'YTO', '圆通速递', 0, 0);
-
--- ----------------------------
--- Table structure for yx_material
--- ----------------------------
-DROP TABLE IF EXISTS `yx_material`;
-CREATE TABLE `yx_material` (
- `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'PK',
- `del_flag` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '0' COMMENT '逻辑删除标记(0:显示;1:隐藏)',
- `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `create_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
- `type` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '类型1、图片;2、视频',
- `group_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分组ID',
- `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '素材名',
- `url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '素材链接',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '素材库' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_material
--- ----------------------------
-INSERT INTO `yx_material` VALUES ('005cde72c90844d6ba241823960c1fee', '0', '2020-03-28 21:45:32', 'admin', '1', NULL, '钻石.jpg', 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg');
-INSERT INTO `yx_material` VALUES ('00d67e57516745f88bffa7be8702d4d1', '0', '2020-03-11 16:37:21', 'admin', '1', '3e4ee0cdbb484aaeb5a40c337a47dba6', '砍价.png', 'http://localhost:8000/file/pic/砍价-20200311043720679.png');
-INSERT INTO `yx_material` VALUES ('15603c4ffb074a62ae3a63bf1fddde54', '0', '2020-03-22 19:13:25', 'admin', '1', NULL, 'list_16.png', 'http://localhost:8000/file/pic/list_16-20200322071324803.png');
-INSERT INTO `yx_material` VALUES ('7218f3bbbc544ce99761815f729afa90', '0', '2020-03-22 19:15:40', 'admin', '1', NULL, 'list_34.png', 'http://localhost:8000/file/pic/list_34-2020032207154023.png');
-INSERT INTO `yx_material` VALUES ('b80364b37e6c46958c24a224d7cd66bd', '0', '2020-03-11 16:37:16', 'admin', '1', '3e4ee0cdbb484aaeb5a40c337a47dba6', '秒杀.png', 'http://localhost:8000/file/pic/秒杀-2020031104371672.png');
-INSERT INTO `yx_material` VALUES ('bb933bebe27643298e6aae585a6c9d09', '0', '2020-03-11 16:37:12', 'admin', '1', '3e4ee0cdbb484aaeb5a40c337a47dba6', '05ea40b831858a8cf423aa709840507c.png', 'http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png');
-INSERT INTO `yx_material` VALUES ('e6797fa415c14765829d37e02e51feae', '0', '2020-03-11 16:37:25', 'admin', '1', '3e4ee0cdbb484aaeb5a40c337a47dba6', '优惠券.png', 'http://localhost:8000/file/pic/优惠券-20200311043724709.png');
-INSERT INTO `yx_material` VALUES ('eb2c13a9155f4b748fee2558ccee2ae8', '0', '2020-03-11 16:37:28', 'admin', '1', '3e4ee0cdbb484aaeb5a40c337a47dba6', '资讯.png', 'http://localhost:8000/file/pic/资讯-20200311043727918.png');
-INSERT INTO `yx_material` VALUES ('fc0caf898b58449c8a3b27aa44d8931a', '0', '2020-03-22 19:13:49', 'admin', '1', NULL, 'list_22.png', 'http://localhost:8000/file/pic/list_22-20200322071348844.png');
-
--- ----------------------------
--- Table structure for yx_material_group
--- ----------------------------
-DROP TABLE IF EXISTS `yx_material_group`;
-CREATE TABLE `yx_material_group` (
- `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'PK',
- `del_flag` char(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '0' COMMENT '逻辑删除标记(0:显示;1:隐藏)',
- `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `create_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建者ID',
- `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分组名',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '素材分组' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_material_group
--- ----------------------------
-INSERT INTO `yx_material_group` VALUES ('f55aea3aa6e94ef3b2257df8e025ff71', '0', '2020-03-15 12:48:56', NULL, '222');
-
--- ----------------------------
--- Table structure for yx_store_bargain
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_bargain`;
-CREATE TABLE `yx_store_bargain` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价产品ID',
- `product_id` int(11) UNSIGNED NOT NULL COMMENT '关联产品ID',
- `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '砍价活动名称',
- `image` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '砍价活动图片',
- `unit_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单位名称',
- `stock` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '库存',
- `sales` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '销量',
- `images` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '砍价产品轮播图',
- `start_time` int(11) UNSIGNED NOT NULL COMMENT '砍价开启时间',
- `stop_time` int(11) UNSIGNED NOT NULL COMMENT '砍价结束时间',
- `store_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '砍价产品名称',
- `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价金额',
- `min_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价商品最低价',
- `num` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '每次购买的砍价产品数量',
- `bargain_max_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '用户每次砍价的最大金额',
- `bargain_min_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '用户每次砍价的最小金额',
- `bargain_num` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '用户每次砍价的次数',
- `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)',
- `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '砍价详情',
- `give_integral` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '反多少积分',
- `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '砍价活动简介',
- `cost` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '成本价',
- `sort` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
- `is_hot` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否推荐0不推荐1推荐',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除 0未删除 1删除',
- `add_time` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
- `is_postage` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否包邮 0不包邮 1包邮',
- `postage` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '邮费',
- `rule` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '砍价规则',
- `look` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '砍价产品浏览量',
- `share` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '砍价产品分享量',
- `end_time_date` datetime(0) NOT NULL,
- `start_time_date` datetime(0) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '砍价表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_bargain
--- ----------------------------
-INSERT INTO `yx_store_bargain` VALUES (2, 24, '砍价测试01', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '张', 100, 1, 'https://image.dayouqiantu.cn/5ca05103ad634.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 1577090495, 1608660000, '70gA4彩色打印复印', 10.00, 0.01, 1, 2.00, 0.01, 1, 1, '7文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 0.00, '70gA4彩色打印复印', 0.50, 0, 0, 0, 1577090553, 1, 0.00, '这里是规则
', 90, 2, '2020-12-23 02:00:00', '2019-12-23 16:41:35');
-INSERT INTO `yx_store_bargain` VALUES (3, 24, '砍价活动2', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '张', 99, 2, 'https://image.dayouqiantu.cn/5ca05103ad634.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200228083801500.png', 1578412800, 1603900800, '70gA4彩色打印复印', 0.01, 0.01, 1, 10.00, 0.01, 1, 1, '7文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 0.00, '70gA4彩色打印复印', 0.50, 0, 0, 0, 1577101179, 1, 0.00, '444444
', 34, 1, '2020-10-29 00:00:00', '2020-01-08 00:00:00');
-
--- ----------------------------
--- Table structure for yx_store_bargain_user
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_bargain_user`;
-CREATE TABLE `yx_store_bargain_user` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户参与砍价表ID',
- `uid` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '用户ID',
- `bargain_id` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '砍价产品id',
- `bargain_price_min` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价的最低价',
- `bargain_price` decimal(8, 2) NULL DEFAULT NULL COMMENT '砍价金额',
- `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍掉的价格',
- `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态 1参与中 2 活动结束参与失败 3活动结束参与成功',
- `add_time` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '参与时间',
- `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否取消',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 38 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户参与砍价表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_bargain_user_help
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_bargain_user_help`;
-CREATE TABLE `yx_store_bargain_user_help` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价用户帮助表ID',
- `uid` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '帮助的用户id',
- `bargain_id` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '砍价产品ID',
- `bargain_user_id` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '用户参与砍价表id',
- `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '帮助砍价多少金额',
- `add_time` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '砍价用户帮助表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_cart
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_cart`;
-CREATE TABLE `yx_store_cart` (
- `id` bigint(8) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '购物车表ID',
- `uid` int(10) UNSIGNED NOT NULL COMMENT '用户ID',
- `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型',
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品ID',
- `product_attr_unique` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品属性',
- `cart_num` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品数量',
- `add_time` int(10) UNSIGNED NOT NULL COMMENT '添加时间',
- `is_pay` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0 = 未购买 1 = 已购买',
- `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
- `is_new` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为立即购买',
- `combination_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '拼团id',
- `seckill_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '秒杀产品ID',
- `bargain_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '砍价id',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `user_id`(`uid`) USING BTREE,
- INDEX `goods_id`(`product_id`) USING BTREE,
- INDEX `uid`(`uid`, `is_pay`) USING BTREE,
- INDEX `uid_2`(`uid`, `is_del`) USING BTREE,
- INDEX `uid_3`(`uid`, `is_new`) USING BTREE,
- INDEX `type`(`type`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 161 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '购物车表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_cart
--- ----------------------------
-INSERT INTO `yx_store_cart` VALUES (123, 11, 'product', 19, '', 2, 1582885462, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (124, 12, 'product', 19, '', 1, 1582897654, 0, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (125, 11, 'product', 19, '', 2, 1582970873, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (126, 11, 'product', 19, '', 1, 1582971001, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (127, 11, 'product', 19, '', 1, 1582971278, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (128, 11, 'product', 19, '', 1, 1582990627, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (129, 11, 'product', 19, '', 1, 1583330733, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (130, 11, 'product', 19, '', 1, 1583393646, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (131, 11, 'product', 19, '', 1, 1583394583, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (132, 11, 'product', 19, '', 1, 1583399181, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (133, 11, 'product', 19, '', 1, 1583403251, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (134, 11, 'product', 19, '', 1, 1583410813, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (135, 11, 'product', 19, '', 1, 1583416029, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (136, 11, 'product', 20, '2e51e5d2d86a44748f81cdd5bf7a51c0', 1, 1583422305, 0, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (137, 11, 'product', 19, '', 1, 1583479387, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (138, 11, 'product', 19, '', 1, 1583486497, 1, 0, 0, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (139, 11, 'product', 20, '2e51e5d2d86a44748f81cdd5bf7a51c0', 1, 1583486504, 1, 0, 0, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (140, 11, 'product', 19, '', 1, 1584171669, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (141, 11, 'product', 20, '', 1, 1584175842, 1, 0, 1, 0, 2, 0);
-INSERT INTO `yx_store_cart` VALUES (142, 11, 'product', 19, '', 1, 1584177295, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (143, 11, 'product', 24, '', 1, 1585051721, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (144, 11, 'product', 19, '', 1, 1585144729, 0, 0, 0, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (145, 12, 'product', 24, '', 1, 1585224558, 0, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (146, 11, 'product', 19, '', 1, 1585293362, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (147, 11, 'product', 19, '', 1, 1585385719, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (148, 11, 'product', 24, '', 1, 1585899825, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (149, 11, 'product', 24, '', 1, 1585900220, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (150, 11, 'product', 24, '', 1, 1585900404, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (151, 11, 'product', 24, '', 1, 1585900426, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (152, 11, 'product', 24, '', 1, 1585900444, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (153, 11, 'product', 24, '', 1, 1585900487, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (154, 11, 'product', 24, '', 1, 1585900506, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (155, 11, 'product', 24, '', 1, 1585901825, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (156, 11, 'product', 24, '', 1, 1585901980, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (157, 11, 'product', 24, '', 1, 1585907975, 1, 0, 1, 0, 0, 3);
-INSERT INTO `yx_store_cart` VALUES (158, 11, 'product', 24, '', 1, 1586065022, 1, 0, 1, 0, 1, 0);
-INSERT INTO `yx_store_cart` VALUES (159, 11, 'product', 19, '', 1, 1586065167, 1, 0, 1, 0, 0, 0);
-INSERT INTO `yx_store_cart` VALUES (160, 11, 'product', 19, '', 1, 1586066223, 0, 0, 1, 2, 0, 0);
-
--- ----------------------------
--- Table structure for yx_store_category
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_category`;
-CREATE TABLE `yx_store_category` (
- `id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品分类表ID',
- `pid` mediumint(11) NOT NULL COMMENT '父id',
- `cate_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名称',
- `sort` mediumint(11) NULL DEFAULT NULL COMMENT '排序',
- `pic` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '图标',
- `is_show` tinyint(1) NULL DEFAULT 1 COMMENT '是否推荐',
- `add_time` int(11) NULL DEFAULT NULL COMMENT '添加时间',
- `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除状态',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `pid`(`pid`) USING BTREE,
- INDEX `is_base`(`is_show`) USING BTREE,
- INDEX `sort`(`sort`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_category
--- ----------------------------
-INSERT INTO `yx_store_category` VALUES (1, 0, '图文广告', 1, '', 1, 1584876792, 0);
-INSERT INTO `yx_store_category` VALUES (2, 1, '写真', 1, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 1, 1586244998, 1);
-INSERT INTO `yx_store_category` VALUES (3, 1, '平面设计', 1, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 1, 1584945190, 0);
-INSERT INTO `yx_store_category` VALUES (5, 1, '名片', 1, 'http://localhost:8000/file/pic/砍价-20200311043720679.png', 1, 1586245178, 0);
-
--- ----------------------------
--- Table structure for yx_store_combination
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_combination`;
-CREATE TABLE `yx_store_combination` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品id',
- `mer_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '商户id',
- `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '推荐图',
- `images` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '轮播图',
- `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '活动标题',
- `attr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动属性',
- `people` int(2) UNSIGNED NOT NULL COMMENT '参团人数',
- `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '简介',
- `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '价格',
- `sort` int(10) UNSIGNED NOT NULL COMMENT '排序',
- `sales` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
- `stock` int(10) UNSIGNED NOT NULL COMMENT '库存',
- `add_time` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '添加时间',
- `is_host` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推荐',
- `is_show` tinyint(1) UNSIGNED NOT NULL COMMENT '产品状态',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
- `combination` tinyint(1) UNSIGNED NOT NULL DEFAULT 1,
- `mer_use` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '商户是否可用1可用0不可用',
- `is_postage` tinyint(1) UNSIGNED NOT NULL COMMENT '是否包邮1是0否',
- `postage` decimal(10, 2) UNSIGNED NOT NULL COMMENT '邮费',
- `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拼团内容',
- `start_time` int(11) UNSIGNED NOT NULL COMMENT '拼团开始时间',
- `stop_time` int(11) UNSIGNED NOT NULL COMMENT '拼团结束时间',
- `effective_time` int(11) NOT NULL DEFAULT 0 COMMENT '拼团订单有效时间',
- `cost` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '拼图产品成本',
- `browse` int(11) NULL DEFAULT 0 COMMENT '浏览量',
- `unit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '单位名',
- `end_time_date` datetime(0) NOT NULL,
- `start_time_date` datetime(0) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团产品表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_combination
--- ----------------------------
-INSERT INTO `yx_store_combination` VALUES (1, 19, NULL, 'https://image.dayouqiantu.cn/5ca011a1cd487.jpg', 'https://image.dayouqiantu.cn/5ca01c7fc9238.jpg,https://image.dayouqiantu.cn/5ca01c7676042.jpg', '70gA4黑白打印复印', NULL, 2, '打印复印资料A4黑白彩色印刷画册书本装订图文数码快印服务', 1.00, 1, 19, 98, '1574064564', 1, 1, 0, 1, NULL, 1, 0.00, '文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 1574064557, 1606320000, 24, 0, 0, '张', '2020-11-26 00:00:00', '2019-11-18 16:09:17');
-INSERT INTO `yx_store_combination` VALUES (2, 19, NULL, 'https://image.dayouqiantu.cn/5ca011a1cd487.jpg', 'https://image.dayouqiantu.cn/5ca01c7fc9238.jpg,http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200228083801500.png', '70gA4黑白打印复印', NULL, 2, '打印复印资料A4黑白彩色印刷画册书本装订图文数码快印服务', 1.00, 1, 28, 89, '1574066608', 1, 1, 0, 1, NULL, 1, 0.00, '文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 1574066592, 1609344000, 24, 0, 0, '张', '2020-12-31 00:00:00', '2019-11-18 16:43:12');
-INSERT INTO `yx_store_combination` VALUES (3, 22, 0, 'http://localhost:8000/file/pic/list_16-20200110120838173.png', 'http://localhost:8000/file/pic/list_16-20200110120838173.png,http://localhost:8000/file/pic/list_32-20200109100213309.png', '3333', NULL, 2, '3333', 1.00, 0, 0, 11, '1578644367', 0, 1, 1, 1, NULL, 0, 0.00, '4444
', 1578644348, 1585213664, 24, 1, 0, '333', '2020-01-29 00:00:00', '2020-01-10 16:19:08');
-
--- ----------------------------
--- Table structure for yx_store_coupon
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_coupon`;
-CREATE TABLE `yx_store_coupon` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '优惠券表ID',
- `title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券名称',
- `integral` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '兑换消耗积分值',
- `coupon_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '兑换的优惠券面值',
- `use_min_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低消费多少金额可用优惠券',
- `coupon_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '优惠券有效期限(单位:天)',
- `sort` int(11) UNSIGNED NOT NULL DEFAULT 1 COMMENT '排序',
- `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态(0:关闭,1:开启)',
- `add_time` int(11) UNSIGNED NOT NULL COMMENT '兑换项目添加时间',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `state`(`status`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `coupon_time`(`coupon_time`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_coupon
--- ----------------------------
-INSERT INTO `yx_store_coupon` VALUES (1, '双十一', 0, 1.00, 100.00, 10, 0, 1, 1573281957, 0);
-INSERT INTO `yx_store_coupon` VALUES (2, '44444446', 0, 1.00, 1.00, 1, 0, 1, 1574130748, 0);
-INSERT INTO `yx_store_coupon` VALUES (3, '999', 0, 1.00, 1.00, 1, 1, 1, 1574131073, 0);
-INSERT INTO `yx_store_coupon` VALUES (4, '333', 0, 3.00, 3.00, 1, 0, 1, 1582894050, 0);
-INSERT INTO `yx_store_coupon` VALUES (5, '555', 0, 3.00, 1.00, 1, 0, 1, 1582894121, 0);
-INSERT INTO `yx_store_coupon` VALUES (6, '44', 0, 4.00, 4.00, 1, 0, 1, 1582894183, 0);
-
--- ----------------------------
--- Table structure for yx_store_coupon_issue
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_coupon_issue`;
-CREATE TABLE `yx_store_coupon_issue` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `cname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
- `cid` int(10) NULL DEFAULT NULL COMMENT '优惠券ID',
- `start_time` int(10) NULL DEFAULT NULL COMMENT '优惠券领取开启时间',
- `end_time` int(10) NULL DEFAULT NULL COMMENT '优惠券领取结束时间',
- `total_count` int(10) NULL DEFAULT NULL COMMENT '优惠券领取数量',
- `remain_count` int(10) NULL DEFAULT NULL COMMENT '优惠券剩余领取数量',
- `is_permanent` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否无限张数',
- `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 正常 0 未开启 -1 已无效',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
- `add_time` int(10) NULL DEFAULT NULL COMMENT '优惠券添加时间',
- `end_time_date` datetime(0) NOT NULL,
- `start_time_date` datetime(0) NOT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `cid`(`cid`) USING BTREE,
- INDEX `start_time`(`start_time`, `end_time`) USING BTREE,
- INDEX `remain_count`(`remain_count`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券前台领取表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_coupon_issue
--- ----------------------------
-INSERT INTO `yx_store_coupon_issue` VALUES (11, '双十一', 1, 1573352364, 1585039774, 1000, 998, 0, 1, 0, 1573352375, '2020-01-15 01:00:00', '2019-12-02 10:19:24');
-INSERT INTO `yx_store_coupon_issue` VALUES (12, '双十一', 1, 1573353166, 1585039774, 100, 99, 0, 1, 0, 1573353175, '2019-12-26 00:00:00', '2019-11-10 10:32:46');
-INSERT INTO `yx_store_coupon_issue` VALUES (13, '双十一', 1, 1573353254, 1585039774, 10, 9, 0, 1, 0, 1573353261, '2019-12-26 00:00:00', '2019-11-10 10:34:14');
-INSERT INTO `yx_store_coupon_issue` VALUES (14, '999', 3, 1582530746, 1585039774, 100, 100, 0, 0, 1, 1582530755, '2020-02-29 00:00:00', '2020-02-24 15:52:26');
-
--- ----------------------------
--- Table structure for yx_store_coupon_issue_user
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_coupon_issue_user`;
-CREATE TABLE `yx_store_coupon_issue_user` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) NULL DEFAULT NULL COMMENT '领取优惠券用户ID',
- `issue_coupon_id` int(10) NULL DEFAULT NULL COMMENT '优惠券前台领取ID',
- `add_time` int(10) NULL DEFAULT NULL COMMENT '领取时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uid`(`uid`, `issue_coupon_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券前台用户领取记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_coupon_issue_user
--- ----------------------------
-INSERT INTO `yx_store_coupon_issue_user` VALUES (1, 12, 11, 1573353024);
-INSERT INTO `yx_store_coupon_issue_user` VALUES (2, 12, 12, 1573353194);
-INSERT INTO `yx_store_coupon_issue_user` VALUES (3, 12, 13, 1573353269);
-INSERT INTO `yx_store_coupon_issue_user` VALUES (4, 11, 11, 1584177287);
-
--- ----------------------------
--- Table structure for yx_store_coupon_user
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_coupon_user`;
-CREATE TABLE `yx_store_coupon_user` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '优惠券发放记录id',
- `cid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '兑换的项目id',
- `uid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '优惠券所属用户',
- `coupon_title` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券名称',
- `coupon_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠券的面值',
- `use_min_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低消费多少金额可用优惠券',
- `add_time` int(11) UNSIGNED NOT NULL COMMENT '优惠券创建时间',
- `end_time` int(11) UNSIGNED NOT NULL COMMENT '优惠券结束时间',
- `use_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '使用时间',
- `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'send' COMMENT '获取方式',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态(0:未使用,1:已使用, 2:已过期)',
- `is_fail` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有效',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `cid`(`cid`) USING BTREE,
- INDEX `uid`(`uid`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `end_time`(`end_time`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `is_fail`(`is_fail`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券发放记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_coupon_user
--- ----------------------------
-INSERT INTO `yx_store_coupon_user` VALUES (1, 1, 12, '双十一', 1.00, 100.00, 1573353024, 1574217024, 0, 'get', 2, 0);
-INSERT INTO `yx_store_coupon_user` VALUES (2, 1, 12, '双十一', 1.00, 100.00, 1573353194, 1574217194, 1573380051, 'get', 1, 0);
-INSERT INTO `yx_store_coupon_user` VALUES (3, 1, 12, '双十一', 1.00, 100.00, 1573353269, 1574217269, 0, 'get', 2, 0);
-INSERT INTO `yx_store_coupon_user` VALUES (4, 1, 11, '双十一', 1.00, 100.00, 1584177287, 1585041287, 0, 'get', 2, 0);
-
--- ----------------------------
--- Table structure for yx_store_order
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_order`;
-CREATE TABLE `yx_store_order` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单ID',
- `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单号',
- `extend_order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '额外订单号',
- `uid` int(11) UNSIGNED NOT NULL COMMENT '用户id',
- `real_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户姓名',
- `user_phone` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户电话',
- `user_address` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '详细地址',
- `cart_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '[]' COMMENT '购物车id',
- `freight_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '运费金额',
- `total_num` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单商品总数',
- `total_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单总价',
- `total_postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '邮费',
- `pay_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际支付金额',
- `pay_postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '支付邮费',
- `deduction_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '抵扣金额',
- `coupon_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '优惠券id',
- `coupon_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠券金额',
- `paid` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付状态',
- `pay_time` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '支付时间',
- `pay_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '支付方式',
- `add_time` int(11) UNSIGNED NOT NULL COMMENT '创建时间',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)',
- `refund_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 未退款 1 申请中 2 已退款',
- `refund_reason_wap_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退款图片',
- `refund_reason_wap_explain` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '退款用户说明',
- `refund_reason_time` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '退款时间',
- `refund_reason_wap` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '前台退款原因',
- `refund_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '不退款的理由',
- `refund_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '退款金额',
- `delivery_sn` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '快递公司编号',
- `delivery_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快递名称/送货人姓名',
- `delivery_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发货类型',
- `delivery_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快递单号/手机号',
- `gain_integral` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '消费赚取积分',
- `use_integral` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '使用积分',
- `back_integral` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '给用户退了多少积分',
- `mark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '备注',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
- `unique` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '唯一id(md5加密)类似id',
- `remark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '管理员备注',
- `mer_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商户ID',
- `is_mer_check` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
- `combination_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '拼团产品id0一般产品',
- `pink_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '拼团id 0没有拼团',
- `cost` decimal(8, 2) UNSIGNED NOT NULL COMMENT '成本价',
- `seckill_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '秒杀产品ID',
- `bargain_id` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '砍价id',
- `verify_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销码',
- `store_id` int(11) NOT NULL DEFAULT 0 COMMENT '门店id',
- `shipping_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '配送方式 1=快递 ,2=门店自提',
- `is_channel` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '支付渠道(0微信公众号1微信小程序)',
- `is_remind` tinyint(1) UNSIGNED NULL DEFAULT 0,
- `is_system_del` tinyint(1) NULL DEFAULT 0,
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `order_id_2`(`order_id`, `uid`) USING BTREE,
- UNIQUE INDEX `unique`(`unique`) USING BTREE,
- INDEX `uid`(`uid`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `pay_price`(`pay_price`) USING BTREE,
- INDEX `paid`(`paid`) USING BTREE,
- INDEX `pay_time`(`pay_time`) USING BTREE,
- INDEX `pay_type`(`pay_type`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE,
- INDEX `coupon_id`(`coupon_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 154 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_order_cart_info
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_order_cart_info`;
-CREATE TABLE `yx_store_order_cart_info` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `oid` int(11) UNSIGNED NOT NULL COMMENT '订单id',
- `cart_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购物车id',
- `product_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品ID',
- `cart_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '购买东西的详细信息',
- `unique` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '唯一id',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `oid`(`oid`, `unique`) USING BTREE,
- INDEX `cart_id`(`cart_id`) USING BTREE,
- INDEX `product_id`(`product_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单购物详情表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_order_status
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_order_status`;
-CREATE TABLE `yx_store_order_status` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `oid` int(10) UNSIGNED NOT NULL COMMENT '订单id',
- `change_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作类型',
- `change_message` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作备注',
- `change_time` int(10) UNSIGNED NOT NULL COMMENT '操作时间',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `oid`(`oid`) USING BTREE,
- INDEX `change_type`(`change_type`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 276 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单操作记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_pink
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_pink`;
-CREATE TABLE `yx_store_pink` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) UNSIGNED NOT NULL COMMENT '用户id',
- `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单id 生成',
- `order_id_key` int(10) UNSIGNED NOT NULL COMMENT '订单id 数据库',
- `total_num` int(10) UNSIGNED NOT NULL COMMENT '购买商品个数',
- `total_price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '购买总金额',
- `cid` int(10) UNSIGNED NOT NULL COMMENT '拼团产品id',
- `pid` int(10) UNSIGNED NOT NULL COMMENT '产品id',
- `people` int(10) UNSIGNED NOT NULL COMMENT '拼图总人数',
- `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '拼团产品单价',
- `add_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '开始时间',
- `stop_time` varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
- `k_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '团长id 0为团长',
- `is_tpl` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否发送模板消息0未发送1已发送',
- `is_refund` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否退款 0未退款 1已退款',
- `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态1进行中2已完成3未完成',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_store_product
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product`;
-CREATE TABLE `yx_store_product` (
- `id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
- `mer_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)',
- `image` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品图片',
- `slider_image` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '轮播图',
- `store_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名称',
- `store_info` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品简介',
- `keyword` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关键字',
- `bar_code` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '产品条码(一维码)',
- `cate_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类id',
- `price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '商品价格',
- `vip_price` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '会员价格',
- `ot_price` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '市场价',
- `postage` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '邮费',
- `unit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单位名',
- `sort` smallint(11) NULL DEFAULT 0 COMMENT '排序',
- `sales` mediumint(11) UNSIGNED NULL DEFAULT 0 COMMENT '销量',
- `stock` mediumint(11) UNSIGNED NULL DEFAULT 0 COMMENT '库存',
- `is_show` tinyint(1) NULL DEFAULT 1 COMMENT '状态(0:未上架,1:上架)',
- `is_hot` tinyint(1) NULL DEFAULT 0 COMMENT '是否热卖',
- `is_benefit` tinyint(1) NULL DEFAULT 0 COMMENT '是否优惠',
- `is_best` tinyint(1) NULL DEFAULT 0 COMMENT '是否精品',
- `is_new` tinyint(1) NULL DEFAULT 0 COMMENT '是否新品',
- `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '产品描述',
- `add_time` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间',
- `is_postage` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否包邮',
- `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否删除',
- `mer_use` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '商户是否代理 0不可代理1可代理',
- `give_integral` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '获得积分',
- `cost` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '成本价',
- `is_seckill` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '秒杀状态 0 未开启 1已开启',
- `is_bargain` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '砍价状态 0未开启 1开启',
- `is_good` tinyint(1) NULL DEFAULT 0 COMMENT '是否优品推荐',
- `ficti` mediumint(11) NULL DEFAULT 100 COMMENT '虚拟销量',
- `browse` int(11) NULL DEFAULT 0 COMMENT '浏览量',
- `code_path` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品二维码地址(用户小程序海报)',
- `soure_link` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '淘宝京东1688类型',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `is_hot`(`is_hot`) USING BTREE,
- INDEX `is_benefit`(`is_benefit`) USING BTREE,
- INDEX `is_best`(`is_best`) USING BTREE,
- INDEX `is_new`(`is_new`) USING BTREE,
- INDEX `toggle_on_sale, is_del`(`is_del`) USING BTREE,
- INDEX `price`(`price`) USING BTREE,
- INDEX `is_show`(`is_show`) USING BTREE,
- INDEX `sort`(`sort`) USING BTREE,
- INDEX `sales`(`sales`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `is_postage`(`is_postage`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product
--- ----------------------------
-INSERT INTO `yx_store_product` VALUES (19, NULL, 'https://image.dayouqiantu.cn/5ca011a1cd487.jpg', 'https://image.dayouqiantu.cn/5ca01c7fc9238.jpg,https://image.dayouqiantu.cn/5ca01c7676042.jpg', '70gA4黑白打印复印', '打印复印资料A4黑白彩色印刷画册书本装订图文数码快印服务', '打印复印', '', '3', 120.00, 0.20, 0.50, 0.00, '张', 1, 49, 75, 1, 1, 1, 1, 1, '文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', NULL, 1, 0, 0, 1.00, 0.20, 0, 0, 1, NULL, NULL, '', '');
-INSERT INTO `yx_store_product` VALUES (24, 0, 'https://image.dayouqiantu.cn/5ca011a1cd487.jpg', 'https://image.dayouqiantu.cn/5ca011a1cd487.jpg', '彩色打印', '彩色打印', '彩色打印', '', '2', 1.00, 0.00, 1.00, 0.00, '张', 0, 10, 9989, 1, 1, 1, 1, 1, '彩色打印
', 1582894605, 0, 1, 0, 0.00, 0.00, 0, 0, 1, 0, 0, '', '');
-INSERT INTO `yx_store_product` VALUES (25, 0, 'http://localhost:8000/file/pic/list_34-2020032207154023.png', 'http://localhost:8000/file/pic/list_22-20200322071348844.png', '照片打印', '照片打印', '照片打印', '', '3', 1.00, 0.00, 2.00, 0.00, '张', 0, 0, 1000, 1, 1, 1, 1, 1, '照片打印
', 1585278846, 1, 0, 0, 0.00, 0.00, 0, 0, 1, 0, 0, '', '');
-
--- ----------------------------
--- Table structure for yx_store_product_attr
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product_attr`;
-CREATE TABLE `yx_store_product_attr` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `product_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品ID',
- `attr_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '属性名',
- `attr_values` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '属性值',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `store_id`(`product_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product_attr
--- ----------------------------
-INSERT INTO `yx_store_product_attr` VALUES (14, 20, '纸张', 'A3,A4');
-INSERT INTO `yx_store_product_attr` VALUES (15, 20, '颜色', '白色,红色');
-
--- ----------------------------
--- Table structure for yx_store_product_attr_result
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product_attr_result`;
-CREATE TABLE `yx_store_product_attr_result` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品ID',
- `result` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属性参数',
- `change_time` int(10) UNSIGNED NOT NULL COMMENT '上次修改时间',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `product_id`(`product_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性详情表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product_attr_result
--- ----------------------------
-INSERT INTO `yx_store_product_attr_result` VALUES (8, 20, '{\"attr\":[{\"attrHidden\":true,\"detailValue\":\"\",\"detail\":[\"A3\",\"A4\"],\"value\":\"纸张\"},{\"attrHidden\":true,\"detailValue\":\"\",\"detail\":[\"白色\",\"红色\"],\"value\":\"颜色\"}],\"value\":[{\"cost\":0.5,\"price\":0.5,\"pic\":\"https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg\",\"detail\":{\"颜色\":\"白色\",\"纸张\":\"A3\"},\"check\":false,\"sales\":\"999\"},{\"cost\":0.5,\"price\":0.5,\"pic\":\"https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg\",\"detail\":{\"颜色\":\"红色\",\"纸张\":\"A3\"},\"check\":false,\"sales\":\"999\"},{\"cost\":0.5,\"price\":\"0.2\",\"pic\":\"https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg\",\"detail\":{\"颜色\":\"白色\",\"纸张\":\"A4\"},\"check\":false,\"sales\":\"999\"},{\"cost\":0.5,\"price\":\"0.2\",\"pic\":\"https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg\",\"detail\":{\"颜色\":\"红色\",\"纸张\":\"A4\"},\"check\":false,\"sales\":\"999\"}]}', 1578320995);
-
--- ----------------------------
--- Table structure for yx_store_product_attr_value
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product_attr_value`;
-CREATE TABLE `yx_store_product_attr_value` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品ID',
- `suk` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属性索引值 (attr_value|attr_value[|....])',
- `stock` int(10) UNSIGNED NOT NULL COMMENT '属性对应的库存',
- `sales` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '销量',
- `price` decimal(8, 2) UNSIGNED NOT NULL COMMENT '属性金额',
- `image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片',
- `unique` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '唯一值',
- `cost` decimal(8, 2) UNSIGNED NOT NULL COMMENT '成本价',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `unique`(`unique`, `suk`) USING BTREE,
- INDEX `store_id`(`product_id`, `suk`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 30 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性值表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product_attr_value
--- ----------------------------
-INSERT INTO `yx_store_product_attr_value` VALUES (26, 20, 'A3,白色', 996, NULL, 0.50, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '2e51e5d2d86a44748f81cdd5bf7a51c0', 0.50);
-INSERT INTO `yx_store_product_attr_value` VALUES (27, 20, 'A3,红色', 999, NULL, 0.50, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'fd545718bbdb4634aa54228ecca6febe', 0.50);
-INSERT INTO `yx_store_product_attr_value` VALUES (28, 20, 'A4,白色', 999, NULL, 0.20, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '5e0ae3241d8c4ea793368666f862dd3b', 0.50);
-INSERT INTO `yx_store_product_attr_value` VALUES (29, 20, 'A4,红色', 999, NULL, 0.20, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '4b4b306134434832885a52f3a85955ce', 0.50);
-
--- ----------------------------
--- Table structure for yx_store_product_relation
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product_relation`;
-CREATE TABLE `yx_store_product_relation` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) UNSIGNED NOT NULL COMMENT '用户ID',
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品ID',
- `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型(收藏(collect)、点赞(like))',
- `category` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '某种类型的商品(普通商品、秒杀商品)',
- `add_time` int(10) UNSIGNED NOT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uid`(`uid`, `product_id`, `type`, `category`) USING BTREE,
- INDEX `type`(`type`) USING BTREE,
- INDEX `category`(`category`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品点赞和收藏表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product_relation
--- ----------------------------
-INSERT INTO `yx_store_product_relation` VALUES (1, 11, 20, 'collect', 'product', 1586059338);
-INSERT INTO `yx_store_product_relation` VALUES (2, 11, 24, 'collect', 'product', 1586064573);
-INSERT INTO `yx_store_product_relation` VALUES (4, 11, 19, 'collect', 'product', 1586065940);
-
--- ----------------------------
--- Table structure for yx_store_product_reply
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_product_reply`;
-CREATE TABLE `yx_store_product_reply` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '评论ID',
- `uid` int(11) NOT NULL COMMENT '用户ID',
- `oid` int(11) NOT NULL COMMENT '订单ID',
- `unique` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '唯一id',
- `product_id` int(11) NOT NULL COMMENT '产品id',
- `reply_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'product' COMMENT '某种商品类型(普通商品、秒杀商品)',
- `product_score` tinyint(1) NOT NULL COMMENT '商品分数',
- `service_score` tinyint(1) NOT NULL COMMENT '服务分数',
- `comment` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '评论内容',
- `pics` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '评论图片',
- `add_time` int(11) NOT NULL COMMENT '评论时间',
- `merchant_reply_content` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '管理员回复内容',
- `merchant_reply_time` int(11) NULL DEFAULT NULL COMMENT '管理员回复时间',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0未删除1已删除',
- `is_reply` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0未回复1已回复',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `order_id_2`(`oid`, `unique`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `parent_id`(`reply_type`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE,
- INDEX `product_score`(`product_score`) USING BTREE,
- INDEX `service_score`(`service_score`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评论表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_product_reply
--- ----------------------------
-INSERT INTO `yx_store_product_reply` VALUES (5, 11, 0, '', 19, 'product', 0, 0, '', '', 0, NULL, NULL, 0, 0);
-
--- ----------------------------
--- Table structure for yx_store_seckill
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_seckill`;
-CREATE TABLE `yx_store_seckill` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品秒杀产品表id',
- `product_id` int(10) UNSIGNED NOT NULL COMMENT '商品id',
- `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '推荐图',
- `images` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '轮播图',
- `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '活动标题',
- `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '简介',
- `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '价格',
- `cost` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '成本',
- `ot_price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '原价',
- `give_integral` decimal(10, 2) UNSIGNED NOT NULL COMMENT '返多少积分',
- `sort` int(10) UNSIGNED NOT NULL COMMENT '排序',
- `stock` int(10) UNSIGNED NOT NULL COMMENT '库存',
- `sales` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
- `unit_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '单位名',
- `postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '邮费',
- `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
- `start_time` int(11) NOT NULL DEFAULT 0 COMMENT '开始时间',
- `stop_time` int(11) NOT NULL DEFAULT 0 COMMENT '结束时间',
- `add_time` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '添加时间',
- `status` tinyint(1) UNSIGNED NOT NULL COMMENT '产品状态',
- `is_postage` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否包邮',
- `is_hot` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '热门推荐',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除 0未删除1已删除',
- `num` int(11) UNSIGNED NOT NULL COMMENT '最多秒杀几个',
- `is_show` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '显示',
- `end_time_date` datetime(0) NOT NULL,
- `start_time_date` datetime(0) NOT NULL,
- `time_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '时间段id',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `product_id`(`product_id`) USING BTREE,
- INDEX `start_time`(`start_time`, `stop_time`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE,
- INDEX `is_hot`(`is_hot`) USING BTREE,
- INDEX `is_show`(`status`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `sort`(`sort`) USING BTREE,
- INDEX `is_postage`(`is_postage`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品秒杀产品表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_store_seckill
--- ----------------------------
-INSERT INTO `yx_store_seckill` VALUES (1, 24, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca05103ad634.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '70gA4彩色打印复印', '70gA4彩色打印复印', 1.00, 0.50, 1.00, 0.00, 0, 99, 2, '张', 0.00, '7文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 1576476046, 1609257600, '1576476055', 1, 1, 0, 0, 1, 1, '2020-01-29 00:00:00', '2019-12-16 14:00:46', 213);
-INSERT INTO `yx_store_seckill` VALUES (2, 24, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca05103ad634.jpg,http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200228083801500.png', '70gA4彩色打印复印2', '70gA4彩色打印复印', 1.00, 0.50, 1.00, 0.00, 0, 98, 3, '张', 0.00, '7文件请传QQ2412733099,
718504558或2412733099@qq.com邮箱,
手机/微信:13733990583
量大请联系店主,一定让您满意而归
实体店面经营 保质保量
A4黑白2毛/张,量大1毛/张,
A3黑白双面5毛/张,量大3毛/张,
更大量请联系店主报价,
每消费1元可积1分,1分抵现金1毛,
付款时直接抵扣
(如此优惠的基础上还可积分,积分抵现金)
', 1576477734, 1609257600, '1576477741', 1, 1, 0, 0, 1, 1, '2020-12-30 00:00:00', '2019-12-16 14:28:54', 214);
-
--- ----------------------------
--- Table structure for yx_store_visit
--- ----------------------------
-DROP TABLE IF EXISTS `yx_store_visit`;
-CREATE TABLE `yx_store_visit` (
- `id` int(10) NOT NULL AUTO_INCREMENT,
- `product_id` int(11) NULL DEFAULT NULL COMMENT '产品ID',
- `product_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型',
- `cate_id` int(11) NULL DEFAULT NULL COMMENT '产品分类ID',
- `type` char(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品类型',
- `uid` int(11) NULL DEFAULT NULL COMMENT '用户ID',
- `count` int(11) NULL DEFAULT NULL COMMENT '访问次数',
- `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注描述',
- `add_time` int(11) NULL DEFAULT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '产品浏览分析表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_system_attachment
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_attachment`;
-CREATE TABLE `yx_system_attachment` (
- `att_id` int(10) NOT NULL AUTO_INCREMENT,
- `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '附件名称',
- `att_dir` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '附件路径',
- `satt_dir` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '压缩图片路径',
- `att_size` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '附件大小',
- `att_type` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '附件类型',
- `pid` int(10) NOT NULL DEFAULT 0 COMMENT '分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图',
- `time` int(11) NOT NULL DEFAULT 0 COMMENT '上传时间',
- `image_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '图片上传类型 1本地 2七牛云 3OSS 4COS ',
- `module_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '图片上传模块类型 1 后台上传 2 用户生成',
- `uid` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '用户id',
- `invite_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '邀请码',
- PRIMARY KEY (`att_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '附件管理表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_system_config
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_config`;
-CREATE TABLE `yx_system_config` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '配置id',
- `menu_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字段名称',
- `value` varchar(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '默认值',
- `sort` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
- `status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否隐藏',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 212 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '配置表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_config
--- ----------------------------
-INSERT INTO `yx_system_config` VALUES (162, 'wechat_share_img', 'https://image.dayouqiantu.cn/list_34.png', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (165, 'wechat_avatar', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (172, 'wechat_share_synopsis', '4444444', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (174, 'api', 'http://你的H5端域名/api/wechat/serve', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (175, 'wechat_share_title', '4444', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (177, 'store_postage', '1', 0, 0);
-INSERT INTO `yx_system_config` VALUES (178, 'store_free_postage', '200', 0, 0);
-INSERT INTO `yx_system_config` VALUES (179, 'integral_ratio', '1', 0, 0);
-INSERT INTO `yx_system_config` VALUES (180, 'store_brokerage_ratio', '70', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (181, 'store_brokerage_statu', '2', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (182, 'user_extract_min_price', '1', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (183, 'store_brokerage_two', '30', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (184, 'site_url', 'http://localhost:8080', 0, 0);
-INSERT INTO `yx_system_config` VALUES (185, 'api_url', 'http://127.0.0.1:8009', 0, 0);
-INSERT INTO `yx_system_config` VALUES (186, 'order_cancel_job_time', '20', 0, 0);
-INSERT INTO `yx_system_config` VALUES (187, 'wechat_appid', '11112', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (188, 'wechat_appsecret', '222266', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (189, 'wechat_encodingaeskey', '6666', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (190, 'wechat_token', '999', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (191, 'wxpay_mchId', '2222', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (192, 'wxpay_appId', '111111', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (193, 'wxpay_mchKey', '55555', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (194, 'wxapp_appId', '22222', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (195, 'wxapp_secret', '22222222', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (196, 'wxpay_keyPath', 'http://localhost:8000/file/pic/list_30-20200110053337209.png', 0, 0);
-INSERT INTO `yx_system_config` VALUES (197, 'imageArr', '[\"https://image.dayouqiantu.cn/list_34.png\"]', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (198, 'store_brokerage_open', '1', 0, 0);
-INSERT INTO `yx_system_config` VALUES (199, 'integral_full', '0', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (200, 'integral_max', '0', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (201, 'store_user_min_recharge', '1', 0, 0);
-INSERT INTO `yx_system_config` VALUES (203, 'store_self_mention', '1', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (204, 'tengxun_map_key', 'OGABZ-Y5OCF-5UWJ5-N7DHH-VFIG7-DHFEB', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (205, 'wechat_id', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (206, 'wechat_type', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (207, 'wechat_encode', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (208, 'wechat_sourceid', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (209, 'wechat_name', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (210, 'wechat_qrcode', '', NULL, NULL);
-INSERT INTO `yx_system_config` VALUES (211, 'wx_native_app_appId', '11111', NULL, NULL);
-
--- ----------------------------
--- Table structure for yx_system_group_data
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_group_data`;
-CREATE TABLE `yx_system_group_data` (
- `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组合数据详情ID',
- `group_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '对应的数据名称',
- `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据组对应的数据值(json数据)',
- `add_time` int(10) NOT NULL DEFAULT 0 COMMENT '添加数据时间',
- `sort` int(11) NULL DEFAULT 0 COMMENT '数据排序',
- `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态(1:开启;2:关闭;)',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 237 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '组合数据详情表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_group_data
--- ----------------------------
-INSERT INTO `yx_system_group_data` VALUES (177, 'yshop_home_banner', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\"],\"name\":\"banner\",\"id\":177,\"pic\":\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\",\"sort\":1,\"url\":\"wwww\",\"status\":1}', 1571387677, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (180, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e85bfa61251d.png\"],\"uniapp_url\":\"/pages/shop/GoodsClass/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa61251d.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1}', 1571390842, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (182, 'yshop_home_roll_news', '{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"id\":182,\"pic\":\"https://i.loli.net/2019/10/18/DqOUgNf7wjuFpPT.png\",\"sort\":2,\"title\":\"分销、拼团、商户功能上线啦!\",\"url\":\"/news_list\",\"info\":\"yshop2.0上线啦\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (183, 'yshop_hot_search', '{\"id\":183,\"title\":\"照片\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (184, 'yshop_hot_search', '{\"id\":184,\"title\":\"springboot\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (187, 'yshop_home_roll_news', '{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"id\":187,\"sort\":1,\"url\":\"/news_list\",\"info\":\"springboot2+JPA+Mybatisplus商城系统\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 1572086163, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (188, 'yshop_hot_search', '{\"id\":188,\"title\":\"打印\"}', 1572086172, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (189, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5dec896eeb25a.png\"],\"uniapp_url\":\"/pages/user/UserVip/index\",\"name\":\"会员中心\",\"id\":189,\"pic\":\"https://image.dayouqiantu.cn/5dec896eeb25a.png\",\"sort\":9,\"url\":\"/user/vip\",\"wxapp_url\":\"/pages/user/UserVip/main\",\"status\":1}', 1572087722, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (190, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428984d64d.png\"],\"uniapp_url\":\"/pages/user/coupon/UserCoupon/index\",\"name\":\"优惠券\",\"id\":190,\"pic\":\"https://image.dayouqiantu.cn/5db428984d64d.png\",\"sort\":8,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/UserCoupon/main\",\"status\":1}', 0, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (191, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428a8d3ab0.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"收藏商品\",\"id\":191,\"pic\":\"https://image.dayouqiantu.cn/5db428a8d3ab0.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', 0, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (192, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428bd61b73.png\"],\"uniapp_url\":\"/pages/user/address/AddressManagement/index\",\"name\":\"地址管理\",\"id\":192,\"pic\":\"https://image.dayouqiantu.cn/5db428bd61b73.png\",\"sort\":6,\"url\":\"/user/add_manage\",\"wxapp_url\":\"/pages/user/address/AddressManagement/main\",\"status\":1}', 0, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (193, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428e28dd48.png\"],\"uniapp_url\":\"/pages/user/promotion/UserPromotion/index\",\"name\":\"我的推广\",\"id\":193,\"pic\":\"https://image.dayouqiantu.cn/5db428e28dd48.png\",\"sort\":5,\"url\":\"/user/user_promotion\",\"wxapp_url\":\"/pages/user/promotion/UserPromotion/main\",\"status\":1}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (194, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db42a4208c55.png\"],\"uniapp_url\":\"/pages/user/UserAccount/index\",\"name\":\"我的余额\",\"id\":194,\"pic\":\"https://image.dayouqiantu.cn/5db42a4208c55.png\",\"sort\":4,\"url\":\"/user/account\",\"wxapp_url\":\"/pages/user/UserAccount/main\",\"status\":1}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (195, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5db428f410462.png\"],\"uniapp_url\":\"/pages/user/signIn/Integral/index\",\"name\":\"我的积分\",\"id\":195,\"pic\":\"https://image.dayouqiantu.cn/5db428f410462.png\",\"sort\":3,\"url\":\"/user/integral\",\"wxapp_url\":\"/pages/user/signIn/Integral/main\",\"status\":1}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (196, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93f004713.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/5e85bfea151b7.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', 1573109648, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (197, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e939507b5e.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa55f352.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', 1573109723, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (199, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93c9a8304.png\"],\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa6621ca.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1}', 1573387422, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (200, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e925140b57.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa4b273f.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (201, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5ddb7a37d58d9.png\"],\"uniapp_url\":\"/pages/orderAdmin/OrderIndex/index\",\"name\":\"商户管理\",\"id\":201,\"pic\":\"https://image.dayouqiantu.cn/5ddb7a37d58d9.png\",\"sort\":2,\"url\":\"/customer/index\",\"wxapp_url\":\"/pages/orderAdmin/OrderIndex/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (202, 'yshop_sign_day_num', '{\"sign_num\":\"10\",\"id\":205,\"day\":\"第一天\"}', 0, 9, 1);
-INSERT INTO `yx_system_group_data` VALUES (203, 'yshop_sign_day_num', '{\"sign_num\":\"20\",\"id\":\"\",\"day\":\"第二天\"}', 0, 8, 1);
-INSERT INTO `yx_system_group_data` VALUES (204, 'yshop_sign_day_num', '{\"sign_num\":\"30\",\"id\":\"\",\"day\":\"第三天\"}', 0, 7, 1);
-INSERT INTO `yx_system_group_data` VALUES (205, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"40\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第四天\",\"status\":\"\"}', 0, 6, 1);
-INSERT INTO `yx_system_group_data` VALUES (206, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"50\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第五天\",\"status\":\"\"}', 0, 5, 1);
-INSERT INTO `yx_system_group_data` VALUES (207, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"60\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第六天\",\"status\":\"\"}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (208, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"100\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"奖励\",\"status\":\"\"}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (209, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e93010a248.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/5e85bf8e494f2.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1}', 0, 4, 1);
-INSERT INTO `yx_system_group_data` VALUES (210, 'yshop_seckill_time', '{\"continued\":2,\"id\":\"\",\"time\":5}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (211, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"7\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (212, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"2\",\"id\":\"\",\"sort\":\"\",\"time\":\"10\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (213, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"12\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (214, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"4\",\"id\":\"\",\"sort\":\"\",\"time\":\"15\",\"value\":\"\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (215, 'yshop_seckill_time', '{\"continued\":\"2\",\"id\":223,\"time\":\"19\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (216, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e929f9be59.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/5e85bfa5a9f85.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1}', 0, 3, 1);
-INSERT INTO `yx_system_group_data` VALUES (217, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e9276c608f.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/5e85bfe9b1da8.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}', 0, 2, 1);
-INSERT INTO `yx_system_group_data` VALUES (218, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5dfd7b748e053.png\"],\"uniapp_url\":\"/pages/activity/BargainRecord/index\",\"name\":\"砍价记录\",\"id\":218,\"pic\":\"https://image.dayouqiantu.cn/5dfd7b748e053.png\",\"sort\":1,\"url\":\"/activity/bargain/record\",\"wxapp_url\":\"/pages/activity/BargainRecord/main\",\"status\":1}', 0, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (219, 'yshop_home_banner', '{\"name\":\"222\",\"id\":\"\",\"pic\":\"https://image.dayouqiantu.cn/5c9f117f624ee.jpg\",\"sort\":\"\",\"url\":\"/\",\"status\":\"\"}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (221, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e60da498cfdd.png\"],\"name\":\"订单核销\",\"id\":230,\"pic\":\"https://image.dayouqiantu.cn/5e60da498cfdd.png\",\"sort\":0,\"url\":\"/order/order_cancellation\",\"wxapp_url\":\"\",\"status\":1}', 0, 0, 1);
-INSERT INTO `yx_system_group_data` VALUES (222, 'yshop_recharge_price_ways', '{\"give_price\":\"10\",\"price\":\"100\",\"id\":\"\",\"sort\":0,\"status\":1}', 0, 1, 1);
-INSERT INTO `yx_system_group_data` VALUES (223, 'yshop_recharge_price_ways', '{\"give_price\":\"1\",\"price\":1,\"id\":\"\",\"sort\":0,\"status\":1}', 0, 0, 1);
-
--- ----------------------------
--- Table structure for yx_system_store
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_store`;
-CREATE TABLE `yx_system_store` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店名称',
- `introduction` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '简介',
- `phone` char(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号码',
- `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省市区',
- `detailed_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
- `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '门店logo',
- `latitude` char(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '纬度',
- `longitude` char(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '经度',
- `valid_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销有效日期',
- `day_time` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '每日营业开关时间',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
- `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示',
- `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
- `day_time_end` datetime(0) NULL DEFAULT NULL,
- `day_time_start` datetime(0) NULL DEFAULT NULL,
- `valid_time_end` datetime(0) NULL DEFAULT NULL,
- `valid_time_start` datetime(0) NULL DEFAULT NULL,
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `phone`(`phone`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店自提' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_store
--- ----------------------------
-INSERT INTO `yx_system_store` VALUES (3, 'yshop店铺', 'springboot商城', '15136175234', '河南省漯河市', '', 'https://image.dayouqiantu.cn/noMeal_tt.png', '33.54528', '113.9202', '2020-03-09 - 2020-04-30', '11:33:49 - 19:33:49', 1583300059, 0, 0, '2020-03-04 19:33:49', '2020-03-04 11:33:49', '2020-04-30 00:00:00', '2020-03-09 00:00:00');
-INSERT INTO `yx_system_store` VALUES (4, '信阳门店', '信阳门店', '15136275234', '河南省信阳市', '', 'http://localhost:8000/file/pic/砍价-20200311043720679.png', '32.11683', '114.05857', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:13', 1584781880, 1, 0, '2020-03-21 20:11:13', '2020-03-21 17:11:13', '2020-03-31 00:00:00', '2020-03-21 00:00:00');
-INSERT INTO `yx_system_store` VALUES (5, '郑州门店', '郑州门店', '15136175246', '河南省郑州', '', 'http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png', '34.72468', '113.6401', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:15', 1584782199, 1, 0, '2020-03-21 20:11:15', '2020-03-21 17:11:13', '2020-03-31 00:00:00', '2020-03-21 00:00:00');
-
--- ----------------------------
--- Table structure for yx_system_store_staff
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_store_staff`;
-CREATE TABLE `yx_system_store_staff` (
- `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) UNSIGNED NOT NULL COMMENT '微信用户id',
- `nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
- `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店员头像',
- `store_id` int(11) NOT NULL COMMENT '门店id',
- `store_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `staff_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店员名称',
- `phone` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
- `verify_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '核销开关',
- `status` tinyint(2) NULL DEFAULT 1 COMMENT '状态',
- `add_time` int(10) NULL DEFAULT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '门店店员表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_store_staff
--- ----------------------------
-INSERT INTO `yx_system_store_staff` VALUES (2, 12, '会敲代码的喵2', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 4, '信阳门店', 'tttt', '15136175423', 1, 1, 1584868920);
-INSERT INTO `yx_system_store_staff` VALUES (3, 11, '会敲代码的喵88', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', 'tttt', '16136175234', 1, 1, 1585213920);
-INSERT INTO `yx_system_store_staff` VALUES (4, 19, '15136175528', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', '111', '15136175246', 1, 1, 1586180635);
-
--- ----------------------------
--- Table structure for yx_system_user_level
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_user_level`;
-CREATE TABLE `yx_system_user_level` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `mer_id` int(11) NOT NULL DEFAULT 0 COMMENT '商户id',
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员名称',
- `money` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '购买金额',
- `valid_date` int(11) NOT NULL DEFAULT 0 COMMENT '有效时间',
- `is_forever` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为永久会员',
- `is_pay` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否购买,1=购买,0=不购买',
- `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示 1=显示,0=隐藏',
- `grade` int(11) NOT NULL DEFAULT 0 COMMENT '会员等级',
- `discount` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '享受折扣',
- `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员卡背景',
- `icon` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员图标',
- `explain` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '说明',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
- `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除.1=删除,0=未删除',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设置用户等级表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_user_level
--- ----------------------------
-INSERT INTO `yx_system_user_level` VALUES (1, 0, '普通会员', 20.00, 0, 1, 0, 1, 1, 99.00, 'http://pic.dayouqiantu.cn/5c9ccca8cd632.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8bc1e0.png', '普通会员', 1553824559, 0);
-INSERT INTO `yx_system_user_level` VALUES (2, 0, '青铜会员', 0.00, 0, 1, 0, 1, 2, 98.00, 'http://pic.dayouqiantu.cn/5c9ccca904016.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8f0a30.png', '青铜会员', 1553824639, 0);
-INSERT INTO `yx_system_user_level` VALUES (3, 0, '黄铜会员', 0.00, 0, 1, 0, 1, 3, 95.00, 'http://pic.dayouqiantu.cn/5c9ccca8b27f1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8e9365.png', '黄铜会员', 1553824742, 0);
-INSERT INTO `yx_system_user_level` VALUES (4, 0, '白银会员', 0.00, 0, 1, 0, 1, 4, 94.00, 'http://pic.dayouqiantu.cn/5c9ccca8d6ae1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8a27f0.png', '白银会员', 1553824797, 0);
-INSERT INTO `yx_system_user_level` VALUES (5, 0, '黄金会员', 0.00, 0, 1, 0, 1, 5, 90.00, 'http://pic.dayouqiantu.cn/5c9ccca8b27f1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8aa5b9.png', '黄金会员', 1553824837, 0);
-INSERT INTO `yx_system_user_level` VALUES (6, 0, '钻石会员', 0.00, 0, 1, 0, 1, 6, 88.00, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 'http://pic.dayouqiantu.cn/5c9ccca90d2d3.png', '钻石会员', 1553824871, 1);
-
--- ----------------------------
--- Table structure for yx_system_user_task
--- ----------------------------
-DROP TABLE IF EXISTS `yx_system_user_task`;
-CREATE TABLE `yx_system_user_task` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
- `real_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配置原名',
- `task_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务类型',
- `number` int(11) NOT NULL DEFAULT 0 COMMENT '限定数',
- `level_id` int(11) NOT NULL DEFAULT 0 COMMENT '等级id',
- `sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
- `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示',
- `is_must` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否务必达成任务,1务必达成,0=满足其一',
- `illustrate` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务说明',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '新增时间',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '等级任务设置' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_system_user_task
--- ----------------------------
-INSERT INTO `yx_system_user_task` VALUES (1, '满足积分20分', '积分数', 'SatisfactionIntegral', 20, 1, 0, 1, 1, '', 1553827616);
-INSERT INTO `yx_system_user_task` VALUES (2, '消费满100元', '消费金额', 'ConsumptionAmount', 100, 1, 0, 1, 1, '', 1553827625);
-INSERT INTO `yx_system_user_task` VALUES (3, '满足积分200分', '积分数', 'SatisfactionIntegral', 200, 2, 0, 1, 1, '', 1553827638);
-INSERT INTO `yx_system_user_task` VALUES (4, '累计签到20天', '累计签到', 'CumulativeAttendance', 20, 2, 0, 1, 1, '', 1553827681);
-INSERT INTO `yx_system_user_task` VALUES (5, '满足积分500分', '积分数', 'SatisfactionIntegral', 500, 3, 0, 1, 1, '', 1553827695);
-INSERT INTO `yx_system_user_task` VALUES (6, '累计签到30天', '累计签到', 'CumulativeAttendance', 30, 3, 0, 1, 1, '', 1553827703);
-INSERT INTO `yx_system_user_task` VALUES (7, '满足积分1000分', '积分数', 'SatisfactionIntegral', 1000, 4, 0, 1, 1, '', 1553827731);
-INSERT INTO `yx_system_user_task` VALUES (8, '累计签到10天', '累计签到', 'CumulativeAttendance', 10, 4, 0, 1, 1, '', 1553827740);
-INSERT INTO `yx_system_user_task` VALUES (9, '满足积分1200分', '积分数', 'SatisfactionIntegral', 1200, 5, 0, 1, 1, '', 1553827759);
-INSERT INTO `yx_system_user_task` VALUES (10, '累计签到60天', '累计签到', 'CumulativeAttendance', 60, 5, 0, 1, 1, '', 1553827768);
-INSERT INTO `yx_system_user_task` VALUES (11, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 5, 0, 1, 1, '', 1553827776);
-INSERT INTO `yx_system_user_task` VALUES (12, '满足积分2000分', '积分数', 'SatisfactionIntegral', 2000, 6, 0, 1, 1, '', 1553827791);
-INSERT INTO `yx_system_user_task` VALUES (13, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 6, 0, 1, 1, '', 1553827803);
-INSERT INTO `yx_system_user_task` VALUES (14, '累计签到100天', '累计签到', 'CumulativeAttendance', 100, 6, 0, 1, 1, '', 1553827814);
-INSERT INTO `yx_system_user_task` VALUES (15, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 4, 0, 1, 1, '', 1575456513);
-INSERT INTO `yx_system_user_task` VALUES (16, '累计签到2天', '累计签到', 'CumulativeAttendance', 2, 1, 0, 1, 1, '', 1575456576);
-INSERT INTO `yx_system_user_task` VALUES (17, '消费满100元', '消费次数', 'ConsumptionAmount', 100, 2, 0, 1, 1, '', 1575456612);
-INSERT INTO `yx_system_user_task` VALUES (18, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 3, 0, 1, 1, '', 1575456692);
-
--- ----------------------------
--- Table structure for yx_user
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user`;
-CREATE TABLE `yx_user` (
- `uid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id',
- `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户账户(跟accout一样)',
- `account` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号',
- `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码(跟pwd)',
- `pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户密码',
- `real_name` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '真实姓名',
- `birthday` int(11) NULL DEFAULT 0 COMMENT '生日',
- `card_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '身份证号码',
- `mark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户备注',
- `partner_id` int(11) NULL DEFAULT 0 COMMENT '合伙人id',
- `group_id` int(11) NULL DEFAULT 0 COMMENT '用户分组id',
- `nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户昵称',
- `avatar` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户头像',
- `phone` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
- `add_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
- `add_ip` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '添加ip',
- `last_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最后一次登录时间',
- `last_ip` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '最后一次登录ip',
- `now_money` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '用户余额',
- `brokerage_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '佣金金额',
- `integral` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '用户剩余积分',
- `sign_num` int(11) NOT NULL DEFAULT 0 COMMENT '连续签到天数',
- `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1为正常,0为禁止',
- `level` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '等级',
- `spread_uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推广元id',
- `spread_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '推广员关联时间',
- `user_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户类型',
- `is_promoter` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为推广员',
- `pay_count` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '用户购买次数',
- `spread_count` int(11) NULL DEFAULT 0 COMMENT '下级人数',
- `clean_time` int(11) NULL DEFAULT 0 COMMENT '清理会员时间',
- `addres` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
- `adminid` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '管理员编号 ',
- `login_type` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登陆类型,h5,wechat,routine',
- PRIMARY KEY (`uid`) USING BTREE,
- UNIQUE INDEX `username`(`username`) USING BTREE,
- INDEX `account`(`account`) USING BTREE,
- INDEX `spreaduid`(`spread_uid`) USING BTREE,
- INDEX `level`(`level`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `is_promoter`(`is_promoter`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user
--- ----------------------------
-INSERT INTO `yx_user` VALUES (11, 'hupeng', 'hupeng', '$2a$10$fP.426qKaTmix50Oln8L.uav55gELhAd0Eg66Av4oG86u8km7D/Ky', 'e10adc3949ba59abbe56e057f20f883e', '', 0, '', '', 0, 0, '会敲代码的喵88', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175246', 1573120584, '', 1573120584, '', 7619.91, 26.86, 988.06, 1, 1, 1, 0, 1, 'h5', 0, 39, 4, 0, '', 1, '');
-INSERT INTO `yx_user` VALUES (12, '15136175246', 'hupeng2', '$2a$10$fP.426qKaTmix50Oln8L.uav55gELhAd0Eg66Av4oG86u8km7D/Ky', 'e10adc3949ba59abbe56e057f20f883e', '', 0, '', '', 0, 0, '会敲代码的喵2', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175246', 1573120881, '', 1573120881, '', 8766.20, 28.00, 70.51, 2, 1, 1, 11, 1582896799, 'h5', 0, 20, 0, 0, '', 1, '');
-INSERT INTO `yx_user` VALUES (14, '15136175247', '15136175247', '$2a$10$fP.426qKaTmix50Oln8L.uav55gELhAd0Eg66Av4oG86u8km7D/Ky', 'e10adc3949ba59abbe56e057f20f883e', '', 0, '', '', 0, 0, '15136175247', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175247', 1573612696, '', 1573612696, '', 9200.00, 0.00, 2.00, 0, 1, 0, 11, 1584189298, 'h5', 0, 5, 0, 0, '', 0, '');
-INSERT INTO `yx_user` VALUES (15, '15136175249', '15136175249', '$2a$10$fP.426qKaTmix50Oln8L.uav55gELhAd0Eg66Av4oG86u8km7D/Ky', '$2a$10$IG/fc8idkW35ezw7VtiM.OjUU1fvS2d/Bw7TmU76UUTbd5/4eCd9a', '', 0, '', '', 0, 0, '15136175249', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175249', 1578839477, '', 1578839477, '', 0.00, 0.00, 0.00, 0, 1, 0, 0, 0, 'h5', 0, 0, 0, 0, '', 0, '');
-INSERT INTO `yx_user` VALUES (18, '15136175523', '15136175523', '$2a$10$kMjK.K8lezzqiHfPjJCAUuSYajA7dAZhtUdtEyKd5RilPi8sWf4gC', '$2a$10$DhiQooA85GOl2Z4tZrAwAejwgf8O6SrMsv8jaVwQsXkR1VcyTp0eC', '', 0, '', '', 0, 0, '15136175523', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175523', 1584171347, '', 1584171347, '', 0.00, 0.00, 0.00, 0, 1, 0, 0, 0, 'h5', 0, 0, 0, 0, '', 0, '');
-INSERT INTO `yx_user` VALUES (19, '15136175528', '15136175528', '$2a$10$8d4xZEX3x7jaojPTv0WDheEG8syzV1br2z1RpZ0ceV/p0OTaKOq1u', '$2a$10$zLLJrrxGKbikzbAiP34N/Od5nlNgREMtoaih7rlqSzk7oOnurFneO', '', 0, '', '', 0, 0, '15136175528', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', '15136175528', 1584535079, '', 1584535079, '', 0.00, 0.00, 0.00, 0, 1, 0, 11, 1584535081, 'h5', 0, 0, 0, 0, '', 0, '');
-INSERT INTO `yx_user` VALUES (20, '15136171112', '15136171112', '$2a$10$MsTr57nPX9bSOLvlA4C/Z.MaUGTJM/anEzDasPucezf4GVfPpmmji', '$2a$10$62PLFod7JnPPmW8Hx0MZ9uhkGXmXZZ2N3ZixnvUzfBTZ157oiFCSm', '', 0, '', '', 0, 0, '15136171112', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', '15136171112', 1585385387, '', 1585385387, '', 0.00, 0.00, 0.00, 0, 1, 0, 11, 1585385387, 'h5', 0, 0, 0, 0, '', 0, '');
-
--- ----------------------------
--- Table structure for yx_user_address
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_address`;
-CREATE TABLE `yx_user_address` (
- `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户地址id',
- `uid` int(10) UNSIGNED NOT NULL COMMENT '用户id',
- `real_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
- `phone` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人电话',
- `province` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在省',
- `city` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在市',
- `district` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在区',
- `detail` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收货人详细地址',
- `post_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮编',
- `longitude` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '经度',
- `latitude` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '纬度',
- `is_default` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否默认',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
- `add_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `uid`(`uid`) USING BTREE,
- INDEX `is_default`(`is_default`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户地址表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_address
--- ----------------------------
-INSERT INTO `yx_user_address` VALUES (9, 8, '胡鹏', '15136175246', '山西', '大同市', '灵丘县', '999', '', '0', '0', 1, 0, 1573119435);
-INSERT INTO `yx_user_address` VALUES (10, 11, '胡鹏', '15139175246', '重庆', '荣昌县', '广顺镇', '999', '', '0', '0', 1, 0, 1573120628);
-INSERT INTO `yx_user_address` VALUES (11, 12, 'hu', '15136175246', '上海', '闸北区', '城区', '99999', '', '0', '0', 1, 0, 1573123595);
-INSERT INTO `yx_user_address` VALUES (12, 14, 'zhang', '15136175247', '上海', '静安区', '城区', '999', '', '0', '0', 1, 0, 1573612804);
-
--- ----------------------------
--- Table structure for yx_user_bill
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_bill`;
-CREATE TABLE `yx_user_bill` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户账单id',
- `uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户uid',
- `link_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '关联id',
- `pm` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = 支出 1 = 获得',
- `title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账单标题',
- `category` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '明细种类',
- `type` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '明细类型',
- `number` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '明细数字',
- `balance` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '剩余',
- `mark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
- `add_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
- `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0 = 带确定 1 = 有效 -1 = 无效',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `openid`(`uid`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `pm`(`pm`) USING BTREE,
- INDEX `type`(`category`, `type`, `link_id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户账单表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_bill
--- ----------------------------
-INSERT INTO `yx_user_bill` VALUES (3, 3, '8', 0, '购买商品', 'now_money', 'pay_product', 100.00, 10000.00, '余额支付', 1572416780, 1);
-INSERT INTO `yx_user_bill` VALUES (4, 3, '9', 0, '购买商品', 'now_money', 'pay_product', 300.00, 9900.00, '余额支付', 1572416917, 1);
-INSERT INTO `yx_user_bill` VALUES (5, 3, '10', 0, '购买商品', 'now_money', 'pay_product', 100.00, 9600.00, '余额支付', 1572425699, 1);
-INSERT INTO `yx_user_bill` VALUES (6, 3, '11', 0, '购买商品', 'now_money', 'pay_product', 100.00, 9500.00, '余额支付', 1572427199, 1);
-INSERT INTO `yx_user_bill` VALUES (7, 3, '11', 1, '购买商品赠送积分', 'integral', 'gain', 10.00, 0.00, '购买商品赠送', 1572693386, 1);
-INSERT INTO `yx_user_bill` VALUES (8, 3, '10', 1, '商品退款', 'now_money', 'pay_product_refund', 100.00, 9500.00, '订单退款到余额', 1573040186, 1);
-INSERT INTO `yx_user_bill` VALUES (9, 3, '12', 0, '购买商品', 'now_money', 'pay_product', 100.00, 9500.00, '余额支付', 1573040704, 1);
-INSERT INTO `yx_user_bill` VALUES (10, 12, '12', 1, '购买商品赠送积分', 'integral', 'gain', 10.00, 10.00, '购买商品赠送', 1573041037, 1);
-INSERT INTO `yx_user_bill` VALUES (11, 3, '26', 0, '购买商品', 'now_money', 'pay_product', 0.20, 9400.00, '余额支付', 1573119034, 1);
-INSERT INTO `yx_user_bill` VALUES (12, 12, '34', 0, '购买商品', 'now_money', 'pay_product', 0.20, 10000.00, '余额支付', 1573124900, 1);
-INSERT INTO `yx_user_bill` VALUES (13, 12, '33', 0, '购买商品', 'now_money', 'pay_product', 0.20, 9999.80, '余额支付', 1573124914, 1);
-INSERT INTO `yx_user_bill` VALUES (14, 12, '35', 0, '购买商品', 'now_money', 'pay_product', 119.00, 9999.60, '余额支付', 1573380051, 1);
-INSERT INTO `yx_user_bill` VALUES (15, 12, '105e06edb7bf4113aff646a45b13abaa', 0, '积分抵扣', 'integral', 'deduction', 10.00, 10.00, '购买商品使用', 1573381947, 1);
-INSERT INTO `yx_user_bill` VALUES (16, 12, '36', 0, '购买商品', 'now_money', 'pay_product', 160.00, 9880.60, '余额支付', 1573381947, 1);
-INSERT INTO `yx_user_bill` VALUES (17, 14, '37', 0, '购买商品', 'now_money', 'pay_product', 120.00, 10000.00, '余额支付', 1573612822, 1);
-INSERT INTO `yx_user_bill` VALUES (18, 14, '37', 1, '购买商品赠送积分', 'integral', 'gain', 1.00, 0.00, '购买商品赠送', 1573613426, 1);
-INSERT INTO `yx_user_bill` VALUES (19, 12, '37', 1, '获得推广佣金', 'now_money', 'brokerage', 14.00, 14.00, '15136175247成功消费120.00元,奖励推广佣金14.0', 1573613427, 1);
-INSERT INTO `yx_user_bill` VALUES (20, 11, '37', 1, '获得推广佣金', 'now_money', 'brokerage', 6.00, 6.00, '二级推广人15136175247成功消费120.00元,奖励推广佣金6.0', 1573613427, 1);
-INSERT INTO `yx_user_bill` VALUES (21, 11, '1', 0, '佣金提现', 'now_money', 'extract', 1.00, 5.00, '使用微信提现1元', 1573648445, 1);
-INSERT INTO `yx_user_bill` VALUES (25, 11, '1', 1, '提现失败', 'now_money', 'extract', 1.00, 6.00, '提现失败,退回佣金1元', 1573710526, 1);
-INSERT INTO `yx_user_bill` VALUES (26, 14, '84892a2626a341939dd05cd7f2adff9e', 0, '积分抵扣', 'integral', 'deduction', 1.00, 1.00, '购买商品使用', 1573888321, 1);
-INSERT INTO `yx_user_bill` VALUES (27, 14, '39', 1, '积分回退', 'integral', 'deduction', 1.00, 0.00, '购买商品失败,回退积分', 1573888707, 1);
-INSERT INTO `yx_user_bill` VALUES (28, 14, '42', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9880.00, '余额支付', 1573979565, 1);
-INSERT INTO `yx_user_bill` VALUES (29, 14, '61', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9760.00, '余额支付', 1573991796, 1);
-INSERT INTO `yx_user_bill` VALUES (30, 14, '67', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9640.00, '余额支付', 1573996204, 1);
-INSERT INTO `yx_user_bill` VALUES (31, 14, '68', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9520.00, '余额支付', 1573996429, 1);
-INSERT INTO `yx_user_bill` VALUES (32, 14, '68', 1, '购买商品赠送积分', 'integral', 'gain', 1.00, 1.00, '购买商品赠送', 1574048275, 1);
-INSERT INTO `yx_user_bill` VALUES (33, 12, '68', 1, '获得推广佣金', 'now_money', 'brokerage', 14.00, 28.00, '15136175247成功消费120.00元,奖励推广佣金14.0', 1574048275, 1);
-INSERT INTO `yx_user_bill` VALUES (34, 11, '68', 1, '获得推广佣金', 'now_money', 'brokerage', 6.00, 12.00, '二级推广人15136175247成功消费120.00元,奖励推广佣金6.0', 1574048275, 1);
-INSERT INTO `yx_user_bill` VALUES (35, 12, '89', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9720.60, '余额支付', 1574221758, 1);
-INSERT INTO `yx_user_bill` VALUES (36, 12, '90', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9600.60, '余额支付', 1574243179, 1);
-INSERT INTO `yx_user_bill` VALUES (37, 12, '91', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9480.60, '余额支付', 1574244175, 1);
-INSERT INTO `yx_user_bill` VALUES (38, 12, '92', 0, '购买商品', 'now_money', 'pay_product', 1.00, 9360.60, '余额支付', 1574327309, 1);
-INSERT INTO `yx_user_bill` VALUES (39, 11, '93', 0, '购买商品', 'now_money', 'pay_product', 1.00, 10000.00, '余额支付', 1574329404, 1);
-INSERT INTO `yx_user_bill` VALUES (40, 12, '96', 0, '购买商品', 'now_money', 'pay_product', 1.00, 9359.60, '余额支付', 1574425447, 1);
-INSERT INTO `yx_user_bill` VALUES (41, 12, '91', 1, '商品退款', 'now_money', 'pay_product_refund', 120.00, 9478.60, '订单退款到余额', 1574757130, 1);
-INSERT INTO `yx_user_bill` VALUES (42, 12, '91', 1, '商品退款', 'now_money', 'pay_product_refund', 120.00, 9598.60, '订单退款到余额', 1574757363, 1);
-INSERT INTO `yx_user_bill` VALUES (43, 11, '0', 1, '充值', 'now_money', 'recharge', 10.00, 9410.00, '系统增加了10.0余额', 1575446946, 1);
-INSERT INTO `yx_user_bill` VALUES (44, 14, '0', 0, '系统增加余额', 'now_money', 'system_sub', 10.00, 9400.00, '系统扣除了10.0余额', 1575447084, 1);
-INSERT INTO `yx_user_bill` VALUES (45, 12, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 0.00, '', 1575549244, 1);
-INSERT INTO `yx_user_bill` VALUES (46, 12, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 10.00, '', 1575684021, 1);
-INSERT INTO `yx_user_bill` VALUES (47, 12, '99', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9598.60, '余额支付', 1575771514, 1);
-INSERT INTO `yx_user_bill` VALUES (48, 12, '0', 1, '签到奖励', 'integral', 'sign', 20.00, 20.00, '', 1575771932, 1);
-INSERT INTO `yx_user_bill` VALUES (49, 11, '96', 1, '获得推广佣金', 'now_money', 'brokerage', 0.70, 12.70, '会敲代码的喵2成功消费1.00元,奖励推广佣金0.7', 1575868078, 1);
-INSERT INTO `yx_user_bill` VALUES (50, 12, '100', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9479.80, '余额支付', 1576234308, 1);
-INSERT INTO `yx_user_bill` VALUES (51, 12, '91', 1, '商品退款', 'now_money', 'pay_product_refund', 120.00, 9481.00, '订单退款到余额', 1576286856, 1);
-INSERT INTO `yx_user_bill` VALUES (52, 12, '101', 0, '购买商品', 'now_money', 'pay_product', 1.00, 9481.00, '余额支付', 1576565376, 1);
-INSERT INTO `yx_user_bill` VALUES (53, 12, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 40.00, '', 1577026465, 1);
-INSERT INTO `yx_user_bill` VALUES (54, 12, '102', 0, '购买商品', 'now_money', 'pay_product', 1.00, 9480.00, '余额支付', 1577086164, 1);
-INSERT INTO `yx_user_bill` VALUES (55, 12, '0', 1, '签到奖励', 'integral', 'sign', 20.00, 50.00, '', 1577099436, 1);
-INSERT INTO `yx_user_bill` VALUES (56, 12, '103', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9479.00, '余额支付', 1577345071, 1);
-INSERT INTO `yx_user_bill` VALUES (57, 12, '25f5693f8e82419bba4f581af126dc47', 0, '积分抵扣', 'integral', 'deduction', 0.50, 70.00, '购买商品使用', 1577442136, 1);
-INSERT INTO `yx_user_bill` VALUES (58, 12, '104', 0, '购买商品', 'now_money', 'pay_product', 0.00, 9360.20, '余额支付', 1577442136, 1);
-INSERT INTO `yx_user_bill` VALUES (59, 12, '104', 1, '商品退款', 'now_money', 'pay_product_refund', 0.00, 9360.20, '订单退款到余额', 1577586525, 1);
-INSERT INTO `yx_user_bill` VALUES (60, 12, '105', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9360.20, '余额支付', 1577611680, 1);
-INSERT INTO `yx_user_bill` VALUES (61, 12, '106', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9241.40, '余额支付', 1577774706, 1);
-INSERT INTO `yx_user_bill` VALUES (62, 14, '0', 1, '系统增加余额', 'now_money', 'system_add', 0.00, 9400.00, '系统增加了0.0余额', 1578321034, 1);
-INSERT INTO `yx_user_bill` VALUES (63, 12, '108', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9122.60, '余额支付', 1578386338, 1);
-INSERT INTO `yx_user_bill` VALUES (64, 11, '1', 1, '提现失败', 'now_money', 'extract', 1.00, 13.70, '提现失败,退回佣金1元', 1578455379, 1);
-INSERT INTO `yx_user_bill` VALUES (65, 12, '110', 0, '购买商品', 'now_money', 'pay_product', 118.80, 9003.80, '余额支付', 1578482250, 1);
-INSERT INTO `yx_user_bill` VALUES (66, 12, '99', 1, '购买商品赠送积分', 'integral', 'gain', 1.00, 69.51, '购买商品赠送', 1578733510, 1);
-INSERT INTO `yx_user_bill` VALUES (67, 11, '99', 1, '获得推广佣金', 'now_money', 'brokerage', 13.16, 26.86, '会敲代码的喵2成功消费118.80元,奖励推广佣金13.16', 1578733510, 1);
-INSERT INTO `yx_user_bill` VALUES (68, 12, '111', 0, '购买商品', 'now_money', 'pay_product', 118.80, 8885.00, '余额支付', 1578839691, 1);
-INSERT INTO `yx_user_bill` VALUES (69, 15, '0', 0, '系统减少余额', 'now_money', 'system_sub', 10.00, 0.00, '系统扣除了10.0余额', 1580440677, 1);
-INSERT INTO `yx_user_bill` VALUES (70, 14, '0', 0, '系统减少余额', 'now_money', 'system_sub', 100.00, 9300.00, '系统扣除了100.0余额', 1580440694, 1);
-INSERT INTO `yx_user_bill` VALUES (71, 14, '0', 0, '系统减少余额', 'now_money', 'recharge', 100.00, 9200.00, '系统扣除了100.0余额', 1580440702, 1);
-INSERT INTO `yx_user_bill` VALUES (72, 12, '104', 1, '商品退款', 'now_money', 'pay_product_refund', 0.00, 8766.20, '订单退款到余额', 1580440738, 1);
-INSERT INTO `yx_user_bill` VALUES (73, 12, '104', 1, '商品退款', 'now_money', 'pay_product_refund', 0.00, 8766.20, '订单退款到余额', 1580440967, 1);
-INSERT INTO `yx_user_bill` VALUES (74, 11, '112', 0, '购买商品', 'now_money', 'pay_product', 15.50, 9999.00, '余额支付', 1581586206, 1);
-INSERT INTO `yx_user_bill` VALUES (75, 11, '113', 0, '购买商品', 'now_money', 'pay_product', 11.00, 9983.50, '余额支付', 1582080107, 1);
-INSERT INTO `yx_user_bill` VALUES (76, 11, '114', 0, '购买商品', 'now_money', 'pay_product', 11.00, 9972.50, '余额支付', 1582080948, 1);
-INSERT INTO `yx_user_bill` VALUES (77, 11, '115', 0, '购买商品', 'now_money', 'pay_product', 11.00, 9961.50, '余额支付', 1582081730, 1);
-INSERT INTO `yx_user_bill` VALUES (78, 11, '116', 0, '购买商品', 'now_money', 'pay_product', 11.00, 9950.50, '余额支付', 1582081800, 1);
-INSERT INTO `yx_user_bill` VALUES (79, 11, '117', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9939.50, '余额支付', 1582704871, 1);
-INSERT INTO `yx_user_bill` VALUES (80, 11, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 0.00, '', 1582781884, 1);
-INSERT INTO `yx_user_bill` VALUES (81, 11, '118', 0, '购买商品', 'now_money', 'pay_product', 15.50, 9819.50, '余额支付', 1582809322, 1);
-INSERT INTO `yx_user_bill` VALUES (82, 11, '120', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9804.00, '余额支付', 1582810596, 1);
-INSERT INTO `yx_user_bill` VALUES (83, 11, '120', 1, '购买商品赠送积分', 'integral', 'gain', 1.00, 10.00, '购买商品赠送', 1582812352, 1);
-INSERT INTO `yx_user_bill` VALUES (84, 11, '8f93eb694f7142c5aeddd8acc6876eaf', 0, '积分抵扣', 'integral', 'deduction', 100.00, 1100.00, '购买商品使用', 1582970347, 1);
-INSERT INTO `yx_user_bill` VALUES (85, 11, '122', 0, '购买商品', 'now_money', 'pay_product', 140.00, 9684.00, '余额支付', 1582970348, 1);
-INSERT INTO `yx_user_bill` VALUES (86, 11, 'ac31a1bb85f14cfe92c16169495c7db7', 0, '积分抵扣', 'integral', 'deduction', 100.00, 1000.00, '购买商品使用', 1582970945, 1);
-INSERT INTO `yx_user_bill` VALUES (87, 11, '123', 0, '购买商品', 'now_money', 'pay_product', 140.00, 9544.00, '余额支付', 1582970946, 1);
-INSERT INTO `yx_user_bill` VALUES (88, 11, 'a51e7f23efa8430499f45ad76d45d696', 0, '积分抵扣', 'integral', 'deduction', 120.00, 900.00, '购买商品使用', 1582971169, 1);
-INSERT INTO `yx_user_bill` VALUES (89, 11, '124', 0, '购买商品', 'now_money', 'pay_product', 0.00, 9404.00, '余额支付', 1582971170, 1);
-INSERT INTO `yx_user_bill` VALUES (90, 11, 'f3ced8276fb64d1a90fe03c5efbad68a', 0, '积分抵扣', 'integral', 'deduction', 100.00, 100.00, '购买商品使用', 1582971472, 1);
-INSERT INTO `yx_user_bill` VALUES (91, 11, '125', 0, '购买商品', 'now_money', 'pay_product', 20.00, 9404.00, '余额支付', 1582971472, 1);
-INSERT INTO `yx_user_bill` VALUES (92, 11, '126', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9384.00, '余额支付', 1582990630, 1);
-INSERT INTO `yx_user_bill` VALUES (93, 11, '127', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9264.00, '余额支付', 1583392756, 1);
-INSERT INTO `yx_user_bill` VALUES (94, 11, '128', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9144.00, '余额支付', 1583393731, 1);
-INSERT INTO `yx_user_bill` VALUES (95, 11, '129', 0, '购买商品', 'now_money', 'pay_product', 120.00, 9024.00, '余额支付', 1583394584, 1);
-INSERT INTO `yx_user_bill` VALUES (96, 11, '130', 0, '购买商品', 'now_money', 'pay_product', 130.00, 8904.00, '余额支付', 1583399210, 1);
-INSERT INTO `yx_user_bill` VALUES (97, 11, '131', 0, '购买商品', 'now_money', 'pay_product', 120.00, 8774.00, '余额支付', 1583403288, 1);
-INSERT INTO `yx_user_bill` VALUES (98, 11, '132', 0, '购买商品', 'now_money', 'pay_product', 120.00, 8654.00, '余额支付', 1583410828, 1);
-INSERT INTO `yx_user_bill` VALUES (99, 11, '133', 0, '购买商品', 'now_money', 'pay_product', 130.00, 8534.00, '余额支付', 1583416032, 1);
-INSERT INTO `yx_user_bill` VALUES (100, 11, '135', 0, '购买商品', 'now_money', 'pay_product', 135.50, 8404.00, '余额支付', 1583486513, 1);
-INSERT INTO `yx_user_bill` VALUES (101, 11, '136', 0, '购买商品', 'now_money', 'pay_product', 130.00, 8268.50, '余额支付', 1584171672, 1);
-INSERT INTO `yx_user_bill` VALUES (102, 11, '137', 0, '购买商品', 'now_money', 'pay_product', 11.00, 8138.50, '余额支付', 1584175854, 1);
-INSERT INTO `yx_user_bill` VALUES (103, 11, '138', 0, '购买商品', 'now_money', 'pay_product', 120.00, 8127.50, '余额支付', 1585207556, 1);
-INSERT INTO `yx_user_bill` VALUES (104, 11, '139', 0, '购买商品', 'now_money', 'pay_product', 130.00, 8007.50, '余额支付', 1585293458, 1);
-INSERT INTO `yx_user_bill` VALUES (105, 11, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 0.00, '', 1585296317, 1);
-INSERT INTO `yx_user_bill` VALUES (106, 11, '0', 1, '签到奖励', 'integral', 'sign', 10.00, 10.00, '', 1585297108, 1);
-INSERT INTO `yx_user_bill` VALUES (107, 11, '140', 0, '购买商品', 'now_money', 'pay_product', 128.80, 7877.50, '余额支付', 1585385723, 1);
-INSERT INTO `yx_user_bill` VALUES (108, 11, '8cb56603f508449a8be484906978e566', 0, '积分抵扣', 'integral', 'deduction', 5.00, 10.00, '购买商品使用', 1585899809, 1);
-INSERT INTO `yx_user_bill` VALUES (109, 11, '141', 0, '购买商品', 'now_money', 'pay_product', 5.99, 7748.70, '余额支付', 1585899809, 1);
-INSERT INTO `yx_user_bill` VALUES (110, 11, '58d4c7bf44e046e7a90791cd7feeca2e', 0, '积分抵扣', 'integral', 'deduction', 5.00, 5.00, '购买商品使用', 1585899833, 1);
-INSERT INTO `yx_user_bill` VALUES (111, 11, 'a7bab1ca9e824141af8759d0c637c9ec', 0, '积分抵扣', 'integral', 'deduction', 1.99, 1000.00, '购买商品使用', 1585900321, 1);
-INSERT INTO `yx_user_bill` VALUES (112, 11, '143', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7742.71, '余额支付', 1585900321, 1);
-INSERT INTO `yx_user_bill` VALUES (113, 11, '94db868bbd0f48f8ac9b882a48ecf04e', 0, '积分抵扣', 'integral', 'deduction', 1.99, 998.01, '购买商品使用', 1585900414, 1);
-INSERT INTO `yx_user_bill` VALUES (114, 11, '144', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7742.71, '余额支付', 1585900414, 1);
-INSERT INTO `yx_user_bill` VALUES (115, 11, '2863a49ed88846cf920447ded1049908', 0, '积分抵扣', 'integral', 'deduction', 1.99, 996.02, '购买商品使用', 1585900433, 1);
-INSERT INTO `yx_user_bill` VALUES (116, 11, '145', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7742.71, '余额支付', 1585900433, 1);
-INSERT INTO `yx_user_bill` VALUES (117, 11, 'e530119f15094f99b710d0dbaaf2243f', 0, '积分抵扣', 'integral', 'deduction', 1.99, 994.03, '购买商品使用', 1585900497, 1);
-INSERT INTO `yx_user_bill` VALUES (118, 11, '147', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7742.71, '余额支付', 1585900497, 1);
-INSERT INTO `yx_user_bill` VALUES (119, 11, 'bae5bdd2288840369cdaab1953d2b243', 0, '积分抵扣', 'integral', 'deduction', 1.99, 992.04, '购买商品使用', 1585900580, 1);
-INSERT INTO `yx_user_bill` VALUES (120, 11, '148', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7742.71, '余额支付', 1585900580, 1);
-INSERT INTO `yx_user_bill` VALUES (121, 11, '59c0e78109fc4d44bae85e1de7a7f8a5', 0, '积分抵扣', 'integral', 'deduction', 0.00, 990.05, '购买商品使用', 1585901832, 1);
-INSERT INTO `yx_user_bill` VALUES (122, 11, '149', 0, '购买商品', 'now_money', 'pay_product', 1.99, 7742.71, '余额支付', 1585901832, 1);
-INSERT INTO `yx_user_bill` VALUES (123, 11, '7903fe2a57a2443794540fc4908aba36', 0, '积分抵扣', 'integral', 'deduction', 1.99, 990.05, '购买商品使用', 1585901988, 1);
-INSERT INTO `yx_user_bill` VALUES (124, 11, '150', 0, '购买商品', 'now_money', 'pay_product', 0.00, 7740.72, '余额支付', 1585901989, 1);
-INSERT INTO `yx_user_bill` VALUES (125, 11, '151', 0, '购买商品', 'now_money', 'pay_product', 1.01, 7740.72, '余额支付', 1585907993, 1);
-INSERT INTO `yx_user_bill` VALUES (126, 11, '152', 0, '购买商品', 'now_money', 'pay_product', 1.00, 7739.71, '余额支付', 1586065086, 1);
-INSERT INTO `yx_user_bill` VALUES (127, 11, '153', 0, '购买商品', 'now_money', 'pay_product', 118.80, 7738.71, '余额支付', 1586065172, 1);
-
--- ----------------------------
--- Table structure for yx_user_enter
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_enter`;
-CREATE TABLE `yx_user_enter` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商户申请ID',
- `uid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户ID',
- `province` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户所在省',
- `city` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户所在市',
- `district` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户所在区',
- `address` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户详细地址',
- `merchant_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户名称',
- `link_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
- `link_tel` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户电话',
- `charter` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商户证书',
- `add_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
- `apply_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核时间',
- `success_time` int(11) NOT NULL COMMENT '通过时间',
- `fail_message` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '未通过原因',
- `fail_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '未通过时间',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '-1 审核未通过 0未审核 1审核通过',
- `is_lock` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = 开启 1= 关闭',
- `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `uid`(`uid`) USING BTREE,
- INDEX `province`(`province`, `city`, `district`) USING BTREE,
- INDEX `is_lock`(`is_lock`) USING BTREE,
- INDEX `is_del`(`is_del`) USING BTREE,
- INDEX `status`(`status`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商户申请表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_user_extract
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_extract`;
-CREATE TABLE `yx_user_extract` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) UNSIGNED NULL DEFAULT NULL,
- `real_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
- `extract_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'bank' COMMENT 'bank = 银行卡 alipay = 支付宝wx=微信',
- `bank_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '银行卡',
- `bank_address` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '开户地址',
- `alipay_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '支付宝账号',
- `extract_price` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '提现金额',
- `mark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
- `balance` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00,
- `fail_msg` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '无效原因',
- `fail_time` int(10) UNSIGNED NULL DEFAULT NULL,
- `add_time` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
- `status` tinyint(2) NULL DEFAULT 0 COMMENT '-1 未通过 0 审核中 1 已提现',
- `wechat` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信号',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `extract_type`(`extract_type`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `openid`(`uid`) USING BTREE,
- INDEX `fail_time`(`fail_time`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户提现表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_extract
--- ----------------------------
-INSERT INTO `yx_user_extract` VALUES (1, 11, '会敲代码的喵', 'weixin', '0', '', '', 1.00, NULL, 5.00, '失败了', 1578455379, 1573648445, -1, 'hu');
-
--- ----------------------------
--- Table structure for yx_user_group
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_group`;
-CREATE TABLE `yx_user_group` (
- `id` smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT,
- `group_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户分组名称',
- PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户分组表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_user_level
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_level`;
-CREATE TABLE `yx_user_level` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `uid` int(11) NOT NULL DEFAULT 0 COMMENT '用户uid',
- `level_id` int(11) NOT NULL DEFAULT 0 COMMENT '等级vip',
- `grade` int(11) NOT NULL DEFAULT 0 COMMENT '会员等级',
- `valid_time` int(11) NOT NULL DEFAULT 0 COMMENT '过期时间',
- `is_forever` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否永久',
- `mer_id` int(11) NOT NULL DEFAULT 0 COMMENT '商户id',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:禁止,1:正常',
- `mark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
- `remind` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已通知',
- `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0=未删除,1=删除',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
- `discount` int(11) NOT NULL DEFAULT 0 COMMENT '享受折扣',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `id`(`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户等级记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_level
--- ----------------------------
-INSERT INTO `yx_user_level` VALUES (4, 11, 1, 1, 0, 1, 0, 1, '恭喜你成为了普通会员', 0, 0, 1585297281, 99);
-
--- ----------------------------
--- Table structure for yx_user_recharge
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_recharge`;
-CREATE TABLE `yx_user_recharge` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `uid` int(10) NULL DEFAULT NULL COMMENT '充值用户UID',
- `nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
- `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号',
- `price` decimal(8, 2) NULL DEFAULT NULL COMMENT '充值金额',
- `give_price` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '购买赠送金额',
- `recharge_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '充值类型',
- `paid` tinyint(1) NULL DEFAULT NULL COMMENT '是否充值',
- `pay_time` int(10) NULL DEFAULT NULL COMMENT '充值支付时间',
- `add_time` int(12) NULL DEFAULT NULL COMMENT '充值时间',
- `refund_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '退款金额',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `order_id`(`order_id`) USING BTREE,
- INDEX `uid`(`uid`) USING BTREE,
- INDEX `recharge_type`(`recharge_type`) USING BTREE,
- INDEX `paid`(`paid`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户充值表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_recharge
--- ----------------------------
-INSERT INTO `yx_user_recharge` VALUES (1, 11, 'hupeng', '1234428298159718400', 200.00, 0.00, 'weixin', 0, NULL, 1583145615, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (2, 11, '会敲代码的喵88', '1235853569362493440', 110.00, 0.00, 'weixin', 0, NULL, 1583485426, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (3, 11, '会敲代码的喵88', '1235874304738983936', 111.00, 0.00, 'weixin', 0, NULL, 1583490370, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (4, 11, '会敲代码的喵88', '1235874561447165952', 111.00, 0.00, 'weixin', 0, NULL, 1583490431, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (5, 11, '会敲代码的喵88', '1235874725738053632', 111.00, 0.00, 'weixin', 0, NULL, 1583490470, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (6, 11, '会敲代码的喵88', '1235875114126409728', 1111.00, 0.00, 'weixin', 0, NULL, 1583490563, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (7, 11, '会敲代码的喵88', '1235876251080589312', 1111.00, 0.00, 'weixin', 0, NULL, 1583490834, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (8, 11, '会敲代码的喵88', '1242024244678754304', 100.00, 10.00, 'weixin', 0, NULL, 1584956630, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (9, 11, '会敲代码的喵88', '1242024501730869248', 111.00, 111.00, 'weixin', 0, NULL, 1584956691, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (10, 11, '会敲代码的喵88', '1242025322262560768', 222.00, 0.00, 'weixin', 0, NULL, 1584956887, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (11, 11, '会敲代码的喵88', '1246020207407792128', 1.00, 1.00, 'weixin', 0, NULL, 1585909342, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (12, 11, '会敲代码的喵88', '1246379540565983232', 10.00, 100.00, 'weixin', 0, NULL, 1585995013, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (13, 11, '会敲代码的喵88', '1246379584941719552', 1.00, 1.00, 'weixin', 0, NULL, 1585995024, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (14, 11, '会敲代码的喵88', '1246383201052524544', 10.00, 100.00, 'weixin', 0, NULL, 1585995886, 0.00);
-INSERT INTO `yx_user_recharge` VALUES (15, 11, '会敲代码的喵88', '1246383225413042176', 10.00, 100.00, 'weixin', 0, NULL, 1585995892, 0.00);
-
--- ----------------------------
--- Table structure for yx_user_sign
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_sign`;
-CREATE TABLE `yx_user_sign` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `uid` int(11) NOT NULL DEFAULT 0 COMMENT '用户uid',
- `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '签到说明',
- `number` int(11) NOT NULL DEFAULT 0 COMMENT '获得积分',
- `balance` int(11) NOT NULL DEFAULT 0 COMMENT '剩余积分',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `uid`(`uid`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '签到记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_user_task_finish
--- ----------------------------
-DROP TABLE IF EXISTS `yx_user_task_finish`;
-CREATE TABLE `yx_user_task_finish` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `task_id` int(11) NOT NULL DEFAULT 0 COMMENT '任务id',
- `uid` int(11) NOT NULL DEFAULT 0 COMMENT '用户id',
- `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否有效',
- `add_time` int(11) NOT NULL DEFAULT 0 COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `id`(`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户任务完成记录表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_user_task_finish
--- ----------------------------
-INSERT INTO `yx_user_task_finish` VALUES (13, 1, 11, 0, 1585297278);
-INSERT INTO `yx_user_task_finish` VALUES (14, 2, 11, 0, 1585297278);
-INSERT INTO `yx_user_task_finish` VALUES (15, 16, 11, 0, 1585297278);
-INSERT INTO `yx_user_task_finish` VALUES (16, 17, 11, 0, 1585297369);
-
--- ----------------------------
--- Table structure for yx_wechat_media
--- ----------------------------
-DROP TABLE IF EXISTS `yx_wechat_media`;
-CREATE TABLE `yx_wechat_media` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '微信视频音频id',
- `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回复类型',
- `path` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件路径',
- `media_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '微信服务器返回的id',
- `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '地址',
- `temporary` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否永久或者临时 0永久1临时',
- `add_time` int(10) UNSIGNED NOT NULL COMMENT '添加时间',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `type`(`type`, `media_id`) USING BTREE,
- INDEX `type_2`(`type`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信回复表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Table structure for yx_wechat_reply
--- ----------------------------
-DROP TABLE IF EXISTS `yx_wechat_reply`;
-CREATE TABLE `yx_wechat_reply` (
- `id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '微信关键字回复id',
- `key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '关键字',
- `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回复类型',
- `data` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '回复数据',
- `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '0=不可用 1 =可用',
- `hide` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否隐藏',
- PRIMARY KEY (`id`) USING BTREE,
- UNIQUE INDEX `key`(`key`) USING BTREE,
- INDEX `type`(`type`) USING BTREE,
- INDEX `status`(`status`) USING BTREE,
- INDEX `hide`(`hide`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信关键字回复表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_wechat_reply
--- ----------------------------
-INSERT INTO `yx_wechat_reply` VALUES (1, 'subscribe', 'text', '{\"content\":\"2222222222244449999\"}', 1, NULL);
-
--- ----------------------------
--- Table structure for yx_wechat_template
--- ----------------------------
-DROP TABLE IF EXISTS `yx_wechat_template`;
-CREATE TABLE `yx_wechat_template` (
- `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '模板id',
- `tempkey` char(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板编号',
- `name` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板名',
- `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '回复内容',
- `tempid` char(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板ID',
- `add_time` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '添加时间',
- `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `tempkey`(`tempkey`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信模板' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_wechat_template
--- ----------------------------
-INSERT INTO `yx_wechat_template` VALUES (3, 'OPENTM200565259', '订单发货提醒', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n物流公司:{{keyword2.DATA}}\n物流单号:{{keyword3.DATA}}\n{{remark.DATA}}', 'KusKZOFc_4CrRU_gzuXMdMMTfFeR-OLVVuDiMyR5PiM', '1515052638', 1);
-INSERT INTO `yx_wechat_template` VALUES (13, 'OPENTM207791277', '订单支付成功通知', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n支付金额:{{keyword2.DATA}}\n{{remark.DATA}}', 'hJV1d1OwWB_lbPrSaRHi9RGr5CFAF4PJcZdYeg73Mtg', '1528966759', 1);
-INSERT INTO `yx_wechat_template` VALUES (14, 'OPENTM405847076', '帐户资金变动提醒', '{{first.DATA}}\n变动类型:{{keyword1.DATA}}\n变动时间:{{keyword2.DATA}}\n变动金额:{{keyword3.DATA}}\n{{remark.DATA}}', 'ePF4RS3ONCEuS9AuPyqZ2Th_B-HZ6E1CIpnJRt7ACwI', '1528966759', 1);
-
--- ----------------------------
--- Table structure for yx_wechat_user
--- ----------------------------
-DROP TABLE IF EXISTS `yx_wechat_user`;
-CREATE TABLE `yx_wechat_user` (
- `uid` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '微信用户id',
- `unionid` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段',
- `openid` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户的标识,对当前公众号唯一',
- `routine_openid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序唯一身份ID',
- `nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户的昵称',
- `headimgurl` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户头像',
- `sex` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户的性别,值为1时是男性,值为2时是女性,值为0时是未知',
- `city` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户所在城市',
- `language` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户的语言,简体中文为zh_CN',
- `province` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户所在省份',
- `country` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户所在国家',
- `remark` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注',
- `groupid` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '用户所在的分组ID(兼容旧的用户分组接口)',
- `tagid_list` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户被打上的标签ID列表',
- `subscribe` tinyint(3) UNSIGNED NULL DEFAULT 1 COMMENT '用户是否订阅该公众号标识',
- `subscribe_time` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '关注公众号时间',
- `add_time` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
- `stair` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '一级推荐人',
- `second` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '二级推荐人',
- `order_stair` int(11) NULL DEFAULT NULL COMMENT '一级推荐人订单',
- `order_second` int(11) UNSIGNED NULL DEFAULT NULL COMMENT '二级推荐人订单',
- `now_money` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '佣金',
- `session_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '小程序用户会话密匙',
- `user_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'wechat' COMMENT '用户类型',
- PRIMARY KEY (`uid`) USING BTREE,
- UNIQUE INDEX `openid`(`openid`) USING BTREE,
- INDEX `groupid`(`groupid`) USING BTREE,
- INDEX `subscribe_time`(`subscribe_time`) USING BTREE,
- INDEX `add_time`(`add_time`) USING BTREE,
- INDEX `subscribe`(`subscribe`) USING BTREE,
- INDEX `unionid`(`unionid`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信用户表' ROW_FORMAT = Dynamic;
-
--- ----------------------------
--- Records of yx_wechat_user
--- ----------------------------
-INSERT INTO `yx_wechat_user` VALUES (1, NULL, NULL, NULL, 'hupeng', '', 0, '', '', '', '', NULL, 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'wechat');
-
-SET FOREIGN_KEY_CHECKS = 1;
diff --git a/sql/数据库说明.txt b/sql/数据库说明.txt
deleted file mode 100644
index efa0c8cf..00000000
--- a/sql/数据库说明.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-新项目 直接导入yshop2.1.sql即可
-2.0升级到2.1,直接把yshop2.1升级sql.txt里面sql语句运行即可
-
-2.0.1:yx_cache表修改为yx_wechat_menu表
-
diff --git a/yshop-api/src/main/resources/config/application-dev.yml b/yshop-api/src/main/resources/config/application-dev.yml
index bdc452ac..c9b54ac6 100644
--- a/yshop-api/src/main/resources/config/application-dev.yml
+++ b/yshop-api/src/main/resources/config/application-dev.yml
@@ -71,7 +71,7 @@ swagger:
enabled: true
title: yshop商城移动端API
serverUrl: http://localhost:8009
- version: 2.0
+ version: 2.1
# 文件存储路径
file:
diff --git a/yshop-common/pom.xml b/yshop-common/pom.xml
index 451d4058..8f80ed5f 100644
--- a/yshop-common/pom.xml
+++ b/yshop-common/pom.xml
@@ -11,5 +11,41 @@
yshop-common
公共模块
+
+
+ net.sf.dozer
+ dozer-spring
+ 5.5.1
+
+
+ net.sf.dozer
+ dozer
+ 5.5.1
+
+
+ jcl-over-slf4j
+ org.slf4j
+
+
+
+
+ com.google.zxing
+ core
+ 3.2.1
+
-
\ No newline at end of file
+
+ co.yixiang
+ yshop-mproot
+ 2.1
+
+
+ org.apache.httpcomponents
+ httpcore
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+
diff --git a/yshop-common/src/main/java/co/yixiang/annotation/Query.java b/yshop-common/src/main/java/co/yixiang/annotation/Query.java
index 3cce7ebf..3d12e106 100644
--- a/yshop-common/src/main/java/co/yixiang/annotation/Query.java
+++ b/yshop-common/src/main/java/co/yixiang/annotation/Query.java
@@ -1,3 +1,4 @@
+/*
package co.yixiang.annotation;
import java.lang.annotation.ElementType;
@@ -5,10 +6,12 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
+*/
/**
* @author Zheng Jie
* @date 2019-6-4 13:52:30
- */
+ *//*
+
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Query {
@@ -18,19 +21,25 @@ public @interface Query {
// Dong ZhaoYang 2017/8/7 查询方式
Type type() default Type.EQUAL;
- /**
+ */
+/**
* 连接查询的属性名,如User类中的dept
- */
+ *//*
+
String joinName() default "";
- /**
+ */
+/**
* 默认左连接
- */
+ *//*
+
Join join() default Join.LEFT;
- /**
+ */
+/**
* 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username")
- */
+ *//*
+
String blurry() default "";
enum Type {
@@ -56,18 +65,21 @@ public @interface Query {
,BETWEEN
// 不为空
,NOT_NULL
- // 查询时间
- ,UNIX_TIMESTAMP
}
- /**
+ */
+/**
* @author Zheng Jie
* 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
- */
+ *//*
+
enum Join {
- /** jie 2019-6-4 13:18:30 左右连接 */
+ */
+/** jie 2019-6-4 13:18:30 左右连接 *//*
+
LEFT, RIGHT
}
}
+*/
diff --git a/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java b/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java
index 93a60c74..6a4dd578 100644
--- a/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java
+++ b/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java
@@ -1,6 +1,7 @@
package co.yixiang.config;
import com.fasterxml.classmate.TypeResolver;
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import com.google.common.base.Predicates;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -8,8 +9,10 @@ import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
import org.springframework.core.Ordered;
import org.springframework.data.domain.Pageable;
+import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
@@ -95,6 +98,9 @@ public class SwaggerConfig {
* 将Pageable转换展示在swagger中
*/
@Configuration
+@EnableSwagger2
+@EnableKnife4j
+@Import(BeanValidatorPluginsConfiguration.class)
class SwaggerDataConfig {
@Bean
diff --git a/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java b/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java
index c8df8fac..79480725 100644
--- a/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java
+++ b/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java
@@ -78,32 +78,49 @@ public interface ShopConstants {
/**
* 首页banner
*/
- String YSHOP_HOME_BANNER = "yshop_home_banner";
+ String YSHOP_HOME_BANNER = "routine_home_banner";
/**
* 首页菜单
*/
- String YSHOP_HOME_MENUS = "yshop_home_menus";
+ String YSHOP_HOME_MENUS = "routine_home_menus";
/**
* 首页滚动新闻
*/
- String YSHOP_HOME_ROLL_NEWS = "yshop_home_roll_news";
+ String YSHOP_HOME_ROLL_NEWS = "routine_home_roll_news";
/**
* 热门搜索
*/
- String YSHOP_HOT_SEARCH = "yshop_hot_search";
+ String YSHOP_HOT_SEARCH = "routine_hot_search";
/**
* 个人中心菜单
*/
- String YSHOP_MY_MENUES = "yshop_my_menus";
+ String YSHOP_MY_MENUES = "routine_my_menus";
/**
* 秒杀时间段
*/
- String YSHOP_SECKILL_TIME = "yshop_seckill_time";
+ String YSHOP_SECKILL_TIME = "routine_seckill_time";
/**
* 签到天数
*/
- String YSHOP_SIGN_DAY_NUM = "yshop_sign_day_num";
+ String YSHOP_SIGN_DAY_NUM = "sign_day_num";
+ /**
+ * 打印机配置
+ */
+ String YSHOP_ORDER_PRINT_COUNT = "order_print_count";
+ /**
+ * 飞蛾用户信息
+ */
+ String YSHOP_FEI_E_USER = "fei_e_user";
+ /**
+ * 飞蛾用户密钥
+ */
+ String YSHOP_FEI_E_UKEY= "fei_e_ukey";
+
+ /**
+ * 打印机配置
+ */
+ String YSHOP_ORDER_PRINT_COUNT_DETAIL = "order_print_count_detail";
diff --git a/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java b/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java
new file mode 100644
index 00000000..666c79e1
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java
@@ -0,0 +1,31 @@
+package co.yixiang.dozer.config;
+
+import co.yixiang.dozer.service.EJBGenerator;
+import co.yixiang.dozer.service.IGenerator;
+import org.dozer.spring.DozerBeanMapperFactoryBean;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.Resource;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2019/10/9 10:40
+ * @description:Dozer转换
+ * @modified By:
+ * @version: 1.0
+ */
+@Configuration
+public class DozerMapperConfig {
+ @Bean
+ public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(@Value("classpath*:dozer/*.xml" ) Resource[] resources) throws Exception {
+ final DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean = new DozerBeanMapperFactoryBean();
+ dozerBeanMapperFactoryBean.setMappingFiles(resources);
+ return dozerBeanMapperFactoryBean;
+ }
+
+ /* @Bean
+ public IGenerator ejbGenerator() {
+ return new EJBGenerator();
+ }*/
+}
diff --git a/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java b/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java
new file mode 100644
index 00000000..b38214cc
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java
@@ -0,0 +1,63 @@
+package co.yixiang.dozer.service;
+
+import co.yixiang.common.web.vo.Paging;
+import org.dozer.Mapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Array;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2019/10/9 10:43
+ * @description:dozer实现类
+ * @modified By:
+ * @version: 1.0
+ */
+@Component
+@Lazy(true)
+public class EJBGenerator implements IGenerator {
+
+ @Autowired
+ protected Mapper dozerMapper;
+
+ @Override
+ public T convert(final S s, Class clz) {
+ return s == null ? null : this.dozerMapper.map(s, clz);
+ }
+
+ @Override
+ public List convert(List s, Class clz) {
+ return s == null ? null : s.stream().map(vs -> this.dozerMapper.map(vs, clz)).collect(Collectors.toList());
+ }
+
+ @Override
+ public Paging convertPaging(Paging paging, Class clz) {
+ Paging pagingVo=new Paging();
+ pagingVo.setRecords(convert(paging.getRecords(),clz));
+ pagingVo.setTotal(paging.getTotal());
+ return pagingVo;
+ }
+
+ @Override
+ public Set convert(Set s, Class clz) {
+ return s == null ? null : s.stream().map(vs -> this.dozerMapper.map(vs, clz)).collect(Collectors.toSet());
+ }
+
+ @Override
+ public T[] convert(S[] s, Class clz) {
+ if (s == null) {
+ return null;
+ }
+ @SuppressWarnings("unchecked")
+ T[] arr = (T[]) Array.newInstance(clz, s.length);
+ for (int i = 0; i < s.length; i++) {
+ arr[i] = this.dozerMapper.map(s[i], clz);
+ }
+ return arr;
+ }
+}
diff --git a/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java b/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java
new file mode 100644
index 00000000..5c62f002
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java
@@ -0,0 +1,78 @@
+package co.yixiang.dozer.service;
+
+import co.yixiang.common.web.vo.Paging;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2019/10/9 10:42
+ * @description:doczer转换接口
+ * @modified By:
+ * @version: 1.0
+ */
+public interface IGenerator {
+
+ /**
+ * 转换
+ *
+ * @param s 数据对象
+ * @param clz 复制目标类型
+ * @return {@link T}
+ * @Description: 单个对象的深度复制及类型转换,vo/domain , po
+ * @author banjuer@outlook.com
+ * @Time 2018年5月9日 下午3:53:24
+ */
+ T convert(S s, Class clz);
+
+ /**
+ * @Description: 深度复制结果集(ResultSet为自定义的分页结果集)
+ * @param s 数据对象
+ * @param clz 复制目标类型
+ * @return
+ * @author banjuer@outlook.com
+ * @Time 2018年5月9日 下午3:53:24
+ */
+ // Result convert(Result s, Class clz);
+
+ /**
+ * 转换
+ * @param s 数据对象
+ * @param clz 复制目标类型
+ * @return {@link List}
+ * @Description: list深度复制
+ * @author banjuer@outlook.com
+ * @Time 2018年5月9日 下午3:54:08
+ */
+ List convert(List s, Class clz);
+
+ /**
+ *
+ * @param s
+ * @param clz
+ * @param
+ * @param
+ * @return
+ */
+ Paging convertPaging(Paging s, Class clz);
+ /**
+ * @param s 数据对象
+ * @param clz 复制目标类型
+ * @return
+ * @Description: set深度复制
+ * @author banjuer@outlook.com
+ * @Time 2018年5月9日 下午3:54:39
+ */
+ Set convert(Set s, Class clz);
+
+ /**
+ * @param s 数据对象
+ * @param clz 复制目标类型
+ * @return
+ * @Description: 数组深度复制
+ * @author banjuer@outlook.com
+ * @Time 2018年5月9日 下午3:54:57
+ */
+ T[] convert(S[] s, Class clz);
+}
\ No newline at end of file
diff --git a/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java b/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java
new file mode 100644
index 00000000..132f5f72
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java
@@ -0,0 +1,19 @@
+package co.yixiang.print;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 打印订单数据
+ */
+@Builder
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class OrderPrint {
+ private String title;
+ private String price;
+ private String num;
+}
diff --git a/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java b/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java
new file mode 100644
index 00000000..9d8533bd
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java
@@ -0,0 +1,38 @@
+package co.yixiang.print;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-05-11 10:33
+ * @description:打印数据VO
+ * @modified By:
+ * @version: V1.0
+ */
+@Builder
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class PrintOrderDataVO implements Serializable{
+ @ApiModelProperty(value = "订单号")
+ private String orderId;
+ @ApiModelProperty(value = "实际支付金额")
+ private BigDecimal payPrice;
+ @ApiModelProperty(value = "用户姓名")
+ private String realName;
+ @ApiModelProperty(value = "详细地址")
+ private String userAddress;
+ @ApiModelProperty(value = "用户电话")
+ private String userPhone;
+ @ApiModelProperty(value = "备注")
+ private String mark;
+ @ApiModelProperty(value = "门店名称")
+ private String storeName;
+}
diff --git a/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java b/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java
new file mode 100644
index 00000000..0789c4ab
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java
@@ -0,0 +1,37 @@
+package co.yixiang.print;
+
+import co.yixiang.utils.OrderUtil;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-05-11 11:01
+ * @description:门店销售数据
+ * @modified By:
+ * @version: V1.0
+ */
+@Builder
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+public class PrintStoreOrderVO implements Serializable {
+ @ApiModelProperty(value = "开始时间")
+ private String startTime;
+ @ApiModelProperty(value = "结束时间")
+ private String endTime;
+ @ApiModelProperty(value = "打印机编号")
+ private String driverNo;
+ @ApiModelProperty(value = "门店列表")
+ private Integer storeId;
+@ApiModelProperty(hidden = true)
+ long startSecond;
+ @ApiModelProperty(hidden = true)
+ long endSecond;
+}
diff --git a/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java b/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java
new file mode 100644
index 00000000..1dd859c9
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java
@@ -0,0 +1,587 @@
+package co.yixiang.print;
+
+import co.yixiang.constant.ShopConstants;
+import co.yixiang.utils.DateUtils;
+import co.yixiang.utils.RedisUtil;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+@SuppressWarnings("static-access")
+public class PrintUtil4 {
+ public static final String URL = "http://api.feieyun.cn/Api/Open/";//不需要修改
+
+ public static final String USER = RedisUtil.get(ShopConstants.YSHOP_FEI_E_USER);//*必填*:账号名
+ public static final String UKEY = RedisUtil.get(ShopConstants.YSHOP_FEI_E_UKEY);//*必填*: 飞鹅云后台注册账号后生成的UKEY 【备注:这不是填打印机的KEY】
+ public static final String SN = "918502791";//*必填*:打印机编号,必须要在管理后台里添加打印机或调用API接口添加之后,才能调用API
+
+ /**
+ * 保存文件到磁盘
+ *
+ * @param path 保存路径
+ * @param content 打印内容
+ * writeFile("E:/retlog.txt", result);
+ */
+ public void writeFile(String path, String content) {
+ content = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒").format(new Date()) + ",保存的订单日志信息为: " + content;
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(path, true);
+ fos.write(content.getBytes());
+ fos.write("\r ".getBytes());
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ if (fos != null) {
+ try {
+ fos.flush();
+ fos.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+
+ public static void main(String[] args) {
+ try {
+ System.out.println(new String(addPrintEquip("918502791", "nvz8kw5n", "测试", "").getBytes("ISO-8859-1"), "UTF-8"));
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * 添加打印机
+ *
+ * @param sn 编号
+ * @param key 密钥
+ * @param remark 备注
+ * @param phone 流量卡号码
+ * @return 返回打印结果
+ */
+ public static String addPrintEquip(String sn, String key, String remark, String phone) {
+ String printerContent = sn + " # " + key + " # " + remark + " # " + phone;
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user", USER));
+ String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+ nvps.add(new BasicNameValuePair("stime", STIME));
+ nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+ nvps.add(new BasicNameValuePair("apiname", "Open_printerAddlist"));
+ nvps.add(new BasicNameValuePair("printerContent", printerContent));// 固定值,不需要修改
+ return sendHttpRequest(nvps);
+ }
+
+ /**
+ * 编辑打印机信息
+ *
+ * @param sn 编号
+ * @param remark 备注
+ * @param phone 电话
+ * @return 结果
+ */
+ public static String editPrintEquip(String sn, String remark, String phone) {
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user", USER));
+ String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+ nvps.add(new BasicNameValuePair("stime", STIME));
+ nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+ nvps.add(new BasicNameValuePair("apiname", "Open_printerEdit"));
+ nvps.add(new BasicNameValuePair("sn", sn));
+ nvps.add(new BasicNameValuePair("name", remark));
+ nvps.add(new BasicNameValuePair("phonenum", phone));
+ return sendHttpRequest(nvps);
+ }
+
+ /**
+ * 打印订单数据
+ *
+ * @param sn 打印机编号
+ * @param contentTitle 打印标题
+ * @param orderList 订单数据
+ * @param order
+ * @return
+ */
+ public static String printOrder(String sn, String contentTitle, List orderList, PrintOrderDataVO order, int lian) {
+ String content = getPrintContent(contentTitle, orderList, 14, 6, 3, 6, order, lian + 1);//orderList为数组 b1代表名称列占用(14个字节) b2单价列(6个字节) b3数量列(3个字节) b4金额列(6个字节)-->这里的字节数可按自己需求自由改写,14+6+3+6再加上代码写的3个空格就是32了,58mm打印机一行总占32字节
+// List nvps = new ArrayList();
+// nvps.add(new BasicNameValuePair("user", USER));
+// String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+// nvps.add(new BasicNameValuePair("stime", STIME));
+// nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+// nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));// 固定值,不需要修改
+// nvps.add(new BasicNameValuePair("sn", sn));
+// nvps.add(new BasicNameValuePair("content", content));
+// nvps.add(new BasicNameValuePair("times", "1"));// 打印联数
+// return sendHttpRequest(nvps);
+ return print(sn, content);
+ }
+
+
+ /**
+ * 打印预养订单
+ *
+ * @param orderList 订单数据
+ * @param title 标题
+ * @param mobile 联系方式
+ * @param name 用户姓名
+ * @param payPrice 实际支付
+ * @return
+ */
+ public static String printOrderByAdvance(List orderList, String title, String mobile, String name, String payPrice) {
+ String content = getOrderByAdvance(orderList, 14, 6, 3, 6, title, mobile, name, payPrice);//orderList为数组 b1代表名称列占用(14个字节) b2单价列(6个字节) b3数量列(3个字节) b4金额列(6个字节)-->这里的字节数可按自己需求自由改写,14+6+3+6再加上代码写的3个空格就是32了,58mm打印机一行总占32字节
+// List nvps = new ArrayList();
+// nvps.add(new BasicNameValuePair("user", USER));
+// String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+// nvps.add(new BasicNameValuePair("stime", STIME));
+// nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+// nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));// 固定值,不需要修改
+// nvps.add(new BasicNameValuePair("sn", SN));
+// nvps.add(new BasicNameValuePair("content", content));
+// nvps.add(new BasicNameValuePair("times", "1"));// 打印联数
+// return sendHttpRequest(nvps);
+ return print(SN, content);
+ }
+
+ /**
+ * 打印订单数据
+ *
+ * @param contentTitle 打印标题
+ * @param orderList 订单数据
+ * @return
+ */
+ public static String printContentByStore(String contentTitle, List orderList, int b1, int b3, PrintStoreOrderVO printStoreOrder, int lian) {
+ String content = getPrintContentByStore(contentTitle, orderList, b1, b3, printStoreOrder, lian + 1);//orderList为数组 b1代表名称列占用(14个字节) b2单价列(6个字节) b3数量列(3个字节) b4金额列(6个字节)-->这里的字节数可按自己需求自由改写,14+6+3+6再加上代码写的3个空格就是32了,58mm打印机一行总占32字节
+// List nvps = new ArrayList();
+// nvps.add(new BasicNameValuePair("user", USER));
+// String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+// nvps.add(new BasicNameValuePair("stime", STIME));
+// nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+// nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));// 固定值,不需要修改
+// nvps.add(new BasicNameValuePair("sn", sn));
+// nvps.add(new BasicNameValuePair("content", content));
+// nvps.add(new BasicNameValuePair("times", "1"));// 打印联数
+// return sendHttpRequest(nvps);
+ return print(printStoreOrder.getDriverNo(), content);
+ }
+
+ /**
+ * 打印订单数据
+ *
+ * @param sn 打印机编号
+ * @param content 打印内容
+ * @return
+ */
+ public static String print(String sn, String content) {
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user", USER));
+ String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+ nvps.add(new BasicNameValuePair("stime", STIME));
+ nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME)));
+ nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));// 固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn", sn));
+ nvps.add(new BasicNameValuePair("content", content));
+ nvps.add(new BasicNameValuePair("times", "1"));// 打印联数
+ return sendHttpRequest(nvps);
+ }
+
+
+ /**
+ * 获取预养订单文本信息
+ *
+ * @return
+ */
+ public static String getOrderByAdvance(List orderList, int b1, int b2, int b3, int b4, String headTitle, String mobile, String name, String payPrice) {
+ String orderInfo = "" + headTitle + " ";
+ orderInfo += "名称 单价 数量 金额 ";
+ orderInfo += "-------------------------------- ";
+ double totals = 0.0;
+ for (int i = 0; i < orderList.size(); i++) {
+ String title = orderList.get(i).getTitle();
+ String price = orderList.get(i).getPrice();
+ String num = orderList.get(i).getNum();
+ String total = "" + Double.valueOf(price) * Integer.parseInt(num);
+ totals += Double.parseDouble(total);
+ price = addSpace(price, b2);
+ num = addSpace(num, b3);
+ total = addSpace(total, b4);
+ String otherStr = " " + price + num + " " + total;
+
+ int tl = 0;
+ try {
+ tl = title.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ int spaceNum = (tl / b1 + 1) * b1 - tl;
+ if (tl < b1) {
+ for (int k = 0; k < spaceNum; k++) {
+ title += " ";
+ }
+ title += otherStr;
+ } else if (tl == b1) {
+ title += otherStr;
+ } else {
+ List list = null;
+ if (isEn(title)) {
+ list = getStrList(title, b1);
+ } else {
+ list = getStrList(title, b1 / 2);
+ }
+ String s0 = titleAddSpace(list.get(0));
+ title = s0 + otherStr + " ";// 添加 单价 数量 总额
+ String s = "";
+ for (int k = 1; k < list.size(); k++) {
+ s += list.get(k);
+ }
+ try {
+ s = getStringByEnter(b1, s);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ title += s;
+ }
+ orderInfo += title + " ";
+ }
+ orderInfo += "-------------------------------- ";
+
+ orderInfo += "合计:" + totals + "元 ";
+ orderInfo += "实付:" + payPrice + "元 ";
+ //orderInfo += "送货地点:广州市南沙区xx路xx号 ";
+ orderInfo += "联系人:" + name + " ";
+ orderInfo += "联系电话:" + mobile + " ";
+ orderInfo += "下单时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " ";
+ //orderInfo += "https://admin.jidanguo10.com/weixin?id=2 ";
+ return orderInfo;
+ }
+
+
+ /**
+ * 打印各门店订单数据信息
+ *
+ * @param contentTitle
+ * @param orderList
+ * @param b1
+ * @param b3
+ * @param lian
+ * @return
+ */
+ public static String getPrintContentByStore(String contentTitle, List orderList, int b1, int b3, PrintStoreOrderVO printStoreOrder, int lian) {
+ String orderInfo = "----第" + lian + "联---- ";
+ orderInfo += "" + contentTitle + " ";
+ orderInfo += "名称 数量 ";
+ orderInfo += "-------------------------------- ";
+ for (int i = 0; i < orderList.size(); i++) {
+ String title = orderList.get(i).getTitle();
+ String num = orderList.get(i).getNum();
+ num = addSpace(num, b3);
+ String otherStr = " " + num;
+
+ int tl = 0;
+ try {
+ tl = title.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ int spaceNum = (tl / b1 + 1) * b1 - tl;
+ if (tl < b1) {
+ for (int k = 0; k < spaceNum; k++) {
+ title += " ";
+ }
+ title += otherStr;
+ } else if (tl == b1) {
+ title += otherStr;
+ } else {
+ List list = null;
+ if (isEn(title)) {
+ list = getStrList(title, b1);
+ } else {
+ list = getStrList(title, b1 / 2);
+ }
+ String s0 = titleAddSpace(list.get(0));
+ title = s0 + otherStr + " ";// 添加 单价 数量 总额
+ String s = "";
+ for (int k = 1; k < list.size(); k++) {
+ s += list.get(k);
+ }
+ try {
+ s = getStringByEnter(b1, s);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ title += s;
+ }
+ orderInfo += title + " ";
+ }
+ orderInfo += "-------------------------------- ";
+ orderInfo += "社区门店:" + contentTitle + " ";
+ orderInfo += "开始时间:" + printStoreOrder.getStartTime() + " ";
+ orderInfo += "截止时间:" + printStoreOrder.getEndTime() + " ";
+ orderInfo += "打印时间:" + DateUtils.getTime() + " ";
+ //orderInfo += "https://admin.jidanguo10.com/weixin?id=2 ";
+ return orderInfo;
+ }
+
+
+ //orderList为数组 b1代表名称列占用字节 b2单价列 b3数量列 b4金额列-->这里的字节数可按自己需求自由改写,详细往上看112行调用实际例子运用
+
+ /**
+ * 获取打印订单的文本内容
+ *
+ * @param contentTitle 打印内容标题
+ * @param orderList 订单数据
+ * @param b1
+ * @param b2
+ * @param b3
+ * @param b4
+ * @param order
+ * @return
+ */
+ public static String getPrintContent(String contentTitle, List orderList, int b1, int b2, int b3, int b4, PrintOrderDataVO order, int lian) {
+ String orderInfo = "----第" + lian + "联---- ";
+ orderInfo += "" + contentTitle + " ";
+ orderInfo += "名称 单价 数量 金额 ";
+ orderInfo += "-------------------------------- ";
+ double totals = 0.0;
+ for (int i = 0; i < orderList.size(); i++) {
+ String title = orderList.get(i).getTitle();
+ String price = orderList.get(i).getPrice();
+ String num = orderList.get(i).getNum();
+ String total = "" + Double.valueOf(price) * Integer.parseInt(num);
+ totals += Double.parseDouble(total);
+ price = addSpace(price, b2);
+ num = addSpace(num, b3);
+ total = addSpace(total, b4);
+ String otherStr = " " + price + num + " " + total;
+
+ int tl = 0;
+ try {
+ tl = title.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ int spaceNum = (tl / b1 + 1) * b1 - tl;
+ if (tl < b1) {
+ for (int k = 0; k < spaceNum; k++) {
+ title += " ";
+ }
+ title += otherStr;
+ } else if (tl == b1) {
+ title += otherStr;
+ } else {
+ List list = null;
+ if (isEn(title)) {
+ list = getStrList(title, b1);
+ } else {
+ list = getStrList(title, b1 / 2);
+ }
+ String s0 = titleAddSpace(list.get(0));
+ title = s0 + otherStr + " ";// 添加 单价 数量 总额
+ String s = "";
+ for (int k = 1; k < list.size(); k++) {
+ s += list.get(k);
+ }
+ try {
+ s = getStringByEnter(b1, s);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ title += s;
+ }
+ orderInfo += title + " ";
+ }
+ orderInfo += "-------------------------------- ";
+ orderInfo += "社区门店:" + order.getStoreName() + " ";
+ orderInfo += "订单编号:" + order.getOrderId() + " ";
+ orderInfo += "合计:" + totals + "元 ";
+ orderInfo += "实付:" + order.getPayPrice() + "元 ";
+ //orderInfo += "送货地点:广州市南沙区xx路xx号 ";
+ orderInfo += "联系人:" + order.getRealName() + " ";
+ orderInfo += "详细地址:" + order.getUserAddress() + " ";
+ orderInfo += "联系电话:" + order.getUserPhone() + " ";
+ orderInfo += "下单时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " ";
+ orderInfo += "备注:" + order.getMark() + " ";
+ //orderInfo += "https://admin.jidanguo10.com/weixin?id=2 ";
+ return orderInfo;
+ }
+
+
+ /**
+ * 发送打印请求
+ *
+ * @param nvps
+ * @return
+ */
+ public static String sendHttpRequest(List nvps) {
+ // 通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)// 读取超时
+ .setConnectTimeout(30000)// 连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
+
+ HttpPost post = new HttpPost(URL);
+ CloseableHttpResponse response = null;
+ String result = null;
+ try {
+ post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if (statecode == 200) {
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null) {
+ // 服务器返回的JSON字符串,建议要当做日志记录起来
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ close(response, post, httpClient);
+ }
+ return result;
+ }
+
+ /**
+ * 关闭流
+ *
+ * @param response
+ * @param post
+ * @param httpClient
+ */
+ public static void close(CloseableHttpResponse response, HttpPost post, CloseableHttpClient httpClient) {
+ try {
+ if (response != null) {
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ public static String titleAddSpace(String str) {
+ int k = 0;
+ int b = 14;
+ try {
+ k = str.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ for (int i = 0; i < b - k; i++) {
+ str += " ";
+ }
+ return str;
+ }
+
+ public static String getStringByEnter(int length, String string) throws Exception {
+ for (int i = 1; i <= string.length(); i++) {
+ if (string.substring(0, i).getBytes("GBK").length > length) {
+ return string.substring(0, i - 1) + " " + getStringByEnter(length, string.substring(i - 1));
+ }
+ }
+ return string;
+ }
+
+ /**
+ * 添加空格,文本对齐
+ *
+ * @param str
+ * @param size
+ * @return
+ */
+ public static String addSpace(String str, int size) {
+ int len = str.length();
+ if (len < size) {
+ for (int i = 0; i < size - len; i++) {
+ str += " ";
+ }
+ }
+ return str;
+ }
+
+ public static Boolean isEn(String str) {
+ Boolean b = false;
+ try {
+ b = str.getBytes("GBK").length == str.length();
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ return b;
+ }
+
+ public static List getStrList(String inputString, int length) {
+ int size = inputString.length() / length;
+ if (inputString.length() % length != 0) {
+ size += 1;
+ }
+ return getStrList(inputString, length, size);
+ }
+
+ public static List getStrList(String inputString, int length, int size) {
+ List list = new ArrayList();
+ for (int index = 0; index < size; index++) {
+ String childStr = substring(inputString, index * length, (index + 1) * length);
+ list.add(childStr);
+ }
+ return list;
+ }
+
+ /**
+ * 字符串切割
+ *
+ * @param str
+ * @param f
+ * @param t
+ * @return
+ */
+ public static String substring(String str, int f, int t) {
+ if (f > str.length())
+ return null;
+ if (t > str.length()) {
+ return str.substring(f, str.length());
+ } else {
+ return str.substring(f, t);
+ }
+ }
+
+ /**
+ * 签名
+ *
+ * @param USER 用户
+ * @param UKEY UKEY
+ * @param STIME 时间戳
+ * @return {@link String}
+ */
+ private static String signature(String USER, String UKEY, String STIME) {
+ return DigestUtils.sha1Hex(USER + UKEY + STIME);
+ }
+}
\ No newline at end of file
diff --git a/yshop-common/src/main/java/co/yixiang/utils/BigNum.java b/yshop-common/src/main/java/co/yixiang/utils/BigNum.java
new file mode 100644
index 00000000..cd8c48e8
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/utils/BigNum.java
@@ -0,0 +1,196 @@
+package co.yixiang.utils;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+
+public class BigNum {
+ public static final String BIG_NUM_FMT_COMMA = "#,###,###,###,###,###,##0.00";//千位分隔符 方便查看金额具体大小
+ public static final String BIG_NUM_FMT = "##################0.00";//不带千位分隔符
+ public static final String BIG_NUM_HUNDRED = "100";//100常量
+ public static final int BIG_NUM_SCALE = 2;//保留两位小数
+
+
+ // 除法运算默认精度
+ private static final int DEF_DIV_SCALE = 10;
+
+
+ /**
+ * 精确加法
+ */
+ public static BigDecimal add(double value1, double value2) {
+ BigDecimal b1 = BigDecimal.valueOf(value1);
+ BigDecimal b2 = BigDecimal.valueOf(value2);
+ return new BigDecimal(b1.add(b2).toString());
+ }
+
+ /**
+ * 精确加法
+ */
+ public static BigDecimal add(Object value1, Object value2) {
+ BigDecimal b1 = new BigDecimal(value1.toString());
+ BigDecimal b2 = new BigDecimal(value2.toString());
+ return new BigDecimal(b1.add(b2).toString());
+ }
+
+ /**
+ * 精确减法
+ */
+ public static BigDecimal sub(double value1, double value2) {
+ BigDecimal b1 = BigDecimal.valueOf(value1);
+ BigDecimal b2 = BigDecimal.valueOf(value2);
+ return new BigDecimal(b1.subtract(b2).toString());
+ }
+
+ /**
+ * 精确减法
+ */
+ public static BigDecimal sub(Object value1, Object value2) {
+ BigDecimal b1 = new BigDecimal(value1.toString());
+ BigDecimal b2 = new BigDecimal(value2.toString());
+ return new BigDecimal(b1.subtract(b2).toString());
+ }
+
+ /**
+ * 精确乘法
+ */
+ public static BigDecimal mul(double value1, double value2) {
+ BigDecimal b1 = BigDecimal.valueOf(value1);
+ BigDecimal b2 = BigDecimal.valueOf(value2);
+ return new BigDecimal(b1.multiply(b2).toString());
+ }
+
+ /**
+ * 精确乘法
+ */
+ public static BigDecimal mul(Object value1, Object value2) {
+ BigDecimal b1 = new BigDecimal(value1.toString());
+ BigDecimal b2 = new BigDecimal(value2.toString());
+ return new BigDecimal(b1.multiply(b2).toString());
+ }
+
+ /**
+ * 精确除法 使用默认精度
+ */
+ public static BigDecimal div(double value1, double value2) throws IllegalAccessException {
+ return div(value1, value2, DEF_DIV_SCALE);
+ }
+
+ /**
+ * 精确除法 使用默认精度
+ */
+ public static BigDecimal div(String value1, String value2) throws IllegalAccessException {
+ return div(value1, value2, DEF_DIV_SCALE);
+ }
+
+ /**
+ * 精确除法
+ *
+ * @param scale
+ * 精度
+ */
+ public static BigDecimal div(double value1, double value2, int scale) throws IllegalAccessException {
+ if (scale < 0) {
+ throw new IllegalAccessException("精确度不能小于0");
+ }
+ BigDecimal b1 = BigDecimal.valueOf(value1);
+ BigDecimal b2 = BigDecimal.valueOf(value2);
+ // return b1.divide(b2, scale).doubleValue();
+ return new BigDecimal(b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).toString());
+ }
+
+ /**
+ * 精确除法
+ *
+ * @param scale
+ * 精度
+ */
+ public static BigDecimal div(String value1, String value2, int scale) throws IllegalAccessException {
+ if (scale < 0) {
+ throw new IllegalAccessException("精确度不能小于0");
+ }
+ BigDecimal b1 = new BigDecimal(value1);
+ BigDecimal b2 = new BigDecimal(value2);
+ // return b1.divide(b2, scale).doubleValue();
+ return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP);
+ }
+
+ /**
+ * 四舍五入
+ *
+ * @param scale
+ * 小数点后保留几位
+ */
+ public static BigDecimal round(double v, int scale) throws IllegalAccessException {
+ return div(v, 1, scale);
+ }
+
+ /**
+ * 四舍五入
+ *
+ * @param scale
+ * 小数点后保留几位
+ */
+ public static BigDecimal round(String v, int scale) throws IllegalAccessException {
+ return div(v, "1", scale);
+ }
+
+ /**
+ * 比较大小
+ */
+ public static boolean equalTo(BigDecimal b1, BigDecimal b2) {
+ if (b1 == null || b2 == null) {
+ return false;
+ }
+ return 0 == b1.compareTo(b2);
+ }
+
+
+ /**
+ * 分转换成元
+ * @param v
+ * @return
+ */
+ public static BigDecimal penny2dollar(String v){
+ BigDecimal s = new BigDecimal("0.00");//保留两位小数
+ try {
+ s = div(v,"100",2);
+ } catch (IllegalAccessException e) {
+ e.printStackTrace();
+ }
+ return s;
+ }
+
+ /**
+ * 元转换成分
+ * @param v
+ * @return
+ */
+ public static BigDecimal dollar2penny(String v){
+ return mul(v, "100");
+ }
+
+ /**
+ * 格式化金额
+ * 千位分隔符 方便查看金额具体大小 BIG_NUM_FMT = "#,###,###,###,###,###,##0.00"
+ * 精确两位小数 .99 -> 0.99
+ * 1111111.985 -> 1,111,111.99
+ * @param v
+ * @return
+ */
+ public static String formatNumber(String v){
+ return formatNumber(v,BIG_NUM_FMT_COMMA);
+ }
+
+ /**
+ * 格式化金额
+ * @param v
+ * @param pattern BigNum类中的常量 BIG_NUM_FMT_COMMA,BIG_NUM_FMT
+ * @return
+ */
+ public static String formatNumber(String v,String pattern) {
+ return new DecimalFormat(pattern).format(new BigDecimal(v));
+ }
+
+ public static void main(String[] args) {
+ System.out.println(new BigDecimal("0.00").toString());
+ }
+}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java b/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java
new file mode 100644
index 00000000..6eb4cbd5
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java
@@ -0,0 +1,133 @@
+package co.yixiang.utils;
+
+import org.apache.commons.lang3.time.DateFormatUtils;
+
+import java.lang.management.ManagementFactory;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * 时间工具类
+ */
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
+ public static String YYYY = "yyyy";
+
+ public static String YYYY_MM = "yyyy-MM";
+
+ public static String YYYY_MM_DD = "yyyy-MM-dd";
+
+ public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
+
+ public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
+
+ private static String[] parsePatterns = {
+ "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
+ "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+ "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+ /**
+ * 获取当前Date型日期
+ *
+ * @return Date() 当前日期
+ */
+ public static Date getNowDate() {
+ return new Date();
+ }
+
+ /**
+ * 获取当前日期, 默认格式为yyyy-MM-dd
+ *
+ * @return String
+ */
+ public static String getDate() {
+ return dateTimeNow(YYYY_MM_DD);
+ }
+
+ public static final String getTime() {
+ return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
+ }
+
+ public static final String dateTimeNow() {
+ return dateTimeNow(YYYYMMDDHHMMSS);
+ }
+
+ public static final String dateTimeNow(final String format) {
+ return parseDateToStr(format, new Date());
+ }
+
+ public static final String dateTime(final Date date) {
+ return parseDateToStr(YYYY_MM_DD, date);
+ }
+
+ public static final String parseDateToStr(final String format, final Date date) {
+ return new SimpleDateFormat(format).format(date);
+ }
+
+ public static final Date dateTime(final String format, final String ts) {
+ try {
+ return new SimpleDateFormat(format).parse(ts);
+ } catch (ParseException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * 日期路径 即年/月/日 如2018/08/08
+ */
+ public static final String datePath() {
+ Date now = new Date();
+ return DateFormatUtils.format(now, "yyyy/MM/dd");
+ }
+
+ /**
+ * 日期路径 即年/月/日 如20180808
+ */
+ public static final String dateTime() {
+ Date now = new Date();
+ return DateFormatUtils.format(now, "yyyyMMdd");
+ }
+
+ /**
+ * 日期型字符串转化为日期 格式
+ */
+ public static Date parseDate(Object str) {
+ if (str == null) {
+ return null;
+ }
+ try {
+ return parseDate(str.toString(), parsePatterns);
+ } catch (ParseException e) {
+ return null;
+ }
+ }
+
+ /**
+ * 获取服务器启动时间
+ */
+ public static Date getServerStartDate() {
+ long time = ManagementFactory.getRuntimeMXBean().getStartTime();
+ return new Date(time);
+ }
+
+ /**
+ * 计算两个时间差
+ */
+ public static String getDatePoor(Date endDate, Date nowDate) {
+ long nd = 1000 * 24 * 60 * 60;
+ long nh = 1000 * 60 * 60;
+ long nm = 1000 * 60;
+ // long ns = 1000;
+ // 获得两个时间的毫秒时间差异
+ long diff = endDate.getTime() - nowDate.getTime();
+ // 计算差多少天
+ long day = diff / nd;
+ // 计算差多少小时
+ long hour = diff % nd / nh;
+ // 计算差多少分钟
+ long min = diff % nd % nh / nm;
+ // 计算差多少秒//输出结果
+ // long sec = diff % nd % nh % nm / ns;
+ return day + "天" + hour + "小时" + min + "分钟";
+ }
+}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java b/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java
new file mode 100644
index 00000000..704095fc
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java
@@ -0,0 +1,12 @@
+package co.yixiang.utils;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-04-21 17:30
+ * @description:飞鹅打印机打印帮助类
+ * @modified By:
+ * @version: V1.0
+ */
+public class FeiEHttpUtil {
+
+}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java b/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java
index 2a01ed94..fd44529c 100644
--- a/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java
+++ b/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java
@@ -12,6 +12,7 @@ import javax.activation.MimetypesFileTypeMap;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
import java.io.*;
import java.security.MessageDigest;
import java.text.DecimalFormat;
@@ -337,4 +338,36 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
}
}
+ public static BufferedImage inputImage(MultipartFile file) {
+ BufferedImage srcImage = null;
+ try {
+ FileInputStream in = (FileInputStream) file.getInputStream();
+ srcImage = javax.imageio.ImageIO.read(in);
+ } catch (IOException e) {
+ System.out.println("读取图片文件出错!" + e.getMessage());
+ }
+ return srcImage;
+ }
+ /**
+ * 自动调节精度(经验数值)
+ *
+ * @param size 源图片大小
+ * @return 图片压缩质量比
+ */
+ public static float getAccuracy(long size) {
+ float accuracy;
+ if (size < 400) {
+ accuracy = 0.85f;
+ } else if (size < 900) {
+ accuracy = 0.75f;
+ } else if (size < 2047) {
+ accuracy = 0.6f;
+ } else if (size < 3275) {
+ accuracy = 0.44f;
+ } else {
+ accuracy = 0.4f;
+ }
+ return accuracy;
+ }
+
}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java b/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java
new file mode 100644
index 00000000..6d8f640d
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java
@@ -0,0 +1,80 @@
+package co.yixiang.utils;
+
+import java.awt.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * 字体工具类
+ * Created by 刘彦民 on 2018/5/5.
+ */
+public class FontUtil {
+ /**
+ * 默认字体
+ */
+ public static final int DEFAULT_FONT = 1;
+ /**
+ * PingFangSC字体
+ */
+ public static final int PINGFANG_FONT = 2;
+ /**
+ * PingFangSCBold字体
+ */
+ public static final int PINGFANG_BOLD_FONT = 3;
+ /**
+ * 方正兰亭特黑GBK
+ */
+ public static final int FZLTTH_GBK_FONT = 4;
+
+
+ /**
+ * 根据字体类型获取字体
+ * @param type
+ * @param size
+ * @return
+ */
+ public static Font getFont(int type, float size) {
+ // 字体路径
+ String path = "";
+ switch (type) {
+ case DEFAULT_FONT:
+ path = "D:/upload/resources/font/simhei.ttf";
+ break;
+ case PINGFANG_FONT:
+ path = "D:/upload/resources/font/PingFangSC.ttf";
+ break;
+ case PINGFANG_BOLD_FONT:
+ path = "D:/upload/resources/font/PingFangBold.ttf";
+ break;
+ case FZLTTH_GBK_FONT:
+ path = "D:/upload/resources/font/fzltthjwgb10.ttf";
+ break;
+ default:
+ path = "D:/upload/resources/font/simhei.ttf";
+ }
+
+ File file = new File(path);
+ InputStream inputStream = null;
+ try {
+ inputStream = new FileInputStream(file);
+ Font sPfBoldFont = Font.createFont(Font.TRUETYPE_FONT, inputStream);
+ sPfBoldFont = sPfBoldFont.deriveFont(size);
+ return sPfBoldFont;
+ } catch (FontFormatException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ try {
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java b/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java
index 204393c2..80df66fa 100644
--- a/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java
+++ b/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java
@@ -43,29 +43,31 @@ public class OrderUtil {
/**
* 获取俩个数之间的随机数
+ *
* @param min
* @param max
* @return
*/
- public static Double randomNumber(double min,double max){
+ public static Double randomNumber(double min, double max) {
return NumberUtil.add(min,
NumberUtil.mul(Math.random(),
- NumberUtil.sub(max,min)));
+ NumberUtil.sub(max, min)));
}
/**
* 时间戳订单号
+ *
* @return
*/
- public static String orderSn(){
+ public static String orderSn() {
Date date = DateUtil.date();
- return DateUtil.format(date,"yyyyMMddHHmmssSSS");
+ return DateUtil.format(date, "yyyyMMddHHmmssSSS");
}
/*
* 将时间戳转换为时间
*/
- public static String stampToDate(String s){
+ public static String stampToDate(String s) {
String res;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
long lt = new Long(s) * 1000;
@@ -77,7 +79,7 @@ public class OrderUtil {
/*
* 将时间戳转换为date
*/
- public static Date stampToDateObj(String s){
+ public static Date stampToDateObj(String s) {
long lt = new Long(s) * 1000;
Date date = new Date(lt);
return date;
@@ -86,59 +88,70 @@ public class OrderUtil {
/**
* 获取精确到秒的时间戳
+ *
* @return
**/
- public static int getSecondTimestampTwo(){
- String timestamp = String.valueOf(new Date().getTime()/1000);
+ public static int getSecondTimestampTwo() {
+ String timestamp = String.valueOf(new Date().getTime() / 1000);
return Integer.valueOf(timestamp);
}
/**
* 获取精确到秒的时间戳
+ *
* @return
**/
- public static int dateToTimestamp(Date date){
- String timestamp = String.valueOf(date.getTime()/1000);
+ public static int dateToTimestamp(Date date) {
+ String timestamp = String.valueOf(date.getTime() / 1000);
return Integer.valueOf(timestamp);
}
/**
* 获取精确到秒的时间戳
+ *
* @return
**/
- public static int dateToTimestampT(DateTime date){
- String timestamp = String.valueOf(date.getTime()/1000);
+ public static int dateToTimestampT(DateTime date) {
+ String timestamp = String.valueOf(date.getTime() / 1000);
return Integer.valueOf(timestamp);
}
+ public static long dateToSecond(String str) throws Exception {
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date date = simpleDateFormat.parse(str);
+ long ts = date.getTime();
+ return ts/1000;
+ }
+
/**
* 获取订单状态名称
+ *
* @param paid
* @param status
* @param shipping_type
* @param refund_status
* @return
*/
- public static String orderStatusStr(int paid,int status,
- int shipping_type,int refund_status){
+ public static String orderStatusStr(int paid, int status,
+ int shipping_type, int refund_status) {
String statusName = "";
- if(paid == 0 && status == 0){
+ if (paid == 0 && status == 0) {
statusName = "未支付";
- }else if(paid == 1 && status == 0 && shipping_type == 1 && refund_status == 0){
+ } else if (paid == 1 && status == 0 && shipping_type == 1 && refund_status == 0) {
statusName = "未发货";
- }else if(paid == 1 && status == 0 && shipping_type == 2 && refund_status == 0){
+ } else if (paid == 1 && status == 0 && shipping_type == 2 && refund_status == 0) {
statusName = "未核销";
- }else if(paid == 1 && status == 1 && shipping_type ==1 && refund_status == 0){
+ } else if (paid == 1 && status == 1 && shipping_type == 1 && refund_status == 0) {
statusName = "待收货";
- }else if(paid == 1 && status == 1 && shipping_type == 2 && refund_status == 0){
+ } else if (paid == 1 && status == 1 && shipping_type == 2 && refund_status == 0) {
statusName = "未核销";
- }else if(paid == 1 && status == 2 && refund_status == 0){
+ } else if (paid == 1 && status == 2 && refund_status == 0) {
statusName = "待评价";
- }else if(paid == 1 && status == 3 && refund_status == 0){
+ } else if (paid == 1 && status == 3 && refund_status == 0) {
statusName = "已完成";
- }else if(paid == 1 && refund_status == 1){
+ } else if (paid == 1 && refund_status == 1) {
statusName = "退款中";
- }else if(paid == 1 && refund_status == 2){
+ } else if (paid == 1 && refund_status == 2) {
statusName = "已退款";
}
@@ -148,29 +161,30 @@ public class OrderUtil {
/**
* 获取状态数值
+ *
* @param paid
* @param status
* @param refund_status
* @return
*/
- public static int orderStatus(int paid,int status,int refund_status){
+ public static int orderStatus(int paid, int status, int refund_status) {
//todo 1-未付款 2-未发货 3-退款中 4-待收货 5-待评价 6-已完成 7-已退款
int _status = 0;
- if(paid == 0 && status == 0 && refund_status == 0){
+ if (paid == 0 && status == 0 && refund_status == 0) {
_status = 1;
- }else if(paid == 1 && status == 0 && refund_status == 0){
+ } else if (paid == 1 && status == 0 && refund_status == 0) {
_status = 2;
- }else if(paid == 1 && refund_status == 1){
+ } else if (paid == 1 && refund_status == 1) {
_status = 3;
- }else if(paid == 1 && status == 1 && refund_status == 0){
+ } else if (paid == 1 && status == 1 && refund_status == 0) {
_status = 4;
- }else if(paid == 1 && status == 2 && refund_status == 0){
+ } else if (paid == 1 && status == 2 && refund_status == 0) {
_status = 5;
- }else if(paid == 1 && status == 3 && refund_status == 0){
+ } else if (paid == 1 && status == 3 && refund_status == 0) {
_status = 6;
- }else if(paid == 1 && refund_status == 2){
- _status =7 ;
+ } else if (paid == 1 && refund_status == 2) {
+ _status = 7;
}
return _status;
@@ -180,14 +194,15 @@ public class OrderUtil {
/**
* 支付方式
+ *
* @param pay_type
* @param paid
* @return
*/
- public static String payTypeName(String pay_type, int paid){
+ public static String payTypeName(String pay_type, int paid) {
String payTypeName = "";
- if(paid == 1 ){
- switch(pay_type){
+ if (paid == 1) {
+ switch (pay_type) {
case "weixin":
payTypeName = "微信支付";
break;
@@ -201,8 +216,8 @@ public class OrderUtil {
payTypeName = "其他支付";
break;
}
- }else{
- switch(pay_type){
+ } else {
+ switch (pay_type) {
default:
payTypeName = "未支付";
break;
@@ -211,13 +226,24 @@ public class OrderUtil {
break;
}
}
-
-
return payTypeName;
}
+ /**
+ * 支付渠道(0微信公众号1微信小程序)
+ *
+ * @return
+ */
+ public static String payChannel(Integer pay_channel) {
+ if (pay_channel.equals(1)) {
+ return "微信小程序";
+ } else {
+ return "微信公众号";
+ }
+ }
+
//todo 订单类型
- public static String orderType(int pinkId){
+ public static String orderType(int pinkId) {
return "普通订单";
}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java b/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java
index dc67537e..5227ab31 100644
--- a/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java
+++ b/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java
@@ -35,6 +35,8 @@ public class PageUtil extends cn.hutool.core.util.PageUtil {
return map;
}
+
+
/**
* 自定义分页
*/
diff --git a/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java b/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java
new file mode 100644
index 00000000..af9d8be1
--- /dev/null
+++ b/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java
@@ -0,0 +1,67 @@
+package co.yixiang.utils;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.WriterException;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
+
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Hashtable;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020/2/27 15:33
+ * @description:
+ * @modified By:
+ * @version:
+ */
+public class RecodeUtil {
+
+ public static void creatRrCode(String contents, int width, int height, HttpServletResponse response) {
+ Hashtable hints = new Hashtable();
+
+ hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H); //容错级别最高
+ hints.put(EncodeHintType.CHARACTER_SET, "utf-8"); //设置字符编码
+ hints.put(EncodeHintType.MARGIN, 1); //二维码空白区域,最小为0也有白边,只是很小,最小是6像素左右
+ try {
+ BitMatrix bitMatrix = new MultiFormatWriter().encode(contents, BarcodeFormat.QR_CODE, width, height, hints); // 1、读取文件转换为字节数组
+// ByteArrayOutputStream out = new ByteArrayOutputStream();
+ BufferedImage image = toBufferedImage(bitMatrix);
+ //转换成png格式的IO流
+ ImageIO.write(image, "png", response.getOutputStream());
+// byte[] bytes = out.toByteArray();
+// // 2、将字节数组转为二进制
+// BASE64Encoder encoder = new BASE64Encoder();
+// binary = encoder.encodeBuffer(bytes).trim();
+ } catch (WriterException e) { // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+
+
+
+ /**
+ * image流数据处理
+ *
+ * @author ianly
+ */
+ public static BufferedImage toBufferedImage(BitMatrix matrix) {
+ int width = matrix.getWidth();
+ int height = matrix.getHeight();
+ BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
+ for (int x = 0; x < width; x++) {
+ for (int y = 0; y < height; y++) {
+ image.setRGB(x, y, matrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
+ }
+ }
+ return image;
+ }
+}
diff --git a/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java b/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java
index 5cb26fca..d3a26ca8 100644
--- a/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java
+++ b/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java
@@ -29,7 +29,7 @@ public class SecurityUtils {
*/
public static String getUsername(){
Object obj = getUserDetails();
- return new JSONObject(obj).get("username", String.class);
+ return new JSONObject(obj).get("username", String.class);
}
/**
diff --git a/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/ArrayRefProperty.java b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/ArrayRefProperty.java
new file mode 100644
index 00000000..434f63d6
--- /dev/null
+++ b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/ArrayRefProperty.java
@@ -0,0 +1,30 @@
+package com.github.xiaoymin.knife4j.spring.util;
+import io.swagger.models.properties.ArrayProperty;
+import io.swagger.models.properties.RefProperty;
+import io.swagger.models.refs.GenericRef;
+import io.swagger.models.refs.RefType;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2019/9/24 17:17
+ * @description: 同时拥有ArrayProperty和RefProperty的特性
+ * @modified By:
+ * @version:
+ */
+public class ArrayRefProperty extends ArrayProperty {
+ private GenericRef genericRef;
+
+ public String get$ref() {
+ return genericRef.getRef();
+ }
+
+ public void set$ref(String ref) {
+ this.genericRef = new GenericRef(RefType.DEFINITION, ref);
+
+ // $ref
+ RefProperty items = new RefProperty();
+ items.setType(ref);
+ items.set$ref(ref);
+ this.items(items);
+ }
+}
diff --git a/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/SwaggerUtil.java b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/SwaggerUtil.java
new file mode 100644
index 00000000..eeb03792
--- /dev/null
+++ b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/util/SwaggerUtil.java
@@ -0,0 +1,245 @@
+package com.github.xiaoymin.knife4j.spring.util;
+
+import io.swagger.models.Model;
+import io.swagger.models.properties.*;
+import io.swagger.models.properties.PropertyBuilder.PropertyId;
+import org.springframework.beans.BeanUtils;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * @author LionCitys
+ * @modified By:
+ * @version: 1.0
+ * @date 2020/01/07
+ */
+public class SwaggerUtil {
+
+ /**
+ * 判断是否Swagger基本类型
+ *
+ * @param type 类型
+ * @return boolean
+ */
+ private static boolean isBaseType(String type) {
+ return SwaggerUtil.getSwaggerProperty(type) != null;
+ }
+
+ /**
+ * 获取Swagger支持的类型
+ *
+ * @return {@link Map}
+ */
+ private static Map getPropMap() {
+ Map map = new HashMap<>(8);
+ map.put("integer", new IntegerProperty());
+ map.put("int", new IntegerProperty());
+ map.put("long", new LongProperty());
+ map.put("string", new StringProperty());
+ map.put("object", new ObjectProperty());
+ map.put("array", new ArrayProperty());
+ map.put("boolean", new BooleanProperty());
+ map.put("date", new DateTimeProperty());
+ return map;
+ }
+
+ /**
+ * 通过java类型获取Swagger类型
+ * @param type javaType
+ * @return swaggerType
+ */
+ private static AbstractProperty getSwaggerProperty(String type) {
+ type = type.toLowerCase();
+ return SwaggerUtil.getPropMap().get(type);
+ }
+
+ private static boolean isMap(String type) {
+ type = type.toLowerCase();
+ return type.startsWith("map");
+ }
+
+ private static boolean isIterable(String type) {
+ type = type.toLowerCase();
+ return type.startsWith("list") || type.startsWith("set");
+ }
+
+ /**
+ * 获取非基本类型的T
+ * new String[] { "A>", "A", "A>>>" }
+ *
+ * @param type 类型
+ * @return C1, C2, C3, C4
+ */
+ public static String getRef(String type) {
+ try {
+ String m = type.substring(type.lastIndexOf("«") + 1, type.indexOf("»"));
+ String[] cc = m.split(",");
+ for (String c : cc) {
+ if (!SwaggerUtil.isBaseType(c)) {
+ return c;
+ }
+ }
+ return type;
+ } catch (Exception ignored) {
+
+ }
+ return "!!Unknown T!!";
+ }
+
+ /**
+ * 获取对象类型,主要是剥离第一层<>
+ * @param type JsonResult>>>
+ * @return Map>>
+ */
+ public static String getRealType(String type) {
+ try {
+ return type.substring(type.indexOf("«") + 1, type.lastIndexOf("»"));
+ } catch (Exception ignored) {
+
+ }
+ return type;
+ }
+
+ /**
+ * 判断是否存在非基本类型<参照类型>
+ *
+ * @param type 类型
+ * @return boolean
+ */
+ private static boolean hasRef(String type) {
+ if (type.indexOf("»") > 0) {
+ try {
+ String m = type.substring(type.lastIndexOf("«") + 1, type.indexOf("»"));
+ String[] cc = m.split(",");
+ for (String c : cc) {
+ if (!SwaggerUtil.isBaseType(c)) {
+ return true;
+ }
+ }
+ return false;
+ } catch (Exception e) {
+ return false;
+ }
+ } else {
+ return !SwaggerUtil.isBaseType(type);
+ }
+ }
+
+ /**
+ * 递归处理泛型类型
+ * JsonResult, List>>>
+ *
+ * @param dataProp 数据支撑
+ * @param type 类型
+ * @param definitions 定义
+ * @return {@link Property}
+ */
+ public static Property getNewProp(Property dataProp, String type, Map definitions) {
+ Property newProp = null;
+ Model model = definitions.get(type);
+ Map props = null;
+ if (null != model) {
+ props = model.getProperties();
+ }
+ if (null == props) {
+ props = new HashMap<>(2);
+ }
+ String realType = SwaggerUtil.getRealType(type);
+ if (SwaggerUtil.isMap(type)) {
+ String[] realTypes = SwaggerUtil.splitByComma(realType);
+
+ Map argsK = new HashMap<>(2);
+ argsK.put(PropertyId.DESCRIPTION, "Map的键");
+ argsK.put(PropertyId.TYPE, realTypes[0].toLowerCase());
+ AbstractProperty prop0 = SwaggerUtil.getSwaggerProperty(realTypes[0]);
+ Property propK = PropertyBuilder.build(null == prop0 ? "object" : prop0.getType(),
+ null == prop0 ? null : prop0.getFormat(), argsK);
+ propK.setName("key");
+
+ Map argsV = new HashMap<>(2);
+ argsV.put(PropertyId.DESCRIPTION, "Map的值");
+ argsV.put(PropertyId.TYPE, realTypes[1].toLowerCase());
+ AbstractProperty prop1 = SwaggerUtil.getSwaggerProperty(realTypes[1]);
+ Property propV = PropertyBuilder.build(null == prop1 ? "object" : prop1.getType(),
+ null == prop1 ? null : prop1.getFormat(), argsV);
+ propV.setName("value");
+
+ if (!realType.equals(type)) {
+ propK = SwaggerUtil.getNewProp(propK, realTypes[0], definitions);
+ propV = SwaggerUtil.getNewProp(propV, realTypes[1], definitions);
+ }
+
+ props.put(propK.getName(), propK);
+ props.put(propV.getName(), propV);
+
+ newProp = new RefProperty();
+ BeanUtils.copyProperties(dataProp, newProp);
+ ((RefProperty) newProp).set$ref(type);
+ } else if (SwaggerUtil.isIterable(type)) {
+ String ref = SwaggerUtil.getRealType(type);
+ newProp = new ArrayRefProperty();
+ BeanUtils.copyProperties(dataProp, newProp);
+ ((ArrayRefProperty) newProp).set$ref(ref);
+ ((ArrayRefProperty) newProp).setType(ArrayRefProperty.TYPE);
+ if (!realType.equals(type)) {
+ SwaggerUtil.getNewProp(dataProp, realType, definitions);
+ }
+ } else if (SwaggerUtil.isBaseType(type)) {
+ Map args = new HashMap<>(2);
+ args.put(PropertyId.DESCRIPTION, dataProp.getDescription());
+ args.put(PropertyId.TYPE, type.toLowerCase());
+ AbstractProperty prop = SwaggerUtil.getSwaggerProperty(type);
+ newProp = PropertyBuilder.build(prop.getType(), prop.getFormat(), args);
+ newProp.setName(dataProp.getName());
+ } else if (SwaggerUtil.hasRef(type)) {
+ newProp = new RefProperty();
+ BeanUtils.copyProperties(dataProp, newProp);
+ ((RefProperty) newProp).set$ref(type);
+ }
+ if (null != model) {
+ model.setProperties(props);
+ }
+
+ return newProp;
+ }
+
+ private static String[] splitByComma(String str) {
+ int index = 0;
+ int has = 0;
+ for (int i = 0; i < str.length(); i++) {
+ char c = str.charAt(i);
+ if ("«".equals(c + "")) {
+ has++;
+ }
+ if ("»".equals(c + "")) {
+ has--;
+ }
+ if (",".equals(c + "") && has == 0) {
+ index = i;
+ }
+ }
+
+ String[] arr = new String[2];
+ arr[0] = str.substring(0, index);
+ arr[1] = str.substring(index + 1);
+ return arr;
+ }
+
+ public static void main(String[] args) {
+ String[] ss = new String[] { "A«List«C1»»", "A«C2»", "A«B«String,«String,List«C4»»»»" };
+ for (String s : ss) {
+ String c = SwaggerUtil.getRealType(s);
+ System.out.println(c);
+ }
+
+ String[] s2 = new String[] { "A,B«List«C1»»", "Map«A,B»,C«List«D»»",
+ "Map«Map«A,B»,C«List«D»»,Map«A,B»,C«List«D»»»,C«List«D»»" };
+ for (String s : s2) {
+ String[] arr = SwaggerUtil.splitByComma(s);
+ System.out.println(arr[0]);
+ System.out.println(arr[1]);
+ }
+ }
+}
diff --git a/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/web/Knife4jController.java b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/web/Knife4jController.java
new file mode 100644
index 00000000..f39c5bc7
--- /dev/null
+++ b/yshop-common/src/main/java/com/github/xiaoymin/knife4j/spring/web/Knife4jController.java
@@ -0,0 +1,419 @@
+package com.github.xiaoymin.knife4j.spring.web;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSort;
+import com.github.xiaoymin.knife4j.annotations.ApiSort;
+import com.github.xiaoymin.knife4j.spring.common.SwaggerBootstrapUiHostNameProvider;
+import com.github.xiaoymin.knife4j.spring.model.*;
+import com.github.xiaoymin.knife4j.spring.util.SwaggerUtil;
+import com.google.common.base.Function;
+import com.google.common.base.Strings;
+import com.google.common.collect.FluentIterable;
+import com.google.common.collect.Lists;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.models.Model;
+import io.swagger.models.Swagger;
+import io.swagger.models.properties.Property;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.BeanFactoryUtils;
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.ClassUtils;
+import org.springframework.util.StringUtils;
+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.ResponseBody;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+import org.springframework.web.method.HandlerMethod;
+import org.springframework.web.servlet.HandlerMapping;
+import org.springframework.web.servlet.mvc.condition.PatternsRequestCondition;
+import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
+import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
+import org.springframework.web.util.UriComponents;
+import springfox.documentation.RequestHandler;
+import springfox.documentation.annotations.ApiIgnore;
+import springfox.documentation.service.Documentation;
+import springfox.documentation.service.Tag;
+import springfox.documentation.spi.service.RequestHandlerProvider;
+import springfox.documentation.spring.web.DocumentationCache;
+import springfox.documentation.spring.web.WebMvcRequestHandler;
+import springfox.documentation.spring.web.json.Json;
+import springfox.documentation.spring.web.json.JsonSerializer;
+import springfox.documentation.swagger.common.HostNameProvider;
+import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper;
+
+import javax.servlet.http.HttpServletRequest;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.regex.Pattern;
+
+import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
+
+/**
+ * @author LionCitys
+ */
+@Controller
+@ApiIgnore
+public class Knife4jController {
+ private static final String DEFAULT_SORT_URL = "/v2/api-docs-ext";
+ private static final String HAL_MEDIA_TYPE = "application/hal+json";
+ private static final Logger LOGGER = LoggerFactory.getLogger(Knife4jController.class);
+ private final ServiceModelToSwagger2Mapper mapper;
+ private final DocumentationCache documentationCache;
+ private final JsonSerializer jsonSerializer;
+ private final String hostNameOverride;
+ private final List handlerProviders;
+ private final MarkdownFiles markdownFiles;
+ private ArrayList globalHandlerMappings = new ArrayList<>();
+ private final RequestMethod[] globalRequestMethods;
+
+ @Autowired
+ public Knife4jController(Environment environment, ServiceModelToSwagger2Mapper mapper, DocumentationCache documentationCache, JsonSerializer jsonSerializer, List handlerProviders, ObjectProvider markdownFilesObjectProvider) {
+ this.globalRequestMethods = new RequestMethod[]{RequestMethod.POST, RequestMethod.GET, RequestMethod.PUT, RequestMethod.DELETE, RequestMethod.PATCH, RequestMethod.OPTIONS, RequestMethod.HEAD};
+ this.mapper = mapper;
+ this.documentationCache = documentationCache;
+ this.jsonSerializer = jsonSerializer;
+ this.hostNameOverride = environment.getProperty("springfox.documentation.swagger.v2.host", "DEFAULT");
+ this.handlerProviders = handlerProviders;
+ this.markdownFiles = (MarkdownFiles)markdownFilesObjectProvider.getIfAvailable();
+ }
+
+ private Function> handlers() {
+ return new Function>() {
+ @Override
+ public Iterable apply(RequestHandlerProvider input) {
+ return input.requestHandlers();
+ }
+ };
+ }
+
+ @RequestMapping(value = DEFAULT_SORT_URL,
+ method = RequestMethod.GET,
+ produces = {APPLICATION_JSON_VALUE, HAL_MEDIA_TYPE})
+ @ResponseBody
+ public ResponseEntity apiSorts(@RequestParam(value = "group",required = false) String swaggerGroup, HttpServletRequest request) {
+ String groupName = Optional.ofNullable(swaggerGroup).orElse("default");
+ Documentation documentation = this.documentationCache.documentationByGroup(groupName);
+ if (documentation == null) {
+ LOGGER.warn("Unable to find specification for group {},use default", groupName);
+ documentation = this.documentationCache.documentationByGroup("default");
+ if (documentation == null) {
+ LOGGER.warn("Unable to find specification for group default");
+ return new ResponseEntity<>(HttpStatus.NOT_FOUND);
+ }
+ }
+
+ Swagger swagger = this.mapper.mapDocumentation(documentation);
+ UriComponents uriComponents = null;
+
+ try {
+ uriComponents = HostNameProvider.componentsFrom(request, swagger.getBasePath());
+ } catch (Throwable var9) {
+ LOGGER.error(var9.getClass().getName() + ":" + var9.getMessage());
+ if (var9 instanceof NoClassDefFoundError) {
+ String msg = var9.getMessage();
+ if (msg != null && !"".equals(msg) && msg.endsWith("HostNameProvider")) {
+ uriComponents = SwaggerBootstrapUiHostNameProvider.componentsFrom(request, swagger.getBasePath());
+ }
+ }
+ }
+
+ swagger.basePath(Strings.isNullOrEmpty(uriComponents.getPath()) ? "/" : uriComponents.getPath());
+ if (Strings.isNullOrEmpty(swagger.getHost())) {
+ swagger.host(this.hostName(uriComponents));
+ }
+ extend(swagger);
+ SwaggerExt swaggerExt = new SwaggerExt(swagger);
+ swaggerExt.setSwaggerBootstrapUi(this.initSwaggerBootstrapUi(request, documentation, swaggerExt));
+ return new ResponseEntity<>(this.jsonSerializer.toJson(swaggerExt), HttpStatus.OK);
+ }
+
+ private SwaggerBootstrapUi initSwaggerBootstrapUi(HttpServletRequest request, Documentation documentation, SwaggerExt swaggerExt) {
+ SwaggerBootstrapUi swaggerBootstrapUi = new SwaggerBootstrapUi();
+ WebApplicationContext wc = WebApplicationContextUtils.getWebApplicationContext(request.getServletContext());
+ if (wc == null) {
+ String msg = "WebApplicationContext is Empty~!,Enable SwaggerBootstrapUi fun fail~!";
+ LOGGER.warn(msg);
+ swaggerBootstrapUi.setErrorMsg(msg);
+ return swaggerBootstrapUi;
+ } else {
+ Iterator tags = documentation.getTags().iterator();
+ this.initGlobalRequestMappingArray(swaggerExt);
+ List targetTagLists = Lists.newArrayList();
+
+ ArrayList targetPathLists;
+ SwaggerBootstrapUiTag tag;
+ label64:
+ for(targetPathLists = Lists.newArrayList(); tags.hasNext(); targetTagLists.add(tag)) {
+ Tag sourceTag = tags.next();
+ String tagName = sourceTag.getName();
+ int order = 2147483647;
+ tag = new SwaggerBootstrapUiTag(order);
+ tag.name(tagName).description(sourceTag.getDescription());
+ Api tagApi = null;
+ RestHandlerMapping tagMapping = null;
+ Iterator var15 = this.globalHandlerMappings.iterator();
+ while(true) {
+ while(true) {
+ while(var15.hasNext()) {
+ RestHandlerMapping rhm = var15.next();
+ Api api = (Api)rhm.getBeanType().getAnnotation(Api.class);
+ if (api != null) {
+ api.tags();
+ if (api.tags().length > 0) {
+ if (Lists.newArrayList(api.tags()).contains(tagName)) {
+ tagApi = api;
+ tagMapping = rhm;
+ this.createPathInstance(rhm, targetPathLists);
+ } else {
+ String firstTag = api.tags()[0];
+ if (StringUtils.isEmpty(firstTag) && this.checkExists(tagName, rhm.getBeanType())) {
+ tagApi = api;
+ tagMapping = rhm;
+ this.createPathInstance(rhm, targetPathLists);
+ }
+ }
+ } else if (this.checkExists(tagName, rhm.getBeanType())) {
+ if (!StringUtils.isEmpty(api.value())) {
+ tag.name(api.value());
+ }
+ tagApi = api;
+ tagMapping = rhm;
+ this.createPathInstance(rhm, targetPathLists);
+ }
+ } else if (this.checkExists(tagName, rhm.getBeanType())) {
+ tagMapping = rhm;
+ this.createPathInstance(rhm, targetPathLists);
+ }
+ }
+ if (tagMapping != null) {
+ tag.setOrder(this.getRestTagOrder(tagMapping.getBeanType(), tagApi));
+ }
+ continue label64;
+ }
+ }
+ }
+
+ Collections.sort(targetTagLists, new Comparator() {
+ @Override
+ public int compare(SwaggerBootstrapUiTag o1, SwaggerBootstrapUiTag o2) {
+ return o1.getOrder().compareTo(o2.getOrder());
+ }
+ });
+ targetPathLists.sort(new Comparator() {
+ @Override
+ public int compare(SwaggerBootstrapUiPath o1, SwaggerBootstrapUiPath o2) {
+ return o1.getOrder().compareTo(o2.getOrder());
+ }
+ });
+ swaggerBootstrapUi.setTagSortLists(targetTagLists);
+ swaggerBootstrapUi.setPathSortLists(targetPathLists);
+ if (this.markdownFiles != null) {
+ swaggerBootstrapUi.setMarkdownFiles(this.markdownFiles.getMarkdownFiles());
+ }
+
+ return swaggerBootstrapUi;
+ }
+ }
+
+ private void initGlobalRequestMappingArray(SwaggerExt swaggerExt) {
+ if (this.globalHandlerMappings.size() == 0) {
+ String parentPath = "";
+ if (!StringUtils.isEmpty(swaggerExt.getBasePath()) && !"/".equals(swaggerExt.getBasePath())) {
+ parentPath = parentPath + swaggerExt.getBasePath();
+ }
+
+ try {
+ List requestHandlers = FluentIterable.from(this.handlerProviders).transformAndConcat(this.handlers()).toList();
+ Iterator var4 = requestHandlers.iterator();
+
+ while(true) {
+ RequestHandler requestHandler;
+ do {
+ if (!var4.hasNext()) {
+ return;
+ }
+
+ requestHandler = var4.next();
+ } while(!(requestHandler instanceof WebMvcRequestHandler));
+
+ WebMvcRequestHandler webMvcRequestHandler = (WebMvcRequestHandler)requestHandler;
+ Set patterns = webMvcRequestHandler.getRequestMapping().getPatternsCondition().getPatterns();
+ Set restMethods = webMvcRequestHandler.getRequestMapping().getMethodsCondition().getMethods();
+ HandlerMethod handlerMethod = webMvcRequestHandler.getHandlerMethod();
+ Class> controllerClazz = ClassUtils.getUserClass(handlerMethod.getBeanType());
+ Method method = ClassUtils.getMostSpecificMethod(handlerMethod.getMethod(), controllerClazz);
+
+ String url;
+ for(Iterator var12 = patterns.iterator(); var12.hasNext(); this.globalHandlerMappings.add(new RestHandlerMapping(parentPath + url, controllerClazz, method, restMethods))) {
+ url = var12.next();
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("url:" + url + "\r\nclass:" + controllerClazz.toString() + "\r\nmethod:" + method.toString());
+ }
+ }
+ }
+ } catch (Exception var14) {
+ LOGGER.error(var14.getMessage(), var14);
+ }
+ }
+
+ }
+
+ /** @deprecated */
+ @Deprecated
+ private void initGlobalRequestMappingArray(WebApplicationContext wc, SwaggerExt swaggerExt) {
+ if (this.globalHandlerMappings.size() == 0) {
+ String parentPath = "";
+ if (!StringUtils.isEmpty(swaggerExt.getBasePath()) && !"/".equals(swaggerExt.getBasePath())) {
+ parentPath = parentPath + swaggerExt.getBasePath();
+ }
+
+ Map requestMappings = BeanFactoryUtils.beansOfTypeIncludingAncestors(wc, HandlerMapping.class, true, false);
+ Iterator var5 = requestMappings.values().iterator();
+
+ while(true) {
+ HandlerMapping handlerMapping;
+ do {
+ if (!var5.hasNext()) {
+ return;
+ }
+ handlerMapping = var5.next();
+ } while(!(handlerMapping instanceof RequestMappingHandlerMapping));
+ RequestMappingHandlerMapping rmhMapping = (RequestMappingHandlerMapping)handlerMapping;
+ Map handlerMethods = rmhMapping.getHandlerMethods();
+ for (RequestMappingInfo rmi : handlerMethods.keySet()) {
+ PatternsRequestCondition prc = rmi.getPatternsCondition();
+ Set restMethods = rmi.getMethodsCondition().getMethods();
+ Set patterns = prc.getPatterns();
+ HandlerMethod handlerMethod = (HandlerMethod) handlerMethods.get(rmi);
+
+ String url;
+ Class clazz;
+ Method method;
+ for (Iterator var15 = patterns.iterator(); var15.hasNext(); this.globalHandlerMappings.add(new RestHandlerMapping(parentPath + url, clazz, method, restMethods))) {
+ url = var15.next();
+ clazz = ClassUtils.getUserClass(handlerMethod.getBeanType());
+ method = ClassUtils.getMostSpecificMethod(handlerMethod.getMethod(), clazz);
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("url:" + url + "\r\nclass:" + clazz.toString() + "\r\nmethod:" + method.toString());
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ private void createPathInstance(RestHandlerMapping rhm, List targetPathLists) {
+ if (rhm.getRequestMethods() != null && rhm.getRequestMethods().size() != 0) {
+ Iterator var7 = rhm.getRequestMethods().iterator();
+
+ while(var7.hasNext()) {
+ RequestMethod requestMethod = var7.next();
+ targetPathLists.add(new SwaggerBootstrapUiPath(rhm.getUrl(), requestMethod.name().toUpperCase(), this.getRestMethodOrder(rhm.getBeanOfMethod())));
+ }
+ } else {
+ RequestMethod[] var3 = this.globalRequestMethods;
+ int var4 = var3.length;
+
+ for(int var5 = 0; var5 < var4; ++var5) {
+ RequestMethod requestMethod = var3[var5];
+ targetPathLists.add(new SwaggerBootstrapUiPath(rhm.getUrl(), requestMethod.name().toUpperCase(), this.getRestMethodOrder(rhm.getBeanOfMethod())));
+ }
+ }
+
+ }
+
+ private int getRestTagOrder(Class> aClass, Api api) {
+ int order = 2147483647;
+ if (api != null) {
+ int post = api.position();
+ if (post == 0) {
+ if (aClass != null) {
+ ApiSort annotation = (ApiSort) ClassUtils.getUserClass(aClass).getAnnotation(ApiSort.class);
+ if (annotation != null) {
+ order = annotation.value();
+ }
+ }
+ } else {
+ order = post;
+ }
+ } else if (aClass != null) {
+ ApiSort annotation = (ApiSort) ClassUtils.getUserClass(aClass).getAnnotation(ApiSort.class);
+ if (annotation != null) {
+ order = annotation.value();
+ }
+ }
+
+ return order;
+ }
+
+ private int getRestMethodOrder(Method target) {
+ int pathOrder = 2147483647;
+ ApiOperation apiOperation = (ApiOperation)target.getAnnotation(ApiOperation.class);
+ ApiOperationSort apiOperationSort;
+ if (apiOperation != null) {
+ if (apiOperation.position() != 0) {
+ pathOrder = apiOperation.position();
+ } else {
+ apiOperationSort = (ApiOperationSort)target.getAnnotation(ApiOperationSort.class);
+ if (apiOperationSort != null) {
+ pathOrder = apiOperationSort.value();
+ }
+ }
+ } else {
+ apiOperationSort = (ApiOperationSort)target.getAnnotation(ApiOperationSort.class);
+ if (apiOperationSort != null) {
+ pathOrder = apiOperationSort.value();
+ }
+ }
+
+ return pathOrder;
+ }
+
+ private boolean checkExists(String tagName, Class> aClass) {
+ boolean flag = false;
+ if (!StringUtils.isEmpty(tagName)) {
+ String regexStr = tagName.replaceAll("-", ".*?");
+ Pattern pattern = Pattern.compile(regexStr, 2);
+ if (pattern.matcher(aClass.getSimpleName()).matches()) {
+ flag = true;
+ }
+ }
+
+ return flag;
+ }
+
+ private String hostName(UriComponents uriComponents) {
+ if ("DEFAULT".equals(hostNameOverride)) {
+ String host = uriComponents.getHost();
+ int port = uriComponents.getPort();
+ if (port > -1) {
+ return String.format("%s:%d", host, port);
+ }
+ return host;
+ }
+ return hostNameOverride;
+ }
+
+ private void extend(Swagger swagger) {
+ // 响应返回参数增强
+ for (Map.Entry entry : swagger.getDefinitions().entrySet()) {
+ Model model = entry.getValue();
+ String key = entry.getKey();
+ if (key.contains("ApiResult") && !SwaggerUtil.getRealType(key).contains("ApiResult")) {
+ Map props = model.getProperties();
+ Property dataProp = props.get("data");
+ Property newProp = SwaggerUtil.getNewProp(dataProp, SwaggerUtil.getRealType(key), swagger.getDefinitions());
+ props.put("data", newProp);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/yshop-common/src/main/java/springfox/documentation/swagger2/web/Swagger2Controller.java b/yshop-common/src/main/java/springfox/documentation/swagger2/web/Swagger2Controller.java
new file mode 100644
index 00000000..936015cf
--- /dev/null
+++ b/yshop-common/src/main/java/springfox/documentation/swagger2/web/Swagger2Controller.java
@@ -0,0 +1,117 @@
+package springfox.documentation.swagger2.web;
+
+import com.github.xiaoymin.knife4j.spring.util.SwaggerUtil;
+import com.google.common.base.Strings;
+import io.swagger.models.Model;
+import io.swagger.models.Swagger;
+import io.swagger.models.properties.Property;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Controller;
+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.ResponseBody;
+import org.springframework.web.util.UriComponents;
+import springfox.documentation.annotations.ApiIgnore;
+import springfox.documentation.service.Documentation;
+import springfox.documentation.spring.web.DocumentationCache;
+import springfox.documentation.spring.web.PropertySourcedMapping;
+import springfox.documentation.spring.web.json.JsonSerializer;
+import springfox.documentation.swagger.common.HostNameProvider;
+import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.springframework.util.MimeTypeUtils.APPLICATION_JSON_VALUE;
+
+/**
+ * Swagger2控制器
+ *
+ * @author LionCitys
+ * @date 2020/01/07
+ */
+@Controller
+@ApiIgnore
+public class Swagger2Controller {
+ private static final String DEFAULT_URL = "/v2/api-docs";
+ private static final Logger LOGGER = LoggerFactory.getLogger(Swagger2Controller.class);
+ private static final String HAL_MEDIA_TYPE = "application/hal+json";
+ private final String hostNameOverride;
+ private final DocumentationCache documentationCache;
+ private final ServiceModelToSwagger2Mapper mapper;
+ private final JsonSerializer jsonSerializer;
+
+ @Autowired
+ public Swagger2Controller(Environment environment, DocumentationCache documentationCache, ServiceModelToSwagger2Mapper mapper, JsonSerializer jsonSerializer) {
+ this.hostNameOverride = environment.getProperty("springfox.documentation.swagger.v2.host", "DEFAULT");
+ this.documentationCache = documentationCache;
+ this.mapper = mapper;
+ this.jsonSerializer = jsonSerializer;
+ }
+
+ @RequestMapping(
+ value = {DEFAULT_URL},
+ method = {RequestMethod.GET},
+ produces = {APPLICATION_JSON_VALUE, HAL_MEDIA_TYPE}
+ )
+ @PropertySourcedMapping(
+ value = "${springfox.documentation.swagger.v2.path}",
+ propertyKey = "springfox.documentation.swagger.v2.path"
+ )
+ @ResponseBody
+ public ResponseEntity getDocumentation(@RequestParam(value = "group",required = false) String swaggerGroup, HttpServletRequest servletRequest) {
+ String groupName = (String) Optional.ofNullable(swaggerGroup).orElse("default");
+ Documentation documentation = this.documentationCache.documentationByGroup(groupName);
+ if (documentation == null) {
+ LOGGER.warn("Unable to find specification for group {}", groupName);
+ return new ResponseEntity(HttpStatus.NOT_FOUND);
+ } else {
+ Swagger swagger = this.mapper.mapDocumentation(documentation);
+ UriComponents uriComponents = HostNameProvider.componentsFrom(servletRequest, swagger.getBasePath());
+ swagger.basePath(Strings.isNullOrEmpty(uriComponents.getPath()) ? "/" : uriComponents.getPath());
+ if (Strings.isNullOrEmpty(swagger.getHost())) {
+ swagger.host(this.hostName(uriComponents));
+ }
+ // 扩展
+ swagger = extend(swagger);
+
+ return new ResponseEntity(this.jsonSerializer.toJson(swagger), HttpStatus.OK);
+ }
+ }
+
+ private String hostName(UriComponents uriComponents) {
+ return getString(uriComponents, this.hostNameOverride);
+ }
+
+ private static String getString(UriComponents uriComponents, String hostNameOverride) {
+ if ("DEFAULT".equals(hostNameOverride)) {
+ String host = uriComponents.getHost();
+ int port = uriComponents.getPort();
+ return port > -1 ? String.format("%s:%d", host, port) : host;
+ } else {
+ return hostNameOverride;
+ }
+ }
+
+ private Swagger extend(Swagger swagger) {
+ // 响应返回参数增强
+ for (Map.Entry entry : swagger.getDefinitions().entrySet()) {
+ Model model = entry.getValue();
+ String key = entry.getKey();
+ if (key.contains("ApiResult") && !SwaggerUtil.getRealType(key).contains("ApiResult")) {
+ Map props = model.getProperties();
+ Property dataProp = props.get("data");
+ Property newProp = SwaggerUtil.getNewProp(dataProp, SwaggerUtil.getRealType(key), swagger.getDefinitions());
+ props.put("data", newProp);
+ }
+ }
+ return swagger;
+ }
+}
diff --git a/yshop-common/src/main/resources/META-INF/spring.factories b/yshop-common/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000..69507c53
--- /dev/null
+++ b/yshop-common/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,2 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+ co.yixiang.dozer.config.DozerMapperConfig
\ No newline at end of file
diff --git a/yshop-common/src/main/resources/dozer/bean-mappings.xml b/yshop-common/src/main/resources/dozer/bean-mappings.xml
new file mode 100644
index 00000000..323a656f
--- /dev/null
+++ b/yshop-common/src/main/resources/dozer/bean-mappings.xml
@@ -0,0 +1,5 @@
+
+
+
\ No newline at end of file
diff --git a/yshop-common/src/main/resources/dozer/global-configuration.xml b/yshop-common/src/main/resources/dozer/global-configuration.xml
new file mode 100644
index 00000000..8d514ab5
--- /dev/null
+++ b/yshop-common/src/main/resources/dozer/global-configuration.xml
@@ -0,0 +1,17 @@
+
+
+
+ yyyy-MM-dd HH:mm:ss
+ true
+ false
+
+
+
+
\ No newline at end of file
diff --git a/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java b/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java
index 5707eb04..9f4a26e6 100644
--- a/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java
+++ b/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java
@@ -36,14 +36,22 @@ public class GenUtil {
*/
private static List getAdminTemplateNames() {
List templateNames = new ArrayList<>();
- templateNames.add("Entity");
+ /*templateNames.add("Entity");
templateNames.add("Dto");
templateNames.add("Mapper");
templateNames.add("Controller");
templateNames.add("QueryCriteria");
templateNames.add("Service");
templateNames.add("ServiceImpl");
- templateNames.add("Repository");
+ templateNames.add("Repository");*/
+ templateNames.add("EntityP");
+ templateNames.add("DtoP");
+ templateNames.add("MapperP");
+ templateNames.add("ControllerP");
+ templateNames.add("QueryCriteriaP");
+ templateNames.add("ServiceP");
+ templateNames.add("ServiceImplP");
+ //templateNames.add("Repository");
return templateNames;
}
@@ -191,6 +199,8 @@ public class GenUtil {
genMap.put("changeClassName", changeClassName);
// 存在 Timestamp 字段
genMap.put("hasTimestamp",false);
+ // 存在 Images 字段
+ genMap.put("hasImages",false);
// 查询类中存在 Timestamp 字段
genMap.put("queryHasTimestamp",false);
// 存在 BigDecimal 字段
@@ -236,6 +246,10 @@ public class GenUtil {
// 存储大写开头的字段名
genMap.put("pkCapitalColName",capitalColumnName);
}
+ if("Images".equals(column.getFormType())){
+ // 存在 Images 字段
+ genMap.put("hasImages",true);
+ }
// 是否存在 Timestamp 类型的字段
if(TIMESTAMP.equals(colType)){
genMap.put("hasTimestamp",true);
@@ -331,30 +345,50 @@ public class GenUtil {
if ("Entity".equals(templateName)) {
return packagePath + "domain" + File.separator + className + ".java";
}
-
+ if ("EntityP".equals(templateName)) {
+ return packagePath + "domain" + File.separator + className + ".java";
+ }
if ("Controller".equals(templateName)) {
return packagePath + "rest" + File.separator + className + "Controller.java";
}
-
+ if ("ControllerP".equals(templateName)) {
+ return packagePath + "rest" + File.separator + className + "Controller.java";
+ }
if ("Service".equals(templateName)) {
return packagePath + "service" + File.separator + className + "Service.java";
}
+ if ("ServiceP".equals(templateName)) {
+ return packagePath + "service" + File.separator + className + "Service.java";
+ }
if ("ServiceImpl".equals(templateName)) {
return packagePath + "service" + File.separator + "impl" + File.separator + className + "ServiceImpl.java";
}
+ if ("ServiceImplP".equals(templateName)) {
+ return packagePath + "service" + File.separator + "impl" + File.separator + className + "ServiceImpl.java";
+ }
if ("Dto".equals(templateName)) {
return packagePath + "service" + File.separator + "dto" + File.separator + className + "Dto.java";
}
+ if ("DtoP".equals(templateName)) {
+ return packagePath + "service" + File.separator + "dto" + File.separator + className + "Dto.java";
+ }
+
if ("QueryCriteria".equals(templateName)) {
return packagePath + "service" + File.separator + "dto" + File.separator + className + "QueryCriteria.java";
}
+ if ("QueryCriteriaP".equals(templateName)) {
+ return packagePath + "service" + File.separator + "dto" + File.separator + className + "QueryCriteria.java";
+ }
if ("Mapper".equals(templateName)) {
return packagePath + "service" + File.separator + "mapper" + File.separator + className + "Mapper.java";
}
+ if ("MapperP".equals(templateName)) {
+ return packagePath + "service" + File.separator + "mapper" + File.separator + className + "Mapper.java";
+ }
if ("Repository".equals(templateName)) {
return packagePath + "repository" + File.separator + className + "Repository.java";
diff --git a/yshop-logging/pom.xml b/yshop-logging/pom.xml
index 5c955447..779becd8 100644
--- a/yshop-logging/pom.xml
+++ b/yshop-logging/pom.xml
@@ -18,5 +18,11 @@
yshop-common
2.1
+
+ co.yixiang
+ yshop-mproot
+ 2.1
+ compile
+
-
\ No newline at end of file
+
diff --git a/yshop-logging/src/main/java/co/yixiang/rest/LogController.java b/yshop-logging/src/main/java/co/yixiang/rest/LogController.java
index d6541149..56ee1daf 100644
--- a/yshop-logging/src/main/java/co/yixiang/rest/LogController.java
+++ b/yshop-logging/src/main/java/co/yixiang/rest/LogController.java
@@ -33,7 +33,7 @@ public class LogController {
@Log("导出数据")
@ApiOperation("导出数据")
@GetMapping(value = "/download")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','log:list')")
public void download(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
criteria.setLogType("INFO");
logService.download(logService.queryAll(criteria), response);
@@ -42,21 +42,21 @@ public class LogController {
@Log("导出错误数据")
@ApiOperation("导出错误数据")
@GetMapping(value = "/error/download")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','log:list')")
public void errorDownload(HttpServletResponse response, LogQueryCriteria criteria) throws IOException {
criteria.setLogType("ERROR");
logService.download(logService.queryAll(criteria), response);
}
@GetMapping
@ApiOperation("日志查询")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','log:list')")
public ResponseEntity getLogs(LogQueryCriteria criteria, Pageable pageable){
criteria.setLogType("INFO");
criteria.setType(0);
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
}
@GetMapping(value = "/mlogs")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','log:list')")
public ResponseEntity getApiLogs(LogQueryCriteria criteria, Pageable pageable){
criteria.setLogType("INFO");
criteria.setType(1);
@@ -72,7 +72,7 @@ public class LogController {
@GetMapping(value = "/error")
@ApiOperation("错误日志查询")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','logError:list')")
public ResponseEntity getErrorLogs(LogQueryCriteria criteria, Pageable pageable){
criteria.setLogType("ERROR");
return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK);
@@ -80,14 +80,14 @@ public class LogController {
@GetMapping(value = "/error/{id}")
@ApiOperation("日志异常详情查询")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','logError:detail')")
public ResponseEntity getErrorLogs(@PathVariable Long id){
return new ResponseEntity<>(logService.findByErrDetail(id), HttpStatus.OK);
}
@DeleteMapping(value = "/del/error")
@Log("删除所有ERROR日志")
@ApiOperation("删除所有ERROR日志")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','logError:remove')")
public ResponseEntity delAllByError(){
logService.delAllByError();
return new ResponseEntity<>(HttpStatus.OK);
@@ -96,7 +96,7 @@ public class LogController {
@DeleteMapping(value = "/del/info")
@Log("删除所有INFO日志")
@ApiOperation("删除所有INFO日志")
- @PreAuthorize("@el.check()")
+ @PreAuthorize("@el.check('admin','logInfo:remove')")
public ResponseEntity delAllByInfo(){
logService.delAllByInfo();
return new ResponseEntity<>(HttpStatus.OK);
diff --git a/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java b/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java
index f376fe76..cb5de98e 100644
--- a/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java
+++ b/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java
@@ -1,7 +1,7 @@
package co.yixiang.service.dto;
-import lombok.Data;
import co.yixiang.annotation.Query;
+import lombok.Data;
import java.sql.Timestamp;
import java.util.List;
diff --git a/yshop-mproot/pom.xml b/yshop-mproot/pom.xml
new file mode 100644
index 00000000..3a011a65
--- /dev/null
+++ b/yshop-mproot/pom.xml
@@ -0,0 +1,42 @@
+
+
+
+ yshop
+ co.yixiang
+ 2.1
+
+ 4.0.0
+ MyBatisPlus模块
+ yshop-mproot
+
+
+ 0.10.6
+ 3.2.0
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus-boot-starter.version}
+
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.2.5
+
+
+ mybatis-spring
+ org.mybatis
+
+
+ mybatis
+ org.mybatis
+
+
+
+
+
diff --git a/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java b/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java
new file mode 100644
index 00000000..3cce7ebf
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java
@@ -0,0 +1,73 @@
+package co.yixiang.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author Zheng Jie
+ * @date 2019-6-4 13:52:30
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Query {
+
+ // Dong ZhaoYang 2017/8/7 基本对象的属性名
+ String propName() default "";
+ // Dong ZhaoYang 2017/8/7 查询方式
+ Type type() default Type.EQUAL;
+
+ /**
+ * 连接查询的属性名,如User类中的dept
+ */
+ String joinName() default "";
+
+ /**
+ * 默认左连接
+ */
+ Join join() default Join.LEFT;
+
+ /**
+ * 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username")
+ */
+ String blurry() default "";
+
+ enum Type {
+ // jie 2019/6/4 相等
+ EQUAL
+ // Dong ZhaoYang 2017/8/7 大于等于
+ , GREATER_THAN
+ // Dong ZhaoYang 2017/8/7 小于等于
+ , LESS_THAN
+ // Dong ZhaoYang 2017/8/7 中模糊查询
+ , INNER_LIKE
+ // Dong ZhaoYang 2017/8/7 左模糊查询
+ , LEFT_LIKE
+ // Dong ZhaoYang 2017/8/7 右模糊查询
+ , RIGHT_LIKE
+ // Dong ZhaoYang 2017/8/7 小于
+ , LESS_THAN_NQ
+ // jie 2019/6/4 包含
+ , IN
+ // 不等于
+ ,NOT_EQUAL
+ // between
+ ,BETWEEN
+ // 不为空
+ ,NOT_NULL
+ // 查询时间
+ ,UNIX_TIMESTAMP
+ }
+
+ /**
+ * @author Zheng Jie
+ * 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询
+ */
+ enum Join {
+ /** jie 2019-6-4 13:18:30 左右连接 */
+ LEFT, RIGHT
+ }
+
+}
+
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java b/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java
new file mode 100644
index 00000000..0f510aa7
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java
@@ -0,0 +1,10 @@
+package co.yixiang.common.entity;
+
+import io.swagger.annotations.ApiModel;
+
+import java.io.Serializable;
+
+
+@ApiModel("BaseEntity")
+public abstract class BaseEntity implements Serializable{
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java b/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java
new file mode 100644
index 00000000..d2a768ca
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java
@@ -0,0 +1,10 @@
+package co.yixiang.common.mapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @param
+ * @author LionCity
+ */
+public interface CoreMapper extends BaseMapper {
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java b/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java
new file mode 100644
index 00000000..0367316e
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java
@@ -0,0 +1,8 @@
+package co.yixiang.common.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+
+
+public interface BaseService extends IService {
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/service/impl/BaseServiceImpl.java b/yshop-mproot/src/main/java/co/yixiang/common/service/impl/BaseServiceImpl.java
new file mode 100644
index 00000000..31d82d56
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/service/impl/BaseServiceImpl.java
@@ -0,0 +1,67 @@
+package co.yixiang.common.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import co.yixiang.common.service.BaseService;
+import co.yixiang.common.web.param.OrderQueryParam;
+import co.yixiang.common.web.param.QueryParam;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.PageHelper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.data.domain.Pageable;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author hupeng
+ * @since 2019-10-16
+ */
+@Slf4j
+@SuppressWarnings("unchecked")
+public abstract class BaseServiceImpl, T> extends ServiceImpl implements BaseService {
+
+ protected Page setPageParam(QueryParam queryParam) {
+ return setPageParam(queryParam,null);
+ }
+
+ protected Page setPageParam(QueryParam queryParam, OrderItem defaultOrder) {
+ Page page = new Page();
+ // 设置当前页码
+ page.setCurrent(queryParam.getPage());
+ // 设置页大小
+ page.setSize(queryParam.getLimit());
+ /**
+ * 如果是queryParam是OrderQueryParam,并且不为空,则使用前端排序
+ * 否则使用默认排序
+ */
+ if (queryParam instanceof OrderQueryParam){
+ OrderQueryParam orderQueryParam = (OrderQueryParam) queryParam;
+ List orderItems = orderQueryParam.getOrders();
+ if (CollectionUtil.isEmpty(orderItems)){
+ page.setOrders(Arrays.asList(defaultOrder));
+ }else{
+ page.setOrders(orderItems);
+ }
+ }else{
+ page.setOrders(Arrays.asList(defaultOrder));
+ }
+
+ return page;
+ }
+
+ protected void getPage(Pageable pageable) {
+ String order=null;
+ if(pageable.getSort()!=null){
+ order= pageable.getSort().toString();
+ order=order.replace(":","");
+ if("UNSORTED".equals(order)){
+ order="id desc";
+ }
+ }
+ PageHelper.startPage(pageable.getPageNumber()+1, pageable.getPageSize(),order);
+ }
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java b/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java
new file mode 100644
index 00000000..e6307e58
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java
@@ -0,0 +1,210 @@
+package co.yixiang.common.utils;
+
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
+import co.yixiang.common.web.vo.Paging;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import lombok.extern.slf4j.Slf4j;
+import co.yixiang.annotation.Query;
+
+import javax.persistence.criteria.*;
+import java.lang.reflect.Field;
+import java.sql.Wrapper;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.function.Consumer;
+
+/**
+ * @author Zheng Jie
+ * @date 2019-6-4 14:59:48
+ */
+@Slf4j
+@SuppressWarnings({"unchecked", "all"})
+public class QueryHelpPlus {
+
+ public static QueryWrapper getPredicate(R obj, Q query) {
+ QueryWrapper queryWrapper = new QueryWrapper();
+ if (query == null) {
+ return queryWrapper;
+ }
+ try {
+ List fields = getAllFields(query.getClass(), new ArrayList<>());
+ for (Field field : fields) {
+ boolean accessible = field.isAccessible();
+ field.setAccessible(true);
+ Query q = field.getAnnotation(Query.class);
+ if (q != null) {
+ String propName = q.propName();
+ String joinName = q.joinName();
+ String blurry = q.blurry();
+ String attributeName = isBlank(propName) ? field.getName() : propName;
+ attributeName = humpToUnderline(attributeName);
+ Class> fieldType = field.getType();
+ Object val = field.get(query);
+ if (ObjectUtil.isNull(val) || "".equals(val)) {
+ continue;
+ }
+ Join join = null;
+ // 模糊多字段
+ if (ObjectUtil.isNotEmpty(blurry)) {
+ String[] blurrys = blurry.split(",");
+ //queryWrapper.or();
+ queryWrapper.and(wrapper -> {
+ for (int i=0;i< blurrys.length;i++) {
+ String column = humpToUnderline(blurrys[i]);
+ //if(i!=0){
+ wrapper.or();
+ //}
+ wrapper.like(column, val.toString());
+ }
+ });
+ continue;
+ }
+ /*if (ObjectUtil.isNotEmpty(joinName)) {
+ String[] joinNames = joinName.split(">");
+ for (String name : joinNames) {
+ switch (q.join()) {
+ case LEFT:
+ if (ObjectUtil.isNotNull(join)) {
+ join = join.join(name, JoinType.LEFT);
+ } else {
+ join = root.join(name, JoinType.LEFT);
+ }
+ break;
+ case RIGHT:
+ if (ObjectUtil.isNotNull(join)) {
+ join = join.join(name, JoinType.RIGHT);
+ } else {
+ join = root.join(name, JoinType.RIGHT);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }*/
+ String finalAttributeName = attributeName;
+ switch (q.type()) {
+ case EQUAL:
+ //queryWrapper.and(wrapper -> wrapper.eq(finalAttributeName, val));
+ queryWrapper.eq(attributeName, val);
+ break;
+ case GREATER_THAN:
+ queryWrapper.ge(finalAttributeName, val);
+ break;
+ case LESS_THAN:
+ queryWrapper.le(finalAttributeName, val);
+ break;
+ case LESS_THAN_NQ:
+ queryWrapper.lt(finalAttributeName, val);
+ break;
+ case INNER_LIKE:
+ queryWrapper.like(finalAttributeName, val);
+ break;
+ case LEFT_LIKE:
+ queryWrapper.likeLeft(finalAttributeName, val);
+ break;
+ case RIGHT_LIKE:
+ queryWrapper.likeRight(finalAttributeName, val);
+ break;
+ case IN:
+ if (CollUtil.isNotEmpty((Collection) val)) {
+ queryWrapper.in(finalAttributeName, (Collection) val);
+ }
+ break;
+ case NOT_EQUAL:
+ queryWrapper.ne(finalAttributeName, val);
+ break;
+ case NOT_NULL:
+ queryWrapper.isNotNull(finalAttributeName);
+ break;
+ case BETWEEN:
+ List between = new ArrayList<>((List) val);
+ queryWrapper.between(finalAttributeName, between.get(0), between.get(1));
+ break;
+ case UNIX_TIMESTAMP:
+ List UNIX_TIMESTAMP = new ArrayList<>((List)val);
+ if(!UNIX_TIMESTAMP.isEmpty()){
+ SimpleDateFormat fm = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ long time1 = fm.parse(UNIX_TIMESTAMP.get(0).toString()).getTime()/1000;
+ long time2 = fm.parse(UNIX_TIMESTAMP.get(1).toString()).getTime()/1000;
+ queryWrapper.between(finalAttributeName, time1, time2);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ field.setAccessible(accessible);
+ }
+ } catch (Exception e) {
+ log.error(e.getMessage(), e);
+ }
+
+ return queryWrapper;
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Expression getExpression(String attributeName, Join join, Root root) {
+ if (ObjectUtil.isNotEmpty(join)) {
+ return join.get(attributeName);
+ } else {
+ return root.get(attributeName);
+ }
+ }
+
+ private static boolean isBlank(final CharSequence cs) {
+ int strLen;
+ if (cs == null || (strLen = cs.length()) == 0) {
+ return true;
+ }
+ for (int i = 0; i < strLen; i++) {
+ if (!Character.isWhitespace(cs.charAt(i))) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static List getAllFields(Class clazz, List fields) {
+ if (clazz != null) {
+ fields.addAll(Arrays.asList(clazz.getDeclaredFields()));
+ getAllFields(clazz.getSuperclass(), fields);
+ }
+ return fields;
+ }
+
+ /***
+ * 驼峰命名转为下划线命名
+ *
+ * @param para
+ * 驼峰命名的字符串
+ */
+
+ public static String humpToUnderline(String para) {
+ StringBuilder sb = new StringBuilder(para);
+ int temp = 0;//定位
+ if (!para.contains("_")) {
+ for (int i = 0; i < para.length(); i++) {
+ if (Character.isUpperCase(para.charAt(i))) {
+ sb.insert(i + temp, "_");
+ temp += 1;
+ }
+ }
+ }
+ return sb.toString();
+ }
+
+ public static void main(String[] args) {
+ QueryWrapper query = new QueryWrapper();
+ //query.or();
+ query.or(wrapper -> wrapper.eq("store_id", 1).or().eq("store_id", 2));
+ //query.like("a",1);
+ //query.or();
+ //query.like("b",2);
+ //query.and(wrapper->wrapper.eq("c",1));
+ query.eq("1", 1);
+
+ System.out.println(query.getSqlSegment());
+ }
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/web/param/OrderQueryParam.java b/yshop-mproot/src/main/java/co/yixiang/common/web/param/OrderQueryParam.java
new file mode 100644
index 00000000..b3a26266
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/web/param/OrderQueryParam.java
@@ -0,0 +1,34 @@
+package co.yixiang.common.web.param;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel("可排序查询参数对象")
+public abstract class OrderQueryParam extends QueryParam{
+ private static final long serialVersionUID = 57714391204790143L;
+
+ @ApiModelProperty(value = "排序")
+ private List orders;
+
+ public void defaultOrder(OrderItem orderItem){
+ this.defaultOrders(Arrays.asList(orderItem));
+ }
+
+ public void defaultOrders(List orderItems){
+ if (CollectionUtil.isEmpty(orderItems)){
+ return;
+ }
+ this.orders = orderItems;
+ }
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/web/param/QueryParam.java b/yshop-mproot/src/main/java/co/yixiang/common/web/param/QueryParam.java
new file mode 100644
index 00000000..03dbc441
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/web/param/QueryParam.java
@@ -0,0 +1,38 @@
+package co.yixiang.common.web.param;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+@Data
+@ApiModel("查询参数对象")
+public abstract class QueryParam implements Serializable{
+ private static final long serialVersionUID = -3263921252635611410L;
+
+ @ApiModelProperty(value = "页码,默认为1")
+ private Integer page =1;
+ @ApiModelProperty(value = "页大小,默认为10")
+ private Integer limit = 10;
+ @ApiModelProperty(value = "搜索字符串")
+ private String keyword;
+
+ public void setCurrent(Integer current) {
+ if (current == null || current <= 0){
+ this.page = 1;
+ }else{
+ this.page = current;
+ }
+ }
+
+ public void setSize(Integer size) {
+ if (size == null || size <= 0){
+ this.limit = 10;
+ }else{
+ this.limit = size;
+ }
+ }
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/common/web/vo/Paging.java b/yshop-mproot/src/main/java/co/yixiang/common/web/vo/Paging.java
new file mode 100644
index 00000000..169caa02
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/common/web/vo/Paging.java
@@ -0,0 +1,60 @@
+package co.yixiang.common.web.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+
+
+@ApiModel("分页")
+@SuppressWarnings("unchecked")
+public class Paging implements Serializable {
+ private static final long serialVersionUID = -1683800405530086022L;
+
+ @ApiModelProperty("总行数")
+ @JSONField(name = "total")
+ @JsonProperty("total")
+ private long total = 0;
+
+ @ApiModelProperty("数据列表")
+ @JSONField(name = "records")
+ @JsonProperty("records")
+ private List records = Collections.emptyList();
+
+ public Paging() {
+ }
+
+ public Paging(IPage page) {
+ this.total = page.getTotal();
+ this.records = page.getRecords();
+ }
+
+ public long getTotal() {
+ return total;
+ }
+
+ public void setTotal(long total) {
+ this.total = total;
+ }
+
+ public List getRecords() {
+ return records;
+ }
+
+ public void setRecords(List records) {
+ this.records = records;
+ }
+
+ @Override
+ public String toString() {
+ return "Paging{" +
+ "total=" + total +
+ ", records=" + records +
+ '}';
+ }
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java b/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java
new file mode 100644
index 00000000..37bd9221
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java
@@ -0,0 +1,91 @@
+package co.yixiang.config;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-04-10 15:47
+ * @description:自动注入时间处理
+ * @modified By:
+ * @version:
+ */
+
+import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.reflection.MetaObject;
+import org.springframework.stereotype.Component;
+
+import java.sql.Timestamp;
+import java.util.Date;
+
+/**
+ * 处理新增和更新的基础数据填充,配合BaseEntity和MyBatisPlusConfig使用
+ */
+@Slf4j
+@Component
+public class MetaHandler implements MetaObjectHandler {
+
+
+ /**
+ * 新增数据执行
+ *
+ * @param metaObject
+ */
+ @Override
+ public void insertFill(MetaObject metaObject) {
+ try {
+ Timestamp time=new Timestamp(System.currentTimeMillis());
+ if (metaObject.hasSetter("createTime")) {
+ log.debug("自动插入 createTime");
+ this.setFieldValByName("createTime", time, metaObject);
+ }
+ if (metaObject.hasSetter("updateTime")) {
+ log.debug("自动插入 updateTime");
+ this.setFieldValByName("updateTime", time, metaObject);
+ }
+ if (metaObject.hasSetter("createDate")) {
+ log.debug("自动插入 createDate");
+ this.setFieldValByName("createDate", time, metaObject);
+ }
+ if (metaObject.hasSetter("updateDate")) {
+ log.debug("自动插入 updateDate");
+ this.setFieldValByName("updateDate", time, metaObject);
+ }
+ if (metaObject.hasSetter("delFlag")) {
+ log.debug("自动插入 delFlag");
+ this.setFieldValByName("delFlag", false, metaObject);
+ }
+ } catch (Exception e) {
+ log.error("自动注入失败:{}", e);
+ }
+ }
+
+ /**
+ * 更新数据执行
+ *
+ * @param metaObject
+ */
+ @Override
+ public void updateFill(MetaObject metaObject) {
+ try {
+ Timestamp time=new Timestamp(System.currentTimeMillis());
+ if (metaObject.hasSetter("updateTime")) {
+ log.debug("自动插入 updateTime");
+ this.setFieldValByName("updateTime", time, metaObject);
+ }
+ if (metaObject.hasSetter("updateDate")) {
+ log.debug("自动插入 updateDate");
+ this.setFieldValByName("updateDate", time, metaObject);
+ }
+ if (metaObject.hasSetter("delFlag")) {
+ log.debug("自动插入 delFlag");
+ this.setFieldValByName("delFlag", null, metaObject);
+ }
+ if (metaObject.hasSetter("createTime")) {
+ log.debug("自动插入 createTime");
+ this.setFieldValByName("createTime", null, metaObject);
+ }
+ } catch (Exception e) {
+ log.error("自动注入失败:{}", e);
+ }
+ }
+
+}
diff --git a/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java b/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java
new file mode 100644
index 00000000..54dd2e60
--- /dev/null
+++ b/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java
@@ -0,0 +1,35 @@
+package co.yixiang.config;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-04-10 15:11
+ * @description:MybatisConfig
+ * @modified By:
+ * @version:
+ */
+
+import com.github.pagehelper.PageHelper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+@Configuration
+public class MybatisConfig {
+ /**
+ * 配置mybatis的分页插件pageHelper
+ * @return
+ */
+ @Bean
+ public PageHelper pageHelper(){
+ PageHelper pageHelper = new PageHelper();
+ Properties properties = new Properties();
+ properties.setProperty("offsetAsPageNum","true");
+ properties.setProperty("rowBoundsWithCount","true");
+ properties.setProperty("reasonable","true");
+ //配置mysql数据库的方言
+ properties.setProperty("dialect","mysql");
+ pageHelper.setProperties(properties);
+ return pageHelper;
+ }
+}
\ No newline at end of file
diff --git a/yshop-mproot/src/main/resources/META-INF/spring.factories b/yshop-mproot/src/main/resources/META-INF/spring.factories
new file mode 100644
index 00000000..66132c84
--- /dev/null
+++ b/yshop-mproot/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,3 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+ co.yixiang.config.MetaHandler,\
+ co.yixiang.config.MybatisConfig
\ No newline at end of file
diff --git a/yshop-system/pom.xml b/yshop-system/pom.xml
index f28dc126..511ec612 100644
--- a/yshop-system/pom.xml
+++ b/yshop-system/pom.xml
@@ -29,14 +29,16 @@
-
-
co.yixiang
yshop-shop
2.1
-
+
+ co.yixiang
+ yshop-mproot
+ 2.1
+
co.yixiang
yshop-mp
diff --git a/yshop-system/src/main/java/co/yixiang/AppRun.java b/yshop-system/src/main/java/co/yixiang/AppRun.java
index 5330a719..786a6dc4 100644
--- a/yshop-system/src/main/java/co/yixiang/AppRun.java
+++ b/yshop-system/src/main/java/co/yixiang/AppRun.java
@@ -1,5 +1,5 @@
package co.yixiang;
-
+import co.yixiang.modules.activity.service.YxStoreCouponUserService;
import co.yixiang.annotation.AnonymousAccess;
import co.yixiang.utils.SpringContextHolder;
import org.springframework.boot.SpringApplication;
diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java
index 5c98ec37..3cb9265f 100644
--- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java
+++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java
@@ -44,7 +44,7 @@ public class RedisServiceImpl implements RedisService {
continue;
}
DataType dataType = redisTemplate.type(s.toString());
- if(!dataType.code().equals("string")) continue;
+ if(!"string".equals(dataType.code())) continue;
RedisVo redisVo = new RedisVo(s.toString(),redisTemplate.opsForValue().get(s.toString()).toString());
redisVos.add(redisVo);
}
diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java b/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java
index 74fcb6bb..20e8eb37 100644
--- a/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java
+++ b/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java
@@ -109,6 +109,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/swagger-resources/**").permitAll()
.antMatchers("/webjars/**").permitAll()
.antMatchers("/*/api-docs").permitAll()
+ .antMatchers("/v2/api-docs-ext").permitAll()
+ //.antMatchers("/api/wxmp/**").permitAll()
+
// 文件
.antMatchers("/avatar/**").permitAll()
.antMatchers("/file/**").permitAll()
diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/rest/AuthController.java b/yshop-system/src/main/java/co/yixiang/modules/security/rest/AuthController.java
index 5be70ee0..ff7ee16b 100644
--- a/yshop-system/src/main/java/co/yixiang/modules/security/rest/AuthController.java
+++ b/yshop-system/src/main/java/co/yixiang/modules/security/rest/AuthController.java
@@ -122,7 +122,12 @@ public class AuthController {
// 几位数运算,默认是两位
captcha.setLen(2);
// 获取运算的结果
- String result = captcha.text();
+ String result ="";
+ try {
+ result = new Double(Double.parseDouble(captcha.text())).intValue()+"";
+ }catch (Exception e){
+ result = captcha.text();
+ }
String uuid = properties.getCodeKey() + IdUtil.simpleUUID();
// 保存
redisUtils.set(uuid, result, expiration, TimeUnit.MINUTES);
diff --git a/yshop-system/src/main/resources/config/application-dev.yml b/yshop-system/src/main/resources/config/application-dev.yml
index 655187ac..91309795 100644
--- a/yshop-system/src/main/resources/config/application-dev.yml
+++ b/yshop-system/src/main/resources/config/application-dev.yml
@@ -1,10 +1,12 @@
#配置数据源
spring:
+ application:
+ name: yshop-system
datasource:
druid:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
- url: jdbc:log4jdbc:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
+ url: jdbc:log4jdbc:mysql://localhost:3306/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull
username: root
password: root
@@ -77,14 +79,25 @@ generator:
swagger:
enabled: true
title: yshop商城管理后台API
- serverUrl: http://localhost:8000
- version: 2.0
+ serverUrl:
+ version: 2.1
# 文件存储路径
file:
- path: D:\yshop\file\
- avatar: D:\yshop\avatar\
+ path: D:\upload\file\
+ avatar: D:\upload\avatar\
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
- localUrl: http://localhost:8000
+ localUrl:
+
+mybatis-plus:
+ check-config-location: true
+ configuration:
+ map-underscore-to-camel-case: true
+ global-config:
+ db-config:
+ id-type: auto
+ logic-delete-value: 1
+ logic-not-delete-value: 0
+ mapper-locations: classpath*:mapper/**/*Mapper.xml
diff --git a/yshop-system/src/main/resources/config/application-prod.yml b/yshop-system/src/main/resources/config/application-prod.yml
index 73bf43b3..a97916fb 100644
--- a/yshop-system/src/main/resources/config/application-prod.yml
+++ b/yshop-system/src/main/resources/config/application-prod.yml
@@ -1,12 +1,14 @@
#配置数据源
spring:
+ application:
+ name: yshop-system
datasource:
druid:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
- url: jdbc:log4jdbc:mysql://localhost:3306/yshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
- username: yshop
- password:
+ url: jdbc:log4jdbc:mysql://localhost:3366/yxshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false
+ username: root
+ password: root
# 初始化配置
initial-size: 3
@@ -47,7 +49,7 @@ spring:
database: 0
host: 127.0.0.1
port: 6379
- password:
+ password: root
#连接超时时间
timeout: 5000
@@ -80,14 +82,29 @@ generator:
swagger:
enabled: true
title: yshop商城管理后台API
- serverUrl: http://localhost:8000
+ serverUrl: http://127.0.0.1:8000
version: 2.1
# 文件存储路径
file:
- path: /home/yshop/file/
- avatar: /home/yshop/avatar/
+ path: D:\upload\file\
+ avatar: D:\upload\avatar\
# 文件大小 /M
maxSize: 100
avatarMaxSize: 5
- localUrl:
\ No newline at end of file
+ localUrl: https://cdn.jidanguo10.com
+mybatis-plus:
+ check-config-location: true
+ configuration:
+ map-underscore-to-camel-case: true
+ global-config:
+ db-config:
+ id-type: id_worker
+ logic-delete-value: 1
+ logic-not-delete-value: 0
+ mapper-locations: classpath*:mapper/**/*Mapper.xml
+
+yshop:
+ hApi: https://127.0.0.1:8000
+ wechatCode: http://127.0.0.1:8000/upload/qrcode_for_gh_2ac8f422a79f_258.jpg
+ miniAppID:
diff --git a/yshop-system/src/main/resources/config/application.yml b/yshop-system/src/main/resources/config/application.yml
index 51d0b688..9de4c892 100644
--- a/yshop-system/src/main/resources/config/application.yml
+++ b/yshop-system/src/main/resources/config/application.yml
@@ -58,4 +58,12 @@ yshop:
enable: true
appId: 1607734
appKey: 81f43a2e-f504-45c4-9b54-2637d59f8190
- apiUrl: http://127.0.0.1:8009/api
\ No newline at end of file
+ apiUrl: https://zapi.jidanguo10.com/api
+
+
+# PageHelper分页插件
+pagehelper:
+ helperDialect: mysql
+ reasonable: true
+ supportMethodsArguments: true
+ params: count=countSql
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/logback.xml b/yshop-system/src/main/resources/logback.xml
index f8639eb5..febb70eb 100644
--- a/yshop-system/src/main/resources/logback.xml
+++ b/yshop-system/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
yshop
-
+
@@ -12,9 +12,60 @@
+
+
+ ${log.path}/debug.log
+
+ ${log.path}/%d{yyyy-MM}/debug.%d{yyyy-MM-dd}.%i.log.gz
+ 50MB
+ 30
+
+
+ %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
+ UTF-8
+
+
+
+
+
+ ${log.path}/error.log
+
+ ${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz
+ 50MB
+ 30
+
+
+ %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
+ UTF-8
+
+
+ ERROR
+
+
+
+
+
+ ${log.path}/info.log
+
+ ${log.path}/%d{yyyy-MM}/info.%d{yyyy-MM-dd}.%i.log.gz
+ 50MB
+ 30
+
+
+ %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n
+ UTF-8
+
+
+ INFO
+
+
+
+
+
+
diff --git a/yshop-system/src/main/resources/template/generator/admin/ControllerP.ftl b/yshop-system/src/main/resources/template/generator/admin/ControllerP.ftl
new file mode 100644
index 00000000..c1118b93
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/ControllerP.ftl
@@ -0,0 +1,77 @@
+package ${package}.rest;
+import java.util.Arrays;
+import co.yixiang.dozer.service.IGenerator;
+import lombok.AllArgsConstructor;
+import co.yixiang.aop.log.Log;
+import ${package}.domain.${className};
+import ${package}.service.${className}Service;
+import ${package}.service.dto.${className}QueryCriteria;
+import ${package}.service.dto.${className}Dto;
+import org.springframework.data.domain.Pageable;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.*;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@AllArgsConstructor
+@Api(tags = "${apiAlias}管理")
+@RestController
+@RequestMapping("/api/${changeClassName}")
+public class ${className}Controller {
+
+ private final ${className}Service ${changeClassName}Service;
+ private final IGenerator generator;
+
+
+ @Log("导出数据")
+ @ApiOperation("导出数据")
+ @GetMapping(value = "/download")
+ @PreAuthorize("@el.check('admin','${changeClassName}:list')")
+ public void download(HttpServletResponse response, ${className}QueryCriteria criteria) throws IOException {
+ ${changeClassName}Service.download(generator.convert(${changeClassName}Service.queryAll(criteria), ${className}Dto.class), response);
+ }
+
+ @GetMapping
+ @Log("查询${apiAlias}")
+ @ApiOperation("查询${apiAlias}")
+ @PreAuthorize("@el.check('admin','${changeClassName}:list')")
+ public ResponseEntity get${className}s(${className}QueryCriteria criteria, Pageable pageable){
+ return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK);
+ }
+
+ @PostMapping
+ @Log("新增${apiAlias}")
+ @ApiOperation("新增${apiAlias}")
+ @PreAuthorize("@el.check('admin','${changeClassName}:add')")
+ public ResponseEntity create(@Validated @RequestBody ${className} resources){
+ return new ResponseEntity<>(${changeClassName}Service.save(resources),HttpStatus.CREATED);
+ }
+
+ @PutMapping
+ @Log("修改${apiAlias}")
+ @ApiOperation("修改${apiAlias}")
+ @PreAuthorize("@el.check('admin','${changeClassName}:edit')")
+ public ResponseEntity update(@Validated @RequestBody ${className} resources){
+ ${changeClassName}Service.updateById(resources);
+ return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+ }
+
+ @Log("删除${apiAlias}")
+ @ApiOperation("删除${apiAlias}")
+ @PreAuthorize("@el.check('admin','${changeClassName}:del')")
+ @DeleteMapping
+ public ResponseEntity deleteAll(@RequestBody ${pkColumnType}[] ids) {
+ Arrays.asList(ids).forEach(id->{
+ ${changeClassName}Service.removeById(id);
+ });
+ return new ResponseEntity<>(HttpStatus.OK);
+ }
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/DtoP.ftl b/yshop-system/src/main/resources/template/generator/admin/DtoP.ftl
new file mode 100644
index 00000000..3cf99bb5
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/DtoP.ftl
@@ -0,0 +1,39 @@
+package ${package}.service.dto;
+
+import lombok.Data;
+<#if hasTimestamp>
+import java.sql.Timestamp;
+#if>
+<#if hasBigDecimal>
+import java.math.BigDecimal;
+#if>
+import java.io.Serializable;
+<#if !auto && pkColumnType == 'Long'>
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+#if>
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@Data
+public class ${className}Dto implements Serializable {
+<#if columns??>
+ <#list columns as column>
+
+ <#if column.remark != ''>
+ /** ${column.remark} */
+ #if>
+ <#if column.columnKey = 'PRI'>
+ <#if !auto && pkColumnType = 'Long'>
+ /** 防止精度丢失 */
+ @JsonSerialize(using= ToStringSerializer.class)
+ #if>
+ #if>
+ <#if column.changeColumnName != 'delFlag'>
+ private ${column.columnType} ${column.changeColumnName};
+ #if>
+ #list>
+#if>
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/EntityP.ftl b/yshop-system/src/main/resources/template/generator/admin/EntityP.ftl
new file mode 100644
index 00000000..b52caccb
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/EntityP.ftl
@@ -0,0 +1,80 @@
+package ${package}.domain;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.bean.copier.CopyOptions;
+import javax.persistence.*;
+<#if isNotNullColumns??>
+import javax.validation.constraints.*;
+#if>
+<#if hasDateAnnotation>
+import javax.persistence.Entity;
+import javax.persistence.Table;
+import org.hibernate.annotations.*;
+#if>
+<#if hasTimestamp>
+import java.sql.Timestamp;
+#if>
+<#if hasBigDecimal>
+import java.math.BigDecimal;
+#if>
+import java.io.Serializable;
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@Entity
+@Data
+@Table(name="${tableName}")
+public class ${className} implements Serializable {
+<#if columns??>
+ <#list columns as column>
+
+ <#if column.remark != ''>
+ /** ${column.remark} */
+ #if>
+ <#if column.columnKey = 'PRI'>
+ @Id
+ <#if auto>
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ #if>
+ #if>
+ @Column(name = "${column.columnName}"<#if column.columnKey = 'UNI'>,unique = true#if><#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false#if>)
+ <#if column.istNotNull && column.columnKey != 'PRI'>
+ <#if column.columnType = 'String'>
+ @NotBlank
+ <#else>
+ @NotNull
+ #if>
+ #if>
+ <#if column.dateAnnotation??>
+ <#if column.dateAnnotation = 'CreationTimestamp'>
+ @CreationTimestamp
+ <#else>
+ @UpdateTimestamp
+ #if>
+ #if>
+ <#if column.changeColumnName = 'updateTime'|| column.changeColumnName = 'updateDate'>
+ @TableField(fill= FieldFill.INSERT_UPDATE)
+ #if>
+ <#if column.changeColumnName = 'createTime' || column.changeColumnName = 'createDate'>
+ @TableField(fill= FieldFill.INSERT)
+ #if>
+ <#if column.changeColumnName = 'delFlag'>
+ @TableLogic
+ @TableField(fill=FieldFill.INSERT_UPDATE)
+ private Boolean ${column.changeColumnName};
+ <#else>
+ private ${column.columnType} ${column.changeColumnName};
+ #if>
+
+ #list>
+#if>
+
+ public void copy(${className} source){
+ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
+ }
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/MapperP.ftl b/yshop-system/src/main/resources/template/generator/admin/MapperP.ftl
new file mode 100644
index 00000000..9a3b3b41
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/MapperP.ftl
@@ -0,0 +1,16 @@
+package ${package}.service.mapper;
+
+import co.yixiang.common.mapper.CoreMapper;
+import ${package}.domain.${className};
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@Repository
+@Mapper
+public interface ${className}Mapper extends CoreMapper<${className}> {
+
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/QueryCriteriaP.ftl b/yshop-system/src/main/resources/template/generator/admin/QueryCriteriaP.ftl
new file mode 100644
index 00000000..20d5f854
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/QueryCriteriaP.ftl
@@ -0,0 +1,65 @@
+package ${package}.service.dto;
+
+import lombok.Data;
+<#if queryHasTimestamp>
+import java.sql.Timestamp;
+#if>
+<#if queryHasBigDecimal>
+import java.math.BigDecimal;
+#if>
+<#if betweens??>
+import java.util.List;
+#if>
+<#if queryColumns??>
+import co.yixiang.annotation.Query;
+#if>
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@Data
+public class ${className}QueryCriteria{
+<#if queryColumns??>
+ <#list queryColumns as column>
+
+<#if column.queryType = '='>
+ /** 精确 */
+ @Query
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+<#if column.queryType = 'Like'>
+ /** 模糊 */
+ @Query(type = Query.Type.INNER_LIKE)
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+<#if column.queryType = '!='>
+ /** 不等于 */
+ @Query(type = Query.Type.NOT_EQUAL)
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+<#if column.queryType = 'NotNull'>
+ /** 不为空 */
+ @Query(type = Query.Type.NOT_NULL)
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+<#if column.queryType = '>='>
+ /** 大于等于 */
+ @Query(type = Query.Type.GREATER_THAN)
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+<#if column.queryType = '<='>
+ /** 小于等于 */
+ @Query(type = Query.Type.LESS_THAN)
+ private ${column.columnType} ${column.changeColumnName};
+#if>
+ #list>
+#if>
+<#if betweens??>
+ <#list betweens as column>
+ /** BETWEEN */
+ @Query(type = Query.Type.BETWEEN)
+ private List<${column.columnType}> createTime;
+ #list>
+#if>
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/ServiceImplP.ftl b/yshop-system/src/main/resources/template/generator/admin/ServiceImplP.ftl
new file mode 100644
index 00000000..2e8e2d8b
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/ServiceImplP.ftl
@@ -0,0 +1,99 @@
+package ${package}.service.impl;
+
+import ${package}.domain.${className};
+<#if columns??>
+ <#list columns as column>
+ <#if column.columnKey = 'UNI'>
+ <#if column_index = 1>
+import co.yixiang.exception.EntityExistException;
+ #if>
+ #if>
+ #list>
+#if>
+import co.yixiang.common.service.impl.BaseServiceImpl;
+import lombok.AllArgsConstructor;
+import co.yixiang.dozer.service.IGenerator;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import co.yixiang.common.utils.QueryHelpPlus;
+import co.yixiang.utils.ValidationUtil;
+import co.yixiang.utils.FileUtil;
+import ${package}.service.${className}Service;
+import ${package}.service.dto.${className}Dto;
+import ${package}.service.dto.${className}QueryCriteria;
+import ${package}.service.mapper.${className}Mapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+<#if !auto && pkColumnType = 'Long'>
+import cn.hutool.core.lang.Snowflake;
+import cn.hutool.core.util.IdUtil;
+#if>
+<#if !auto && pkColumnType = 'String'>
+import cn.hutool.core.util.IdUtil;
+#if>
+// 默认不使用缓存
+//import org.springframework.cache.annotation.CacheConfig;
+//import org.springframework.cache.annotation.CacheEvict;
+//import org.springframework.cache.annotation.Cacheable;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import co.yixiang.utils.PageUtil;
+import co.yixiang.utils.QueryHelp;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+@Service
+@AllArgsConstructor
+//@CacheConfig(cacheNames = "${changeClassName}")
+@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
+public class ${className}ServiceImpl extends BaseServiceImpl<${className}Mapper, ${className}> implements ${className}Service {
+
+ private final IGenerator generator;
+
+ @Override
+ //@Cacheable
+ public Map queryAll(${className}QueryCriteria criteria, Pageable pageable) {
+ getPage(pageable);
+ PageInfo<${className}> page = new PageInfo<>(queryAll(criteria));
+ Map map = new LinkedHashMap<>(2);
+ map.put("content", generator.convert(page.getList(), ${className}Dto.class));
+ map.put("totalElements", page.getTotal());
+ return map;
+ }
+
+
+ @Override
+ //@Cacheable
+ public List<${className}> queryAll(${className}QueryCriteria criteria){
+ return baseMapper.selectList(QueryHelpPlus.getPredicate(${className}.class, criteria));
+ }
+
+
+ @Override
+ public void download(List<${className}Dto> all, HttpServletResponse response) throws IOException {
+ List> list = new ArrayList<>();
+ for (${className}Dto ${changeClassName} : all) {
+ Map map = new LinkedHashMap<>();
+ <#list columns as column>
+ <#if column.columnKey != 'PRI'>
+ <#if column.remark != ''>
+ map.put("${column.remark}", ${changeClassName}.get${column.capitalColumnName}());
+ <#else>
+ map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}());
+ #if>
+ #if>
+ #list>
+ list.add(map);
+ }
+ FileUtil.downloadExcel(list, response);
+ }
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/admin/ServiceP.ftl b/yshop-system/src/main/resources/template/generator/admin/ServiceP.ftl
new file mode 100644
index 00000000..b63d3149
--- /dev/null
+++ b/yshop-system/src/main/resources/template/generator/admin/ServiceP.ftl
@@ -0,0 +1,40 @@
+package ${package}.service;
+import co.yixiang.common.service.BaseService;
+import ${package}.domain.${className};
+import ${package}.service.dto.${className}Dto;
+import ${package}.service.dto.${className}QueryCriteria;
+import org.springframework.data.domain.Pageable;
+import java.util.Map;
+import java.util.List;
+import java.io.IOException;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+* @author ${author}
+* @date ${date}
+*/
+public interface ${className}Service extends BaseService<${className}>{
+
+/**
+ * 查询数据分页
+ * @param criteria 条件
+ * @param pageable 分页参数
+ * @return Map
+ */
+ Map queryAll(${className}QueryCriteria criteria, Pageable pageable);
+
+ /**
+ * 查询所有数据不分页
+ * @param criteria 条件参数
+ * @return List<${className}Dto>
+ */
+ List<${className}> queryAll(${className}QueryCriteria criteria);
+
+ /**
+ * 导出数据
+ * @param all 待导出的数据
+ * @param response /
+ * @throws IOException /
+ */
+ void download(List<${className}Dto> all, HttpServletResponse response) throws IOException;
+}
\ No newline at end of file
diff --git a/yshop-system/src/main/resources/template/generator/front/index.ftl b/yshop-system/src/main/resources/template/generator/front/index.ftl
index 1d7f98d4..8295620b 100644
--- a/yshop-system/src/main/resources/template/generator/front/index.ftl
+++ b/yshop-system/src/main/resources/template/generator/front/index.ftl
@@ -61,6 +61,15 @@
<#else>
未设置字典,请手动设置 Select
#if>
+ <#elseif column.formType = 'Imges'>
+
<#else>
#if>
@@ -78,25 +87,33 @@
<#if columns??>
- <#list columns as column>
- <#if column.columnShow>
- <#if column.dictName??>
+ <#list columns as column>
+ <#if column.columnShow>
+ <#if column.dictName??>
{{ dict.label.${column.dictName}[scope.row.${column.changeColumnName}] }}
- <#elseif column.columnType != 'Timestamp'>
+ <#elseif column.formType = 'Imges'>
+
+
+
+
+
+
+
+ <#elseif column.columnType != 'Timestamp'>
- <#else>
+ <#else>
{{ parseTime(scope.row.${column.changeColumnName}) }}
- #if>
- #if>
- #list>
+ #if>
+ #if>
+ #list>
#if>
@@ -120,19 +137,21 @@ import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
+<#if hasImages??>import MaterialList from "@/components/material";#if>
// crud交由presenter持有
const defaultCrud = CRUD({ title: '${apiAlias}', url: 'api/${changeClassName}', sort: '${pkChangeColName},desc', crudMethod: { ...crud${className} }})
const defaultForm = { <#if columns??><#list columns as column>${column.changeColumnName}: null<#if column_has_next>, #if>#list>#if> }
export default {
name: '${className}',
- components: { pagination, crudOperation, rrOperation, udOperation },
+ components: { pagination, crudOperation, rrOperation, udOperation <#if hasImages??>,MaterialList#if>},
mixins: [presenter(defaultCrud), header(), form(defaultForm), crud()],
<#if hasDict>
dicts: [<#if hasDict??><#list dicts as dict>'${dict}'<#if dict_has_next>, #if>#list>#if>],
#if>
data() {
return {
+ <#if columns??><#list columns as column><#if column.formShow><#if column.formType = 'Imges'>${column.changeColumnName}Arr:[],#if>#if>#list>#if>
permission: {
add: ['admin', '${changeClassName}:add'],
edit: ['admin', '${changeClassName}:edit'],
@@ -161,6 +180,21 @@ export default {
#if>
}
},
+ watch: {
+ <#if columns??>
+ <#list columns as column>
+ <#if column.formShow>
+ <#if column.formType = 'Imges'>
+ "${column.changeColumnName}Arr":function(val) {
+ if (val) {
+ this.form.${column.changeColumnName} = val.join(",");
+ }
+ },
+ #if>
+ #if>
+ #list>
+ #if>
+ },
methods: {
// 获取数据前设置好接口地址
[CRUD.HOOK.beforeRefresh]() {
@@ -168,14 +202,52 @@ export default {
const query = this.query
if (query.type && query.value) {
this.crud.params[query.type] = query.value
+ }else{
+ <#if queryColumns??>
+ <#list queryColumns as column>
+ delete this.crud.params.${column.changeColumnName}
+ #list>
+ #if>
}
#if>
return true
- }
+ }, // 新增与编辑前做的操作
+ [CRUD.HOOK.afterToCU](crud, form) {
+ <#if columns??>
+ <#list columns as column>
+ <#if column.formShow>
+ <#if column.formType = 'Imges'>
+ if (form.${column.changeColumnName} && form.id) {
+ this.${column.changeColumnName}Arr = form.${column.changeColumnName}.split(",");
+ }else{
+ this.${column.changeColumnName}Arr=[]
+ }
+ #if>
+ #if>
+ #list>
+ #if>
+ },
}
}
+
+
+
diff --git a/yshop-system/src/test/java/co/yixiang/Api_java_demo.java b/yshop-system/src/test/java/co/yixiang/Api_java_demo.java
new file mode 100644
index 00000000..c5d9431a
--- /dev/null
+++ b/yshop-system/src/test/java/co/yixiang/Api_java_demo.java
@@ -0,0 +1,538 @@
+package co.yixiang;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-04-01 10:47
+ * @description:飞鹅打印机
+ * @modified By:
+ * @version: V1.0
+ */
+public class Api_java_demo {
+ public static final String URL = "http://api.feieyun.cn/Api/Open/";//不需要修改
+
+ public static final String USER = "18948217680@163.com";//*必填*:账号名
+ public static final String UKEY = "Fg4Nb6sykhK6wJDj";//*必填*: 飞鹅云后台注册账号后生成的UKEY 【备注:这不是填打印机的KEY】
+ public static final String SN = "918502791";//*必填*:打印机编号,必须要在管理后台里添加打印机或调用API接口添加之后,才能调用API
+
+
+ //**********测试时,打开下面注释掉方法的即可,更多接口文档信息,请访问官网开放平台查看**********
+ public static void main(String[] args) throws Exception{
+ //==================添加打印机接口(支持批量)==================
+ //***返回值JSON字符串***
+ //正确例子:{"msg":"ok","ret":0,"data":{"ok":["sn#key#remark#carnum","316500011#abcdefgh#快餐前台"],"no":["316500012#abcdefgh#快餐前台#13688889999 (错误:识别码不正确)"]},"serverExecutedTime":3}
+ //错误:{"msg":"参数错误 : 该帐号未注册.","ret":-2,"data":null,"serverExecutedTime":37}
+
+ //提示:打印机编号(必填) # 打印机识别码(必填) # 备注名称(选填) # 流量卡号码(选填),多台打印机请换行(\n)添加新打印机信息,每次最多100行(台)。
+// String snlist = "sn1#key1#remark1#carnum1\nsn2#key2#remark2#carnum2";
+// String method = addprinter(snlist);
+// System.out.println(method);
+
+
+
+ //==================方法1.小票机打印订单接口==================
+ //***返回值JSON字符串***
+ //成功:{"msg":"ok","ret":0,"data":"xxxxxxx_xxxxxxxx_xxxxxxxx","serverExecutedTime":5}
+ //失败:{"msg":"错误描述","ret":非0,"data":"null","serverExecutedTime":5}
+
+ String method1 = print(SN);//该接口只能是小票机使用,如购买的是标签机请使用下面方法2,调用打印
+ System.out.println(method1);
+
+
+
+ //==================方法2.标签机专用打印订单接口==================
+ //***返回值JSON字符串***
+ //成功:{"msg":"ok","ret":0,"data":"xxxxxxx_xxxxxxxx_xxxxxxxx","serverExecutedTime":5}
+ //失败:{"msg":"错误描述","ret":非0,"data":"null","serverExecutedTime":5}
+
+// String method2 = printLabelMsg(SN);//打开注释调用标签机打印接口进行打印,该接口只能是标签机使用,其它型号打印机请勿使用该接口
+// System.out.println(method2);
+
+
+
+ //===========方法3.查询某订单是否打印成功=============
+ //***返回值JSON字符串***
+ //成功:{"msg":"ok","ret":0,"data":true,"serverExecutedTime":2}//data:true为已打印,false为未打印
+ //失败:{"msg":"错误描述","ret":非0, "data":null,"serverExecutedTime":7}
+
+// String orderid = "xxxxxxx_xxxxxxxx_xxxxxxxx";//订单ID,从方法1返回值data获取
+// String method3 = queryOrderState(orderid);
+// System.out.println(method3);
+
+
+
+ //===========方法4.查询指定打印机某天的订单详情============
+ //***返回值JSON字符串***
+ //成功:{"msg":"ok","ret":0,"data":{"print":6,"waiting":1},"serverExecutedTime":9}//print已打印,waiting为打印
+ //失败:{"msg":"错误描述","ret":非0,"data":"null","serverExecutedTime":5}
+
+// String strdate = "2016-11-12";//注意时间格式为"yyyy-MM-dd"
+// String method4 = queryOrderInfoByDate(SN,strdate);
+// System.out.println(method4);
+
+
+
+ //===========方法5.查询打印机的状态==========================
+ //***返回值JSON字符串***
+ //成功:{"msg":"ok","ret":0,"data":"状态","serverExecutedTime":4}
+ //失败:{"msg":"错误描述","ret":非0,"data":"null","serverExecutedTime":5}
+
+// String method5 = queryPrinterStatus(SN);
+// System.out.println(method5);
+
+ }
+
+
+
+
+
+ //=====================以下是函数实现部分================================================
+
+ private static String addprinter(String snlist){
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_printerAddlist"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("printerContent",snlist));
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+ //方法1
+ private static String print(String sn){
+ //标签说明:
+ //单标签:
+ //" "为换行,""为切刀指令(主动切纸,仅限切刀打印机使用才有效果)
+ //""为打印LOGO指令(前提是预先在机器内置LOGO图片),""为钱箱或者外置音响指令
+ //成对标签:
+ //" "为居中放大一倍," "为放大一倍," "为居中, 字体变高一倍
+ // 字体变宽一倍," "为二维码," "为字体加粗," "为右对齐
+ //拼凑订单内容时可参考如下格式
+ //根据打印纸张的宽度,自行调整内容的格式,可参考下面的样例格式
+
+ String content;
+ content = "测试打印 ";
+ content += "名称 单价 数量 金额 ";
+ content += "-------------------------------- ";
+ content += "饭 1.0 1 1.0 ";
+ content += "炒饭 10.0 10 10.0 ";
+ content += "蛋炒饭 10.0 10 100.0 ";
+ content += "鸡蛋炒饭 100.0 1 100.0 ";
+ content += "番茄蛋炒饭 1000.0 1 100.0 ";
+ content += "西红柿蛋炒饭 1000.0 1 100.0 ";
+ content += "西红柿鸡蛋炒饭 100.0 10 100.0 ";
+ content += "西红柿鸡蛋炒饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭饭 100.0 10 100.0 ";
+ content += "备注:加辣 ";
+ content += "-------------------------------- ";
+ content += "合计:xx.0元 ";
+ content += "送货地点:广州市南沙区xx路xx号 ";
+ content += "联系电话:13888888888888 ";
+ content += "订餐时间:2016-08-08 08:08:08 ";
+ content += "https://admin.jidanguo10.com/weixin?id=2 ";
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_printMsg"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn",sn));
+ nvps.add(new BasicNameValuePair("content",content));
+ nvps.add(new BasicNameValuePair("times","1"));//打印联数
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ //服务器返回的JSON字符串,建议要当做日志记录起来
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+
+ //方法2
+ private static String printLabelMsg(String sn){
+
+ String content;
+ content = "1 ";//设定打印时出纸和打印字体的方向,n 0 或 1,每次设备重启后都会初始化为 0 值设置,1:正向出纸,0:反向出纸,
+ content += "#001 五号桌 1/3 可乐鸡翅 张三先生 13800138000 ";//40mm宽度标签纸打印例子,打开注释调用标签打印接口打印
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_printLabelMsg"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn",sn));
+ nvps.add(new BasicNameValuePair("content",content));
+ nvps.add(new BasicNameValuePair("times","1"));//打印联数
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ //服务器返回的JSON字符串,建议要当做日志记录起来
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+ //方法3
+ private static String queryOrderState(String orderid){
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_queryOrderState"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("orderid",orderid));
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ //服务器返回
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+
+ //方法4
+ private static String queryOrderInfoByDate(String sn,String strdate){
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_queryOrderInfoByDate"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn",sn));
+ nvps.add(new BasicNameValuePair("date",strdate));//yyyy-MM-dd格式
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ //服务器返回
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+
+ //方法5
+ private static String queryPrinterStatus(String sn){
+
+ //通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)//读取超时
+ .setConnectTimeout(30000)//连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom()
+ .setDefaultRequestConfig(requestConfig)
+ .build();
+
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user",USER));
+ String STIME = String.valueOf(System.currentTimeMillis()/1000);
+ nvps.add(new BasicNameValuePair("stime",STIME));
+ nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME)));
+ nvps.add(new BasicNameValuePair("apiname","Open_queryPrinterStatus"));//固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn",sn));
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try
+ {
+ post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if(statecode == 200){
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null){
+ //服务器返回
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally{
+ try {
+ if(response!=null){
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ return result;
+
+ }
+
+
+ //生成签名字符串
+ private static String signature(String USER,String UKEY,String STIME){
+ String s = DigestUtils.sha1Hex(USER+UKEY+STIME);
+ return s;
+ }
+}
diff --git a/yshop-system/src/test/java/co/yixiang/FileTest.java b/yshop-system/src/test/java/co/yixiang/FileTest.java
new file mode 100644
index 00000000..208f6981
--- /dev/null
+++ b/yshop-system/src/test/java/co/yixiang/FileTest.java
@@ -0,0 +1,99 @@
+package co.yixiang;
+
+import cn.hutool.core.img.ImgUtil;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+/**
+ * @author :LionCity
+ * @date :Created in 2020-03-24 16:45
+ * @description:
+ * @modified By:
+ * @version:
+ */
+public class FileTest {
+ public static void main(String[] args) throws IOException {
+ readfile("D:/upload");
+ }
+ public static void readfile(String filepath) throws FileNotFoundException, IOException {
+ try {
+
+ File file = new File(filepath);
+ if (!file.isDirectory()) {
+ System.out.println("文件");
+ System.out.println("path=" + file.getPath());
+ System.out.println("absolutepath=" + file.getAbsolutePath());
+ System.out.println("name=" + file.getName());
+
+ File targetFile = new File(file.getPath().replace("upload","uploadZip"));
+ if (!targetFile.getParentFile().exists()) {
+ targetFile.getParentFile().mkdirs();
+ }
+ ImgUtil.scale(file,targetFile,getAccuracy(file.length()/ 1024));
+ } else if (file.isDirectory()) {
+ System.out.println("文件夹");
+ String[] filelist = file.list();
+ for (int i = 0; i < filelist.length; i++) {
+ File readfile = new File(filepath + "\\" + filelist[i]);
+ if (!readfile.isDirectory()) {
+ System.out.println("path=" + readfile.getPath());
+ System.out.println("absolutepath="
+ + readfile.getAbsolutePath());
+ System.out.println("name=" + readfile.getName());
+ File targetFile = new File(readfile.getPath().replace("upload","uploadZip"));
+ System.out.println("path2=" + targetFile.getPath());
+ System.out.println("fileSize=" + targetFile.length());
+ if (!targetFile.getParentFile().exists()) {
+ targetFile.getParentFile().mkdirs();
+ }
+ ImgUtil.scale(readfile,targetFile,getAccuracy(file.length()/ 1024));
+ } else if (readfile.isDirectory()) {
+ readfile(filepath + "\\" + filelist[i]);
+ }
+ }
+
+ }
+
+ } catch (FileNotFoundException e) {
+ System.out.println("readfile() Exception:" + e.getMessage());
+ }
+ }
+
+ public static BufferedImage inputImage(MultipartFile file) {
+ BufferedImage srcImage = null;
+ try {
+ FileInputStream in = (FileInputStream) file.getInputStream();
+ srcImage = javax.imageio.ImageIO.read(in);
+ } catch (IOException e) {
+ System.out.println("读取图片文件出错!" + e.getMessage());
+ }
+ return srcImage;
+ }
+
+ /**
+ * 自动调节精度(经验数值)
+ *
+ * @param size 源图片大小
+ * @return 图片压缩质量比
+ */
+ public static float getAccuracy(long size) {
+ float accuracy;
+ if (size < 400) {
+ accuracy = 0.85f;
+ } else if (size < 900) {
+ accuracy = 0.75f;
+ } else if (size < 2047) {
+ accuracy = 0.6f;
+ } else if (size < 3275) {
+ accuracy = 0.44f;
+ } else {
+ accuracy = 0.4f;
+ }
+ return accuracy;
+ }
+}
diff --git a/yshop-system/src/test/java/co/yixiang/Order.java b/yshop-system/src/test/java/co/yixiang/Order.java
new file mode 100644
index 00000000..289913ae
--- /dev/null
+++ b/yshop-system/src/test/java/co/yixiang/Order.java
@@ -0,0 +1,37 @@
+package co.yixiang;
+
+public class Order {
+ private String title;
+ private String price;
+ private String num;
+
+ public Order() {
+ }
+ public Order(String title, String price, String num) {
+ this.title = title;
+ this.price = price;
+ this.num = num;
+ }
+ @Override
+ public String toString() {
+ return "Order [title=" + title + ", price=" + price + ", num=" + num + "]";
+ }
+ public String getTitle() {
+ return title;
+ }
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ public String getPrice() {
+ return price;
+ }
+ public void setPrice(String price) {
+ this.price = price;
+ }
+ public String getNum() {
+ return num;
+ }
+ public void setNum(String num) {
+ this.num = num;
+ }
+}
diff --git a/yshop-system/src/test/java/co/yixiang/PrintUtil4.java b/yshop-system/src/test/java/co/yixiang/PrintUtil4.java
new file mode 100644
index 00000000..73a53101
--- /dev/null
+++ b/yshop-system/src/test/java/co/yixiang/PrintUtil4.java
@@ -0,0 +1,346 @@
+package co.yixiang;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+@SuppressWarnings("static-access")
+public class PrintUtil4 {
+ static PrintUtil4 p = new PrintUtil4();
+ public static final String URL = "http://api.feieyun.cn/Api/Open/";//不需要修改
+
+ public static final String USER = "18948217680@163.com";//*必填*:账号名
+ public static final String UKEY = "Fg4Nb6sykhK6wJDj";//*必填*: 飞鹅云后台注册账号后生成的UKEY 【备注:这不是填打印机的KEY】
+ public static final String SN = "918502791";//*必填*:打印机编号,必须要在管理后台里添加打印机或调用API接口添加之后,才能调用API
+
+ public static void main(String[] args) {
+// ======================1.多个打印机同时打印======================================
+// List list = new ArrayList<>();
+// list.add(SN);
+// list.add(SN2);
+// for (String sn : list) {
+// String method1 = p.print(sn);
+// System.out.println(method1);
+// }
+
+// ======================2单个打印机打印======================================
+ String result = p.print(SN);
+ System.out.println(result);
+
+// p.writeFile("E:/retlog.txt", result);
+// System.out.println("返回json数据已保存至 E:/retlog.txt 文件,有需要请查看");
+
+ }
+
+ // =====================打印订单排版Demo==========================
+ private static String print(String sn) {
+// =====================1.字体大小效果测试=====================================
+// String s1 = "放大两倍 ";
+// String s2 = "放大一倍 ";
+// String s3 = "变高一倍 ";
+// String s4 = "变宽一倍 ";
+// String s5 = "字体加粗 ";
+// String s6 = "默认不加标签最小效果 ";
+// String s7 = "变高一倍加粗 ";
+// String s8 = "变宽一倍加粗 ";
+//
+// String content = s1+s2+s3+s4+s5+s6+s7+s8;
+// =====================1.end===================================
+
+// =====================2.字体行间距测试======================================
+// String content = "飞鹅云测试 ";
+// content += "名称 单价 数量 金额 ";
+// content += "-------------------------------- ";
+// content += "鸡蛋炒饭1 100.0 1 100.0 ";
+// content += "鸡蛋炒饭2 100.0 2 200.0 ";
+// content += "鸡蛋炒饭3 100.0 3 300.0 ";
+// byte[] spaces = new byte[3];
+// spaces[0] = 0x1b;
+// spaces[1] = 0x33;
+// spaces[2] = 0x30;//7f => 50 行距距离设置最小值为\x50 最大值为\x7f
+// String ls = new String(spaces);//行距开始
+// byte[] spacee = new byte[2];
+// spacee[0] = 0x1b;
+// spacee[1] = 0x32;
+// String le = new String(spacee);//行距结束
+// content += ls+content+le;
+// =====================2.end======================================
+
+// =====================3.字体大小测试===========================================
+// String content = "鸡蛋炒饭 数量:1 单价:100.0 总额:100.0 ";
+// byte[] start = new byte[3];
+// start[0] = 0x1d;
+// start[1] = 0x21;
+// start[2] = 0x11;//7f => 50 行距距离设置最小值为\x50 最大值为\x7f
+// String ls = new String(start);//行距开始
+// byte[] end = new byte[4];
+// end[0] = 0x0d;
+// end[1] = 0x0a;
+// end[2] = 0x1b;
+// end[3] = 0x40;
+// String le = new String(end);//行距结束
+// content += ls+content+le;
+// =====================3.end=======================================
+
+
+// *********************4.排版测试*******************************************************************
+ Order order1 = new Order("青头鸭", "100.4", "10");
+/* Order order2 = new Order("小蘑菇音乐铃 JSN-3022 -文创 UP+", "10.3", "10");
+ Order order3 = new Order("功夫小子 手机座 JSN-1002-文创 UP+", "10.5", "10");
+ Order order4 = new Order("zsfhjksgh菜名四dk", "10.0", "8");
+ Order order5 = new Order("zsfhjksghd菜名五hjk", "100.2", "8");*/
+
+ List orderList = new ArrayList<>();
+ orderList.add(order1);
+ /*orderList.add(order2);
+ orderList.add(order3);
+ orderList.add(order4);
+ orderList.add(order5);*/
+ String content = p.getOrder(orderList, 14, 6, 3, 6);//orderList为数组 b1代表名称列占用(14个字节) b2单价列(6个字节) b3数量列(3个字节) b4金额列(6个字节)-->这里的字节数可按自己需求自由改写,14+6+3+6再加上代码写的3个空格就是32了,58mm打印机一行总占32字节
+
+ // 通过POST请求,发送打印信息到服务器
+ RequestConfig requestConfig = RequestConfig.custom()
+ .setSocketTimeout(30000)// 读取超时
+ .setConnectTimeout(30000)// 连接超时
+ .build();
+
+ CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
+ HttpPost post = new HttpPost(URL);
+ List nvps = new ArrayList();
+ nvps.add(new BasicNameValuePair("user", USER));
+ String STIME = String.valueOf(System.currentTimeMillis() / 1000);
+ nvps.add(new BasicNameValuePair("stime", STIME));
+ nvps.add(new BasicNameValuePair("sig", p.signature(USER, UKEY, STIME)));
+ nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));// 固定值,不需要修改
+ nvps.add(new BasicNameValuePair("sn", sn));
+ nvps.add(new BasicNameValuePair("content", content));
+ nvps.add(new BasicNameValuePair("times", "1"));// 打印联数
+
+ CloseableHttpResponse response = null;
+ String result = null;
+ try {
+ post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8"));
+ response = httpClient.execute(post);
+ int statecode = response.getStatusLine().getStatusCode();
+ if (statecode == 200) {
+ HttpEntity httpentity = response.getEntity();
+ if (httpentity != null) {
+ // 服务器返回的JSON字符串,建议要当做日志记录起来
+ result = EntityUtils.toString(httpentity);
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ p.close(response, post, httpClient);
+ }
+ return result;
+ }
+
+ public void writeFile(String path, String content) {
+ content = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒").format(new Date()) + ",保存的订单日志信息为: " + content;
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(path, true);
+ fos.write(content.getBytes());
+ fos.write("\r ".getBytes());
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ if (fos != null) {
+ try {
+ fos.flush();
+ fos.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private static String signature(String USER, String UKEY, String STIME) {
+ return DigestUtils.sha1Hex(USER + UKEY + STIME);
+ }
+
+
+ //飞鹅技术支持
+ //#########################################################################################################
+
+ //进行订单的多列排版demo,实现商品超出字数的自动换下一行对齐处理,同时保持各列进行对齐
+
+ //排版原理是统计字符串字节数,补空格换行处理
+
+ //58mm的机器,一行打印16个汉字,32个字母;80mm的机器,一行打印24个汉字,48个字母
+
+ //#########################################################################################################
+
+ //orderList为数组 b1代表名称列占用字节 b2单价列 b3数量列 b4金额列-->这里的字节数可按自己需求自由改写,详细往上看112行调用实际例子运用
+ public static String getOrder(List orderList, int b1, int b2, int b3, int b4) {
+ String orderInfo = "预养订单测试 ";
+ orderInfo += "名称 单价 数量 金额 ";
+ orderInfo += "-------------------------------- ";
+ double totals = 0.0;
+ for (int i = 0; i < orderList.size(); i++) {
+ String title = orderList.get(i).getTitle();
+ String price = orderList.get(i).getPrice();
+ String num = orderList.get(i).getNum();
+ String total = "" + Double.valueOf(price) * Integer.parseInt(num);
+ totals += Double.parseDouble(total);
+ price = p.addSpace(price, b2);
+ num = p.addSpace(num, b3);
+ total = p.addSpace(total, b4);
+ String otherStr = " " + price + num + " " + total;
+
+ int tl = 0;
+ try {
+ tl = title.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ int spaceNum = (tl / b1 + 1) * b1 - tl;
+ if (tl < b1) {
+ for (int k = 0; k < spaceNum; k++) {
+ title += " ";
+ }
+ title += otherStr;
+ } else if (tl == b1) {
+ title += otherStr;
+ } else {
+ List list = null;
+ if (p.isEn(title)) {
+ list = p.getStrList(title, b1);
+ } else {
+ list = p.getStrList(title, b1 / 2);
+ }
+ String s0 = p.titleAddSpace(list.get(0));
+ title = s0 + otherStr + " ";// 添加 单价 数量 总额
+ String s = "";
+ for (int k = 1; k < list.size(); k++) {
+ s += list.get(k);
+ }
+ try {
+ s = p.getStringByEnter(b1, s);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ title += s;
+ }
+ orderInfo += title + " ";
+ }
+ orderInfo += "-------------------------------- ";
+ orderInfo += "合计:" + totals + "元 ";
+ orderInfo += "送货地点:广州市南沙区xx路xx号 ";
+ orderInfo += "联系电话:020-39004606 ";
+ orderInfo += "订餐时间:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " ";
+ orderInfo += "备注:加辣 ";
+ orderInfo += "https://admin.jidanguo10.com/weixin?id=2 ";
+ return orderInfo;
+ }
+
+ public String titleAddSpace(String str) {
+ int k = 0;
+ int b = 14;
+ try {
+ k = str.getBytes("GBK").length;
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ for (int i = 0; i < b - k; i++) {
+ str += " ";
+ }
+ return str;
+ }
+
+ public static String getStringByEnter(int length, String string) throws Exception {
+ for (int i = 1; i <= string.length(); i++) {
+ if (string.substring(0, i).getBytes("GBK").length > length) {
+ return string.substring(0, i - 1) + " " + getStringByEnter(length, string.substring(i - 1));
+ }
+ }
+ return string;
+ }
+
+ public static String addSpace(String str, int size) {
+ int len = str.length();
+ if (len < size) {
+ for (int i = 0; i < size - len; i++) {
+ str += " ";
+ }
+ }
+ return str;
+ }
+
+ public static Boolean isEn(String str) {
+ Boolean b = false;
+ try {
+ b = str.getBytes("GBK").length == str.length();
+ } catch (UnsupportedEncodingException e) {
+ e.printStackTrace();
+ }
+ return b;
+ }
+
+ public static List getStrList(String inputString, int length) {
+ int size = inputString.length() / length;
+ if (inputString.length() % length != 0) {
+ size += 1;
+ }
+ return getStrList(inputString, length, size);
+ }
+
+ public static List getStrList(String inputString, int length, int size) {
+ List list = new ArrayList();
+ for (int index = 0; index < size; index++) {
+ String childStr = substring(inputString, index * length, (index + 1) * length);
+ list.add(childStr);
+ }
+ return list;
+ }
+
+ public static String substring(String str, int f, int t) {
+ if (f > str.length())
+ return null;
+ if (t > str.length()) {
+ return str.substring(f, str.length());
+ } else {
+ return str.substring(f, t);
+ }
+ }
+
+ public static void close(CloseableHttpResponse response, HttpPost post, CloseableHttpClient httpClient) {
+ try {
+ if (response != null) {
+ response.close();
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ try {
+ post.abort();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ try {
+ httpClient.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/yshop-tools/src/main/java/co/yixiang/rest/UploadController.java b/yshop-tools/src/main/java/co/yixiang/rest/UploadController.java
index 9977cb13..d9e11319 100644
--- a/yshop-tools/src/main/java/co/yixiang/rest/UploadController.java
+++ b/yshop-tools/src/main/java/co/yixiang/rest/UploadController.java
@@ -42,7 +42,7 @@ public class UploadController {
private final QiNiuService qiNiuService;
- public UploadController(LocalStorageService localStorageService,QiNiuService qiNiuService) {
+ public UploadController(LocalStorageService localStorageService, QiNiuService qiNiuService) {
this.localStorageService = localStorageService;
this.qiNiuService = qiNiuService;
}
@@ -51,22 +51,33 @@ public class UploadController {
@ApiOperation("上传文件")
@PostMapping
@AnonymousAccess
- public ResponseEntity create(@RequestParam(defaultValue = "") String name, @RequestParam("file") MultipartFile file){
- String url = "";
- if(StrUtil.isNotEmpty(localUrl)){ //存在走本地
- LocalStorageDTO localStorageDTO = localStorageService.create(name, file);
- url = localUrl+"/file/"+localStorageDTO.getType()+"/"+localStorageDTO.getRealName();
- }else{//走七牛云
- QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find());
- url = qiniuContent.getUrl();
+ public ResponseEntity create(@RequestParam(defaultValue = "") String name, @RequestParam("file") MultipartFile[] files) {
+ StringBuilder url = new StringBuilder();
+ if (StrUtil.isNotEmpty(localUrl)) { //存在走本地
+ for (MultipartFile file : files) {
+ LocalStorageDTO localStorageDTO = localStorageService.create(name, file);
+ if ("".equals(url.toString())) {
+ url = url.append(localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName());
+ } else {
+ url = url.append(","+localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName());
+ }
+ }
+ } else {//走七牛云
+ for (MultipartFile file : files) {
+ QiniuContent qiniuContent = qiNiuService.upload(file, qiNiuService.find());
+ if ("".equals(url.toString())) {
+ url = url.append(qiniuContent.getUrl());
+ }else{
+ url = url.append(","+qiniuContent.getUrl());
+ }
+ }
}
- Map map = new HashMap<>(2);
- map.put("errno",0);
- map.put("link",url);
- return new ResponseEntity(map,HttpStatus.CREATED);
+ Map map = new HashMap<>(2);
+ map.put("errno", 0);
+ map.put("link", url);
+ return new ResponseEntity(map, HttpStatus.CREATED);
}
-
}
\ No newline at end of file
diff --git a/yshop-tools/src/main/java/co/yixiang/service/impl/LocalStorageServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/service/impl/LocalStorageServiceImpl.java
index f8f039a2..c66211e6 100644
--- a/yshop-tools/src/main/java/co/yixiang/service/impl/LocalStorageServiceImpl.java
+++ b/yshop-tools/src/main/java/co/yixiang/service/impl/LocalStorageServiceImpl.java
@@ -92,7 +92,7 @@ public class LocalStorageServiceImpl implements LocalStorageService {
suffix,
file.getPath(),
type,
- FileUtil.getSize(multipartFile.getSize()),
+ FileUtil.getSize(file.length()),
SecurityUtils.getUsername()
);
return localStorageMapper.toDto(localStorageRepository.save(localStorage));