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 | 公众号:![输入图片说明](https://images.gitee.com/uploads/images/2019/1116/060936_fd73496c_477893.jpeg "qrcode_for_gh_95df5a2881cc_258.jpg") | #### 项目源码 @@ -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..c932c3c1 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ co.yixiang yshop pom - 2.1 + 2.2 yshop-common @@ -18,6 +18,7 @@ yshop-api yshop-mp yshop-shop + yshop-mproot YSHOP商城管理系统 @@ -125,12 +126,17 @@ swagger-models 1.5.21 - + + + + com.github.xiaoymin + knife4j-spring-boot-starter + 2.0.1 - mysql 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/yxshop2.2.sql b/sql/yxshop2.2.sql new file mode 100644 index 00000000..51d67ea1 --- /dev/null +++ b/sql/yxshop2.2.sql @@ -0,0 +1,3118 @@ +/* + 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: 19/05/2020 11:01:51 +*/ + +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 = 334 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); +INSERT INTO `column_config` VALUES (292, 'yx_wechat_user', 'uid', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '微信用户id', NULL); +INSERT INTO `column_config` VALUES (293, 'yx_wechat_user', 'unionid', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段', NULL); +INSERT INTO `column_config` VALUES (294, 'yx_wechat_user', 'openid', 'varchar', NULL, '', b'1', NULL, 'UNI', b'1', b'0', NULL, '用户的标识,对当前公众号唯一', NULL); +INSERT INTO `column_config` VALUES (295, 'yx_wechat_user', 'routine_openid', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '小程序唯一身份ID', NULL); +INSERT INTO `column_config` VALUES (296, 'yx_wechat_user', 'nickname', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户的昵称', NULL); +INSERT INTO `column_config` VALUES (297, 'yx_wechat_user', 'headimgurl', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户头像', NULL); +INSERT INTO `column_config` VALUES (298, 'yx_wechat_user', 'sex', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户的性别,值为1时是男性,值为2时是女性,值为0时是未知', NULL); +INSERT INTO `column_config` VALUES (299, 'yx_wechat_user', 'city', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户所在城市', NULL); +INSERT INTO `column_config` VALUES (300, 'yx_wechat_user', 'language', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户的语言,简体中文为zh_CN', NULL); +INSERT INTO `column_config` VALUES (301, 'yx_wechat_user', 'province', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户所在省份', NULL); +INSERT INTO `column_config` VALUES (302, 'yx_wechat_user', 'country', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户所在国家', NULL); +INSERT INTO `column_config` VALUES (303, 'yx_wechat_user', 'remark', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注', NULL); +INSERT INTO `column_config` VALUES (304, 'yx_wechat_user', 'groupid', 'smallint', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '用户所在的分组ID(兼容旧的用户分组接口)', NULL); +INSERT INTO `column_config` VALUES (305, 'yx_wechat_user', 'tagid_list', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户被打上的标签ID列表', NULL); +INSERT INTO `column_config` VALUES (306, 'yx_wechat_user', 'subscribe', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '用户是否订阅该公众号标识', NULL); +INSERT INTO `column_config` VALUES (307, 'yx_wechat_user', 'subscribe_time', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '关注公众号时间', NULL); +INSERT INTO `column_config` VALUES (308, 'yx_wechat_user', 'add_time', 'int', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '添加时间', NULL); +INSERT INTO `column_config` VALUES (309, 'yx_wechat_user', 'stair', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '一级推荐人', NULL); +INSERT INTO `column_config` VALUES (310, 'yx_wechat_user', 'second', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '二级推荐人', NULL); +INSERT INTO `column_config` VALUES (311, 'yx_wechat_user', 'order_stair', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '一级推荐人订单', NULL); +INSERT INTO `column_config` VALUES (312, 'yx_wechat_user', 'order_second', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '二级推荐人订单', NULL); +INSERT INTO `column_config` VALUES (313, 'yx_wechat_user', 'now_money', 'decimal', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '佣金', NULL); +INSERT INTO `column_config` VALUES (314, 'yx_wechat_user', 'session_key', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '小程序用户会话密匙', NULL); +INSERT INTO `column_config` VALUES (315, 'yx_wechat_user', 'user_type', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '用户类型', NULL); +INSERT INTO `column_config` VALUES (316, 'yx_express', 'id', 'mediumint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '快递公司id', NULL); +INSERT INTO `column_config` VALUES (317, 'yx_express', 'code', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '快递公司简称', NULL); +INSERT INTO `column_config` VALUES (318, 'yx_express', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '快递公司全称', NULL); +INSERT INTO `column_config` VALUES (319, 'yx_express', 'sort', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '排序', NULL); +INSERT INTO `column_config` VALUES (320, 'yx_express', 'is_show', 'tinyint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '是否显示', NULL); +INSERT INTO `column_config` VALUES (321, 'yx_user_level', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (322, 'yx_user_level', 'uid', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '用户uid', NULL); +INSERT INTO `column_config` VALUES (323, 'yx_user_level', 'level_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '等级vip', NULL); +INSERT INTO `column_config` VALUES (324, 'yx_user_level', 'grade', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '会员等级', NULL); +INSERT INTO `column_config` VALUES (325, 'yx_user_level', 'valid_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '过期时间', NULL); +INSERT INTO `column_config` VALUES (326, 'yx_user_level', 'is_forever', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否永久', NULL); +INSERT INTO `column_config` VALUES (327, 'yx_user_level', 'mer_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '商户id', NULL); +INSERT INTO `column_config` VALUES (328, 'yx_user_level', 'status', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '0:禁止,1:正常', NULL); +INSERT INTO `column_config` VALUES (329, 'yx_user_level', 'mark', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '备注', NULL); +INSERT INTO `column_config` VALUES (330, 'yx_user_level', 'remind', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否已通知', NULL); +INSERT INTO `column_config` VALUES (331, 'yx_user_level', 'is_del', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否删除,0=未删除,1=删除', NULL); +INSERT INTO `column_config` VALUES (332, 'yx_user_level', 'add_time', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '添加时间', NULL); +INSERT INTO `column_config` VALUES (333, 'yx_user_level', 'discount', 'int', NULL, '', b'1', NULL, '', b'1', b'1', 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 = 13 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'); +INSERT INTO `dept` VALUES (12, '7773', 1, b'1', '2020-05-18 19:43:53'); + +-- ---------------------------- +-- 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 = 7 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'); +INSERT INTO `dict` VALUES (6, '33', '3', '2020-05-18 19:55:49'); + +-- ---------------------------- +-- 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 = 9 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, '启用2', 'true', '1', 5, NULL); +INSERT INTO `dict_detail` VALUES (6, '停用', 'false', '2', 5, '2019-10-27 20:31:36'); +INSERT INTO `dict_detail` VALUES (7, '8', '8', '999', NULL, '2020-05-18 19:44:05'); +INSERT INTO `dict_detail` VALUES (8, '99', '999', '999', NULL, '2020-05-18 19:44:31'); + +-- ---------------------------- +-- 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, '全栈开发2', 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 = 1262575380937428996 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统日志' ROW_FORMAT = Compact; + +-- ---------------------------- +-- Records of log +-- ---------------------------- +INSERT INTO `log` VALUES (416611, '2020-05-18 15:21:05', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416612, '2020-05-18 15:21:06', '查询素材管理', 'org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/MaterialMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id, create_time, create_id, group_id, name, type, del_flag, url FROM yx_material WHERE del_flag = 0 order by createTime DESC LIMIT ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy112.selectList(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:158)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:76)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy236.selectList(Unknown Source)\r\n at sun.reflect.GeneratedMethodAccessor670.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy237.selectList(Unknown Source)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl.queryAll(YxMaterialServiceImpl.java:62)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl.queryAll(YxMaterialServiceImpl.java:51)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl$$FastClassBySpringCGLIB$$be7e45f4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl$$EnhancerBySpringCGLIB$$b5f819e9.queryAll()\r\n at co.yixiang.modules.shop.rest.MaterialController.getYxMaterials(MaterialController.java:43)\r\n at co.yixiang.modules.shop.rest.MaterialController$$FastClassBySpringCGLIB$$15d9f983.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:59)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.MaterialController$$EnhancerBySpringCGLIB$$a984501c.getYxMaterials()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:890)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:59)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)\r\n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:136)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)\r\n at com.sun.proxy.$Proxy362.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at sun.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 137 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: createTime: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416613, '2020-05-18 15:30:49', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416614, '2020-05-18 15:30:49', '查询素材管理', 'org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/MaterialMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id, create_time, create_id, group_id, name, type, del_flag, url FROM yx_material WHERE del_flag = 0 order by createTime DESC LIMIT ?\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy112.selectList(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:158)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:76)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy236.selectList(Unknown Source)\r\n at sun.reflect.GeneratedMethodAccessor670.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy237.selectList(Unknown Source)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl.queryAll(YxMaterialServiceImpl.java:62)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl.queryAll(YxMaterialServiceImpl.java:51)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl$$FastClassBySpringCGLIB$$be7e45f4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl$$EnhancerBySpringCGLIB$$b5f819e9.queryAll()\r\n at co.yixiang.modules.shop.rest.MaterialController.getYxMaterials(MaterialController.java:43)\r\n at co.yixiang.modules.shop.rest.MaterialController$$FastClassBySpringCGLIB$$15d9f983.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:59)\r\n at sun.reflect.GeneratedMethodAccessor672.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.MaterialController$$EnhancerBySpringCGLIB$$a984501c.getYxMaterials()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:890)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:59)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'createTime\' in \'order clause\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)\r\n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:136)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)\r\n at com.sun.proxy.$Proxy362.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at sun.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 136 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: createTime: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416615, '2020-05-18 15:30:54', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416616, '2020-05-18 15:30:54', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 16, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416617, '2020-05-18 15:30:54', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416618, '2020-05-18 15:30:54', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416619, '2020-05-18 15:30:57', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416620, '2020-05-18 15:30:59', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416621, '2020-05-18 15:30:59', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 20, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416622, '2020-05-18 15:35:01', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 118, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416623, '2020-05-18 15:35:01', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 117, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416624, '2020-05-18 15:35:01', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 100, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416625, '2020-05-18 15:35:01', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 116, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416626, '2020-05-18 15:35:04', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416627, '2020-05-18 15:35:05', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416628, '2020-05-18 15:35:05', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 35, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416629, '2020-05-18 15:36:20', '新增素材管理', 'org.springframework.dao.DataIntegrityViolationException: \r\n### Error updating database. Cause: java.sql.SQLException: Field \'id\' doesn\'t have a default value\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/MaterialMapper.java (best guess)\r\n### The error may involve co.yixiang.modules.shop.service.mapper.MaterialMapper.insert-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO yx_material ( create_time, create_id, name, type, del_flag, url ) VALUES ( ?, ?, ?, ?, ?, ? )\r\n### Cause: java.sql.SQLException: Field \'id\' doesn\'t have a default value\n; Field \'id\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'id\' doesn\'t have a default value\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:246)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy112.insert(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy236.insert(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy237.insert(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.save(ServiceImpl.java:104)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl$$FastClassBySpringCGLIB$$76535273.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n at co.yixiang.modules.shop.service.impl.YxMaterialServiceImpl$$EnhancerBySpringCGLIB$$9a52d5b9.save()\r\n at co.yixiang.modules.shop.rest.MaterialController.create(MaterialController.java:51)\r\n at co.yixiang.modules.shop.rest.MaterialController$$FastClassBySpringCGLIB$$15d9f983.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:59)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.MaterialController$$EnhancerBySpringCGLIB$$23351d36.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:59)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLException: Field \'id\' doesn\'t have a default value\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)\r\n at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)\r\n at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)\r\n at com.sun.proxy.$Proxy362.update(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 131 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.MaterialController.create()', '{ resources: YxMaterial(id=null, delFlag=false, createTime=2020-05-18 15:36:19.763, createId=admin, type=1, groupId=null, name=list_34.png, url=http://localhost:8000/file/pic/list_34-20200518033618938.png) }', '192.168.0.100', 98, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416630, '2020-05-18 16:17:03', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 85, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416631, '2020-05-18 16:18:05', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.getYxStoreProductReplys()', '{ criteria: YxStoreProductReplyQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 44, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416632, '2020-05-18 16:18:09', '删除', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.delete()', '{ id: 5 }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416633, '2020-05-18 16:18:09', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.getYxStoreProductReplys()', '{ criteria: YxStoreProductReplyQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416634, '2020-05-18 16:18:11', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416635, '2020-05-18 16:18:19', '修改快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.update()', '{ resources: YxExpress(id=429, code=YTO, name=圆通速递, sort=0, isShow=0) }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416636, '2020-05-18 16:18:19', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416637, '2020-05-18 16:18:23', '修改快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.update()', '{ resources: YxExpress(id=429, code=YTO, name=圆通速递2, sort=0, isShow=0) }', '192.168.0.100', 48, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416638, '2020-05-18 16:18:24', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416639, '2020-05-18 16:18:27', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416640, '2020-05-18 16:18:32', '修改数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.update()', '{ jsonStr: {\"id\":177,\"groupName\":\"yshop_home_banner\",\"name\":\"banner\",\"url\":\"wwww\",\"pic\":\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\",\"imageArr\":[\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\"],\"sort\":1,\"status\":1} }', '192.168.0.100', 81, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416641, '2020-05-18 16:18:32', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416642, '2020-05-18 16:18:38', '修改数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.update()', '{ jsonStr: {\"id\":177,\"groupName\":\"yshop_home_banner\",\"name\":\"banner2\",\"url\":\"wwww\",\"pic\":\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\",\"imageArr\":[\"https://image.dayouqiantu.cn/5c9f05aee5059.jpg\"],\"sort\":1,\"status\":1} }', '192.168.0.100', 43, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416643, '2020-05-18 16:18:38', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416644, '2020-05-18 16:18:46', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416645, '2020-05-18 16:18:54', '修改', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.update()', '{ resources: YxStoreCoupon(id=6, title=44, integral=0, couponPrice=4, useMinPrice=4, couponTime=1, sort=0, status=1, addTime=1582894183, isDel=0) }', '192.168.0.100', 52, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416646, '2020-05-18 16:18:55', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416647, '2020-05-18 16:18:59', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.UserExtractController.getYxUserExtracts()', '{ criteria: YxUserExtractQueryCriteria(realName=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416648, '2020-05-18 16:19:04', '查询充值管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserRechargeController.getYxUserRecharges()', '{ criteria: YxUserRechargeQueryCriteria(nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 27, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416649, '2020-05-18 16:19:10', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416650, '2020-05-18 16:19:11', '新增或修改', 'org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'key = \'store_self_mention\')\' at line 3\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id,menu_name,sort,value,status FROM yx_system_config WHERE (key = ?)\r\n### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'key = \'store_self_mention\')\' at line 3\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'key = \'store_self_mention\')\' at line 3\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy112.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy242.selectOne(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy243.selectOne(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:254)\r\n at com.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)\r\n at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n at co.yixiang.modules.shop.service.impl.YxSystemConfigServiceImpl$$EnhancerBySpringCGLIB$$d835836.getOne()\r\n at co.yixiang.modules.shop.rest.SystemConfigController.lambda$create$0(SystemConfigController.java:63)\r\n at java.util.Map.forEach(Map.java:630)\r\n at co.yixiang.modules.shop.rest.SystemConfigController.create(SystemConfigController.java:61)\r\n at co.yixiang.modules.shop.rest.SystemConfigController$$FastClassBySpringCGLIB$$29383a2d.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:59)\r\n at sun.reflect.GeneratedMethodAccessor285.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.SystemConfigController$$EnhancerBySpringCGLIB$$ed0bbe21.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:59)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'key = \'store_self_mention\')\' at line 3\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)\r\n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)\r\n at com.sun.proxy.$Proxy362.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 141 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"store_self_mention\":1,\"tengxun_map_key\":\"OGABZ-Y5OCF-5UWJ5-N7DHH-VFIG7-DHFEB\"} }', '192.168.0.100', 115, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416651, '2020-05-18 16:19:14', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416652, '2020-05-18 16:19:18', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416653, '2020-05-18 16:19:18', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=null) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 43, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416654, '2020-05-18 16:19:19', '修改门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.update()', '{ resources: YxSystemStoreStaff(id=4, uid=19, avatar=https://image.dayouqiantu.cn/5dc2c7f3a104c.png, storeId=5, staffName=111, phone=15136175246, verifyStatus=1, status=1, addTime=1586180635, nickname=15136175528, storeName=郑州门店) }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416655, '2020-05-18 16:19:19', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416656, '2020-05-18 16:20:37', '查询定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.getJobs()', '{ criteria: QuartzJobQueryCriteria(jobName=null, isSuccess=null, isPause=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416657, '2020-05-18 16:20:42', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.LocalStorageController.getLocalStorages()', '{ criteria: LocalStorageQueryCriteria(blurry=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416658, '2020-05-18 16:20:43', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(key=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 103, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416659, '2020-05-18 17:04:30', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@5a5d0552]] }', '192.168.0.100', 1489, 'admin', '内网IP', NULL, 0, 1); +INSERT INTO `log` VALUES (416660, '2020-05-18 17:04:35', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416661, '2020-05-18 17:04:37', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 95, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416662, '2020-05-18 17:04:37', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 91, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416663, '2020-05-18 17:04:37', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 92, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416664, '2020-05-18 17:04:37', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 90, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416665, '2020-05-18 17:04:47', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416666, '2020-05-18 17:04:52', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416667, '2020-05-18 17:04:59', '新增商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.create()', '{ resources: YxStoreCategory(id=6, pid=0, cateName=666, sort=1, pic=, isShow=1, addTime=1589792698, isDel=null) }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416668, '2020-05-18 17:04:59', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416669, '2020-05-18 17:05:02', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416670, '2020-05-18 17:05:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416671, '2020-05-18 17:05:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416672, '2020-05-18 17:05:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416673, '2020-05-18 17:05:06', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416674, '2020-05-18 17:05:11', '修改商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=24, merId=0, image=https://image.dayouqiantu.cn/5ca011a1cd487.jpg, sliderImage=https://image.dayouqiantu.cn/5ca011a1cd487.jpg, storeName=彩色打印, storeInfo=彩色打印, keyword=彩色打印, barCode=, cateId=null, price=1, vipPrice=0, otPrice=1, postage=0, unitName=张, sort=0, sales=10, stock=9989, isShow=1, isHot=1, isBenefit=1, isBest=1, isNew=1, description=

彩色打印

, addTime=1582894605, isPostage=0, isDel=1, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=1, ficti=0, browse=0, codePath=, soureLink=) }', '192.168.0.100', 54, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416675, '2020-05-18 17:05:11', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416676, '2020-05-18 17:05:18', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416677, '2020-05-18 17:05:32', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416678, '2020-05-18 17:05:40', '修改商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=25, merId=0, image=http://localhost:8000/file/pic/list_34-2020032207154023.png, sliderImage=http://localhost:8000/file/pic/list_22-20200322071348844.png, storeName=照片打印, storeInfo=照片打印, keyword=照片打印, barCode=, cateId=null, price=1, vipPrice=0, otPrice=2, postage=0, unitName=张, sort=0, sales=0, stock=1000, isShow=1, isHot=1, isBenefit=1, isBest=1, isNew=1, description=

照片打印

, addTime=1585278846, isPostage=1, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=1, ficti=0, browse=0, codePath=, soureLink=) }', '192.168.0.100', 52, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416679, '2020-05-18 17:05:40', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416680, '2020-05-18 17:07:04', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416681, '2020-05-18 17:07:11', '新增商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.create()', '{ resources: YxStoreProduct(id=26, merId=0, image=, sliderImage=, storeName=555, storeInfo=, keyword=55, barCode=, cateId=1, price=0, vipPrice=0, otPrice=0, postage=0, unitName=5, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=, addTime=1589792831, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=null) }', '192.168.0.100', 44, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416682, '2020-05-18 17:07:12', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416683, '2020-05-18 17:07:19', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416684, '2020-05-18 17:07:37', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416685, '2020-05-18 17:09:03', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416686, '2020-05-18 17:09:10', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 37, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416687, '2020-05-18 17:09:11', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416688, '2020-05-18 17:10:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 103, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416689, '2020-05-18 17:10:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 104, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416690, '2020-05-18 17:10:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 103, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416691, '2020-05-18 17:10:22', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 89, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416692, '2020-05-18 17:10:24', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 36, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416693, '2020-05-18 17:10:25', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416694, '2020-05-18 17:10:25', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416695, '2020-05-18 17:10:40', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416696, '2020-05-18 17:10:41', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416697, '2020-05-18 17:10:58', '新增商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.create()', '{ resources: YxStoreProduct(id=27, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=999, keyword=99, barCode=, cateId=1, price=11, vipPrice=0, otPrice=1, postage=0, unitName=9, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589793058, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=) }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416698, '2020-05-18 17:10:58', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 51, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416699, '2020-05-18 17:11:03', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416700, '2020-05-18 17:11:06', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416701, '2020-05-18 17:11:08', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 18, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416702, '2020-05-18 17:11:11', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416703, '2020-05-18 17:11:13', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416704, '2020-05-18 17:11:15', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416705, '2020-05-18 17:11:16', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416706, '2020-05-18 17:13:58', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416707, '2020-05-18 17:14:09', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416708, '2020-05-18 17:14:19', '修改用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.update()', '{ resources: YxUser(uid=20, username=null, account=15136171112, password=null, pwd=$2a$10$62PLFod7JnPPmW8Hx0MZ9uhkGXmXZZ2N3ZixnvUzfBTZ157oiFCSm, realName=, birthday=0, cardId=, mark=, partnerId=0, groupId=0, nickname=15136171112, avatar=https://image.dayouqiantu.cn/5e79f6cfd33b6.png, phone=15136171112, addTime=1585385387, addIp=, lastTime=1585385387, lastIp=, nowMoney=99, brokeragePrice=0, integral=0, signNum=0, status=1, level=0, spreadUid=11, spreadTime=1585385387, userType=h5, isPromoter=1, payCount=0, spreadCount=0, cleanTime=0, addres=, adminid=0, loginType=) }', '192.168.0.100', 39, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416709, '2020-05-18 17:14:19', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 19, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416710, '2020-05-18 17:14:25', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.getYxSystemUserLevels()', '{ criteria: YxSystemUserLevelQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416711, '2020-05-18 17:14:35', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416712, '2020-05-18 17:14:35', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416713, '2020-05-18 17:14:40', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416714, '2020-05-18 17:14:40', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416715, '2020-05-18 17:14:44', '新增', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.create()', '{ resources: YxSystemUserLevel(id=8, merId=null, name=444, money=null, validDate=4, isForever=1, isPay=null, isShow=1, grade=4, discount=4, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, icon=http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png, explain=, addTime=1589793284, isDel=null) }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416716, '2020-05-18 17:14:44', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.getYxSystemUserLevels()', '{ criteria: YxSystemUserLevelQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416717, '2020-05-18 17:14:47', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserTaskController.getYxSystemUserTasks()', '{ criteria: YxSystemUserTaskQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416718, '2020-05-18 17:14:51', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserBillController.getYxUserBills()', '{ criteria: YxUserBillQueryCriteria(nickname=, category=, type=) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416719, '2020-05-18 17:15:03', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416720, '2020-05-18 17:15:07', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"wechat_name\":\"\",\"wechat_id\":\"\",\"wechat_sourceid\":\"\",\"wechat_appid\":\"11112\",\"wechat_appsecret\":\"222266\",\"wechat_token\":\"999\",\"wechat_encode\":\"\",\"wechat_encodingaeskey\":\"6666\",\"wechat_share_img\":\"https://image.dayouqiantu.cn/list_34.png\",\"imageArr\":[\"https://image.dayouqiantu.cn/list_34.png\"],\"wechat_qrcode\":\"\",\"wechat_type\":\"\",\"wechat_share_title\":\"4444\",\"wechat_share_synopsis\":\"4444444\",\"api\":\"http://你的H5端域名/api/wechat/serve\",\"wechat_avatar\":\"\"} }', '192.168.0.100', 507, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416721, '2020-05-18 17:15:13', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"wechat_name\":\"\",\"wechat_id\":\"\",\"wechat_sourceid\":\"\",\"wechat_appid\":\"1111299\",\"wechat_appsecret\":\"222266\",\"wechat_token\":\"999\",\"wechat_encode\":\"\",\"wechat_encodingaeskey\":\"6666\",\"wechat_share_img\":\"https://image.dayouqiantu.cn/list_34.png\",\"imageArr\":[\"https://image.dayouqiantu.cn/list_34.png\"],\"wechat_qrcode\":\"\",\"wechat_type\":\"\",\"wechat_share_title\":\"4444\",\"wechat_share_synopsis\":\"4444444\",\"api\":\"http://你的H5端域名/api/wechat/serve\",\"wechat_avatar\":\"\"} }', '192.168.0.100', 538, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416722, '2020-05-18 17:15:18', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416723, '2020-05-18 17:15:32', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416724, '2020-05-18 17:15:36', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416725, '2020-05-18 17:15:39', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"wx_native_app_appId\":\"11111\",\"wxpay_mchId\":\"2222\",\"wxpay_mchKey\":\"55555\",\"wxpay_keyPath\":\"http://localhost:8000/file/pic/list_30-20200110053337209.png\"} }', '192.168.0.100', 126, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416726, '2020-05-18 17:15:40', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416727, '2020-05-18 17:15:46', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 27, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416728, '2020-05-18 17:15:51', '新增快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.create()', '{ resources: YxExpress(id=430, code=, name=, sort=0, isShow=null) }', '192.168.0.100', 36, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416729, '2020-05-18 17:15:51', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416730, '2020-05-18 17:52:47', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 395, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416731, '2020-05-18 17:52:49', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416732, '2020-05-18 17:52:51', '新增商品分类', 'org.springframework.dao.DataIntegrityViolationException: \r\n### Error updating database. Cause: java.sql.SQLException: Field \'cate_name\' doesn\'t have a default value\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java (best guess)\r\n### The error may involve co.yixiang.modules.shop.service.mapper.StoreCategoryMapper.insert-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO yx_store_category ( add_time, pid, pic, sort, is_show ) VALUES ( ?, ?, ?, ?, ? )\r\n### Cause: java.sql.SQLException: Field \'cate_name\' doesn\'t have a default value\n; Field \'cate_name\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'cate_name\' doesn\'t have a default value\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:246)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.insert(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy244.insert(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy245.insert(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.save(ServiceImpl.java:104)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl$$FastClassBySpringCGLIB$$76535273.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n at co.yixiang.modules.shop.service.impl.YxStoreCategoryServiceImpl$$EnhancerBySpringCGLIB$$a5e40abd.save()\r\n at co.yixiang.modules.shop.rest.StoreCategoryController.create(StoreCategoryController.java:79)\r\n at co.yixiang.modules.shop.rest.StoreCategoryController$$FastClassBySpringCGLIB$$9be9789b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.StoreCategoryController$$EnhancerBySpringCGLIB$$44143889.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLException: Field \'cate_name\' doesn\'t have a default value\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)\r\n at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)\r\n at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)\r\n at com.sun.proxy.$Proxy357.update(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 133 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.StoreCategoryController.create()', '{ resources: YxStoreCategory(id=null, pid=0, cateName=null, sort=1, pic=, isShow=1, addTime=1589795570, isDel=null) }', '192.168.0.100', 88, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416733, '2020-05-18 17:54:40', '新增商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.create()', '{ resources: YxStoreCategory(id=7, pid=0, cateName=9999, sort=1, pic=, isShow=1, addTime=1589795680, isDel=null) }', '192.168.0.100', 58, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416734, '2020-05-18 17:54:41', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 340, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416735, '2020-05-18 17:54:44', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416736, '2020-05-18 17:54:57', '新增商品分类', 'co.yixiang.exception.BadRequestException: 子分类图片必传\r\n at co.yixiang.modules.shop.rest.StoreCategoryController.create(StoreCategoryController.java:75)\r\n at co.yixiang.modules.shop.rest.StoreCategoryController$$FastClassBySpringCGLIB$$9be9789b.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.StoreCategoryController$$EnhancerBySpringCGLIB$$7c35bf86.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.StoreCategoryController.create()', '{ resources: YxStoreCategory(id=null, pid=7, cateName=8888, sort=1, pic=, isShow=1, addTime=null, isDel=null) }', '192.168.0.100', 1, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416737, '2020-05-18 17:54:59', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 65, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416738, '2020-05-18 17:54:59', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416739, '2020-05-18 17:55:06', '新增商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.create()', '{ resources: YxStoreCategory(id=8, pid=7, cateName=8888, sort=1, pic=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, isShow=1, addTime=1589795706, isDel=null) }', '192.168.0.100', 37, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416740, '2020-05-18 17:55:06', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416741, '2020-05-18 17:56:02', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 50, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416742, '2020-05-18 17:56:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 68, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416743, '2020-05-18 17:56:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 69, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416744, '2020-05-18 17:56:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 71, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416745, '2020-05-18 17:56:07', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416746, '2020-05-18 18:03:59', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 385, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416747, '2020-05-18 18:03:59', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416748, '2020-05-18 18:04:22', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416749, '2020-05-18 18:04:23', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416750, '2020-05-18 18:04:39', '新增商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.create()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=1, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=) }', '192.168.0.100', 58, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416751, '2020-05-18 18:04:39', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 42, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416752, '2020-05-18 18:05:02', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416753, '2020-05-18 18:05:22', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 20, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416754, '2020-05-18 18:06:01', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 18, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416755, '2020-05-18 18:08:06', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416756, '2020-05-18 18:08:26', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416757, '2020-05-18 18:08:32', '修改用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.update()', '{ resources: YxUser(uid=20, username=null, account=15136171112, password=null, pwd=$2a$10$62PLFod7JnPPmW8Hx0MZ9uhkGXmXZZ2N3ZixnvUzfBTZ157oiFCSm, realName=, birthday=0, cardId=, mark=, partnerId=0, groupId=0, nickname=15136171112, avatar=https://image.dayouqiantu.cn/5e79f6cfd33b6.png, phone=15136171112, addTime=1585385387, addIp=, lastTime=1585385387, lastIp=, nowMoney=99, brokeragePrice=0, integral=0, signNum=0, status=1, level=0, spreadUid=11, spreadTime=1585385387, userType=h5, isPromoter=1, payCount=0, spreadCount=0, cleanTime=0, addres=, adminid=0, loginType=) }', '192.168.0.100', 56, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416758, '2020-05-18 18:08:32', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416759, '2020-05-18 18:08:36', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 18, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416760, '2020-05-18 18:09:04', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.getYxSystemUserLevels()', '{ criteria: YxSystemUserLevelQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416761, '2020-05-18 18:10:21', '修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.update()', '{ resources: YxSystemUserLevel(id=8, merId=0, name=444, money=0, validDate=4, isForever=1, isPay=0, isShow=1, grade=4, discount=4, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, icon=http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png, explain=, addTime=1589793284, isDel=0) }', '192.168.0.100', 52, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416762, '2020-05-18 18:10:21', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.getYxSystemUserLevels()', '{ criteria: YxSystemUserLevelQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416763, '2020-05-18 18:14:44', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 354, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416764, '2020-05-18 18:14:44', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416765, '2020-05-18 18:14:58', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416766, '2020-05-18 18:14:58', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416767, '2020-05-18 18:15:09', '新增', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.create()', '{ resources: YxSystemUserLevel(id=9, merId=null, name=777, money=null, validDate=null, isForever=1, isPay=null, isShow=1, grade=33, discount=8, image=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, icon=http://localhost:8000/file/pic/资讯-20200311043727918.png, explain=, addTime=1589796908, isDel=null) }', '192.168.0.100', 51, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416768, '2020-05-18 18:15:09', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserLevelController.getYxSystemUserLevels()', '{ criteria: YxSystemUserLevelQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416769, '2020-05-18 18:15:14', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserTaskController.getYxSystemUserTasks()', '{ criteria: YxSystemUserTaskQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 48, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416770, '2020-05-18 18:15:18', '修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserTaskController.update()', '{ resources: YxSystemUserTask(id=1, name=满足积分20分, realName=积分数, taskType=SatisfactionIntegral, number=20, levelId=1, sort=0, isShow=1, isMust=1, illustrate=, addTime=1553827616) }', '192.168.0.100', 55, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416771, '2020-05-18 18:15:19', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemUserTaskController.getYxSystemUserTasks()', '{ criteria: YxSystemUserTaskQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416772, '2020-05-18 18:18:11', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 351, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416773, '2020-05-18 18:18:11', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 39, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416774, '2020-05-18 18:23:18', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416775, '2020-05-18 18:23:19', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416776, '2020-05-18 18:24:06', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416777, '2020-05-18 18:24:07', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416778, '2020-05-18 18:24:53', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416779, '2020-05-18 18:24:53', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416780, '2020-05-18 18:25:07', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416781, '2020-05-18 18:25:14', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416782, '2020-05-18 18:25:19', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.getYxStoreProductReplys()', '{ criteria: YxStoreProductReplyQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 19, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416783, '2020-05-18 18:25:22', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416784, '2020-05-18 18:27:01', '新增快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.create()', '{ resources: YxExpress(id=431, code=555, name=5555, sort=0, isShow=null) }', '192.168.0.100', 53, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416785, '2020-05-18 18:27:01', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 344, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416786, '2020-05-18 18:27:10', '修改快递', 'org.springframework.dao.DuplicateKeyException: \r\n### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry \'555\' for key \'code\'\r\n### The error may exist in co/yixiang/modules/shop/service/mapper/ExpressMapper.java (best guess)\r\n### The error may involve co.yixiang.modules.shop.service.mapper.ExpressMapper.updateById-Inline\r\n### The error occurred while setting parameters\r\n### SQL: UPDATE yx_express SET code=?, name=?, sort=?, is_show=? WHERE id=?\r\n### Cause: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry \'555\' for key \'code\'\n; Duplicate entry \'555\' for key \'code\'; nested exception is java.sql.SQLIntegrityConstraintViolationException: Duplicate entry \'555\' for key \'code\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:242)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.update(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:287)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:63)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy232.updateById(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy233.updateById(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.updateById(ServiceImpl.java:207)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.saveOrUpdate(ServiceImpl.java:148)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl$$FastClassBySpringCGLIB$$76535273.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxExpressServiceImpl$$EnhancerBySpringCGLIB$$67b43713.saveOrUpdate()\r\n at co.yixiang.modules.shop.rest.ExpressController.update(ExpressController.java:63)\r\n at co.yixiang.modules.shop.rest.ExpressController$$FastClassBySpringCGLIB$$7d583dcc.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.ExpressController$$EnhancerBySpringCGLIB$$f5fe6a17.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate entry \'555\' for key \'code\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)\r\n at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)\r\n at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)\r\n at com.sun.proxy.$Proxy359.update(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 139 more\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.ExpressController.update()', '{ resources: YxExpress(id=430, code=555, name=555555, sort=0, isShow=0) }', '192.168.0.100', 207, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416787, '2020-05-18 18:31:13', '修改快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.update()', '{ resources: YxExpress(id=430, code=555, name=555555, sort=0, isShow=0) }', '192.168.0.100', 53, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416788, '2020-05-18 18:31:13', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416789, '2020-05-18 18:31:18', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 58, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416790, '2020-05-18 18:31:21', '新增数据配置', 'co.yixiang.exception.BadRequestException: 名称必须填写\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController.create(SystemGroupDataController.java:72)\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController$$FastClassBySpringCGLIB$$bbefe736.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController$$EnhancerBySpringCGLIB$$96dc972d.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.SystemGroupDataController.create()', '{ jsonStr: {\"id\":\"\",\"groupName\":\"yshop_home_banner\",\"name\":\"\",\"url\":\"\",\"wxapp_url\":\"\",\"uniapp_url\":\"\",\"pic\":\"\",\"imageArr\":[],\"sort\":0,\"status\":1} }', '192.168.0.100', 1, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416791, '2020-05-18 18:32:03', '新增数据配置', 'co.yixiang.exception.BadRequestException: 图片必须上传\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController.create(SystemGroupDataController.java:90)\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController$$FastClassBySpringCGLIB$$bbefe736.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.SystemGroupDataController$$EnhancerBySpringCGLIB$$96dc972d.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.SystemGroupDataController.create()', '{ jsonStr: {\"id\":\"\",\"groupName\":\"yshop_home_banner\",\"name\":\"55\",\"url\":\"5\",\"wxapp_url\":\"5\",\"uniapp_url\":\"5\",\"pic\":\"\",\"imageArr\":[],\"sort\":0,\"status\":1} }', '192.168.0.100', 1, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416792, '2020-05-18 18:32:04', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 36, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416793, '2020-05-18 18:32:05', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416794, '2020-05-18 18:32:09', '新增数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.create()', '{ jsonStr: {\"id\":\"\",\"groupName\":\"yshop_home_banner\",\"name\":\"55\",\"url\":\"5\",\"wxapp_url\":\"5\",\"uniapp_url\":\"5\",\"pic\":\"http://localhost:8000/file/pic/资讯-20200311043727918.png\",\"imageArr\":[\"http://localhost:8000/file/pic/资讯-20200311043727918.png\"],\"sort\":0,\"status\":1} }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416795, '2020-05-18 18:32:09', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416796, '2020-05-18 18:32:25', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_menus) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416797, '2020-05-18 18:32:28', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 42, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416798, '2020-05-18 18:32:30', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"integral_ratio\":\"1\",\"integral_full\":\"0\",\"integral_max\":\"0\"} }', '192.168.0.100', 121, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416799, '2020-05-18 18:32:35', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"integral_ratio\":\"2\",\"integral_full\":\"0\",\"integral_max\":\"0\"} }', '192.168.0.100', 84, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416800, '2020-05-18 18:32:39', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"integral_ratio\":\"1\",\"integral_full\":\"0\",\"integral_max\":\"0\"} }', '192.168.0.100', 112, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416801, '2020-05-18 18:34:26', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 35, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416802, '2020-05-18 18:37:20', '新增', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.create()', '{ resources: YxStoreCoupon(id=7, title=7777, integral=0, couponPrice=1, useMinPrice=11, couponTime=1, sort=0, status=1, addTime=1589798239, isDel=null) }', '192.168.0.100', 66, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416803, '2020-05-18 18:37:21', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 391, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416804, '2020-05-18 18:37:25', '查询已发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.getYxStoreCouponIssues()', '{ criteria: YxStoreCouponIssueQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 35, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416805, '2020-05-18 18:37:27', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416806, '2020-05-18 18:38:11', '发布', 'org.springframework.dao.DataIntegrityViolationException: \r\n### Error updating database. Cause: java.sql.SQLException: Field \'end_time_date\' doesn\'t have a default value\r\n### The error may exist in co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java (best guess)\r\n### The error may involve co.yixiang.modules.activity.service.mapper.YxStoreCouponIssueMapper.insert-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO yx_store_coupon_issue ( is_permanent, add_time, cname, total_count, is_del, remain_count, status, cid ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ? )\r\n### Cause: java.sql.SQLException: Field \'end_time_date\' doesn\'t have a default value\n; Field \'end_time_date\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'end_time_date\' doesn\'t have a default value\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:246)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.insert(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy208.insert(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy209.insert(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.save(ServiceImpl.java:104)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl$$FastClassBySpringCGLIB$$76535273.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n at co.yixiang.modules.activity.service.impl.YxStoreCouponIssueServiceImpl$$EnhancerBySpringCGLIB$$4a230acb.save()\r\n at co.yixiang.modules.activity.rest.StoreCouponIssueController.create(StoreCouponIssueController.java:67)\r\n at co.yixiang.modules.activity.rest.StoreCouponIssueController$$FastClassBySpringCGLIB$$f660e867.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.activity.rest.StoreCouponIssueController$$EnhancerBySpringCGLIB$$99ee97a5.create()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLException: Field \'end_time_date\' doesn\'t have a default value\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)\r\n at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)\r\n at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)\r\n at com.sun.proxy.$Proxy359.update(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 133 more\r\n', 'ERROR', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.create()', '{ resources: YxStoreCouponIssue(id=null, cname=7777, cid=7, startTime=null, endTime=null, totalCount=0, remainCount=0, isPermanent=0, status=1, isDel=0, addTime=1589798290, endTimeDate=null, startTimeDate=null) }', '192.168.0.100', 93, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416807, '2020-05-18 18:39:52', '发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.create()', '{ resources: YxStoreCouponIssue(id=15, cname=7777, cid=7, startTime=1589731200, endTime=1590595200, totalCount=99, remainCount=99, isPermanent=0, status=1, isDel=0, addTime=1589798391, endTimeDate=2020-05-28 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 63, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416808, '2020-05-18 18:39:53', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponController.getYxStoreCoupons()', '{ criteria: YxStoreCouponQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 405, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416809, '2020-05-18 18:40:16', '查询已发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.getYxStoreCouponIssues()', '{ criteria: YxStoreCouponIssueQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 27, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416810, '2020-05-18 18:40:33', '修改状态', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.update()', '{ resources: YxStoreCouponIssue(id=14, cname=null, cid=3, startTime=1582530746, endTime=1585039774, totalCount=100, remainCount=100, isPermanent=0, status=1, isDel=1, addTime=1582530755, endTimeDate=2020-02-29 00:00:00.0, startTimeDate=2020-02-24 15:52:26.0) }', '192.168.0.100', 75, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416811, '2020-05-18 18:40:33', '查询已发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponIssueController.getYxStoreCouponIssues()', '{ criteria: YxStoreCouponIssueQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416812, '2020-05-18 18:40:35', '查询Y', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCouponUserController.getYxStoreCouponUsers()', '{ criteria: YxStoreCouponUserQueryCriteria(couponTitle=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416813, '2020-05-18 18:40:39', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 60, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416814, '2020-05-18 18:40:46', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416815, '2020-05-18 18:40:47', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 90, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416816, '2020-05-18 18:40:47', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 89, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416817, '2020-05-18 18:40:47', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 88, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416818, '2020-05-18 18:50:54', '修改砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.update()', '{ resources: YxStoreBargain(id=4, productId=28, title=9999, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, unitName=张, stock=0, sales=0, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, startTime=1589731200, stopTime=1590768000, storeName=null, price=0.01, minPrice=null, num=1, bargainMaxPrice=null, bargainMinPrice=null, bargainNum=null, status=1, description=

999999

, giveIntegral=0, info=333, cost=0, sort=0, isHot=0, isDel=0, addTime=1589799053, isPostage=0, postage=0, rule=

33333

, look=null, share=null, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 68, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416819, '2020-05-18 18:50:54', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 438, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416820, '2020-05-18 19:01:49', '修改砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.update()', '{ resources: YxStoreBargain(id=5, productId=28, title=9999, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, unitName=张, stock=1, sales=0, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, startTime=1589731200, stopTime=1590595200, storeName=null, price=0.01, minPrice=1, num=1, bargainMaxPrice=1, bargainMinPrice=1, bargainNum=1, status=1, description=

999999

, giveIntegral=0, info=, cost=0, sort=0, isHot=0, isDel=0, addTime=1589799708, isPostage=0, postage=0, rule=

7777

, look=null, share=null, endTimeDate=2020-05-28 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 63, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416821, '2020-05-18 19:01:49', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 423, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416822, '2020-05-18 19:02:12', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416823, '2020-05-18 19:09:01', '修改拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.update()', '{ resources: YxStoreCombination(id=4, productId=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, attr=null, people=1, info=, price=0, sort=0, sales=0, stock=1, addTime=1589800141, isHost=0, isShow=1, isDel=0, combination=1, merUse=null, isPostage=0, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, effectiveTime=24, cost=0, browse=0, unitName=张, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 67, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416824, '2020-05-18 19:09:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 378, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416825, '2020-05-18 19:13:35', '发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.update()', '{ resources: YxStoreSeckill(id=3, productId=28, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, info=, price=0.01, cost=0, otPrice=0, giveIntegral=0, sort=0, stock=1, sales=0, unitName=张, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, addTime=1589800415, status=1, isPostage=0, isHot=0, isDel=0, num=1, isShow=1, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0, timeId=215) }', '192.168.0.100', 76, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416826, '2020-05-18 19:13:36', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 406, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416827, '2020-05-18 19:13:39', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 47, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416828, '2020-05-18 19:13:58', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 107, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416829, '2020-05-18 19:14:07', '修改拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.update()', '{ resources: YxStoreCombination(id=4, productId=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, attr=null, people=1, info=, price=0, sort=0, sales=0, stock=1, addTime=1589800141, isHost=0, isShow=1, isDel=0, combination=1, merUse=null, isPostage=0, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, effectiveTime=24, cost=0, browse=0, unitName=张, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 52, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416830, '2020-05-18 19:14:08', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 45, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416831, '2020-05-18 19:14:10', '查询记录', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StorePinkController.getYxStorePinks()', '{ criteria: YxStorePinkQueryCriteria(kId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416832, '2020-05-18 19:14:15', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 27, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416833, '2020-05-18 19:14:19', '修改拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.update()', '{ resources: YxStoreCombination(id=4, productId=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, attr=null, people=1, info=, price=0, sort=0, sales=0, stock=1, addTime=1589800141, isHost=0, isShow=1, isDel=0, combination=1, merUse=null, isPostage=0, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, effectiveTime=24, cost=0, browse=0, unitName=张, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 40, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416834, '2020-05-18 19:14:19', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 47, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416835, '2020-05-18 19:14:21', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 35, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416836, '2020-05-18 19:14:22', '列表', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.getYxStoreSeckills()', '{ criteria: YxStoreSeckillQueryCriteria(title=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 24, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416837, '2020-05-18 19:14:25', '发布', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.update()', '{ resources: YxStoreSeckill(id=3, productId=28, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, info=, price=0.01, cost=0, otPrice=0, giveIntegral=0, sort=0, stock=1, sales=0, unitName=张, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, addTime=1589800415, status=1, isPostage=0, isHot=0, isDel=0, num=1, isShow=1, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0, timeId=215) }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416838, '2020-05-18 19:14:25', '列表', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.getYxStoreSeckills()', '{ criteria: YxStoreSeckillQueryCriteria(title=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416839, '2020-05-18 19:14:27', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416840, '2020-05-18 19:14:30', '查询砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.getYxStoreBargains()', '{ criteria: YxStoreBargainQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416841, '2020-05-18 19:14:34', '修改砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.update()', '{ resources: YxStoreBargain(id=5, productId=28, title=9999, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, unitName=张, stock=1, sales=0, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, startTime=1589731200, stopTime=1590595200, storeName=null, price=0.01, minPrice=1, num=1, bargainMaxPrice=1, bargainMinPrice=1, bargainNum=1, status=1, description=

999999

, giveIntegral=0, info=, cost=0, sort=0, isHot=0, isDel=0, addTime=1589799708, isPostage=0, postage=0, rule=

7777

, look=0, share=0, endTimeDate=2020-05-28 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 45, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416842, '2020-05-18 19:14:35', '查询砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.getYxStoreBargains()', '{ criteria: YxStoreBargainQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416843, '2020-05-18 19:14:39', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416844, '2020-05-18 19:14:41', '新增或修改', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.create()', '{ jsonStr: {\"store_brokerage_open\":1,\"store_brokerage_statu\":2,\"store_brokerage_ratio\":\"70\",\"store_brokerage_two\":\"30\",\"user_extract_min_price\":\"1\",\"site_url\":\"http://localhost:8080\",\"api_url\":\"http://127.0.0.1:8009\"} }', '192.168.0.100', 257, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416845, '2020-05-18 19:14:44', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.UserExtractController.getYxUserExtracts()', '{ criteria: YxUserExtractQueryCriteria(realName=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416846, '2020-05-18 19:14:48', '修改', NULL, 'INFO', 'co.yixiang.modules.activity.rest.UserExtractController.update()', '{ resources: YxUserExtract(id=1, uid=11, realName=会敲代码的喵, extractType=weixin, bankCode=0, bankAddress=, alipayCode=, extractPrice=1, mark=null, balance=5, failMsg=失败了, failTime=1589800488, addTime=1573648445, status=-1, wechat=hu) }', '192.168.0.100', 132, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416847, '2020-05-18 19:14:49', '查询', NULL, 'INFO', 'co.yixiang.modules.activity.rest.UserExtractController.getYxUserExtracts()', '{ criteria: YxUserExtractQueryCriteria(realName=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416848, '2020-05-18 19:14:51', '查询充值管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserRechargeController.getYxUserRecharges()', '{ criteria: YxUserRechargeQueryCriteria(nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416849, '2020-05-18 19:14:53', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416850, '2020-05-18 19:14:55', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416851, '2020-05-18 19:18:14', '获取经纬度', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.create()', '{ jsonStr: {\"addr\":\"河南信阳\"} }', '192.168.0.100', 1776, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416852, '2020-05-18 19:18:18', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 357, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416853, '2020-05-18 19:18:18', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416854, '2020-05-18 19:18:24', '新增门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.create()', '{ resources: YxSystemStore(id=6, name=444, introduction=44, phone=4, address=河南信阳, detailedAddress=null, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, latitude=32.11683, longitude=114.05857, validTime=null, dayTime=null, addTime=1589800703, isShow=1, isDel=null) }', '192.168.0.100', 51, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416855, '2020-05-18 19:18:24', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 24, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416856, '2020-05-18 19:22:05', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 68, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416857, '2020-05-18 19:22:45', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416858, '2020-05-18 19:22:49', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416859, '2020-05-18 19:22:50', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=null) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416860, '2020-05-18 19:25:44', '新增门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.create()', '{ resources: YxSystemStoreStaff(id=5, uid=20, avatar=https://image.dayouqiantu.cn/5e79f6cfd33b6.png, storeId=5, staffName=444, phone=44444, verifyStatus=1, status=null, addTime=null, nickname=15136171112, storeName=null) }', '192.168.0.100', 57, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416861, '2020-05-18 19:25:45', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 349, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416862, '2020-05-18 19:25:48', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416863, '2020-05-18 19:26:11', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416864, '2020-05-18 19:26:15', '修改门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.update()', '{ resources: YxSystemStoreStaff(id=5, uid=20, avatar=https://image.dayouqiantu.cn/5e79f6cfd33b6.png, storeId=4, staffName=444, phone=44444, verifyStatus=1, status=1, addTime=null, nickname=15136171112, storeName=null) }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416865, '2020-05-18 19:26:15', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416866, '2020-05-18 19:40:49', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 16, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416867, '2020-05-18 19:40:55', '修改门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.update()', '{ resources: YxSystemStore(id=5, name=郑州门店, introduction=郑州门店, phone=15136175246, address=河南省郑州, detailedAddress=, image=http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png, latitude=34.72468, longitude=113.6401, validTime=2020-03-21 - 2020-03-31, dayTime=17:11:13 - 20:11:15, addTime=1584782199, isShow=1, isDel=0) }', '192.168.0.100', 57, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416868, '2020-05-18 19:40:55', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 17, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416869, '2020-05-18 19:41:37', '所有门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getAll()', '{ criteria: YxSystemStoreQueryCriteria() }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416870, '2020-05-18 19:41:37', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 45, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416871, '2020-05-18 19:41:41', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416872, '2020-05-18 19:41:41', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 123, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416873, '2020-05-18 19:41:41', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 139, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416874, '2020-05-18 19:41:41', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 140, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416875, '2020-05-18 19:41:47', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 22, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416876, '2020-05-18 19:42:25', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=7, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416877, '2020-05-18 19:42:27', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=2, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416878, '2020-05-18 19:42:52', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416879, '2020-05-18 19:42:52', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=null, deptIds=[], createTime=null) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 42, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416880, '2020-05-18 19:43:00', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416881, '2020-05-18 19:43:00', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416882, '2020-05-18 19:43:00', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416883, '2020-05-18 19:43:00', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416884, '2020-05-18 19:43:02', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 17, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416885, '2020-05-18 19:43:04', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=7, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416886, '2020-05-18 19:43:08', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=8, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416887, '2020-05-18 19:43:31', '新增用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.create()', '{ resources: User(id=6, avatarId=null, email=666@qq.com, enabled=false, userAvatar=null, roles=[Role(id=2, name=null, remark=null, dataScope=null, level=null, menus=null, depts=null, createTime=null, permission=null)], job=Job(id=8, name=null, enabled=null, dept=null, sort=null, deptId=null, createTime=null), dept=Dept(id=8, name=null, pid=null, enabled=null, createTime=null), password=$2a$10$3Vlo24eOmHHW7.3vAjqPSusfIINNo4JiujzxgqsaoWLx/d5de/jEm, username=7777, deptId=8, phone=15136175246, jobId=8, createTime=2020-05-18 19:43:30.467, lastPasswordResetTime=null, nickName=777, sex=男) }', '192.168.0.100', 175, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416888, '2020-05-18 19:43:31', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 83, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416889, '2020-05-18 19:43:35', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416890, '2020-05-18 19:43:35', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=8, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 16, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416891, '2020-05-18 19:43:42', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=dept_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416892, '2020-05-18 19:43:42', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416893, '2020-05-18 19:43:45', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416894, '2020-05-18 19:43:53', '新增部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.create()', '{ resources: Dept(id=12, name=777, pid=1, enabled=true, createTime=2020-05-18 19:43:53.096) }', '192.168.0.100', 40, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416895, '2020-05-18 19:43:53', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416896, '2020-05-18 19:43:56', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416897, '2020-05-18 19:43:57', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=null, deptIds=[], createTime=null) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416898, '2020-05-18 19:43:57', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.getDicts()', '{ resources: DictQueryCriteria(blurry=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 25, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416899, '2020-05-18 19:43:59', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416900, '2020-05-18 19:44:05', '新增字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.create()', '{ resources: DictDetail(id=7, label=8, value=8, sort=999, dictId=null, createTime=2020-05-18 19:44:04.755) }', '192.168.0.100', 21, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416901, '2020-05-18 19:44:05', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416902, '2020-05-18 19:44:09', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=dept_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416903, '2020-05-18 19:44:11', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416904, '2020-05-18 19:44:11', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416905, '2020-05-18 19:44:31', '新增字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.create()', '{ resources: DictDetail(id=8, label=99, value=999, sort=999, dictId=null, createTime=2020-05-18 19:44:30.917) }', '192.168.0.100', 33, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416906, '2020-05-18 19:44:31', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416907, '2020-05-18 19:45:01', '修改字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.update()', '{ resources: DictDetail(id=5, label=启用2, value=true, sort=1, dictId=5, createTime=null) }', '192.168.0.100', 58, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416908, '2020-05-18 19:45:01', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416909, '2020-05-18 19:45:12', '查询定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.getJobs()', '{ criteria: QuartzJobQueryCriteria(jobName=null, isSuccess=null, isPause=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 23, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416910, '2020-05-18 19:45:23', '修改定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.update()', '{ resources: QuartzJob(id=3, beanName=testTask, cronExpression=0/5 * * * * ?, isPause=true, jobName=测试4, methodName=run, params=44, remark=不带参测试, createTime=2019-09-26 16:44:39.0) }', '192.168.0.100', 51, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416911, '2020-05-18 19:45:23', '查询定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.getJobs()', '{ criteria: QuartzJobQueryCriteria(jobName=null, isSuccess=null, isPause=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416912, '2020-05-18 19:45:35', '修改定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.update()', '{ resources: QuartzJob(id=3, beanName=testTask, cronExpression=0/5 * * * * ?, isPause=true, jobName=测试43, methodName=run, params=44, remark=不带参测试, createTime=2019-09-26 16:44:39.0) }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416913, '2020-05-18 19:45:36', '查询定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.getJobs()', '{ criteria: QuartzJobQueryCriteria(jobName=null, isSuccess=null, isPause=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 2, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416914, '2020-05-18 19:45:42', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.LocalStorageController.getLocalStorages()', '{ criteria: LocalStorageQueryCriteria(blurry=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416915, '2020-05-18 19:45:42', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(name=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 37, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416916, '2020-05-18 19:45:45', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(name=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416917, '2020-05-18 19:45:48', '配置七牛云存储', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.emailConfig()', '{ qiniuConfig: QiniuConfig(id=1, accessKey=111111, bucket=yixiang, host=https://image.dayouqiantu.cn, secretKey=22222, type=公开, zone=华东) }', '192.168.0.100', 50, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416918, '2020-05-18 19:45:48', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(name=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416919, '2020-05-18 19:45:55', '配置七牛云存储', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.emailConfig()', '{ qiniuConfig: QiniuConfig(id=1, accessKey=1111114444, bucket=yixiang, host=https://image.dayouqiantu.cn, secretKey=22222, type=公开, zone=华东) }', '192.168.0.100', 54, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416920, '2020-05-18 19:45:55', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(name=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416921, '2020-05-18 19:46:02', '查询图片', NULL, 'INFO', 'co.yixiang.tools.rest.PictureController.getRoles()', '{ criteria: PictureQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416922, '2020-05-18 19:46:29', '查询图片', NULL, 'INFO', 'co.yixiang.tools.rest.PictureController.getRoles()', '{ criteria: PictureQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 1, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416923, '2020-05-18 19:46:36', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 23, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416924, '2020-05-18 19:46:36', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 331, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416925, '2020-05-18 19:46:37', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416926, '2020-05-18 19:47:07', '修改菜单', 'org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n### The error may exist in co/yixiang/modules/system/service/mapper/MenuMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id,cache,hidden,icon,permission,pid,sort,type,path,component,create_time,name,i_frame,component_name FROM menu WHERE (componentName = ?)\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy135.selectOne(Unknown Source)\r\n at sun.reflect.GeneratedMethodAccessor421.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy136.selectOne(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:254)\r\n at com.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl.update(MenuServiceImpl.java:312)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl$$FastClassBySpringCGLIB$$786e7b02.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl$$EnhancerBySpringCGLIB$$6fc84df4.update()\r\n at co.yixiang.modules.system.rest.MenuController.update(MenuController.java:135)\r\n at co.yixiang.modules.system.rest.MenuController$$FastClassBySpringCGLIB$$df40f4f4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.system.rest.MenuController$$EnhancerBySpringCGLIB$$3559c78b.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)\r\n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)\r\n at com.sun.proxy.$Proxy359.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 138 more\r\n', 'ERROR', 'co.yixiang.modules.system.rest.MenuController.update()', '{ resources: Menu(id=16, iFrame=false, name=图床管理, component=tools/picture/index, pid=36, sort=25, icon=image, path=pictures, cache=false, hidden=true, componentName=Pictures, createTime=2018-12-28 09:36:53.0, permission=pictures:list, type=1) }', '192.168.0.100', 90, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416927, '2020-05-18 19:47:25', '修改菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.update()', '{ resources: Menu(id=145, iFrame=false, name=图片上传, component=null, pid=16, sort=2, icon=null, path=null, cache=false, hidden=false, componentName=null, createTime=2020-02-14 21:52:31.0, permission=pictures:add, type=2) }', '192.168.0.100', 38, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416928, '2020-05-18 19:47:25', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416929, '2020-05-18 19:47:32', '修改菜单', 'org.springframework.jdbc.BadSqlGrammarException: \r\n### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n### The error may exist in co/yixiang/modules/system/service/mapper/MenuMapper.java (best guess)\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: SELECT id,cache,hidden,icon,permission,pid,sort,type,path,component,create_time,name,i_frame,component_name FROM menu WHERE (componentName = ?)\r\n### Cause: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\n; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:234)\r\n at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy135.selectOne(Unknown Source)\r\n at sun.reflect.GeneratedMethodAccessor421.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy136.selectOne(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:254)\r\n at com.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl.update(MenuServiceImpl.java:312)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl$$FastClassBySpringCGLIB$$786e7b02.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl$$EnhancerBySpringCGLIB$$6fc84df4.update()\r\n at co.yixiang.modules.system.rest.MenuController.update(MenuController.java:135)\r\n at co.yixiang.modules.system.rest.MenuController$$FastClassBySpringCGLIB$$df40f4f4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.GeneratedMethodAccessor281.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.system.rest.MenuController$$EnhancerBySpringCGLIB$$3559c78b.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.sql.SQLSyntaxErrorException: Unknown column \'componentName\' in \'where clause\'\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)\r\n at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)\r\n at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)\r\n at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:391)\r\n at net.sf.log4jdbc.sql.jdbcapi.PreparedStatementSpy.execute(PreparedStatementSpy.java:443)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3409)\r\n at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_execute(FilterEventAdapter.java:440)\r\n at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_execute(FilterChainImpl.java:3407)\r\n at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.execute(PreparedStatementProxyImpl.java:167)\r\n at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:498)\r\n at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)\r\n at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)\r\n at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)\r\n at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)\r\n at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)\r\n at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)\r\n at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:143)\r\n at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61)\r\n at com.sun.proxy.$Proxy359.query(Unknown Source)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76)\r\n at sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 138 more\r\n', 'ERROR', 'co.yixiang.modules.system.rest.MenuController.update()', '{ resources: Menu(id=16, iFrame=false, name=图床管理, component=tools/picture/index, pid=36, sort=25, icon=image, path=pictures, cache=false, hidden=false, componentName=Pictures, createTime=2018-12-28 09:36:53.0, permission=pictures:list, type=1) }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416930, '2020-05-18 19:48:00', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=dept_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416931, '2020-05-18 19:48:00', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416932, '2020-05-18 19:48:04', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416933, '2020-05-18 19:48:10', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416934, '2020-05-18 19:48:12', '修改部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.update()', '{ resources: Dept(id=12, name=7773, pid=1, enabled=true, createTime=2020-05-18 19:43:53.0) }', '192.168.0.100', 43, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416935, '2020-05-18 19:48:12', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416936, '2020-05-18 19:48:14', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416937, '2020-05-18 19:48:14', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=null, deptIds=[], createTime=null) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416938, '2020-05-18 19:48:17', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416939, '2020-05-18 19:48:19', '修改岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.update()', '{ resources: Job(id=11, name=全栈开发2, enabled=true, dept=Dept(id=2, name=研发部, pid=7, enabled=true, createTime=2019-03-25 09:15:32.0), sort=2, deptId=null, createTime=2019-03-31 13:39:30.0) }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416940, '2020-05-18 19:48:19', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=null, deptIds=[], createTime=null) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416941, '2020-05-18 19:48:21', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416942, '2020-05-18 19:48:26', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.getDicts()', '{ resources: DictQueryCriteria(blurry=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 2, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416943, '2020-05-18 19:48:27', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416944, '2020-05-18 19:48:27', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 17, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416945, '2020-05-18 19:48:42', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=dept_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 2, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416946, '2020-05-18 19:48:42', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416947, '2020-05-18 19:48:44', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=job_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416948, '2020-05-18 19:48:44', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=null, deptIds=[], createTime=null) pageable: Page request [number: 0, size 10, sort: sort: ASC,id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416949, '2020-05-18 19:48:46', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.getDicts()', '{ resources: DictQueryCriteria(blurry=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 2, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416950, '2020-05-18 19:50:54', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.all()', '{ }', '192.168.0.100', 1, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416951, '2020-05-18 19:53:43', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.QiniuController.getRoles()', '{ criteria: QiniuQueryCriteria(name=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416952, '2020-05-18 19:53:43', '查询文件', NULL, 'INFO', 'co.yixiang.tools.rest.LocalStorageController.getLocalStorages()', '{ criteria: LocalStorageQueryCriteria(blurry=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416953, '2020-05-18 19:53:44', '查询定时任务', NULL, 'INFO', 'co.yixiang.modules.quartz.rest.QuartzJobController.getJobs()', '{ criteria: QuartzJobQueryCriteria(jobName=null, isSuccess=null, isPause=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416954, '2020-05-18 19:55:38', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416955, '2020-05-18 19:55:38', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.getDicts()', '{ resources: DictQueryCriteria(blurry=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416956, '2020-05-18 19:55:42', '导出字典数据', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.download()', '{ response: com.alibaba.druid.support.http.WebStatFilter$StatHttpServletResponseWrapper@4d681c79 criteria: DictQueryCriteria(blurry=null) }', '192.168.0.100', 1069, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416957, '2020-05-18 19:55:49', '新增字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.create()', '{ resources: Dict(id=6, name=33, remark=3, createTime=2020-05-18 19:55:49.242) }', '192.168.0.100', 61, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416958, '2020-05-18 19:55:50', '查询字典', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictController.getDicts()', '{ resources: DictQueryCriteria(blurry=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416959, '2020-05-18 20:06:30', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 32, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416960, '2020-05-18 20:06:33', '删除数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.delete()', '{ id: 237 }', '192.168.0.100', 39, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (416961, '2020-05-18 20:06:34', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_home_banner) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 4, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262353944998133761, '2020-05-18 20:06:49', 'H5/APP用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=hupeng, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@7a9c68f9]] }', '192.168.0.100', 406, 'hupeng', '内网IP', NULL, 0, 11); +INSERT INTO `log` VALUES (1262354042125631489, '2020-05-18 20:07:12', '查看优惠券', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.CouponController.getList()', '{ queryParam: YxStoreCouponQueryParam() }', '192.168.0.100', 41, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262354042427621377, '2020-05-18 20:07:12', '查看商品详情', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreProductController.detail()', '{ id: 19 latitude: 33.54528 longitude: 113.9202 from: null }', '192.168.0.100', 124, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262354067484393473, '2020-05-18 20:07:18', '添加购物车', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreCartController.add()', '{ jsonStr: {\"productId\":\"19\",\"cartNum\":1,\"new\":1,\"uniqueId\":\"\"} }', '192.168.0.100', 41, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262354078314086402, '2020-05-18 20:07:20', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262354076197191680 }', '192.168.0.100', 13, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262354078314086403, '2020-05-18 20:07:29', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 3, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262358097661083649, '2020-05-18 20:23:19', '进入用户中心', NULL, 'INFO', 'co.yixiang.modules.user.web.controller.UserController.userMenu()', '{ }', '192.168.0.100', 8, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358107781939201, '2020-05-18 20:23:21', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=2) }', '192.168.0.100', 24, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358138266140674, '2020-05-18 20:23:28', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262354076197191680 }', '192.168.0.100', 18, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358200123736066, '2020-05-18 20:23:43', '订单收货', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderTake()', '{ jsonStr: {\"uni\":\"1262354076197191680\"} }', '192.168.0.100', 116, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358200245370882, '2020-05-18 20:23:43', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262354076197191680 }', '192.168.0.100', 10, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358212320772098, '2020-05-18 20:23:46', '查看优惠券', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.CouponController.getList()', '{ queryParam: YxStoreCouponQueryParam() }', '192.168.0.100', 21, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358212434018306, '2020-05-18 20:23:46', '查看商品详情', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreProductController.detail()', '{ id: 19 latitude: 33.54528 longitude: 113.9202 from: null }', '192.168.0.100', 49, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358218629005313, '2020-05-18 20:23:47', '添加购物车', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreCartController.add()', '{ jsonStr: {\"productId\":\"19\",\"cartNum\":1,\"new\":1,\"uniqueId\":\"\"} }', '192.168.0.100', 81, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358223414706177, '2020-05-18 20:23:49', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262358222757429248 }', '192.168.0.100', 9, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358239634079745, '2020-05-18 20:23:52', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262358222757429248 }', '192.168.0.100', 10, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358261939388417, '2020-05-18 20:23:58', '提交订单退款', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.refundVerify()', '{ param: RefundParam(refund_reason_wap_explain=777777, refund_reason_wap_img=, text=收货地址填错了, uni=1262358222757429248) }', '192.168.0.100', 48, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262358262128132098, '2020-05-18 20:23:58', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262358222757429248 }', '192.168.0.100', 9, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262359088544432130, '2020-05-18 20:27:15', '查看优惠券', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.CouponController.getList()', '{ queryParam: YxStoreCouponQueryParam() }', '192.168.0.100', 13, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262359088611540994, '2020-05-18 20:27:15', '查看商品详情', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreProductController.detail()', '{ id: 19 latitude: 33.54528 longitude: 113.9202 from: null }', '192.168.0.100', 28, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262359097948061698, '2020-05-18 20:27:17', '添加购物车', NULL, 'INFO', 'co.yixiang.modules.shop.web.controller.StoreCartController.add()', '{ jsonStr: {\"productId\":\"19\",\"cartNum\":1,\"new\":1,\"uniqueId\":\"\"} }', '192.168.0.100', 42, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262359146702651394, '2020-05-18 20:27:29', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262359144682225664 }', '192.168.0.100', 269, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262359146702651395, '2020-05-18 20:27:37', '所有门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getAll()', '{ criteria: YxSystemStoreQueryCriteria() }', '192.168.0.100', 21, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262359146702651396, '2020-05-18 20:27:37', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 50, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134721, '2020-05-18 20:34:53', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262359144682225664 }', '192.168.0.100', 60, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262361008143134722, '2020-05-18 20:45:59', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.0.100', 45, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134723, '2020-05-18 20:45:59', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134724, '2020-05-18 20:55:06', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 81, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134725, '2020-05-18 20:55:25', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134726, '2020-05-18 20:58:29', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 85, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134727, '2020-05-18 21:00:45', '修改门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.update()', '{ resources: YxSystemStore(id=5, name=郑州门店, introduction=郑州门店, phone=15136175246, address=河南省郑州, detailedAddress=, image=http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png, latitude=34.72468, longitude=113.6401, validTime=2020-03-21 - 2020-03-31, dayTime=17:11:13 - 20:11:15, addTime=1584782199, isShow=1, isDel=0, validTimeEnd=Tue Mar 31 00:00:00 CST 2020, validTimeStart=Sat Mar 21 00:00:00 CST 2020, dayTimeStart=Sat Mar 21 17:11:13 CST 2020, dayTimeEnd=Sat Mar 21 20:11:15 CST 2020) }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134728, '2020-05-18 21:00:45', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134729, '2020-05-18 21:01:26', '获取经纬度', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.create()', '{ jsonStr: {\"addr\":null} }', '192.168.0.100', 1548, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134730, '2020-05-18 21:01:39', '获取经纬度', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.create()', '{ jsonStr: {\"addr\":\"河南信阳\"} }', '192.168.0.100', 709, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134731, '2020-05-18 21:01:42', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134732, '2020-05-18 21:01:42', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria() pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.0.100', 27, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134733, '2020-05-18 21:01:56', '新增门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.create()', '{ resources: YxSystemStore(id=7, name=44, introduction=44, phone=11111, address=河南信阳, detailedAddress=null, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, latitude=32.11683, longitude=114.05857, validTime=2020-05-18 - 2020-06-30, dayTime=08:00:00 - 22:58:28, addTime=1589806916, isShow=1, isDel=0, validTimeEnd=Tue Jun 30 00:00:00 CST 2020, validTimeStart=Mon May 18 00:00:00 CST 2020, dayTimeStart=Mon May 18 08:00:00 CST 2020, dayTimeEnd=Mon May 18 22:58:28 CST 2020) }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134734, '2020-05-18 21:01:57', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134735, '2020-05-18 21:02:00', '删除门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.deleteAll()', '{ ids: [Ljava.lang.Integer;@54831f87 }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134736, '2020-05-18 21:02:00', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134737, '2020-05-18 21:09:30', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@34c1bbfd]] }', '192.168.0.100', 1481, 'admin', '内网IP', NULL, 0, 1); +INSERT INTO `log` VALUES (1262361008143134738, '2020-05-18 21:09:31', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 76, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134739, '2020-05-18 21:09:35', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134740, '2020-05-18 21:09:37', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134741, '2020-05-18 21:09:37', '查询用户', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MemberController.getYxUsers()', '{ criteria: YxUserQueryCriteria(nickname=null, phone=null, isPromoter=null, userType=null) pageable: Page request [number: 0, size 10, sort: uid: DESC] }', '192.168.0.100', 42, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134742, '2020-05-18 21:09:40', '修改门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.update()', '{ resources: YxSystemStoreStaff(id=5, uid=20, avatar=https://image.dayouqiantu.cn/5e79f6cfd33b6.png, storeId=4, staffName=444, phone=44444, verifyStatus=1, status=1, addTime=null, nickname=15136171112, storeName=信阳门店) }', '192.168.0.100', 106, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134743, '2020-05-18 21:09:40', '查询门店店员', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreStaffController.getYxSystemStoreStaffs()', '{ criteria: YxSystemStoreStaffQueryCriteria(staffName=null, nickname=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134744, '2020-05-18 21:09:49', '查询门店', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemStoreController.getYxSystemStores()', '{ criteria: YxSystemStoreQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134745, '2020-05-19 10:06:50', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@77581068]] }', '192.168.0.100', 2225, 'admin', '内网IP', NULL, 0, 1); +INSERT INTO `log` VALUES (1262361008143134746, '2020-05-19 10:07:01', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134747, '2020-05-19 10:07:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 86, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134748, '2020-05-19 10:07:02', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 123, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134749, '2020-05-19 10:07:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=1, isShow=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 141, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134750, '2020-05-19 10:07:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 139, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134751, '2020-05-19 10:07:08', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134752, '2020-05-19 10:10:02', '修改商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=3, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=3, pid=null, cateName=图文广告, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 64, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134753, '2020-05-19 10:10:02', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 421, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134754, '2020-05-19 10:10:10', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134755, '2020-05-19 10:10:13', '修改商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=5, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=5, pid=null, cateName=平面设计, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 41, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134756, '2020-05-19 10:10:14', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134757, '2020-05-19 10:11:12', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 320, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134758, '2020-05-19 10:11:20', '修改商品', 'java.lang.NullPointerException\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl.updateProduct(YxStoreProductServiceImpl.java:269)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$FastClassBySpringCGLIB$$cbfb4ced.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$EnhancerBySpringCGLIB$$a9d851b9.updateProduct()\r\n at co.yixiang.modules.shop.rest.StoreProductController.update(StoreProductController.java:76)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$FastClassBySpringCGLIB$$7f5f9c6a.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$EnhancerBySpringCGLIB$$874f5d87.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=null, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=null, pid=null, cateName=名片, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134759, '2020-05-19 10:14:32', '修改商品', 'java.lang.NullPointerException\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl.updateProduct(YxStoreProductServiceImpl.java:270)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$FastClassBySpringCGLIB$$cbfb4ced.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$EnhancerBySpringCGLIB$$cc068e83.updateProduct()\r\n at co.yixiang.modules.shop.rest.StoreProductController.update(StoreProductController.java:76)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$FastClassBySpringCGLIB$$7f5f9c6a.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$EnhancerBySpringCGLIB$$2e907eaa.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=null, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=null, pid=null, cateName=名片, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134760, '2020-05-19 10:16:47', '修改商品', 'co.yixiang.exception.BadRequestException: 请选择分类\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl.updateProduct(YxStoreProductServiceImpl.java:269)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$FastClassBySpringCGLIB$$cbfb4ced.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)\r\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.service.impl.YxStoreProductServiceImpl$$EnhancerBySpringCGLIB$$d0dab694.updateProduct()\r\n at co.yixiang.modules.shop.rest.StoreProductController.update(StoreProductController.java:76)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$FastClassBySpringCGLIB$$7f5f9c6a.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:53)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:365)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:420)\r\n at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)\r\n at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.shop.rest.StoreProductController$$EnhancerBySpringCGLIB$$691ae57d.update()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:912)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:663)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\n', 'ERROR', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=null, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=null, pid=null, cateName=名片, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134761, '2020-05-19 10:17:50', '修改商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.update()', '{ resources: YxStoreProduct(id=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, sliderImage=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, storeName=9999, storeInfo=, keyword=, barCode=, cateId=2, price=0, vipPrice=0, otPrice=0, postage=0, unitName=张, sort=0, sales=0, stock=0, isShow=1, isHot=0, isBenefit=0, isBest=0, isNew=0, description=

999999

, addTime=1589796278, isPostage=0, isDel=0, merUse=0, giveIntegral=0, cost=0, isSeckill=0, isBargain=0, isGood=0, ficti=0, browse=0, codePath=, soureLink=, storeCategory=YxStoreCategory(id=2, pid=null, cateName=名片, sort=null, pic=null, isShow=null, addTime=null, isDel=null)) }', '192.168.0.100', 62, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134762, '2020-05-19 10:17:50', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 473, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134763, '2020-05-19 10:18:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 34, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134764, '2020-05-19 10:18:30', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 20, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134765, '2020-05-19 10:18:31', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=1, isShow=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 11, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134766, '2020-05-19 10:18:33', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 60, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134767, '2020-05-19 10:18:37', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 39, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134768, '2020-05-19 10:18:38', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134769, '2020-05-19 10:18:40', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 26, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134770, '2020-05-19 10:18:49', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 64, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134771, '2020-05-19 10:20:09', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 66, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134772, '2020-05-19 10:20:09', '列表', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.getYxStoreSeckills()', '{ criteria: YxStoreSeckillQueryCriteria(title=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 63, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134773, '2020-05-19 10:20:44', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 80, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134774, '2020-05-19 10:22:22', '修改拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.update()', '{ resources: YxStoreCombination(id=4, productId=28, merId=0, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, title=9999, attr=null, people=1, info=, price=0, sort=0, sales=0, stock=1, addTime=1589800141, isHost=0, isShow=1, isDel=0, combination=1, merUse=null, isPostage=0, postage=0, description=

999999

, startTime=1589731200, stopTime=1590768000, effectiveTime=24, cost=0, browse=0, unitName=张, endTimeDate=2020-05-30 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 31, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134775, '2020-05-19 10:22:22', '查询拼团', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreCombinationController.getYxStoreCombinations()', '{ criteria: YxStoreCombinationQueryCriteria(title=null, isDel=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 49, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134776, '2020-05-19 10:22:28', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134777, '2020-05-19 10:22:28', '列表', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreSeckillController.getYxStoreSeckills()', '{ criteria: YxStoreSeckillQueryCriteria(title=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134778, '2020-05-19 10:22:49', '查询砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.getYxStoreBargains()', '{ criteria: YxStoreBargainQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 36, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134779, '2020-05-19 10:25:02', '修改砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.update()', '{ resources: YxStoreBargain(id=5, productId=28, title=9999, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, unitName=张, stock=1, sales=0, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, startTime=1589731200, stopTime=1590595200, storeName=null, price=0.01, minPrice=1, num=1, bargainMaxPrice=1, bargainMinPrice=1, bargainNum=1, status=1, description=

999999

, giveIntegral=0, info=, cost=0, sort=0, isHot=0, isDel=0, addTime=1589799708, isPostage=0, postage=0, rule=

7777

, look=0, share=0, endTimeDate=2020-05-28 00:00:00.0, startTimeDate=2020-05-18 00:00:00.0) }', '192.168.0.100', 49, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134780, '2020-05-19 10:25:02', '查询砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.getYxStoreBargains()', '{ criteria: YxStoreBargainQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134781, '2020-05-19 10:25:11', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134782, '2020-05-19 10:25:12', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=1, isShow=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134783, '2020-05-19 10:25:12', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 19, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134784, '2020-05-19 10:25:12', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 19, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134785, '2020-05-19 10:27:24', '查询数据配置', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemGroupDataController.getYxSystemGroupDatas()', '{ criteria: YxSystemGroupDataQueryCriteria(groupName=yshop_seckill_time) pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 7, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134786, '2020-05-19 10:27:24', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=1, isShow=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134787, '2020-05-19 10:27:24', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 17, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134788, '2020-05-19 10:27:24', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 19, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134789, '2020-05-19 10:28:20', '修改砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.update()', '{ resources: YxStoreBargain(id=6, productId=27, title=9999, image=http://localhost:8000/file/pic/资讯-20200311043727918.png, unitName=9, stock=2, sales=0, images=http://localhost:8000/file/pic/钻石-20200328094531898.jpg, startTime=1589855271, stopTime=1590422400, storeName=null, price=0.01, minPrice=1, num=1, bargainMaxPrice=1, bargainMinPrice=1, bargainNum=1, status=1, description=

999999

, giveIntegral=0, info=999, cost=0, sort=0, isHot=0, isDel=0, addTime=1589855299, isPostage=0, postage=0, rule=

666

, look=null, share=null, endTimeDate=2020-05-26 00:00:00.0, startTimeDate=2020-05-19 10:27:51.0) }', '192.168.0.100', 46, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134790, '2020-05-19 10:28:20', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 15, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134791, '2020-05-19 10:28:25', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 29, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134792, '2020-05-19 10:28:40', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 9, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134793, '2020-05-19 10:28:44', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 8, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134794, '2020-05-19 10:28:44', '查询商品', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 10, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134795, '2020-05-19 10:30:09', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserBillController.getYxUserBills()', '{ criteria: YxUserBillQueryCriteria(nickname=, category=, type=) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 22, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134796, '2020-05-19 10:30:18', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserBillController.getYxUserBills()', '{ criteria: YxUserBillQueryCriteria(nickname=, category=, type=) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134797, '2020-05-19 10:30:35', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 22, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134798, '2020-05-19 10:30:55', '删除菜单', 'org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2\r\n at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:78)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)\r\n at com.sun.proxy.$Proxy111.selectOne(Unknown Source)\r\n at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:159)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:89)\r\n at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)\r\n at com.sun.proxy.$Proxy136.selectOne(Unknown Source)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\r\n at com.sun.proxy.$Proxy137.selectOne(Unknown Source)\r\n at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.getOne(ServiceImpl.java:254)\r\n at com.baomidou.mybatisplus.extension.service.IService.getOne(IService.java:192)\r\n at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:684)\r\n at co.yixiang.modules.system.service.impl.MenuServiceImpl$$EnhancerBySpringCGLIB$$446335f3.getOne()\r\n at co.yixiang.modules.system.rest.MenuController.delete(MenuController.java:148)\r\n at co.yixiang.modules.system.rest.MenuController$$FastClassBySpringCGLIB$$df40f4f4.invoke()\r\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)\r\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:746)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\r\n at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)\r\n at co.yixiang.logging.aspect.LogAspect.logAround(LogAspect.java:62)\r\n at sun.reflect.GeneratedMethodAccessor433.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)\r\n at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)\r\n at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:62)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)\r\n at org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:69)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)\r\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\r\n at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)\r\n at co.yixiang.modules.system.rest.MenuController$$EnhancerBySpringCGLIB$$869ed6e8.delete()\r\n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215)\r\n at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:142)\r\n at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)\r\n at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800)\r\n at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\r\n at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038)\r\n at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942)\r\n at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998)\r\n at org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:923)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:666)\r\n at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875)\r\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)\r\n at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at co.yixiang.modules.security.security.TokenFilter.doFilter(TokenFilter.java:62)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)\r\n at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)\r\n at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)\r\n at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)\r\n at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)\r\n at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\r\n at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)\r\n at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)\r\n at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)\r\n at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)\r\n at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)\r\n at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)\r\n at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)\r\n at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\r\n at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)\r\n at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)\r\n at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)\r\n at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)\r\n at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)\r\n at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)\r\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\r\n at java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2\r\n at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:80)\r\n at sun.reflect.GeneratedMethodAccessor200.invoke(Unknown Source)\r\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n at java.lang.reflect.Method.invoke(Method.java:498)\r\n at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)\r\n ... 133 more\r\n', 'ERROR', 'co.yixiang.modules.system.rest.MenuController.delete()', '{ ids: [16] }', '192.168.0.100', 12, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134799, '2020-05-19 10:36:38', '删除菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.delete()', '{ ids: [16] }', '192.168.0.100', 154, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134800, '2020-05-19 10:36:39', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 399, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134801, '2020-05-19 10:36:45', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserBillController.getYxUserBills()', '{ criteria: YxUserBillQueryCriteria(nickname=, category=, type=) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 85, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134802, '2020-05-19 10:37:59', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.UserBillController.getYxUserBills()', '{ criteria: YxUserBillQueryCriteria(nickname=, category=, type=) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 13, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134803, '2020-05-19 10:38:34', '查询菜单', NULL, 'INFO', 'co.yixiang.modules.system.rest.MenuController.getMenus()', '{ criteria: MenuQueryCriteria() }', '192.168.0.100', 23, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134804, '2020-05-19 10:39:50', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 37, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134805, '2020-05-19 10:39:50', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 45, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134806, '2020-05-19 10:39:50', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 61, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134807, '2020-05-19 10:39:51', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134808, '2020-05-19 10:40:33', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 53, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134809, '2020-05-19 10:40:33', '查询角色', NULL, 'INFO', 'co.yixiang.modules.system.rest.RoleController.getRoles()', '{ criteria: RoleQueryCriteria() pageable: Page request [number: 0, size 10, sort: level: ASC] }', '192.168.0.100', 25, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134810, '2020-05-19 10:40:40', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 6, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134811, '2020-05-19 10:40:40', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 14, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134812, '2020-05-19 10:40:40', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 30, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134813, '2020-05-19 10:40:41', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 24, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134814, '2020-05-19 10:40:57', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[], name=null, enabled=true, pid=null, createTime=null) }', '192.168.0.100', 28, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134815, '2020-05-19 10:40:57', '查询岗位', NULL, 'INFO', 'co.yixiang.modules.system.rest.JobController.getJobs()', '{ criteria: JobQueryCriteria(name=null, enabled=null, deptId=2, deptIds=[], createTime=null) pageable: Page request [number: 0, size 2000, sort: UNSORTED] }', '192.168.0.100', 18, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134816, '2020-05-19 10:41:11', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=test2, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@503d3349]] }', '192.168.0.100', 732, 'test2', '内网IP', NULL, 0, 4); +INSERT INTO `log` VALUES (1262361008143134817, '2020-05-19 10:41:11', '查询字典详情', NULL, 'INFO', 'co.yixiang.modules.system.rest.DictDetailController.getDictDetails()', '{ criteria: DictDetailQueryCriteria(label=null, dictName=user_status) pageable: Page request [number: 0, size 2000, sort: sort: ASC] }', '192.168.0.100', 17, 'test2', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134818, '2020-05-19 10:41:11', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[2], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 14, 'test2', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134819, '2020-05-19 10:41:11', '查询部门', NULL, 'INFO', 'co.yixiang.modules.system.rest.DeptController.getDepts()', '{ criteria: DeptQueryCriteria(ids=[2], name=null, enabled=null, pid=null, createTime=null) }', '192.168.0.100', 28, 'test2', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134820, '2020-05-19 10:41:11', '查询用户', NULL, 'INFO', 'co.yixiang.modules.system.rest.SysUserController.getUsers()', '{ criteria: UserQueryCriteria(id=null, deptIds=[2], blurry=null, enabled=null, deptId=null, createTime=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 73, 'test2', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134821, '2020-05-19 10:41:54', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 33, 'test2', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134822, '2020-05-19 10:42:11', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@a199ebc]] }', '192.168.0.100', 99, 'admin', '内网IP', NULL, 0, 1); +INSERT INTO `log` VALUES (1262361008143134823, '2020-05-19 10:42:12', '查询快递', NULL, 'INFO', 'co.yixiang.modules.shop.rest.ExpressController.getYxExpresss()', '{ criteria: YxExpressQueryCriteria() pageable: Page request [number: 0, size 20, sort: UNSORTED] }', '192.168.0.100', 5, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262361008143134824, '2020-05-19 10:42:39', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.getYxStoreProductReplys()', '{ criteria: YxStoreProductReplyQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 17, 'admin', '内网IP', NULL, 0, NULL); +INSERT INTO `log` VALUES (1262575210858401794, '2020-05-19 10:46:02', 'H5/APP用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=hupeng, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@757aea00]] }', '192.168.0.100', 510, 'hupeng', '内网IP', NULL, 0, 11); +INSERT INTO `log` VALUES (1262575215421804545, '2020-05-19 10:46:04', '进入用户中心', NULL, 'INFO', 'co.yixiang.modules.user.web.controller.UserController.userMenu()', '{ }', '192.168.0.100', 11, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575250670735361, '2020-05-19 10:46:12', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=3) }', '192.168.0.100', 50, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575255536128001, '2020-05-19 10:46:13', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262359144682225664 }', '192.168.0.100', 30, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575318031257601, '2020-05-19 10:46:28', '评价商品', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.comment()', '{ productReply: YxStoreProductReply(id=6, uid=11, oid=157, unique=f4d6e6a9cb86411c85fe87dbf2b1eb6b, productId=19, replyType=product, productScore=5, serviceScore=5, comment=8888, pics=http://localhost:8009/api/file/pic/list_16-20200519104626560.png, addTime=1589856387, merchantReplyContent=null, merchantReplyTime=null, isDel=null, isReply=null) }', '192.168.0.100', 112, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575318303887361, '2020-05-19 10:46:28', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262359144682225664 }', '192.168.0.100', 22, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575350172209153, '2020-05-19 10:46:36', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=-3) }', '192.168.0.100', 17, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575362839007233, '2020-05-19 10:46:39', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=3) }', '192.168.0.100', 15, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575368979468289, '2020-05-19 10:46:40', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=4) }', '192.168.0.100', 12, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575377938501634, '2020-05-19 10:46:42', '查看订单列表', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.orderList()', '{ queryParam: YxStoreOrderQueryParam(type=3) }', '192.168.0.100', 21, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575380937428994, '2020-05-19 10:46:43', '查看订单详情', NULL, 'INFO', 'co.yixiang.modules.order.web.controller.StoreOrderController.detail()', '{ key: 1262354076197191680 }', '192.168.0.100', 10, 'hupeng', '内网IP', NULL, 1, 11); +INSERT INTO `log` VALUES (1262575380937428995, '2020-05-19 10:46:50', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.StoreProductReplyController.getYxStoreProductReplys()', '{ criteria: YxStoreProductReplyQueryCriteria(isDel=0) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.0.100', 66, 'admin', '内网IP', NULL, 0, NULL); + +-- ---------------------------- +-- 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 (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 (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 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, '1111114444', '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', '测试43', 'run', '44', '不带参测试', '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 (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 = 7 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', '男'); +INSERT INTO `user` VALUES (6, NULL, '666@qq.com', 0, '$2a$10$3Vlo24eOmHHW7.3vAjqPSusfIINNo4JiujzxgqsaoWLx/d5de/jEm', '7777', 8, '15136175246', 8, '2020-05-18 19:43:30', NULL, '777', '男'); + +-- ---------------------------- +-- 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); +INSERT INTO `users_roles` VALUES (6, 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 = 99 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'); +INSERT INTO `visits` VALUES (94, '2020-05-18 15:34:23', '2020-05-18', 1, 1, 'Mon'); +INSERT INTO `visits` VALUES (97, '2020-05-19 10:01:41', '2020-05-19', 1, 1, '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 = 8 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); + +-- ---------------------------- +-- 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, + INDEX `is_show`(`is_show`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 432 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', '圆通速递2', 0, 0); +INSERT INTO `yx_express` VALUES (430, '555', '555555', 0, 0); +INSERT INTO `yx_express` VALUES (431, '555', '5555', 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; + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- 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 = 7 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'); +INSERT INTO `yx_store_bargain` VALUES (4, 28, '9999', 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '张', 0, 0, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1589731200, 1590768000, NULL, 0.01, NULL, 1, NULL, NULL, 1, 1, '

999999

', 0.00, '333', 0.00, 0, 0, 0, 1589799053, 0, 0.00, '

33333

', 0, 0, '2020-05-30 00:00:00', '2020-05-18 00:00:00'); +INSERT INTO `yx_store_bargain` VALUES (5, 28, '9999', 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '张', 1, 0, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1589731200, 1590595200, NULL, 0.01, 1.00, 1, 1.00, 1.00, 1, 1, '

999999

', 0.00, '', 0.00, 0, 0, 0, 1589799708, 0, 0.00, '

7777

', 0, 0, '2020-05-28 00:00:00', '2020-05-18 00:00:00'); +INSERT INTO `yx_store_bargain` VALUES (6, 27, '9999', 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '9', 2, 0, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1589855271, 1590422400, NULL, 0.01, 1.00, 1, 1.00, 1.00, 1, 1, '

999999

', 0.00, '999', 0.00, 0, 0, 0, 1589855299, 0, 0.00, '

666

', 0, 0, '2020-05-26 00:00:00', '2020-05-19 10:27:51'); + +-- ---------------------------- +-- 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 = 164 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); +INSERT INTO `yx_store_cart` VALUES (161, 11, 'product', 19, '', 1, 1589803637, 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (162, 11, 'product', 19, '', 1, 1589804627, 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (163, 11, 'product', 19, '', 1, 1589804837, 1, 0, 1, 0, 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 = 9 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); +INSERT INTO `yx_store_category` VALUES (6, 0, '666', 1, '', 1, 1589792698, 0); +INSERT INTO `yx_store_category` VALUES (7, 0, '9999', 1, '', 1, 1589795680, 0); +INSERT INTO `yx_store_category` VALUES (8, 7, '8888', 1, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1, 1589795706, 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 = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团产品表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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 = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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 = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券前台领取表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- 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 = 158 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 = 154 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 = 288 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 = 29 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, 52, 72, 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, '', ''); + +-- ---------------------------- +-- 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 = 18 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 = 10 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); +INSERT INTO `yx_store_product_attr_result` VALUES (9, 28, '{\"attr\":[{\"attrHidden\":true,\"detailValue\":\"\",\"detail\":[\"黑色\",\"白色\"],\"value\":\"颜色\"},{\"attrHidden\":true,\"detailValue\":\"\",\"detail\":[\"11\"],\"value\":\"尺寸\"}],\"value\":[{\"cost\":0,\"price\":0,\"pic\":\"http://localhost:8000/file/pic/资讯-20200311043727918.png\",\"detail\":{\"颜色\":\"黑色\",\"尺寸\":\"11\"},\"check\":false,\"sales\":0},{\"cost\":0,\"price\":0,\"pic\":\"http://localhost:8000/file/pic/资讯-20200311043727918.png\",\"detail\":{\"颜色\":\"白色\",\"尺寸\":\"11\"},\"check\":false,\"sales\":0}]}', 1589854701); + +-- ---------------------------- +-- 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 = 32 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); +INSERT INTO `yx_store_product_attr_value` VALUES (30, 28, '11,黑色', 0, 0, 0.00, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 'b8f3e4936b294a8a9fb433f1324eabe4', 0.00); +INSERT INTO `yx_store_product_attr_value` VALUES (31, 28, '11,白色', 0, 0, 0.00, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '42b4b10585f14d6c96f07372e46fb63b', 0.00); + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- 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 = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评论表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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 = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品秒杀产品表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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 = 30 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', '1111299', 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 = 238 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\":\"banner2\",\"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 = 8 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'); +INSERT INTO `yx_system_store` VALUES (7, '44', '44', '11111', '河南信阳', '', 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '32.11683', '114.05857', '2020-05-18 - 2020-06-30', '08:00:00 - 22:58:28', 1589806916, 1, 0, '2020-05-18 22:58:28', '2020-05-18 08:00:00', '2020-06-30 00:00:00', '2020-05-18 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 = 6 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); +INSERT INTO `yx_system_store_staff` VALUES (5, 20, '15136171112', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', 4, '信阳门店', '444', '44444', 1, 1, NULL); + +-- ---------------------------- +-- 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 = 10 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); +INSERT INTO `yx_system_user_level` VALUES (8, 0, '444', 0.00, 4, 1, 0, 1, 4, 4.00, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 'http://localhost:8000/file/pic/05ea40b831858a8cf423aa709840507c-20200311043711341.png', '', 1589793284, 0); +INSERT INTO `yx_system_user_level` VALUES (9, 0, '777', 0.00, 0, 1, 0, 1, 33, 8.00, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 'http://localhost:8000/file/pic/资讯-20200311043727918.png', '', 1589796908, 0); + +-- ---------------------------- +-- 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, '', 7381.31, 27.86, 990.06, 1, 1, 1, 0, 1, 'h5', 0, 42, 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, '', 99.00, 0.00, 0.00, 0, 1, 0, 11, 1585385387, 'h5', 1, 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 = 137 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户账单表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- 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, '失败了', 1589800488, 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; + +-- ---------------------------- +-- 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_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_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\":\"22222222222444499990000\"}', 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/pom.xml b/yshop-api/pom.xml index e113b267..1b3601e4 100644 --- a/yshop-api/pom.xml +++ b/yshop-api/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -21,12 +21,12 @@ co.yixiang yshop-tools - 2.1 + 2.2 co.yixiang yshop-mp - 2.1 + 2.2 @@ -113,4 +113,4 @@ - \ No newline at end of file + diff --git a/yshop-api/src/main/java/co/yixiang/config/RedisConfigProperties.java b/yshop-api/src/main/java/co/yixiang/config/RedisConfigProperties.java index 58099bc2..d94c0e0f 100644 --- a/yshop-api/src/main/java/co/yixiang/config/RedisConfigProperties.java +++ b/yshop-api/src/main/java/co/yixiang/config/RedisConfigProperties.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/config/RedisListenerConfig.java b/yshop-api/src/main/java/co/yixiang/config/RedisListenerConfig.java index 549b5679..1538aa2e 100644 --- a/yshop-api/src/main/java/co/yixiang/config/RedisListenerConfig.java +++ b/yshop-api/src/main/java/co/yixiang/config/RedisListenerConfig.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/listener/RedisKeyExpirationListener.java b/yshop-api/src/main/java/co/yixiang/listener/RedisKeyExpirationListener.java index ef0f2f4c..0e0acbcd 100644 --- a/yshop-api/src/main/java/co/yixiang/listener/RedisKeyExpirationListener.java +++ b/yshop-api/src/main/java/co/yixiang/listener/RedisKeyExpirationListener.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/entity/YxStoreSeckill.java b/yshop-api/src/main/java/co/yixiang/modules/activity/entity/YxStoreSeckill.java index 9e47053b..06efda5f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/entity/YxStoreSeckill.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/entity/YxStoreSeckill.java @@ -20,7 +20,7 @@ import java.util.Date; * 商品秒杀产品表 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-14 */ @Data diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/mapper/YxStoreSeckillMapper.java b/yshop-api/src/main/java/co/yixiang/modules/activity/mapper/YxStoreSeckillMapper.java index d4513f97..48934df8 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/mapper/YxStoreSeckillMapper.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/mapper/YxStoreSeckillMapper.java @@ -20,7 +20,7 @@ import java.util.List; * 商品秒杀产品表 Mapper 接口 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-14 */ @Repository diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java index a76cafcc..d0109c5d 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java index 92976ead..61c78356 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java index afa13207..821bb055 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java index cecfc035..b5675367 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java index f69d9270..80fcd6cd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java index 21728e9d..54b6bd42 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -23,7 +23,7 @@ import java.util.List; * 商品秒杀产品表 服务类 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-14 */ public interface YxStoreSeckillService extends BaseService { diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java index 95a001b4..25173dd6 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java index e630dbcf..1dca8791 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java index 93d61686..8c82c054 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java index 96af7a5f..2c27b1a6 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java index f92b1437..cf9c6aad 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java index 26aa75c7..5a03a1df 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreBargainController.java b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreBargainController.java index be086eab..4e1bb9ac 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreBargainController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreBargainController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -16,7 +16,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.qrcode.QrCodeUtil; import cn.hutool.http.HttpUtil; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.enums.AppFromEnum; diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreCombinationController.java b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreCombinationController.java index afdb09d3..5c666010 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreCombinationController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreCombinationController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -15,7 +15,7 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.extra.qrcode.QrCodeUtil; import cn.hutool.http.HttpUtil; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.enums.AppFromEnum; diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreSeckillController.java b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreSeckillController.java index 5ae4c127..e1706c4f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreSeckillController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/web/controller/StoreSeckillController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/web/param/YxStoreSeckillQueryParam.java b/yshop-api/src/main/java/co/yixiang/modules/activity/web/param/YxStoreSeckillQueryParam.java index c67b55b0..5d7f276f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/web/param/YxStoreSeckillQueryParam.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/web/param/YxStoreSeckillQueryParam.java @@ -11,7 +11,7 @@ import co.yixiang.common.web.param.QueryParam; * 商品秒杀产品表 查询参数对象 *

* - * @author xuwenbo + * @author hupeng * @date 2019-12-14 */ @Data diff --git a/yshop-api/src/main/java/co/yixiang/modules/activity/web/vo/YxStoreSeckillQueryVo.java b/yshop-api/src/main/java/co/yixiang/modules/activity/web/vo/YxStoreSeckillQueryVo.java index 458009ee..0864e20d 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/activity/web/vo/YxStoreSeckillQueryVo.java +++ b/yshop-api/src/main/java/co/yixiang/modules/activity/web/vo/YxStoreSeckillQueryVo.java @@ -16,7 +16,7 @@ import java.util.List; * 商品秒杀产品表 查询结果对象 *

* - * @author xuwenbo + * @author hupeng * @date 2019-12-14 */ @Data @@ -116,4 +116,4 @@ public class YxStoreSeckillQueryVo implements Serializable{ -} \ No newline at end of file +} diff --git a/yshop-api/src/main/java/co/yixiang/modules/manage/service/YxExpressService.java b/yshop-api/src/main/java/co/yixiang/modules/manage/service/YxExpressService.java index 9b5a4322..b15c5381 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/manage/service/YxExpressService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/manage/service/YxExpressService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/manage/service/impl/YxExpressServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/manage/service/impl/YxExpressServiceImpl.java index dcb1673b..a9a132a2 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/manage/service/impl/YxExpressServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/manage/service/impl/YxExpressServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/manage/web/controller/ShoperController.java b/yshop-api/src/main/java/co/yixiang/modules/manage/web/controller/ShoperController.java index e1bc8047..8aac2ab9 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/manage/web/controller/ShoperController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/manage/web/controller/ShoperController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java b/yshop-api/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java index a6b1067c..24afb1fe 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/RedisService.java b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/RedisService.java index 2ed8bee6..b306ff85 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/RedisService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/RedisService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java index 9e89ada1..445d3b4d 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java index 74974904..59cbbe74 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java index d4dfda9e..92ba935a 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -11,11 +11,10 @@ package co.yixiang.modules.monitor.service.impl; import co.yixiang.modules.monitor.domain.Visits; import co.yixiang.modules.monitor.repository.VisitsRepository; import co.yixiang.modules.monitor.service.VisitsService; +import co.yixiang.logging.service.mapper.LogMapper; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import co.yixiang.repository.LogRepository; import co.yixiang.utils.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -34,7 +33,7 @@ import java.util.stream.Collectors; public class VisitsServiceImpl implements VisitsService { private final VisitsRepository visitsRepository; - private final LogRepository logRepository; + private final LogMapper logMapper; @Override public void save() { @@ -55,7 +54,7 @@ public class VisitsServiceImpl implements VisitsService { LocalDate localDate = LocalDate.now(); Visits visits = visitsRepository.findByDate(localDate.toString()); visits.setPvCounts(visits.getPvCounts()+1); - long ipCounts = logRepository.findIp(localDate.toString(), localDate.plusDays(1).toString()); + long ipCounts = logMapper.findIp(localDate.toString(), localDate.plusDays(1).toString()); visits.setIpCounts(ipCounts); visitsRepository.save(visits); } diff --git a/yshop-api/src/main/java/co/yixiang/modules/notify/AliyunSmsSender.java b/yshop-api/src/main/java/co/yixiang/modules/notify/AliyunSmsSender.java index 3b0d1cc1..fe326111 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/notify/AliyunSmsSender.java +++ b/yshop-api/src/main/java/co/yixiang/modules/notify/AliyunSmsSender.java @@ -1,6 +1,6 @@ package co.yixiang.modules.notify; -import co.yixiang.utils.JacksonUtil; +import co.yixiang.tools.utils.JacksonUtil; import com.aliyuncs.CommonRequest; import com.aliyuncs.CommonResponse; import com.aliyuncs.DefaultAcsClient; diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java index 7a151e31..d4c3c9d3 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java index 91ea66f5..762dfe27 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java index a5ebc66d..aaab19a6 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java index 2e714e4a..007c3321 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java index 44fbb1dc..9c1d6921 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -16,8 +16,8 @@ import cn.hutool.core.util.StrUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.web.vo.Paging; import co.yixiang.constant.ShopConstants; -import co.yixiang.domain.AlipayConfig; -import co.yixiang.domain.vo.TradeVo; +import co.yixiang.tools.domain.AlipayConfig; +import co.yixiang.tools.domain.vo.TradeVo; import co.yixiang.enums.*; import co.yixiang.exception.ErrorRequestException; import co.yixiang.modules.activity.service.*; @@ -59,7 +59,7 @@ import co.yixiang.modules.user.web.vo.YxWechatUserQueryVo; import co.yixiang.mp.service.YxPayService; import co.yixiang.mp.service.YxTemplateService; import co.yixiang.mp.service.YxMiniPayService; -import co.yixiang.service.AlipayService; +import co.yixiang.tools.service.AlipayConfigService; import co.yixiang.utils.OrderUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -142,7 +142,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl map = new LinkedHashMap<>(); - map.put("token", token); - map.put("expires_time", expiresTimeStr); - - if (singleLogin) { - //踢掉之前已经登录的token - onlineUserService.checkLoginOnUser(jwtUserT.getUsername(), token); - } - - //设置推广关系 - if (StrUtil.isNotEmpty(spread) && !spread.equals("NaN")) { - userService.setSpread(Integer.valueOf(spread), - jwtUserT.getId().intValue()); - } - - // 返回 token - return ApiResult.ok(map); - } catch (WxErrorException e) { - e.printStackTrace(); - log.error(e.getMessage()); - return ApiResult.fail("授权失败"); - } - + return ApiResult.ok(userService.authLogin(code,spread,request)); } @@ -304,135 +162,8 @@ public class AuthController { * 2、目前登陆授权打通方式适用于新项目(也就是你yx_user、yx_wechat_user都是空的) * 3、如果你以前已经有数据请自行处理 */ - String code = loginParam.getCode(); - String encryptedData = loginParam.getEncryptedData(); - String iv = loginParam.getIv(); - String spread = loginParam.getSpread(); - try { - //读取redis配置 - String appId = RedisUtil.get(RedisKeyEnum.WXAPP_APPID.getValue()); - String secret = RedisUtil.get(RedisKeyEnum.WXAPP_SECRET.getValue()); - if (StrUtil.isBlank(appId) || StrUtil.isBlank(secret)) { - throw new ErrorRequestException("请先配置小程序"); - } - WxMaDefaultConfigImpl wxMaConfig = new WxMaDefaultConfigImpl(); - wxMaConfig.setAppid(appId); - wxMaConfig.setSecret(secret); + return ApiResult.ok(userService.wxappAuth(loginParam,request)) ; - wxMaService.setWxMaConfig(wxMaConfig); - WxMaJscode2SessionResult session = wxMaService.getUserService().getSessionInfo(code); - String openid = session.getOpenid(); - //如果开启了UnionId - if (StrUtil.isNotBlank(session.getUnionid())) { - openid = session.getUnionid(); - } - - YxUser yxUser = userService.findByName(openid); - String username = ""; - if(ObjectUtil.isNull(yxUser)){ - - WxMaUserInfo wxMpUser = wxMaService.getUserService() - .getUserInfo(session.getSessionKey(), encryptedData, iv); - //过滤掉表情 - String nickname = EmojiParser.removeAllEmojis(wxMpUser.getNickName()); - //用户保存 - YxUser user = new YxUser(); - user.setAccount(nickname); - - //如果开启了UnionId - if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { - username = wxMpUser.getUnionId(); - user.setUsername(wxMpUser.getUnionId()); - }else{ - username = wxMpUser.getOpenId(); - user.setUsername(wxMpUser.getOpenId()); - } - user.setPassword(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); - user.setPwd(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); - user.setPhone(""); - user.setUserType(AppFromEnum.ROUNTINE.getValue()); - user.setAddTime(OrderUtil.getSecondTimestampTwo()); - user.setLastTime(OrderUtil.getSecondTimestampTwo()); - user.setNickname(nickname); - user.setAvatar(wxMpUser.getAvatarUrl()); - user.setNowMoney(BigDecimal.ZERO); - user.setBrokeragePrice(BigDecimal.ZERO); - user.setIntegral(BigDecimal.ZERO); - - userService.save(user); - - - //保存微信用户 - YxWechatUser yxWechatUser = new YxWechatUser(); - // System.out.println("wxMpUser:"+wxMpUser); - yxWechatUser.setAddTime(OrderUtil.getSecondTimestampTwo()); - yxWechatUser.setNickname(nickname); - yxWechatUser.setRoutineOpenid(wxMpUser.getOpenId()); - int sub = 0; - yxWechatUser.setSubscribe(sub); - yxWechatUser.setSex(Integer.valueOf(wxMpUser.getGender())); - yxWechatUser.setLanguage(wxMpUser.getLanguage()); - yxWechatUser.setCity(wxMpUser.getCity()); - yxWechatUser.setProvince(wxMpUser.getProvince()); - yxWechatUser.setCountry(wxMpUser.getCountry()); - yxWechatUser.setHeadimgurl(wxMpUser.getAvatarUrl()); - if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { - yxWechatUser.setUnionid(wxMpUser.getUnionId()); - } - yxWechatUser.setUid(user.getUid()); - - wechatUserService.save(yxWechatUser); - - }else{ - username = yxUser.getUsername(); - if(StrUtil.isNotBlank(session.getOpenid()) || StrUtil.isNotBlank(session.getUnionid())){ - YxWechatUser wechatUser = new YxWechatUser(); - wechatUser.setUid(yxUser.getUid()); - wechatUser.setUnionid(session.getUnionid()); - wechatUser.setRoutineOpenid(session.getOpenid()); - - wechatUserService.updateById(wechatUser); - } - } - - - UsernamePasswordAuthenticationToken authenticationToken = - new UsernamePasswordAuthenticationToken(username, - ShopConstants.YSHOP_DEFAULT_PWD); - - Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); - SecurityContextHolder.getContext().setAuthentication(authentication); - // 生成令牌 - String token = tokenProvider.createToken(authentication); - final JwtUser jwtUserT = (JwtUser) authentication.getPrincipal(); - // 保存在线信息 - onlineUserService.save(jwtUserT, token, request); - - Date expiresTime = tokenProvider.getExpirationDateFromToken(token); - String expiresTimeStr = DateUtil.formatDateTime(expiresTime); - - - Map map = new LinkedHashMap<>(); - map.put("token", token); - map.put("expires_time", expiresTimeStr); - - if (singleLogin) { - //踢掉之前已经登录的token - onlineUserService.checkLoginOnUser(jwtUserT.getUsername(), token); - } - - //设置推广关系 - if (StrUtil.isNotEmpty(spread)) { - userService.setSpread(Integer.valueOf(spread), - jwtUserT.getId().intValue()); - } - - // 返回 token - return ApiResult.ok(map); - } catch (WxErrorException e) { - log.error(e.getMessage(), e); - return ApiResult.fail(e.toString()); - } } diff --git a/yshop-api/src/main/java/co/yixiang/modules/security/service/JwtPermissionService.java b/yshop-api/src/main/java/co/yixiang/modules/security/service/JwtPermissionService.java index 424bdc61..88e5cddf 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/security/service/JwtPermissionService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/security/service/JwtPermissionService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java b/yshop-api/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java index bbff3e0f..85dced35 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java index 7584ae63..eaa0bf1a 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/ArticleService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/ArticleService.java index 30f9666c..098862db 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/ArticleService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/ArticleService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxArticleService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxArticleService.java index 2da77581..2347b29e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxArticleService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxArticleService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java index 596192e3..5cf9f0ed 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java index 26ea2957..4d9ddc0f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueService.java index db2aa7a2..85eb96b1 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueUserService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueUserService.java index 813f1d12..2047fbbd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponIssueUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponService.java index 445251cf..dafecd98 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponUserService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponUserService.java index e17be8e2..601b9a8d 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreCouponUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java index 8bbea3a5..468b7884 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java index 01723e5a..61edea2c 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java index 0f48f940..c79cc9a3 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductRelationService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductRelationService.java index 2e8da9f9..e015d7f8 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductRelationService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductRelationService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java index c512e00a..33e43cf3 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java index 951204d2..ea891751 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java index e52e4be4..ffc4891f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java index 34656529..59cbe477 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/ArticleServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/ArticleServiceImpl.java index e5c2b1c8..eb06a555 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/ArticleServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/ArticleServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java index 1b608069..e8d39d5a 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java index 03d5881f..3621e546 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueServiceImpl.java index c6a5b1db..85fe4784 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueUserServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueUserServiceImpl.java index 56a798d3..61879956 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueUserServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponIssueUserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponServiceImpl.java index a24d8f1c..cc60ba45 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponUserServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponUserServiceImpl.java index 86c78e86..65e1afd7 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponUserServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCouponUserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java index 416cce3c..1e3e7aa6 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java index 49f7e530..9198112b 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java index 313085c1..6a282ea8 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductRelationServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductRelationServiceImpl.java index 845876aa..ccc11a91 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductRelationServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductRelationServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java index bacfc15e..a1349527 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java index ee3b1379..3ce6106e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java index a979eeb9..eaabdacd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java index 77566dd1..aee6eb4b 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java index 20d1506b..8f51e64f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java index 9aebcc06..b395ed68 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/ArticleController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/ArticleController.java index e441a2d5..685d2778 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/ArticleController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/ArticleController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/CouponController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/CouponController.java index f6bb4cf7..6ccb690d 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/CouponController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/CouponController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -9,7 +9,7 @@ package co.yixiang.modules.shop.web.controller; import cn.hutool.core.util.ObjectUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.enums.CouponEnum; diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/IndexController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/IndexController.java index ea2abade..af59c7cf 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/IndexController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/IndexController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCartController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCartController.java index 7e1e82fd..40b2dc6c 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCartController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCartController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -9,7 +9,7 @@ package co.yixiang.modules.shop.web.controller; import cn.hutool.core.util.ObjectUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.modules.shop.service.YxStoreCartService; diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCategoryController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCategoryController.java index 013b3f5f..cbf61d7e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCategoryController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreCategoryController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreProductController.java b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreProductController.java index fb63cff0..bd52ebde 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreProductController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/shop/web/controller/StoreProductController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -12,9 +12,8 @@ import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.qrcode.QrCodeUtil; -import cn.hutool.http.HttpUtil; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.enums.AppFromEnum; @@ -29,7 +28,6 @@ import co.yixiang.modules.user.entity.YxSystemAttachment; import co.yixiang.modules.user.service.YxSystemAttachmentService; import co.yixiang.modules.user.service.YxUserService; import co.yixiang.modules.user.web.vo.YxUserQueryVo; -import co.yixiang.utils.OrderUtil; import co.yixiang.utils.SecurityUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemAttachmentService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemAttachmentService.java index 59be0570..190a89cc 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemAttachmentService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemAttachmentService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java index 1964d29e..8f5ccb26 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java index c9b71cba..27a549c7 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java index 378b93a4..c8e58387 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java index 85e0b329..663b9906 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserExtractService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserExtractService.java index 4c94dc71..fcdc4ae7 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserExtractService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserExtractService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java index 48a569af..a3fead10 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java index 502d1345..28d88887 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserService.java index 48dbbe00..bcb4db26 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -11,12 +11,14 @@ package co.yixiang.modules.user.service; import co.yixiang.common.service.BaseService; import co.yixiang.common.web.vo.Paging; import co.yixiang.modules.order.web.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.security.rest.param.LoginParam; import co.yixiang.modules.user.entity.YxUser; import co.yixiang.modules.user.web.dto.PromUserDTO; import co.yixiang.modules.user.web.param.PromParam; import co.yixiang.modules.user.web.param.YxUserQueryParam; import co.yixiang.modules.user.web.vo.YxUserQueryVo; +import javax.servlet.http.HttpServletRequest; import java.io.Serializable; import java.util.List; @@ -71,4 +73,7 @@ public interface YxUserService extends BaseService { */ Paging getYxUserPageList(YxUserQueryParam yxUserQueryParam) throws Exception; + Object authLogin(String code, String spread, HttpServletRequest request); + + Object wxappAuth(LoginParam loginParam, HttpServletRequest request); } diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java index 014e6e8f..40e1b001 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java index 2f8082ee..363f97cf 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxWechatUserService.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxWechatUserService.java index 77e2a4c6..556035fd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/YxWechatUserService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/YxWechatUserService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemAttachmentServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemAttachmentServiceImpl.java index 57c96b71..f9cc33d2 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemAttachmentServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemAttachmentServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java index 2017720a..a4e5bee0 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserTaskServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserTaskServiceImpl.java index 814aeafc..890bcd22 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserTaskServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserTaskServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserAddressServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserAddressServiceImpl.java index f8b3abce..3d9f4813 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserAddressServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserAddressServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java index ded1faff..a2f64342 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserExtractServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserExtractServiceImpl.java index 0e041a6d..f1df5b77 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserExtractServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserExtractServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java index d7c6de1e..c28c5489 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java index 807847df..c4c81170 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java index 27010c01..30b9799b 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -8,42 +8,71 @@ */ package co.yixiang.modules.user.service.impl; +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; +import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; +import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; +import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import co.yixiang.common.api.ApiResult; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.web.vo.Paging; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.AppFromEnum; +import co.yixiang.enums.RedisKeyEnum; +import co.yixiang.exception.BadRequestException; import co.yixiang.exception.ErrorRequestException; import co.yixiang.modules.order.service.YxStoreOrderService; import co.yixiang.modules.order.web.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.security.rest.param.LoginParam; +import co.yixiang.modules.security.security.TokenProvider; +import co.yixiang.modules.security.security.vo.JwtUser; +import co.yixiang.modules.security.service.OnlineUserService; import co.yixiang.modules.shop.service.YxStoreCouponUserService; import co.yixiang.modules.shop.service.YxSystemConfigService; import co.yixiang.modules.shop.service.YxSystemStoreStaffService; import co.yixiang.modules.user.entity.YxUser; import co.yixiang.modules.user.entity.YxUserBill; import co.yixiang.modules.user.entity.YxUserLevel; +import co.yixiang.modules.user.entity.YxWechatUser; import co.yixiang.modules.user.mapper.YxUserMapper; import co.yixiang.modules.user.service.YxUserBillService; import co.yixiang.modules.user.service.YxUserLevelService; import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.YxWechatUserService; import co.yixiang.modules.user.web.dto.PromUserDTO; import co.yixiang.modules.user.web.param.PromParam; import co.yixiang.modules.user.web.param.YxUserQueryParam; import co.yixiang.modules.user.web.vo.YxUserQueryVo; +import co.yixiang.mp.config.WxMpConfiguration; import co.yixiang.utils.OrderUtil; +import co.yixiang.utils.RedisUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.vdurmont.emoji.EmojiParser; import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.mp.api.WxMpService; +import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken; +import me.chanjar.weixin.mp.bean.result.WxMpUser; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import javax.servlet.http.HttpServletRequest; import java.io.Serializable; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; @@ -75,7 +104,22 @@ public class YxUserServiceImpl extends BaseServiceImpl imp private YxStoreCouponUserService storeCouponUserService; @Autowired private YxSystemStoreStaffService systemStoreStaffService; - + @Autowired + private PasswordEncoder passwordEncoder; + @Autowired + private OnlineUserService onlineUserService; + @Autowired + private TokenProvider tokenProvider; + @Autowired + private AuthenticationManagerBuilder authenticationManagerBuilder; + @Autowired + private WxMaService wxMaService; + @Autowired + private YxWechatUserService wechatUserService; + @Value("${single.login:true}") + private Boolean singleLogin; + @Value("${yshop.notify.sms.enable}") + private Boolean enableSms; /** @@ -465,4 +509,265 @@ public class YxUserServiceImpl extends BaseServiceImpl imp wrapper.eq("username",name); return getOne(wrapper); } + @Override + @Transactional(rollbackFor = Exception.class) + public Object authLogin(String code, String spread, HttpServletRequest request){ + try { + WxMpService wxService = WxMpConfiguration.getWxMpService(); + WxMpOAuth2AccessToken wxMpOAuth2AccessToken = wxService.oauth2getAccessToken(code); + WxMpUser wxMpUser = wxService.oauth2getUserInfo(wxMpOAuth2AccessToken, null); + String openid = wxMpUser.getOpenId(); + + //如果开启了UnionId + if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { + openid = wxMpUser.getUnionId(); + } + YxUser yxUser = this.findByName(openid); + + String username = ""; + if(ObjectUtil.isNull(yxUser)){ + //过滤掉表情 + String nickname = EmojiParser.removeAllEmojis(wxMpUser.getNickname()); + log.info("昵称:{}", nickname); + //用户保存 + YxUser user = new YxUser(); + user.setAccount(nickname); + //如果开启了UnionId + if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { + username = wxMpUser.getUnionId(); + user.setUsername(wxMpUser.getUnionId()); + }else{ + username = wxMpUser.getOpenId(); + user.setUsername(wxMpUser.getOpenId()); + } + user.setPassword(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); + user.setPwd(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); + user.setPhone(""); + user.setUserType(AppFromEnum.WECHAT.getValue()); + user.setLoginType(AppFromEnum.WECHAT.getValue()); + user.setAddTime(OrderUtil.getSecondTimestampTwo()); + user.setLastTime(OrderUtil.getSecondTimestampTwo()); + user.setNickname(nickname); + user.setAvatar(wxMpUser.getHeadImgUrl()); + user.setNowMoney(BigDecimal.ZERO); + user.setBrokeragePrice(BigDecimal.ZERO); + user.setIntegral(BigDecimal.ZERO); + + this.save(user); + + + //保存微信用户 + YxWechatUser yxWechatUser = new YxWechatUser(); + yxWechatUser.setAddTime(OrderUtil.getSecondTimestampTwo()); + yxWechatUser.setNickname(nickname); + yxWechatUser.setOpenid(wxMpUser.getOpenId()); + int sub = 0; + if (ObjectUtil.isNotNull(wxMpUser.getSubscribe()) && wxMpUser.getSubscribe()) sub = 1; + yxWechatUser.setSubscribe(sub); + yxWechatUser.setSex(wxMpUser.getSex()); + yxWechatUser.setLanguage(wxMpUser.getLanguage()); + yxWechatUser.setCity(wxMpUser.getCity()); + yxWechatUser.setProvince(wxMpUser.getProvince()); + yxWechatUser.setCountry(wxMpUser.getCountry()); + yxWechatUser.setHeadimgurl(wxMpUser.getHeadImgUrl()); + if (ObjectUtil.isNotNull(wxMpUser.getSubscribeTime())) { + yxWechatUser.setSubscribeTime(wxMpUser.getSubscribeTime().intValue()); + } + if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { + yxWechatUser.setUnionid(wxMpUser.getUnionId()); + } + if (StrUtil.isNotEmpty(wxMpUser.getRemark())) { + yxWechatUser.setUnionid(wxMpUser.getRemark()); + } + if (ObjectUtil.isNotEmpty(wxMpUser.getGroupId())) { + yxWechatUser.setGroupid(wxMpUser.getGroupId()); + } + yxWechatUser.setUid(user.getUid()); + + wechatUserService.save(yxWechatUser); + + }else{ + username = yxUser.getUsername(); + if(StrUtil.isNotBlank(wxMpUser.getOpenId()) || StrUtil.isNotBlank(wxMpUser.getUnionId())){ + YxWechatUser wechatUser = new YxWechatUser(); + wechatUser.setUid(yxUser.getUid()); + wechatUser.setUnionid(wxMpUser.getUnionId()); + wechatUser.setOpenid(wxMpUser.getOpenId()); + + wechatUserService.updateById(wechatUser); + } + } + + + UsernamePasswordAuthenticationToken authenticationToken = + new UsernamePasswordAuthenticationToken(username, + ShopConstants.YSHOP_DEFAULT_PWD); + + Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); + SecurityContextHolder.getContext().setAuthentication(authentication); + // 生成令牌 + String token = tokenProvider.createToken(authentication); + final JwtUser jwtUserT = (JwtUser) authentication.getPrincipal(); + // 保存在线信息 + onlineUserService.save(jwtUserT, token, request); + + Date expiresTime = tokenProvider.getExpirationDateFromToken(token); + String expiresTimeStr = DateUtil.formatDateTime(expiresTime); + + Map map = new LinkedHashMap<>(); + map.put("token", token); + map.put("expires_time", expiresTimeStr); + + if (singleLogin) { + //踢掉之前已经登录的token + onlineUserService.checkLoginOnUser(jwtUserT.getUsername(), token); + } + + //设置推广关系 + if (StrUtil.isNotEmpty(spread) && !spread.equals("NaN")) { + this.setSpread(Integer.valueOf(spread), + jwtUserT.getId().intValue()); + } + + // 返回 token + return map; + } catch (WxErrorException e) { + e.printStackTrace(); + log.error(e.getMessage()); + throw new BadRequestException(e.toString()); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Object wxappAuth(LoginParam loginParam, HttpServletRequest request){ + String code = loginParam.getCode(); + String encryptedData = loginParam.getEncryptedData(); + String iv = loginParam.getIv(); + String spread = loginParam.getSpread(); + try { + //读取redis配置 + String appId = RedisUtil.get(RedisKeyEnum.WXAPP_APPID.getValue()); + String secret = RedisUtil.get(RedisKeyEnum.WXAPP_SECRET.getValue()); + if (StrUtil.isBlank(appId) || StrUtil.isBlank(secret)) { + throw new ErrorRequestException("请先配置小程序"); + } + WxMaDefaultConfigImpl wxMaConfig = new WxMaDefaultConfigImpl(); + wxMaConfig.setAppid(appId); + wxMaConfig.setSecret(secret); + + wxMaService.setWxMaConfig(wxMaConfig); + WxMaJscode2SessionResult session = wxMaService.getUserService().getSessionInfo(code); + String openid = session.getOpenid(); + //如果开启了UnionId + if (StrUtil.isNotBlank(session.getUnionid())) { + openid = session.getUnionid(); + } + + YxUser yxUser = this.findByName(openid); + String username = ""; + if(ObjectUtil.isNull(yxUser)){ + + WxMaUserInfo wxMpUser = wxMaService.getUserService() + .getUserInfo(session.getSessionKey(), encryptedData, iv); + //过滤掉表情 + String nickname = EmojiParser.removeAllEmojis(wxMpUser.getNickName()); + //用户保存 + YxUser user = new YxUser(); + user.setAccount(nickname); + + //如果开启了UnionId + if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { + username = wxMpUser.getUnionId(); + user.setUsername(wxMpUser.getUnionId()); + }else{ + username = wxMpUser.getOpenId(); + user.setUsername(wxMpUser.getOpenId()); + } + user.setPassword(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); + user.setPwd(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); + user.setPhone(""); + user.setUserType(AppFromEnum.ROUNTINE.getValue()); + user.setAddTime(OrderUtil.getSecondTimestampTwo()); + user.setLastTime(OrderUtil.getSecondTimestampTwo()); + user.setNickname(nickname); + user.setAvatar(wxMpUser.getAvatarUrl()); + user.setNowMoney(BigDecimal.ZERO); + user.setBrokeragePrice(BigDecimal.ZERO); + user.setIntegral(BigDecimal.ZERO); + + this.save(user); + + + //保存微信用户 + YxWechatUser yxWechatUser = new YxWechatUser(); + // System.out.println("wxMpUser:"+wxMpUser); + yxWechatUser.setAddTime(OrderUtil.getSecondTimestampTwo()); + yxWechatUser.setNickname(nickname); + yxWechatUser.setRoutineOpenid(wxMpUser.getOpenId()); + int sub = 0; + yxWechatUser.setSubscribe(sub); + yxWechatUser.setSex(Integer.valueOf(wxMpUser.getGender())); + yxWechatUser.setLanguage(wxMpUser.getLanguage()); + yxWechatUser.setCity(wxMpUser.getCity()); + yxWechatUser.setProvince(wxMpUser.getProvince()); + yxWechatUser.setCountry(wxMpUser.getCountry()); + yxWechatUser.setHeadimgurl(wxMpUser.getAvatarUrl()); + if (StrUtil.isNotBlank(wxMpUser.getUnionId())) { + yxWechatUser.setUnionid(wxMpUser.getUnionId()); + } + yxWechatUser.setUid(user.getUid()); + + wechatUserService.save(yxWechatUser); + + }else{ + username = yxUser.getUsername(); + if(StrUtil.isNotBlank(session.getOpenid()) || StrUtil.isNotBlank(session.getUnionid())){ + YxWechatUser wechatUser = new YxWechatUser(); + wechatUser.setUid(yxUser.getUid()); + wechatUser.setUnionid(session.getUnionid()); + wechatUser.setRoutineOpenid(session.getOpenid()); + + wechatUserService.updateById(wechatUser); + } + } + + + UsernamePasswordAuthenticationToken authenticationToken = + new UsernamePasswordAuthenticationToken(username, + ShopConstants.YSHOP_DEFAULT_PWD); + + Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); + SecurityContextHolder.getContext().setAuthentication(authentication); + // 生成令牌 + String token = tokenProvider.createToken(authentication); + final JwtUser jwtUserT = (JwtUser) authentication.getPrincipal(); + // 保存在线信息 + onlineUserService.save(jwtUserT, token, request); + + Date expiresTime = tokenProvider.getExpirationDateFromToken(token); + String expiresTimeStr = DateUtil.formatDateTime(expiresTime); + + + Map map = new LinkedHashMap<>(); + map.put("token", token); + map.put("expires_time", expiresTimeStr); + + if (singleLogin) { + //踢掉之前已经登录的token + onlineUserService.checkLoginOnUser(jwtUserT.getUsername(), token); + } + + //设置推广关系 + if (StrUtil.isNotEmpty(spread)) { + this.setSpread(Integer.valueOf(spread), + jwtUserT.getId().intValue()); + } + // 返回 token + return map; + } catch (WxErrorException e) { + log.error(e.getMessage(), e); + throw new BadRequestException(e.toString()); + } + } } diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java index c3a51256..c7882abd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java index ebe5ea26..d7e62edb 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxWechatUserServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxWechatUserServiceImpl.java index b37dc2db..87acb6b3 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxWechatUserServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/service/impl/YxWechatUserServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserAddressController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserAddressController.java index 145c7cf9..ce001e9b 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserAddressController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserAddressController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -9,7 +9,7 @@ package co.yixiang.modules.user.web.controller; import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.common.web.param.IdParam; diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserBillController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserBillController.java index 4ce40fbf..5803594f 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserBillController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserBillController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -14,7 +14,7 @@ import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.qrcode.QrCodeUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.enums.AppFromEnum; diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserController.java index 74e80855..2fa79488 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -9,7 +9,7 @@ package co.yixiang.modules.user.web.controller; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.constant.ShopConstants; diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserExtractController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserExtractController.java index 3fedb072..4cbca52e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserExtractController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserExtractController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserLevelController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserLevelController.java index 8bcca890..a1de8786 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserLevelController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserLevelController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -8,7 +8,7 @@ */ package co.yixiang.modules.user.web.controller; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.common.api.ApiResult; import co.yixiang.common.web.controller.BaseController; import co.yixiang.modules.user.service.YxSystemUserLevelService; diff --git a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserRechargeController.java b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserRechargeController.java index 8b46967c..3a0c7234 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserRechargeController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/user/web/controller/UserRechargeController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/entity/YxWechatTemplate.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/entity/YxWechatTemplate.java index 01d54677..24ecab8c 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/entity/YxWechatTemplate.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/entity/YxWechatTemplate.java @@ -13,7 +13,7 @@ import lombok.EqualsAndHashCode; * 微信模板 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-10 */ @Data diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/mapper/YxWechatTemplateMapper.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/mapper/YxWechatTemplateMapper.java index f16b6f41..f106e1b7 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/mapper/YxWechatTemplateMapper.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/mapper/YxWechatTemplateMapper.java @@ -16,7 +16,7 @@ import java.io.Serializable; * 微信模板 Mapper 接口 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-10 */ @Repository diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/service/YxWechatTemplateService.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/service/YxWechatTemplateService.java index a0e5250c..2475b839 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/service/YxWechatTemplateService.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/service/YxWechatTemplateService.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -21,7 +21,7 @@ import java.io.Serializable; * 微信模板 服务类 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-10 */ public interface YxWechatTemplateService extends BaseService { diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/service/impl/WechatTemplateServiceImpl.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/service/impl/WechatTemplateServiceImpl.java index 00783cea..e7db5f9e 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/service/impl/WechatTemplateServiceImpl.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/service/impl/WechatTemplateServiceImpl.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 @@ -31,7 +31,7 @@ import java.io.Serializable; * 微信模板 服务实现类 *

* - * @author xuwenbo + * @author hupeng * @since 2019-12-10 */ @Slf4j diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WechatController.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WechatController.java index b3ec8944..f0b63d37 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WechatController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WechatController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WxMaUserController.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WxMaUserController.java index 9dd3fd0a..6a9b05bd 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WxMaUserController.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/controller/WxMaUserController.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2019 + * Copyright (C) 2018-2020 * All rights reserved, Designed By www.yixiang.co * 注意: * 本软件为www.yixiang.co开发研制,未经购买不得使用 diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/param/YxWechatTemplateQueryParam.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/param/YxWechatTemplateQueryParam.java index 3c471d14..4f9ffd14 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/param/YxWechatTemplateQueryParam.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/param/YxWechatTemplateQueryParam.java @@ -10,7 +10,7 @@ import lombok.EqualsAndHashCode; * 微信模板 查询参数对象 *

* - * @author xuwenbo + * @author hupeng * @date 2019-12-10 */ @Data diff --git a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/vo/YxWechatTemplateQueryVo.java b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/vo/YxWechatTemplateQueryVo.java index 957cdd93..d3cda546 100644 --- a/yshop-api/src/main/java/co/yixiang/modules/wechat/web/vo/YxWechatTemplateQueryVo.java +++ b/yshop-api/src/main/java/co/yixiang/modules/wechat/web/vo/YxWechatTemplateQueryVo.java @@ -11,7 +11,7 @@ import java.io.Serializable; * 微信模板 查询结果对象 *

* - * @author xuwenbo + * @author hupeng * @date 2019-12-10 */ @Data @@ -40,4 +40,4 @@ public class YxWechatTemplateQueryVo implements Serializable { @ApiModelProperty(value = "状态") private Integer status; -} \ No newline at end of file +} 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..2250a7df 100644 --- a/yshop-common/pom.xml +++ b/yshop-common/pom.xml @@ -5,11 +5,47 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 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.2 + + + org.apache.httpcomponents + httpcore + + + org.apache.httpcomponents + httpclient + + + diff --git a/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java b/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java index b0150e99..e0eb3193 100644 --- a/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java +++ b/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.annotation; import java.lang.annotation.ElementType; diff --git a/yshop-common/src/main/java/co/yixiang/annotation/Limit.java b/yshop-common/src/main/java/co/yixiang/annotation/Limit.java index 4c1b64c6..35d07abe 100644 --- a/yshop-common/src/main/java/co/yixiang/annotation/Limit.java +++ b/yshop-common/src/main/java/co/yixiang/annotation/Limit.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.annotation; import co.yixiang.aspect.LimitType; 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..54d3b2c9 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,9 @@ +/* +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.annotation; import java.lang.annotation.ElementType; @@ -8,7 +14,8 @@ 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 +25,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 +69,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/aspect/LimitAspect.java b/yshop-common/src/main/java/co/yixiang/aspect/LimitAspect.java index 27dba4ae..dd3f0ece 100644 --- a/yshop-common/src/main/java/co/yixiang/aspect/LimitAspect.java +++ b/yshop-common/src/main/java/co/yixiang/aspect/LimitAspect.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.aspect; import co.yixiang.utils.RequestHolder; diff --git a/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java b/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java index 0bf8dbee..75b54bd8 100644 --- a/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java +++ b/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.aspect; /** diff --git a/yshop-common/src/main/java/co/yixiang/base/BaseDTO.java b/yshop-common/src/main/java/co/yixiang/base/BaseDTO.java deleted file mode 100644 index 71f2b070..00000000 --- a/yshop-common/src/main/java/co/yixiang/base/BaseDTO.java +++ /dev/null @@ -1,30 +0,0 @@ -package co.yixiang.base; - -import lombok.Getter; -import lombok.Setter; -import java.io.Serializable; -import java.sql.Timestamp; - -/** - * @author Zheng Jie - * @Date 2019年10月24日20:48:53 - */ -@Getter -@Setter -public class BaseDTO implements Serializable { - - private Boolean isDelete; - - private Timestamp createTime; - - private Timestamp updateTime; - - @Override - public String toString() { - return "BaseDTO{" + - "isDelete=" + isDelete + - ", createTime=" + createTime + - ", updateTime=" + updateTime + - '}'; - } -} diff --git a/yshop-common/src/main/java/co/yixiang/base/BaseEntity.java b/yshop-common/src/main/java/co/yixiang/base/BaseEntity.java deleted file mode 100644 index 6eeb4fe5..00000000 --- a/yshop-common/src/main/java/co/yixiang/base/BaseEntity.java +++ /dev/null @@ -1,50 +0,0 @@ -package co.yixiang.base; - -import lombok.*; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.hibernate.annotations.CreationTimestamp; -import org.hibernate.annotations.UpdateTimestamp; -import javax.persistence.Column; -import javax.persistence.MappedSuperclass; -import java.io.Serializable; -import java.sql.Timestamp; -import java.lang.reflect.Field; - -/** - * @author Zheng Jie - * @Date 2019年10月24日20:46:32 - */ -@Getter -@Setter -@MappedSuperclass -public class BaseEntity implements Serializable { - - /** 删除标识 **/ - @Column(name = "is_delete", columnDefinition = "bit default 0") - private Boolean isDelete = false; - - @Column(name = "create_time") - @CreationTimestamp - private Timestamp createTime; - - @Column(name = "update_time") - @UpdateTimestamp - private Timestamp updateTime; - - public @interface Update {} - - @Override - public String toString() { - ToStringBuilder builder = new ToStringBuilder(this); - Field[] fields = this.getClass().getDeclaredFields(); - try { - for (Field f : fields) { - f.setAccessible(true); - builder.append(f.getName(), f.get(this)).append("\n"); - } - } catch (Exception e) { - builder.append("toString builder encounter an error"); - } - return builder.toString(); - } -} diff --git a/yshop-common/src/main/java/co/yixiang/base/BaseMapper.java b/yshop-common/src/main/java/co/yixiang/base/BaseMapper.java deleted file mode 100644 index 14103409..00000000 --- a/yshop-common/src/main/java/co/yixiang/base/BaseMapper.java +++ /dev/null @@ -1,38 +0,0 @@ -package co.yixiang.base; - -import java.util.List; - -/** - * @author Zheng Jie - * @date 2018-11-23 - */ -public interface BaseMapper { - - /** - * DTO转Entity - * @param dto / - * @return / - */ - E toEntity(D dto); - - /** - * Entity转DTO - * @param entity / - * @return / - */ - D toDto(E entity); - - /** - * DTO集合转Entity集合 - * @param dtoList / - * @return / - */ - List toEntity(List dtoList); - - /** - * Entity集合转DTO集合 - * @param entityList / - * @return / - */ - List toDto(List entityList); -} diff --git a/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java b/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java index 38520c77..733505d0 100644 --- a/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java +++ b/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config; import co.yixiang.utils.SecurityUtils; diff --git a/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java b/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java index ce1b4457..04ccd1ad 100644 --- a/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java +++ b/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config; import cn.hutool.core.lang.Assert; 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..2d1a533a 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,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ 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 +14,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 +103,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..32d96dae 100644 --- a/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java +++ b/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.constant; /** @@ -102,8 +107,25 @@ public interface ShopConstants { /** * 签到天数 */ - 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..641a6b48 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java @@ -0,0 +1,36 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..65b81a65 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java @@ -0,0 +1,68 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..90984955 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java @@ -0,0 +1,83 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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); +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java b/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java index 948f9d8b..7a47cabb 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java b/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java index 0556cc53..4ff25abb 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java b/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java index 935955de..418f5514 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java b/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java index 523aac02..81def351 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java b/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java index d914829d..bf32604f 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java b/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java index 32b80f77..c7e0d7d5 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java b/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java index 5f13a848..1f6d86b3 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java b/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java index 4ac18715..cee72acc 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java b/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java index 98c287b6..c2550574 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java index cc710564..c0caf1ea 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java b/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java index f79fe66f..088e365b 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java b/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java index 9d6c94ab..47953440 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.enums; import lombok.AllArgsConstructor; diff --git a/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java b/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java index be670698..6f58b3e4 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception; import lombok.Getter; diff --git a/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java b/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java index 78df41af..babcff54 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception; import org.springframework.util.StringUtils; @@ -16,4 +21,4 @@ public class EntityExistException extends RuntimeException { return StringUtils.capitalize(entity) + " with " + field + " "+ val + " existed"; } -} \ No newline at end of file +} diff --git a/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java b/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java index 50d8f0c9..1c3146d0 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception; import org.springframework.util.StringUtils; @@ -16,4 +21,4 @@ public class EntityNotFoundException extends RuntimeException { return StringUtils.capitalize(entity) + " with " + field + " "+ val + " does not exist"; } -} \ No newline at end of file +} diff --git a/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java b/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java index f90d4bdd..616804d2 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception; import lombok.Getter; diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java b/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java index 8c8bf5d1..32e4c313 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java +++ b/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception.handler; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java b/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java index f1a5d403..52791b6d 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java +++ b/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception.handler; import com.fasterxml.jackson.annotation.JsonFormat; diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java b/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java index f1dc687b..a5a332cd 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java +++ b/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.exception.handler; import co.yixiang.exception.BadRequestException; diff --git a/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java b/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java index 0f1be70b..4055a691 100644 --- a/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java +++ b/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mapper; import java.util.List; 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..46d2e444 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..034bce71 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..6c40ee65 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..c33249c5 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java @@ -0,0 +1,592 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java b/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java index c203808d..3ec6ec4e 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.beans.BeansException; @@ -21,4 +26,4 @@ public class BeanUtil implements ApplicationContextAware { public static T getBean(Class c){ return context.getBean(c); } -} \ 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..9d1cac61 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/BigNum.java @@ -0,0 +1,201 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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/CateDTO.java b/yshop-common/src/main/java/co/yixiang/utils/CateDTO.java index 6e23fbb3..b89f2c7d 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/CateDTO.java +++ b/yshop-common/src/main/java/co/yixiang/utils/CateDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; 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..0b3d90dc --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java @@ -0,0 +1,138 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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/ElAdminConstant.java b/yshop-common/src/main/java/co/yixiang/utils/ElAdminConstant.java index c4d68b06..6c95013b 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ElAdminConstant.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ElAdminConstant.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; /** diff --git a/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java b/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java index df145562..862d249c 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.util.DigestUtils; 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..0cf6037a --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java @@ -0,0 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..6617fa6c 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.codec.Base64; @@ -12,6 +17,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 +343,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..94a80ff7 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java @@ -0,0 +1,85 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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/LocationUtils.java b/yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java index 0a486cd1..c91c70b2 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.util.NumberUtil; 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..1c153079 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.date.DateTime; @@ -43,29 +48,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 +84,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 +93,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 +166,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 +199,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 +221,8 @@ public class OrderUtil { payTypeName = "其他支付"; break; } - }else{ - switch(pay_type){ + } else { + switch (pay_type) { default: payTypeName = "未支付"; break; @@ -211,13 +231,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..c57f474d 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.data.domain.Page; @@ -35,6 +40,8 @@ public class PageUtil extends cn.hutool.core.util.PageUtil { return map; } + + /** * 自定义分页 */ diff --git a/yshop-common/src/main/java/co/yixiang/utils/QueryHelp.java b/yshop-common/src/main/java/co/yixiang/utils/QueryHelp.java index 27bc9a9f..c986b094 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/QueryHelp.java +++ b/yshop-common/src/main/java/co/yixiang/utils/QueryHelp.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.collection.CollUtil; 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..58405327 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java @@ -0,0 +1,72 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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/RedisUtil.java b/yshop-common/src/main/java/co/yixiang/utils/RedisUtil.java index c5091dc6..346b8791 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RedisUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RedisUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.data.redis.core.RedisTemplate; @@ -139,4 +144,4 @@ public class RedisUtil { } return redisTemplate.opsForValue().increment(key, -delta); } -} \ No newline at end of file +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java b/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java index b4b45c5d..e05c6ed6 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.beans.factory.annotation.Value; diff --git a/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java b/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java index 5d89d776..29ad8724 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.web.context.request.RequestContextHolder; 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..f04fd4f1 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.json.JSONObject; @@ -29,7 +34,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/co/yixiang/utils/SpringContextHolder.java b/yshop-common/src/main/java/co/yixiang/utils/SpringContextHolder.java index 4e3b6f51..398c74c0 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SpringContextHolder.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SpringContextHolder.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import lombok.extern.slf4j.Slf4j; diff --git a/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java b/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java index 4e57a575..8e0091c3 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.springframework.beans.BeansException; @@ -10,7 +15,7 @@ import org.springframework.stereotype.Component; */ @Component public class SpringContextUtils implements ApplicationContextAware { - public static ApplicationContext applicationContext; + public static ApplicationContext applicationContext; @Override public void setApplicationContext(ApplicationContext applicationContext) @@ -38,4 +43,4 @@ public class SpringContextUtils implements ApplicationContextAware { return applicationContext.getType(name); } -} \ No newline at end of file +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java b/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java index e5302232..551e0d85 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.io.resource.ClassPathResource; diff --git a/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java b/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java index 0d9ac45c..9ebb9777 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import co.yixiang.exception.BadRequestException; diff --git a/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java b/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java index 357c9d80..6c4d31df 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.json.JSONArray; diff --git a/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java b/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java index 87b02521..5696b6ef 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; diff --git a/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java b/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java index d5a49d95..612db036 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import cn.hutool.core.util.ObjectUtil; diff --git a/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java b/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java index 0f0fb8ec..4253762c 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java +++ b/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; /** 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-common/src/test/java/co/yixiang/utils/EncryptUtilsTest.java b/yshop-common/src/test/java/co/yixiang/utils/EncryptUtilsTest.java index 5a19230e..2ba136ab 100644 --- a/yshop-common/src/test/java/co/yixiang/utils/EncryptUtilsTest.java +++ b/yshop-common/src/test/java/co/yixiang/utils/EncryptUtilsTest.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.junit.Assert; diff --git a/yshop-common/src/test/java/co/yixiang/utils/FileUtilTest.java b/yshop-common/src/test/java/co/yixiang/utils/FileUtilTest.java index 526b3f8b..e735dc49 100644 --- a/yshop-common/src/test/java/co/yixiang/utils/FileUtilTest.java +++ b/yshop-common/src/test/java/co/yixiang/utils/FileUtilTest.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.utils; import org.junit.Assert; diff --git a/yshop-generator/pom.xml b/yshop-generator/pom.xml index 4d1c8cd3..5ff6a1a2 100644 --- a/yshop-generator/pom.xml +++ b/yshop-generator/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -20,7 +20,7 @@ co.yixiang yshop-common - 2.1 + 2.2 @@ -36,4 +36,4 @@ ${configuration.version}
- \ No newline at end of file + diff --git a/yshop-generator/src/main/java/co/yixiang/domain/ColumnInfo.java b/yshop-generator/src/main/java/co/yixiang/gen/domain/ColumnConfig.java similarity index 74% rename from yshop-generator/src/main/java/co/yixiang/domain/ColumnInfo.java rename to yshop-generator/src/main/java/co/yixiang/gen/domain/ColumnConfig.java index d8800e67..35943abd 100644 --- a/yshop-generator/src/main/java/co/yixiang/domain/ColumnInfo.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/domain/ColumnConfig.java @@ -1,25 +1,27 @@ -package co.yixiang.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.utils.GenUtil; + */ +package co.yixiang.gen.domain; + +import co.yixiang.gen.utils.GenUtil; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.NoArgsConstructor; -import javax.persistence.*; - /** * 列的数据信息 * @author Zheng Jie * @date 2019-01-02 */ @Data -@Entity @NoArgsConstructor -@Table(name = "column_config") -public class ColumnInfo { +@TableName("column_config") +public class ColumnConfig { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Long id; private String tableName; @@ -60,7 +62,7 @@ public class ColumnInfo { /** 日期注解 */ private String dateAnnotation; - public ColumnInfo(String tableName, String columnName, Boolean notNull, String columnType, String remark, String keyType, String extra) { + public ColumnConfig(String tableName, String columnName, Boolean notNull, String columnType, String remark, String keyType, String extra) { this.tableName = tableName; this.columnName = columnName; this.columnType = columnType; diff --git a/yshop-generator/src/main/java/co/yixiang/domain/GenConfig.java b/yshop-generator/src/main/java/co/yixiang/gen/domain/GenConfig.java similarity index 69% rename from yshop-generator/src/main/java/co/yixiang/domain/GenConfig.java rename to yshop-generator/src/main/java/co/yixiang/gen/domain/GenConfig.java index 1efbae6d..02956cd8 100644 --- a/yshop-generator/src/main/java/co/yixiang/domain/GenConfig.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/domain/GenConfig.java @@ -1,9 +1,14 @@ -package co.yixiang.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.gen.domain; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.NoArgsConstructor; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; /** * 代码生成配置 @@ -11,9 +16,8 @@ import javax.validation.constraints.NotBlank; * @date 2019-01-03 */ @Data -@Entity @NoArgsConstructor -@Table(name = "gen_config") +@TableName("gen_config") public class GenConfig { public GenConfig(String tableName) { @@ -22,32 +26,25 @@ public class GenConfig { this.tableName = tableName; } - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Long id; - @NotBlank + /**表明**/ private String tableName; /** 接口名称 **/ private String apiAlias; /** 包路径 */ - @NotBlank private String pack; /** 模块名 */ - @Column(name = "module_name") - @NotBlank private String moduleName; /** 前端文件路径 */ - @NotBlank private String path; /** 前端文件路径 */ - @Column(name = "api_path") private String apiPath; /** 作者 */ diff --git a/yshop-generator/src/main/java/co/yixiang/domain/vo/ColumnInfo.java b/yshop-generator/src/main/java/co/yixiang/gen/domain/vo/ColumnInfo.java similarity index 86% rename from yshop-generator/src/main/java/co/yixiang/domain/vo/ColumnInfo.java rename to yshop-generator/src/main/java/co/yixiang/gen/domain/vo/ColumnInfo.java index b7c66f27..e2da401f 100644 --- a/yshop-generator/src/main/java/co/yixiang/domain/vo/ColumnInfo.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/domain/vo/ColumnInfo.java @@ -1,4 +1,9 @@ -package co.yixiang.domain.vo; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.domain.vo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/yshop-generator/src/main/java/co/yixiang/domain/vo/TableInfo.java b/yshop-generator/src/main/java/co/yixiang/gen/domain/vo/TableInfo.java similarity index 80% rename from yshop-generator/src/main/java/co/yixiang/domain/vo/TableInfo.java rename to yshop-generator/src/main/java/co/yixiang/gen/domain/vo/TableInfo.java index a1770cd2..f09e6036 100644 --- a/yshop-generator/src/main/java/co/yixiang/domain/vo/TableInfo.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/domain/vo/TableInfo.java @@ -1,4 +1,9 @@ -package co.yixiang.domain.vo; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.domain.vo; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/yshop-generator/src/main/java/co/yixiang/rest/GenConfigController.java b/yshop-generator/src/main/java/co/yixiang/gen/rest/GenConfigController.java similarity index 84% rename from yshop-generator/src/main/java/co/yixiang/rest/GenConfigController.java rename to yshop-generator/src/main/java/co/yixiang/gen/rest/GenConfigController.java index 3e2ea586..7ed461b8 100644 --- a/yshop-generator/src/main/java/co/yixiang/rest/GenConfigController.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/rest/GenConfigController.java @@ -1,7 +1,12 @@ -package co.yixiang.rest; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.GenConfig; -import co.yixiang.service.GenConfigService; + */ +package co.yixiang.gen.rest; + +import co.yixiang.gen.service.GenConfigService; +import co.yixiang.gen.domain.GenConfig; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; diff --git a/yshop-generator/src/main/java/co/yixiang/rest/GeneratorController.java b/yshop-generator/src/main/java/co/yixiang/gen/rest/GeneratorController.java similarity index 91% rename from yshop-generator/src/main/java/co/yixiang/rest/GeneratorController.java rename to yshop-generator/src/main/java/co/yixiang/gen/rest/GeneratorController.java index 1a50b11e..384980be 100644 --- a/yshop-generator/src/main/java/co/yixiang/rest/GeneratorController.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/rest/GeneratorController.java @@ -1,8 +1,13 @@ -package co.yixiang.rest; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.ColumnInfo; -import co.yixiang.service.GenConfigService; -import co.yixiang.service.GeneratorService; + */ +package co.yixiang.gen.rest; + +import co.yixiang.gen.domain.ColumnConfig; +import co.yixiang.gen.service.GenConfigService; +import co.yixiang.gen.service.GeneratorService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import co.yixiang.exception.BadRequestException; @@ -54,13 +59,13 @@ public class GeneratorController { @ApiOperation("查询字段数据") @GetMapping(value = "/columns") public ResponseEntity getTables(@RequestParam String tableName){ - List columnInfos = generatorService.getColumns(tableName); + List columnInfos = generatorService.getColumns(tableName); return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK); } @ApiOperation("保存字段数据") @PutMapping - public ResponseEntity save(@RequestBody List columnInfos){ + public ResponseEntity save(@RequestBody List columnInfos){ generatorService.save(columnInfos); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-generator/src/main/java/co/yixiang/service/GenConfigService.java b/yshop-generator/src/main/java/co/yixiang/gen/service/GenConfigService.java similarity index 72% rename from yshop-generator/src/main/java/co/yixiang/service/GenConfigService.java rename to yshop-generator/src/main/java/co/yixiang/gen/service/GenConfigService.java index 1a4c57df..07633b6f 100644 --- a/yshop-generator/src/main/java/co/yixiang/service/GenConfigService.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/GenConfigService.java @@ -1,6 +1,11 @@ -package co.yixiang.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.GenConfig; + */ +package co.yixiang.gen.service; + +import co.yixiang.gen.domain.GenConfig; /** * @author Zheng Jie diff --git a/yshop-generator/src/main/java/co/yixiang/service/GeneratorService.java b/yshop-generator/src/main/java/co/yixiang/gen/service/GeneratorService.java similarity index 68% rename from yshop-generator/src/main/java/co/yixiang/service/GeneratorService.java rename to yshop-generator/src/main/java/co/yixiang/gen/service/GeneratorService.java index 91545079..dbecb87c 100644 --- a/yshop-generator/src/main/java/co/yixiang/service/GeneratorService.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/GeneratorService.java @@ -1,7 +1,12 @@ -package co.yixiang.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.ColumnInfo; -import co.yixiang.domain.GenConfig; + */ +package co.yixiang.gen.service; + +import co.yixiang.gen.domain.ColumnConfig; +import co.yixiang.gen.domain.GenConfig; import org.springframework.http.ResponseEntity; import org.springframework.scheduling.annotation.Async; import javax.servlet.http.HttpServletRequest; @@ -27,7 +32,7 @@ public interface GeneratorService { * @param name 表名 * @return / */ - List getColumns(String name); + List getColumns(String name); /** * 同步表数据 @@ -35,13 +40,13 @@ public interface GeneratorService { * @param columnInfoList */ @Async - void sync(List columnInfos, List columnInfoList); + void sync(List columnInfos, List columnInfoList); /** * 保持数据 * @param columnInfos / */ - void save(List columnInfos); + void save(List columnInfos); /** * 获取所有table @@ -54,7 +59,7 @@ public interface GeneratorService { * @param genConfig 配置信息 * @param columns 字段信息 */ - void generator(GenConfig genConfig, List columns); + void generator(GenConfig genConfig, List columns); /** * 预览 @@ -62,7 +67,7 @@ public interface GeneratorService { * @param columns 字段信息 * @return / */ - ResponseEntity preview(GenConfig genConfig, List columns); + ResponseEntity preview(GenConfig genConfig, List columns); /** * 打包下载 @@ -71,12 +76,12 @@ public interface GeneratorService { * @param request / * @param response / */ - void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response); + void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response); /** * 查询数据库的表字段数据数据 * @param table / * @return / */ - List query(String table); + List query(String table); } diff --git a/yshop-generator/src/main/java/co/yixiang/service/impl/GenConfigServiceImpl.java b/yshop-generator/src/main/java/co/yixiang/gen/service/impl/GenConfigServiceImpl.java similarity index 60% rename from yshop-generator/src/main/java/co/yixiang/service/impl/GenConfigServiceImpl.java rename to yshop-generator/src/main/java/co/yixiang/gen/service/impl/GenConfigServiceImpl.java index 4d4103b2..11ecdbba 100644 --- a/yshop-generator/src/main/java/co/yixiang/service/impl/GenConfigServiceImpl.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/impl/GenConfigServiceImpl.java @@ -1,12 +1,16 @@ -package co.yixiang.service.impl; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.GenConfig; -import co.yixiang.repository.GenConfigRepository; -import co.yixiang.service.GenConfigService; + */ +package co.yixiang.gen.service.impl; + +import co.yixiang.gen.service.mapper.GenConfigMapper; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.gen.domain.GenConfig; +import co.yixiang.gen.service.GenConfigService; import co.yixiang.utils.StringUtils; -import org.springframework.cache.annotation.CacheConfig; -import org.springframework.cache.annotation.CachePut; -import org.springframework.cache.annotation.Cacheable; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.springframework.stereotype.Service; import java.io.File; @@ -15,19 +19,13 @@ import java.io.File; * @date 2019-01-14 */ @Service -@CacheConfig(cacheNames = "genConfig") -public class GenConfigServiceImpl implements GenConfigService { - - private final GenConfigRepository genConfigRepository; - - public GenConfigServiceImpl(GenConfigRepository genConfigRepository) { - this.genConfigRepository = genConfigRepository; - } +//@CacheConfig(cacheNames = "genConfig") +public class GenConfigServiceImpl extends BaseServiceImpl implements GenConfigService { @Override - @Cacheable(key = "#p0") +// @Cacheable(key = "#p0") public GenConfig find(String tableName) { - GenConfig genConfig = genConfigRepository.findByTableName(tableName); + GenConfig genConfig = this.getOne(new QueryWrapper().eq("table_name",tableName)); if(genConfig == null){ return new GenConfig(tableName); } @@ -35,7 +33,7 @@ public class GenConfigServiceImpl implements GenConfigService { } @Override - @CachePut(key = "#p0") +// @CachePut(key = "#p0") public GenConfig update(String tableName, GenConfig genConfig) { // 如果 api 路径为空,则自动生成路径 if(StringUtils.isBlank(genConfig.getApiPath())){ @@ -58,6 +56,7 @@ public class GenConfigServiceImpl implements GenConfigService { } genConfig.setApiPath(api.toString()); } - return genConfigRepository.save(genConfig); + this.saveOrUpdate(genConfig); + return genConfig; } } diff --git a/yshop-generator/src/main/java/co/yixiang/service/impl/GeneratorServiceImpl.java b/yshop-generator/src/main/java/co/yixiang/gen/service/impl/GeneratorServiceImpl.java similarity index 71% rename from yshop-generator/src/main/java/co/yixiang/service/impl/GeneratorServiceImpl.java rename to yshop-generator/src/main/java/co/yixiang/gen/service/impl/GeneratorServiceImpl.java index 450755c3..93013c0c 100644 --- a/yshop-generator/src/main/java/co/yixiang/service/impl/GeneratorServiceImpl.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/impl/GeneratorServiceImpl.java @@ -1,18 +1,25 @@ -package co.yixiang.service.impl; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.service.impl; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ZipUtil; -import co.yixiang.domain.ColumnInfo; -import co.yixiang.domain.GenConfig; -import co.yixiang.utils.GenUtil; -import co.yixiang.domain.vo.TableInfo; +import co.yixiang.gen.domain.ColumnConfig; +import co.yixiang.gen.service.mapper.ColumnInfoMapper; +import co.yixiang.gen.utils.GenUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.gen.domain.GenConfig; +import co.yixiang.gen.domain.vo.TableInfo; import co.yixiang.exception.BadRequestException; -import co.yixiang.repository.ColumnInfoRepository; -import co.yixiang.service.GeneratorService; +import co.yixiang.gen.service.GeneratorService; import co.yixiang.utils.FileUtil; import co.yixiang.utils.PageUtil; import co.yixiang.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; @@ -34,16 +41,11 @@ import java.util.stream.Collectors; */ @Service @SuppressWarnings({"unchecked","all"}) -public class GeneratorServiceImpl implements GeneratorService { +public class GeneratorServiceImpl extends BaseServiceImpl implements GeneratorService { @PersistenceContext private EntityManager em; - private final ColumnInfoRepository columnInfoRepository; - - public GeneratorServiceImpl(ColumnInfoRepository columnInfoRepository) { - this.columnInfoRepository = columnInfoRepository; - } @Override public Object getTables() { @@ -71,35 +73,39 @@ public class GeneratorServiceImpl implements GeneratorService { Object[] arr = (Object[]) obj; tableInfos.add(new TableInfo(arr[0],arr[1],arr[2],arr[3], ObjectUtil.isNotEmpty(arr[4])? arr[4] : "-")); } - Query query1 = em.createNativeQuery("SELECT COUNT(*) from information_schema.tables where table_schema = (select database())"); + Query query1 = em.createNativeQuery("SELECT COUNT(*) from information_schema.tables where table_schema = (select database()) " + + "and table_name like ? order by create_time desc"); + query1.setParameter(1, StringUtils.isNotBlank(name) ? ("%" + name + "%") : "%%"); Object totalElements = query1.getSingleResult(); return PageUtil.toPage(tableInfos,totalElements); } @Override - public List getColumns(String tableName) { - List columnInfos = columnInfoRepository.findByTableNameOrderByIdAsc(tableName); + public List getColumns(String tableName) { + List columnInfos = this.list(new QueryWrapper() + .eq("table_name",tableName).orderByAsc("id")); if(CollectionUtil.isNotEmpty(columnInfos)){ return columnInfos; } else { columnInfos = query(tableName); - return columnInfoRepository.saveAll(columnInfos); + this.saveBatch(columnInfos); + return columnInfos; } } @Override - public List query(String tableName){ + public List query(String tableName){ // 使用预编译防止sql注入 String sql = "select column_name, is_nullable, data_type, column_comment, column_key, extra from information_schema.columns " + "where table_name = ? and table_schema = (select database()) order by ordinal_position"; Query query = em.createNativeQuery(sql); query.setParameter(1,tableName); List result = query.getResultList(); - List columnInfos = new ArrayList<>(); + List columnInfos = new ArrayList<>(); for (Object obj : result) { Object[] arr = (Object[]) obj; columnInfos.add( - new ColumnInfo( + new ColumnConfig( tableName, arr[0].toString(), "NO".equals(arr[1]), @@ -113,44 +119,44 @@ public class GeneratorServiceImpl implements GeneratorService { } @Override - public void sync(List columnInfos, List columnInfoList) { + public void sync(List columnInfos, List columnInfoList) { // 第一种情况,数据库类字段改变或者新增字段 - for (ColumnInfo columnInfo : columnInfoList) { + for (ColumnConfig columnInfo : columnInfoList) { // 根据字段名称查找 - List columns = new ArrayList(columnInfos.stream().filter(c-> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList())); + List columns = new ArrayList(columnInfos.stream().filter(c-> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList())); // 如果能找到,就修改部分可能被字段 if(CollectionUtil.isNotEmpty(columns)){ - ColumnInfo column = columns.get(0); + ColumnConfig column = columns.get(0); column.setColumnType(columnInfo.getColumnType()); column.setExtra(columnInfo.getExtra()); column.setKeyType(columnInfo.getKeyType()); if(StringUtils.isBlank(column.getRemark())){ column.setRemark(columnInfo.getRemark()); } - columnInfoRepository.save(column); + this.save(column); } else { // 如果找不到,则保存新字段信息 - columnInfoRepository.save(columnInfo); + this.save(columnInfo); } } // 第二种情况,数据库字段删除了 - for (ColumnInfo columnInfo : columnInfos) { + for (ColumnConfig columnInfo : columnInfos) { // 根据字段名称查找 - List columns = new ArrayList(columnInfoList.stream().filter(c-> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList())); + List columns = new ArrayList(columnInfoList.stream().filter(c-> c.getColumnName().equals(columnInfo.getColumnName())).collect(Collectors.toList())); // 如果找不到,就代表字段被删除了,则需要删除该字段 if(CollectionUtil.isEmpty(columns)){ - columnInfoRepository.delete(columnInfo); + this.removeById(columnInfo.getId()); } } } @Override - public void save(List columnInfos) { - columnInfoRepository.saveAll(columnInfos); + public void save(List columnInfos) { + this.saveOrUpdateBatch(columnInfos); } @Override - public void generator(GenConfig genConfig, List columns) { + public void generator(GenConfig genConfig, List columns) { if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } @@ -163,7 +169,7 @@ public class GeneratorServiceImpl implements GeneratorService { } @Override - public ResponseEntity preview(GenConfig genConfig, List columns) { + public ResponseEntity preview(GenConfig genConfig, List columns) { if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } @@ -172,7 +178,7 @@ public class GeneratorServiceImpl implements GeneratorService { } @Override - public void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response) { + public void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response) { if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } diff --git a/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/ColumnInfoMapper.java b/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/ColumnInfoMapper.java new file mode 100644 index 00000000..538aacd1 --- /dev/null +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/ColumnInfoMapper.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.service.mapper; + +import co.yixiang.gen.domain.ColumnConfig; +import co.yixiang.common.mapper.CoreMapper; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +@Repository +@Mapper +public interface ColumnInfoMapper extends CoreMapper { +} diff --git a/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/GenConfigMapper.java b/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/GenConfigMapper.java new file mode 100644 index 00000000..f02d7571 --- /dev/null +++ b/yshop-generator/src/main/java/co/yixiang/gen/service/mapper/GenConfigMapper.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.service.mapper; + +import co.yixiang.gen.domain.GenConfig; +import co.yixiang.common.mapper.CoreMapper; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +@Repository +@Mapper +public interface GenConfigMapper extends CoreMapper { +} diff --git a/yshop-generator/src/main/java/co/yixiang/utils/ColUtil.java b/yshop-generator/src/main/java/co/yixiang/gen/utils/ColUtil.java similarity index 86% rename from yshop-generator/src/main/java/co/yixiang/utils/ColUtil.java rename to yshop-generator/src/main/java/co/yixiang/gen/utils/ColUtil.java index a00097b9..5e30b7b3 100644 --- a/yshop-generator/src/main/java/co/yixiang/utils/ColUtil.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/utils/ColUtil.java @@ -1,4 +1,9 @@ -package co.yixiang.utils; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.utils; import org.apache.commons.configuration.*; diff --git a/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java b/yshop-generator/src/main/java/co/yixiang/gen/utils/GenUtil.java similarity index 86% rename from yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java rename to yshop-generator/src/main/java/co/yixiang/gen/utils/GenUtil.java index 5707eb04..f27063cd 100644 --- a/yshop-generator/src/main/java/co/yixiang/utils/GenUtil.java +++ b/yshop-generator/src/main/java/co/yixiang/gen/utils/GenUtil.java @@ -1,10 +1,17 @@ -package co.yixiang.utils; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.gen.utils; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.template.*; +import co.yixiang.gen.domain.GenConfig; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.StringUtils; import lombok.extern.slf4j.Slf4j; -import co.yixiang.domain.GenConfig; -import co.yixiang.domain.ColumnInfo; +import co.yixiang.gen.domain.ColumnConfig; import org.springframework.util.ObjectUtils; import java.io.File; import java.io.FileWriter; @@ -36,14 +43,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; } @@ -58,7 +73,7 @@ public class GenUtil { return templateNames; } - public static List> preview(List columns, GenConfig genConfig) { + public static List> preview(List columns, GenConfig genConfig) { Map genMap = getGenMap(columns, genConfig); List> genList = new ArrayList<>(); // 获取后端模版 @@ -84,7 +99,7 @@ public class GenUtil { return genList; } - public static String download(List columns, GenConfig genConfig) throws IOException { + public static String download(List columns, GenConfig genConfig) throws IOException { String tempPath =System.getProperty("java.io.tmpdir") + "yshop-gen-temp" + File.separator + genConfig.getTableName() + File.separator; Map genMap = getGenMap(columns, genConfig); TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); @@ -122,7 +137,7 @@ public class GenUtil { return tempPath; } - public static void generatorCode(List columnInfos, GenConfig genConfig) throws IOException { + public static void generatorCode(List columnInfos, GenConfig genConfig) throws IOException { Map genMap = getGenMap(columnInfos, genConfig); TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); // 生成后端代码 @@ -161,7 +176,7 @@ public class GenUtil { } // 获取模版数据 - private static Map getGenMap(List columnInfos, GenConfig genConfig) { + private static Map getGenMap(List columnInfos, GenConfig genConfig) { // 存储模版字段数据 Map genMap = new HashMap<>(16); // 接口别名 @@ -191,6 +206,8 @@ public class GenUtil { genMap.put("changeClassName", changeClassName); // 存在 Timestamp 字段 genMap.put("hasTimestamp",false); + // 存在 Images 字段 + genMap.put("hasImages",false); // 查询类中存在 Timestamp 字段 genMap.put("queryHasTimestamp",false); // 存在 BigDecimal 字段 @@ -216,7 +233,7 @@ public class GenUtil { // 存储不为空的字段信息 List> isNotNullColumns = new ArrayList<>(); - for (ColumnInfo column : columnInfos) { + for (ColumnConfig column : columnInfos) { Map listMap = new HashMap<>(16); // 字段描述 listMap.put("remark",column.getRemark()); @@ -236,6 +253,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 +352,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-generator/src/main/java/co/yixiang/repository/ColumnInfoRepository.java b/yshop-generator/src/main/java/co/yixiang/repository/ColumnInfoRepository.java deleted file mode 100644 index a703c4bf..00000000 --- a/yshop-generator/src/main/java/co/yixiang/repository/ColumnInfoRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.repository; - -import co.yixiang.domain.ColumnInfo; -import org.springframework.data.jpa.repository.JpaRepository; -import java.util.List; - -/** - * @author Zheng Jie - * @date 2019-01-14 - */ -public interface ColumnInfoRepository extends JpaRepository { - - /** - * 查询表信息 - * @param tableName 表格名 - * @return 表信息 - */ - List findByTableNameOrderByIdAsc(String tableName); -} diff --git a/yshop-generator/src/main/java/co/yixiang/repository/GenConfigRepository.java b/yshop-generator/src/main/java/co/yixiang/repository/GenConfigRepository.java deleted file mode 100644 index dc2c72f1..00000000 --- a/yshop-generator/src/main/java/co/yixiang/repository/GenConfigRepository.java +++ /dev/null @@ -1,18 +0,0 @@ -package co.yixiang.repository; - -import co.yixiang.domain.GenConfig; -import org.springframework.data.jpa.repository.JpaRepository; - -/** - * @author Zheng Jie - * @date 2019-01-14 - */ -public interface GenConfigRepository extends JpaRepository { - - /** - * 查询表配置 - * @param tableName 表名 - * @return / - */ - GenConfig findByTableName(String tableName); -} diff --git a/yshop-logging/pom.xml b/yshop-logging/pom.xml index 5c955447..fd9c41c3 100644 --- a/yshop-logging/pom.xml +++ b/yshop-logging/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -16,7 +16,13 @@ co.yixiang yshop-common - 2.1 + 2.2 + + + co.yixiang + yshop-mproot + 2.2 + compile - \ No newline at end of file + diff --git a/yshop-logging/src/main/java/co/yixiang/aop/log/Log.java b/yshop-logging/src/main/java/co/yixiang/logging/aop/log/Log.java similarity index 70% rename from yshop-logging/src/main/java/co/yixiang/aop/log/Log.java rename to yshop-logging/src/main/java/co/yixiang/logging/aop/log/Log.java index 69654e69..1eb215e5 100644 --- a/yshop-logging/src/main/java/co/yixiang/aop/log/Log.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/aop/log/Log.java @@ -1,4 +1,9 @@ -package co.yixiang.aop.log; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.aop.log; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -6,7 +11,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ @Target(ElementType.METHOD) diff --git a/yshop-logging/src/main/java/co/yixiang/aspect/LogAspect.java b/yshop-logging/src/main/java/co/yixiang/logging/aspect/LogAspect.java similarity index 90% rename from yshop-logging/src/main/java/co/yixiang/aspect/LogAspect.java rename to yshop-logging/src/main/java/co/yixiang/logging/aspect/LogAspect.java index b0eebb81..a7d9c07c 100644 --- a/yshop-logging/src/main/java/co/yixiang/aspect/LogAspect.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/aspect/LogAspect.java @@ -1,8 +1,13 @@ -package co.yixiang.aspect; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.aspect; import lombok.extern.slf4j.Slf4j; -import co.yixiang.domain.Log; -import co.yixiang.service.LogService; +import co.yixiang.logging.domain.Log; +import co.yixiang.logging.service.LogService; import co.yixiang.utils.RequestHolder; import co.yixiang.utils.SecurityUtils; import co.yixiang.utils.StringUtils; @@ -18,7 +23,7 @@ import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ @Component @@ -37,7 +42,7 @@ public class LogAspect { /** * 配置切入点 */ - @Pointcut("@annotation(co.yixiang.aop.log.Log)") + @Pointcut("@annotation(co.yixiang.logging.aop.log.Log)") public void logPointcut() { // 该方法无方法体,主要为了让同类中其他方法使用此切入点 } diff --git a/yshop-logging/src/main/java/co/yixiang/domain/Log.java b/yshop-logging/src/main/java/co/yixiang/logging/domain/Log.java similarity index 68% rename from yshop-logging/src/main/java/co/yixiang/domain/Log.java rename to yshop-logging/src/main/java/co/yixiang/logging/domain/Log.java index 1a7671fc..250b0341 100644 --- a/yshop-logging/src/main/java/co/yixiang/domain/Log.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/domain/Log.java @@ -1,5 +1,14 @@ -package co.yixiang.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.logging.domain; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.NoArgsConstructor; import org.hibernate.annotations.CreationTimestamp; @@ -8,22 +17,23 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ -@Entity @Data -@Table(name = "log") +@TableName("log") @NoArgsConstructor public class Log implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @TableId private Long id; /** 操作用户 */ private String username; + @TableField(exist = false) + private String nickname; + /** 描述 */ private String description; @@ -35,19 +45,15 @@ public class Log implements Serializable { private Integer type; /** 参数 */ - @Column(columnDefinition = "text") private String params; /** 日志类型 */ - @Column(name = "log_type") private String logType; /** 请求ip */ - @Column(name = "request_ip") private String requestIp; /** 地址 */ - @Column(name = "address") private String address; /** 浏览器 */ @@ -57,12 +63,10 @@ public class Log implements Serializable { private Long time; /** 异常详细 */ - @Column(name = "exception_detail", columnDefinition = "text") private byte[] exceptionDetail; /** 创建日期 */ - @CreationTimestamp - @Column(name = "create_time") + @TableField(fill = FieldFill.INSERT) private Timestamp createTime; public Log(String logType, Long time) { diff --git a/yshop-logging/src/main/java/co/yixiang/rest/LogController.java b/yshop-logging/src/main/java/co/yixiang/logging/rest/LogController.java similarity index 82% rename from yshop-logging/src/main/java/co/yixiang/rest/LogController.java rename to yshop-logging/src/main/java/co/yixiang/logging/rest/LogController.java index d6541149..9561eea6 100644 --- a/yshop-logging/src/main/java/co/yixiang/rest/LogController.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/rest/LogController.java @@ -1,10 +1,15 @@ -package co.yixiang.rest; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.aop.log.Log; + */ +package co.yixiang.logging.rest; + +import co.yixiang.logging.aop.log.Log; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import co.yixiang.service.LogService; -import co.yixiang.service.dto.LogQueryCriteria; +import co.yixiang.logging.service.LogService; +import co.yixiang.logging.service.dto.LogQueryCriteria; import co.yixiang.utils.SecurityUtils; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; @@ -15,7 +20,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ @RestController @@ -33,7 +38,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 +47,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 +77,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 +85,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 +101,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/LogService.java b/yshop-logging/src/main/java/co/yixiang/logging/service/LogService.java similarity index 83% rename from yshop-logging/src/main/java/co/yixiang/service/LogService.java rename to yshop-logging/src/main/java/co/yixiang/logging/service/LogService.java index 1d47163f..600ca892 100644 --- a/yshop-logging/src/main/java/co/yixiang/service/LogService.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/LogService.java @@ -1,7 +1,13 @@ -package co.yixiang.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import co.yixiang.domain.Log; -import co.yixiang.service.dto.LogQueryCriteria; + */ +package co.yixiang.logging.service; + +import co.yixiang.logging.domain.Log; +import co.yixiang.common.service.BaseService; +import co.yixiang.logging.service.dto.LogQueryCriteria; import org.aspectj.lang.ProceedingJoinPoint; import org.springframework.data.domain.Pageable; import org.springframework.scheduling.annotation.Async; @@ -11,10 +17,10 @@ import java.io.IOException; import java.util.List; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ -public interface LogService { +public interface LogService extends BaseService { diff --git a/yshop-logging/src/main/java/co/yixiang/service/dto/LogErrorDTO.java b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogErrorDTO.java similarity index 74% rename from yshop-logging/src/main/java/co/yixiang/service/dto/LogErrorDTO.java rename to yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogErrorDTO.java index 9104e78a..aa6a86ed 100644 --- a/yshop-logging/src/main/java/co/yixiang/service/dto/LogErrorDTO.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogErrorDTO.java @@ -1,11 +1,16 @@ -package co.yixiang.service.dto; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.service.dto; import lombok.Data; import java.io.Serializable; import java.sql.Timestamp; /** -* @author Zheng Jie +* @author hupeng * @date 2019-5-22 */ @Data @@ -28,4 +33,4 @@ public class LogErrorDTO implements Serializable { private String address; private Timestamp createTime; -} \ No newline at end of file +} diff --git a/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogQueryCriteria.java similarity index 76% rename from yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java rename to yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogQueryCriteria.java index f376fe76..33d0a7d6 100644 --- a/yshop-logging/src/main/java/co/yixiang/service/dto/LogQueryCriteria.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogQueryCriteria.java @@ -1,13 +1,18 @@ -package co.yixiang.service.dto; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.service.dto; -import lombok.Data; import co.yixiang.annotation.Query; +import lombok.Data; import java.sql.Timestamp; import java.util.List; /** * 日志查询类 - * @author Zheng Jie + * @author hupeng * @date 2019-6-4 09:23:07 */ @Data diff --git a/yshop-logging/src/main/java/co/yixiang/service/dto/LogSmallDTO.java b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogSmallDTO.java similarity index 70% rename from yshop-logging/src/main/java/co/yixiang/service/dto/LogSmallDTO.java rename to yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogSmallDTO.java index 740fed79..ab88b05b 100644 --- a/yshop-logging/src/main/java/co/yixiang/service/dto/LogSmallDTO.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/dto/LogSmallDTO.java @@ -1,11 +1,16 @@ -package co.yixiang.service.dto; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.service.dto; import lombok.Data; import java.io.Serializable; import java.sql.Timestamp; /** - * @author Zheng Jie + * @author hupeng * @date 2019-5-22 */ @Data diff --git a/yshop-logging/src/main/java/co/yixiang/service/impl/LogServiceImpl.java b/yshop-logging/src/main/java/co/yixiang/logging/service/impl/LogServiceImpl.java similarity index 60% rename from yshop-logging/src/main/java/co/yixiang/service/impl/LogServiceImpl.java rename to yshop-logging/src/main/java/co/yixiang/logging/service/impl/LogServiceImpl.java index 09c3269a..8a8e656b 100644 --- a/yshop-logging/src/main/java/co/yixiang/service/impl/LogServiceImpl.java +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/impl/LogServiceImpl.java @@ -1,18 +1,26 @@ -package co.yixiang.service.impl; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.service.impl; import cn.hutool.core.lang.Dict; import cn.hutool.core.util.ObjectUtil; import cn.hutool.json.JSONObject; -import co.yixiang.domain.Log; -import co.yixiang.repository.LogRepository; -import co.yixiang.service.LogService; -import co.yixiang.service.dto.LogQueryCriteria; -import co.yixiang.service.mapper.LogErrorMapper; -import co.yixiang.service.mapper.LogSmallMapper; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.logging.service.mapper.LogMapper; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.logging.service.LogService; +import co.yixiang.logging.service.dto.LogErrorDTO; +import co.yixiang.logging.service.dto.LogQueryCriteria; +import co.yixiang.logging.service.dto.LogSmallDTO; import co.yixiang.utils.*; +import com.github.pagehelper.PageInfo; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -27,64 +35,74 @@ import java.util.List; import java.util.Map; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-24 */ @Service @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class LogServiceImpl implements LogService { +public class LogServiceImpl extends BaseServiceImpl implements LogService { - private final LogRepository logRepository; - private final LogErrorMapper logErrorMapper; + private final LogMapper logMapper; - private final LogSmallMapper logSmallMapper; + private final IGenerator generator; + public LogServiceImpl(LogMapper logMapper, IGenerator generator) { + this.logMapper = logMapper; + this.generator = generator; + } @Override public Object findAllByPageable(String nickname, Pageable pageable) { - Page page = logRepository.findAllByPageable(nickname,pageable); + getPage(pageable); + PageInfo page = new PageInfo<>(logMapper.findAllByPageable(nickname)); Map map = new LinkedHashMap<>(2); - map.put("content",page.getContent()); - map.put("totalElements",page.getTotalElements()); + map.put("content",page.getList()); + map.put("totalElements",page.getTotal()); return map; } - public LogServiceImpl(LogRepository logRepository, LogErrorMapper logErrorMapper, LogSmallMapper logSmallMapper) { - this.logRepository = logRepository; - this.logErrorMapper = logErrorMapper; - this.logSmallMapper = logSmallMapper; - } @Override public Object queryAll(LogQueryCriteria criteria, Pageable pageable){ - Page page = logRepository.findAll(((root, criteriaQuery, cb) -> QueryHelp.getPredicate(root, criteria, cb)),pageable); + + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); String status = "ERROR"; - if (status.equals(criteria.getLogType())) { - return PageUtil.toPage(page.map(logErrorMapper::toDto)); + if(status.equals(criteria.getLogType())){ + map.put("content", generator.convert(page.getList(), LogErrorDTO.class)); + map.put("totalElements", page.getTotal()); } - return page; + map.put("content", page.getList()); + map.put("totalElements", page.getTotal()); + return map; } @Override - public List queryAll(LogQueryCriteria criteria) { - return logRepository.findAll(((root, criteriaQuery, cb) -> QueryHelp.getPredicate(root, criteria, cb))); + public List queryAll(LogQueryCriteria criteria) { + return baseMapper.selectList(QueryHelpPlus.getPredicate(co.yixiang.logging.domain.Log.class, criteria)); } @Override public Object queryAllByUser(LogQueryCriteria criteria, Pageable pageable) { - Page page = logRepository.findAll(((root, criteriaQuery, cb) -> QueryHelp.getPredicate(root, criteria, cb)),pageable); - return PageUtil.toPage(page.map(logSmallMapper::toDto)); + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), LogSmallDTO.class)); + map.put("totalElements", page.getTotal()); + return map; + } @Override @Transactional(rollbackFor = Exception.class) public void save(String username, String ip, ProceedingJoinPoint joinPoint, - Log log,Long uid){ + co.yixiang.logging.domain.Log log, Long uid){ MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.getMethod(); - co.yixiang.aop.log.Log aopLog = method.getAnnotation(co.yixiang.aop.log.Log.class); + Log aopLog = method.getAnnotation(Log.class); // 方法路径 String methodName = joinPoint.getTarget().getClass().getName()+"."+signature.getName()+"()"; @@ -124,21 +142,21 @@ public class LogServiceImpl implements LogService { log.setMethod(methodName); log.setUsername(username); log.setParams(params.toString() + " }"); - logRepository.save(log); + this.save(log); } @Override public Object findByErrDetail(Long id) { - Log log = logRepository.findById(id).orElseGet(Log::new); + co.yixiang.logging.domain.Log log = this.getById(id); ValidationUtil.isNull( log.getId(),"Log","id", id); byte[] details = log.getExceptionDetail(); return Dict.create().set("exception",new String(ObjectUtil.isNotNull(details) ? details : "".getBytes())); } @Override - public void download(List logs, HttpServletResponse response) throws IOException { + public void download(List logs, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (Log log : logs) { + for (co.yixiang.logging.domain.Log log : logs) { Map map = new LinkedHashMap<>(); map.put("用户名", log.getUsername()); map.put("IP", log.getRequestIp()); @@ -156,12 +174,12 @@ public class LogServiceImpl implements LogService { @Override @Transactional(rollbackFor = Exception.class) public void delAllByError() { - logRepository.deleteByLogType("ERROR"); + logMapper.deleteByLogType("ERROR"); } @Override @Transactional(rollbackFor = Exception.class) public void delAllByInfo() { - logRepository.deleteByLogType("INFO"); + logMapper.deleteByLogType("INFO"); } } diff --git a/yshop-logging/src/main/java/co/yixiang/logging/service/mapper/LogMapper.java b/yshop-logging/src/main/java/co/yixiang/logging/service/mapper/LogMapper.java new file mode 100644 index 00000000..9f73c113 --- /dev/null +++ b/yshop-logging/src/main/java/co/yixiang/logging/service/mapper/LogMapper.java @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.logging.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.logging.domain.Log; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; +import java.util.List; + +/** + * @author hupeng + * @date 2019-5-22 + */ +@Repository +@Mapper +public interface LogMapper extends CoreMapper { + + @Delete("delete from log where log_type = #{logType}") + void deleteByLogType(@Param("logType") String logType); + @Select("") + List findAllByPageable(@Param("nickname") String nickname); + @Select( "select count(*) FROM (select request_ip FROM log where create_time between #{date1} and #{date2} GROUP BY request_ip) as s") + long findIp(@Param("date1") String date1, @Param("date2")String date2); +} diff --git a/yshop-logging/src/main/java/co/yixiang/repository/LogRepository.java b/yshop-logging/src/main/java/co/yixiang/repository/LogRepository.java deleted file mode 100644 index b4fb713e..00000000 --- a/yshop-logging/src/main/java/co/yixiang/repository/LogRepository.java +++ /dev/null @@ -1,50 +0,0 @@ -package co.yixiang.repository; - -import co.yixiang.domain.Log; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; -import org.springframework.stereotype.Repository; - -import java.util.Map; - -/** - * @author Zheng Jie - * @date 2018-11-24 - */ -@Repository -public interface LogRepository extends JpaRepository, JpaSpecificationExecutor { - - - - @Query(nativeQuery = true, - value = "select l.id,l.create_time as createTime,l.description," + - "l.request_ip as requestIp,l.address," + - "u.nickname from log l left join yx_user u on u.uid=l.uid " + - " where l.type=1" + - " and if(?1 !='',u.nickname LIKE CONCAT('%',?1,'%'),1=1) order by l.id desc", - countQuery = "select count(*) from log l left join yx_user u on u.uid=l.uid" + - " where l.type=1 " + - "and if(?1 !='',u.nickname LIKE CONCAT('%',?1,'%'),1=1)") - Page findAllByPageable(String nickname, - Pageable pageable); - /** - * 获取一个时间段的IP记录 - * @param date1 startTime - * @param date2 entTime - * @return IP数目 - */ - @Query(value = "select count(*) FROM (select request_ip FROM log where create_time between ?1 and ?2 GROUP BY request_ip) as s",nativeQuery = true) - Long findIp(String date1, String date2); - - /** - * 根据日志类型删除信息 - * @param logType 日志类型 - */ - @Query(nativeQuery = true,value = "delete from log where log_type = ?1") - @Modifying - void deleteByLogType(String logType); -} diff --git a/yshop-logging/src/main/java/co/yixiang/service/mapper/LogErrorMapper.java b/yshop-logging/src/main/java/co/yixiang/service/mapper/LogErrorMapper.java deleted file mode 100644 index d770b47b..00000000 --- a/yshop-logging/src/main/java/co/yixiang/service/mapper/LogErrorMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.service.mapper; - -import co.yixiang.domain.Log; -import co.yixiang.service.dto.LogErrorDTO; -import co.yixiang.base.BaseMapper; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** - * @author Zheng Jie - * @date 2019-5-22 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface LogErrorMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-logging/src/main/java/co/yixiang/service/mapper/LogSmallMapper.java b/yshop-logging/src/main/java/co/yixiang/service/mapper/LogSmallMapper.java deleted file mode 100644 index d4c85630..00000000 --- a/yshop-logging/src/main/java/co/yixiang/service/mapper/LogSmallMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.service.mapper; - -import co.yixiang.domain.Log; -import co.yixiang.base.BaseMapper; -import co.yixiang.service.dto.LogSmallDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** - * @author Zheng Jie - * @date 2019-5-22 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface LogSmallMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-mp/pom.xml b/yshop-mp/pom.xml index 643f31ab..37b29d80 100644 --- a/yshop-mp/pom.xml +++ b/yshop-mp/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -35,9 +35,9 @@ co.yixiang yshop-common - 2.1 + 2.2 - \ No newline at end of file + diff --git a/yshop-mp/src/main/java/co/yixiang/mp/builder/AbstractBuilder.java b/yshop-mp/src/main/java/co/yixiang/mp/builder/AbstractBuilder.java index 3750a15f..311afd8e 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/builder/AbstractBuilder.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/builder/AbstractBuilder.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.builder; import me.chanjar.weixin.mp.api.WxMpService; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/builder/ImageBuilder.java b/yshop-mp/src/main/java/co/yixiang/mp/builder/ImageBuilder.java index a2f30709..19ebae2e 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/builder/ImageBuilder.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/builder/ImageBuilder.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.builder; import me.chanjar.weixin.mp.api.WxMpService; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/builder/TextBuilder.java b/yshop-mp/src/main/java/co/yixiang/mp/builder/TextBuilder.java index a98cadfe..c9a4cd7a 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/builder/TextBuilder.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/builder/TextBuilder.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.builder; import me.chanjar.weixin.mp.api.WxMpService; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/config/WxMpConfiguration.java b/yshop-mp/src/main/java/co/yixiang/mp/config/WxMpConfiguration.java index 76b870b7..20aca8d8 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/config/WxMpConfiguration.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/config/WxMpConfiguration.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.config; import cn.hutool.core.util.StrUtil; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/config/WxPayConfiguration.java b/yshop-mp/src/main/java/co/yixiang/mp/config/WxPayConfiguration.java index 130f9d0f..d425f58c 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/config/WxPayConfiguration.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/config/WxPayConfiguration.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.config; import co.yixiang.constant.ShopConstants; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatArticleController.java b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatArticleController.java index 9581a22d..2f0b0a6d 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatArticleController.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatArticleController.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.controller; import cn.hutool.core.date.DateUtil; @@ -5,10 +10,11 @@ import cn.hutool.core.util.StrUtil; import co.yixiang.exception.BadRequestException; import co.yixiang.mp.domain.YxArticle; import co.yixiang.mp.service.YxArticleService; -import co.yixiang.mp.service.dto.YxArticleDTO; +import co.yixiang.mp.service.dto.YxArticleDto; import co.yixiang.mp.service.dto.YxArticleQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -46,7 +52,7 @@ public class WechatArticleController { @PreAuthorize("@el.check('admin','YXARTICLE_ALL','YXARTICLE_CREATE')") public ResponseEntity create(@Validated @RequestBody YxArticle resources){ resources.setAddTime(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm")); - return new ResponseEntity(yxArticleService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxArticleService.save(resources),HttpStatus.CREATED); } @@ -54,7 +60,7 @@ public class WechatArticleController { @PutMapping(value = "/yxArticle") @PreAuthorize("@el.check('admin','YXARTICLE_ALL','YXARTICLE_EDIT')") public ResponseEntity update(@Validated @RequestBody YxArticle resources){ - yxArticleService.update(resources); + yxArticleService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -64,7 +70,7 @@ public class WechatArticleController { @PreAuthorize("@el.check('admin','YXARTICLE_ALL','YXARTICLE_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxArticleService.delete(id); + yxArticleService.removeById(id); return new ResponseEntity(HttpStatus.OK); } @@ -73,9 +79,11 @@ public class WechatArticleController { @PreAuthorize("@el.check('admin','YXARTICLE_ALL','YXARTICLE_DELETE')") public ResponseEntity publish(@PathVariable Integer id) throws Exception{ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - YxArticleDTO yxArticleDTO= yxArticleService.findById(id); + YxArticleDto yxArticleDTO= new YxArticleDto(); + YxArticle yxArticle = yxArticleService.getById(id); + BeanUtils.copyProperties(yxArticle,yxArticleDTO); yxArticleService.uploadNews(yxArticleDTO); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatMenuController.java b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatMenuController.java index 77d35b06..a10b12fc 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatMenuController.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatMenuController.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.controller; @@ -10,6 +15,7 @@ import co.yixiang.utils.OrderUtil; import co.yixiang.utils.RedisUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import me.chanjar.weixin.common.bean.menu.WxMenu; @@ -41,7 +47,7 @@ public class WechatMenuController { @GetMapping(value = "/YxWechatMenu") @PreAuthorize("@el.check('admin','YxWechatMenu_ALL','YxWechatMenu_SELECT')") public ResponseEntity getYxWechatMenus(){ - return new ResponseEntity(YxWechatMenuService.findById("wechat_menus"),HttpStatus.OK); + return new ResponseEntity(YxWechatMenuService.getOne(new QueryWrapper().eq("`key`","wechat_menus")),HttpStatus.OK); } @@ -60,12 +66,12 @@ public class WechatMenuController { if(isExist){ YxWechatMenu.setKey("wechat_menus"); YxWechatMenu.setResult(jsonButton); - YxWechatMenuService.update(YxWechatMenu); + YxWechatMenuService.saveOrUpdate(YxWechatMenu); }else { YxWechatMenu.setKey("wechat_menus"); YxWechatMenu.setResult(jsonButton); YxWechatMenu.setAddTime(OrderUtil.getSecondTimestampTwo()); - YxWechatMenuService.create(YxWechatMenu); + YxWechatMenuService.save(YxWechatMenu); } @@ -84,4 +90,4 @@ public class WechatMenuController { -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatReplyController.java b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatReplyController.java index a115dafa..9b9e7351 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatReplyController.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatReplyController.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.controller; import cn.hutool.core.util.ObjectUtil; @@ -54,7 +59,7 @@ public class WechatReplyController { yxWechatReplyService.create(yxWechatReply); }else{ yxWechatReply.setId(isExist.getId()); - yxWechatReplyService.update(yxWechatReply); + yxWechatReplyService.upDate(yxWechatReply); } return new ResponseEntity(HttpStatus.CREATED); @@ -64,4 +69,4 @@ public class WechatReplyController { -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatTemplateController.java b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatTemplateController.java index 9a75c5b8..949cbdfb 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatTemplateController.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/controller/WechatTemplateController.java @@ -1,12 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.controller; import cn.hutool.core.util.StrUtil; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.mp.domain.YxWechatTemplate; import co.yixiang.mp.service.YxWechatTemplateService; +import co.yixiang.mp.service.dto.YxWechatTemplateDto; import co.yixiang.mp.service.dto.YxWechatTemplateQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.java.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; @@ -15,51 +24,61 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; + /** -* @author xuwenbo +* @author hupeng * @date 2019-12-10 */ @Api(tags = "商城:微信模板管理") @RestController -@RequestMapping("api") +@RequestMapping("/api/yxWechatTemplate") +@AllArgsConstructor public class WechatTemplateController { + private final YxWechatTemplateService yxWechatTemplateService; + private final IGenerator generator; - public WechatTemplateController(YxWechatTemplateService yxWechatTemplateService) { - this.yxWechatTemplateService = yxWechatTemplateService; + + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxWechatTemplate:list')") + public void download(HttpServletResponse response, YxWechatTemplateQueryCriteria criteria) throws IOException { + yxWechatTemplateService.download(generator.convert(yxWechatTemplateService.queryAll(criteria), YxWechatTemplateDto.class), response); } - @ApiOperation(value = "查询") - @GetMapping(value = "/yxWechatTemplate") - @PreAuthorize("@el.check('admin','YXWECHATTEMPLATE_ALL','YXWECHATTEMPLATE_SELECT')") - public ResponseEntity getYxWechatTemplates(YxWechatTemplateQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity(yxWechatTemplateService.queryAll(criteria,pageable),HttpStatus.OK); + @GetMapping + @ApiOperation("查询微信模板消息") + @PreAuthorize("@el.check('admin','yxWechatTemplate:list')") + public ResponseEntity getYxWechatTemplates(YxWechatTemplateQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxWechatTemplateService.queryAll(criteria,pageable),HttpStatus.OK); } - @ApiOperation(value = "新增") - @PostMapping(value = "/yxWechatTemplate") - @PreAuthorize("@el.check('admin','YXWECHATTEMPLATE_ALL','YXWECHATTEMPLATE_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxWechatTemplate resources){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - return new ResponseEntity(yxWechatTemplateService.create(resources),HttpStatus.CREATED); + @PostMapping + @ApiOperation("新增微信模板消息") + @PreAuthorize("@el.check('admin','yxWechatTemplate:add')") + public ResponseEntity create(@Validated @RequestBody YxWechatTemplate resources){ + return new ResponseEntity<>(yxWechatTemplateService.save(resources),HttpStatus.CREATED); } - @ApiOperation(value = "修改") - @PutMapping(value = "/yxWechatTemplate") - @PreAuthorize("@el.check('admin','YXWECHATTEMPLATE_ALL','YXWECHATTEMPLATE_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxWechatTemplate resources){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxWechatTemplateService.update(resources); - return new ResponseEntity(HttpStatus.NO_CONTENT); + @PutMapping + @ApiOperation("修改微信模板消息") + @PreAuthorize("@el.check('admin','yxWechatTemplate:edit')") + public ResponseEntity update(@Validated @RequestBody YxWechatTemplate resources){ + yxWechatTemplateService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); } - @ApiOperation(value = "删除") - @DeleteMapping(value = "/yxWechatTemplate/{id}") - @PreAuthorize("@el.check('admin','YXWECHATTEMPLATE_ALL','YXWECHATTEMPLATE_DELETE')") - public ResponseEntity delete(@PathVariable Integer id){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxWechatTemplateService.delete(id); - return new ResponseEntity(HttpStatus.OK); + @ApiOperation("删除微信模板消息") + @PreAuthorize("@el.check('admin','yxWechatTemplate:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Integer[] ids) { + Arrays.asList(ids).forEach(id->{ + yxWechatTemplateService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxArticle.java b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxArticle.java index 19099fb7..a6a13c06 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxArticle.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxArticle.java @@ -1,103 +1,115 @@ -package co.yixiang.mp.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.mp.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 lombok.Data; -import javax.persistence.*; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-07 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_article") +@TableName("yx_article") public class YxArticle implements Serializable { - // 文章管理ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 文章管理ID */ + @TableId private Integer id; - // 分类id - @Column(name = "cid") + + /** 分类id */ private String cid; - // 文章标题 - @Column(name = "title",nullable = false) + + /** 文章标题 */ + @NotBlank(message = "请输入文章标题") private String title; - // 文章作者 - @Column(name = "author") + + /** 文章作者 */ + @NotBlank(message = "请输入文章作者") private String author; - @Column(name = "content") - private String content; - // 文章图片 - @Column(name = "image_input",nullable = false) + /** 文章图片 */ + @NotBlank(message = "请上传文章图片") private String imageInput; - // 文章简介 - @Column(name = "synopsis") + + /** 文章简介 */ + @NotBlank(message = "请填写文章简介") private String synopsis; - // 文章分享标题 - @Column(name = "share_title") + + @NotBlank(message = "请填写文章详情") + private String content; + + + /** 文章分享标题 */ private String shareTitle; - // 文章分享简介 - @Column(name = "share_synopsis") + + /** 文章分享简介 */ private String shareSynopsis; - // 浏览次数 - @Column(name = "visit") + + /** 浏览次数 */ private String visit; - // 排序 - @Column(name = "sort",nullable = false) + + /** 排序 */ private Integer sort; - // 原文链接 - @Column(name = "url") + + /** 原文链接 */ private String url; - // 状态 - @Column(name = "status",nullable = false) + + /** 状态 */ private Integer status; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private String addTime; - // 是否隐藏 - @Column(name = "hide",nullable = false) + + /** 是否隐藏 */ private Integer hide; - // 管理员id - @Column(name = "admin_id",nullable = false) + + /** 管理员id */ private Integer adminId; - // 商户id - @Column(name = "mer_id") + + /** 商户id */ private Integer merId; - // 产品关联id - @Column(name = "product_id",nullable = false) + + /** 产品关联id */ private Integer productId; - // 是否热门(小程序) - @Column(name = "is_hot",nullable = false) + + /** 是否热门(小程序) */ private Integer isHot; - // 是否轮播图(小程序) - @Column(name = "is_banner",nullable = false) + + /** 是否轮播图(小程序) */ private Integer isBanner; + public void copy(YxArticle source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatMenu.java b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatMenu.java index 94ffe637..dbb2e00f 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatMenu.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatMenu.java @@ -1,38 +1,37 @@ -package co.yixiang.mp.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.mp.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.Table; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_wechat_menu") +@TableName("yx_wechat_menu") public class YxWechatMenu implements Serializable { - - @Id - @Column(name = "`key`") + @TableId(value = "`key`") private String key; - // 缓存数据 - @Column(name = "result") + + /** 缓存数据 */ private String result; - // 缓存时间 - @Column(name = "add_time") + + /** 缓存时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; + public void copy(YxWechatMenu source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatReply.java b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatReply.java index e2d4a583..c5163f68 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatReply.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatReply.java @@ -1,48 +1,52 @@ -package co.yixiang.mp.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.mp.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.baomidou.mybatisplus.annotation.TableField; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_wechat_reply") +@TableName("yx_wechat_reply") public class YxWechatReply implements Serializable { - // 微信关键字回复id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 微信关键字回复id */ + @TableId private Integer id; - // 关键字 - @Column(name = "`key`",unique = true,nullable = false) + + /** 关键字 */ + @TableField(value = "`key`") private String key; - // 回复类型 - @Column(name = "type",nullable = false) + + /** 回复类型 */ private String type; - // 回复数据 - @Column(name = "data",nullable = false) + + /** 回复数据 */ private String data; - // 0=不可用 1 =可用 - @Column(name = "status",nullable = false) + + /** 0=不可用 1 =可用 */ private Integer status; - // 是否隐藏 - @Column(name = "hide",nullable = false) + + /** 是否隐藏 */ private Integer hide; + public void copy(YxWechatReply source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatTemplate.java b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatTemplate.java index f2a6d2b9..fa0b9008 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatTemplate.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/domain/YxWechatTemplate.java @@ -1,51 +1,60 @@ -package co.yixiang.mp.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.mp.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; 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.*; +import javax.validation.constraints.*; import java.io.Serializable; /** -* @author xuwenbo -* @date 2019-12-10 +* @author hupeng +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_wechat_template") +@TableName("yx_wechat_template") public class YxWechatTemplate implements Serializable { - // 模板id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 模板id */ + @TableId private Integer id; - // 模板编号 - @Column(name = "tempkey",nullable = false) + + /** 模板编号 */ private String tempkey; - // 模板名 - @Column(name = "name",nullable = false) + + /** 模板名 */ private String name; - // 回复内容 - @Column(name = "content",nullable = false) + + /** 回复内容 */ private String content; - // 模板ID - @Column(name = "tempid") + + /** 模板ID */ private String tempid; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private String addTime; - // 状态 - @Column(name = "status",nullable = false) + + /** 状态 */ private Integer status; + public void copy(YxWechatTemplate source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorController.java b/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorController.java index e62ca986..7d97902e 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorController.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorController.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.error; import org.springframework.stereotype.Controller; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorPageConfiguration.java b/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorPageConfiguration.java index a1198fe3..8130cf09 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorPageConfiguration.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/error/ErrorPageConfiguration.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.error; import org.springframework.boot.web.server.ErrorPage; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/AbstractHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/AbstractHandler.java index 3cd624ba..e4e30a50 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/AbstractHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/AbstractHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.mp.api.WxMpMessageHandler; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/KfSessionHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/KfSessionHandler.java index effaa4d7..2a2358f6 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/KfSessionHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/KfSessionHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.common.session.WxSessionManager; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/LocationHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/LocationHandler.java index 9c44df35..7cdb9c21 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/LocationHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/LocationHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import co.yixiang.mp.builder.TextBuilder; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/LogHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/LogHandler.java index 4cca2a26..023075c9 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/LogHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/LogHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import co.yixiang.mp.utils.JsonUtils; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/MenuHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/MenuHandler.java index 9d0e8400..fc913e91 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/MenuHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/MenuHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.common.session.WxSessionManager; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/MsgHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/MsgHandler.java index 50dadb77..7a11d018 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/MsgHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/MsgHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import co.yixiang.mp.builder.TextBuilder; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/NullHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/NullHandler.java index d3651f17..815d4eee 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/NullHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/NullHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.common.session.WxSessionManager; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/RedisHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/RedisHandler.java index b1018880..e6317832 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/RedisHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/RedisHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/ScanHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/ScanHandler.java index be6f4462..17f17db7 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/ScanHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/ScanHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import java.util.Map; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/StoreCheckNotifyHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/StoreCheckNotifyHandler.java index ce692c02..aa16b82b 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/StoreCheckNotifyHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/StoreCheckNotifyHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.common.session.WxSessionManager; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/SubscribeHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/SubscribeHandler.java index 259e5368..e5f5cca9 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/SubscribeHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/SubscribeHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import java.io.UnsupportedEncodingException; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/handler/UnsubscribeHandler.java b/yshop-mp/src/main/java/co/yixiang/mp/handler/UnsubscribeHandler.java index 97f0c9d8..769a3751 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/handler/UnsubscribeHandler.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/handler/UnsubscribeHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.handler; import me.chanjar.weixin.common.session.WxSessionManager; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxArticleRepository.java b/yshop-mp/src/main/java/co/yixiang/mp/repository/YxArticleRepository.java deleted file mode 100644 index c6c6bdbb..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxArticleRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.mp.repository; - - -import co.yixiang.mp.domain.YxArticle; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-07 -*/ -public interface YxArticleRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatMenuRepository.java b/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatMenuRepository.java deleted file mode 100644 index 0929b310..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatMenuRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.mp.repository; - - -import co.yixiang.mp.domain.YxWechatMenu; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-06 -*/ -public interface YxWechatMenuRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatReplyRepository.java b/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatReplyRepository.java deleted file mode 100644 index d7fb0eb0..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatReplyRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.mp.repository; - -import co.yixiang.mp.domain.YxWechatReply; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-10 -*/ -public interface YxWechatReplyRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * findByKey - * @param key - * @return - */ - YxWechatReply findByKey(String key); -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatTemplateRepository.java b/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatTemplateRepository.java deleted file mode 100644 index d724494a..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/repository/YxWechatTemplateRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.mp.repository; - -import co.yixiang.mp.domain.YxWechatTemplate; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author xuwenbo -* @date 2019-12-10 -*/ -public interface YxWechatTemplateRepository extends JpaRepository, JpaSpecificationExecutor { - YxWechatTemplate findByTempkey(String key); -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/WxMpTemplateMessageService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/WxMpTemplateMessageService.java index 943e46e0..71c709f2 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/WxMpTemplateMessageService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/WxMpTemplateMessageService.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; import java.util.Map; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxArticleService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxArticleService.java index 5ec99ac1..77ac021a 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxArticleService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxArticleService.java @@ -1,68 +1,48 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; - - +import co.yixiang.common.service.BaseService; import co.yixiang.mp.domain.YxArticle; -import co.yixiang.mp.service.dto.YxArticleDTO; +import co.yixiang.mp.service.dto.YxArticleDto; import co.yixiang.mp.service.dto.YxArticleQueryCriteria; +import me.chanjar.weixin.common.error.WxErrorException; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-07 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxArticle") -public interface YxArticleService { +public interface YxArticleService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxArticleQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxArticleQueryCriteria criteria); + List queryAll(YxArticleQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxArticleDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxArticleDTO create(YxArticle resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxArticle resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); - - void uploadNews(YxArticleDTO yxArticleDTO) throws Exception; - -} \ No newline at end of file + void uploadNews(YxArticleDto yxArticleDTO) throws WxErrorException; +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxMiniPayService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxMiniPayService.java index ac2d1bcc..f64f0232 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxMiniPayService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxMiniPayService.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; import cn.hutool.core.util.StrUtil; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxPayService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxPayService.java index c26cb261..abba1075 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxPayService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxPayService.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; import cn.hutool.core.util.StrUtil; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxTemplateService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxTemplateService.java index 821b5f16..ce500bbf 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxTemplateService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxTemplateService.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; import co.yixiang.mp.domain.YxWechatTemplate; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatMenuService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatMenuService.java index debe5ab8..6474d17a 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatMenuService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatMenuService.java @@ -1,67 +1,47 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; - - +import co.yixiang.common.service.BaseService; import co.yixiang.mp.domain.YxWechatMenu; -import co.yixiang.mp.service.dto.YxWechatMenuDTO; +import co.yixiang.mp.service.dto.YxWechatMenuDto; import co.yixiang.mp.service.dto.YxWechatMenuQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "YxWechatMenu") -public interface YxWechatMenuService { +public interface YxWechatMenuService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxWechatMenuQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxWechatMenuQueryCriteria criteria); + List queryAll(YxWechatMenuQueryCriteria criteria); /** - * 根据ID查询 - * @param key - * @return - */ - //@Cacheable(key = "#p0") - YxWechatMenuDTO findById(String key); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxWechatMenuDTO create(YxWechatMenu resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxWechatMenu resources); - - /** - * 删除 - * @param key - */ - //@CacheEvict(allEntries = true) - void delete(String key); - - boolean isExist(String key); -} \ No newline at end of file + Boolean isExist(String wechat_menus); +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatReplyService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatReplyService.java index 222ced9d..228ad383 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatReplyService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatReplyService.java @@ -1,68 +1,51 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service; - - +import co.yixiang.common.service.BaseService; import co.yixiang.mp.domain.YxWechatReply; -import co.yixiang.mp.service.dto.YxWechatReplyDTO; +import co.yixiang.mp.service.dto.YxWechatReplyDto; import co.yixiang.mp.service.dto.YxWechatReplyQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxWechatReply") -public interface YxWechatReplyService { +public interface YxWechatReplyService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxWechatReplyQueryCriteria criteria); + List queryAll(YxWechatReplyQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxWechatReplyDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxWechatReplyDTO create(YxWechatReply resources); + YxWechatReply isExist(String subscribe); - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxWechatReply resources); + void create(YxWechatReply yxWechatReply); - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); - - YxWechatReply isExist(String key); - -} \ No newline at end of file + void upDate(YxWechatReply yxWechatReply); +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatTemplateService.java b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatTemplateService.java index 4a8d7886..012fd646 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatTemplateService.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/YxWechatTemplateService.java @@ -1,66 +1,47 @@ -package co.yixiang.mp.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.mp.service; +import co.yixiang.common.service.BaseService; import co.yixiang.mp.domain.YxWechatTemplate; -import co.yixiang.mp.service.dto.YxWechatTemplateDTO; +import co.yixiang.mp.service.dto.YxWechatTemplateDto; import co.yixiang.mp.service.dto.YxWechatTemplateQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author xuwenbo -* @date 2019-12-10 +* @author hupeng +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxWechatTemplate") -public interface YxWechatTemplateService { +public interface YxWechatTemplateService extends BaseService{ - YxWechatTemplate findByTempkey(String key); - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxWechatTemplateQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxWechatTemplateQueryCriteria criteria); + List queryAll(YxWechatTemplateQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxWechatTemplateDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxWechatTemplateDTO create(YxWechatTemplate resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxWechatTemplate resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + YxWechatTemplate findByTempkey(String recharge_success_key); +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleDTO.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleDTO.java index 45d58d4a..73b77a78 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleDTO.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleDTO.java @@ -1,75 +1,78 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-10-07 +* @date 2020-05-12 */ @Data -public class YxArticleDTO implements Serializable { +public class YxArticleDto implements Serializable { - // 文章管理ID + /** 文章管理ID */ private Integer id; - // 分类id + /** 分类id */ private String cid; - // 文章标题 + /** 文章标题 */ private String title; - // 文章作者 + /** 文章作者 */ private String author; - // 文章图片 + /** 文章图片 */ private String imageInput; - // 文章简介 + /** 文章简介 */ private String synopsis; private String content; - // 文章分享标题 + /** 文章分享标题 */ private String shareTitle; - // 文章分享简介 + /** 文章分享简介 */ private String shareSynopsis; - // 浏览次数 + /** 浏览次数 */ private String visit; - // 排序 + /** 排序 */ private Integer sort; - // 原文链接 + /** 原文链接 */ private String url; - // 状态 + /** 状态 */ private Integer status; - // 添加时间 + /** 添加时间 */ private String addTime; - // 是否隐藏 + /** 是否隐藏 */ private Integer hide; - // 管理员id + /** 管理员id */ private Integer adminId; - // 商户id + /** 商户id */ private Integer merId; - // 产品关联id + /** 产品关联id */ private Integer productId; - // 是否热门(小程序) + /** 是否热门(小程序) */ private Integer isHot; - // 是否轮播图(小程序) + /** 是否轮播图(小程序) */ private Integer isBanner; private String thumbMediaId; -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleQueryCriteria.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleQueryCriteria.java index fc041b2f..6e108cda 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleQueryCriteria.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxArticleQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-07 +* @date 2020-05-12 */ @Data public class YxArticleQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuDTO.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuDTO.java index b335c3ae..77aa48af 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuDTO.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuDTO.java @@ -1,22 +1,25 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Data -public class YxWechatMenuDTO implements Serializable { +public class YxWechatMenuDto implements Serializable { private String key; - // 缓存数据 + /** 缓存数据 */ private String result; - // 缓存时间 + /** 缓存时间 */ private Integer addTime; -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuQueryCriteria.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuQueryCriteria.java index 75c0c919..45bd5eb8 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuQueryCriteria.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatMenuQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Data public class YxWechatMenuQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyDTO.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyDTO.java index ff003fa0..4ce09f26 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyDTO.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyDTO.java @@ -1,32 +1,35 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Data -public class YxWechatReplyDTO implements Serializable { +public class YxWechatReplyDto implements Serializable { - // 微信关键字回复id + /** 微信关键字回复id */ private Integer id; - // 关键字 + /** 关键字 */ private String key; - // 回复类型 + /** 回复类型 */ private String type; - // 回复数据 + /** 回复数据 */ private String data; - // 0=不可用 1 =可用 + /** 0=不可用 1 =可用 */ private Integer status; - // 是否隐藏 + /** 是否隐藏 */ private Integer hide; -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyQueryCriteria.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyQueryCriteria.java index c8d31929..2fa07dea 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyQueryCriteria.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatReplyQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Data public class YxWechatReplyQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateDTO.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateDTO.java index 3f25905b..ffd523ed 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateDTO.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateDTO.java @@ -1,34 +1,38 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; import java.io.Serializable; - /** -* @author xuwenbo -* @date 2019-12-10 +* @author hupeng +* @date 2020-05-12 */ @Data -public class YxWechatTemplateDTO implements Serializable { +public class YxWechatTemplateDto implements Serializable { - // 模板id + /** 模板id */ private Integer id; - // 模板编号 + /** 模板编号 */ private String tempkey; - // 模板名 + /** 模板名 */ private String name; - // 回复内容 + /** 回复内容 */ private String content; - // 模板ID + /** 模板ID */ private String tempid; - // 添加时间 + /** 添加时间 */ private String addTime; - // 状态 + /** 状态 */ private Integer status; -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateQueryCriteria.java b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateQueryCriteria.java index 4df0d6e2..856b47ba 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateQueryCriteria.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/dto/YxWechatTemplateQueryCriteria.java @@ -1,12 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.dto; import lombok.Data; +import java.util.List; import co.yixiang.annotation.Query; /** -* @author xuwenbo -* @date 2019-12-10 +* @author hupeng +* @date 2020-05-12 */ @Data public class YxWechatTemplateQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/WxMpTemplateMessageServiceImpl.java b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/WxMpTemplateMessageServiceImpl.java index e69495d7..8a911349 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/WxMpTemplateMessageServiceImpl.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/WxMpTemplateMessageServiceImpl.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.impl; import cn.hutool.core.util.StrUtil; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxArticleServiceImpl.java b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxArticleServiceImpl.java index d342b4de..1b7fbc3b 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxArticleServiceImpl.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxArticleServiceImpl.java @@ -1,22 +1,26 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.impl; - -import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.ReUtil; -import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; import cn.hutool.json.JSONUtil; -import co.yixiang.exception.BadRequestException; import co.yixiang.exception.ErrorRequestException; import co.yixiang.mp.config.WxMpConfiguration; import co.yixiang.mp.domain.YxArticle; -import co.yixiang.mp.repository.YxArticleRepository; -import co.yixiang.mp.service.YxArticleService; -import co.yixiang.mp.service.dto.YxArticleDTO; -import co.yixiang.mp.service.dto.YxArticleQueryCriteria; -import co.yixiang.mp.service.mapper.YxArticleMapper; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.mp.utils.URLUtils; -import co.yixiang.utils.*; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.mp.service.YxArticleService; +import co.yixiang.mp.service.dto.YxArticleDto; +import co.yixiang.mp.service.dto.YxArticleQueryCriteria; +import co.yixiang.mp.service.mapper.ArticleMapper; import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.api.WxConsts; import me.chanjar.weixin.common.error.WxErrorException; @@ -29,82 +33,91 @@ import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult; import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.io.File; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-10-07 +* @date 2020-05-12 */ @Slf4j @Service +//@CacheConfig(cacheNames = "yxArticle") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxArticleServiceImpl implements YxArticleService { - - private final YxArticleRepository yxArticleRepository; - - private final YxArticleMapper yxArticleMapper; - - public YxArticleServiceImpl(YxArticleRepository yxArticleRepository, YxArticleMapper yxArticleMapper) { - this.yxArticleRepository = yxArticleRepository; - this.yxArticleMapper = yxArticleMapper; - } +public class YxArticleServiceImpl extends BaseServiceImpl implements YxArticleService { + private final IGenerator generator; @Value("${file.path}") private String uploadDirStr; - @Override - public Map queryAll(YxArticleQueryCriteria criteria, Pageable pageable){ - Page page = yxArticleRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxArticleMapper::toDto)); + public YxArticleServiceImpl(IGenerator generator) { + this.generator = generator; } @Override - public List queryAll(YxArticleQueryCriteria criteria){ - return yxArticleMapper.toDto(yxArticleRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxArticleDTO findById(Integer id) { - Optional yxArticle = yxArticleRepository.findById(id); - ValidationUtil.isNull(yxArticle,"YxArticle","id",id); - return yxArticleMapper.toDto(yxArticle.get()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxArticleDTO create(YxArticle resources) { - //resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo())); - return yxArticleMapper.toDto(yxArticleRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxArticle resources) { - Optional optionalYxArticle = yxArticleRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxArticle,"YxArticle","id",resources.getId()); - YxArticle yxArticle = optionalYxArticle.get(); - yxArticle.copy(resources); - yxArticleRepository.save(yxArticle); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxArticleRepository.deleteById(id); + //@Cacheable + public Map queryAll(YxArticleQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxArticleDto.class)); + map.put("totalElements", page.getTotal()); + return map; } @Override - public void uploadNews(YxArticleDTO wxNewsArticleItem) throws Exception { + //@Cacheable + public List queryAll(YxArticleQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxArticle.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxArticleDto yxArticle : all) { + Map map = new LinkedHashMap<>(); + map.put("分类id", yxArticle.getCid()); + map.put("文章标题", yxArticle.getTitle()); + map.put("文章作者", yxArticle.getAuthor()); + map.put("文章图片", yxArticle.getImageInput()); + map.put("文章简介", yxArticle.getSynopsis()); + map.put(" content", yxArticle.getContent()); + map.put("文章分享标题", yxArticle.getShareTitle()); + map.put("文章分享简介", yxArticle.getShareSynopsis()); + map.put("浏览次数", yxArticle.getVisit()); + map.put("排序", yxArticle.getSort()); + map.put("原文链接", yxArticle.getUrl()); + map.put("状态", yxArticle.getStatus()); + map.put("添加时间", yxArticle.getAddTime()); + map.put("是否隐藏", yxArticle.getHide()); + map.put("管理员id", yxArticle.getAdminId()); + map.put("商户id", yxArticle.getMerId()); + map.put("产品关联id", yxArticle.getProductId()); + map.put("是否热门(小程序)", yxArticle.getIsHot()); + map.put("是否轮播图(小程序)", yxArticle.getIsBanner()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public void uploadNews(YxArticleDto wxNewsArticleItem) throws WxErrorException { WxMpService wxMpService = WxMpConfiguration.getWxMpService(); @@ -161,9 +174,9 @@ public class YxArticleServiceImpl implements YxArticleService { private WxMpMaterialUploadResult uploadPhotoToWx(WxMpService wxMpService, String picPath) throws WxErrorException { WxMpMaterial wxMpMaterial = new WxMpMaterial(); - String filename = String.valueOf( System.currentTimeMillis() ) + ".png"; + String filename = String.valueOf( (int)System.currentTimeMillis() ) + ".png"; String downloadPath = uploadDirStr + filename; - long size = HttpUtil.downloadFile(picPath, FileUtil.file(downloadPath)); + long size = HttpUtil.downloadFile(picPath, cn.hutool.core.io.FileUtil.file(downloadPath)); picPath = downloadPath; File picFile = new File( picPath ); wxMpMaterial.setFile( picFile ); @@ -187,7 +200,7 @@ public class YxArticleServiceImpl implements YxArticleService { if(StringUtils.isBlank( filepath )){//网络图片URL,需下载到本地 String filename = String.valueOf( System.currentTimeMillis() ) + ".png"; String downloadPath = uploadDirStr + filename; - long size = HttpUtil.downloadFile(imgSrc, FileUtil.file(downloadPath)); + long size = HttpUtil.downloadFile(imgSrc, cn.hutool.core.io.FileUtil.file(downloadPath)); filepath = downloadPath; } WxMediaImgUploadResult wxMediaImgUploadResult = wxMpService.getMaterialService().mediaImgUpload( new File(filepath) ); @@ -195,4 +208,4 @@ public class YxArticleServiceImpl implements YxArticleService { } return content; } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatMenuServiceImpl.java b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatMenuServiceImpl.java index 6eb05c57..ae190486 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatMenuServiceImpl.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatMenuServiceImpl.java @@ -1,89 +1,84 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.impl; - import co.yixiang.mp.domain.YxWechatMenu; -import co.yixiang.mp.repository.YxWechatMenuRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.mp.service.YxWechatMenuService; -import co.yixiang.mp.service.dto.YxWechatMenuDTO; +import co.yixiang.mp.service.dto.YxWechatMenuDto; import co.yixiang.mp.service.dto.YxWechatMenuQueryCriteria; -import co.yixiang.mp.service.mapper.YxWechatMenuMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.mp.service.mapper.WechatMenuMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxWechatMenu") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxWechatMenuServiceImpl implements YxWechatMenuService { +public class YxWechatMenuServiceImpl extends BaseServiceImpl implements YxWechatMenuService { - private final YxWechatMenuRepository YxWechatMenuRepository; + private final IGenerator generator; - private final YxWechatMenuMapper YxWechatMenuMapper; + @Override + //@Cacheable + public Map queryAll(YxWechatMenuQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxWechatMenuDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } - public YxWechatMenuServiceImpl(YxWechatMenuRepository YxWechatMenuRepository, YxWechatMenuMapper YxWechatMenuMapper) { - this.YxWechatMenuRepository = YxWechatMenuRepository; - this.YxWechatMenuMapper = YxWechatMenuMapper; + + @Override + //@Cacheable + public List queryAll(YxWechatMenuQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatMenu.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatMenuDto yxWechatMenu : all) { + Map map = new LinkedHashMap<>(); + map.put("缓存数据", yxWechatMenu.getResult()); + map.put("缓存时间", yxWechatMenu.getAddTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override - public Map queryAll(YxWechatMenuQueryCriteria criteria, Pageable pageable){ - Page page = YxWechatMenuRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(YxWechatMenuMapper::toDto)); - } - - @Override - public List queryAll(YxWechatMenuQueryCriteria criteria){ - return YxWechatMenuMapper.toDto(YxWechatMenuRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxWechatMenuDTO findById(String key) { - Optional YxWechatMenu = YxWechatMenuRepository.findById(key); - ValidationUtil.isNull(YxWechatMenu,"YxWechatMenu","key",key); - return YxWechatMenuMapper.toDto(YxWechatMenu.get()); - } - - @Override - public boolean isExist(String key) { - Optional YxWechatMenu = YxWechatMenuRepository.findById(key); - if(!YxWechatMenu.isPresent()){ + public Boolean isExist(String wechat_menus) { + YxWechatMenu yxWechatMenu = this.getOne(new QueryWrapper().eq("`key`",wechat_menus)); + if(yxWechatMenu == null){ return false; } return true; } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxWechatMenuDTO create(YxWechatMenu resources) { - //resources.setKey(IdUtil.simpleUUID()); - return YxWechatMenuMapper.toDto(YxWechatMenuRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxWechatMenu resources) { - Optional optionalYxWechatMenu = YxWechatMenuRepository.findById(resources.getKey()); - ValidationUtil.isNull( optionalYxWechatMenu,"YxWechatMenu","id",resources.getKey()); - YxWechatMenu YxWechatMenu = optionalYxWechatMenu.get(); - YxWechatMenu.copy(resources); - YxWechatMenuRepository.save(YxWechatMenu); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String key) { - YxWechatMenuRepository.deleteById(key); - } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatReplyServiceImpl.java b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatReplyServiceImpl.java index 6135c1f8..9dbf6e8e 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatReplyServiceImpl.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatReplyServiceImpl.java @@ -1,95 +1,105 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.impl; -import co.yixiang.exception.EntityExistException; import co.yixiang.mp.domain.YxWechatReply; -import co.yixiang.mp.repository.YxWechatReplyRepository; +import co.yixiang.exception.EntityExistException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.mp.service.YxWechatReplyService; -import co.yixiang.mp.service.dto.YxWechatReplyDTO; +import co.yixiang.mp.service.dto.YxWechatReplyDto; import co.yixiang.mp.service.dto.YxWechatReplyQueryCriteria; -import co.yixiang.mp.service.mapper.YxWechatReplyMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.mp.service.mapper.WechatReplyMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxWechatReply") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxWechatReplyServiceImpl implements YxWechatReplyService { +public class YxWechatReplyServiceImpl extends BaseServiceImpl implements YxWechatReplyService { - private final YxWechatReplyRepository yxWechatReplyRepository; - - private final YxWechatReplyMapper yxWechatReplyMapper; - - public YxWechatReplyServiceImpl(YxWechatReplyRepository yxWechatReplyRepository, YxWechatReplyMapper yxWechatReplyMapper) { - this.yxWechatReplyRepository = yxWechatReplyRepository; - this.yxWechatReplyMapper = yxWechatReplyMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable){ - Page page = yxWechatReplyRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxWechatReplyMapper::toDto)); + //@Cacheable + public Map queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxWechatReplyDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxWechatReplyQueryCriteria criteria){ - return yxWechatReplyMapper.toDto(yxWechatReplyRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxWechatReplyDTO findById(Integer id) { - Optional yxWechatReply = yxWechatReplyRepository.findById(id); - ValidationUtil.isNull(yxWechatReply,"YxWechatReply","id",id); - return yxWechatReplyMapper.toDto(yxWechatReply.get()); + //@Cacheable + public List queryAll(YxWechatReplyQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatReply.class, criteria)); } + @Override - @Transactional(rollbackFor = Exception.class) - public YxWechatReplyDTO create(YxWechatReply resources) { - if(yxWechatReplyRepository.findByKey(resources.getKey()) != null){ - throw new EntityExistException(YxWechatReply.class,"key",resources.getKey()); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatReplyDto yxWechatReply : all) { + Map map = new LinkedHashMap<>(); + map.put("关键字", yxWechatReply.getKey()); + map.put("回复类型", yxWechatReply.getType()); + map.put("回复数据", yxWechatReply.getData()); + map.put("0=不可用 1 =可用", yxWechatReply.getStatus()); + map.put("是否隐藏", yxWechatReply.getHide()); + list.add(map); } - return yxWechatReplyMapper.toDto(yxWechatReplyRepository.save(resources)); + FileUtil.downloadExcel(list, response); } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxWechatReply resources) { - Optional optionalYxWechatReply = yxWechatReplyRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxWechatReply,"YxWechatReply","id",resources.getId()); - YxWechatReply yxWechatReply = optionalYxWechatReply.get(); + public YxWechatReply isExist(String key) { + YxWechatReply yxWechatReply = this.getOne(new QueryWrapper().eq("`key`",key)); + return yxWechatReply; + } + + @Override + public void create(YxWechatReply yxWechatReply) { + if(this.isExist(yxWechatReply.getKey()) != null){ + throw new EntityExistException(YxWechatReply.class,"key",yxWechatReply.getKey()); + } + this.save(yxWechatReply); + } + + @Override + public void upDate(YxWechatReply resources) { + YxWechatReply yxWechatReply = this.getById(resources.getId()); YxWechatReply yxWechatReply1 = null; - yxWechatReply1 = yxWechatReplyRepository.findByKey(resources.getKey()); + yxWechatReply1 = this.isExist(resources.getKey()); if(yxWechatReply1 != null && !yxWechatReply1.getId().equals(yxWechatReply.getId())){ throw new EntityExistException(YxWechatReply.class,"key",resources.getKey()); } yxWechatReply.copy(resources); - yxWechatReplyRepository.save(yxWechatReply); + this.saveOrUpdate(yxWechatReply); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxWechatReplyRepository.deleteById(id); - } - - - @Override - public YxWechatReply isExist(String key) { - YxWechatReply yxWechatReply = yxWechatReplyRepository.findByKey(key); - - return yxWechatReply; - } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatTemplateServiceImpl.java b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatTemplateServiceImpl.java index 3b162d42..57e4770d 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatTemplateServiceImpl.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/impl/YxWechatTemplateServiceImpl.java @@ -1,83 +1,87 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.service.impl; import co.yixiang.mp.domain.YxWechatTemplate; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.mp.repository.YxWechatTemplateRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.mp.service.YxWechatTemplateService; -import co.yixiang.mp.service.dto.YxWechatTemplateDTO; +import co.yixiang.mp.service.dto.YxWechatTemplateDto; import co.yixiang.mp.service.dto.YxWechatTemplateQueryCriteria; -import co.yixiang.mp.service.mapper.YxWechatTemplateMapper; -import org.springframework.beans.factory.annotation.Autowired; +import co.yixiang.mp.service.mapper.WechatTemplateMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.util.Optional; -import org.springframework.data.domain.Page; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; 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 xuwenbo -* @date 2019-12-10 +* @author hupeng +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxWechatTemplate") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxWechatTemplateServiceImpl implements YxWechatTemplateService { +public class YxWechatTemplateServiceImpl extends BaseServiceImpl implements YxWechatTemplateService { - private final YxWechatTemplateRepository yxWechatTemplateRepository; + private final IGenerator generator; - private final YxWechatTemplateMapper yxWechatTemplateMapper; + @Override + //@Cacheable + public Map queryAll(YxWechatTemplateQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxWechatTemplateDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } - public YxWechatTemplateServiceImpl(YxWechatTemplateRepository yxWechatTemplateRepository, YxWechatTemplateMapper yxWechatTemplateMapper) { - this.yxWechatTemplateRepository = yxWechatTemplateRepository; - this.yxWechatTemplateMapper = yxWechatTemplateMapper; + + @Override + //@Cacheable + public List queryAll(YxWechatTemplateQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatTemplate.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatTemplateDto yxWechatTemplate : all) { + Map map = new LinkedHashMap<>(); + map.put("模板编号", yxWechatTemplate.getTempkey()); + map.put("模板名", yxWechatTemplate.getName()); + map.put("回复内容", yxWechatTemplate.getContent()); + map.put("模板ID", yxWechatTemplate.getTempid()); + map.put("添加时间", yxWechatTemplate.getAddTime()); + map.put("状态", yxWechatTemplate.getStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override - public YxWechatTemplate findByTempkey(String key) { - return yxWechatTemplateRepository.findByTempkey(key); + public YxWechatTemplate findByTempkey(String recharge_success_key) { + return this.getOne(new QueryWrapper().eq("tempkey",recharge_success_key)); } - - @Override - public Map queryAll(YxWechatTemplateQueryCriteria criteria, Pageable pageable){ - Page page = yxWechatTemplateRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxWechatTemplateMapper::toDto)); - } - - @Override - public List queryAll(YxWechatTemplateQueryCriteria criteria){ - return yxWechatTemplateMapper.toDto(yxWechatTemplateRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxWechatTemplateDTO findById(Integer id) { - Optional yxWechatTemplate = yxWechatTemplateRepository.findById(id); - ValidationUtil.isNull(yxWechatTemplate,"YxWechatTemplate","id",id); - return yxWechatTemplateMapper.toDto(yxWechatTemplate.get()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxWechatTemplateDTO create(YxWechatTemplate resources) { - return yxWechatTemplateMapper.toDto(yxWechatTemplateRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxWechatTemplate resources) { - Optional optionalYxWechatTemplate = yxWechatTemplateRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxWechatTemplate,"YxWechatTemplate","id",resources.getId()); - YxWechatTemplate yxWechatTemplate = optionalYxWechatTemplate.get(); - yxWechatTemplate.copy(resources); - yxWechatTemplateRepository.save(yxWechatTemplate); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxWechatTemplateRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/ArticleMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/ArticleMapper.java new file mode 100644 index 00000000..0d9bf854 --- /dev/null +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/ArticleMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.mp.domain.YxArticle; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface ArticleMapper extends CoreMapper { + +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatMenuMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatMenuMapper.java new file mode 100644 index 00000000..4487955e --- /dev/null +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatMenuMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.mp.domain.YxWechatMenu; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface WechatMenuMapper extends CoreMapper { + +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatReplyMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatReplyMapper.java new file mode 100644 index 00000000..8682c309 --- /dev/null +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatReplyMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.mp.domain.YxWechatReply; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface WechatReplyMapper extends CoreMapper { + +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatTemplateMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatTemplateMapper.java new file mode 100644 index 00000000..35f71167 --- /dev/null +++ b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/WechatTemplateMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.mp.domain.YxWechatTemplate; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface WechatTemplateMapper extends CoreMapper { + +} diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxArticleMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxArticleMapper.java deleted file mode 100644 index abf999aa..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxArticleMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package co.yixiang.mp.service.mapper; - -import co.yixiang.mapper.EntityMapper; - -import co.yixiang.mp.domain.YxArticle; -import co.yixiang.mp.service.dto.YxArticleDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-07 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxArticleMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatMenuMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatMenuMapper.java deleted file mode 100644 index 18615ca2..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatMenuMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.mp.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.mp.domain.YxWechatMenu; -import co.yixiang.mp.service.dto.YxWechatMenuDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-06 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxWechatMenuMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatReplyMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatReplyMapper.java deleted file mode 100644 index 8c8f58dd..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatReplyMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.mp.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.mp.domain.YxWechatReply; -import co.yixiang.mp.service.dto.YxWechatReplyDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-10 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxWechatReplyMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatTemplateMapper.java b/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatTemplateMapper.java deleted file mode 100644 index 5536a8de..00000000 --- a/yshop-mp/src/main/java/co/yixiang/mp/service/mapper/YxWechatTemplateMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.mp.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.mp.domain.YxWechatTemplate; -import co.yixiang.mp.service.dto.YxWechatTemplateDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author xuwenbo -* @date 2019-12-10 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxWechatTemplateMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-mp/src/main/java/co/yixiang/mp/utils/JsonUtils.java b/yshop-mp/src/main/java/co/yixiang/mp/utils/JsonUtils.java index 5eb49193..bea95113 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/utils/JsonUtils.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/utils/JsonUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.utils; import com.google.gson.Gson; diff --git a/yshop-mp/src/main/java/co/yixiang/mp/utils/URLUtils.java b/yshop-mp/src/main/java/co/yixiang/mp/utils/URLUtils.java index 5cb42a9d..a04b5fdd 100644 --- a/yshop-mp/src/main/java/co/yixiang/mp/utils/URLUtils.java +++ b/yshop-mp/src/main/java/co/yixiang/mp/utils/URLUtils.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.mp.utils; import java.util.HashMap; diff --git a/yshop-mproot/pom.xml b/yshop-mproot/pom.xml new file mode 100644 index 00000000..5f02e377 --- /dev/null +++ b/yshop-mproot/pom.xml @@ -0,0 +1,42 @@ + + + + yshop + co.yixiang + 2.2 + + 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..f629adc7 --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java @@ -0,0 +1,78 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..90a3051d --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java @@ -0,0 +1,15 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..609e5adc --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java @@ -0,0 +1,15 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..92e836de --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java @@ -0,0 +1,13 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..8504d66a --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/service/impl/BaseServiceImpl.java @@ -0,0 +1,72 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..62da477e --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java @@ -0,0 +1,215 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..0233968b --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/web/param/OrderQueryParam.java @@ -0,0 +1,39 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..4f0540a8 --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/web/param/QueryParam.java @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..d80beef5 --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/common/web/vo/Paging.java @@ -0,0 +1,65 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..d574170e --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java @@ -0,0 +1,96 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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..3315a7fc --- /dev/null +++ b/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java @@ -0,0 +1,40 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +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; + } +} 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-shop/pom.xml b/yshop-shop/pom.xml index e84b1a17..1c7e1808 100644 --- a/yshop-shop/pom.xml +++ b/yshop-shop/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -21,13 +21,13 @@ co.yixiang yshop-tools - 2.1 + 2.2 co.yixiang yshop-mp - 2.1 + 2.2 co.yixiang @@ -38,4 +38,4 @@ - \ No newline at end of file + diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java index 5420f7cd..18dbbcd2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java @@ -1,177 +1,182 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import javax.validation.constraints.*; +import java.sql.Timestamp; import java.math.BigDecimal; -import java.util.Date; +import java.io.Serializable; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_bargain") +@TableName(value="yx_store_bargain") public class YxStoreBargain implements Serializable { - // 砍价产品ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 砍价产品ID */ + @TableId private Integer id; - // 关联产品ID - @Column(name = "product_id",nullable = false) + + /** 关联产品ID */ private Integer productId; - // 砍价活动名称 - @Column(name = "title",nullable = false) - @NotBlank(message = "请输入砍价活动名称") + + /** 砍价活动名称 */ + @NotBlank(message = "请填写砍价名称") private String title; - // 砍价活动图片 - @Column(name = "image",nullable = false) - @NotBlank(message = "请上传产品图片") + + /** 砍价活动图片 */ + @NotBlank(message = "请上传商品图片") private String image; - // 单位名称 - @Column(name = "unit_name") - @NotBlank(message = "单位名不能为空") + + /** 单位名称 */ private String unitName; - // 库存 - @Column(name = "stock") - @NotNull(message = "库存必填") + + /** 库存 */ + @NotNull(message = "请输入库存") + @Min(message = "库存不能小于0",value = 1) private Integer stock; - // 销量 - @Column(name = "sales") - @NotNull(message = "销量必填") + + /** 销量 */ private Integer sales; - // 砍价产品轮播图 - @Column(name = "images",nullable = false) - @NotBlank(message = "请上传产品轮播图") + + /** 砍价产品轮播图 */ + @NotBlank(message = "请上传商品轮播") private String images; - // 砍价开启时间 - @Column(name = "start_time",nullable = false) + + /** 砍价开启时间 */ private Integer startTime; - // 砍价结束时间 - @Column(name = "stop_time",nullable = false) + + /** 砍价结束时间 */ private Integer stopTime; - @NotNull(message = "开始时间不能为空") - private Date startTimeDate; - @NotNull(message = "结束时间不能为空") - private Date endTimeDate; - - // 砍价产品名称 - @Column(name = "store_name") + /** 砍价产品名称 */ private String storeName; - // 砍价金额 - @Column(name = "price") - @NotNull(message = "砍价金额必填") - @Min(value = 0,message = "砍价金额必须大于等于0") + + /** 砍价金额 */ + @NotNull(message = "请输入砍价金额") + @DecimalMin(value="0.00", message = "砍价金额不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "砍价金额不在合法范围内") private BigDecimal price; - // 砍价商品最低价 - @Column(name = "min_price") - @NotNull(message = "砍价商品最低价必填") - @Min(value = 0,message = "砍价商品最低价必须大于等于0") + + /** 砍价商品最低价 */ + @NotNull(message = "请输入砍到最低价") + @DecimalMin(value="0.00", message = "砍到最低价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "砍到最低价不在合法范围内") private BigDecimal minPrice; - // 每次购买的砍价产品数量 - @Column(name = "num") - @NotNull(message = "购买的砍价产品数量必填") - @Min(value = 0,message = "购买的砍价产品数量必须大于等于0") + + /** 每次购买的砍价产品数量 */ + @NotNull(message = "请输入限购") + @Min(message = "限购不能小于0",value = 1) private Integer num; - // 用户每次砍价的最大金额 - @Column(name = "bargain_max_price") - @NotNull(message = "砍价的最大金额必填") + + /** 用户每次砍价的最大金额 */ + @NotNull(message = "请输入单次砍最高价") + @DecimalMin(value="0.00", message = "单次砍最高价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "单次砍最高价不在合法范围内") private BigDecimal bargainMaxPrice; - // 用户每次砍价的最小金额 - @Column(name = "bargain_min_price") - @NotNull(message = "砍价的最小金额必填") + + /** 用户每次砍价的最小金额 */ + @NotNull(message = "请输入单次砍最低价") + @DecimalMin(value="0.00", message = "单次砍最低价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "单次砍最低价小金额不在合法范围内") private BigDecimal bargainMinPrice; - // 用户每次砍价的次数 - @Column(name = "bargain_num",insertable = false) + + /** 用户每次砍价的次数 */ + @NotNull(message = "请输入砍价的次数") + @Min(message = "砍价的次数不能小于0",value = 1) private Integer bargainNum; - // 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) - @Column(name = "status",nullable = false) - @NotNull(message = "请选择活动状态") + + /** 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) */ private Integer status; - // 砍价详情 - @Column(name = "description") + + /** 砍价详情 */ + @NotBlank(message = "请填写详情") private String description; - // 反多少积分 - @Column(name = "give_integral",insertable = false) + + /** 反多少积分 */ private BigDecimal giveIntegral; - // 砍价活动简介 - @Column(name = "info") + + /** 砍价活动简介 */ private String info; - // 成本价 - @Column(name = "cost") - @NotNull(message = "成本价必填") + + /** 成本价 */ private BigDecimal cost; - // 排序 - @Column(name = "sort",nullable = false) - @NotNull(message = "排序必填") + + /** 排序 */ private Integer sort; - // 是否推荐0不推荐1推荐 - @Column(name = "is_hot",insertable = false) + + /** 是否推荐0不推荐1推荐 */ private Integer isHot; - // 是否删除 0未删除 1删除 - @Column(name = "is_del",insertable = false) + + /** 是否删除 0未删除 1删除 */ private Integer isDel; - // 添加时间 - @Column(name = "add_time") + + /** 添加时间 */ private Integer addTime; - // 是否包邮 0不包邮 1包邮 - @Column(name = "is_postage",nullable = false) - @NotNull(message = "请选择是否包邮") + + /** 是否包邮 0不包邮 1包邮 */ private Integer isPostage; - // 邮费 - @Column(name = "postage") + + /** 邮费 */ private BigDecimal postage; - // 砍价规则 - @Column(name = "rule") + + /** 砍价规则 */ + @NotBlank(message = "请填写砍价规则") private String rule; - // 砍价产品浏览量 - @Column(name = "look",insertable = false) + + /** 砍价产品浏览量 */ private Integer look; - // 砍价产品分享量 - @Column(name = "share",insertable = false) + + /** 砍价产品分享量 */ private Integer share; + @NotNull(message = "请选择结束时间") + private Timestamp endTimeDate; + + @NotNull(message = "请选择开始时间") + private Timestamp startTimeDate; + + public void copy(YxStoreBargain source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java index 387c0fce..ab17ecee 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java @@ -1,160 +1,157 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import javax.validation.constraints.*; +import java.sql.Timestamp; import java.math.BigDecimal; -import java.util.Date; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_combination") +@TableName("yx_store_combination") public class YxStoreCombination implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 商品id - @Column(name = "product_id",nullable = false) + + /** 商品id */ private Integer productId; - // 商户id - @Column(name = "mer_id",insertable = false) + + /** 商户id */ private Integer merId; - // 推荐图 - @Column(name = "image",nullable = false) - @NotBlank(message = "请上传产品图片") + + /** 推荐图 */ + @NotBlank(message = "请上传商品图片") private String image; - // 轮播图 - @Column(name = "images",nullable = false) - @NotBlank(message = "请上传产品轮播图") + + /** 轮播图 */ + @NotBlank(message = "请上传商品轮播") private String images; - // 活动标题 - @Column(name = "title",nullable = false) - @NotBlank(message = "请输入拼团名称") + + /** 活动标题 */ + @NotBlank(message = "请填写拼团名称") private String title; - // 活动属性 - @Column(name = "attr") + + /** 活动属性 */ private String attr; - // 参团人数 - @Column(name = "people",nullable = false) - @NotNull(message = "拼团人数必填") - @Min(value = 2,message = "拼团人数必须大于1") + + /** 参团人数 */ + @NotNull(message = "请输入拼团人数") + @Min(message = "拼团人数小于0",value = 1) private Integer people; - // 简介 - @Column(name = "info",nullable = false) - @NotBlank(message = "请输入拼团简介") + + /** 简介 */ private String info; - // 价格 - @Column(name = "price",nullable = false) - @NotNull(message = "拼团价必填") - @Min(value = 0,message = "拼团价必须大于0") + + /** 价格 */ + @NotNull(message = "请输入拼团价") + @DecimalMin(value="0.00", message = "拼团价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "拼团价不在合法范围内") private BigDecimal price; - // 排序 - @Column(name = "sort",nullable = false) - @NotNull(message = "排序必填") + + /** 排序 */ private Integer sort; - // 销量 - @Column(name = "sales",nullable = false) - @NotNull(message = "销量必填") + + /** 销量 */ private Integer sales; - // 库存 - @Column(name = "stock",nullable = false) - @NotNull(message = "库存必填") + + /** 库存 */ + @NotNull(message = "请输入库存") + @Min(message = "库存不能小于0",value = 1) private Integer stock; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ private String addTime; - // 推荐 - @Column(name = "is_host",nullable = false) - @NotNull(message = "推荐必须选择") + + /** 推荐 */ private Integer isHost; - // 产品状态 - @Column(name = "is_show",nullable = false) - @NotNull(message = "状态必须选择") + + /** 产品状态 */ private Integer isShow; - @Column(name = "is_del",nullable = false,insertable = false) + private Integer isDel; - @Column(name = "combination",nullable = false,insertable = false) + private Integer combination; - // 商户是否可用1可用0不可用 - @Column(name = "mer_use") + + /** 商户是否可用1可用0不可用 */ private Integer merUse; - // 是否包邮1是0否 - @Column(name = "is_postage",nullable = false) - @NotNull(message = "包邮状态必须选择") + + /** 是否包邮1是0否 */ private Integer isPostage; - // 邮费 - @Column(name = "postage",nullable = false) - @NotNull(message = "邮费必填") + + /** 邮费 */ private BigDecimal postage; - // 拼团内容 - @Column(name = "description",nullable = false) - @NotBlank(message = "拼团内容不能为空") + + /** 拼团内容 */ + @NotBlank(message = "请填写详情") private String description; - // 拼团开始时间 - @Column(name = "start_time",nullable = false) + + /** 拼团开始时间 */ private Integer startTime; - // 拼团结束时间 - @Column(name = "stop_time",nullable = false) + + /** 拼团结束时间 */ private Integer stopTime; - @NotNull(message = "开始时间不能为空") - private Date startTimeDate; - @NotNull(message = "结束时间不能为空") - private Date endTimeDate; - - // 拼团订单有效时间 - @Column(name = "effective_time",nullable = false) + /** 拼团订单有效时间 */ + @NotNull(message = "请输入拼团时效") + @Min(message = "拼团时效不能小于0",value = 1) private Integer effectiveTime; - // 拼图产品成本 - @Column(name = "cost",nullable = false) + + /** 拼图产品成本 */ private Integer cost; - // 浏览量 - @Column(name = "browse") + + /** 浏览量 */ private Integer browse; - // 单位名 - @Column(name = "unit_name",nullable = false) + + /** 单位名 */ private String unitName; + @NotNull(message = "请选择结束时间") + private Timestamp endTimeDate; + + @NotNull(message = "请选择开始时间") + private Timestamp startTimeDate; + + public void copy(YxStoreCombination source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java index b3224f5d..5d476862 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java @@ -1,70 +1,77 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; -import javax.validation.constraints.Min; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; import javax.validation.constraints.NotBlank; -import java.io.Serializable; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_coupon") +@TableName("yx_store_coupon") public class YxStoreCoupon implements Serializable { - // 优惠券表ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 优惠券表ID */ + @TableId private Integer id; - // 优惠券名称 - @Column(name = "title",nullable = false) - @NotBlank(message = "名称必填") + + /** 优惠券名称 */ + @NotBlank(message = "请填写优惠券名称") private String title; - // 兑换消耗积分值 - @Column(name = "integral",nullable = false) + + /** 兑换消耗积分值 */ private Integer integral; - // 兑换的优惠券面值 - @Column(name = "coupon_price",nullable = false) - @Min(value = 1,message = "面值必须大于1") + + /** 兑换的优惠券面值 */ + @DecimalMin(value="0.00", message = "优惠券面值不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "优惠券面值不在合法范围内") private BigDecimal couponPrice; - // 最低消费多少金额可用优惠券 - @Column(name = "use_min_price",nullable = false) - @Min(value = 1,message = "最低消费必须大于1") + + /** 最低消费多少金额可用优惠券 */ + @DecimalMin(value="0.00", message = "最低消费不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "最低消费不在合法范围内") private BigDecimal useMinPrice; - // 优惠券有效期限(单位:天) - @Column(name = "coupon_time",nullable = false) + + /** 优惠券有效期限(单位:天) */ + @NotNull(message = "请输入有效期限") private Integer couponTime; - // 排序 - @Column(name = "sort",nullable = false) + + /** 排序 */ private Integer sort; - // 状态(0:关闭,1:开启) - @Column(name = "status",nullable = false) + + /** 状态(0:关闭,1:开启) */ private Integer status; - // 兑换项目添加时间 - @Column(name = "add_time",nullable = false) + + /** 兑换项目添加时间 */ private Integer addTime; - // 是否删除 - @Column(name = "is_del",nullable = false,insertable = false) + + /** 是否删除 */ private Integer isDel; + public void copy(YxStoreCoupon source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java index a8175429..3d55eba7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java @@ -1,73 +1,76 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; import javax.validation.constraints.NotNull; +import java.sql.Timestamp; import java.io.Serializable; -import java.util.Date; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_coupon_issue") +@TableName("yx_store_coupon_issue") public class YxStoreCouponIssue implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 优惠券ID - @Column(name = "cid") - private Integer cid; - @Column(name = "cname") private String cname; - // 优惠券领取开启时间 - @Column(name = "start_time") + + /** 优惠券ID */ + private Integer cid; + + + /** 优惠券领取开启时间 */ private Integer startTime; - @NotNull(message = "领取时间不能为空") - private Date startTimeDate; - @NotNull(message = "结束时间不能为空") - private Date endTimeDate; - - // 优惠券领取结束时间 - @Column(name = "end_time") + /** 优惠券领取结束时间 */ private Integer endTime; - // 优惠券领取数量 - @Column(name = "total_count") + + /** 优惠券领取数量 */ private Integer totalCount; - // 优惠券剩余领取数量 - @Column(name = "remain_count") + + /** 优惠券剩余领取数量 */ private Integer remainCount; - // 是否无限张数 - @Column(name = "is_permanent",nullable = false) + + /** 是否无限张数 */ private Integer isPermanent; - // 1 正常 0 未开启 -1 已无效 - @Column(name = "status",nullable = false) + + /** 1 正常 0 未开启 -1 已无效 */ private Integer status; - @Column(name = "is_del",nullable = false) + private Integer isDel; - // 优惠券添加时间 - @Column(name = "add_time") + + /** 优惠券添加时间 */ private Integer addTime; + + @NotNull(message = "请选择结束时间") + private Timestamp endTimeDate; + + @NotNull(message = "请选择开始时间") + private Timestamp startTimeDate; + + public void copy(YxStoreCouponIssue source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java index ba5b4ce6..66cf0a3a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java @@ -1,39 +1,40 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_coupon_issue_user") +@TableName("yx_store_coupon_issue_user") public class YxStoreCouponIssueUser implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 领取优惠券用户ID - @Column(name = "uid") + + /** 领取优惠券用户ID */ private Integer uid; - // 优惠券前台领取ID - @Column(name = "issue_coupon_id") + + /** 优惠券前台领取ID */ private Integer issueCouponId; - // 领取时间 - @Column(name = "add_time") + + /** 领取时间 */ private Integer addTime; + public void copy(YxStoreCouponIssueUser source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java index b7eb329a..b961cba1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java @@ -1,73 +1,74 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-10 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_coupon_user") +@TableName("yx_store_coupon_user") public class YxStoreCouponUser implements Serializable { - // 优惠券发放记录id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 优惠券发放记录id */ + @TableId private Integer id; - // 兑换的项目id - @Column(name = "cid",nullable = false) + + /** 兑换的项目id */ private Integer cid; - // 优惠券所属用户 - @Column(name = "uid",nullable = false) + + /** 优惠券所属用户 */ private Integer uid; - // 优惠券名称 - @Column(name = "coupon_title",nullable = false) + + /** 优惠券名称 */ private String couponTitle; - // 优惠券的面值 - @Column(name = "coupon_price",nullable = false) + + /** 优惠券的面值 */ private BigDecimal couponPrice; - // 最低消费多少金额可用优惠券 - @Column(name = "use_min_price",nullable = false) + + /** 最低消费多少金额可用优惠券 */ private BigDecimal useMinPrice; - // 优惠券创建时间 - @Column(name = "add_time",nullable = false) + + /** 优惠券创建时间 */ private Integer addTime; - // 优惠券结束时间 - @Column(name = "end_time",nullable = false) + + /** 优惠券结束时间 */ private Integer endTime; - // 使用时间 - @Column(name = "use_time",nullable = false) + + /** 使用时间 */ private Integer useTime; - // 获取方式 - @Column(name = "type",nullable = false) + + /** 获取方式 */ private String type; - // 状态(0:未使用,1:已使用, 2:已过期) - @Column(name = "status",nullable = false) + + /** 状态(0:未使用,1:已使用, 2:已过期) */ private Integer status; - // 是否有效 - @Column(name = "is_fail",nullable = false) + + /** 是否有效 */ private Integer isFail; + public void copy(YxStoreCouponUser source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java index f31a9822..dd65eb00 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java @@ -1,87 +1,88 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_store_pink") +@TableName("yx_store_pink") public class YxStorePink implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 用户id - @Column(name = "uid",nullable = false) + + /** 用户id */ private Integer uid; - // 订单id 生成 - @Column(name = "order_id",nullable = false) + + /** 订单id 生成 */ private String orderId; - // 订单id 数据库 - @Column(name = "order_id_key",nullable = false) + + /** 订单id 数据库 */ private Integer orderIdKey; - // 购买商品个数 - @Column(name = "total_num",nullable = false) + + /** 购买商品个数 */ private Integer totalNum; - // 购买总金额 - @Column(name = "total_price",nullable = false) + + /** 购买总金额 */ private BigDecimal totalPrice; - // 拼团产品id - @Column(name = "cid",nullable = false) + + /** 拼团产品id */ private Integer cid; - // 产品id - @Column(name = "pid",nullable = false) + + /** 产品id */ private Integer pid; - // 拼图总人数 - @Column(name = "people",nullable = false) + + /** 拼图总人数 */ private Integer people; - // 拼团产品单价 - @Column(name = "price",nullable = false) + + /** 拼团产品单价 */ private BigDecimal price; - // 开始时间 - @Column(name = "add_time",nullable = false) + + /** 开始时间 */ private String addTime; - @Column(name = "stop_time",nullable = false) + private String stopTime; - // 团长id 0为团长 - @Column(name = "k_id",nullable = false) + + /** 团长id 0为团长 */ private Integer kId; - // 是否发送模板消息0未发送1已发送 - @Column(name = "is_tpl",nullable = false) + + /** 是否发送模板消息0未发送1已发送 */ private Integer isTpl; - // 是否退款 0未退款 1已退款 - @Column(name = "is_refund",nullable = false) + + /** 是否退款 0未退款 1已退款 */ private Integer isRefund; - // 状态1进行中2已完成3未完成 - @Column(name = "status",nullable = false) + + /** 状态1进行中2已完成3未完成 */ private Integer status; + public void copy(YxStorePink source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java index 3c69404b..9594e2dd 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java @@ -1,157 +1,151 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import javax.validation.constraints.*; +import java.sql.Timestamp; import java.math.BigDecimal; -import java.util.Date; +import java.io.Serializable; /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_seckill") +@TableName("yx_store_seckill") public class YxStoreSeckill implements Serializable { - // 商品秒杀产品表id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 商品秒杀产品表id */ + @TableId private Integer id; - // 商品id - @Column(name = "product_id",nullable = false) + + /** 商品id */ private Integer productId; - // 推荐图 - @Column(name = "image",nullable = false) - @NotBlank(message = "请上传产品图片") + + /** 推荐图 */ + @NotBlank(message = "请上传商品图片") private String image; - // 轮播图 - @Column(name = "images",nullable = false) - @NotBlank(message = "请上传产品轮播图") + + /** 轮播图 */ + @NotBlank(message = "请上传商品轮播") private String images; - // 活动标题 - @Column(name = "title",nullable = false) - @NotBlank(message = "请输入产品标题") + + /** 活动标题 */ + @NotBlank(message = "请填写秒杀名称") private String title; - // 简介 - @Column(name = "info",nullable = false) - @NotBlank(message = "请输入秒杀简介") + + /** 简介 */ private String info; - // 价格 - @Column(name = "price",nullable = false) - @NotNull(message = "秒杀价必填") - @Min(value = 0,message = "秒杀价必须大于0") + + /** 价格 */ + @NotNull(message = "请输入秒杀价") + @DecimalMin(value="0.00", message = "秒杀价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "秒杀价不在合法范围内") private BigDecimal price; - // 成本 - @Column(name = "cost",nullable = false) - @NotNull(message = "成本价必填") - @Min(value = 0,message = "成本价必须大于0") + + /** 成本 */ private BigDecimal cost; - // 原价 - @Column(name = "ot_price",nullable = false) - @NotNull(message = "原价必填") - @Min(value = 0,message = "原价必须大于0") + + /** 原价 */ private BigDecimal otPrice; - // 返多少积分 - @Column(name = "give_integral",nullable = false) + + /** 返多少积分 */ private BigDecimal giveIntegral; - // 排序 - @Column(name = "sort",nullable = false) - @NotNull(message = "排序必填") + + /** 排序 */ private Integer sort; - // 库存 - @Column(name = "stock",nullable = false) - @NotNull(message = "库存必填") + + /** 库存 */ + @NotNull(message = "请输入库存") + @Min(message = "库存不能小于0",value = 1) private Integer stock; - // 销量 - @Column(name = "sales",nullable = false) - @NotNull(message = "销量必填") + + /** 销量 */ private Integer sales; - // 单位名 - @Column(name = "unit_name",nullable = false) - @NotBlank(message = "单位名不能为空") + + /** 单位名 */ private String unitName; - // 邮费 - @Column(name = "postage",nullable = false) - @NotNull(message = "邮费必填") + + /** 邮费 */ private BigDecimal postage; - // 内容 - @Column(name = "description") + + /** 内容 */ + @NotBlank(message = "请填写详情") private String description; - // 开始时间 - @Column(name = "start_time",nullable = false) + + /** 开始时间 */ private Integer startTime; - // 结束时间 - @Column(name = "stop_time",nullable = false) + + /** 结束时间 */ private Integer stopTime; - @NotNull(message = "开始时间不能为空") - private Date startTimeDate; - @NotNull(message = "结束时间不能为空") - private Date endTimeDate; - - // 添加时间 - @Column(name = "add_time",nullable = false) + /** 添加时间 */ private String addTime; - // 产品状态 - @Column(name = "status",nullable = false) - @NotNull(message = "活动状态必须选择") + + /** 产品状态 */ private Integer status; - // 是否包邮 - @Column(name = "is_postage",nullable = false) - @NotNull(message = "包邮状态必须选择") + + /** 是否包邮 */ private Integer isPostage; - // 热门推荐 - @Column(name = "is_hot",insertable = false) + + /** 热门推荐 */ private Integer isHot; - // 删除 0未删除1已删除 - @Column(name = "is_del",insertable = false) + + /** 删除 0未删除1已删除 */ private Integer isDel; - // 最多秒杀几个 - @Column(name = "num",nullable = false) - @NotNull(message = "限购必填") - @Min(value = 1,message = "限购必须大于0") + + /** 最多秒杀几个 */ + @NotNull(message = "请输入限购") + @Min(message = "限购不能小于0",value = 1) private Integer num; - // 显示 - @Column(name = "is_show",nullable = false) + + /** 显示 */ private Integer isShow; + @NotNull(message = "请选择秒杀结束时间") + private Timestamp endTimeDate; + + @NotNull(message = "请选择秒杀开始时间") + private Timestamp startTimeDate; + + + /** 时间段id */ @NotNull(message = "请选择开始时间") private Integer timeId; + public void copy(YxStoreSeckill source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java index 787031b0..f0a9812e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java @@ -1,59 +1,60 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_store_visit") +@TableName("yx_store_visit") public class YxStoreVisit implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 产品ID - @Column(name = "product_id") + + /** 产品ID */ private Integer productId; - // 产品类型 - @Column(name = "product_type") + + /** 产品类型 */ private String productType; - // 产品分类ID - @Column(name = "cate_id") + + /** 产品分类ID */ private Integer cateId; - // 产品类型 - @Column(name = "type") + + /** 产品类型 */ private String type; - // 用户ID - @Column(name = "uid") + + /** 用户ID */ private Integer uid; - // 访问次数 - @Column(name = "count") + + /** 访问次数 */ private Integer count; - // 备注描述 - @Column(name = "content") + + /** 备注描述 */ private String content; - // 添加时间 - @Column(name = "add_time") + + /** 添加时间 */ private Integer addTime; + public void copy(YxStoreVisit source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java index 49e4bdfb..20f8b3a7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java @@ -1,80 +1,81 @@ -package co.yixiang.modules.activity.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ -@Entity @Data -@Table(name="yx_user_extract") +@TableName("yx_user_extract") public class YxUserExtract implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - @Column(name = "uid") + private Integer uid; - // 名称 - @Column(name = "real_name") + + /** 名称 */ private String realName; - // bank = 银行卡 alipay = 支付宝wx=微信 - @Column(name = "extract_type") + + /** bank = 银行卡 alipay = 支付宝wx=微信 */ private String extractType; - // 银行卡 - @Column(name = "bank_code") + + /** 银行卡 */ private String bankCode; - // 开户地址 - @Column(name = "bank_address") + + /** 开户地址 */ private String bankAddress; - // 支付宝账号 - @Column(name = "alipay_code") + + /** 支付宝账号 */ private String alipayCode; - // 提现金额 - @Column(name = "extract_price") + + /** 提现金额 */ private BigDecimal extractPrice; - @Column(name = "mark") + private String mark; - @Column(name = "balance") + private BigDecimal balance; - // 无效原因 - @Column(name = "fail_msg") + + /** 无效原因 */ private String failMsg; - @Column(name = "fail_time") + private Integer failTime; - // 添加时间 - @Column(name = "add_time") + + /** 添加时间 */ private Integer addTime; - // -1 未通过 0 审核中 1 已提现 - @Column(name = "status") + + /** -1 未通过 0 审核中 1 已提现 */ private Integer status; - // 微信号 - @Column(name = "wechat") + + /** 微信号 */ private String wechat; + public void copy(YxUserExtract source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreBargainRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreBargainRepository.java deleted file mode 100644 index 85fd5b0a..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreBargainRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreBargain; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author xuwenbo -* @date 2019-12-22 -*/ -public interface YxStoreBargainRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCombinationRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCombinationRepository.java deleted file mode 100644 index 61743177..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCombinationRepository.java +++ /dev/null @@ -1,18 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreCombination; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; - -/** -* @author hupeng -* @date 2019-11-18 -*/ -public interface YxStoreCombinationRepository extends JpaRepository, JpaSpecificationExecutor { - @Modifying - @Query(value = "update yx_store_combination set is_show = ?1 where id = ?2",nativeQuery = true) - void updateOnsale(int status, int id); - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueRepository.java deleted file mode 100644 index cb9accbb..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreCouponIssue; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-09 -*/ -public interface YxStoreCouponIssueRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueUserRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueUserRepository.java deleted file mode 100644 index f76e0f64..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponIssueUserRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-09 -*/ -public interface YxStoreCouponIssueUserRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponRepository.java deleted file mode 100644 index 4549838a..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreCoupon; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-09 -*/ -public interface YxStoreCouponRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponUserRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponUserRepository.java deleted file mode 100644 index 910953bc..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreCouponUserRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-10 -*/ -public interface YxStoreCouponUserRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStorePinkRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStorePinkRepository.java deleted file mode 100644 index f395db23..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStorePinkRepository.java +++ /dev/null @@ -1,20 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStorePink; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-18 -*/ -public interface YxStorePinkRepository extends JpaRepository, JpaSpecificationExecutor { - int countByCid(int cid); - - int countByCidAndKId(int cid, int kid); - - int countByKId(int kid); - - YxStorePink findByOrderIdKey(int id); - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreSeckillRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreSeckillRepository.java deleted file mode 100644 index 593f7114..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreSeckillRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreSeckill; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author xuwenbo -* @date 2019-12-14 -*/ -public interface YxStoreSeckillRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreVisitRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreVisitRepository.java deleted file mode 100644 index 5c9bfb95..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxStoreVisitRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxStoreVisit; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-18 -*/ -public interface YxStoreVisitRepository extends JpaRepository, JpaSpecificationExecutor { - int countByProductIdAndProductType(int productId, String productType); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxUserExtractRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxUserExtractRepository.java deleted file mode 100644 index 20d35a14..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/repository/YxUserExtractRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.activity.repository; - -import co.yixiang.modules.activity.domain.YxUserExtract; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-14 -*/ -public interface YxUserExtractRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreBargainController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreBargainController.java index a0eac56d..d7ee2a72 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreBargainController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreBargainController.java @@ -1,9 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreBargain; import co.yixiang.modules.activity.service.YxStoreBargainService; import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria; @@ -18,7 +21,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** -* @author xuwenbo +* @author hupeng * @date 2019-12-22 */ @Api(tags = "商城:砍价管理") @@ -58,9 +61,9 @@ public class StoreBargainController { } if(ObjectUtil.isNull(resources.getId())){ resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxStoreBargainService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreBargainService.save(resources),HttpStatus.CREATED); }else{ - yxStoreBargainService.update(resources); + yxStoreBargainService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } } @@ -71,7 +74,7 @@ public class StoreBargainController { @PreAuthorize("@el.check('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxStoreBargainService.delete(id); + yxStoreBargainService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCombinationController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCombinationController.java index 13b57379..1fd77158 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCombinationController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCombinationController.java @@ -1,9 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreCombination; import co.yixiang.modules.activity.service.YxStoreCombinationService; import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria; @@ -59,9 +62,9 @@ public class StoreCombinationController { } if(ObjectUtil.isNull(resources.getId())){ resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo())); - return new ResponseEntity(yxStoreCombinationService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreCombinationService.save(resources),HttpStatus.CREATED); }else{ - yxStoreCombinationService.update(resources); + yxStoreCombinationService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -87,7 +90,7 @@ public class StoreCombinationController { YxStoreCombination combination = new YxStoreCombination(); combination.setIsDel(1); combination.setId(id); - yxStoreCombinationService.update(combination); + yxStoreCombinationService.saveOrUpdate(combination); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponController.java index 7851b347..4be8f328 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreCoupon; import co.yixiang.modules.activity.service.YxStoreCouponService; import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria; @@ -45,7 +48,7 @@ public class StoreCouponController { @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_CREATE')") public ResponseEntity create(@Validated @RequestBody YxStoreCoupon resources){ resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxStoreCouponService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreCouponService.save(resources),HttpStatus.CREATED); } @Log("修改") @@ -53,7 +56,7 @@ public class StoreCouponController { @PutMapping(value = "/yxStoreCoupon") @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')") public ResponseEntity update(@Validated @RequestBody YxStoreCoupon resources){ - yxStoreCouponService.update(resources); + yxStoreCouponService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -66,7 +69,7 @@ public class StoreCouponController { YxStoreCoupon resources = new YxStoreCoupon(); resources.setId(id); resources.setIsDel(1); - yxStoreCouponService.update(resources); + yxStoreCouponService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueController.java index 95356961..c0d42819 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueController.java @@ -1,9 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreCouponIssue; import co.yixiang.modules.activity.service.YxStoreCouponIssueService; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria; @@ -58,7 +61,7 @@ public class StoreCouponIssueController { resources.setRemainCount(resources.getTotalCount()); } resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxStoreCouponIssueService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreCouponIssueService.save(resources),HttpStatus.CREATED); } @Log("修改状态") @@ -66,7 +69,7 @@ public class StoreCouponIssueController { @PutMapping(value = "/yxStoreCouponIssue") @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')") public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssue resources){ - yxStoreCouponIssueService.update(resources); + yxStoreCouponIssueService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -79,7 +82,7 @@ public class StoreCouponIssueController { YxStoreCouponIssue resources = new YxStoreCouponIssue(); resources.setId(id); resources.setIsDel(1); - yxStoreCouponIssueService.update(resources); + yxStoreCouponIssueService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueUserController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueUserController.java index ac108ed4..e3b67efb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueUserController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponIssueUserController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; import co.yixiang.modules.activity.service.YxStoreCouponIssueUserService; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria; @@ -43,7 +46,7 @@ public class StoreCouponIssueUserController { @PostMapping(value = "/yxStoreCouponIssueUser") @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_CREATE')") public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssueUser resources){ - return new ResponseEntity(yxStoreCouponIssueUserService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreCouponIssueUserService.save(resources),HttpStatus.CREATED); } @Log("修改") @@ -51,7 +54,7 @@ public class StoreCouponIssueUserController { @PutMapping(value = "/yxStoreCouponIssueUser") @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_EDIT')") public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssueUser resources){ - yxStoreCouponIssueUserService.update(resources); + yxStoreCouponIssueUserService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -61,7 +64,7 @@ public class StoreCouponIssueUserController { @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxStoreCouponIssueUserService.delete(id); + yxStoreCouponIssueUserService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponUserController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponUserController.java index dd0fc7f9..abc68fec 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponUserController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreCouponUserController.java @@ -1,7 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; -import co.yixiang.aop.log.Log; -import co.yixiang.modules.activity.domain.YxStoreCouponUser; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.service.YxStoreCouponUserService; import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria; import io.swagger.annotations.Api; @@ -10,7 +14,6 @@ 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.*; /** @@ -37,4 +40,4 @@ public class StoreCouponUserController { } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StorePinkController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StorePinkController.java index 96ed4631..631d2547 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StorePinkController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StorePinkController.java @@ -1,7 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; -import co.yixiang.aop.log.Log; -import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.service.YxStorePinkService; import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria; import io.swagger.annotations.Api; @@ -10,7 +14,6 @@ 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.*; /** @@ -37,4 +40,4 @@ public class StorePinkController { } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreSeckillController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreSeckillController.java index cfc7f804..fd123d08 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreSeckillController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/StoreSeckillController.java @@ -1,9 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.activity.domain.YxStoreSeckill; import co.yixiang.modules.activity.service.YxStoreSeckillService; import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria; @@ -18,7 +21,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; /** -* @author xuwenbo +* @author hupeng * @date 2019-12-14 */ @Api(tags = "商城:秒杀管理") @@ -57,9 +60,9 @@ public class StoreSeckillController { } if(ObjectUtil.isNull(resources.getId())){ resources.setAddTime(String.valueOf(OrderUtil.getSecondTimestampTwo())); - return new ResponseEntity(yxStoreSeckillService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreSeckillService.save(resources),HttpStatus.CREATED); }else{ - yxStoreSeckillService.update(resources); + yxStoreSeckillService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } } @@ -70,7 +73,7 @@ public class StoreSeckillController { @PreAuthorize("@el.check('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxStoreSeckillService.delete(id); + yxStoreSeckillService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/UserExtractController.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/UserExtractController.java index 18ef2148..d9ef85ee 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/UserExtractController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/rest/UserExtractController.java @@ -1,25 +1,31 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.activity.domain.YxUserExtract; import co.yixiang.modules.activity.service.YxUserExtractService; import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria; +import co.yixiang.modules.shop.domain.YxUser; import co.yixiang.modules.shop.domain.YxUserBill; +import co.yixiang.modules.shop.domain.YxWechatUser; import co.yixiang.modules.shop.service.YxUserBillService; import co.yixiang.modules.shop.service.YxUserService; import co.yixiang.modules.shop.service.YxWechatUserService; -import co.yixiang.modules.shop.service.dto.YxUserDTO; -import co.yixiang.modules.shop.service.dto.YxWechatUserDTO; -import co.yixiang.mp.config.WxPayConfiguration; +import co.yixiang.modules.shop.service.dto.YxUserDto; +import co.yixiang.modules.shop.service.dto.YxWechatUserDto; import co.yixiang.mp.service.YxPayService; import co.yixiang.utils.OrderUtil; -import com.github.binarywang.wxpay.bean.entpay.EntPayRequest; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -45,15 +51,17 @@ public class UserExtractController { private final YxUserBillService yxUserBillService; private final YxWechatUserService wechatUserService; private final YxPayService payService; + private final IGenerator generator; - public UserExtractController(YxUserExtractService yxUserExtractService,YxUserService yxUserService, - YxUserBillService yxUserBillService,YxWechatUserService wechatUserService, - YxPayService payService) { + public UserExtractController(YxUserExtractService yxUserExtractService, YxUserService yxUserService, + YxUserBillService yxUserBillService, YxWechatUserService wechatUserService, + YxPayService payService, IGenerator generator) { this.yxUserExtractService = yxUserExtractService; this.yxUserService = yxUserService; this.yxUserBillService = yxUserBillService; this.wechatUserService = wechatUserService; this.payService = payService; + this.generator = generator; } @Log("查询") @@ -82,7 +90,7 @@ public class UserExtractController { throw new BadRequestException("请填写失败原因"); } String mark = "提现失败,退回佣金"+resources.getExtractPrice()+"元"; - YxUserDTO userDTO = yxUserService.findById(resources.getUid()); + YxUserDto userDTO = generator.convert(yxUserService.getOne(new QueryWrapper().eq("uid",resources.getUid())),YxUserDto.class); //增加流水 YxUserBill userBill = new YxUserBill(); @@ -97,7 +105,7 @@ public class UserExtractController { userBill.setStatus(1); userBill.setAddTime(OrderUtil.getSecondTimestampTwo()); userBill.setPm(1); - yxUserBillService.create(userBill); + yxUserBillService.save(userBill); //返回提现金额 yxUserService.incBrokeragePrice(resources.getExtractPrice().doubleValue() @@ -109,7 +117,7 @@ public class UserExtractController { //todo 此处为企业付款,没经过测试 boolean isTest = true; if(!isTest){ - YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid()); + YxWechatUserDto wechatUser = generator.convert(wechatUserService.getOne(new QueryWrapper().eq("uid",resources.getUid())),YxWechatUserDto.class); if(ObjectUtil.isNotNull(wechatUser)){ try { payService.entPay(wechatUser.getOpenid(),resources.getId().toString(), @@ -123,9 +131,9 @@ public class UserExtractController { } } - yxUserExtractService.update(resources); + yxUserExtractService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java index 5ae975da..db08ad6b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreBargain; -import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO; +import co.yixiang.modules.activity.service.dto.YxStoreBargainDto; import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreBargain") -public interface YxStoreBargainService { +public interface YxStoreBargainService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreBargainQueryCriteria criteria); + List queryAll(YxStoreBargainQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreBargainDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreBargainDTO create(YxStoreBargain resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreBargain resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java index bfd28607..562fd19c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java @@ -1,66 +1,47 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreCombination; -import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCombinationDto; import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreCombination") -public interface YxStoreCombinationService { +public interface YxStoreCombinationService extends BaseService{ - void onSale(Integer id, Integer status); - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCombinationQueryCriteria criteria); + List queryAll(YxStoreCombinationQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCombinationDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCombinationDTO create(YxStoreCombination resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCombination resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + void onSale(Integer id, int status); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java index 9320cc36..39a67d8b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreCouponIssue; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreCouponIssue") -public interface YxStoreCouponIssueService { +public interface YxStoreCouponIssueService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCouponIssueQueryCriteria criteria); + List queryAll(YxStoreCouponIssueQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCouponIssueDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCouponIssueDTO create(YxStoreCouponIssue resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCouponIssue resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java index e648422b..81594f60 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreCouponIssueUser") -public interface YxStoreCouponIssueUserService { +public interface YxStoreCouponIssueUserService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCouponIssueUserQueryCriteria criteria); + List queryAll(YxStoreCouponIssueUserQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCouponIssueUserDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCouponIssueUserDTO create(YxStoreCouponIssueUser resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCouponIssueUser resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java index e9d65518..6f0ccfee 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreCoupon; -import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreCoupon") -public interface YxStoreCouponService { +public interface YxStoreCouponService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCouponQueryCriteria criteria); + List queryAll(YxStoreCouponQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCouponDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCouponDTO create(YxStoreCoupon resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCoupon resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java index 92160bb4..4dda17fc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-10 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreCouponUser") -public interface YxStoreCouponUserService { +public interface YxStoreCouponUserService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCouponUserQueryCriteria criteria); + List queryAll(YxStoreCouponUserQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCouponUserDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCouponUserDTO create(YxStoreCouponUser resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCouponUser resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java index 394c8a02..ae77b3f5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java @@ -1,66 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.service.dto.YxStorePinkDTO; +import co.yixiang.modules.activity.service.dto.YxStorePinkDto; import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStorePink") -public interface YxStorePinkService { +public interface YxStorePinkService extends BaseService{ - int countPeople(int id); - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStorePinkQueryCriteria criteria); + List queryAll(YxStorePinkQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStorePinkDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStorePinkDTO create(YxStorePink resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStorePink resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java index 6ac336a0..4e192a84 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreSeckill; -import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO; +import co.yixiang.modules.activity.service.dto.YxStoreSeckillDto; import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreSeckill") -public interface YxStoreSeckillService { +public interface YxStoreSeckillService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreSeckillQueryCriteria criteria); + List queryAll(YxStoreSeckillQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreSeckillDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreSeckillDTO create(YxStoreSeckill resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreSeckill resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java index 6e0c548b..04557433 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxStoreVisit; -import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO; +import co.yixiang.modules.activity.service.dto.YxStoreVisitDto; import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxStoreVisit") -public interface YxStoreVisitService { +public interface YxStoreVisitService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreVisitQueryCriteria criteria); + List queryAll(YxStoreVisitQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreVisitDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreVisitDTO create(YxStoreVisit resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreVisit resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java index 0399d902..e13ad826 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.activity.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.activity.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxUserExtract; -import co.yixiang.modules.activity.service.dto.YxUserExtractDTO; +import co.yixiang.modules.activity.service.dto.YxUserExtractDto; import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ -//@CacheConfig(cacheNames = "yxUserExtract") -public interface YxUserExtractService { +public interface YxUserExtractService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxUserExtractQueryCriteria criteria); + List queryAll(YxUserExtractQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxUserExtractDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxUserExtractDTO create(YxUserExtract resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxUserExtract resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDTO.java index d6bf749b..da145d0c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDTO.java @@ -1,113 +1,116 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; +import java.sql.Timestamp; import java.math.BigDecimal; -import java.util.Date; - +import java.io.Serializable; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ @Data -public class YxStoreBargainDTO implements Serializable { +public class YxStoreBargainDto implements Serializable { - // 砍价产品ID + /** 砍价产品ID */ private Integer id; - // 关联产品ID + /** 关联产品ID */ private Integer productId; - // 砍价活动名称 + /** 砍价活动名称 */ private String title; - // 砍价活动图片 + /** 砍价活动图片 */ private String image; - // 单位名称 + /** 单位名称 */ private String unitName; - // 库存 + /** 库存 */ private Integer stock; - // 销量 + /** 销量 */ private Integer sales; - // 砍价产品轮播图 + /** 砍价产品轮播图 */ private String images; - // 砍价开启时间 + /** 砍价开启时间 */ private Integer startTime; - // 砍价结束时间 + /** 砍价结束时间 */ private Integer stopTime; - // 砍价产品名称 + /** 砍价产品名称 */ private String storeName; - // 砍价金额 + /** 砍价金额 */ private BigDecimal price; - // 砍价商品最低价 + /** 砍价商品最低价 */ private BigDecimal minPrice; - // 每次购买的砍价产品数量 + /** 每次购买的砍价产品数量 */ private Integer num; - // 用户每次砍价的最大金额 + /** 用户每次砍价的最大金额 */ private BigDecimal bargainMaxPrice; - // 用户每次砍价的最小金额 + /** 用户每次砍价的最小金额 */ private BigDecimal bargainMinPrice; - // 用户每次砍价的次数 + /** 用户每次砍价的次数 */ private Integer bargainNum; - // 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) + /** 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) */ private Integer status; - // 砍价详情 + /** 砍价详情 */ private String description; - // 反多少积分 + /** 反多少积分 */ private BigDecimal giveIntegral; - // 砍价活动简介 + /** 砍价活动简介 */ private String info; - // 成本价 + /** 成本价 */ private BigDecimal cost; - // 排序 + /** 排序 */ private Integer sort; - // 是否推荐0不推荐1推荐 + /** 是否推荐0不推荐1推荐 */ private Integer isHot; - // 是否删除 0未删除 1删除 + /** 是否删除 0未删除 1删除 */ private Integer isDel; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 是否包邮 0不包邮 1包邮 + /** 是否包邮 0不包邮 1包邮 */ private Integer isPostage; - // 邮费 + /** 邮费 */ private BigDecimal postage; - // 砍价规则 + /** 砍价规则 */ private String rule; - // 砍价产品浏览量 + /** 砍价产品浏览量 */ private Integer look; - // 砍价产品分享量 + /** 砍价产品分享量 */ private Integer share; - private Date startTimeDate; + private Timestamp endTimeDate; - private Date endTimeDate; -} \ No newline at end of file + private Timestamp startTimeDate; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java index 3710ced6..c08e2dbd 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ @Data public class YxStoreBargainQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDTO.java index ccf95aa4..d8ef6a94 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDTO.java @@ -1,18 +1,22 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; +import java.sql.Timestamp; import java.math.BigDecimal; +import java.io.Serializable; import java.util.Date; - /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Data -public class YxStoreCombinationDTO implements Serializable { +public class YxStoreCombinationDto implements Serializable { private Integer id; @@ -107,4 +111,5 @@ public class YxStoreCombinationDTO implements Serializable { // 单位名 private String unitName; -} \ No newline at end of file + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java index e6495494..a52e0d11 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java @@ -1,11 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Data public class YxStoreCombinationQueryCriteria{ @@ -16,4 +22,4 @@ public class YxStoreCombinationQueryCriteria{ @Query private Integer isDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDTO.java index 2e5769de..67f28813 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDTO.java @@ -1,17 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data -public class YxStoreCouponDTO implements Serializable { +public class YxStoreCouponDto implements Serializable { // 优惠券表ID private Integer id; @@ -42,4 +45,4 @@ public class YxStoreCouponDTO implements Serializable { // 是否删除 private Integer isDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDTO.java index 796b52b6..5708fb94 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDTO.java @@ -1,49 +1,52 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - +import java.sql.Timestamp; import java.io.Serializable; -import java.util.Date; - /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data -public class YxStoreCouponIssueDTO implements Serializable { +public class YxStoreCouponIssueDto implements Serializable { private Integer id; - // 优惠券ID - private Integer cid; - private String cname; - // 优惠券领取开启时间 + /** 优惠券ID */ + private Integer cid; + + /** 优惠券领取开启时间 */ private Integer startTime; - // 优惠券领取结束时间 + /** 优惠券领取结束时间 */ private Integer endTime; - private Date startTimeDate; - - private Date endTimeDate; - - // 优惠券领取数量 + /** 优惠券领取数量 */ private Integer totalCount; - // 优惠券剩余领取数量 + /** 优惠券剩余领取数量 */ private Integer remainCount; - // 是否无限张数 + /** 是否无限张数 */ private Integer isPermanent; - // 1 正常 0 未开启 -1 已无效 + /** 1 正常 0 未开启 -1 已无效 */ private Integer status; private Integer isDel; - // 优惠券添加时间 + /** 优惠券添加时间 */ private Integer addTime; -} \ No newline at end of file + + private Timestamp endTimeDate; + + private Timestamp startTimeDate; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java index a07dbae9..39d53f20 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java @@ -1,14 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data public class YxStoreCouponIssueQueryCriteria{ - @Query + private Integer isDel; -} \ No newline at end of file + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDTO.java index 52b1ffc0..475d368d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDTO.java @@ -1,25 +1,28 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data -public class YxStoreCouponIssueUserDTO implements Serializable { +public class YxStoreCouponIssueUserDto implements Serializable { private Integer id; - // 领取优惠券用户ID + /** 领取优惠券用户ID */ private Integer uid; - // 优惠券前台领取ID + /** 优惠券前台领取ID */ private Integer issueCouponId; - // 领取时间 + /** 领取时间 */ private Integer addTime; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java index 577129ca..b05e212f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data public class YxStoreCouponIssueUserQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java index 22207acd..c224be24 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java @@ -1,14 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Data public class YxStoreCouponQueryCriteria{ + @Query private Integer isDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDTO.java index 0721dde0..a307253b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDTO.java @@ -1,17 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-10 +* @date 2020-05-13 */ @Data -public class YxStoreCouponUserDTO implements Serializable { +public class YxStoreCouponUserDto implements Serializable { // 优惠券发放记录id private Integer id; @@ -50,4 +53,5 @@ public class YxStoreCouponUserDTO implements Serializable { // 是否有效 private Integer isFail; -} \ No newline at end of file + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java index 6be50072..a33396d7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java @@ -1,12 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** - * @author hupeng - * @date 2019-11-10 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreCouponUserQueryCriteria{ diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDTO.java index 99b0aa04..6e131545 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDTO.java @@ -1,69 +1,64 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ @Data -public class YxStorePinkDTO implements Serializable { +public class YxStorePinkDto implements Serializable { private Integer id; - // 用户id + /** 用户id */ private Integer uid; - // 订单id 生成 + /** 订单id 生成 */ private String orderId; - // 订单id 数据库 + /** 订单id 数据库 */ private Integer orderIdKey; - private String title; - - private String nickname; - - private String avatar; - - private Integer countPeople; - - // 购买商品个数 + /** 购买商品个数 */ private Integer totalNum; - // 购买总金额 + /** 购买总金额 */ private BigDecimal totalPrice; - // 拼团产品id + /** 拼团产品id */ private Integer cid; - // 产品id + /** 产品id */ private Integer pid; - // 拼图总人数 + /** 拼图总人数 */ private Integer people; - // 拼团产品单价 + /** 拼团产品单价 */ private BigDecimal price; - // 开始时间 + /** 开始时间 */ private String addTime; private String stopTime; - // 团长id 0为团长 + /** 团长id 0为团长 */ private Integer kId; - // 是否发送模板消息0未发送1已发送 + /** 是否发送模板消息0未发送1已发送 */ private Integer isTpl; - // 是否退款 0未退款 1已退款 + /** 是否退款 0未退款 1已退款 */ private Integer isRefund; - // 状态1进行中2已完成3未完成 + /** 状态1进行中2已完成3未完成 */ private Integer status; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java index fbc03eb9..c80a3af5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java @@ -1,14 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ @Data public class YxStorePinkQueryCriteria{ @Query private Integer kId; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDTO.java index 6292d26c..94762c74 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDTO.java @@ -1,18 +1,23 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; +import java.sql.Timestamp; import java.math.BigDecimal; +import java.io.Serializable; import java.util.Date; - /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ @Data -public class YxStoreSeckillDTO implements Serializable { +public class YxStoreSeckillDto implements Serializable { + // 商品秒杀产品表id private Integer id; @@ -96,4 +101,4 @@ public class YxStoreSeckillDTO implements Serializable { private String statusStr; private Integer timeId; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java index 1eca448f..56f63d77 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java @@ -1,16 +1,23 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ @Data public class YxStoreSeckillQueryCriteria{ + // 模糊 @Query(type = Query.Type.INNER_LIKE) private String title; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDTO.java index 98db3959..79b08728 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDTO.java @@ -1,40 +1,43 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Data -public class YxStoreVisitDTO implements Serializable { +public class YxStoreVisitDto implements Serializable { private Integer id; - // 产品ID + /** 产品ID */ private Integer productId; - // 产品类型 + /** 产品类型 */ private String productType; - // 产品分类ID + /** 产品分类ID */ private Integer cateId; - // 产品类型 + /** 产品类型 */ private String type; - // 用户ID + /** 用户ID */ private Integer uid; - // 访问次数 + /** 访问次数 */ private Integer count; - // 备注描述 + /** 备注描述 */ private String content; - // 添加时间 + /** 添加时间 */ private Integer addTime; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java index 1e9cbbca..04324b7f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Data public class YxStoreVisitQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDTO.java index 9673fed8..9e92200a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDTO.java @@ -1,17 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ @Data -public class YxUserExtractDTO implements Serializable { +public class YxUserExtractDto implements Serializable { + private Integer id; @@ -52,4 +56,4 @@ public class YxUserExtractDTO implements Serializable { // 微信号 private String wechat; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java index eab781af..821072f1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java @@ -1,16 +1,23 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ @Data public class YxUserExtractQueryCriteria{ + // 模糊 @Query(type = Query.Type.INNER_LIKE) private String realName; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java index 52449d23..6b21f72d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java @@ -1,78 +1,111 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreBargain; -import co.yixiang.modules.activity.repository.YxStoreBargainRepository; +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 co.yixiang.modules.activity.service.YxStoreBargainService; -import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO; +import co.yixiang.modules.activity.service.dto.YxStoreBargainDto; import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreBargainMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreBargain") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreBargainServiceImpl implements YxStoreBargainService { +public class YxStoreBargainServiceImpl extends BaseServiceImpl implements YxStoreBargainService { - private final YxStoreBargainRepository yxStoreBargainRepository; - - private final YxStoreBargainMapper yxStoreBargainMapper; - - public YxStoreBargainServiceImpl(YxStoreBargainRepository yxStoreBargainRepository, YxStoreBargainMapper yxStoreBargainMapper) { - this.yxStoreBargainRepository = yxStoreBargainRepository; - this.yxStoreBargainMapper = yxStoreBargainMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreBargainRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreBargainMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreBargainDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreBargainQueryCriteria criteria){ - return yxStoreBargainMapper.toDto(yxStoreBargainRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreBargainDTO findById(Integer id) { - Optional yxStoreBargain = yxStoreBargainRepository.findById(id); - ValidationUtil.isNull(yxStoreBargain,"YxStoreBargain","id",id); - return yxStoreBargainMapper.toDto(yxStoreBargain.get()); + //@Cacheable + public List queryAll(YxStoreBargainQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreBargain.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreBargainDTO create(YxStoreBargain resources) { - return yxStoreBargainMapper.toDto(yxStoreBargainRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreBargain resources) { - Optional optionalYxStoreBargain = yxStoreBargainRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreBargain,"YxStoreBargain","id",resources.getId()); - YxStoreBargain yxStoreBargain = optionalYxStoreBargain.get(); - yxStoreBargain.copy(resources); - yxStoreBargainRepository.save(yxStoreBargain); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreBargainDto yxStoreBargain : all) { + Map map = new LinkedHashMap<>(); + map.put("关联产品ID", yxStoreBargain.getProductId()); + map.put("砍价活动名称", yxStoreBargain.getTitle()); + map.put("砍价活动图片", yxStoreBargain.getImage()); + map.put("单位名称", yxStoreBargain.getUnitName()); + map.put("库存", yxStoreBargain.getStock()); + map.put("销量", yxStoreBargain.getSales()); + map.put("砍价产品轮播图", yxStoreBargain.getImages()); + map.put("砍价开启时间", yxStoreBargain.getStartTime()); + map.put("砍价结束时间", yxStoreBargain.getStopTime()); + map.put("砍价产品名称", yxStoreBargain.getStoreName()); + map.put("砍价金额", yxStoreBargain.getPrice()); + map.put("砍价商品最低价", yxStoreBargain.getMinPrice()); + map.put("每次购买的砍价产品数量", yxStoreBargain.getNum()); + map.put("用户每次砍价的最大金额", yxStoreBargain.getBargainMaxPrice()); + map.put("用户每次砍价的最小金额", yxStoreBargain.getBargainMinPrice()); + map.put("用户每次砍价的次数", yxStoreBargain.getBargainNum()); + map.put("砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", yxStoreBargain.getStatus()); + map.put("砍价详情", yxStoreBargain.getDescription()); + map.put("反多少积分", yxStoreBargain.getGiveIntegral()); + map.put("砍价活动简介", yxStoreBargain.getInfo()); + map.put("成本价", yxStoreBargain.getCost()); + map.put("排序", yxStoreBargain.getSort()); + map.put("是否推荐0不推荐1推荐", yxStoreBargain.getIsHot()); + map.put("是否删除 0未删除 1删除", yxStoreBargain.getIsDel()); + map.put("添加时间", yxStoreBargain.getAddTime()); + map.put("是否包邮 0不包邮 1包邮", yxStoreBargain.getIsPostage()); + map.put("邮费", yxStoreBargain.getPostage()); + map.put("砍价规则", yxStoreBargain.getRule()); + map.put("砍价产品浏览量", yxStoreBargain.getLook()); + map.put("砍价产品分享量", yxStoreBargain.getShare()); + map.put(" endTimeDate", yxStoreBargain.getEndTimeDate()); + map.put(" startTimeDate", yxStoreBargain.getStartTimeDate()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreBargainRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java index d6a02023..df8faa67 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java @@ -1,121 +1,137 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreCombination; -import co.yixiang.modules.activity.repository.YxStoreCombinationRepository; -import co.yixiang.modules.activity.repository.YxStorePinkRepository; -import co.yixiang.modules.activity.repository.YxStoreVisitRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.domain.YxStoreVisit; +import co.yixiang.modules.activity.service.mapper.YxStorePinkMapper; +import co.yixiang.modules.activity.service.mapper.YxStoreVisitMapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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 co.yixiang.modules.activity.service.YxStoreCombinationService; -import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCombinationDto; import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreCombinationMapper; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import java.util.LinkedHashMap; +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCombination") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCombinationServiceImpl implements YxStoreCombinationService { - - private final YxStoreCombinationRepository yxStoreCombinationRepository; - private final YxStorePinkRepository storePinkRepository; - private final YxStoreVisitRepository storeVisitRepository; - - private final YxStoreCombinationMapper yxStoreCombinationMapper; - - public YxStoreCombinationServiceImpl(YxStoreCombinationRepository yxStoreCombinationRepository, YxStorePinkRepository storePinkRepository, - YxStoreVisitRepository storeVisitRepository, YxStoreCombinationMapper yxStoreCombinationMapper) { - this.yxStoreCombinationRepository = yxStoreCombinationRepository; - this.storePinkRepository = storePinkRepository; - this.storeVisitRepository = storeVisitRepository; - this.yxStoreCombinationMapper = yxStoreCombinationMapper; - } +public class YxStoreCombinationServiceImpl extends BaseServiceImpl implements YxStoreCombinationService { + private final IGenerator generator; + private final YxStorePinkMapper yxStorePinkMapper; + private final YxStoreVisitMapper yxStoreVisitMapper; @Override - public Map queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable){ - criteria.setIsDel(0); - Page page = yxStoreCombinationRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - List combinationDTOS = yxStoreCombinationMapper - .toDto(page.getContent()); - for (YxStoreCombinationDTO combinationDTO : combinationDTOS) { + //@Cacheable + public Map queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + + List combinationDTOS = generator.convert(page.getList(),YxStoreCombinationDto.class); + for (YxStoreCombinationDto combinationDTO : combinationDTOS) { //参与人数 - combinationDTO.setCountPeopleAll(storePinkRepository - .countByCid(combinationDTO.getId())); + combinationDTO.setCountPeopleAll(yxStorePinkMapper.selectCount(new QueryWrapper().eq("cid",combinationDTO.getId()))); //成团人数 - combinationDTO.setCountPeoplePink(storePinkRepository.countByCidAndKId(combinationDTO.getId(), - 0)); + combinationDTO.setCountPeoplePink(yxStorePinkMapper.selectCount(new QueryWrapper().eq("cid",combinationDTO.getId()).eq("k_id",0))); //获取查看拼团产品人数 - combinationDTO.setCountPeopleBrowse(storeVisitRepository - .countByProductIdAndProductType(combinationDTO.getId(),"combination")); - - //System.out.println(combinationDTO); - + combinationDTO.setCountPeopleBrowse(yxStoreVisitMapper.selectCount(new QueryWrapper().eq("product_id",combinationDTO.getId()) + .eq("product_type","combination"))); } - Map map = new LinkedHashMap<>(2); + Map map = new LinkedHashMap<>(2); map.put("content",combinationDTOS); - map.put("totalElements",page.getTotalElements()); - + map.put("totalElements", page.getTotal()); return map; - //return PageUtil.toPage(page.map(yxStoreCombinationMapper::toDto)); + } + + + @Override + //@Cacheable + public List queryAll(YxStoreCombinationQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCombination.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCombinationDto yxStoreCombination : all) { + Map map = new LinkedHashMap<>(); + map.put("商品id", yxStoreCombination.getProductId()); + map.put("商户id", yxStoreCombination.getMerId()); + map.put("推荐图", yxStoreCombination.getImage()); + map.put("轮播图", yxStoreCombination.getImages()); + map.put("活动标题", yxStoreCombination.getTitle()); + map.put("活动属性", yxStoreCombination.getAttr()); + map.put("参团人数", yxStoreCombination.getPeople()); + map.put("简介", yxStoreCombination.getInfo()); + map.put("价格", yxStoreCombination.getPrice()); + map.put("排序", yxStoreCombination.getSort()); + map.put("销量", yxStoreCombination.getSales()); + map.put("库存", yxStoreCombination.getStock()); + map.put("添加时间", yxStoreCombination.getAddTime()); + map.put("推荐", yxStoreCombination.getIsHost()); + map.put("产品状态", yxStoreCombination.getIsShow()); + map.put(" isDel", yxStoreCombination.getIsDel()); + map.put(" combination", yxStoreCombination.getCombination()); + map.put("商户是否可用1可用0不可用", yxStoreCombination.getMerUse()); + map.put("是否包邮1是0否", yxStoreCombination.getIsPostage()); + map.put("邮费", yxStoreCombination.getPostage()); + map.put("拼团内容", yxStoreCombination.getDescription()); + map.put("拼团开始时间", yxStoreCombination.getStartTime()); + map.put("拼团结束时间", yxStoreCombination.getStopTime()); + map.put("拼团订单有效时间", yxStoreCombination.getEffectiveTime()); + map.put("拼图产品成本", yxStoreCombination.getCost()); + map.put("浏览量", yxStoreCombination.getBrowse()); + map.put("单位名", yxStoreCombination.getUnitName()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override - @Transactional(rollbackFor = Exception.class) - public void onSale(Integer id, Integer status) { + public void onSale(Integer id, int status) { if(status == 1){ status = 0; }else{ status = 1; } - yxStoreCombinationRepository.updateOnsale(status,id); + YxStoreCombination yxStoreCombination = new YxStoreCombination(); + yxStoreCombination.setIsShow(status); + yxStoreCombination.setId(id); + this.saveOrUpdate(yxStoreCombination); } - - @Override - public List queryAll(YxStoreCombinationQueryCriteria criteria){ - return yxStoreCombinationMapper.toDto(yxStoreCombinationRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxStoreCombinationDTO findById(Integer id) { - Optional yxStoreCombination = yxStoreCombinationRepository.findById(id); - ValidationUtil.isNull(yxStoreCombination,"YxStoreCombination","id",id); - return yxStoreCombinationMapper.toDto(yxStoreCombination.get()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCombinationDTO create(YxStoreCombination resources) { - return yxStoreCombinationMapper.toDto(yxStoreCombinationRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCombination resources) { - Optional optionalYxStoreCombination = yxStoreCombinationRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCombination,"YxStoreCombination","id",resources.getId()); - YxStoreCombination yxStoreCombination = optionalYxStoreCombination.get(); - yxStoreCombination.copy(resources); - yxStoreCombinationRepository.save(yxStoreCombination); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreCombinationRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java index fe48674b..3b48c1de 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java @@ -1,78 +1,91 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreCouponIssue; -import co.yixiang.modules.activity.repository.YxStoreCouponIssueRepository; +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 co.yixiang.modules.activity.service.YxStoreCouponIssueService; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreCouponIssueMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCouponIssue") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCouponIssueServiceImpl implements YxStoreCouponIssueService { +public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl implements YxStoreCouponIssueService { - private final YxStoreCouponIssueRepository yxStoreCouponIssueRepository; - - private final YxStoreCouponIssueMapper yxStoreCouponIssueMapper; - - public YxStoreCouponIssueServiceImpl(YxStoreCouponIssueRepository yxStoreCouponIssueRepository, YxStoreCouponIssueMapper yxStoreCouponIssueMapper) { - this.yxStoreCouponIssueRepository = yxStoreCouponIssueRepository; - this.yxStoreCouponIssueMapper = yxStoreCouponIssueMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreCouponIssueRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreCouponIssueMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreCouponIssueDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreCouponIssueQueryCriteria criteria){ - return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssueRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreCouponIssueDTO findById(Integer id) { - Optional yxStoreCouponIssue = yxStoreCouponIssueRepository.findById(id); - ValidationUtil.isNull(yxStoreCouponIssue,"YxStoreCouponIssue","id",id); - return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssue.get()); + //@Cacheable + public List queryAll(YxStoreCouponIssueQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssue.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCouponIssueDTO create(YxStoreCouponIssue resources) { - return yxStoreCouponIssueMapper.toDto(yxStoreCouponIssueRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCouponIssue resources) { - Optional optionalYxStoreCouponIssue = yxStoreCouponIssueRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCouponIssue,"YxStoreCouponIssue","id",resources.getId()); - YxStoreCouponIssue yxStoreCouponIssue = optionalYxStoreCouponIssue.get(); - yxStoreCouponIssue.copy(resources); - yxStoreCouponIssueRepository.save(yxStoreCouponIssue); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCouponIssueDto yxStoreCouponIssue : all) { + Map map = new LinkedHashMap<>(); + map.put(" cname", yxStoreCouponIssue.getCname()); + map.put("优惠券ID", yxStoreCouponIssue.getCid()); + map.put("优惠券领取开启时间", yxStoreCouponIssue.getStartTime()); + map.put("优惠券领取结束时间", yxStoreCouponIssue.getEndTime()); + map.put("优惠券领取数量", yxStoreCouponIssue.getTotalCount()); + map.put("优惠券剩余领取数量", yxStoreCouponIssue.getRemainCount()); + map.put("是否无限张数", yxStoreCouponIssue.getIsPermanent()); + map.put("1 正常 0 未开启 -1 已无效", yxStoreCouponIssue.getStatus()); + map.put(" isDel", yxStoreCouponIssue.getIsDel()); + map.put("优惠券添加时间", yxStoreCouponIssue.getAddTime()); + map.put(" endTimeDate", yxStoreCouponIssue.getEndTimeDate()); + map.put(" startTimeDate", yxStoreCouponIssue.getStartTimeDate()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreCouponIssueRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java index 31d52535..a2f7bd01 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java @@ -1,78 +1,82 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; -import co.yixiang.modules.activity.repository.YxStoreCouponIssueUserRepository; +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 co.yixiang.modules.activity.service.YxStoreCouponIssueUserService; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreCouponIssueUserMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCouponIssueUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCouponIssueUserServiceImpl implements YxStoreCouponIssueUserService { +public class YxStoreCouponIssueUserServiceImpl extends BaseServiceImpl implements YxStoreCouponIssueUserService { - private final YxStoreCouponIssueUserRepository yxStoreCouponIssueUserRepository; - - private final YxStoreCouponIssueUserMapper yxStoreCouponIssueUserMapper; - - public YxStoreCouponIssueUserServiceImpl(YxStoreCouponIssueUserRepository yxStoreCouponIssueUserRepository, YxStoreCouponIssueUserMapper yxStoreCouponIssueUserMapper) { - this.yxStoreCouponIssueUserRepository = yxStoreCouponIssueUserRepository; - this.yxStoreCouponIssueUserMapper = yxStoreCouponIssueUserMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreCouponIssueUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreCouponIssueUserMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreCouponIssueUserDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreCouponIssueUserQueryCriteria criteria){ - return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreCouponIssueUserDTO findById(Integer id) { - Optional yxStoreCouponIssueUser = yxStoreCouponIssueUserRepository.findById(id); - ValidationUtil.isNull(yxStoreCouponIssueUser,"YxStoreCouponIssueUser","id",id); - return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUser.get()); + //@Cacheable + public List queryAll(YxStoreCouponIssueUserQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssueUser.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCouponIssueUserDTO create(YxStoreCouponIssueUser resources) { - return yxStoreCouponIssueUserMapper.toDto(yxStoreCouponIssueUserRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCouponIssueUser resources) { - Optional optionalYxStoreCouponIssueUser = yxStoreCouponIssueUserRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCouponIssueUser,"YxStoreCouponIssueUser","id",resources.getId()); - YxStoreCouponIssueUser yxStoreCouponIssueUser = optionalYxStoreCouponIssueUser.get(); - yxStoreCouponIssueUser.copy(resources); - yxStoreCouponIssueUserRepository.save(yxStoreCouponIssueUser); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCouponIssueUserDto yxStoreCouponIssueUser : all) { + Map map = new LinkedHashMap<>(); + map.put("领取优惠券用户ID", yxStoreCouponIssueUser.getUid()); + map.put("优惠券前台领取ID", yxStoreCouponIssueUser.getIssueCouponId()); + map.put("领取时间", yxStoreCouponIssueUser.getAddTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreCouponIssueUserRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java index ff24f206..b1fb3500 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java @@ -1,78 +1,88 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreCoupon; -import co.yixiang.modules.activity.repository.YxStoreCouponRepository; +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 co.yixiang.modules.activity.service.YxStoreCouponService; -import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreCouponMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCoupon") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCouponServiceImpl implements YxStoreCouponService { +public class YxStoreCouponServiceImpl extends BaseServiceImpl implements YxStoreCouponService { - private final YxStoreCouponRepository yxStoreCouponRepository; - - private final YxStoreCouponMapper yxStoreCouponMapper; - - public YxStoreCouponServiceImpl(YxStoreCouponRepository yxStoreCouponRepository, YxStoreCouponMapper yxStoreCouponMapper) { - this.yxStoreCouponRepository = yxStoreCouponRepository; - this.yxStoreCouponMapper = yxStoreCouponMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreCouponRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreCouponMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreCouponDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreCouponQueryCriteria criteria){ - return yxStoreCouponMapper.toDto(yxStoreCouponRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreCouponDTO findById(Integer id) { - Optional yxStoreCoupon = yxStoreCouponRepository.findById(id); - ValidationUtil.isNull(yxStoreCoupon,"YxStoreCoupon","id",id); - return yxStoreCouponMapper.toDto(yxStoreCoupon.get()); + //@Cacheable + public List queryAll(YxStoreCouponQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCoupon.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCouponDTO create(YxStoreCoupon resources) { - return yxStoreCouponMapper.toDto(yxStoreCouponRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCoupon resources) { - Optional optionalYxStoreCoupon = yxStoreCouponRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCoupon,"YxStoreCoupon","id",resources.getId()); - YxStoreCoupon yxStoreCoupon = optionalYxStoreCoupon.get(); - yxStoreCoupon.copy(resources); - yxStoreCouponRepository.save(yxStoreCoupon); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCouponDto yxStoreCoupon : all) { + Map map = new LinkedHashMap<>(); + map.put("优惠券名称", yxStoreCoupon.getTitle()); + map.put("兑换消耗积分值", yxStoreCoupon.getIntegral()); + map.put("兑换的优惠券面值", yxStoreCoupon.getCouponPrice()); + map.put("最低消费多少金额可用优惠券", yxStoreCoupon.getUseMinPrice()); + map.put("优惠券有效期限(单位:天)", yxStoreCoupon.getCouponTime()); + map.put("排序", yxStoreCoupon.getSort()); + map.put("状态(0:关闭,1:开启)", yxStoreCoupon.getStatus()); + map.put("兑换项目添加时间", yxStoreCoupon.getAddTime()); + map.put("是否删除", yxStoreCoupon.getIsDel()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreCouponRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java index e6f46ab0..532d361b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java @@ -1,95 +1,95 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import co.yixiang.modules.activity.repository.YxStoreCouponUserRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.shop.domain.YxUser; +import co.yixiang.modules.shop.service.YxUserService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +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 co.yixiang.modules.activity.service.YxStoreCouponUserService; -import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO; +import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDto; import co.yixiang.modules.activity.service.dto.YxStoreCouponUserQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreCouponUserMapper; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import java.util.LinkedHashMap; +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-10 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCouponUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCouponUserServiceImpl implements YxStoreCouponUserService { - - private final YxStoreCouponUserRepository yxStoreCouponUserRepository; - - private final YxStoreCouponUserMapper yxStoreCouponUserMapper; +public class YxStoreCouponUserServiceImpl extends BaseServiceImpl implements YxStoreCouponUserService { + private final IGenerator generator; private final YxUserService userService; - - public YxStoreCouponUserServiceImpl(YxStoreCouponUserRepository yxStoreCouponUserRepository, YxStoreCouponUserMapper yxStoreCouponUserMapper, YxUserService userService) { - this.yxStoreCouponUserRepository = yxStoreCouponUserRepository; - this.yxStoreCouponUserMapper = yxStoreCouponUserMapper; - this.userService = userService; - } - @Override - public Map queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreCouponUserRepository. - findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - //List storeOrderDTOS = new ArrayList<>(); - List storeOrderDTOS = yxStoreCouponUserMapper - .toDto(page.getContent()); - for (YxStoreCouponUserDTO couponUserDTO : storeOrderDTOS) { - couponUserDTO.setNickname(userService.findById(couponUserDTO.getUid()).getNickname()); + //@Cacheable + public Map queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List storeOrderDTOS = generator.convert(page.getList(),YxStoreCouponUserDto.class); + for (YxStoreCouponUserDto couponUserDTO : storeOrderDTOS) { + couponUserDTO.setNickname(userService.getOne(new QueryWrapper().eq("uid",couponUserDTO.getUid())).getNickname()); } Map map = new LinkedHashMap<>(2); map.put("content",storeOrderDTOS); - map.put("totalElements",page.getTotalElements()); - + map.put("totalElements", page.getTotal()); return map; - //return PageUtil.toPage(page.map(yxStoreCouponUserMapper::toDto)); } - @Override - public List queryAll(YxStoreCouponUserQueryCriteria criteria){ - return yxStoreCouponUserMapper.toDto(yxStoreCouponUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreCouponUserDTO findById(Integer id) { - Optional yxStoreCouponUser = yxStoreCouponUserRepository.findById(id); - ValidationUtil.isNull(yxStoreCouponUser,"YxStoreCouponUser","id",id); - return yxStoreCouponUserMapper.toDto(yxStoreCouponUser.get()); + //@Cacheable + public List queryAll(YxStoreCouponUserQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponUser.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCouponUserDTO create(YxStoreCouponUser resources) { - return yxStoreCouponUserMapper.toDto(yxStoreCouponUserRepository.save(resources)); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCouponUserDto yxStoreCouponUser : all) { + Map map = new LinkedHashMap<>(); + map.put("兑换的项目id", yxStoreCouponUser.getCid()); + map.put("优惠券所属用户", yxStoreCouponUser.getUid()); + map.put("优惠券名称", yxStoreCouponUser.getCouponTitle()); + map.put("优惠券的面值", yxStoreCouponUser.getCouponPrice()); + map.put("最低消费多少金额可用优惠券", yxStoreCouponUser.getUseMinPrice()); + map.put("优惠券创建时间", yxStoreCouponUser.getAddTime()); + map.put("优惠券结束时间", yxStoreCouponUser.getEndTime()); + map.put("使用时间", yxStoreCouponUser.getUseTime()); + map.put("获取方式", yxStoreCouponUser.getType()); + map.put("状态(0:未使用,1:已使用, 2:已过期)", yxStoreCouponUser.getStatus()); + map.put("是否有效", yxStoreCouponUser.getIsFail()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCouponUser resources) { - Optional optionalYxStoreCouponUser = yxStoreCouponUserRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCouponUser,"YxStoreCouponUser","id",resources.getId()); - YxStoreCouponUser yxStoreCouponUser = optionalYxStoreCouponUser.get(); - yxStoreCouponUser.copy(resources); - yxStoreCouponUserRepository.save(yxStoreCouponUser); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreCouponUserRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java index 3dd53567..39256afc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java @@ -1,116 +1,94 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.repository.YxStorePinkRepository; -import co.yixiang.modules.activity.service.YxStoreCombinationService; +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 co.yixiang.modules.activity.service.YxStorePinkService; -import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO; -import co.yixiang.modules.activity.service.dto.YxStorePinkDTO; +import co.yixiang.modules.activity.service.dto.YxStorePinkDto; import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStorePinkMapper; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.YxUserDTO; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import java.util.LinkedHashMap; +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStorePink") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStorePinkServiceImpl implements YxStorePinkService { +public class YxStorePinkServiceImpl extends BaseServiceImpl implements YxStorePinkService { - private final YxStorePinkRepository yxStorePinkRepository; - - private final YxStoreCombinationService combinationService; - private final YxUserService userService; - - private final YxStorePinkMapper yxStorePinkMapper; - - public YxStorePinkServiceImpl(YxStorePinkRepository yxStorePinkRepository, YxStoreCombinationService combinationService, - YxUserService userService, YxStorePinkMapper yxStorePinkMapper) { - this.yxStorePinkRepository = yxStorePinkRepository; - this.combinationService = combinationService; - this.userService = userService; - this.yxStorePinkMapper = yxStorePinkMapper; - } - - /** - * 参与拼团的人 - * @param id id - * @return - */ - @Override - public int countPeople(int id) { - return yxStorePinkRepository.countByKId(id) + 1; - } + private final IGenerator generator; @Override - public Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable){ - criteria.setKId(0); - Page page = yxStorePinkRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - List storePinkDTOS = yxStorePinkMapper.toDto(page.getContent()); - for (YxStorePinkDTO storePinkDTO : storePinkDTOS) { - YxStoreCombinationDTO combinationDTO = combinationService - .findById(storePinkDTO.getCid()); - YxUserDTO userDTO = userService.findById(storePinkDTO.getUid()); - - storePinkDTO.setAvatar(userDTO.getAvatar()); - storePinkDTO.setNickname(userDTO.getNickname()); - storePinkDTO.setTitle(combinationDTO.getTitle()); - storePinkDTO.setCountPeople(countPeople(storePinkDTO.getId())); - } - Map map = new LinkedHashMap<>(2); - map.put("content",storePinkDTOS); - map.put("totalElements",page.getTotalElements()); - + //@Cacheable + public Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStorePinkDto.class)); + map.put("totalElements", page.getTotal()); return map; } - @Override - public List queryAll(YxStorePinkQueryCriteria criteria){ - return yxStorePinkMapper.toDto(yxStorePinkRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStorePinkDTO findById(Integer id) { - Optional yxStorePink = yxStorePinkRepository.findById(id); - ValidationUtil.isNull(yxStorePink,"YxStorePink","id",id); - return yxStorePinkMapper.toDto(yxStorePink.get()); + //@Cacheable + public List queryAll(YxStorePinkQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStorePink.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStorePinkDTO create(YxStorePink resources) { - return yxStorePinkMapper.toDto(yxStorePinkRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStorePink resources) { - Optional optionalYxStorePink = yxStorePinkRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStorePink,"YxStorePink","id",resources.getId()); - YxStorePink yxStorePink = optionalYxStorePink.get(); - yxStorePink.copy(resources); - yxStorePinkRepository.save(yxStorePink); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStorePinkDto yxStorePink : all) { + Map map = new LinkedHashMap<>(); + map.put("用户id", yxStorePink.getUid()); + map.put("订单id 生成", yxStorePink.getOrderId()); + map.put("订单id 数据库", yxStorePink.getOrderIdKey()); + map.put("购买商品个数", yxStorePink.getTotalNum()); + map.put("购买总金额", yxStorePink.getTotalPrice()); + map.put("拼团产品id", yxStorePink.getCid()); + map.put("产品id", yxStorePink.getPid()); + map.put("拼图总人数", yxStorePink.getPeople()); + map.put("拼团产品单价", yxStorePink.getPrice()); + map.put("开始时间", yxStorePink.getAddTime()); + map.put(" stopTime", yxStorePink.getStopTime()); + map.put("团长id 0为团长", yxStorePink.getKId()); + map.put("是否发送模板消息0未发送1已发送", yxStorePink.getIsTpl()); + map.put("是否退款 0未退款 1已退款", yxStorePink.getIsRefund()); + map.put("状态1进行中2已完成3未完成", yxStorePink.getStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStorePinkRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java index 7b2bddc1..2c7f738c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java @@ -1,50 +1,59 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreSeckill; -import co.yixiang.modules.activity.repository.YxStoreSeckillRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.utils.*; +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.modules.activity.service.YxStoreSeckillService; -import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO; +import co.yixiang.modules.activity.service.dto.YxStoreSeckillDto; import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreSeckillMapper; -import co.yixiang.utils.OrderUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//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 java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreSeckill") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreSeckillServiceImpl implements YxStoreSeckillService { +public class YxStoreSeckillServiceImpl extends BaseServiceImpl implements YxStoreSeckillService { - private final YxStoreSeckillRepository yxStoreSeckillRepository; - - private final YxStoreSeckillMapper yxStoreSeckillMapper; - - public YxStoreSeckillServiceImpl(YxStoreSeckillRepository yxStoreSeckillRepository, YxStoreSeckillMapper yxStoreSeckillMapper) { - this.yxStoreSeckillRepository = yxStoreSeckillRepository; - this.yxStoreSeckillMapper = yxStoreSeckillMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreSeckillRepository.findAll((root, criteriaQuery, criteriaBuilder) -> - QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - List storeSeckillDTOS = yxStoreSeckillMapper - .toDto(page.getContent()); + //@Cacheable + public Map queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List storeSeckillDTOS = generator.convert(page.getList(),YxStoreSeckillDto.class); int nowTime = OrderUtil.getSecondTimestampTwo(); - for (YxStoreSeckillDTO storeSeckillDTO : storeSeckillDTOS){ + for (YxStoreSeckillDto storeSeckillDTO : storeSeckillDTOS){ if(storeSeckillDTO.getStatus() > 0){ if(storeSeckillDTO.getStartTime() > nowTime){ storeSeckillDTO.setStatusStr("活动未开始"); @@ -60,42 +69,52 @@ public class YxStoreSeckillServiceImpl implements YxStoreSeckillService { } Map map = new LinkedHashMap<>(2); map.put("content",storeSeckillDTOS); - map.put("totalElements",page.getTotalElements()); - + map.put("totalElements", page.getTotal()); return map; } - @Override - public List queryAll(YxStoreSeckillQueryCriteria criteria){ - return yxStoreSeckillMapper.toDto(yxStoreSeckillRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreSeckillDTO findById(Integer id) { - Optional yxStoreSeckill = yxStoreSeckillRepository.findById(id); - ValidationUtil.isNull(yxStoreSeckill,"YxStoreSeckill","id",id); - return yxStoreSeckillMapper.toDto(yxStoreSeckill.get()); + //@Cacheable + public List queryAll(YxStoreSeckillQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreSeckill.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreSeckillDTO create(YxStoreSeckill resources) { - return yxStoreSeckillMapper.toDto(yxStoreSeckillRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreSeckill resources) { - Optional optionalYxStoreSeckill = yxStoreSeckillRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreSeckill,"YxStoreSeckill","id",resources.getId()); - YxStoreSeckill yxStoreSeckill = optionalYxStoreSeckill.get(); - yxStoreSeckill.copy(resources); - yxStoreSeckillRepository.save(yxStoreSeckill); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreSeckillDto yxStoreSeckill : all) { + Map map = new LinkedHashMap<>(); + map.put("商品id", yxStoreSeckill.getProductId()); + map.put("推荐图", yxStoreSeckill.getImage()); + map.put("轮播图", yxStoreSeckill.getImages()); + map.put("活动标题", yxStoreSeckill.getTitle()); + map.put("简介", yxStoreSeckill.getInfo()); + map.put("价格", yxStoreSeckill.getPrice()); + map.put("成本", yxStoreSeckill.getCost()); + map.put("原价", yxStoreSeckill.getOtPrice()); + map.put("返多少积分", yxStoreSeckill.getGiveIntegral()); + map.put("排序", yxStoreSeckill.getSort()); + map.put("库存", yxStoreSeckill.getStock()); + map.put("销量", yxStoreSeckill.getSales()); + map.put("单位名", yxStoreSeckill.getUnitName()); + map.put("邮费", yxStoreSeckill.getPostage()); + map.put("内容", yxStoreSeckill.getDescription()); + map.put("开始时间", yxStoreSeckill.getStartTime()); + map.put("结束时间", yxStoreSeckill.getStopTime()); + map.put("添加时间", yxStoreSeckill.getAddTime()); + map.put("产品状态", yxStoreSeckill.getStatus()); + map.put("是否包邮", yxStoreSeckill.getIsPostage()); + map.put("热门推荐", yxStoreSeckill.getIsHot()); + map.put("删除 0未删除1已删除", yxStoreSeckill.getIsDel()); + map.put("最多秒杀几个", yxStoreSeckill.getNum()); + map.put("显示", yxStoreSeckill.getIsShow()); + map.put(" endTimeDate", yxStoreSeckill.getEndTimeDate()); + map.put(" startTimeDate", yxStoreSeckill.getStartTimeDate()); + map.put("时间段id", yxStoreSeckill.getTimeId()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreSeckillRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java index 04fef21f..f474ab36 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java @@ -1,78 +1,87 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxStoreVisit; -import co.yixiang.modules.activity.repository.YxStoreVisitRepository; +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 co.yixiang.modules.activity.service.YxStoreVisitService; -import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO; +import co.yixiang.modules.activity.service.dto.YxStoreVisitDto; import co.yixiang.modules.activity.service.dto.YxStoreVisitQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxStoreVisitMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreVisit") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreVisitServiceImpl implements YxStoreVisitService { +public class YxStoreVisitServiceImpl extends BaseServiceImpl implements YxStoreVisitService { - private final YxStoreVisitRepository yxStoreVisitRepository; - - private final YxStoreVisitMapper yxStoreVisitMapper; - - public YxStoreVisitServiceImpl(YxStoreVisitRepository yxStoreVisitRepository, YxStoreVisitMapper yxStoreVisitMapper) { - this.yxStoreVisitRepository = yxStoreVisitRepository; - this.yxStoreVisitMapper = yxStoreVisitMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreVisitRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreVisitMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreVisitDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreVisitQueryCriteria criteria){ - return yxStoreVisitMapper.toDto(yxStoreVisitRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreVisitDTO findById(Integer id) { - Optional yxStoreVisit = yxStoreVisitRepository.findById(id); - ValidationUtil.isNull(yxStoreVisit,"YxStoreVisit","id",id); - return yxStoreVisitMapper.toDto(yxStoreVisit.get()); + //@Cacheable + public List queryAll(YxStoreVisitQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreVisit.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreVisitDTO create(YxStoreVisit resources) { - return yxStoreVisitMapper.toDto(yxStoreVisitRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreVisit resources) { - Optional optionalYxStoreVisit = yxStoreVisitRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreVisit,"YxStoreVisit","id",resources.getId()); - YxStoreVisit yxStoreVisit = optionalYxStoreVisit.get(); - yxStoreVisit.copy(resources); - yxStoreVisitRepository.save(yxStoreVisit); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreVisitDto yxStoreVisit : all) { + Map map = new LinkedHashMap<>(); + map.put("产品ID", yxStoreVisit.getProductId()); + map.put("产品类型", yxStoreVisit.getProductType()); + map.put("产品分类ID", yxStoreVisit.getCateId()); + map.put("产品类型", yxStoreVisit.getType()); + map.put("用户ID", yxStoreVisit.getUid()); + map.put("访问次数", yxStoreVisit.getCount()); + map.put("备注描述", yxStoreVisit.getContent()); + map.put("添加时间", yxStoreVisit.getAddTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreVisitRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java index f703c10b..0d69bc3a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java @@ -1,78 +1,93 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.impl; import co.yixiang.modules.activity.domain.YxUserExtract; -import co.yixiang.modules.activity.repository.YxUserExtractRepository; +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 co.yixiang.modules.activity.service.YxUserExtractService; -import co.yixiang.modules.activity.service.dto.YxUserExtractDTO; +import co.yixiang.modules.activity.service.dto.YxUserExtractDto; import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria; import co.yixiang.modules.activity.service.mapper.YxUserExtractMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxUserExtract") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserExtractServiceImpl implements YxUserExtractService { +public class YxUserExtractServiceImpl extends BaseServiceImpl implements YxUserExtractService { - private final YxUserExtractRepository yxUserExtractRepository; - - private final YxUserExtractMapper yxUserExtractMapper; - - public YxUserExtractServiceImpl(YxUserExtractRepository yxUserExtractRepository, YxUserExtractMapper yxUserExtractMapper) { - this.yxUserExtractRepository = yxUserExtractRepository; - this.yxUserExtractMapper = yxUserExtractMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable){ - Page page = yxUserExtractRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxUserExtractMapper::toDto)); + //@Cacheable + public Map queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxUserExtractDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxUserExtractQueryCriteria criteria){ - return yxUserExtractMapper.toDto(yxUserExtractRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxUserExtractDTO findById(Integer id) { - Optional yxUserExtract = yxUserExtractRepository.findById(id); - ValidationUtil.isNull(yxUserExtract,"YxUserExtract","id",id); - return yxUserExtractMapper.toDto(yxUserExtract.get()); + //@Cacheable + public List queryAll(YxUserExtractQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserExtract.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxUserExtractDTO create(YxUserExtract resources) { - return yxUserExtractMapper.toDto(yxUserExtractRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxUserExtract resources) { - Optional optionalYxUserExtract = yxUserExtractRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxUserExtract,"YxUserExtract","id",resources.getId()); - YxUserExtract yxUserExtract = optionalYxUserExtract.get(); - yxUserExtract.copy(resources); - yxUserExtractRepository.save(yxUserExtract); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxUserExtractDto yxUserExtract : all) { + Map map = new LinkedHashMap<>(); + map.put(" uid", yxUserExtract.getUid()); + map.put("名称", yxUserExtract.getRealName()); + map.put("bank = 银行卡 alipay = 支付宝wx=微信", yxUserExtract.getExtractType()); + map.put("银行卡", yxUserExtract.getBankCode()); + map.put("开户地址", yxUserExtract.getBankAddress()); + map.put("支付宝账号", yxUserExtract.getAlipayCode()); + map.put("提现金额", yxUserExtract.getExtractPrice()); + map.put(" mark", yxUserExtract.getMark()); + map.put(" balance", yxUserExtract.getBalance()); + map.put("无效原因", yxUserExtract.getFailMsg()); + map.put(" failTime", yxUserExtract.getFailTime()); + map.put("添加时间", yxUserExtract.getAddTime()); + map.put("-1 未通过 0 审核中 1 已提现", yxUserExtract.getStatus()); + map.put("微信号", yxUserExtract.getWechat()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxUserExtractRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java index ebc6baef..f18cc6a7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreBargain; -import co.yixiang.modules.activity.service.dto.YxStoreBargainDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** -* @author xuwenbo -* @date 2019-12-22 +* @author hupeng +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreBargainMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreBargainMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java index 4afab560..a38690a3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCombination; -import co.yixiang.modules.activity.service.dto.YxStoreCombinationDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCombinationMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreCombinationMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java index e0c91649..10575698 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCouponIssue; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCouponIssueMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreCouponIssueMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java index c4864a78..6b89ba32 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; -import co.yixiang.modules.activity.service.dto.YxStoreCouponIssueUserDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCouponIssueUserMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreCouponIssueUserMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java index dada61f2..b5126724 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCoupon; -import co.yixiang.modules.activity.service.dto.YxStoreCouponDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-09 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCouponMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreCouponMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java index ac217932..1e5ad36b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import co.yixiang.modules.activity.service.dto.YxStoreCouponUserDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-10 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCouponUserMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreCouponUserMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java index a01582c6..a2e43038 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.service.dto.YxStorePinkDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-12 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStorePinkMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStorePinkMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java index 32abe86d..a95609dd 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreSeckill; -import co.yixiang.modules.activity.service.dto.YxStoreSeckillDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** -* @author xuwenbo -* @date 2019-12-14 +* @author hupeng +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreSeckillMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreSeckillMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java index 568a94f9..38c91fc1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreVisit; -import co.yixiang.modules.activity.service.dto.YxStoreVisitDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-18 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreVisitMapper extends EntityMapper { +@Repository +@Mapper +public interface YxStoreVisitMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java index 8d93ddbb..12fcd504 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.activity.service.mapper; -import co.yixiang.mapper.EntityMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxUserExtract; -import co.yixiang.modules.activity.service.dto.YxUserExtractDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** * @author hupeng -* @date 2019-11-14 +* @date 2020-05-13 */ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxUserExtractMapper extends EntityMapper { +@Repository +@Mapper +public interface YxUserExtractMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/StoreOrderCartInfo.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/StoreOrderCartInfo.java deleted file mode 100644 index bbb7e7e3..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/StoreOrderCartInfo.java +++ /dev/null @@ -1,36 +0,0 @@ -package co.yixiang.modules.shop.domain; - -import lombok.Data; - -import javax.persistence.*; - -/** - * @ClassName StoreOrderCartInfo - * @Author hupeng <610796224@qq.com> - * @Date 2019/10/14 - **/ - -@Entity -@Data -@Table(name="yx_store_order_cart_info") -public class StoreOrderCartInfo { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - private Integer id; - - @Column(name = "oid") - private Integer oid; - - @Column(name = "cart_id") - private Integer cartId; - - @Column(name = "cart_info") - private String cartInfo; - - @Column(name = "unique") - private String unique; - - -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java index 9aa70257..13565c09 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java @@ -1,49 +1,51 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.io.Serializable; /** * @author hupeng -* @date 2019-12-12 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_express") +@TableName("yx_express") public class YxExpress implements Serializable { - // 快递公司id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 快递公司id */ + @TableId private Integer id; - // 快递公司简称 - @Column(name = "code",unique = true,nullable = false) - @NotBlank(message = "快递公司编号不能为空") + + /** 快递公司简称 */ + @NotBlank(message = "请输入快递公司编号") private String code; - // 快递公司全称 - @Column(name = "name",nullable = false) - @NotBlank(message = "快递公司名称不能为空") + + /** 快递公司全称 */ + @NotBlank(message = "请输入快递公司名称") + private String name; - // 排序 - @Column(name = "sort",nullable = false) - @NotNull(message = "排序必填") + + /** 排序 */ private Integer sort; - // 是否显示 - @Column(name = "is_show",insertable = false) + + /** 是否显示 */ private Integer isShow; + public void copy(YxExpress source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java index 7cbc3516..f0465608 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java @@ -1,62 +1,60 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import javax.validation.constraints.*; import java.sql.Timestamp; import java.io.Serializable; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_material") +@TableName("yx_material") public class YxMaterial implements Serializable { /** PK */ - @Id - @Column(name = "id") + @TableId(type = IdType.UUID) private String id; - /** 逻辑删除标记(0:显示;1:隐藏) */ - @Column(name = "del_flag",nullable = false,insertable = false) - private String delFlag; + @TableLogic + @TableField(fill=FieldFill.INSERT_UPDATE) + private Boolean delFlag; + /** 创建时间 */ - @Column(name = "create_time",nullable = false) - @CreationTimestamp + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - /** 创建者ID */ - @Column(name = "create_id") private String createId; + /** 类型1、图片;2、视频 */ - @Column(name = "type",nullable = false) private String type; + /** 分组ID */ - @Column(name = "group_id") private String groupId; + /** 素材名 */ - @Column(name = "name",nullable = false) - @NotBlank private String name; + /** 素材链接 */ - @Column(name = "url") private String url; + public void copy(YxMaterial source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java index 31f68fb2..e3b5330a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java @@ -1,50 +1,48 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import javax.validation.constraints.*; import java.sql.Timestamp; import java.io.Serializable; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_material_group") +@TableName("yx_material_group") public class YxMaterialGroup implements Serializable { /** PK */ - @Id - @Column(name = "id") + @TableId(type = IdType.UUID) private String id; - /** 逻辑删除标记(0:显示;1:隐藏) */ - @Column(name = "del_flag",nullable = false,insertable = false) - private String delFlag; + @TableLogic + @TableField(fill=FieldFill.INSERT_UPDATE) + private Boolean delFlag; + /** 创建时间 */ - @Column(name = "create_time",nullable = false) - @CreationTimestamp + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - /** 创建者ID */ - @Column(name = "create_id") private String createId; + /** 分组名 */ - @Column(name = "name",nullable = false) - @NotBlank private String name; + public void copy(YxMaterialGroup source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java index b0c5d322..cab56fa0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java @@ -1,86 +1,78 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import javax.persistence.*; -import javax.validation.constraints.*; import java.io.Serializable; /** - * @author xwb - * @date 2020-04-02 - */ -@Entity +* @author hupeng +* @date 2020-05-12 +*/ + @Data -@Table(name="yx_store_cart") +@TableName("yx_store_cart") public class YxStoreCart implements Serializable { /** 购物车表ID */ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Long id; + /** 用户ID */ - @Column(name = "uid",nullable = false) - @NotNull private Integer uid; + /** 类型 */ - @Column(name = "type",nullable = false) - @NotBlank private String type; + /** 商品ID */ - @Column(name = "product_id",nullable = false) - @NotNull private Integer productId; + /** 商品属性 */ - @Column(name = "product_attr_unique",nullable = false) - @NotBlank private String productAttrUnique; + /** 商品数量 */ - @Column(name = "cart_num",nullable = false) - @NotNull private Integer cartNum; + /** 添加时间 */ - @Column(name = "add_time",nullable = false) - @NotNull private Integer addTime; + /** 0 = 未购买 1 = 已购买 */ - @Column(name = "is_pay",nullable = false) - @NotNull private Integer isPay; + /** 是否删除 */ - @Column(name = "is_del",nullable = false) - @NotNull private Integer isDel; + /** 是否为立即购买 */ - @Column(name = "is_new",nullable = false) - @NotNull private Integer isNew; + /** 拼团id */ - @Column(name = "combination_id") + //@Column(name = "combination_id") private Integer combinationId; + /** 秒杀产品ID */ - @Column(name = "seckill_id",nullable = false) - @NotNull private Integer seckillId; + /** 砍价id */ - @Column(name = "bargain_id",nullable = false) - @NotNull private Integer bargainId; + public void copy(YxStoreCart source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java index 5730f8c4..93d2d62d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java @@ -1,71 +1,61 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.Where; -import javax.persistence.*; import javax.validation.constraints.NotBlank; import java.io.Serializable; -import java.util.List; -import java.util.Objects; /** * @author hupeng -* @date 2019-10-03 +* @date 2020-05-12 */ -@Entity -@Getter -@Setter -@Table(name="yx_store_category") -//@Where(clause = "is_del = 0") + +@Data +@TableName("yx_store_category") public class YxStoreCategory implements Serializable { - // 商品分类表ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 商品分类表ID */ + @TableId private Integer id; - // 父id - @Column(name = "pid",nullable = false) + + /** 父id */ private Integer pid; - // 分类名称 - @Column(name = "cate_name",nullable = false) - @NotBlank(message = "分类名称不能为空") + + /** 分类名称 */ + @NotBlank(message = "分类名称必填") private String cateName; -// @OneToMany -// @JoinColumn(name = "cate_id") -// private List storeProducts; - // 排序 - @Column(name = "sort",nullable = false) + /** 排序 */ private Integer sort; - // 图标 - @Column(name = "pic",nullable = false) - //@NotBlank(message = "请上传分类图片") + + /** 图标 */ private String pic; - // 是否推荐 - @Column(name = "is_show",nullable = false) + + /** 是否推荐 */ private Integer isShow; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ private Integer addTime; - @Column(name = "is_del",insertable = false) + + /** 删除状态 */ private Integer isDel; + public void copy(YxStoreCategory source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } - - -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java index 6d332750..3de154fc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java @@ -1,237 +1,238 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-14 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_order") +@TableName("yx_store_order") public class YxStoreOrder implements Serializable { - // 订单ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 订单ID */ + @TableId private Integer id; - // 订单号 - @Column(name = "order_id",nullable = false) + + /** 订单号 */ private String orderId; - // 订单号 - @Column(name = "extend_order_id",nullable = true) + + /** 额外订单号 */ private String extendOrderId; - // 用户id - @Column(name = "uid",nullable = false) + /** 用户id */ private Integer uid; - // 用户姓名 - @Column(name = "real_name",nullable = false) + + /** 用户姓名 */ private String realName; - // 用户电话 - @Column(name = "user_phone",nullable = false) + + /** 用户电话 */ private String userPhone; - // 详细地址 - @Column(name = "user_address",nullable = false) + + /** 详细地址 */ private String userAddress; - // 购物车id - @Column(name = "cart_id",nullable = false) + + /** 购物车id */ private String cartId; - // 运费金额 - @Column(name = "freight_price",nullable = false) + + /** 运费金额 */ private BigDecimal freightPrice; - // 订单商品总数 - @Column(name = "total_num",nullable = false) + + /** 订单商品总数 */ private Integer totalNum; - // 订单总价 - @Column(name = "total_price",nullable = false) + + /** 订单总价 */ private BigDecimal totalPrice; - // 邮费 - @Column(name = "total_postage",nullable = false) + + /** 邮费 */ private BigDecimal totalPostage; - // 实际支付金额 - @Column(name = "pay_price",nullable = false) + + /** 实际支付金额 */ private BigDecimal payPrice; - // 支付邮费 - @Column(name = "pay_postage",nullable = false) + + /** 支付邮费 */ private BigDecimal payPostage; - // 抵扣金额 - @Column(name = "deduction_price",nullable = false) + + /** 抵扣金额 */ private BigDecimal deductionPrice; - // 优惠券id - @Column(name = "coupon_id",nullable = false) + + /** 优惠券id */ private Integer couponId; - // 优惠券金额 - @Column(name = "coupon_price",nullable = false) + + /** 优惠券金额 */ private BigDecimal couponPrice; - // 支付状态 - @Column(name = "paid",nullable = false) + + /** 支付状态 */ private Integer paid; - // 支付时间 - @Column(name = "pay_time") + + /** 支付时间 */ private Integer payTime; - // 支付方式 - @Column(name = "pay_type",nullable = false) + + /** 支付方式 */ private String payType; - // 创建时间 - @Column(name = "add_time",nullable = false) + + /** 创建时间 */ private Integer addTime; - // 订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款) - @Column(name = "status",nullable = false) + + /** 订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款) */ private Integer status; - // 0 未退款 1 申请中 2 已退款 - @Column(name = "refund_status",nullable = false) + + /** 0 未退款 1 申请中 2 已退款 */ private Integer refundStatus; - // 退款图片 - @Column(name = "refund_reason_wap_img") + + /** 退款图片 */ private String refundReasonWapImg; - // 退款用户说明 - @Column(name = "refund_reason_wap_explain") + + /** 退款用户说明 */ private String refundReasonWapExplain; - // 退款时间 - @Column(name = "refund_reason_time") + + /** 退款时间 */ private Integer refundReasonTime; - // 前台退款原因 - @Column(name = "refund_reason_wap") + + /** 前台退款原因 */ private String refundReasonWap; - // 不退款的理由 - @Column(name = "refund_reason") + + /** 不退款的理由 */ private String refundReason; - // 退款金额 - @Column(name = "refund_price",nullable = false) + + /** 退款金额 */ private BigDecimal refundPrice; - // 快递名称/送货人姓名 - @Column(name = "delivery_name") - //@NotBlank(message = "请选择快递公司") - private String deliveryName; - @Column(name = "delivery_sn") + /** 快递公司编号 */ private String deliverySn; - // 发货类型 - @Column(name = "delivery_type") + /** 快递名称/送货人姓名 */ + private String deliveryName; + + + /** 发货类型 */ private String deliveryType; - // 快递单号/手机号 - @Column(name = "delivery_id") - //@NotBlank(message = "快递单号不能为空") + + /** 快递单号/手机号 */ private String deliveryId; - // 消费赚取积分 - @Column(name = "gain_integral",nullable = false) + + /** 消费赚取积分 */ private BigDecimal gainIntegral; - // 使用积分 - @Column(name = "use_integral",nullable = false) + + /** 使用积分 */ private BigDecimal useIntegral; - // 给用户退了多少积分 - @Column(name = "back_integral") + + /** 给用户退了多少积分 */ private BigDecimal backIntegral; - // 备注 - @Column(name = "mark",nullable = false) + + /** 备注 */ private String mark; - // 是否删除 - @Column(name = "is_del",nullable = false) + + /** 是否删除 */ private Integer isDel; - // 唯一id(md5加密)类似id - @Column(name = "`unique`",unique = true,nullable = false) + + /** 唯一id(md5加密)类似id */ + @TableField(value = "`unique`") + //@NotBlank private String unique; - // 管理员备注 - @Column(name = "remark") + + /** 管理员备注 */ private String remark; - // 商户ID - @Column(name = "mer_id",nullable = false) + + /** 商户ID */ private Integer merId; - @Column(name = "is_mer_check",nullable = false) + private Integer isMerCheck; - // 拼团产品id0一般产品 - @Column(name = "combination_id") + + /** 拼团产品id0一般产品 */ private Integer combinationId; - // 拼团id 0没有拼团 - @Column(name = "pink_id",nullable = false) + + /** 拼团id 0没有拼团 */ private Integer pinkId; - // 成本价 - @Column(name = "cost",nullable = false) + + /** 成本价 */ private BigDecimal cost; - // 秒杀产品ID - @Column(name = "seckill_id",nullable = false) + + /** 秒杀产品ID */ private Integer seckillId; - // 砍价id - @Column(name = "bargain_id") + + /** 砍价id */ private Integer bargainId; - // 核销码 - @Column(name = "verify_code",nullable = false) + + /** 核销码 */ private String verifyCode; - // 门店id - @Column(name = "store_id",nullable = false) + + /** 门店id */ private Integer storeId; - // 配送方式 1=快递 ,2=门店自提 - @Column(name = "shipping_type",nullable = false) + + /** 配送方式 1=快递 ,2=门店自提 */ private Integer shippingType; - // 支付渠道(0微信公众号1微信小程序) - @Column(name = "is_channel") + + /** 支付渠道(0微信公众号1微信小程序) */ private Integer isChannel; - @Column(name = "is_remind") + private Integer isRemind; - @Column(name = "is_system_del") + private Integer isSystemDel; + public void copy(YxStoreOrder source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java new file mode 100644 index 00000000..803baf98 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java @@ -0,0 +1,52 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-12 +*/ + +@Data +@TableName("yx_store_order_cart_info") +public class YxStoreOrderCartInfo implements Serializable { + + @TableId + private Integer id; + + + /** 订单id */ + private Integer oid; + + + /** 购物车id */ + private Integer cartId; + + + /** 商品ID */ + private Integer productId; + + + /** 购买东西的详细信息 */ + private String cartInfo; + + + /** 唯一id */ + @TableField(value = "`unique`") + private String unique; + + + public void copy(YxStoreOrderCartInfo source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java index 64360b32..a14505e4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java @@ -1,43 +1,45 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-11-02 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_order_status") +@TableName("yx_store_order_status") public class YxStoreOrderStatus implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 订单id - @Column(name = "oid",nullable = false) + + /** 订单id */ private Integer oid; - // 操作类型 - @Column(name = "change_type",nullable = false) + + /** 操作类型 */ private String changeType; - // 操作备注 - @Column(name = "change_message",nullable = false) + + /** 操作备注 */ private String changeMessage; - // 操作时间 - @Column(name = "change_time",nullable = false) + + /** 操作时间 */ private Integer changeTime; + public void copy(YxStoreOrderStatus source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java index a3f3de07..bc857c5e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java @@ -1,208 +1,196 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import co.yixiang.annotation.Query; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import org.hibernate.annotations.NotFound; -import org.hibernate.annotations.NotFoundAction; -import javax.persistence.*; -import javax.validation.constraints.Min; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-04 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_product") +@TableName("yx_store_product") public class YxStoreProduct implements Serializable { - // 商品id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 商品id */ + @TableId private Integer id; - // 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) - @Column(name = "mer_id",nullable = false) + + /** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */ private Integer merId; - // 商品图片 - @Column(name = "image",nullable = false) + + /** 商品图片 */ @NotBlank(message = "请上传商品图片") private String image; - // 轮播图 - @Column(name = "slider_image",nullable = false) - @NotBlank(message = "请上传轮播图") + + /** 轮播图 */ + @NotBlank(message = "请上传商品轮播") private String sliderImage; - // 商品名称 - @Column(name = "store_name",nullable = false) - @NotBlank(message = "请填写商品名称") + + /** 商品名称 */ + @NotBlank(message = "商品名称不能空") private String storeName; - // 商品简介 - @Column(name = "store_info",nullable = false) - @NotBlank(message = "请填写商品简介") + + /** 商品简介 */ private String storeInfo; - // 关键字 - @Column(name = "keyword",nullable = false) - @NotBlank(message = "请填写关键字") + + /** 关键字 */ private String keyword; - // 产品条码(一维码) - @Column(name = "bar_code",nullable = false) + + /** 产品条码(一维码) */ private String barCode; - // private Integer cateId; - @ManyToOne(fetch=FetchType.LAZY,optional = false) - @JoinColumn(name = "cate_id") - @NotFound(action= NotFoundAction.IGNORE) - private YxStoreCategory storeCategory; + /** 分类id */ + private String cateId; - // 商品价格 - @Column(name = "price",nullable = false) - @NotNull(message = "价格必填") - @Min(value = 0) + + /** 商品价格 */ + @NotNull(message = "请输入商品价格") + @DecimalMin(value="0.00", message = "商品价格不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "商品价格不在合法范围内") private BigDecimal price; - // 会员价格 - @Column(name = "vip_price",insertable = false) - //@NotNull(message = "会员价必填") - //@Min(value = 0) + + /** 会员价格 */ private BigDecimal vipPrice; - // 市场价 - @Column(name = "ot_price",nullable = false) - @NotNull(message = "原价必填") - @Min(value = 0) + + /** 市场价 */ + @NotNull(message = "请输入市场价") + @DecimalMin(value="0.00", message = "市场价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "市场价不在合法范围内") private BigDecimal otPrice; - // 邮费 - @Column(name = "postage",nullable = false) - @NotNull(message = "邮费必填") - @Min(value = 0) + + /** 邮费 */ private BigDecimal postage; - // 单位名 - @Column(name = "unit_name",nullable = false) + + /** 单位名 */ @NotBlank(message = "请填写单位") private String unitName; - // 排序 - @Column(name = "sort",nullable = false) - @NotNull(message = "排序必填") - @Min(value = 0) + + /** 排序 */ private Integer sort; - // 销量 - @Column(name = "sales",nullable = false) - @NotNull(message = "销量必填") - @Min(value = 0) + + /** 销量 */ private Integer sales; - // 库存 - @Column(name = "stock",nullable = false) - @NotNull(message = "库存必填") - @Min(value = 0) + + /** 库存 */ private Integer stock; - // 状态(0:未上架,1:上架) - @Column(name = "is_show",insertable = false) - //@NotNull(message = "状态必须选择") + + /** 状态(0:未上架,1:上架) */ private Integer isShow; - // 是否热卖 - @Column(name = "is_hot") - @NotNull(message = "热卖单品必须选择") + + /** 是否热卖 */ private Integer isHot; - // 是否优惠 - @Column(name = "is_benefit") - @NotNull(message = "优惠推荐必须选择") + + /** 是否优惠 */ private Integer isBenefit; - // 是否精品 - @Column(name = "is_best",columnDefinition="int default 0") - @NotNull(message = "精品状态必须选择") + + /** 是否精品 */ private Integer isBest; - // 是否新品 - @Column(name = "is_new",columnDefinition="int default 0") - @NotNull(message = "首发新品必须选择") + + /** 是否新品 */ private Integer isNew; - // 产品描述 - @Column(name = "description",nullable = false) - @NotBlank(message = "产品描述") + + /** 产品描述 */ + @NotBlank(message = "请填写商品详情") private String description; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ private Integer addTime; - // 是否包邮 - @Column(name = "is_postage") - @NotNull(message = "包邮状态必须选择") + + /** 是否包邮 */ private Integer isPostage; - // 是否删除 - @Column(name = "is_del",insertable = false) + + /** 是否删除 */ private Integer isDel; - // 商户是否代理 0不可代理1可代理 - @Column(name = "mer_use",nullable = false) + + /** 商户是否代理 0不可代理1可代理 */ private Integer merUse; - // 获得积分 - @Column(name = "give_integral") - @NotNull(message = "奖励积分不能为空") - @Min(value = 0) + + /** 获得积分 */ + @DecimalMin(value="0.00", message = "获得积分不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "获得积分不在合法范围内") private BigDecimal giveIntegral; - // 成本价 - @Column(name = "cost") - @NotNull(message = "成本价不能为空") - @Min(value = 0) + + /** 成本价 */ + @NotNull(message = "请输入成本价") + @DecimalMin(value="0.00", message = "成本价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "成本价不在合法范围内") private BigDecimal cost; - // 秒杀状态 0 未开启 1已开启 - @Column(name = "is_seckill",columnDefinition="int default 0") + + /** 秒杀状态 0 未开启 1已开启 */ private Integer isSeckill; - // 砍价状态 0未开启 1开启 - @Column(name = "is_bargain",columnDefinition="int default 0") + + /** 砍价状态 0未开启 1开启 */ private Integer isBargain; - // 是否优品推荐 - @Column(name = "is_good",columnDefinition="int default 0") + + /** 是否优品推荐 */ private Integer isGood; - // 虚拟销量 - @Column(name = "ficti",columnDefinition="int default 0") + + /** 虚拟销量 */ private Integer ficti; - // 浏览量 - @Column(name = "browse",columnDefinition="int default 0") + + /** 浏览量 */ private Integer browse; - // 产品二维码地址(用户小程序海报) - @Column(name = "code_path",nullable = false) + + /** 产品二维码地址(用户小程序海报) */ private String codePath; - // 淘宝京东1688类型 - @Column(name = "soure_link") + + /** 淘宝京东1688类型 */ private String soureLink; + @TableField(exist = false) + private YxStoreCategory storeCategory; + + public void copy(YxStoreProduct source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java index 2aed4b7b..53b557d2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java @@ -1,38 +1,41 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-13 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_product_attr") +@TableName("yx_store_product_attr") public class YxStoreProductAttr implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 商品ID - @Column(name = "product_id",nullable = false) + + + /** 商品ID */ private Integer productId; - // 属性名 - @Column(name = "attr_name",nullable = false) + + /** 属性名 */ private String attrName; - // 属性值 - @Column(name = "attr_values",nullable = false) + + /** 属性值 */ private String attrValues; + public void copy(YxStoreProductAttr source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java index 6894a688..c6f40dc7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java @@ -1,39 +1,41 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-13 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_product_attr_result") +@TableName("yx_store_product_attr_result") public class YxStoreProductAttrResult implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 商品ID - @Column(name = "product_id",nullable = false) + + /** 商品ID */ private Integer productId; - // 商品属性参数 - @Column(name = "result",nullable = false) + + /** 商品属性参数 */ private String result; - // 上次修改时间 - @Column(name = "change_time",nullable = false) + + /** 上次修改时间 */ private Integer changeTime; + public void copy(YxStoreProductAttrResult source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java index ab57b819..0935b566 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java @@ -1,60 +1,65 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - import javax.persistence.*; -import java.io.Serializable; +import javax.validation.constraints.*; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-13 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_product_attr_value") +@TableName("yx_store_product_attr_value") public class YxStoreProductAttrValue implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 商品ID - @Column(name = "product_id",nullable = false) + + /** 商品ID */ private Integer productId; - // 商品属性索引值 (attr_value|attr_value[|....]) - @Column(name = "suk",nullable = false) + + /** 商品属性索引值 (attr_value|attr_value[|....]) */ private String suk; - // 属性对应的库存 - @Column(name = "stock",nullable = false) + + /** 属性对应的库存 */ private Integer stock; - // 销量 - @Column(name = "sales",nullable = false) + + /** 销量 */ private Integer sales; - // 属性金额 - @Column(name = "price",nullable = false) + + /** 属性金额 */ private BigDecimal price; - // 图片 - @Column(name = "image") + + /** 图片 */ private String image; - // 唯一值 - @Column(name = "`unique`",nullable = false) + + /** 唯一值 */ + @TableField(value = "`unique`") private String unique; - // 成本价 - @Column(name = "cost",nullable = false) + + /** 成本价 */ private BigDecimal cost; + public void copy(YxStoreProductAttrValue source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java index a8a4a2b1..d413c261 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java @@ -1,92 +1,92 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-11-03 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_store_product_reply") +@TableName("yx_store_product_reply") public class YxStoreProductReply implements Serializable { - // 评论ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 评论ID */ + @TableId private Integer id; - // 用户ID -// @Column(name = "uid",nullable = false) -// private Integer uid; - @ManyToOne(fetch=FetchType.LAZY,optional = false) - @JoinColumn(name = "uid") - private YxUser user; + /** 用户ID */ + private Integer uid; - // 订单ID - @Column(name = "oid",nullable = false) + + /** 订单ID */ private Integer oid; - // 唯一id - @Column(name = "`unique`",nullable = false) + + /** 唯一id */ + @TableField(value = "`unique`") private String unique; - // 产品id -// @Column(name = "product_id",nullable = false) -// private Integer productId; - @ManyToOne(fetch=FetchType.LAZY,optional = false) - @JoinColumn(name = "product_id") - private YxStoreProduct storeProduct; + /** 产品id */ + private Integer productId; - // 某种商品类型(普通商品、秒杀商品) - @Column(name = "reply_type",nullable = false) + + /** 某种商品类型(普通商品、秒杀商品) */ private String replyType; - // 商品分数 - @Column(name = "product_score",nullable = false) + + /** 商品分数 */ private Integer productScore; - // 服务分数 - @Column(name = "service_score",nullable = false) + + /** 服务分数 */ private Integer serviceScore; - // 评论内容 - @Column(name = "comment",nullable = false) + + /** 评论内容 */ private String comment; - // 评论图片 - @Column(name = "pics",nullable = false) + + /** 评论图片 */ private String pics; - // 评论时间 - @Column(name = "add_time",nullable = false) + + /** 评论时间 */ private Integer addTime; - // 管理员回复内容 - @Column(name = "merchant_reply_content") + + /** 管理员回复内容 */ private String merchantReplyContent; - // 管理员回复时间 - @Column(name = "merchant_reply_time") + + /** 管理员回复时间 */ private Integer merchantReplyTime; - // 0未删除1已删除 - @Column(name = "is_del",nullable = false) + + /** 0未删除1已删除 */ private Integer isDel; - // 0未回复1已回复 - @Column(name = "is_reply",nullable = false) + + /** 0未回复1已回复 */ private Integer isReply; + @TableField(exist = false) + private YxStoreProduct storeProduct; + + @TableField(exist = false) + private YxUser user; + public void copy(YxStoreProductReply source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java index 85139361..d4e1e4b0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java @@ -1,45 +1,46 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_config") +@TableName("yx_system_config") public class YxSystemConfig implements Serializable { - // 配置id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 配置id */ + @TableId private Integer id; - // 字段名称 - @Column(name = "menu_name",nullable = false) + + /** 字段名称 */ private String menuName; - // 默认值 - @Column(name = "value") + /** 默认值 */ private String value; - // 排序 - @Column(name = "sort",nullable = false) + + /** 排序 */ private Integer sort; - // 是否隐藏 - @Column(name = "status",nullable = false) + + /** 是否隐藏 */ private Integer status; + public void copy(YxSystemConfig source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java index a2905d5b..c14b92c6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java @@ -1,48 +1,50 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-10-18 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_group_data") +@TableName("yx_system_group_data") public class YxSystemGroupData implements Serializable { - // 组合数据详情ID - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 组合数据详情ID */ + @TableId private Integer id; - // 对应的数据名称 - @Column(name = "group_name",nullable = false) + + /** 对应的数据名称 */ private String groupName; - // 数据组对应的数据值(json数据) - @Column(name = "value",nullable = false) + + /** 数据组对应的数据值(json数据) */ private String value; - // 添加数据时间 - @Column(name = "add_time",nullable = false) + + /** 添加数据时间 */ private Integer addTime; - // 数据排序 - @Column(name = "sort",nullable = false) + + /** 数据排序 */ private Integer sort; - // 状态(1:开启;2:关闭;) - @Column(name = "status",nullable = false) + + /** 状态(1:开启;2:关闭;) */ private Integer status; + public void copy(YxSystemGroupData source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java index a4a9296c..81586f0d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java @@ -1,102 +1,102 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import javax.persistence.*; -import javax.validation.constraints.*; + +import javax.validation.constraints.NotBlank; import java.io.Serializable; import java.util.Date; /** * @author hupeng -* @date 2020-03-03 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_store") +@TableName("yx_system_store") public class YxSystemStore implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; + /** 门店名称 */ - @Column(name = "name",nullable = false) - @NotBlank + @NotBlank(message = "请填写门店名称") private String name; + /** 简介 */ - @Column(name = "introduction",nullable = false) - @NotBlank + @NotBlank(message = "请填写门店简介") private String introduction; + /** 手机号码 */ - @Column(name = "phone",nullable = false) - @NotBlank + @NotBlank(message = "请填手机号码") private String phone; + /** 省市区 */ - @Column(name = "address",nullable = false) - @NotBlank + @NotBlank(message = "请填地址") private String address; + /** 详细地址 */ - @Column(name = "detailed_address",insertable = false) private String detailedAddress; + /** 门店logo */ - @Column(name = "image",nullable = false) @NotBlank(message = "请上传门店logo") private String image; + /** 纬度 */ - @Column(name = "latitude",nullable = false) - @NotBlank + @NotBlank(message = "请输入纬度") private String latitude; + /** 经度 */ - @Column(name = "longitude",nullable = false) - @NotBlank + @NotBlank(message = "请输入经度") private String longitude; + /** 核销有效日期 */ - @Column(name = "valid_time",nullable = false) - @NotBlank + @NotBlank(message = "请输入核销时效") private String validTime; - @Column(name = "valid_time_start",nullable = false) - private Date validTimeStart; - - @Column(name = "valid_time_end",nullable = false) - private Date validTimeEnd; /** 每日营业开关时间 */ - @Column(name = "day_time",nullable = false) - @NotBlank + @NotBlank(message = "请输入营业时间") private String dayTime; - @Column(name = "day_time_start",nullable = false) - private Date dayTimeStart; - - @Column(name = "day_time_end",nullable = false) - private Date dayTimeEnd; /** 添加时间 */ - @Column(name = "add_time",nullable = false) + @TableField(fill= FieldFill.INSERT) private Integer addTime; + /** 是否显示 */ - @Column(name = "is_show") - @NotNull private Integer isShow; + /** 是否删除 */ - @Column(name = "is_del",insertable = false) private Integer isDel; + private Date validTimeEnd; + + private Date validTimeStart; + + private Date dayTimeStart; + + private Date dayTimeEnd; + + public void copy(YxSystemStore source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java index ed5ec8d0..71963ebb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java @@ -1,74 +1,77 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import javax.persistence.*; -import javax.validation.constraints.*; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** * @author hupeng -* @date 2020-03-22 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_store_staff") +@TableName("yx_system_store_staff") public class YxSystemStoreStaff implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; + /** 微信用户id */ - @Column(name = "uid",nullable = false) - @NotNull(message = "请选择商城会员") private Integer uid; + /** 店员头像 */ - @Column(name = "avatar",nullable = false) - @NotBlank(message = "请选择商城会员") + @NotBlank(message = "请选择用户") private String avatar; + /** 门店id */ - @Column(name = "store_id",nullable = false) - @NotNull + @NotNull(message = "请选择门店") private Integer storeId; + /** 店员名称 */ - @Column(name = "staff_name",nullable = false) - @NotBlank + @NotBlank(message = "请输入店员名称") private String staffName; + /** 手机号码 */ - @Column(name = "phone",nullable = false) - @NotBlank + @NotBlank(message = "请输入手机号码") private String phone; + /** 核销开关 */ - @Column(name = "verify_status",nullable = false) - @NotNull private Integer verifyStatus; + /** 状态 */ - @Column(name = "status",insertable = false) private Integer status; + /** 添加时间 */ - @Column(name = "add_time") + @TableField(fill= FieldFill.INSERT) private Integer addTime; + /** 微信昵称 */ - @Column(name = "nickname",nullable = false) - @NotBlank private String nickname; + /** 所属门店 */ - @Column(name = "store_name") private String storeName; + public void copy(YxSystemStoreStaff source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java index 1301102b..914a3a39 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java @@ -1,93 +1,95 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; -import javax.persistence.*; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_user_level") +@TableName("yx_system_user_level") public class YxSystemUserLevel implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 商户id - @Column(name = "mer_id",insertable = false) + + /** 商户id */ private Integer merId; - // 会员名称 - @Column(name = "name",nullable = false) - @NotBlank(message = "请填写等级名称") + + /** 会员名称 */ + @NotBlank(message = "名称必填") private String name; - // 购买金额 - @Column(name = "money",insertable = false) + + /** 购买金额 */ private BigDecimal money; - // 有效时间 - @Column(name = "valid_date",nullable = false) + + /** 有效时间 */ private Integer validDate; - // 是否为永久会员 - @Column(name = "is_forever",nullable = false) + + /** 是否为永久会员 */ private Integer isForever; - // 是否购买,1=购买,0=不购买 - @Column(name = "is_pay",insertable = false) + + /** 是否购买,1=购买,0=不购买 */ private Integer isPay; - // 是否显示 1=显示,0=隐藏 - @Column(name = "is_show",nullable = false) - @NotNull(message = "请选择显示状态") + + /** 是否显示 1=显示,0=隐藏 */ private Integer isShow; - // 会员等级 - @Column(name = "grade",nullable = false) - @NotNull(message = "等级必填") + + /** 会员等级 */ + @NotNull(message = "请输入会员等级") private Integer grade; - // 享受折扣 - @Column(name = "discount",nullable = false) - @NotNull(message = "折扣必填") + + /** 享受折扣 */ + @NotNull(message = "请输入会员折扣") private BigDecimal discount; - // 会员卡背景 - @Column(name = "image",nullable = false) - @NotBlank(message = "请上传背景") + /** 会员卡背景 */ + @NotBlank(message = "请上传会员背景") private String image; - // 会员图标 - @Column(name = "icon",nullable = false) - @NotBlank(message = "请上传图标") + + /** 会员图标 */ + @NotBlank(message = "请上传会员图标") private String icon; - // 说明 - @Column(name = "`explain`",nullable = false) - @NotBlank(message = "请填写说明") + + /** 说明 */ + @TableField(value = "`explain`") private String explain; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; - // 是否删除.1=删除,0=未删除 - @Column(name = "is_del",insertable = false) + + /** 是否删除.1=删除,0=未删除 */ private Integer isDel; + public void copy(YxSystemUserLevel source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java index e01e8839..3a00b7cc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java @@ -1,67 +1,70 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; import java.io.Serializable; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_system_user_task") +@TableName("yx_system_user_task") public class YxSystemUserTask implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; - // 任务名称 - @Column(name = "name",nullable = false) + + /** 任务名称 */ private String name; - // 配置原名 - @Column(name = "real_name",nullable = false) + + /** 配置原名 */ private String realName; - // 任务类型 - @Column(name = "task_type",nullable = false) + + /** 任务类型 */ private String taskType; - // 限定数 - @Column(name = "number",nullable = false) + + /** 限定数 */ private Integer number; - // 等级id - @Column(name = "level_id",nullable = false) + + /** 等级id */ private Integer levelId; - // 排序 - @Column(name = "sort",nullable = false) + + /** 排序 */ private Integer sort; - // 是否显示 - @Column(name = "is_show",nullable = false) + + /** 是否显示 */ private Integer isShow; - // 是否务必达成任务,1务必达成,0=满足其一 - @Column(name = "is_must",nullable = false) + + /** 是否务必达成任务,1务必达成,0=满足其一 */ private Integer isMust; - // 任务说明 - @Column(name = "illustrate",nullable = false) + + /** 任务说明 */ private String illustrate; - // 新增时间 - @Column(name = "add_time",nullable = false) + + /** 新增时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; + public void copy(YxSystemUserTask source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java index 68886f68..e2be7bff 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java @@ -1,153 +1,162 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_user") public class YxUser implements Serializable { - // 用户id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "uid") + /** 用户id */ + @TableId(value = "uid", type = IdType.AUTO) private Integer uid; - // 用户账号 - @Column(name = "account",nullable = false) + + /** 用户账户(跟accout一样) */ + private String username; + + + /** 用户账号 */ private String account; - // 用户密码 - @Column(name = "pwd",nullable = false) + + /** 用户密码(跟pwd) */ + private String password; + + + /** 用户密码 */ private String pwd; - // 真实姓名 - @Column(name = "real_name",nullable = false) + + /** 真实姓名 */ private String realName; - // 生日 - @Column(name = "birthday",nullable = false) + + /** 生日 */ private Integer birthday; - // 身份证号码 - @Column(name = "card_id",nullable = false) + + /** 身份证号码 */ private String cardId; - // 用户备注 - @Column(name = "mark",nullable = false) + + /** 用户备注 */ private String mark; - // 合伙人id - @Column(name = "partner_id",nullable = false) + + /** 合伙人id */ private Integer partnerId; - // 用户分组id - @Column(name = "group_id",nullable = false) + + /** 用户分组id */ private Integer groupId; - // 用户昵称 - @Column(name = "nickname",nullable = false) + + /** 用户昵称 */ private String nickname; - // 用户头像 - @Column(name = "avatar",nullable = false) + + /** 用户头像 */ private String avatar; - // 手机号码 - @Column(name = "phone") + + /** 手机号码 */ private String phone; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; - // 添加ip - @Column(name = "add_ip",nullable = false) + + /** 添加ip */ private String addIp; - // 最后一次登录时间 - @Column(name = "last_time",nullable = false) + + /** 最后一次登录时间 */ private Integer lastTime; - // 最后一次登录ip - @Column(name = "last_ip",nullable = false) + + /** 最后一次登录ip */ private String lastIp; - // 用户余额 - @Column(name = "now_money",nullable = false) + + /** 用户余额 */ private BigDecimal nowMoney; - // 佣金金额 - @Column(name = "brokerage_price",nullable = false) + + /** 佣金金额 */ private BigDecimal brokeragePrice; - // 用户剩余积分 - @Column(name = "integral",nullable = false) + + /** 用户剩余积分 */ private BigDecimal integral; - // 连续签到天数 - @Column(name = "sign_num",nullable = false) + + /** 连续签到天数 */ private Integer signNum; - // 1为正常,0为禁止 - @Column(name = "status",nullable = false) + + /** 1为正常,0为禁止 */ private Integer status; - // 等级 - @Column(name = "level",nullable = false) + + /** 等级 */ private Integer level; - // 推广元id - @Column(name = "spread_uid",nullable = false) + + /** 推广元id */ private Integer spreadUid; - // 推广员关联时间 - @Column(name = "spread_time",nullable = false) + + /** 推广员关联时间 */ private Integer spreadTime; - // 用户类型 - @Column(name = "user_type",nullable = false) + + /** 用户类型 */ private String userType; - // 是否为推广员 - @Column(name = "is_promoter",nullable = false) + + /** 是否为推广员 */ private Integer isPromoter; - // 用户购买次数 - @Column(name = "pay_count") + + /** 用户购买次数 */ private Integer payCount; - // 下级人数 - @Column(name = "spread_count") + + /** 下级人数 */ private Integer spreadCount; - // 清理会员时间 - @Column(name = "clean_time") + + /** 清理会员时间 */ private Integer cleanTime; - // 详细地址 - @Column(name = "addres",nullable = false) + + /** 详细地址 */ private String addres; - // 管理员编号 - @Column(name = "adminid") + + /** 管理员编号 */ private Integer adminid; - // 用户登陆类型,h5,wechat,routine - @Column(name = "login_type",nullable = false) + + /** 用户登陆类型,h5,wechat,routine */ private String loginType; + public void copy(YxUser source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java index b6c79fb6..4c81556b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java @@ -1,75 +1,76 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-06 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_user_bill") +@TableName("yx_user_bill") public class YxUserBill implements Serializable { - // 用户账单id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + /** 用户账单id */ + @TableId private Integer id; - //用户uid - @Column(name = "uid",nullable = false) + + /** 用户uid */ private Integer uid; - - // 关联id - @Column(name = "link_id",nullable = false) + /** 关联id */ private String linkId; - // 0 = 支出 1 = 获得 - @Column(name = "pm",nullable = false) + + /** 0 = 支出 1 = 获得 */ private Integer pm; - // 账单标题 - @Column(name = "title",nullable = false) + + /** 账单标题 */ private String title; - // 明细种类 - @Column(name = "category",nullable = false) + + /** 明细种类 */ private String category; - // 明细类型 - @Column(name = "type",nullable = false) + + /** 明细类型 */ private String type; - // 明细数字 - @Column(name = "number",nullable = false) + + /** 明细数字 */ private BigDecimal number; - // 剩余 - @Column(name = "balance",nullable = false) + + /** 剩余 */ private BigDecimal balance; - // 备注 - @Column(name = "mark",nullable = false) + + /** 备注 */ private String mark; - // 添加时间 - @Column(name = "add_time",nullable = false) + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; - // 0 = 带确定 1 = 有效 -1 = 无效 - @Column(name = "status",nullable = false) + + /** 0 = 带确定 1 = 有效 -1 = 无效 */ private Integer status; + public void copy(YxUserBill source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java index 3de16b39..96e77aca 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java @@ -1,64 +1,67 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import javax.persistence.*; -import javax.validation.constraints.*; import java.math.BigDecimal; import java.io.Serializable; /** * @author hupeng -* @date 2020-03-02 +* @date 2020-05-12 */ -@Entity + @Data -@Table(name="yx_user_recharge") +@TableName("yx_user_recharge") public class YxUserRecharge implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") + @TableId private Integer id; + /** 充值用户UID */ - @Column(name = "uid") private Integer uid; + /** 订单号 */ - @Column(name = "order_id",unique = true) private String orderId; + /** 充值金额 */ - @Column(name = "price") private BigDecimal price; + /** 充值类型 */ - @Column(name = "recharge_type") private String rechargeType; + /** 是否充值 */ - @Column(name = "paid") private Integer paid; + /** 充值支付时间 */ - @Column(name = "pay_time") private Integer payTime; + /** 充值时间 */ - @Column(name = "add_time") + @TableField(fill= FieldFill.INSERT) private Integer addTime; + /** 退款金额 */ - @Column(name = "refund_price") private BigDecimal refundPrice; + /** 昵称 */ - @Column(name = "nickname") private String nickname; + public void copy(YxUserRecharge source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxWechatUser.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxWechatUser.java index 0be5a22b..2a98fa98 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxWechatUser.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxWechatUser.java @@ -1,121 +1,124 @@ -package co.yixiang.modules.shop.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.domain; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import lombok.Data; - -import javax.persistence.*; -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; /** * @author hupeng -* @date 2019-12-13 +* @date 2020-05-12 */ -@Entity @Data -@Table(name="yx_wechat_user") public class YxWechatUser implements Serializable { - // 微信用户id - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "uid") + /** 微信用户id */ + @TableId private Integer uid; - // 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段 - @Column(name = "unionid") + + /** 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段 */ private String unionid; - // 用户的标识,对当前公众号唯一 - @Column(name = "openid") + + /** 用户的标识,对当前公众号唯一 */ private String openid; - // 小程序唯一身份ID - @Column(name = "routine_openid") + + /** 小程序唯一身份ID */ private String routineOpenid; - // 用户的昵称 - @Column(name = "nickname",nullable = false) + + /** 用户的昵称 */ private String nickname; - // 用户头像 - @Column(name = "headimgurl",nullable = false) + + /** 用户头像 */ private String headimgurl; - // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知 - @Column(name = "sex",nullable = false) + + /** 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知 */ private Integer sex; - // 用户所在城市 - @Column(name = "city",nullable = false) + + /** 用户所在城市 */ private String city; - // 用户的语言,简体中文为zh_CN - @Column(name = "language",nullable = false) + + /** 用户的语言,简体中文为zh_CN */ private String language; - // 用户所在省份 - @Column(name = "province",nullable = false) + + /** 用户所在省份 */ private String province; - // 用户所在国家 - @Column(name = "country",nullable = false) + + /** 用户所在国家 */ private String country; - // 公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注 - @Column(name = "remark") + + /** 公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注 */ private String remark; - // 用户所在的分组ID(兼容旧的用户分组接口) - @Column(name = "groupid") + + /** 用户所在的分组ID(兼容旧的用户分组接口) */ private Integer groupid; - // 用户被打上的标签ID列表 - @Column(name = "tagid_list") + + /** 用户被打上的标签ID列表 */ private String tagidList; - // 用户是否订阅该公众号标识 - @Column(name = "subscribe") + + /** 用户是否订阅该公众号标识 */ private Integer subscribe; - // 关注公众号时间 - @Column(name = "subscribe_time") + + /** 关注公众号时间 */ private Integer subscribeTime; - // 添加时间 - @Column(name = "add_time") + + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) private Integer addTime; - // 一级推荐人 - @Column(name = "stair") + + /** 一级推荐人 */ private Integer stair; - // 二级推荐人 - @Column(name = "second") + + /** 二级推荐人 */ private Integer second; - // 一级推荐人订单 - @Column(name = "order_stair") + + /** 一级推荐人订单 */ private Integer orderStair; - // 二级推荐人订单 - @Column(name = "order_second") + + /** 二级推荐人订单 */ private Integer orderSecond; - // 佣金 - @Column(name = "now_money") + + /** 佣金 */ private BigDecimal nowMoney; - // 小程序用户会话密匙 - @Column(name = "session_key") + + /** 小程序用户会话密匙 */ private String sessionKey; - // 用户类型 - @Column(name = "user_type") + + /** 用户类型 */ private String userType; + public void copy(YxWechatUser source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxExpressRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxExpressRepository.java deleted file mode 100644 index 790ce6f4..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxExpressRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxExpress; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-12-12 -*/ -public interface YxExpressRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * findByCode - * @param code - * @return - */ - YxExpress findByCode(String code); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialGroupRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialGroupRepository.java deleted file mode 100644 index 63bfae82..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialGroupRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxMaterialGroup; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2020-01-09 -*/ -public interface YxMaterialGroupRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialRepository.java deleted file mode 100644 index aa661856..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxMaterialRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxMaterial; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2020-01-09 -*/ -public interface YxMaterialRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCartRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCartRepository.java deleted file mode 100644 index fe154ab1..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCartRepository.java +++ /dev/null @@ -1,21 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreCart; -import co.yixiang.modules.shop.service.dto.CountDto; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; -import java.util.List; - -/** - * @author xwb - * @date 2020-04-02 - */ -public interface YxStoreCartRepository extends JpaRepository, JpaSpecificationExecutor { - - @Query(value ="SELECT t.cate_name as catename from yx_store_cart c " + - "LEFT JOIN yx_store_product p on c.product_id = p.id " + - "LEFT JOIN yx_store_category t on p.cate_id = t.id " + - "WHERE c.is_pay = 1",nativeQuery = true) - List findCateName(); -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCategoryRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCategoryRepository.java deleted file mode 100644 index f68317aa..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreCategoryRepository.java +++ /dev/null @@ -1,23 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreCategory; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; - -/** -* @author hupeng -* @date 2019-10-03 -*/ -public interface YxStoreCategoryRepository extends JpaRepository, JpaSpecificationExecutor { - @Query(value = "select cate_name from yx_store_category where id = ?1",nativeQuery = true) - String findNameById(Integer id); - - @Modifying - @Query("update YxStoreCategory s set s.isDel = 1 where s.id =:id") - void delCategory(Integer id); - - YxStoreCategory findByPid(Integer pid); - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderCartInfoRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderCartInfoRepository.java deleted file mode 100644 index 5c4bd8f8..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderCartInfoRepository.java +++ /dev/null @@ -1,17 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.StoreOrderCartInfo; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -import java.util.List; - -/** -* @author hupeng -* @date 2019-10-14 -*/ -public interface YxStoreOrderCartInfoRepository extends JpaRepository, JpaSpecificationExecutor { - - List findByOid(int oid); - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderRepository.java deleted file mode 100644 index f351a4a0..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderRepository.java +++ /dev/null @@ -1,59 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreOrder; -import co.yixiang.modules.shop.service.dto.ChartDataDTO; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; - -import java.util.List; - -/** -* @author hupeng -* @date 2019-10-14 -*/ -public interface YxStoreOrderRepository extends JpaRepository, JpaSpecificationExecutor { - - - //今天 //上周 //本月 - int countByPayTimeGreaterThanEqual(int time); - - //昨天 - int countByPayTimeLessThanAndPayTimeGreaterThanEqual(int timeO, int timeT); - - @Query(value = "select IFNULL(sum(pay_price),0) from yx_store_order " + - "where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1",nativeQuery = true) - double sumPrice(Integer time); - - @Query(value = "select IFNULL(sum(pay_price),0) from yx_store_order " + - "where refund_status=0 and is_del=0 and paid=1",nativeQuery = true) - double sumTotalPrice(); - - @Query(value = "select IFNULL(sum(pay_price),0) from yx_store_order " + - "where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1 and pay_time < ?2",nativeQuery = true) - double sumTPrice(Integer timeO, Integer timeT); - - @Query(value = "SELECT IFNULL(sum(pay_price),0) as num," + - "FROM_UNIXTIME(add_time, '%m-%d') as time " + - " FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1" + - " GROUP BY FROM_UNIXTIME(add_time,'%Y-%m-%d') " + - " ORDER BY add_time ASC",nativeQuery = true) - List chartList(Integer time); - - @Query(value = "SELECT count(id) as num," + - "FROM_UNIXTIME(add_time, '%m-%d') as time " + - " FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= ?1" + - " GROUP BY FROM_UNIXTIME(add_time,'%Y-%m-%d') " + - " ORDER BY add_time ASC",nativeQuery = true) - List chartListT(Integer time); - - - /** - * findByUnique - * @param unique - * @return - */ - YxStoreOrder findByUnique(String unique); - - List findByOrderIdIn(List ids); -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderStatusRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderStatusRepository.java deleted file mode 100644 index 0b49b039..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreOrderStatusRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-02 -*/ -public interface YxStoreOrderStatusRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrRepository.java deleted file mode 100644 index bf1b5694..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreProductAttr; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; - -/** -* @author hupeng -* @date 2019-10-13 -*/ -public interface YxStoreProductAttrRepository extends JpaRepository, JpaSpecificationExecutor { - //@Modifying - //@Query(value = "delete from yx_store_product_attr where product_id =?1",nativeQuery = true) - void deleteByProductId(int id); - - - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrResultRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrResultRepository.java deleted file mode 100644 index da334e7b..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrResultRepository.java +++ /dev/null @@ -1,21 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-13 -*/ -public interface YxStoreProductAttrResultRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * findByProductId - * @param product_id - * @return - */ - YxStoreProductAttrResult findByProductId(Integer product_id); - - void deleteByProductId(Integer product_id); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrValueRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrValueRepository.java deleted file mode 100644 index d1bfd89f..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductAttrValueRepository.java +++ /dev/null @@ -1,21 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; - -/** -* @author hupeng -* @date 2019-10-13 -*/ -public interface YxStoreProductAttrValueRepository extends JpaRepository, JpaSpecificationExecutor { - - //@Modifying - // @Query(value = "delete from yx_store_product_attr_value where product_id =?1",nativeQuery = true) - void deleteByProductId(Integer id); - - @Query(value = "select sum(stock) from yx_store_product_attr_value " + - "where product_id = ?1",nativeQuery = true) - Integer sumStock(Integer productId); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductReplyRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductReplyRepository.java deleted file mode 100644 index 5767dd82..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductReplyRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreProductReply; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-11-03 -*/ -public interface YxStoreProductReplyRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductRepository.java deleted file mode 100644 index 596e027d..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxStoreProductRepository.java +++ /dev/null @@ -1,26 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxStoreCategory; -import co.yixiang.modules.shop.domain.YxStoreProduct; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; - -import java.util.List; - -/** -* @author hupeng -* @date 2019-10-04 -*/ -public interface YxStoreProductRepository extends JpaRepository, JpaSpecificationExecutor { - @Modifying - @Query(value = "update yx_store_product set is_show = ?1 where id = ?2",nativeQuery = true) - void updateOnsale(int status, int id); - - @Modifying - @Query(value = "update yx_store_product set is_del = ?1 where id = ?2",nativeQuery = true) - void updateDel(int status, int id); - - List findByStoreCategoryAndIsDel(YxStoreCategory storeCategory,int isDel); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemConfigRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemConfigRepository.java deleted file mode 100644 index fa0ea74f..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemConfigRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemConfig; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-10 -*/ -public interface YxSystemConfigRepository extends JpaRepository, JpaSpecificationExecutor { - YxSystemConfig findByMenuName(String str); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemGroupDataRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemGroupDataRepository.java deleted file mode 100644 index 86144a06..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemGroupDataRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemGroupData; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-10-18 -*/ -public interface YxSystemGroupDataRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreRepository.java deleted file mode 100644 index 609bf8dc..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemStore; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2020-03-03 -*/ -public interface YxSystemStoreRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreStaffRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreStaffRepository.java deleted file mode 100644 index 6482a3cb..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemStoreStaffRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemStoreStaff; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2020-03-22 -*/ -public interface YxSystemStoreStaffRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserLevelRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserLevelRepository.java deleted file mode 100644 index d79b81d3..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserLevelRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-12-04 -*/ -public interface YxSystemUserLevelRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserTaskRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserTaskRepository.java deleted file mode 100644 index ea128cb2..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxSystemUserTaskRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxSystemUserTask; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-12-04 -*/ -public interface YxSystemUserTaskRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserBillRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserBillRepository.java deleted file mode 100644 index c2cb7850..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserBillRepository.java +++ /dev/null @@ -1,28 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxUserBill; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; - -import java.util.Map; - -/** -* @author hupeng -* @date 2019-11-06 -*/ -public interface YxUserBillRepository extends JpaRepository, JpaSpecificationExecutor { - @Query(nativeQuery = true, - value = "select b.title,b.pm,b.category,b.type,b.number,b.add_time as addTime," + - "u.nickname from yx_user_bill b left join yx_user u on u.uid=b.uid " + - " where if(?1 !='',b.category=?1,1=1) and if(?2 !='',b.type=?2,1=1) " + - "and if(?3 !='',u.nickname LIKE CONCAT('%',?3,'%'),1=1) order by b.id desc", - countQuery = "select count(*) from yx_user_bill b left join yx_user u on u.uid=b.uid" + - " where if(?1 !='',b.category=?1,1=1) and if(?2 !='',b.type=?2,1=1) " + - "and if(?3 !='',u.nickname LIKE CONCAT('%',?3,'%'),1=1)") - Page findAllByPageable(String category, String type, String nickname, - Pageable pageable); - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRechargeRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRechargeRepository.java deleted file mode 100644 index f267c33b..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRechargeRepository.java +++ /dev/null @@ -1,18 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxUserRecharge; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2020-03-02 -*/ -public interface YxUserRechargeRepository extends JpaRepository, JpaSpecificationExecutor { - /** - * 根据 OrderId 查询 - * @param order_id / - * @return / - */ - YxUserRecharge findByOrderId(String order_id); -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRepository.java deleted file mode 100644 index fd748747..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxUserRepository.java +++ /dev/null @@ -1,30 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxUser; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; - -/** -* @author hupeng -* @date 2019-10-06 -*/ -public interface YxUserRepository extends JpaRepository, JpaSpecificationExecutor { - - @Modifying - @Query(value = "update yx_user set status = ?1 where uid = ?2",nativeQuery = true) - void updateOnstatus(int status, int id); - - @Modifying - @Query(value = "update yx_user set now_money = now_money + ?1 where uid = ?2",nativeQuery = true) - void updateMoney(double money, int id); - - @Modifying - @Query(value = "update yx_user set brokerage_price = brokerage_price+?1 where uid = ?2",nativeQuery = true) - void incBrokeragePrice(double price, int id); - - - - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxWechatUserRepository.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxWechatUserRepository.java deleted file mode 100644 index 48617120..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/repository/YxWechatUserRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.shop.repository; - -import co.yixiang.modules.shop.domain.YxWechatUser; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author hupeng -* @date 2019-12-13 -*/ -public interface YxWechatUserRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/ExpressController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/ExpressController.java index bf955c37..c022a8cd 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/ExpressController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/ExpressController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxExpress; import co.yixiang.modules.shop.service.YxExpressService; import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria; @@ -45,7 +48,7 @@ public class ExpressController { @PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_CREATE')") public ResponseEntity create(@Validated @RequestBody YxExpress resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - return new ResponseEntity(yxExpressService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxExpressService.save(resources),HttpStatus.CREATED); } @Log("修改快递") @@ -54,7 +57,7 @@ public class ExpressController { @PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_EDIT')") public ResponseEntity update(@Validated @RequestBody YxExpress resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxExpressService.update(resources); + yxExpressService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -64,7 +67,7 @@ public class ExpressController { @PreAuthorize("@el.check('admin','YXEXPRESS_ALL','YXEXPRESS_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxExpressService.delete(id); + yxExpressService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialController.java index 0187d7ea..3e39cb92 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialController.java @@ -1,7 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxMaterial; import co.yixiang.modules.shop.service.YxMaterialService; import co.yixiang.modules.shop.service.dto.YxMaterialQueryCriteria; @@ -43,14 +48,14 @@ public class MaterialController { @ApiOperation("新增素材管理") public ResponseEntity create(@Validated @RequestBody YxMaterial resources){ resources.setCreateId(SecurityUtils.getUsername()); - return new ResponseEntity<>(yxMaterialService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(yxMaterialService.save(resources),HttpStatus.CREATED); } @PutMapping @Log("修改素材管理") @ApiOperation("修改素材管理") public ResponseEntity update(@Validated @RequestBody YxMaterial resources){ - yxMaterialService.update(resources); + yxMaterialService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -58,9 +63,9 @@ public class MaterialController { @ApiOperation("删除素材管理") @DeleteMapping(value = "/{id}") public ResponseEntity deleteAll(@PathVariable String id) { - yxMaterialService.deleteById(id); + yxMaterialService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialGroupController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialGroupController.java index 521c59a7..2f68ec88 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialGroupController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MaterialGroupController.java @@ -1,6 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxMaterialGroup; import co.yixiang.modules.shop.service.YxMaterialGroupService; import co.yixiang.modules.shop.service.dto.YxMaterialGroupQueryCriteria; @@ -40,14 +45,14 @@ public class MaterialGroupController { @Log("新增素材分组") @ApiOperation("新增素材分组") public ResponseEntity create(@Validated @RequestBody YxMaterialGroup resources){ - return new ResponseEntity<>(yxMaterialGroupService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(yxMaterialGroupService.save(resources),HttpStatus.CREATED); } @PutMapping @Log("修改素材分组") @ApiOperation("修改素材分组") public ResponseEntity update(@Validated @RequestBody YxMaterialGroup resources){ - yxMaterialGroupService.update(resources); + yxMaterialGroupService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -55,7 +60,7 @@ public class MaterialGroupController { @ApiOperation("删除素材分组") @DeleteMapping(value = "/{id}") public ResponseEntity deleteAll(@PathVariable String id) { - yxMaterialGroupService.deleteById(id); + yxMaterialGroupService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java index 3bec5abe..d2e35de9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java @@ -1,13 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxUser; import co.yixiang.modules.shop.service.YxSystemConfigService; import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.UserMoneyDTO; +import co.yixiang.modules.shop.service.dto.UserMoneyDto; import co.yixiang.modules.shop.service.dto.YxUserQueryCriteria; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -59,7 +62,7 @@ public class MemberController { @PostMapping(value = "/yxUser") @PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_CREATE')") public ResponseEntity create(@Validated @RequestBody YxUser resources){ - return new ResponseEntity(yxUserService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxUserService.save(resources),HttpStatus.CREATED); } @Log("修改用户") @@ -67,7 +70,7 @@ public class MemberController { @PutMapping(value = "/yxUser") @PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_EDIT')") public ResponseEntity update(@Validated @RequestBody YxUser resources){ - yxUserService.update(resources); + yxUserService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -77,7 +80,7 @@ public class MemberController { @PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_DELETE')") public ResponseEntity delete(@PathVariable Integer uid){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxUserService.delete(uid); + yxUserService.removeById(uid); return new ResponseEntity(HttpStatus.OK); } @@ -94,9 +97,9 @@ public class MemberController { @ApiOperation(value = "修改余额") @PostMapping(value = "/yxUser/money") @PreAuthorize("@el.check('admin','YXUSER_ALL','YXUSER_EDIT')") - public ResponseEntity updatePrice(@Validated @RequestBody UserMoneyDTO param){ + public ResponseEntity updatePrice(@Validated @RequestBody UserMoneyDto param){ yxUserService.updateMoney(param); return new ResponseEntity(HttpStatus.NO_CONTENT); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java index 5137f19e..9d70b3a0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java @@ -1,11 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxStoreCategory; import co.yixiang.modules.shop.service.YxStoreCategoryService; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryDTO; +import co.yixiang.modules.shop.service.dto.YxStoreCategoryDto; import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria; import co.yixiang.utils.OrderUtil; import io.swagger.annotations.Api; @@ -53,7 +58,7 @@ public class StoreCategoryController { @PreAuthorize("@el.check('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_SELECT')") public ResponseEntity getYxStoreCategorys(YxStoreCategoryQueryCriteria criteria, Pageable pageable){ - List categoryDTOList = yxStoreCategoryService.queryAll(criteria); + List categoryDTOList = yxStoreCategoryService.queryAll(criteria); return new ResponseEntity(yxStoreCategoryService.buildTree(categoryDTOList),HttpStatus.OK); } @@ -68,7 +73,7 @@ public class StoreCategoryController { } resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxStoreCategoryService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreCategoryService.save(resources),HttpStatus.CREATED); } @Log("修改商品分类") @@ -80,7 +85,7 @@ public class StoreCategoryController { if(resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) { throw new BadRequestException("子分类图片必传"); } - yxStoreCategoryService.update(resources); + yxStoreCategoryService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -92,8 +97,8 @@ public class StoreCategoryController { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); String[] ids = id.split(","); for (String newId: ids) { - yxStoreCategoryService.delete(Integer.valueOf(newId)); + yxStoreCategoryService.removeById(Integer.valueOf(newId)); } return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java index e40bbfa0..53cf43ff 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.IdUtil; @@ -5,26 +10,26 @@ import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.enums.OrderInfoEnum; import co.yixiang.exception.BadRequestException; -import co.yixiang.express.ExpressService; -import co.yixiang.express.dao.ExpressInfo; +import co.yixiang.tools.express.ExpressService; +import co.yixiang.tools.express.dao.ExpressInfo; import co.yixiang.modules.activity.service.YxStorePinkService; -import co.yixiang.modules.activity.service.dto.YxStorePinkDTO; import co.yixiang.modules.shop.domain.YxStoreOrder; import co.yixiang.modules.shop.domain.YxStoreOrderStatus; +import co.yixiang.modules.shop.domain.YxWechatUser; import co.yixiang.modules.shop.service.*; import co.yixiang.modules.shop.service.dto.*; import co.yixiang.modules.shop.service.param.ExpressParam; -import co.yixiang.mp.service.WxMpTemplateMessageService; import co.yixiang.mp.service.YxTemplateService; -import co.yixiang.mp.service.YxWechatTemplateService; import co.yixiang.utils.OrderUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -41,10 +46,7 @@ import org.springframework.web.client.RestTemplate; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.text.MessageFormat; import java.text.ParseException; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -62,29 +64,28 @@ public class StoreOrderController { @Value("${yshop.apiUrl}") private String apiUrl; - + private final IGenerator generator; private final YxStoreOrderService yxStoreOrderService; private final YxStoreOrderStatusService yxStoreOrderStatusService; private final YxExpressService yxExpressService; private final YxWechatUserService wechatUserService; private final RedisTemplate redisTemplate; private final YxTemplateService templateService; - private final YxStorePinkService storePinkService; private final ExpressService expressService; - public StoreOrderController(YxStoreOrderService yxStoreOrderService, YxStoreOrderStatusService yxStoreOrderStatusService, + public StoreOrderController(IGenerator generator, YxStoreOrderService yxStoreOrderService, YxStoreOrderStatusService yxStoreOrderStatusService, YxExpressService yxExpressService, YxWechatUserService wechatUserService, RedisTemplate redisTemplate, - YxTemplateService templateService,YxStorePinkService storePinkService, + YxTemplateService templateService, YxStorePinkService storePinkService, ExpressService expressService) { + this.generator = generator; this.yxStoreOrderService = yxStoreOrderService; this.yxStoreOrderStatusService = yxStoreOrderStatusService; this.yxExpressService = yxExpressService; this.wechatUserService = wechatUserService; this.redisTemplate = redisTemplate; this.templateService = templateService; - this.storePinkService = storePinkService; this.expressService = expressService; } @@ -203,8 +204,8 @@ public class StoreOrderController { public ResponseEntity update(@Validated @RequestBody YxStoreOrder resources) { if (StrUtil.isBlank(resources.getDeliveryName())) throw new BadRequestException("请选择快递公司"); if (StrUtil.isBlank(resources.getDeliveryId())) throw new BadRequestException("快递单号不能为空"); - YxExpressDTO expressDTO = yxExpressService.findById(Integer.valueOf(resources - .getDeliveryName())); + YxExpressDto expressDTO = generator.convert(yxExpressService.getById(Integer.valueOf(resources + .getDeliveryName())),YxExpressDto.class); if (ObjectUtil.isNull(expressDTO)) { throw new BadRequestException("请先添加快递公司"); } @@ -222,11 +223,11 @@ public class StoreOrderController { + " 快递单号:" + resources.getDeliveryId()); storeOrderStatus.setChangeTime(OrderUtil.getSecondTimestampTwo()); - yxStoreOrderStatusService.create(storeOrderStatus); + yxStoreOrderStatusService.save(storeOrderStatus); //模板消息通知 try { - YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid()); + YxWechatUserDto wechatUser = generator.convert(wechatUserService.getOne(new QueryWrapper().eq("uid",resources.getUid())),YxWechatUserDto.class); if (ObjectUtil.isNotNull(wechatUser)) { //公众号与小程序打通统一公众号模板通知 if (StrUtil.isNotBlank(wechatUser.getOpenid())) { @@ -253,7 +254,7 @@ public class StoreOrderController { @PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") public ResponseEntity check(@Validated @RequestBody YxStoreOrder resources) { if (StrUtil.isBlank(resources.getVerifyCode())) throw new BadRequestException("核销码不能为空"); - YxStoreOrderDTO storeOrderDTO = yxStoreOrderService.findById(resources.getId()); + YxStoreOrderDto storeOrderDTO = generator.convert(yxStoreOrderService.getById(resources.getId()),YxStoreOrderDto.class); if(!resources.getVerifyCode().equals(storeOrderDTO.getVerifyCode())){ throw new BadRequestException("核销码不对"); } @@ -277,6 +278,7 @@ public class StoreOrderController { String url = StrUtil.format(apiUrl+"/order/admin/order_verific/{}", resources.getVerifyCode()); String text = rest.getForObject(url, String.class); + JSONObject jsonObject = JSON.parseObject(text); Integer status = jsonObject.getInteger("status"); @@ -297,7 +299,7 @@ public class StoreOrderController { //模板消息通知 try { - YxWechatUserDTO wechatUser = wechatUserService.findById(resources.getUid()); + YxWechatUserDto wechatUser = generator.convert(wechatUserService.getOne(new QueryWrapper().eq("uid",resources.getUid())),YxWechatUserDto.class); if (ObjectUtil.isNotNull(wechatUser)) { //公众号与小程序打通统一公众号模板通知 if (StrUtil.isNotBlank(wechatUser.getOpenid())) { @@ -321,7 +323,7 @@ public class StoreOrderController { @PreAuthorize("@el.check('admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE')") public ResponseEntity delete(@PathVariable Integer id) { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxStoreOrderService.delete(id); + yxStoreOrderService.removeById(id); return new ResponseEntity(HttpStatus.OK); } @@ -334,7 +336,7 @@ public class StoreOrderController { if (ObjectUtil.isNull(resources.getPayPrice())) throw new BadRequestException("请输入支付金额"); if (resources.getPayPrice().doubleValue() < 0) throw new BadRequestException("金额不能低于0"); - YxStoreOrderDTO storeOrder = yxStoreOrderService.findById(resources.getId()); + YxStoreOrderDto storeOrder = generator.convert(yxStoreOrderService.getById(resources.getId()),YxStoreOrderDto.class); //判断金额是否有变动,生成一个额外订单号去支付 int res = NumberUtil.compare(storeOrder.getPayPrice().doubleValue(), resources.getPayPrice().doubleValue()); @@ -344,7 +346,7 @@ public class StoreOrderController { } - yxStoreOrderService.update(resources); + yxStoreOrderService.saveOrUpdate(resources); YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); storeOrderStatus.setOid(resources.getId()); @@ -352,7 +354,7 @@ public class StoreOrderController { storeOrderStatus.setChangeMessage("修改订单价格为:" + resources.getPayPrice()); storeOrderStatus.setChangeTime(OrderUtil.getSecondTimestampTwo()); - yxStoreOrderStatusService.create(storeOrderStatus); + yxStoreOrderStatusService.save(storeOrderStatus); return new ResponseEntity(HttpStatus.OK); } @@ -362,7 +364,7 @@ public class StoreOrderController { @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") public ResponseEntity editOrderRemark(@RequestBody YxStoreOrder resources) { if (StrUtil.isBlank(resources.getRemark())) throw new BadRequestException("请输入备注"); - yxStoreOrderService.update(resources); + yxStoreOrderService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.OK); } @@ -389,7 +391,7 @@ public class StoreOrderController { @RequestParam(name = "orderStatus") String orderStatus, @RequestParam(name = "orderType") String orderType, @RequestParam(name = "listContent") String listContent) throws IOException, ParseException { - List list; + List list; if(StringUtils.isEmpty(listContent)){ list = (List)getYxStoreList(criteria, pageable, orderStatus, orderType).get("content"); }else { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductController.java index 5e2e5bc1..d3ad2206 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductController.java @@ -1,10 +1,14 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.constant.ShopConstants; -import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxStoreProduct; import co.yixiang.modules.shop.service.YxStoreProductService; import co.yixiang.modules.shop.service.dto.YxStoreProductQueryCriteria; @@ -56,7 +60,7 @@ public class StoreProductController { resources.setAddTime(OrderUtil.getSecondTimestampTwo()); if(ObjectUtil.isEmpty(resources.getGiveIntegral())) resources.setGiveIntegral(BigDecimal.ZERO); if(ObjectUtil.isEmpty(resources.getCost())) resources.setCost(BigDecimal.ZERO); - return new ResponseEntity(yxStoreProductService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxStoreProductService.saveProduct(resources),HttpStatus.CREATED); } @Log("修改商品") @@ -66,7 +70,7 @@ public class StoreProductController { @PreAuthorize("@el.check('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT')") public ResponseEntity update(@Validated @RequestBody YxStoreProduct resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxStoreProductService.update(resources); + yxStoreProductService.updateProduct(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -136,4 +140,4 @@ public class StoreProductController { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java index e767cd85..7b579b80 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxStoreProductReply; import co.yixiang.modules.shop.service.YxStoreProductReplyService; import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria; @@ -47,7 +50,7 @@ public class StoreProductReplyController { @PutMapping(value = "/yxStoreProductReply") @PreAuthorize("@el.check('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_EDIT')") public ResponseEntity update(@Validated @RequestBody YxStoreProductReply resources){ - yxStoreProductReplyService.update(resources); + yxStoreProductReplyService.save(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -60,7 +63,7 @@ public class StoreProductReplyController { YxStoreProductReply reply = new YxStoreProductReply(); reply.setIsDel(1); reply.setId(id); - yxStoreProductReplyService.update(reply); + yxStoreProductReplyService.saveOrUpdate(reply); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemConfigController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemConfigController.java index c7ee7854..386d40ba 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemConfigController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemConfigController.java @@ -1,11 +1,14 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.constant.ShopConstants; import co.yixiang.enums.RedisKeyEnum; -import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxSystemConfig; import co.yixiang.modules.shop.service.YxSystemConfigService; import co.yixiang.modules.shop.service.dto.YxSystemConfigQueryCriteria; @@ -14,6 +17,8 @@ import co.yixiang.mp.config.WxPayConfiguration; import co.yixiang.utils.RedisUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cache.annotation.CacheEvict; @@ -56,7 +61,8 @@ public class SystemConfigController { JSONObject jsonObject = JSON.parseObject(jsonStr); jsonObject.forEach( (key,value)->{ - YxSystemConfig yxSystemConfig = yxSystemConfigService.findByKey(key); + YxSystemConfig yxSystemConfig = yxSystemConfigService.getOne(new LambdaQueryWrapper() + .eq(YxSystemConfig::getMenuName,key)); YxSystemConfig yxSystemConfigModel = new YxSystemConfig(); yxSystemConfigModel.setMenuName(key); yxSystemConfigModel.setValue(value.toString()); @@ -70,10 +76,10 @@ public class SystemConfigController { } RedisUtil.set(key,value.toString(),0); if(ObjectUtil.isNull(yxSystemConfig)){ - yxSystemConfigService.create(yxSystemConfigModel); + yxSystemConfigService.save(yxSystemConfigModel); }else{ yxSystemConfigModel.setId(yxSystemConfig.getId()); - yxSystemConfigService.update(yxSystemConfigModel); + yxSystemConfigService.saveOrUpdate(yxSystemConfigModel); } } ); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemGroupDataController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemGroupDataController.java index 391c79ed..54a2dee0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemGroupDataController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemGroupDataController.java @@ -1,8 +1,13 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.constant.ShopConstants; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxSystemGroupData; @@ -13,7 +18,6 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheEvict; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -93,7 +97,7 @@ public class SystemGroupDataController { yxSystemGroupData.setSort(jsonObject.getInteger("sort")); yxSystemGroupData.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxSystemGroupDataService.create(yxSystemGroupData),HttpStatus.CREATED); + return new ResponseEntity(yxSystemGroupDataService.save(yxSystemGroupData),HttpStatus.CREATED); } @Log("修改数据配置") @@ -141,7 +145,7 @@ public class SystemGroupDataController { yxSystemGroupData.setId(Integer.valueOf(jsonObject.get("id").toString())); - yxSystemGroupDataService.update(yxSystemGroupData); + yxSystemGroupDataService.saveOrUpdate(yxSystemGroupData); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -151,7 +155,7 @@ public class SystemGroupDataController { @PreAuthorize("@el.check('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemGroupDataService.delete(id); + yxSystemGroupDataService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java index ac017bb7..652aa15e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreController.java @@ -1,13 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.enums.RedisKeyEnum; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.service.YxSystemStoreService; +import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreQueryCriteria; import co.yixiang.utils.OrderUtil; import co.yixiang.utils.RedisUtil; @@ -24,6 +31,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; /** * @author hupeng @@ -35,9 +44,10 @@ import java.io.IOException; public class SystemStoreController { private final YxSystemStoreService yxSystemStoreService; - - public SystemStoreController(YxSystemStoreService yxSystemStoreService) { + private final IGenerator generator; + public SystemStoreController(YxSystemStoreService yxSystemStoreService, IGenerator generator) { this.yxSystemStoreService = yxSystemStoreService; + this.generator = generator; } @@ -54,7 +64,7 @@ public class SystemStoreController { @GetMapping(value = "/download") @PreAuthorize("@el.check('yxSystemStore:list')") public void download(HttpServletResponse response, YxSystemStoreQueryCriteria criteria) throws IOException { - yxSystemStoreService.download(yxSystemStoreService.queryAll(criteria), response); + yxSystemStoreService.download(generator.convert(yxSystemStoreService.queryAll(criteria), YxSystemStoreDto.class), response); } @GetMapping @@ -86,7 +96,7 @@ public class SystemStoreController { public ResponseEntity create(@Validated @RequestBody YxSystemStore resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity<>(yxSystemStoreService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(yxSystemStoreService.save(resources),HttpStatus.CREATED); } @PutMapping @@ -95,7 +105,7 @@ public class SystemStoreController { @PreAuthorize("@el.check('yxSystemStore:edit')") public ResponseEntity update(@Validated @RequestBody YxSystemStore resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemStoreService.update(resources); + yxSystemStoreService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -105,7 +115,7 @@ public class SystemStoreController { @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] ids) { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemStoreService.deleteAll(ids); + yxSystemStoreService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreStaffController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreStaffController.java index 5a7ab5a5..4c82d045 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreStaffController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemStoreStaffController.java @@ -1,11 +1,19 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.domain.YxSystemStoreStaff; +import co.yixiang.modules.shop.service.YxSystemStoreService; import co.yixiang.modules.shop.service.YxSystemStoreStaffService; +import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffQueryCriteria; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -17,6 +25,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; /** * @author hupeng @@ -28,9 +38,14 @@ import java.io.IOException; public class SystemStoreStaffController { private final YxSystemStoreStaffService yxSystemStoreStaffService; + private final YxSystemStoreService yxSystemStoreService; - public SystemStoreStaffController(YxSystemStoreStaffService yxSystemStoreStaffService) { + private final IGenerator generator; + + public SystemStoreStaffController(YxSystemStoreService yxSystemStoreService,YxSystemStoreStaffService yxSystemStoreStaffService, IGenerator generator) { + this.yxSystemStoreService = yxSystemStoreService; this.yxSystemStoreStaffService = yxSystemStoreStaffService; + this.generator = generator; } @Log("导出数据") @@ -38,7 +53,7 @@ public class SystemStoreStaffController { @GetMapping(value = "/download") @PreAuthorize("@el.check('yxSystemStoreStaff:list')") public void download(HttpServletResponse response, YxSystemStoreStaffQueryCriteria criteria) throws IOException { - yxSystemStoreStaffService.download(yxSystemStoreStaffService.queryAll(criteria), response); + yxSystemStoreStaffService.download(generator.convert(yxSystemStoreStaffService.queryAll(criteria), YxSystemStoreStaffDto.class), response); } @GetMapping @@ -54,7 +69,10 @@ public class SystemStoreStaffController { @ApiOperation("新增门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:add')") public ResponseEntity create(@Validated @RequestBody YxSystemStoreStaff resources){ - return new ResponseEntity<>(yxSystemStoreStaffService.create(resources),HttpStatus.CREATED); + YxSystemStore systemStore = yxSystemStoreService.getOne(Wrappers.lambdaQuery() + .eq(YxSystemStore::getId,resources.getStoreId())); + resources.setStoreName(systemStore.getName()); + return new ResponseEntity<>(yxSystemStoreStaffService.save(resources),HttpStatus.CREATED); } @PutMapping @@ -62,7 +80,10 @@ public class SystemStoreStaffController { @ApiOperation("修改门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:edit')") public ResponseEntity update(@Validated @RequestBody YxSystemStoreStaff resources){ - yxSystemStoreStaffService.update(resources); + YxSystemStore systemStore = yxSystemStoreService.getOne(Wrappers.lambdaQuery() + .eq(YxSystemStore::getId,resources.getStoreId())); + resources.setStoreName(systemStore.getName()); + yxSystemStoreStaffService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -72,7 +93,7 @@ public class SystemStoreStaffController { @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] ids) { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemStoreStaffService.deleteAll(ids); + yxSystemStoreStaffService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java index e0bd7d35..610a57c2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxSystemUserLevel; import co.yixiang.modules.shop.service.YxSystemUserLevelService; import co.yixiang.modules.shop.service.dto.YxSystemUserLevelQueryCriteria; @@ -46,7 +49,7 @@ public class SystemUserLevelController { public ResponseEntity create(@Validated @RequestBody YxSystemUserLevel resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return new ResponseEntity(yxSystemUserLevelService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxSystemUserLevelService.save(resources),HttpStatus.CREATED); } @Log("修改") @@ -55,7 +58,7 @@ public class SystemUserLevelController { @PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_EDIT')") public ResponseEntity update(@Validated @RequestBody YxSystemUserLevel resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemUserLevelService.update(resources); + yxSystemUserLevelService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -65,7 +68,7 @@ public class SystemUserLevelController { @PreAuthorize("@el.check('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemUserLevelService.delete(id); + yxSystemUserLevelService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java index 7e7c7d00..f148c5a1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java @@ -1,14 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.domain.YxSystemUserTask; import co.yixiang.modules.shop.service.YxSystemUserTaskService; import co.yixiang.modules.shop.service.dto.YxSystemUserTaskQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; @@ -39,7 +41,7 @@ public class SystemUserTaskController { @PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_SELECT')") public ResponseEntity getYxSystemUserTasks(YxSystemUserTaskQueryCriteria criteria, Pageable pageable){ - Sort sort = new Sort(Sort.Direction.ASC, "levelId"); + Sort sort = new Sort(Sort.Direction.ASC, "level_id"); Pageable pageableT = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), sort); @@ -52,7 +54,7 @@ public class SystemUserTaskController { @PostMapping(value = "/yxSystemUserTask") @PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_CREATE')") public ResponseEntity create(@Validated @RequestBody YxSystemUserTask resources){ - return new ResponseEntity(yxSystemUserTaskService.create(resources),HttpStatus.CREATED); + return new ResponseEntity(yxSystemUserTaskService.save(resources),HttpStatus.CREATED); } @Log("修改") @@ -61,7 +63,7 @@ public class SystemUserTaskController { @PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_EDIT')") public ResponseEntity update(@Validated @RequestBody YxSystemUserTask resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemUserTaskService.update(resources); + yxSystemUserTaskService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } @@ -71,7 +73,7 @@ public class SystemUserTaskController { @PreAuthorize("@el.check('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_DELETE')") public ResponseEntity delete(@PathVariable Integer id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxSystemUserTaskService.delete(id); + yxSystemUserTaskService.removeById(id); return new ResponseEntity(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java index 1ca89264..10ff4370 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java @@ -1,6 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.shop.service.YxUserBillService; import co.yixiang.modules.shop.service.dto.YxUserBillQueryCriteria; import io.swagger.annotations.Api; @@ -41,4 +46,4 @@ public class UserBillController { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java index 1283431d..5b98bf37 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java @@ -1,10 +1,15 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.modules.shop.domain.YxUserRecharge; import co.yixiang.modules.shop.service.YxUserRechargeService; +import co.yixiang.modules.shop.service.dto.YxUserRechargeDto; import co.yixiang.modules.shop.service.dto.YxUserRechargeQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -17,6 +22,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; /** * @author hupeng @@ -28,9 +35,10 @@ import java.io.IOException; public class UserRechargeController { private final YxUserRechargeService yxUserRechargeService; - - public UserRechargeController(YxUserRechargeService yxUserRechargeService) { + private final IGenerator generator; + public UserRechargeController(YxUserRechargeService yxUserRechargeService, IGenerator generator) { this.yxUserRechargeService = yxUserRechargeService; + this.generator = generator; } @Log("导出数据") @@ -38,7 +46,7 @@ public class UserRechargeController { @GetMapping(value = "/download") @PreAuthorize("@el.check('yxUserRecharge:list')") public void download(HttpServletResponse response, YxUserRechargeQueryCriteria criteria) throws IOException { - yxUserRechargeService.download(yxUserRechargeService.queryAll(criteria), response); + yxUserRechargeService.download(generator.convert(yxUserRechargeService.queryAll(criteria), YxUserRechargeDto.class), response); } @GetMapping @@ -54,7 +62,7 @@ public class UserRechargeController { @ApiOperation("新增充值管理") @PreAuthorize("@el.check('yxUserRecharge:add')") public ResponseEntity create(@Validated @RequestBody YxUserRecharge resources){ - return new ResponseEntity<>(yxUserRechargeService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(yxUserRechargeService.save(resources),HttpStatus.CREATED); } @@ -65,7 +73,7 @@ public class UserRechargeController { @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] ids) { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - yxUserRechargeService.deleteAll(ids); + yxUserRechargeService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxWechatUserController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxWechatUserController.java new file mode 100644 index 00000000..7e1956b8 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxWechatUserController.java @@ -0,0 +1,82 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.rest; +import java.util.Arrays; +import co.yixiang.dozer.service.IGenerator; +import lombok.AllArgsConstructor; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.modules.shop.domain.YxWechatUser; +import co.yixiang.modules.shop.service.YxWechatUserService; +import co.yixiang.modules.shop.service.dto.YxWechatUserQueryCriteria; +import co.yixiang.modules.shop.service.dto.YxWechatUserDto; +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 hupeng +* @date 2020-05-12 +*/ +@AllArgsConstructor +@Api(tags = "微信用户管理") +@RestController +@RequestMapping("/api/yxWechatUser") +public class YxWechatUserController { + + private final YxWechatUserService yxWechatUserService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxWechatUser:list')") + public void download(HttpServletResponse response, YxWechatUserQueryCriteria criteria) throws IOException { + yxWechatUserService.download(generator.convert(yxWechatUserService.queryAll(criteria), YxWechatUserDto.class), response); + } + + @GetMapping + @Log("查询微信用户") + @ApiOperation("查询微信用户") + @PreAuthorize("@el.check('admin','yxWechatUser:list')") + public ResponseEntity getYxWechatUsers(YxWechatUserQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxWechatUserService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @PostMapping + @Log("新增微信用户") + @ApiOperation("新增微信用户") + @PreAuthorize("@el.check('admin','yxWechatUser:add')") + public ResponseEntity create(@Validated @RequestBody YxWechatUser resources){ + return new ResponseEntity<>(yxWechatUserService.save(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改微信用户") + @ApiOperation("修改微信用户") + @PreAuthorize("@el.check('admin','yxWechatUser:edit')") + public ResponseEntity update(@Validated @RequestBody YxWechatUser resources){ + yxWechatUserService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除微信用户") + @ApiOperation("删除微信用户") + @PreAuthorize("@el.check('admin','yxWechatUser:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Integer[] ids) { + Arrays.asList(ids).forEach(id->{ + yxWechatUserService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java index 8402477d..11fe5cee 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxExpress; -import co.yixiang.modules.shop.service.dto.YxExpressDTO; +import co.yixiang.modules.shop.service.dto.YxExpressDto; import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-12-12 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxExpress") -public interface YxExpressService { +public interface YxExpressService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxExpressQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxExpressQueryCriteria criteria); + List queryAll(YxExpressQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxExpressDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxExpressDTO create(YxExpress resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxExpress resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java index 355e73a7..fcb96d62 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java @@ -1,5 +1,10 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxMaterialGroup; import co.yixiang.modules.shop.service.dto.YxMaterialGroupDto; import co.yixiang.modules.shop.service.dto.YxMaterialGroupQueryCriteria; @@ -11,11 +16,11 @@ import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ -public interface YxMaterialGroupService { +public interface YxMaterialGroupService extends BaseService{ - /** +/** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 @@ -28,35 +33,13 @@ public interface YxMaterialGroupService { * @param criteria 条件参数 * @return List */ - List queryAll(YxMaterialGroupQueryCriteria criteria); + List queryAll(YxMaterialGroupQueryCriteria criteria); /** - * 根据ID查询 - * @param id ID - * @return YxMaterialGroupDto - */ - YxMaterialGroupDto findById(String id); - - /** - * 创建 - * @param resources / - * @return YxMaterialGroupDto + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / */ - YxMaterialGroupDto create(YxMaterialGroup resources); - - /** - * 编辑 - * @param resources / - */ - void update(YxMaterialGroup resources); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(String[] ids); - - void deleteById(String id); - - -} \ No newline at end of file + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java index 15ffbb9f..2c4a35f1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java @@ -1,5 +1,10 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxMaterial; import co.yixiang.modules.shop.service.dto.YxMaterialDto; import co.yixiang.modules.shop.service.dto.YxMaterialQueryCriteria; @@ -11,11 +16,11 @@ import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ -public interface YxMaterialService { +public interface YxMaterialService extends BaseService{ - /** +/** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 @@ -28,36 +33,13 @@ public interface YxMaterialService { * @param criteria 条件参数 * @return List */ - List queryAll(YxMaterialQueryCriteria criteria); + List queryAll(YxMaterialQueryCriteria criteria); /** - * 根据ID查询 - * @param id ID - * @return YxMaterialDto - */ - YxMaterialDto findById(String id); - - /** - * 创建 - * @param resources / - * @return YxMaterialDto + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / */ - YxMaterialDto create(YxMaterial resources); - - /** - * 编辑 - * @param resources / - */ - void update(YxMaterial resources); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(String[] ids); - - void deleteById(String id); - - - -} \ No newline at end of file + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java new file mode 100644 index 00000000..15304c48 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java @@ -0,0 +1,48 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxStoreCart; +import co.yixiang.modules.shop.service.dto.CountDto; +import co.yixiang.modules.shop.service.dto.YxStoreCartDto; +import co.yixiang.modules.shop.service.dto.YxStoreCartQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreCartService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCartQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreCartQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + List findCateName(); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java index 0e87e93e..b45f37ce 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java @@ -1,80 +1,47 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxStoreCategory; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryDTO; +import co.yixiang.modules.shop.service.dto.YxStoreCategoryDto; import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria; import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-03 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStoreCategory") -public interface YxStoreCategoryService { +public interface YxStoreCategoryService extends BaseService{ - /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; - - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreCategoryQueryCriteria criteria); + List queryAll(YxStoreCategoryQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreCategoryDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - YxStoreCategoryDTO findByName(String name); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreCategoryDTO create(YxStoreCategory resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreCategory resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); - - Object buildTree(List categoryDTOS); - -} \ No newline at end of file + Object buildTree(List categoryDTOList); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderCartInfoService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderCartInfoService.java new file mode 100644 index 00000000..e79788eb --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderCartInfoService.java @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.shop.service.dto.YxStoreOrderCartInfoDto; +import co.yixiang.modules.shop.service.dto.YxStoreOrderCartInfoQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreOrderCartInfoService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreOrderCartInfoQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreOrderCartInfoQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderService.java index cbcf2632..f18ca1be 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderService.java @@ -1,85 +1,66 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxStoreOrder; import co.yixiang.modules.shop.service.dto.OrderCountDto; -import co.yixiang.modules.shop.service.dto.OrderTimeDataDTO; -import co.yixiang.modules.shop.service.dto.YxStoreOrderDTO; +import co.yixiang.modules.shop.service.dto.OrderTimeDataDto; +import co.yixiang.modules.shop.service.dto.YxStoreOrderDto; import co.yixiang.modules.shop.service.dto.YxStoreOrderQueryCriteria; import org.springframework.data.domain.Pageable; -import java.text.ParseException; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-14 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStoreOrder") -public interface YxStoreOrderService { +public interface YxStoreOrderService extends BaseService{ - OrderCountDto getOrderCount(); - - OrderTimeDataDTO getOrderTimeData(); - - Map chartCount(); - - String orderType(int id, int pinkId, int combinationId, int seckillId,int bargainId,int shippingType); - - void refund(YxStoreOrder resources); - - void download(List queryAll, HttpServletResponse response) throws IOException, ParseException; - - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreOrderQueryCriteria criteria); + List queryAll(YxStoreOrderQueryCriteria criteria); - /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreOrderDTO findById(Integer id); - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreOrderDTO create(YxStoreOrder resources); + YxStoreOrderDto create(YxStoreOrder resources); - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) void update(YxStoreOrder resources); - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - Map queryAll(List ids); + Map queryAll(List ids); + + + String orderType(int id,int pinkId, int combinationId,int seckillId, + int bargainId,int shippingType); + + void refund(YxStoreOrder resources); + + OrderCountDto getOrderCount(); + + OrderTimeDataDto getOrderTimeData(); + + Map chartCount(); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderStatusService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderStatusService.java index 49ec7711..67d632a9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderStatusService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderStatusService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDTO; +import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDto; import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-02 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStoreOrderStatus") -public interface YxStoreOrderStatusService { +public interface YxStoreOrderStatusService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreOrderStatusQueryCriteria criteria); + List queryAll(YxStoreOrderStatusQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreOrderStatusDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreOrderStatusDTO create(YxStoreOrderStatus resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreOrderStatus resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java new file mode 100644 index 00000000..804dbaa4 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrResultService extends BaseService{ + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java new file mode 100644 index 00000000..788980bc --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxStoreProductAttr; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrService extends BaseService{ + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java new file mode 100644 index 00000000..d0397295 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrValueService extends BaseService{ + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java index 163f23a2..5b687f24 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxStoreProductReply; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDTO; +import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDto; import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-03 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStoreProductReply") -public interface YxStoreProductReplyService { +public interface YxStoreProductReplyService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreProductReplyQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreProductReplyQueryCriteria criteria); + List queryAll(YxStoreProductReplyQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreProductReplyDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreProductReplyDTO create(YxStoreProductReply resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreProductReply resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java index 1a848429..3fd69ea0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java @@ -1,79 +1,66 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxStoreProduct; -import co.yixiang.modules.shop.service.dto.ProductFormatDTO; -import co.yixiang.modules.shop.service.dto.YxStoreProductDTO; +import co.yixiang.modules.shop.service.dto.ProductFormatDto; +import co.yixiang.modules.shop.service.dto.YxStoreProductDto; import co.yixiang.modules.shop.service.dto.YxStoreProductQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-04 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxStoreProduct") -public interface YxStoreProductService { +public interface YxStoreProductService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxStoreProductQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxStoreProductQueryCriteria criteria); + List queryAll(YxStoreProductQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxStoreProductDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxStoreProductDTO create(YxStoreProduct resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxStoreProduct resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); + YxStoreProduct saveProduct(YxStoreProduct storeProduct); void recovery(Integer id); - void onSale(Integer id, Integer status); + void onSale(Integer id, int status); - List isFormatAttr(Integer id, String jsonStr); + List isFormatAttr(Integer id, String jsonStr); void createProductAttr(Integer id, String jsonStr); - void setResult(Map map, Integer id); + void clearProductAttr(Integer id,boolean isActice); - void clearProductAttr(Integer id, boolean isActice); + void setResult(Map map,Integer id); String getStoreProductAttrResult(Integer id); -} \ No newline at end of file + + void updateProduct(YxStoreProduct resources); + + void delete(Integer id); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java index 26084cae..f1fc916e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java @@ -1,66 +1,47 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemConfig; -import co.yixiang.modules.shop.service.dto.YxSystemConfigDTO; +import co.yixiang.modules.shop.service.dto.YxSystemConfigDto; import co.yixiang.modules.shop.service.dto.YxSystemConfigQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxSystemConfig") -public interface YxSystemConfigService { +public interface YxSystemConfigService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxSystemConfigQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxSystemConfigQueryCriteria criteria); + List queryAll(YxSystemConfigQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxSystemConfigDTO findById(Integer id); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxSystemConfigDTO create(YxSystemConfig resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxSystemConfig resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); - - YxSystemConfig findByKey(String str); -} \ No newline at end of file + YxSystemConfig findByKey(String store_brokerage_statu); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java index 1df46faa..48c63b4f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemGroupData; -import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDTO; +import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDto; import co.yixiang.modules.shop.service.dto.YxSystemGroupDataQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-18 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxSystemGroupData") -public interface YxSystemGroupDataService { +public interface YxSystemGroupDataService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxSystemGroupDataQueryCriteria criteria); + List queryAll(YxSystemGroupDataQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxSystemGroupDataDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxSystemGroupDataDTO create(YxSystemGroupData resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxSystemGroupData resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java index a4a885eb..6bb39dae 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java @@ -1,5 +1,10 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreQueryCriteria; @@ -11,11 +16,11 @@ import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2020-03-03 +* @date 2020-05-12 */ -public interface YxSystemStoreService { +public interface YxSystemStoreService extends BaseService{ - /** +/** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 @@ -28,33 +33,7 @@ public interface YxSystemStoreService { * @param criteria 条件参数 * @return List */ - List queryAll(YxSystemStoreQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id ID - * @return YxSystemStoreDto - */ - YxSystemStoreDto findById(Integer id); - - /** - * 创建 - * @param resources / - * @return YxSystemStoreDto - */ - YxSystemStoreDto create(YxSystemStore resources); - - /** - * 编辑 - * @param resources / - */ - void update(YxSystemStore resources); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Integer[] ids); + List queryAll(YxSystemStoreQueryCriteria criteria); /** * 导出数据 @@ -63,4 +42,4 @@ public interface YxSystemStoreService { * @throws IOException / */ void download(List all, HttpServletResponse response) throws IOException; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java index d294afa4..5732d4ac 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java @@ -1,5 +1,10 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemStoreStaff; import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffQueryCriteria; @@ -11,11 +16,11 @@ import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2020-03-22 +* @date 2020-05-12 */ -public interface YxSystemStoreStaffService { +public interface YxSystemStoreStaffService extends BaseService{ - /** +/** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 @@ -28,33 +33,7 @@ public interface YxSystemStoreStaffService { * @param criteria 条件参数 * @return List */ - List queryAll(YxSystemStoreStaffQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id ID - * @return YxSystemStoreStaffDto - */ - YxSystemStoreStaffDto findById(Integer id); - - /** - * 创建 - * @param resources / - * @return YxSystemStoreStaffDto - */ - YxSystemStoreStaffDto create(YxSystemStoreStaff resources); - - /** - * 编辑 - * @param resources / - */ - void update(YxSystemStoreStaff resources); - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Integer[] ids); + List queryAll(YxSystemStoreStaffQueryCriteria criteria); /** * 导出数据 @@ -63,4 +42,4 @@ public interface YxSystemStoreStaffService { * @throws IOException / */ void download(List all, HttpServletResponse response) throws IOException; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java index 4fd8de0a..e59224ed 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDTO; +import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDto; import co.yixiang.modules.shop.service.dto.YxSystemUserLevelQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxSystemUserLevel") -public interface YxSystemUserLevelService { +public interface YxSystemUserLevelService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxSystemUserLevelQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxSystemUserLevelQueryCriteria criteria); + List queryAll(YxSystemUserLevelQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxSystemUserLevelDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxSystemUserLevelDTO create(YxSystemUserLevel resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxSystemUserLevel resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserTaskService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserTaskService.java index 17af5fe7..74e9942f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserTaskService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserTaskService.java @@ -1,66 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxSystemUserTask; -import co.yixiang.modules.shop.service.dto.YxSystemUserTaskDTO; +import co.yixiang.modules.shop.service.dto.YxSystemUserTaskDto; import co.yixiang.modules.shop.service.dto.YxSystemUserTaskQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxSystemUserTask") -public interface YxSystemUserTaskService { +public interface YxSystemUserTaskService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxSystemUserTaskQueryCriteria criteria); + List queryAll(YxSystemUserTaskQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxSystemUserTaskDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxSystemUserTaskDTO create(YxSystemUserTask resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxSystemUserTask resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); - - List> getTaskType(); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java index eff5574b..97732530 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.service.dto.YxUserBillDTO; +import co.yixiang.modules.shop.service.dto.YxUserBillDto; import co.yixiang.modules.shop.service.dto.YxUserBillQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-11-06 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxUserBill") -public interface YxUserBillService { +public interface YxUserBillService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxUserBillQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxUserBillQueryCriteria criteria); + List queryAll(YxUserBillQueryCriteria criteria); /** - * 根据ID查询 - * @param id - * @return - */ - //@Cacheable(key = "#p0") - YxUserBillDTO findById(Integer id); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxUserBillDTO create(YxUserBill resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxUserBill resources); - - /** - * 删除 - * @param id - */ - //@CacheEvict(allEntries = true) - void delete(Integer id); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java index 91551e92..d6f8376f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java @@ -1,5 +1,10 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxUserRecharge; import co.yixiang.modules.shop.service.dto.YxUserRechargeDto; import co.yixiang.modules.shop.service.dto.YxUserRechargeQueryCriteria; @@ -11,11 +16,11 @@ import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2020-03-02 +* @date 2020-05-12 */ -public interface YxUserRechargeService { +public interface YxUserRechargeService extends BaseService{ - /** +/** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 @@ -28,29 +33,7 @@ public interface YxUserRechargeService { * @param criteria 条件参数 * @return List */ - List queryAll(YxUserRechargeQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id ID - * @return YxUserRechargeDto - */ - YxUserRechargeDto findById(Integer id); - - /** - * 创建 - * @param resources / - * @return YxUserRechargeDto - */ - YxUserRechargeDto create(YxUserRecharge resources); - - - - /** - * 多选删除 - * @param ids / - */ - void deleteAll(Integer[] ids); + List queryAll(YxUserRechargeQueryCriteria criteria); /** * 导出数据 @@ -59,4 +42,4 @@ public interface YxUserRechargeService { * @throws IOException / */ void download(List all, HttpServletResponse response) throws IOException; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java index 06d868da..8ee6a032 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java @@ -1,71 +1,52 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxUser; -import co.yixiang.modules.shop.service.dto.UserMoneyDTO; -import co.yixiang.modules.shop.service.dto.YxUserDTO; +import co.yixiang.modules.shop.service.dto.UserMoneyDto; +import co.yixiang.modules.shop.service.dto.YxUserDto; import co.yixiang.modules.shop.service.dto.YxUserQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxUser") -public interface YxUserService { +public interface YxUserService extends BaseService{ - void updateMoney(UserMoneyDTO param); - - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxUserQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxUserQueryCriteria criteria); + List queryAll(YxUserQueryCriteria criteria); /** - * 根据ID查询 - * @param uid - * @return - */ - //@Cacheable(key = "#p0") - YxUserDTO findById(Integer uid); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxUserDTO create(YxUser resources); + void onStatus(Integer id, int status); - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxUser resources); + void updateMoney(UserMoneyDto param); - /** - * 删除 - * @param uid - */ - //@CacheEvict(allEntries = true) - void delete(Integer uid); - - void onStatus(Integer uid, Integer status); - - void incBrokeragePrice(double price, int uid); -} \ No newline at end of file + void incBrokeragePrice(double doubleValue, Integer uid); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxWechatUserService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxWechatUserService.java index c21a2293..5b67e099 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxWechatUserService.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxWechatUserService.java @@ -1,64 +1,45 @@ -package co.yixiang.modules.shop.service; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.shop.domain.YxWechatUser; -import co.yixiang.modules.shop.service.dto.YxWechatUserDTO; +import co.yixiang.modules.shop.service.dto.YxWechatUserDto; import co.yixiang.modules.shop.service.dto.YxWechatUserQueryCriteria; import org.springframework.data.domain.Pageable; - -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-12-13 +* @date 2020-05-12 */ -//@CacheConfig(cacheNames = "yxWechatUser") -public interface YxWechatUserService { +public interface YxWechatUserService extends BaseService{ - /** +/** * 查询数据分页 - * @param criteria - * @param pageable - * @return + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map */ - //@Cacheable Map queryAll(YxWechatUserQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 - * @param criteria - * @return + * @param criteria 条件参数 + * @return List */ - //@Cacheable - List queryAll(YxWechatUserQueryCriteria criteria); + List queryAll(YxWechatUserQueryCriteria criteria); /** - * 根据ID查询 - * @param uid - * @return - */ - //@Cacheable(key = "#p0") - YxWechatUserDTO findById(Integer uid); - - /** - * 创建 - * @param resources - * @return - */ - //@CacheEvict(allEntries = true) - YxWechatUserDTO create(YxWechatUser resources); - - /** - * 编辑 - * @param resources - */ - //@CacheEvict(allEntries = true) - void update(YxWechatUser resources); - - /** - * 删除 - * @param uid - */ - //@CacheEvict(allEntries = true) - void delete(Integer uid); -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDTO.java index 51395e76..e535bec9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDTO.java @@ -1,14 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; +import lombok.Data; + /** * @ClassName ChartDataDTO * @Author hupeng <610796224@qq.com> * @Date 2019/11/25 **/ -//@Data -public interface ChartDataDTO{ +@Data +public class ChartDataDto { // @Value("#{target.adminCount}") - Double getNum(); - String getTime(); + private Double num; + private String time; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java index a2e8a612..fcbfdab8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java @@ -1,9 +1,14 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; -//@Data -public interface CountDto { +@Data +public class CountDto { - String getCatename(); + private String catename; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDTO.java index 104db19a..b64ac888 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -11,7 +16,7 @@ import java.util.Map; * @Date 2019/10/12 **/ @Data -public class DetailDTO { +public class DetailDto { private List data; //private List>>> res; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDTO.java index 80c9a4d8..d9bedf2f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -11,7 +16,7 @@ import java.util.List; **/ @Data -public class FromatDetailDTO { +public class FromatDetailDto { private boolean attrHidden; private String detailValue; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java index 58ed0c39..65eeaef2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDTO.java index 599b441d..465340be 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -10,7 +15,7 @@ import java.io.Serializable; * @Date 2019/11/25 **/ @Data -public class OrderTimeDataDTO implements Serializable { +public class OrderTimeDataDto implements Serializable { private Double todayPrice; //今日成交额 private Integer todayCount; //今日订单数 private Double proPrice; //昨日成交额 @@ -21,8 +26,8 @@ public class OrderTimeDataDTO implements Serializable { private Integer lastWeekCount;//上周 private Double lastWeekPrice; //上周 - private Long userCount; - private Long orderCount; + private Integer userCount; + private Integer orderCount; private Double priceCount; - private Long goodsCount; + private Integer goodsCount; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ProductFormatDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ProductFormatDTO.java index 4323798a..2245c7a1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ProductFormatDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ProductFormatDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -11,7 +16,7 @@ import java.util.Map; **/ @Data -public class ProductFormatDTO { +public class ProductFormatDto { private Double price; @@ -26,6 +31,6 @@ public class ProductFormatDTO { //private List> detail; private Map detail; private Boolean check; - + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDTO.java index 8c502675..454ae3e2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -12,7 +17,7 @@ import java.util.Map; @Data -public class StoreOrderCartInfoDTO { +public class StoreOrderCartInfoDto { private Integer id; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDTO.java index 1d038cda..271705ff 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -8,7 +13,7 @@ import lombok.Data; * @Date 2019/12/11 **/ @Data -public class UserBillDTO { +public class UserBillDto { private Integer pm; private String gtitle; private String category; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDTO.java index e8ca278e..d2e92465 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -12,12 +17,12 @@ import java.io.Serializable; * @Date 2019/12/4 **/ @Data -public class UserMoneyDTO implements Serializable { - @NotNull(message = "参数缺失") +public class UserMoneyDto implements Serializable { + //@NotNull(message = "参数缺失") private Integer uid; - @NotNull(message = "请选择修改余额方式") + //@NotNull(message = "请选择修改余额方式") private Integer ptype; - @NotNull(message = "金额必填") + //@NotNull(message = "金额必填") @Min(message = "最低金额为0",value = 0) private Double money; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDTO.java index 11873f1f..55c561c3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDTO.java @@ -1,29 +1,32 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-12-12 +* @date 2020-05-12 */ @Data -public class YxExpressDTO implements Serializable { +public class YxExpressDto implements Serializable { - // 快递公司id + /** 快递公司id */ private Integer id; - // 快递公司简称 + /** 快递公司简称 */ private String code; - // 快递公司全称 + /** 快递公司全称 */ private String name; - // 排序 + /** 排序 */ private Integer sort; - // 是否显示 + /** 是否显示 */ private Integer isShow; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java index 8f006374..ff0643f6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-12-12 +* @date 2020-05-12 */ @Data public class YxExpressQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java index 63bcf1d5..0e48be26 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,7 +11,7 @@ import java.io.Serializable; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Data public class YxMaterialDto implements Serializable { @@ -14,12 +19,16 @@ public class YxMaterialDto implements Serializable { /** PK */ private String id; + /** 所属租户 */ + private String userId; + /** 逻辑删除标记(0:显示;1:隐藏) */ - private String delFlag; /** 创建时间 */ private Timestamp createTime; + /** 最后更新时间 */ + private Timestamp updateTime; /** 创建者ID */ private String createId; @@ -35,4 +44,4 @@ public class YxMaterialDto implements Serializable { /** 素材链接 */ private String url; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java index 288262af..a40c1c9d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,11 +11,10 @@ import java.io.Serializable; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Data public class YxMaterialGroupDto implements Serializable { - /** PK */ private String id; @@ -25,4 +29,4 @@ public class YxMaterialGroupDto implements Serializable { /** 分组名 */ private String name; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java index ba461adb..8198d6c4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java @@ -1,13 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; import java.util.List; - +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Data public class YxMaterialGroupQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java index d9cebc59..574928fc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java @@ -1,16 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; import java.util.List; - +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Data public class YxMaterialQueryCriteria{ - @Query - private String groupId; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartDto.java new file mode 100644 index 00000000..724b1d49 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartDto.java @@ -0,0 +1,56 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreCartDto implements Serializable { + + /** 购物车表ID */ + private Long id; + + /** 用户ID */ + private Integer uid; + + /** 类型 */ + private String type; + + /** 商品ID */ + private Integer productId; + + /** 商品属性 */ + private String productAttrUnique; + + /** 商品数量 */ + private Integer cartNum; + + /** 添加时间 */ + private Integer addTime; + + /** 0 = 未购买 1 = 已购买 */ + private Integer isPay; + + /** 是否删除 */ + private Integer isDel; + + /** 是否为立即购买 */ + private Integer isNew; + + /** 拼团id */ + private Integer combinationId; + + /** 秒杀产品ID */ + private Integer seckillId; + + /** 砍价id */ + private Integer bargainId; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartQueryCriteria.java new file mode 100644 index 00000000..78c719ec --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartQueryCriteria.java @@ -0,0 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreCartQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDTO.java index b1b6ba90..2cd81c39 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDTO.java @@ -1,44 +1,50 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; - import java.io.Serializable; import java.util.List; - /** * @author hupeng -* @date 2019-10-03 +* @date 2020-05-12 */ @Data -public class YxStoreCategoryDTO implements Serializable { +public class YxStoreCategoryDto implements Serializable { - // 商品分类表ID + /** 商品分类表ID */ private Integer id; - // 父id + /** 父id */ private Integer pid; - // 分类名称 + /** 分类名称 */ private String cateName; - // 排序 + /** 排序 */ private Integer sort; - // 图标 + /** 图标 */ private String pic; - // 是否推荐 + /** 是否推荐 */ private Integer isShow; - // 添加时间 + /** 添加时间 */ private Integer addTime; + /** 删除状态 */ + private Integer isDel; + @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + private List children; public String getLabel() { return cateName; } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java index 99bf3001..5f412073 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java @@ -1,19 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-03 +* @date 2020-05-12 */ @Data public class YxStoreCategoryQueryCriteria{ - - // 模糊 - @Query(type = Query.Type.INNER_LIKE) - private String cateName; - - @Query - private Integer isDel = 0; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDTO.java index d7f1c457..d5b2529c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import com.fasterxml.jackson.annotation.JsonInclude; @@ -12,7 +17,7 @@ import java.util.List; * @date 2019-10-03 */ @Data -public class YxStoreCategorySmallDTO implements Serializable { +public class YxStoreCategorySmallDto implements Serializable { // 商品分类表ID private Integer id; @@ -23,4 +28,4 @@ public class YxStoreCategorySmallDTO implements Serializable { -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java new file mode 100644 index 00000000..c858c686 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java @@ -0,0 +1,34 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreOrderCartInfoDto implements Serializable { + + private Integer id; + + /** 订单id */ + private Integer oid; + + /** 购物车id */ + private Integer cartId; + + /** 商品ID */ + private Integer productId; + + /** 购买东西的详细信息 */ + private String cartInfo; + + /** 唯一id */ + private String unique; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoQueryCriteria.java new file mode 100644 index 00000000..900efabe --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoQueryCriteria.java @@ -0,0 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreOrderCartInfoQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDTO.java index fb23d60d..42362a0c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDTO.java @@ -1,20 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.modules.shop.domain.YxUser; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; +import java.io.Serializable; import java.util.List; - /** * @author hupeng -* @date 2019-10-14 +* @date 2020-05-12 */ @Data -public class YxStoreOrderDTO implements Serializable { - +public class YxStoreOrderDto implements Serializable { // 订单ID private Integer id; @@ -29,7 +30,7 @@ public class YxStoreOrderDTO implements Serializable { //订单类型 private String pinkName; - private List cartInfoList; + private List cartInfoList; // 订单号 @@ -38,7 +39,7 @@ public class YxStoreOrderDTO implements Serializable { // 用户id private Integer uid; - private YxUserDTO userDTO; + private YxUserDto userDTO; // 用户姓名 private String realName; @@ -184,4 +185,4 @@ public class YxStoreOrderDTO implements Serializable { private Integer isRemind; private Integer isSystemDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java index 00e02bf4..94ccdd5e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java @@ -1,13 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; - import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-14 +* @date 2020-05-12 */ @Data public class YxStoreOrderQueryCriteria{ @@ -64,4 +68,4 @@ public class YxStoreOrderQueryCriteria{ @Query private Integer storeId; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDTO.java index d6a8f5fa..b1bf30d4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDTO.java @@ -1,28 +1,31 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-11-02 +* @date 2020-05-12 */ @Data -public class YxStoreOrderStatusDTO implements Serializable { +public class YxStoreOrderStatusDto implements Serializable { private Integer id; - // 订单id + /** 订单id */ private Integer oid; - // 操作类型 + /** 操作类型 */ private String changeType; - // 操作备注 + /** 操作备注 */ private String changeMessage; - // 操作时间 + /** 操作时间 */ private Integer changeTime; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusQueryCriteria.java index 4b0a7326..454d899d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-02 +* @date 2020-05-12 */ @Data public class YxStoreOrderStatusQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java new file mode 100644 index 00000000..e08d079c --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java @@ -0,0 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; + +@Data +public class YxStoreProductAttrQueryCriteria { +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java new file mode 100644 index 00000000..0f9db8e0 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java @@ -0,0 +1,12 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; + +@Data +public class YxStoreProductAttrValueQueryCriteria { +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDTO.java index 49270598..22b684b7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDTO.java @@ -1,127 +1,128 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-04 +* @date 2020-05-12 */ @Data -public class YxStoreProductDTO implements Serializable { +public class YxStoreProductDto implements Serializable { - // 商品id + /** 商品id */ private Integer id; - // 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) + /** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */ private Integer merId; - // 商品图片 + /** 商品图片 */ private String image; - // 轮播图 + /** 轮播图 */ private String sliderImage; - // 商品名称 + /** 商品名称 */ private String storeName; - // 商品简介 + /** 商品简介 */ private String storeInfo; - // 关键字 + /** 关键字 */ private String keyword; - // 产品条码(一维码) + /** 产品条码(一维码) */ private String barCode; - // 分类id + /** 分类id */ private String cateId; - //private String cateName; - - private YxStoreCategorySmallDTO storeCategory; - - // 商品价格 + /** 商品价格 */ private BigDecimal price; - // 会员价格 + /** 会员价格 */ private BigDecimal vipPrice; - // 市场价 + /** 市场价 */ private BigDecimal otPrice; - // 邮费 + /** 邮费 */ private BigDecimal postage; - // 单位名 + /** 单位名 */ private String unitName; - // 排序 + /** 排序 */ private Integer sort; - // 销量 + /** 销量 */ private Integer sales; - // 库存 + /** 库存 */ private Integer stock; - // 状态(0:未上架,1:上架) + /** 状态(0:未上架,1:上架) */ private Integer isShow; - // 是否热卖 + /** 是否热卖 */ private Integer isHot; - // 是否优惠 + /** 是否优惠 */ private Integer isBenefit; - // 是否精品 + /** 是否精品 */ private Integer isBest; - // 是否新品 + /** 是否新品 */ private Integer isNew; - // 产品描述 + /** 产品描述 */ private String description; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 是否包邮 + /** 是否包邮 */ private Integer isPostage; - // 是否删除 + /** 是否删除 */ private Integer isDel; - // 商户是否代理 0不可代理1可代理 + /** 商户是否代理 0不可代理1可代理 */ private Integer merUse; - // 获得积分 + /** 获得积分 */ private BigDecimal giveIntegral; - // 成本价 + /** 成本价 */ private BigDecimal cost; - // 秒杀状态 0 未开启 1已开启 + /** 秒杀状态 0 未开启 1已开启 */ private Integer isSeckill; - // 砍价状态 0未开启 1开启 + /** 砍价状态 0未开启 1开启 */ private Integer isBargain; - // 是否优品推荐 + /** 是否优品推荐 */ private Integer isGood; - // 虚拟销量 + /** 虚拟销量 */ private Integer ficti; - // 浏览量 + /** 浏览量 */ private Integer browse; - // 产品二维码地址(用户小程序海报) + /** 产品二维码地址(用户小程序海报) */ private String codePath; - // 淘宝京东1688类型 + /** 淘宝京东1688类型 */ private String soureLink; -} \ No newline at end of file + + private YxStoreCategorySmallDto storeCategory; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java index fcacb710..177d3edc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java @@ -1,11 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-04 +* @date 2020-05-12 */ @Data public class YxStoreProductQueryCriteria{ @@ -20,5 +26,4 @@ public class YxStoreProductQueryCriteria{ @Query private Integer isShow; - -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDTO.java index 30d2c5e5..76556cf3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDTO.java @@ -1,16 +1,19 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-11-03 +* @date 2020-05-12 */ @Data -public class YxStoreProductReplyDTO implements Serializable { +public class YxStoreProductReplyDto implements Serializable { // 评论ID private Integer id; @@ -18,7 +21,7 @@ public class YxStoreProductReplyDTO implements Serializable { // 用户ID private Integer uid; - private YxUserSmallDTO user; + private YxUserSmallDto user; // 订单ID private Integer oid; @@ -29,7 +32,7 @@ public class YxStoreProductReplyDTO implements Serializable { // 产品id private Integer productId; - private YxStoreProductSmallDTO storeProduct; + private YxStoreProductSmallDto storeProduct; // 某种商品类型(普通商品、秒杀商品) @@ -61,5 +64,4 @@ public class YxStoreProductReplyDTO implements Serializable { // 0未回复1已回复 private Integer isReply; - -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java index 24c8aba1..1c6dcbc5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java @@ -1,14 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-03 +* @date 2020-05-12 */ @Data public class YxStoreProductReplyQueryCriteria{ @Query private Integer isDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDTO.java index d410b200..2ac14739 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -11,7 +16,7 @@ import java.math.BigDecimal; * @date 2019-10-04 */ @Data -public class YxStoreProductSmallDTO implements Serializable { +public class YxStoreProductSmallDto implements Serializable { // 商品id private Integer id; @@ -24,4 +29,4 @@ public class YxStoreProductSmallDTO implements Serializable { private String storeName; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDTO.java index cd3807a5..701dd5e5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDTO.java @@ -1,30 +1,32 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Data -public class YxSystemConfigDTO implements Serializable { +public class YxSystemConfigDto implements Serializable { - // 配置id + /** 配置id */ private Integer id; - // 字段名称 + /** 字段名称 */ private String menuName; - - // 默认值 + /** 默认值 */ private String value; - // 排序 + /** 排序 */ private Integer sort; - // 是否隐藏 + /** 是否隐藏 */ private Integer status; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java index 513a30a4..3fc2d816 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Data public class YxSystemConfigQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDTO.java index 73a277c0..866f9cc2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDTO.java @@ -1,17 +1,20 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; import java.util.Map; - /** * @author hupeng -* @date 2019-10-18 +* @date 2020-05-12 */ @Data -public class YxSystemGroupDataDTO implements Serializable { +public class YxSystemGroupDataDto implements Serializable { // 组合数据详情ID private Integer id; @@ -32,4 +35,4 @@ public class YxSystemGroupDataDTO implements Serializable { // 状态(1:开启;2:关闭;) private Integer status; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java index b433083a..78e00adc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java @@ -1,15 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-18 +* @date 2020-05-12 */ @Data public class YxSystemGroupDataQueryCriteria{ + // 精确 @Query private String groupName; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java index e8f2d140..1a1e4816 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java @@ -1,14 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - - import java.io.Serializable; import java.util.Date; /** * @author hupeng -* @date 2020-03-03 +* @date 2020-05-12 */ @Data public class YxSystemStoreDto implements Serializable { @@ -54,11 +57,12 @@ public class YxSystemStoreDto implements Serializable { /** 是否删除 */ private Integer isDel; + private Date validTimeEnd; + + private Date validTimeStart; + private Date dayTimeStart; private Date dayTimeEnd; - private Date validTimeStart; - - private Date validTimeEnd; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java index 51cf3b4e..bbb73295 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,8 +11,8 @@ import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2020-03-03 +* @date 2020-05-12 */ @Data public class YxSystemStoreQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java index 3e9bf7ec..f93259ad 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -5,7 +10,7 @@ import java.io.Serializable; /** * @author hupeng -* @date 2020-03-22 +* @date 2020-05-12 */ @Data public class YxSystemStoreStaffDto implements Serializable { @@ -41,4 +46,4 @@ public class YxSystemStoreStaffDto implements Serializable { /** 所属门店 */ private String storeName; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java index 9b7f2c5e..bfd1474e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,7 +11,7 @@ import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2020-03-22 +* @date 2020-05-12 */ @Data public class YxSystemStoreStaffQueryCriteria{ @@ -18,4 +23,4 @@ public class YxSystemStoreStaffQueryCriteria{ /** 模糊 */ @Query(type = Query.Type.INNER_LIKE) private String nickname; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDTO.java index 884ba7a9..b5c77fe7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDTO.java @@ -1,59 +1,62 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Data -public class YxSystemUserLevelDTO implements Serializable { +public class YxSystemUserLevelDto implements Serializable { private Integer id; - // 商户id + /** 商户id */ private Integer merId; - // 会员名称 + /** 会员名称 */ private String name; - // 购买金额 + /** 购买金额 */ private BigDecimal money; - // 有效时间 + /** 有效时间 */ private Integer validDate; - // 是否为永久会员 + /** 是否为永久会员 */ private Integer isForever; - // 是否购买,1=购买,0=不购买 + /** 是否购买,1=购买,0=不购买 */ private Integer isPay; - // 是否显示 1=显示,0=隐藏 + /** 是否显示 1=显示,0=隐藏 */ private Integer isShow; - // 会员等级 + /** 会员等级 */ private Integer grade; - // 享受折扣 + /** 享受折扣 */ private BigDecimal discount; - // 会员卡背景 + /** 会员卡背景 */ private String image; - // 会员图标 + /** 会员图标 */ private String icon; - // 说明 + /** 说明 */ private String explain; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 是否删除.1=删除,0=未删除 + /** 是否删除.1=删除,0=未删除 */ private Integer isDel; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelQueryCriteria.java index 9db133b7..64ebd562 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Data public class YxSystemUserLevelQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDTO.java index 3a952284..35143569 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDTO.java @@ -1,17 +1,19 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - import java.io.Serializable; - /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Data -public class YxSystemUserTaskDTO implements Serializable { - +public class YxSystemUserTaskDto implements Serializable { private Integer id; // 任务名称 @@ -45,4 +47,4 @@ public class YxSystemUserTaskDTO implements Serializable { // 新增时间 private Integer addTime; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskQueryCriteria.java index 45e42b9b..4461be1a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Data public class YxSystemUserTaskQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDTO.java index 3558e77a..8d267923 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDTO.java @@ -1,51 +1,56 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-11-06 +* @date 2020-05-12 */ @Data -public class YxUserBillDTO implements Serializable { +public class YxUserBillDto implements Serializable { - // 用户账单id + /** 用户账单id */ private Integer id; - // 用户uid + /** 用户uid */ private Integer uid; - // 关联id + /** 关联id */ private String linkId; - // 0 = 支出 1 = 获得 + /** 0 = 支出 1 = 获得 */ private Integer pm; - // 账单标题 + /** 账单标题 */ private String title; - // 明细种类 + /** 明细种类 */ private String category; - // 明细类型 + /** 明细类型 */ private String type; - // 明细数字 + /** 明细数字 */ private BigDecimal number; - // 剩余 + /** 剩余 */ private BigDecimal balance; - // 备注 + /** 备注 */ private String mark; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 0 = 带确定 1 = 有效 -1 = 无效 + /** 0 = 带确定 1 = 有效 -1 = 无效 */ private Integer status; -} \ No newline at end of file + + private String nickname; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillQueryCriteria.java index 2aead770..79cc0af5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillQueryCriteria.java @@ -1,14 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-11-06 +* @date 2020-05-12 */ @Data public class YxUserBillQueryCriteria{ private String nickname; private String category; private String type; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDTO.java index 8bfb9b59..36039889 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDTO.java @@ -1,111 +1,120 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Data -public class YxUserDTO implements Serializable { +public class YxUserDto implements Serializable { - // 用户id + /** 用户id */ private Integer uid; - // 用户账号 + /** 用户账户(跟accout一样) */ + private String username; + + /** 用户账号 */ private String account; - // 用户密码 + /** 用户密码(跟pwd) */ + private String password; + + /** 用户密码 */ private String pwd; - // 真实姓名 + /** 真实姓名 */ private String realName; - // 生日 + /** 生日 */ private Integer birthday; - // 身份证号码 + /** 身份证号码 */ private String cardId; - // 用户备注 + /** 用户备注 */ private String mark; - // 合伙人id + /** 合伙人id */ private Integer partnerId; - // 用户分组id + /** 用户分组id */ private Integer groupId; - // 用户昵称 - private String nickname; + /** 用户昵称 */ + private String nickname = ""; - // 用户头像 + /** 用户头像 */ private String avatar; - // 手机号码 + /** 手机号码 */ private String phone; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 添加ip + /** 添加ip */ private String addIp; - // 最后一次登录时间 + /** 最后一次登录时间 */ private Integer lastTime; - // 最后一次登录ip + /** 最后一次登录ip */ private String lastIp; - // 用户余额 + /** 用户余额 */ private BigDecimal nowMoney; - // 佣金金额 + /** 佣金金额 */ private BigDecimal brokeragePrice; - // 用户剩余积分 + /** 用户剩余积分 */ private BigDecimal integral; - // 连续签到天数 + /** 连续签到天数 */ private Integer signNum; - // 1为正常,0为禁止 + /** 1为正常,0为禁止 */ private Integer status; - // 等级 + /** 等级 */ private Integer level; - // 推广元id + /** 推广元id */ private Integer spreadUid; - // 推广员关联时间 + /** 推广员关联时间 */ private Integer spreadTime; - // 用户类型 + /** 用户类型 */ private String userType; - // 是否为推广员 + /** 是否为推广员 */ private Integer isPromoter; - // 用户购买次数 + /** 用户购买次数 */ private Integer payCount; - // 下级人数 + /** 下级人数 */ private Integer spreadCount; - // 清理会员时间 + /** 清理会员时间 */ private Integer cleanTime; - // 详细地址 + /** 详细地址 */ private String addres; - // 管理员编号 + /** 管理员编号 */ private Integer adminid; - // 用户登陆类型,h5,wechat,routine + /** 用户登陆类型,h5,wechat,routine */ private String loginType; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java index 5d7411f4..3096523a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java @@ -1,11 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Data public class YxUserQueryCriteria{ @@ -23,4 +29,4 @@ public class YxUserQueryCriteria{ @Query private String userType; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java index 18f63fb9..89bb2ec8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,7 +11,7 @@ import java.io.Serializable; /** * @author hupeng -* @date 2020-03-02 +* @date 2020-05-12 */ @Data public class YxUserRechargeDto implements Serializable { @@ -39,4 +44,4 @@ public class YxUserRechargeDto implements Serializable { /** 昵称 */ private String nickname; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java index 77479182..8504e612 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -6,7 +11,7 @@ import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2020-03-02 +* @date 2020-05-12 */ @Data public class YxUserRechargeQueryCriteria{ @@ -14,4 +19,4 @@ public class YxUserRechargeQueryCriteria{ /** 模糊 */ @Query(type = Query.Type.INNER_LIKE) private String nickname; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDTO.java index 2d9629a0..e51481da 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; @@ -11,7 +16,7 @@ import java.math.BigDecimal; * @date 2019-10-06 */ @Data -public class YxUserSmallDTO implements Serializable { +public class YxUserSmallDto implements Serializable { // 用户id private Integer uid; @@ -26,4 +31,4 @@ public class YxUserSmallDTO implements Serializable { private String phone; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDTO.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDTO.java index 5d8b860b..ebb60cc6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDTO.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDTO.java @@ -1,87 +1,90 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; - -import java.io.Serializable; import java.math.BigDecimal; - +import java.io.Serializable; /** * @author hupeng -* @date 2019-12-13 +* @date 2020-05-12 */ @Data -public class YxWechatUserDTO implements Serializable { +public class YxWechatUserDto implements Serializable { - // 微信用户id + /** 微信用户id */ private Integer uid; - // 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段 + /** 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段 */ private String unionid; - // 用户的标识,对当前公众号唯一 + /** 用户的标识,对当前公众号唯一 */ private String openid; - // 小程序唯一身份ID + /** 小程序唯一身份ID */ private String routineOpenid; - // 用户的昵称 + /** 用户的昵称 */ private String nickname; - // 用户头像 + /** 用户头像 */ private String headimgurl; - // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知 + /** 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知 */ private Integer sex; - // 用户所在城市 + /** 用户所在城市 */ private String city; - // 用户的语言,简体中文为zh_CN + /** 用户的语言,简体中文为zh_CN */ private String language; - // 用户所在省份 + /** 用户所在省份 */ private String province; - // 用户所在国家 + /** 用户所在国家 */ private String country; - // 公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注 + /** 公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注 */ private String remark; - // 用户所在的分组ID(兼容旧的用户分组接口) + /** 用户所在的分组ID(兼容旧的用户分组接口) */ private Integer groupid; - // 用户被打上的标签ID列表 + /** 用户被打上的标签ID列表 */ private String tagidList; - // 用户是否订阅该公众号标识 + /** 用户是否订阅该公众号标识 */ private Integer subscribe; - // 关注公众号时间 + /** 关注公众号时间 */ private Integer subscribeTime; - // 添加时间 + /** 添加时间 */ private Integer addTime; - // 一级推荐人 + /** 一级推荐人 */ private Integer stair; - // 二级推荐人 + /** 二级推荐人 */ private Integer second; - // 一级推荐人订单 + /** 一级推荐人订单 */ private Integer orderStair; - // 二级推荐人订单 + /** 二级推荐人订单 */ private Integer orderSecond; - // 佣金 + /** 佣金 */ private BigDecimal nowMoney; - // 小程序用户会话密匙 + /** 小程序用户会话密匙 */ private String sessionKey; - // 用户类型 + /** 用户类型 */ private String userType; -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserQueryCriteria.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserQueryCriteria.java index b097a514..9dfd4bf3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserQueryCriteria.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserQueryCriteria.java @@ -1,11 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; /** * @author hupeng -* @date 2019-12-13 +* @date 2020-05-12 */ @Data public class YxWechatUserQueryCriteria{ -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java index a45d9e46..5d397d19 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java @@ -1,87 +1,79 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; -import co.yixiang.exception.EntityExistException; import co.yixiang.modules.shop.domain.YxExpress; -import co.yixiang.modules.shop.repository.YxExpressRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxExpressService; -import co.yixiang.modules.shop.service.dto.YxExpressDTO; +import co.yixiang.modules.shop.service.dto.YxExpressDto; import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxExpressMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.ExpressMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-12-12 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxExpress") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxExpressServiceImpl implements YxExpressService { +public class YxExpressServiceImpl extends BaseServiceImpl implements YxExpressService { - private final YxExpressRepository yxExpressRepository; - - private final YxExpressMapper yxExpressMapper; - - public YxExpressServiceImpl(YxExpressRepository yxExpressRepository, YxExpressMapper yxExpressMapper) { - this.yxExpressRepository = yxExpressRepository; - this.yxExpressMapper = yxExpressMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxExpressQueryCriteria criteria, Pageable pageable){ - Page page = yxExpressRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxExpressMapper::toDto)); + //@Cacheable + public Map queryAll(YxExpressQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxExpressDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxExpressQueryCriteria criteria){ - return yxExpressMapper.toDto(yxExpressRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxExpressDTO findById(Integer id) { - Optional yxExpress = yxExpressRepository.findById(id); - ValidationUtil.isNull(yxExpress,"YxExpress","id",id); - return yxExpressMapper.toDto(yxExpress.get()); + //@Cacheable + public List queryAll(YxExpressQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxExpress.class, criteria)); } + @Override - @Transactional(rollbackFor = Exception.class) - public YxExpressDTO create(YxExpress resources) { - if(yxExpressRepository.findByCode(resources.getCode()) != null){ - throw new EntityExistException(YxExpress.class,"code",resources.getCode()); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxExpressDto yxExpress : all) { + Map map = new LinkedHashMap<>(); + map.put("快递公司简称", yxExpress.getCode()); + map.put("快递公司全称", yxExpress.getName()); + map.put("排序", yxExpress.getSort()); + map.put("是否显示", yxExpress.getIsShow()); + list.add(map); } - return yxExpressMapper.toDto(yxExpressRepository.save(resources)); + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxExpress resources) { - Optional optionalYxExpress = yxExpressRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxExpress,"YxExpress","id",resources.getId()); - YxExpress yxExpress = optionalYxExpress.get(); - YxExpress yxExpress1 = null; - yxExpress1 = yxExpressRepository.findByCode(resources.getCode()); - if(yxExpress1 != null && !yxExpress1.getId().equals(yxExpress.getId())){ - throw new EntityExistException(YxExpress.class,"code",resources.getCode()); - } - yxExpress.copy(resources); - yxExpressRepository.save(yxExpress); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxExpressRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java index d646fed3..b25c44df 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java @@ -1,96 +1,79 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxMaterialGroup; -import co.yixiang.modules.shop.repository.YxMaterialGroupRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxMaterialGroupService; import co.yixiang.modules.shop.service.dto.YxMaterialGroupDto; import co.yixiang.modules.shop.service.dto.YxMaterialGroupQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxMaterialGroupMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.modules.shop.service.mapper.MaterialGroupMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import cn.hutool.core.util.IdUtil; // 默认不使用缓存 //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 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 hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Service +@AllArgsConstructor //@CacheConfig(cacheNames = "yxMaterialGroup") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxMaterialGroupServiceImpl implements YxMaterialGroupService { +public class YxMaterialGroupServiceImpl extends BaseServiceImpl implements YxMaterialGroupService { - private final YxMaterialGroupRepository yxMaterialGroupRepository; - - private final YxMaterialGroupMapper yxMaterialGroupMapper; - - public YxMaterialGroupServiceImpl(YxMaterialGroupRepository yxMaterialGroupRepository, YxMaterialGroupMapper yxMaterialGroupMapper) { - this.yxMaterialGroupRepository = yxMaterialGroupRepository; - this.yxMaterialGroupMapper = yxMaterialGroupMapper; - } + private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxMaterialGroupQueryCriteria criteria, Pageable pageable){ - Page page = yxMaterialGroupRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxMaterialGroupMapper::toDto)); + public Map queryAll(YxMaterialGroupQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxMaterialGroupDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + @Override //@Cacheable - public List queryAll(YxMaterialGroupQueryCriteria criteria){ - return yxMaterialGroupMapper.toDto(yxMaterialGroupRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public List queryAll(YxMaterialGroupQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxMaterialGroup.class, criteria)); } - @Override - //@Cacheable(key = "#p0") - public YxMaterialGroupDto findById(String id) { - YxMaterialGroup yxMaterialGroup = yxMaterialGroupRepository.findById(id).orElseGet(YxMaterialGroup::new); - ValidationUtil.isNull(yxMaterialGroup.getId(),"YxMaterialGroup","id",id); - return yxMaterialGroupMapper.toDto(yxMaterialGroup); - } @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public YxMaterialGroupDto create(YxMaterialGroup resources) { - resources.setId(IdUtil.simpleUUID()); - return yxMaterialGroupMapper.toDto(yxMaterialGroupRepository.save(resources)); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(YxMaterialGroup resources) { - YxMaterialGroup yxMaterialGroup = yxMaterialGroupRepository.findById(resources.getId()).orElseGet(YxMaterialGroup::new); - ValidationUtil.isNull( yxMaterialGroup.getId(),"YxMaterialGroup","id",resources.getId()); - yxMaterialGroup.copy(resources); - yxMaterialGroupRepository.save(yxMaterialGroup); - } - - @Override - //@CacheEvict(allEntries = true) - public void deleteAll(String[] ids) { - for (String id : ids) { - yxMaterialGroupRepository.deleteById(id); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxMaterialGroupDto yxMaterialGroup : all) { + Map map = new LinkedHashMap<>(); + map.put("逻辑删除标记(0:显示;1:隐藏)", yxMaterialGroup.getDelFlag()); + map.put("创建时间", yxMaterialGroup.getCreateTime()); + map.put("创建者ID", yxMaterialGroup.getCreateId()); + map.put("分组名", yxMaterialGroup.getName()); + list.add(map); } + FileUtil.downloadExcel(list, response); } - - @Override - public void deleteById(String id) { - yxMaterialGroupRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java index da60d443..01a5323c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java @@ -1,95 +1,83 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxMaterial; -import co.yixiang.modules.shop.repository.YxMaterialRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxMaterialService; import co.yixiang.modules.shop.service.dto.YxMaterialDto; import co.yixiang.modules.shop.service.dto.YxMaterialQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxMaterialMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.modules.shop.service.mapper.MaterialMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import cn.hutool.core.util.IdUtil; // 默认不使用缓存 //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 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 hupeng -* @date 2020-01-09 +* @date 2020-05-12 */ @Service +@AllArgsConstructor //@CacheConfig(cacheNames = "yxMaterial") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxMaterialServiceImpl implements YxMaterialService { +public class YxMaterialServiceImpl extends BaseServiceImpl implements YxMaterialService { - private final YxMaterialRepository yxMaterialRepository; - - private final YxMaterialMapper yxMaterialMapper; - - public YxMaterialServiceImpl(YxMaterialRepository yxMaterialRepository, YxMaterialMapper yxMaterialMapper) { - this.yxMaterialRepository = yxMaterialRepository; - this.yxMaterialMapper = yxMaterialMapper; - } + private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxMaterialQueryCriteria criteria, Pageable pageable){ - Page page = yxMaterialRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxMaterialMapper::toDto)); + public Map queryAll(YxMaterialQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxMaterialDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + @Override //@Cacheable - public List queryAll(YxMaterialQueryCriteria criteria){ - return yxMaterialMapper.toDto(yxMaterialRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public List queryAll(YxMaterialQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxMaterial.class, criteria)); } - @Override - //@Cacheable(key = "#p0") - public YxMaterialDto findById(String id) { - YxMaterial yxMaterial = yxMaterialRepository.findById(id).orElseGet(YxMaterial::new); - ValidationUtil.isNull(yxMaterial.getId(),"YxMaterial","id",id); - return yxMaterialMapper.toDto(yxMaterial); - } @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public YxMaterialDto create(YxMaterial resources) { - resources.setId(IdUtil.simpleUUID()); - return yxMaterialMapper.toDto(yxMaterialRepository.save(resources)); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(YxMaterial resources) { - YxMaterial yxMaterial = yxMaterialRepository.findById(resources.getId()).orElseGet(YxMaterial::new); - ValidationUtil.isNull( yxMaterial.getId(),"YxMaterial","id",resources.getId()); - yxMaterial.copy(resources); - yxMaterialRepository.save(yxMaterial); - } - - @Override - //@CacheEvict(allEntries = true) - public void deleteAll(String[] ids) { - for (String id : ids) { - yxMaterialRepository.deleteById(id); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxMaterialDto yxMaterial : all) { + Map map = new LinkedHashMap<>(); + map.put("所属租户", yxMaterial.getUserId()); + map.put("创建时间", yxMaterial.getCreateTime()); + map.put("最后更新时间", yxMaterial.getUpdateTime()); + map.put("创建者ID", yxMaterial.getCreateId()); + map.put("类型1、图片;2、视频", yxMaterial.getType()); + map.put("分组ID", yxMaterial.getGroupId()); + map.put("素材名", yxMaterial.getName()); + map.put("素材链接", yxMaterial.getUrl()); + list.add(map); } + FileUtil.downloadExcel(list, response); } - - @Override - public void deleteById(String id) { - yxMaterialRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java new file mode 100644 index 00000000..e955fa84 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java @@ -0,0 +1,94 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.impl; + +import co.yixiang.modules.shop.domain.YxStoreCart; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.shop.service.dto.CountDto; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxStoreCartService; +import co.yixiang.modules.shop.service.dto.YxStoreCartDto; +import co.yixiang.modules.shop.service.dto.YxStoreCartQueryCriteria; +import co.yixiang.modules.shop.service.mapper.StoreCartMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; + +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 hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCart") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreCartServiceImpl extends BaseServiceImpl implements YxStoreCartService { + + private final IGenerator generator; + + private final StoreCartMapper storeCartMapper; + @Override + //@Cacheable + public Map queryAll(YxStoreCartQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreCartDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreCartQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCart.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCartDto yxStoreCart : all) { + Map map = new LinkedHashMap<>(); + map.put("用户ID", yxStoreCart.getUid()); + map.put("类型", yxStoreCart.getType()); + map.put("商品ID", yxStoreCart.getProductId()); + map.put("商品属性", yxStoreCart.getProductAttrUnique()); + map.put("商品数量", yxStoreCart.getCartNum()); + map.put("添加时间", yxStoreCart.getAddTime()); + map.put("0 = 未购买 1 = 已购买", yxStoreCart.getIsPay()); + map.put("是否删除", yxStoreCart.getIsDel()); + map.put("是否为立即购买", yxStoreCart.getIsNew()); + map.put("拼团id", yxStoreCart.getCombinationId()); + map.put("秒杀产品ID", yxStoreCart.getSeckillId()); + map.put("砍价id", yxStoreCart.getBargainId()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public List findCateName() { + return storeCartMapper.findCateName(); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java index 13b34b60..c353e0ae 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java @@ -1,144 +1,104 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; -import cn.hutool.core.util.ObjectUtil; -import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxStoreCategory; -import co.yixiang.modules.shop.domain.YxStoreProduct; -import co.yixiang.modules.shop.repository.YxStoreCategoryRepository; -import co.yixiang.modules.shop.repository.YxStoreProductRepository; -import co.yixiang.modules.shop.service.YxStoreCategoryService; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryDTO; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxStoreCategoryMapper; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.YxStoreCategoryService; +import co.yixiang.modules.shop.service.dto.YxStoreCategoryDto; +import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria; +import co.yixiang.modules.shop.service.mapper.StoreCategoryMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import org.springframework.util.CollectionUtils; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.*; +import java.io.IOException; import java.util.stream.Collectors; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-03 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCategory") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCategoryServiceImpl implements YxStoreCategoryService { +public class YxStoreCategoryServiceImpl extends BaseServiceImpl implements YxStoreCategoryService { - private final YxStoreCategoryRepository yxStoreCategoryRepository; - private final YxStoreProductRepository yxStoreProductRepository; - - private final YxStoreCategoryMapper yxStoreCategoryMapper; - - public YxStoreCategoryServiceImpl(YxStoreCategoryRepository yxStoreCategoryRepository, - YxStoreProductRepository yxStoreProductRepository, - YxStoreCategoryMapper yxStoreCategoryMapper) { - this.yxStoreCategoryRepository = yxStoreCategoryRepository; - this.yxStoreProductRepository = yxStoreProductRepository; - this.yxStoreCategoryMapper = yxStoreCategoryMapper; - } + private final IGenerator generator; @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { + //@Cacheable + public Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", page.getList()); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreCategoryQueryCriteria criteria){ + return generator.convert(baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCategory.class, criteria)),YxStoreCategoryDto.class); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (YxStoreCategoryDTO storeCategoryDTO : queryAll) { + for (YxStoreCategoryDto yxStoreCategory : all) { Map map = new LinkedHashMap<>(); - map.put("分类名称", storeCategoryDTO.getCateName()); - map.put("分类状态", storeCategoryDTO.getIsShow() == 1 ? "启用" : "停用"); + map.put("父id", yxStoreCategory.getPid()); + map.put("分类名称", yxStoreCategory.getCateName()); + map.put("排序", yxStoreCategory.getSort()); + map.put("图标", yxStoreCategory.getPic()); + map.put("是否推荐", yxStoreCategory.getIsShow()); + map.put("添加时间", yxStoreCategory.getAddTime()); + map.put("删除状态", yxStoreCategory.getIsDel()); list.add(map); } FileUtil.downloadExcel(list, response); } @Override - public Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreCategoryRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreCategoryMapper::toDto)); - } - - @Override - public List queryAll(YxStoreCategoryQueryCriteria criteria){ - return yxStoreCategoryMapper.toDto(yxStoreCategoryRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxStoreCategoryDTO findById(Integer id) { - Optional yxStoreCategory = yxStoreCategoryRepository.findById(id); - ValidationUtil.isNull(yxStoreCategory,"YxStoreCategory","id",id); - return yxStoreCategoryMapper.toDto(yxStoreCategory.get()); - } - - @Override - public YxStoreCategoryDTO findByName(String name) { - return null; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreCategoryDTO create(YxStoreCategory resources) { - if(ObjectUtil.isNull(resources.getPid())) resources.setPid(0); - if(ObjectUtil.isNull(resources.getSort())) resources.setSort(1); - return yxStoreCategoryMapper.toDto(yxStoreCategoryRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreCategory resources) { - if(resources.getId().equals(resources.getPid())){ - throw new BadRequestException("自己不能选择自己哦"); - } - Optional optionalYxStoreCategory = yxStoreCategoryRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreCategory,"YxStoreCategory","id",resources.getId()); - YxStoreCategory yxStoreCategory = optionalYxStoreCategory.get(); - yxStoreCategory.copy(resources); - yxStoreCategoryRepository.save(yxStoreCategory); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - YxStoreCategory storeCategory = yxStoreCategoryRepository.findByPid(id); - - if(storeCategory != null) throw new BadRequestException("请先删除子类"); - YxStoreCategory category = new YxStoreCategory(); - category.setId(id); - List storeProduct = yxStoreProductRepository.findByStoreCategoryAndIsDel(category,0); - - if(!storeProduct.isEmpty()) throw new BadRequestException("此分类下有商品,不能删除"); - - yxStoreCategoryRepository.delCategory(id); - } - - - @Override - public Object buildTree(List categoryDTOS) { - Set trees = new LinkedHashSet<>(); - Set cates= new LinkedHashSet<>(); - List deptNames = categoryDTOS.stream().map(YxStoreCategoryDTO::getCateName) + public Object buildTree(List categoryDTOS) { + Set trees = new LinkedHashSet<>(); + Set cates= new LinkedHashSet<>(); + List deptNames = categoryDTOS.stream().map(YxStoreCategoryDto::getCateName) .collect(Collectors.toList()); - YxStoreCategoryDTO categoryDTO = new YxStoreCategoryDTO(); + YxStoreCategoryDto categoryDTO = new YxStoreCategoryDto(); Boolean isChild; - List categories = yxStoreCategoryRepository.findAll(); - for (YxStoreCategoryDTO deptDTO : categoryDTOS) { + List categories = this.list(); + for (YxStoreCategoryDto deptDTO : categoryDTOS) { isChild = false; if ("0".equals(deptDTO.getPid().toString())) { trees.add(deptDTO); } - for (YxStoreCategoryDTO it : categoryDTOS) { + for (YxStoreCategoryDto it : categoryDTOS) { if (it.getPid().equals(deptDTO.getId())) { isChild = true; if (deptDTO.getChildren() == null) { - deptDTO.setChildren(new ArrayList()); + deptDTO.setChildren(new ArrayList()); } deptDTO.getChildren().add(it); } @@ -166,6 +126,5 @@ public class YxStoreCategoryServiceImpl implements YxStoreCategoryService { map.put("totalElements",totalElements); map.put("content",CollectionUtils.isEmpty(trees)?categoryDTOS:trees); return map; - //return null; } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java new file mode 100644 index 00000000..94e2de4c --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java @@ -0,0 +1,80 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.impl; + +import co.yixiang.modules.shop.domain.YxStoreOrderCartInfo; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxStoreOrderCartInfoService; +import co.yixiang.modules.shop.service.dto.YxStoreOrderCartInfoDto; +import co.yixiang.modules.shop.service.dto.YxStoreOrderCartInfoQueryCriteria; +import co.yixiang.modules.shop.service.mapper.StoreOrderCartInfoMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; + +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 hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreOrderCartInfo") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreOrderCartInfoServiceImpl extends BaseServiceImpl implements YxStoreOrderCartInfoService { + + private final IGenerator generator; + + @Override + //@Cacheable + public Map queryAll(YxStoreOrderCartInfoQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreOrderCartInfoDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreOrderCartInfoQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrderCartInfo.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreOrderCartInfoDto yxStoreOrderCartInfo : all) { + Map map = new LinkedHashMap<>(); + map.put("订单id", yxStoreOrderCartInfo.getOid()); + map.put("购物车id", yxStoreOrderCartInfo.getCartId()); + map.put("商品ID", yxStoreOrderCartInfo.getProductId()); + map.put("购买东西的详细信息", yxStoreOrderCartInfo.getCartInfo()); + map.put("唯一id", yxStoreOrderCartInfo.getUnique()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderServiceImpl.java index 4cb1bece..918f4453 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderServiceImpl.java @@ -1,91 +1,79 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; import co.yixiang.enums.OrderInfoEnum; import co.yixiang.exception.BadRequestException; import co.yixiang.exception.EntityExistException; import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.repository.YxStorePinkRepository; -import co.yixiang.modules.shop.domain.StoreOrderCartInfo; -import co.yixiang.modules.shop.domain.YxStoreOrder; -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.repository.*; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.shop.domain.*; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.modules.shop.service.*; import co.yixiang.modules.shop.service.dto.*; -import co.yixiang.modules.shop.service.mapper.YxStoreOrderMapper; +import co.yixiang.modules.shop.service.mapper.StoreProductMapper; +import co.yixiang.modules.shop.service.mapper.UserMapper; import co.yixiang.mp.service.YxMiniPayService; import co.yixiang.mp.service.YxPayService; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.OrderUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.utils.*; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.binarywang.wxpay.exception.WxPayException; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.modules.shop.service.mapper.StoreOrderMapper; import lombok.extern.slf4j.Slf4j; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.math.BigDecimal; -import java.text.ParseException; import java.util.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-14 +* @date 2020-05-12 */ @Slf4j @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreOrder") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreOrderServiceImpl implements YxStoreOrderService { - - private final YxStoreOrderRepository yxStoreOrderRepository; - private final YxStoreOrderCartInfoRepository yxStoreOrderCartInfoRepository; - private final YxUserRepository userRepository; - private final YxStorePinkRepository storePinkRepository; - private final YxStoreProductRepository storeProductRepository; - private final YxStoreCartRepository yxStoreCartRepository; - - private final YxStoreOrderMapper yxStoreOrderMapper; +public class YxStoreOrderServiceImpl extends BaseServiceImpl implements YxStoreOrderService { + private final IGenerator generator; + private YxUserService userService; + private UserMapper userMapper; + private YxStorePinkService storePinkService; + private YxStoreOrderCartInfoService storeOrderCartInfoService; private final YxUserBillService yxUserBillService; private final YxStoreOrderStatusService yxStoreOrderStatusService; - private final YxUserService userService; private final YxPayService payService; private final YxMiniPayService miniPayService; private final YxSystemStoreService systemStoreService; - - public YxStoreOrderServiceImpl(YxStoreOrderRepository yxStoreOrderRepository, YxStoreOrderCartInfoRepository yxStoreOrderCartInfoRepository, YxUserRepository userRepository, - YxStorePinkRepository storePinkRepository, YxStoreOrderMapper yxStoreOrderMapper, YxUserBillService yxUserBillService, - YxStoreOrderStatusService yxStoreOrderStatusService, YxSystemStoreService systemStoreService,YxStoreCartRepository yxStoreCartRepository, - YxUserService userService, YxPayService payService, YxMiniPayService miniPayService,YxStoreProductRepository storeProductRepository) { - this.yxStoreOrderRepository = yxStoreOrderRepository; - this.yxStoreOrderCartInfoRepository = yxStoreOrderCartInfoRepository; - this.userRepository = userRepository; - this.storePinkRepository = storePinkRepository; - this.yxStoreOrderMapper = yxStoreOrderMapper; - this.yxUserBillService = yxUserBillService; - this.yxStoreOrderStatusService = yxStoreOrderStatusService; - this.userService = userService; - this.payService = payService; - this.miniPayService = miniPayService; - this.systemStoreService = systemStoreService; - this.storeProductRepository = storeProductRepository; - this.yxStoreCartRepository = yxStoreCartRepository; - } + private final YxStoreCartService storeCartService; + private final StoreOrderMapper yxStoreOrderMapper; + private final StoreProductMapper yxStoreProductMapper; @Override public OrderCountDto getOrderCount() { //获取所有订单转态为已支付的 - List nameList = yxStoreCartRepository.findCateName(); + List nameList = storeCartService.findCateName(); System.out.println("nameList:"+nameList); Map childrenMap = new HashMap<>(); nameList.forEach(i ->{ @@ -114,32 +102,32 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService { } @Override - public OrderTimeDataDTO getOrderTimeData() { + public OrderTimeDataDto getOrderTimeData() { int today = OrderUtil.dateToTimestampT(DateUtil.beginOfDay(new Date())); int yesterday = OrderUtil.dateToTimestampT(DateUtil.beginOfDay(DateUtil. yesterday())); int lastWeek = OrderUtil.dateToTimestampT(DateUtil.beginOfDay(DateUtil.lastWeek())); int nowMonth = OrderUtil.dateToTimestampT(DateUtil .beginOfMonth(new Date())); - OrderTimeDataDTO orderTimeDataDTO = new OrderTimeDataDTO(); + OrderTimeDataDto orderTimeDataDTO = new OrderTimeDataDto(); - orderTimeDataDTO.setTodayCount(yxStoreOrderRepository.countByPayTimeGreaterThanEqual(today)); - //orderTimeDataDTO.setTodayPrice(yxStoreOrderRepository.sumPrice(today)); + orderTimeDataDTO.setTodayCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(today)); + //orderTimeDataDTO.setTodayPrice(yxStoreOrderMapper.sumPrice(today)); - orderTimeDataDTO.setProCount(yxStoreOrderRepository + orderTimeDataDTO.setProCount(yxStoreOrderMapper .countByPayTimeLessThanAndPayTimeGreaterThanEqual(today,yesterday)); - //orderTimeDataDTO.setProPrice(yxStoreOrderRepository.sumTPrice(today,yesterday)); + //orderTimeDataDTO.setProPrice(yxStoreOrderMapper.sumTPrice(today,yesterday)); - orderTimeDataDTO.setLastWeekCount(yxStoreOrderRepository.countByPayTimeGreaterThanEqual(lastWeek)); - //orderTimeDataDTO.setLastWeekPrice(yxStoreOrderRepository.sumPrice(lastWeek)); + orderTimeDataDTO.setLastWeekCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(lastWeek)); + //orderTimeDataDTO.setLastWeekPrice(yxStoreOrderMapper.sumPrice(lastWeek)); - orderTimeDataDTO.setMonthCount(yxStoreOrderRepository.countByPayTimeGreaterThanEqual(nowMonth)); - //orderTimeDataDTO.setMonthPrice(yxStoreOrderRepository.sumPrice(nowMonth)); + orderTimeDataDTO.setMonthCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(nowMonth)); + //orderTimeDataDTO.setMonthPrice(yxStoreOrderMapper.sumPrice(nowMonth)); - orderTimeDataDTO.setUserCount(userRepository.count()); - orderTimeDataDTO.setOrderCount(yxStoreOrderRepository.count()); - orderTimeDataDTO.setPriceCount(yxStoreOrderRepository.sumTotalPrice()); - orderTimeDataDTO.setGoodsCount(storeProductRepository.count()); + orderTimeDataDTO.setUserCount(userMapper.selectCount(new QueryWrapper())); + orderTimeDataDTO.setOrderCount(yxStoreOrderMapper.selectCount(new QueryWrapper())); + orderTimeDataDTO.setPriceCount(yxStoreOrderMapper.sumTotalPrice()); + orderTimeDataDTO.setGoodsCount(yxStoreProductMapper.selectCount(new QueryWrapper())); return orderTimeDataDTO; } @@ -150,79 +138,248 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService { int nowMonth = OrderUtil.dateToTimestampT(DateUtil .beginOfMonth(new Date())); - map.put("chart",yxStoreOrderRepository.chartList(nowMonth)); - map.put("chartT",yxStoreOrderRepository.chartListT(nowMonth)); + map.put("chart",yxStoreOrderMapper.chartList(nowMonth)); + map.put("chartT",yxStoreOrderMapper.chartListT(nowMonth)); return map; } + @Override + //@Cacheable + public Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List storeOrderDTOS = new ArrayList<>(); + for (YxStoreOrder yxStoreOrder : page.getList()) { + orderList(storeOrderDTOS, yxStoreOrder); + + } + Map map = new LinkedHashMap<>(2); + map.put("content", storeOrderDTOS); + map.put("totalElements", page.getTotal()); + return map; + } + + /** + * 代码提取 + * @param storeOrderDTOS + * @param yxStoreOrder + */ + private void orderList(List storeOrderDTOS, YxStoreOrder yxStoreOrder) { + YxStoreOrderDto yxStoreOrderDto = generator.convert(yxStoreOrder, YxStoreOrderDto.class); + Integer _status = OrderUtil.orderStatus(yxStoreOrder.getPaid(),yxStoreOrder.getStatus(), + yxStoreOrder.getRefundStatus()); + + if(yxStoreOrder.getStoreId() > 0) { + String storeName = systemStoreService.getById(yxStoreOrder.getStoreId()).getName(); + yxStoreOrderDto.setStoreName(storeName); + } + + //订单状态 + String orderStatusStr = OrderUtil.orderStatusStr(yxStoreOrder.getPaid() + ,yxStoreOrder.getStatus(),yxStoreOrder.getShippingType() + ,yxStoreOrder.getRefundStatus()); + + if(_status == 3){ + String refundTime = OrderUtil.stampToDate(String.valueOf(yxStoreOrder + .getRefundReasonTime())); + String str = "申请退款
"+ + "退款原因:"+yxStoreOrder.getRefundReasonWap()+"
" + + "备注说明:"+yxStoreOrder.getRefundReasonWapExplain()+"
" + + "退款时间:"+refundTime+"
"; + orderStatusStr = str; + } + yxStoreOrderDto.setStatusName(orderStatusStr); + + yxStoreOrderDto.set_status(_status); + + String payTypeName = OrderUtil.payTypeName(yxStoreOrder.getPayType() + ,yxStoreOrder.getPaid()); + yxStoreOrderDto.setPayTypeName(payTypeName); + + yxStoreOrderDto.setPinkName(orderType(yxStoreOrder.getId() + ,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId() + ,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId(), + yxStoreOrder.getShippingType())); + + List cartInfos = storeOrderCartInfoService.list( + new QueryWrapper().eq("oid",yxStoreOrder.getId())); + List cartInfoDTOS = new ArrayList<>(); + for (YxStoreOrderCartInfo cartInfo : cartInfos) { + StoreOrderCartInfoDto cartInfoDTO = new StoreOrderCartInfoDto(); + cartInfoDTO.setCartInfoMap(JSON.parseObject(cartInfo.getCartInfo())); + + cartInfoDTOS.add(cartInfoDTO); + } + yxStoreOrderDto.setCartInfoList(cartInfoDTOS); + yxStoreOrderDto.setUserDTO(generator.convert(userService.getById(yxStoreOrder.getUid()), YxUserDto.class)); + if(yxStoreOrderDto.getUserDTO()==null){ + yxStoreOrderDto.setUserDTO(new YxUserDto()); + } + storeOrderDTOS.add(yxStoreOrderDto); + } + + + @Override + //@Cacheable + public List queryAll(YxStoreOrderQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrder.class, criteria)); + } @Override @Transactional(rollbackFor = Exception.class) - public void refund(YxStoreOrder resources) { - if(resources.getPayPrice().doubleValue() < 0){ - throw new BadRequestException("请输入退款金额"); + public YxStoreOrderDto create(YxStoreOrder resources) { + if(this.getOne(new QueryWrapper().eq("`unique`",resources.getUnique())) != null){ + throw new EntityExistException(YxStoreOrder.class,"unique",resources.getUnique()); } + this.save(resources); + return generator.convert(resources,YxStoreOrderDto.class); + } - if(resources.getPayType().equals("yue")){ - //修改状态 - resources.setRefundStatus(2); - resources.setRefundPrice(resources.getPayPrice()); - update(resources); - - //退款到余额 - YxUserDTO userDTO = userService.findById(resources.getUid()); - userRepository.updateMoney(resources.getPayPrice().doubleValue(), - resources.getUid()); - - YxUserBill userBill = new YxUserBill(); - userBill.setUid(resources.getUid()); - - userBill.setLinkId(resources.getId().toString()); - userBill.setPm(1); - userBill.setTitle("商品退款"); - userBill.setCategory("now_money"); - userBill.setType("pay_product_refund"); - userBill.setNumber(resources.getPayPrice()); - userBill.setBalance(NumberUtil.add(resources.getPayPrice(),userDTO.getNowMoney())); - userBill.setMark("订单退款到余额"); - userBill.setAddTime(OrderUtil.getSecondTimestampTwo()); - userBill.setStatus(1); - yxUserBillService.create(userBill); + @Override + @Transactional(rollbackFor = Exception.class) + public void update(YxStoreOrder resources) { + YxStoreOrder yxStoreOrder = this.getById(resources.getId()); + YxStoreOrder yxStoreOrder1 = this.getOne(new QueryWrapper().eq("`unique`",resources.getUnique())); + if(yxStoreOrder1 != null && !yxStoreOrder1.getId().equals(yxStoreOrder.getId())){ + throw new EntityExistException(YxStoreOrder.class,"unique",resources.getUnique()); + } + yxStoreOrder.copy(resources); + this.saveOrUpdate(yxStoreOrder); + } - YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); - storeOrderStatus.setOid(resources.getId()); - storeOrderStatus.setChangeType("refund_price"); - storeOrderStatus.setChangeMessage("退款给用户:"+resources.getPayPrice() +"元"); - storeOrderStatus.setChangeTime(OrderUtil.getSecondTimestampTwo()); + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreOrderDto yxStoreOrder : all) { + Map map = new LinkedHashMap<>(); + map.put("订单号", yxStoreOrder.getOrderId()); + map.put("用户id", yxStoreOrder.getUid()); + map.put("用户姓名", yxStoreOrder.getRealName()); + map.put("用户电话", yxStoreOrder.getUserPhone()); + map.put("详细地址", yxStoreOrder.getUserAddress()); + map.put("购物车id", yxStoreOrder.getCartId()); + map.put("运费金额", yxStoreOrder.getFreightPrice()); + map.put("订单商品总数", yxStoreOrder.getTotalNum()); + map.put("订单总价", yxStoreOrder.getTotalPrice()); + map.put("邮费", yxStoreOrder.getTotalPostage()); + map.put("实际支付金额", yxStoreOrder.getPayPrice()); + map.put("支付邮费", yxStoreOrder.getPayPostage()); + map.put("抵扣金额", yxStoreOrder.getDeductionPrice()); + map.put("优惠券id", yxStoreOrder.getCouponId()); + map.put("优惠券金额", yxStoreOrder.getCouponPrice()); + map.put("支付状态", yxStoreOrder.getPaid()); + map.put("支付时间", yxStoreOrder.getPayTime()); + map.put("支付方式", yxStoreOrder.getPayType()); + map.put("创建时间", yxStoreOrder.getAddTime()); + map.put("订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)", yxStoreOrder.getStatus()); + map.put("0 未退款 1 申请中 2 已退款", yxStoreOrder.getRefundStatus()); + map.put("退款图片", yxStoreOrder.getRefundReasonWapImg()); + map.put("退款用户说明", yxStoreOrder.getRefundReasonWapExplain()); + map.put("退款时间", yxStoreOrder.getRefundReasonTime()); + map.put("前台退款原因", yxStoreOrder.getRefundReasonWap()); + map.put("不退款的理由", yxStoreOrder.getRefundReason()); + map.put("退款金额", yxStoreOrder.getRefundPrice()); + map.put("快递公司编号", yxStoreOrder.getDeliverySn()); + map.put("快递名称/送货人姓名", yxStoreOrder.getDeliveryName()); + map.put("发货类型", yxStoreOrder.getDeliveryType()); + map.put("快递单号/手机号", yxStoreOrder.getDeliveryId()); + map.put("消费赚取积分", yxStoreOrder.getGainIntegral()); + map.put("使用积分", yxStoreOrder.getUseIntegral()); + map.put("给用户退了多少积分", yxStoreOrder.getBackIntegral()); + map.put("备注", yxStoreOrder.getMark()); + map.put("是否删除", yxStoreOrder.getIsDel()); + map.put("唯一id(md5加密)类似id", yxStoreOrder.getUnique()); + map.put("管理员备注", yxStoreOrder.getRemark()); + map.put("商户ID", yxStoreOrder.getMerId()); + map.put(" isMerCheck", yxStoreOrder.getIsMerCheck()); + map.put("拼团产品id0一般产品", yxStoreOrder.getCombinationId()); + map.put("拼团id 0没有拼团", yxStoreOrder.getPinkId()); + map.put("成本价", yxStoreOrder.getCost()); + map.put("秒杀产品ID", yxStoreOrder.getSeckillId()); + map.put("砍价id", yxStoreOrder.getBargainId()); + map.put("核销码", yxStoreOrder.getVerifyCode()); + map.put("门店id", yxStoreOrder.getStoreId()); + map.put("配送方式 1=快递 ,2=门店自提", yxStoreOrder.getShippingType()); + map.put("支付渠道(0微信公众号1微信小程序)", yxStoreOrder.getIsChannel()); + map.put(" isRemind", yxStoreOrder.getIsRemind()); + map.put(" isSystemDel", yxStoreOrder.getIsSystemDel()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } - yxStoreOrderStatusService.create(storeOrderStatus); - }else{ - BigDecimal bigDecimal = new BigDecimal("100"); - try { - if(OrderInfoEnum.PAY_CHANNEL_1.getValue().equals(resources.getIsChannel())){ - miniPayService.refundOrder(resources.getOrderId(), - bigDecimal.multiply(resources.getPayPrice()).intValue()); - }else{ - payService.refundOrder(resources.getOrderId(), - bigDecimal.multiply(resources.getPayPrice()).intValue()); - } + @Override + public Map queryAll(List ids) { + List yxStoreOrders = this.list(new QueryWrapper().in("order_id",ids)); + List storeOrderDTOS = new ArrayList<>(); + for (YxStoreOrder yxStoreOrder :yxStoreOrders) { + YxStoreOrderDto yxStoreOrderDto = generator.convert(yxStoreOrder,YxStoreOrderDto.class); - } catch (WxPayException e) { - log.info("refund-error:{}",e.getMessage()); + Integer _status = OrderUtil.orderStatus(yxStoreOrder.getPaid(),yxStoreOrder.getStatus(), + yxStoreOrder.getRefundStatus()); + + if(yxStoreOrder.getStoreId() > 0) { + String storeName = systemStoreService.getById(yxStoreOrder.getStoreId()).getName(); + yxStoreOrderDto.setStoreName(storeName); } + //订单状态 + String orderStatusStr = OrderUtil.orderStatusStr(yxStoreOrder.getPaid() + ,yxStoreOrder.getStatus(),yxStoreOrder.getShippingType() + ,yxStoreOrder.getRefundStatus()); + + if(_status == 3){ + String refundTime = OrderUtil.stampToDate(String.valueOf(yxStoreOrder + .getRefundReasonTime())); + String str = "申请退款
"+ + "退款原因:"+yxStoreOrder.getRefundReasonWap()+"
" + + "备注说明:"+yxStoreOrder.getRefundReasonWapExplain()+"
" + + "退款时间:"+refundTime+"
"; + orderStatusStr = str; + } + yxStoreOrderDto.setStatusName(orderStatusStr); + + yxStoreOrderDto.set_status(_status); + + String payTypeName = OrderUtil.payTypeName(yxStoreOrder.getPayType() + ,yxStoreOrder.getPaid()); + yxStoreOrderDto.setPayTypeName(payTypeName); + + yxStoreOrderDto.setPinkName(orderType(yxStoreOrder.getId() + ,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId() + ,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId(), + yxStoreOrder.getShippingType())); + + List cartInfos = storeOrderCartInfoService.list(new QueryWrapper().eq("oid",yxStoreOrder.getId())); + List cartInfoDTOS = new ArrayList<>(); + for (YxStoreOrderCartInfo cartInfo : cartInfos) { + StoreOrderCartInfoDto cartInfoDTO = new StoreOrderCartInfoDto(); + cartInfoDTO.setCartInfoMap(JSON.parseObject(cartInfo.getCartInfo())); + + cartInfoDTOS.add(cartInfoDTO); + } + yxStoreOrderDto.setCartInfoList(cartInfoDTOS); + yxStoreOrderDto.setUserDTO(generator.convert(userService.getOne(new QueryWrapper().eq("uid",yxStoreOrder.getUid())), YxUserDto.class)); + + storeOrderDTOS.add(yxStoreOrderDto); + } + Map map = new LinkedHashMap<>(2); + map.put("content",storeOrderDTOS); + return map; } + @Override public String orderType(int id,int pinkId, int combinationId,int seckillId, int bargainId,int shippingType) { String str = "[普通订单]"; if(pinkId > 0 || combinationId > 0){ - YxStorePink storePink = storePinkRepository.findByOrderIdKey(id); + YxStorePink storePink = storePinkService.getOne(new QueryWrapper(). + eq("order_id_key",id)); if(ObjectUtil.isNull(storePink)) { str = "[拼团订单]"; }else{ @@ -251,222 +408,63 @@ public class YxStoreOrderServiceImpl implements YxStoreOrderService { return str; } - @Override - public Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable){ - - Page page = yxStoreOrderRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - List storeOrderDTOS = new ArrayList<>(); - for (YxStoreOrder yxStoreOrder : page.getContent()) { - YxStoreOrderDTO yxStoreOrderDTO = yxStoreOrderMapper.toDto(yxStoreOrder); - - - Integer _status = OrderUtil.orderStatus(yxStoreOrder.getPaid(),yxStoreOrder.getStatus(), - yxStoreOrder.getRefundStatus()); - - if(yxStoreOrder.getStoreId() > 0) { - String storeName = systemStoreService.findById(yxStoreOrder.getStoreId()).getName(); - yxStoreOrderDTO.setStoreName(storeName); - } - - //订单状态 - String orderStatusStr = OrderUtil.orderStatusStr(yxStoreOrder.getPaid() - ,yxStoreOrder.getStatus(),yxStoreOrder.getShippingType() - ,yxStoreOrder.getRefundStatus()); - - if(_status == 3){ - String refundTime = OrderUtil.stampToDate(String.valueOf(yxStoreOrder - .getRefundReasonTime())); - String str = "申请退款
"+ - "退款原因:"+yxStoreOrder.getRefundReasonWap()+"
" + - "备注说明:"+yxStoreOrder.getRefundReasonWapExplain()+"
" + - "退款时间:"+refundTime+"
"; - orderStatusStr = str; - } - yxStoreOrderDTO.setStatusName(orderStatusStr); - - yxStoreOrderDTO.set_status(_status); - - String payTypeName = OrderUtil.payTypeName(yxStoreOrder.getPayType() - ,yxStoreOrder.getPaid()); - yxStoreOrderDTO.setPayTypeName(payTypeName); - - yxStoreOrderDTO.setPinkName(orderType(yxStoreOrder.getId() - ,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId() - ,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId(), - yxStoreOrder.getShippingType())); - - List cartInfos = yxStoreOrderCartInfoRepository - .findByOid(yxStoreOrder.getId()); - List cartInfoDTOS = new ArrayList<>(); - for (StoreOrderCartInfo cartInfo : cartInfos) { - StoreOrderCartInfoDTO cartInfoDTO = new StoreOrderCartInfoDTO(); - cartInfoDTO.setCartInfoMap(JSON.parseObject(cartInfo.getCartInfo())); - - cartInfoDTOS.add(cartInfoDTO); - } - yxStoreOrderDTO.setCartInfoList(cartInfoDTOS); - yxStoreOrderDTO.setUserDTO(userService.findById(yxStoreOrder.getUid())); - - storeOrderDTOS.add(yxStoreOrderDTO); - - } - - Map map = new LinkedHashMap<>(2); - map.put("content",storeOrderDTOS); - map.put("totalElements",page.getTotalElements()); - - return map; - } - @Override - public Map queryAll(List ids){ - List yxStoreOrders = yxStoreOrderRepository.findByOrderIdIn(ids); - List storeOrderDTOS = new ArrayList<>(); - for (YxStoreOrder yxStoreOrder :yxStoreOrders) { - YxStoreOrderDTO yxStoreOrderDTO = yxStoreOrderMapper.toDto(yxStoreOrder); - - - Integer _status = OrderUtil.orderStatus(yxStoreOrder.getPaid(),yxStoreOrder.getStatus(), - yxStoreOrder.getRefundStatus()); - - if(yxStoreOrder.getStoreId() > 0) { - String storeName = systemStoreService.findById(yxStoreOrder.getStoreId()).getName(); - yxStoreOrderDTO.setStoreName(storeName); - } - - //订单状态 - String orderStatusStr = OrderUtil.orderStatusStr(yxStoreOrder.getPaid() - ,yxStoreOrder.getStatus(),yxStoreOrder.getShippingType() - ,yxStoreOrder.getRefundStatus()); - - if(_status == 3){ - String refundTime = OrderUtil.stampToDate(String.valueOf(yxStoreOrder - .getRefundReasonTime())); - String str = "申请退款
"+ - "退款原因:"+yxStoreOrder.getRefundReasonWap()+"
" + - "备注说明:"+yxStoreOrder.getRefundReasonWapExplain()+"
" + - "退款时间:"+refundTime+"
"; - orderStatusStr = str; - } - yxStoreOrderDTO.setStatusName(orderStatusStr); - - yxStoreOrderDTO.set_status(_status); - - String payTypeName = OrderUtil.payTypeName(yxStoreOrder.getPayType() - ,yxStoreOrder.getPaid()); - yxStoreOrderDTO.setPayTypeName(payTypeName); - - yxStoreOrderDTO.setPinkName(orderType(yxStoreOrder.getId() - ,yxStoreOrder.getPinkId(),yxStoreOrder.getCombinationId() - ,yxStoreOrder.getSeckillId(),yxStoreOrder.getBargainId(), - yxStoreOrder.getShippingType())); - - List cartInfos = yxStoreOrderCartInfoRepository - .findByOid(yxStoreOrder.getId()); - List cartInfoDTOS = new ArrayList<>(); - for (StoreOrderCartInfo cartInfo : cartInfos) { - StoreOrderCartInfoDTO cartInfoDTO = new StoreOrderCartInfoDTO(); - cartInfoDTO.setCartInfoMap(JSON.parseObject(cartInfo.getCartInfo())); - - cartInfoDTOS.add(cartInfoDTO); - } - yxStoreOrderDTO.setCartInfoList(cartInfoDTOS); - yxStoreOrderDTO.setUserDTO(userService.findById(yxStoreOrder.getUid())); - - storeOrderDTOS.add(yxStoreOrderDTO); - - } - - Map map = new LinkedHashMap<>(2); - map.put("content",storeOrderDTOS); - - return map; - } - @Override - public List queryAll(YxStoreOrderQueryCriteria criteria){ - return yxStoreOrderMapper.toDto(yxStoreOrderRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxStoreOrderDTO findById(Integer id) { - Optional yxStoreOrder = yxStoreOrderRepository.findById(id); - ValidationUtil.isNull(yxStoreOrder,"YxStoreOrder","id",id); - return yxStoreOrderMapper.toDto(yxStoreOrder.get()); - } - @Override @Transactional(rollbackFor = Exception.class) - public YxStoreOrderDTO create(YxStoreOrder resources) { - if(yxStoreOrderRepository.findByUnique(resources.getUnique()) != null){ - throw new EntityExistException(YxStoreOrder.class,"unique",resources.getUnique()); + public void refund(YxStoreOrder resources) { + if(resources.getPayPrice().doubleValue() < 0){ + throw new BadRequestException("请输入退款金额"); } - return yxStoreOrderMapper.toDto(yxStoreOrderRepository.save(resources)); - } - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreOrder resources) { - Optional optionalYxStoreOrder = yxStoreOrderRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreOrder,"YxStoreOrder","id",resources.getId()); - YxStoreOrder yxStoreOrder = optionalYxStoreOrder.get(); - YxStoreOrder yxStoreOrder1 = yxStoreOrderRepository.findByUnique(resources.getUnique()); - if(yxStoreOrder1 != null && !yxStoreOrder1.getId().equals(yxStoreOrder.getId())){ - throw new EntityExistException(YxStoreOrder.class,"unique",resources.getUnique()); - } - yxStoreOrder.copy(resources); - yxStoreOrderRepository.save(yxStoreOrder); - } + if(resources.getPayType().equals("yue")){ + //修改状态 + resources.setRefundStatus(2); + resources.setRefundPrice(resources.getPayPrice()); + this.updateById(resources); - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreOrderRepository.deleteById(id); - } + //退款到余额 + YxUserDto userDTO = generator.convert(userService.getOne(new QueryWrapper().eq("uid",resources.getUid())),YxUserDto.class); + userMapper.updateMoney(resources.getPayPrice().doubleValue(), + resources.getUid()); + + YxUserBill userBill = new YxUserBill(); + userBill.setUid(resources.getUid()); + + userBill.setLinkId(resources.getId().toString()); + userBill.setPm(1); + userBill.setTitle("商品退款"); + userBill.setCategory("now_money"); + userBill.setType("pay_product_refund"); + userBill.setNumber(resources.getPayPrice()); + userBill.setBalance(NumberUtil.add(resources.getPayPrice(),userDTO.getNowMoney())); + userBill.setMark("订单退款到余额"); + userBill.setAddTime(OrderUtil.getSecondTimestampTwo()); + userBill.setStatus(1); + yxUserBillService.save(userBill); - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException, ParseException { - List> list = new ArrayList<>(); + YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); + storeOrderStatus.setOid(resources.getId()); + storeOrderStatus.setChangeType("refund_price"); + storeOrderStatus.setChangeMessage("退款给用户:"+resources.getPayPrice() +"元"); + storeOrderStatus.setChangeTime(OrderUtil.getSecondTimestampTwo()); - for (YxStoreOrderDTO storeOrderDTO : queryAll) { - List storeList = new ArrayList(); - storeList = storeOrderDTO.getCartInfoList(); - if(storeList != null){ - for(StoreOrderCartInfoDTO storeOrderCartInfoDTO : storeList){ - Map map = new LinkedHashMap<>(); - map.put("订单号", storeOrderDTO.getOrderId()); - map.put("下单时间", OrderUtil.stampToDate(storeOrderDTO.getAddTime()+"")); - map.put("订单状态", storeOrderDTO.getStatusName()); - map.put("支付状态", storeOrderDTO.getPayTypeName()); - map.put("配送费用", storeOrderDTO.getFreightPrice()); - map.put("实际支付", storeOrderDTO.getPayPrice()); - - map.put("客户编号", storeOrderDTO.getUserDTO().getAccount()); - map.put("客户名称", storeOrderDTO.getUserDTO().getNickname()); - map.put("客户类型", storeOrderDTO.getUserDTO().getUserType()); - map.put("客户手机号码", storeOrderDTO.getUserDTO().getPhone()); - map.put("是否为推广员", storeOrderDTO.getUserDTO().getIsPromoter()); - - map.put("收货人", storeOrderDTO.getRealName()); - map.put("联系电话", storeOrderDTO.getUserPhone()); - map.put("收货地址", storeOrderDTO.getUserAddress()); - - Map proInfo = ((Map)storeOrderCartInfoDTO.getCartInfoMap().get("productInfo")); - map.put("商品编号", proInfo.get("id")); - map.put("商品名称", proInfo.get("store_name")); - map.put("商品规格", proInfo.get("unit_name")); - map.put("商品库存", proInfo.get("stock")); - map.put("单价", proInfo.get("price")); - map.put("订购数量", storeOrderDTO.getTotalNum()); - map.put("小计", storeOrderDTO.getTotalPrice()); - map.put("订单备注", storeOrderDTO.getMark()); - - list.add(map); + yxStoreOrderStatusService.save(storeOrderStatus); + }else{ + BigDecimal bigDecimal = new BigDecimal("100"); + try { + if(OrderInfoEnum.PAY_CHANNEL_1.getValue().equals(resources.getIsChannel())){ + miniPayService.refundOrder(resources.getOrderId(), + bigDecimal.multiply(resources.getPayPrice()).intValue()); + }else{ + payService.refundOrder(resources.getOrderId(), + bigDecimal.multiply(resources.getPayPrice()).intValue()); } + + } catch (WxPayException e) { + log.info("refund-error:{}",e.getMessage()); } + } - FileUtil.downloadExcel(list, response); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java index 9b548931..49c0dc12 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java @@ -1,78 +1,79 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.repository.YxStoreOrderStatusRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxStoreOrderStatusService; -import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDTO; +import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDto; import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxStoreOrderStatusMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.StoreOrderStatusMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-02 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreOrderStatus") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreOrderStatusServiceImpl implements YxStoreOrderStatusService { +public class YxStoreOrderStatusServiceImpl extends BaseServiceImpl implements YxStoreOrderStatusService { - private final YxStoreOrderStatusRepository yxStoreOrderStatusRepository; - - private final YxStoreOrderStatusMapper yxStoreOrderStatusMapper; - - public YxStoreOrderStatusServiceImpl(YxStoreOrderStatusRepository yxStoreOrderStatusRepository, YxStoreOrderStatusMapper yxStoreOrderStatusMapper) { - this.yxStoreOrderStatusRepository = yxStoreOrderStatusRepository; - this.yxStoreOrderStatusMapper = yxStoreOrderStatusMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreOrderStatusRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreOrderStatusMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreOrderStatusDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreOrderStatusQueryCriteria criteria){ - return yxStoreOrderStatusMapper.toDto(yxStoreOrderStatusRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreOrderStatusDTO findById(Integer id) { - Optional yxStoreOrderStatus = yxStoreOrderStatusRepository.findById(id); - ValidationUtil.isNull(yxStoreOrderStatus,"YxStoreOrderStatus","id",id); - return yxStoreOrderStatusMapper.toDto(yxStoreOrderStatus.get()); + //@Cacheable + public List queryAll(YxStoreOrderStatusQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrderStatus.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreOrderStatusDTO create(YxStoreOrderStatus resources) { - return yxStoreOrderStatusMapper.toDto(yxStoreOrderStatusRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreOrderStatus resources) { - Optional optionalYxStoreOrderStatus = yxStoreOrderStatusRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreOrderStatus,"YxStoreOrderStatus","id",resources.getId()); - YxStoreOrderStatus yxStoreOrderStatus = optionalYxStoreOrderStatus.get(); - yxStoreOrderStatus.copy(resources); - yxStoreOrderStatusRepository.save(yxStoreOrderStatus); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreOrderStatusDto yxStoreOrderStatus : all) { + Map map = new LinkedHashMap<>(); + map.put("订单id", yxStoreOrderStatus.getOid()); + map.put("操作类型", yxStoreOrderStatus.getChangeType()); + map.put("操作备注", yxStoreOrderStatus.getChangeMessage()); + map.put("操作时间", yxStoreOrderStatus.getChangeTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreOrderStatusRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java new file mode 100644 index 00000000..7faf2913 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java @@ -0,0 +1,34 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.impl; + +import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.shop.service.YxStoreProductAttrResultService; +import co.yixiang.modules.shop.service.mapper.StoreProductAttrResultMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreProductAttrResult") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreProductAttrResultServiceImpl extends BaseServiceImpl implements YxStoreProductAttrResultService { + + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java new file mode 100644 index 00000000..f28c74b1 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.impl; + +import co.yixiang.modules.shop.domain.YxStoreProductAttr; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.shop.service.YxStoreProductAttrService; +import co.yixiang.modules.shop.service.mapper.StoreProductAttrMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreProductAttr") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreProductAttrServiceImpl extends BaseServiceImpl implements YxStoreProductAttrService { + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java new file mode 100644 index 00000000..210ef917 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.impl; + +import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.shop.service.YxStoreProductAttrValueService; +import co.yixiang.modules.shop.service.mapper.StoreProductAttrValueMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreProductAttrValue") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreProductAttrValueServiceImpl extends BaseServiceImpl implements YxStoreProductAttrValueService { + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java index 35410213..9b322660 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java @@ -1,82 +1,108 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; +import co.yixiang.modules.shop.domain.YxStoreProduct; import co.yixiang.modules.shop.domain.YxStoreProductReply; -import co.yixiang.modules.shop.repository.YxStoreProductReplyRepository; -import co.yixiang.modules.shop.service.YxStoreProductReplyService; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.shop.domain.YxUser; import co.yixiang.modules.shop.service.YxStoreProductService; import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDTO; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxStoreProductReplyService; +import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDto; import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxStoreProductReplyMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.StoreProductReplyMapper; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.*; +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; +import java.util.stream.Collector; +import java.util.stream.Collectors; /** * @author hupeng -* @date 2019-11-03 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreProductReply") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductReplyServiceImpl implements YxStoreProductReplyService { +public class YxStoreProductReplyServiceImpl extends BaseServiceImpl implements YxStoreProductReplyService { - private final YxStoreProductReplyRepository yxStoreProductReplyRepository; + private final IGenerator generator; - private final YxStoreProductReplyMapper yxStoreProductReplyMapper; + private final YxUserService yxUserService; - - - public YxStoreProductReplyServiceImpl(YxStoreProductReplyRepository yxStoreProductReplyRepository, - YxStoreProductReplyMapper yxStoreProductReplyMapper) { - this.yxStoreProductReplyRepository = yxStoreProductReplyRepository; - this.yxStoreProductReplyMapper = yxStoreProductReplyMapper; - - } + private final YxStoreProductService yxStoreProductService; @Override - public Map queryAll(YxStoreProductReplyQueryCriteria criteria, Pageable pageable){ - Page page = yxStoreProductReplyRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxStoreProductReplyMapper::toDto)); + //@Cacheable + public Map queryAll(YxStoreProductReplyQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreProductReplyDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxStoreProductReplyQueryCriteria criteria){ - return yxStoreProductReplyMapper.toDto(yxStoreProductReplyRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxStoreProductReplyDTO findById(Integer id) { - Optional yxStoreProductReply = yxStoreProductReplyRepository.findById(id); - ValidationUtil.isNull(yxStoreProductReply,"YxStoreProductReply","id",id); - return yxStoreProductReplyMapper.toDto(yxStoreProductReply.get()); + //@Cacheable + public List queryAll(YxStoreProductReplyQueryCriteria criteria){ + List storeProductReplyList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductReply.class, criteria)); + List storeProductReplys = storeProductReplyList.stream().map(i ->{ + YxStoreProductReply yxStoreProductReply = new YxStoreProductReply(); + BeanUtils.copyProperties(i,yxStoreProductReply); + yxStoreProductReply.setUser(yxUserService.getById(yxStoreProductReply.getUid()));; + yxStoreProductReply.setStoreProduct(yxStoreProductService.getById(yxStoreProductReply.getProductId())); + return yxStoreProductReply; + }).collect(Collectors.toList()); + return storeProductReplys; } - @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreProductReplyDTO create(YxStoreProductReply resources) { - return yxStoreProductReplyMapper.toDto(yxStoreProductReplyRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreProductReply resources) { - Optional optionalYxStoreProductReply = yxStoreProductReplyRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreProductReply,"YxStoreProductReply","id",resources.getId()); - YxStoreProductReply yxStoreProductReply = optionalYxStoreProductReply.get(); - yxStoreProductReply.copy(resources); - yxStoreProductReplyRepository.save(yxStoreProductReply); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreProductReplyDto yxStoreProductReply : all) { + Map map = new LinkedHashMap<>(); + map.put("用户ID", yxStoreProductReply.getUid()); + map.put("订单ID", yxStoreProductReply.getOid()); + map.put("唯一id", yxStoreProductReply.getUnique()); + map.put("产品id", yxStoreProductReply.getProductId()); + map.put("某种商品类型(普通商品、秒杀商品)", yxStoreProductReply.getReplyType()); + map.put("商品分数", yxStoreProductReply.getProductScore()); + map.put("服务分数", yxStoreProductReply.getServiceScore()); + map.put("评论内容", yxStoreProductReply.getComment()); + map.put("评论图片", yxStoreProductReply.getPics()); + map.put("评论时间", yxStoreProductReply.getAddTime()); + map.put("管理员回复内容", yxStoreProductReply.getMerchantReplyContent()); + map.put("管理员回复时间", yxStoreProductReply.getMerchantReplyTime()); + map.put("0未删除1已删除", yxStoreProductReply.getIsDel()); + map.put("0未回复1已回复", yxStoreProductReply.getIsReply()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreProductReplyRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java index ec11ebf0..f69d5623 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java @@ -1,148 +1,170 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import co.yixiang.constant.ShopConstants; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.shop.domain.YxStoreProduct; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.modules.shop.domain.YxStoreProductAttr; import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; -import co.yixiang.modules.shop.repository.*; -import co.yixiang.modules.shop.service.YxStoreProductService; +import co.yixiang.modules.shop.service.*; import co.yixiang.modules.shop.service.dto.*; -import co.yixiang.modules.shop.service.mapper.YxStoreProductMapper; -import co.yixiang.utils.OrderUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.utils.*; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.modules.shop.service.mapper.StoreProductMapper; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.math.BigDecimal; import java.util.*; +import java.io.IOException; import java.util.stream.Collectors; +import javax.servlet.http.HttpServletResponse; /** * @author hupeng -* @date 2019-10-04 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreProduct") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductServiceImpl implements YxStoreProductService { +public class YxStoreProductServiceImpl extends BaseServiceImpl implements YxStoreProductService { - private final YxStoreProductRepository yxStoreProductRepository; - private final YxStoreProductAttrRepository yxStoreProductAttrRepository; - private final YxStoreProductAttrValueRepository yxStoreProductAttrValueRepository; - private final YxStoreProductAttrResultRepository yxStoreProductAttrResultRepository; + private final IGenerator generator; - private final YxStoreProductMapper yxStoreProductMapper; + private final StoreProductMapper storeProductMapper; - public YxStoreProductServiceImpl(YxStoreProductRepository yxStoreProductRepository, - YxStoreProductAttrRepository yxStoreProductAttrRepository, YxStoreProductAttrValueRepository yxStoreProductAttrValueRepository, - YxStoreProductAttrResultRepository yxStoreProductAttrResultRepository, YxStoreProductMapper yxStoreProductMapper) { - this.yxStoreProductRepository = yxStoreProductRepository; - this.yxStoreProductAttrRepository = yxStoreProductAttrRepository; - this.yxStoreProductAttrValueRepository = yxStoreProductAttrValueRepository; - this.yxStoreProductAttrResultRepository = yxStoreProductAttrResultRepository; - this.yxStoreProductMapper = yxStoreProductMapper; - } + private final YxStoreCategoryService yxStoreCategoryService; + private final YxStoreProductAttrService yxStoreProductAttrService; + + private final YxStoreProductAttrValueService yxStoreProductAttrValueService; + + private final YxStoreProductAttrResultService yxStoreProductAttrResultService; @Override - public Map queryAll(YxStoreProductQueryCriteria criteria, Pageable pageable){ - //criteria.setIsDel(0); - Page page = yxStoreProductRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder) - ,pageable); - List storeProductDTOS = new ArrayList<>(); - for (YxStoreProduct product : page.getContent()) { - - YxStoreProductDTO yxStoreProductDTO = yxStoreProductMapper.toDto(product); - - //规格属性库存 - Integer newStock = yxStoreProductAttrValueRepository.sumStock(product.getId()); - if(newStock != null) yxStoreProductDTO.setStock(newStock); - - storeProductDTOS.add(yxStoreProductDTO); - } - Map map = new LinkedHashMap<>(2); - map.put("content",storeProductDTOS); - map.put("totalElements",page.getTotalElements()); + //@Cacheable + public Map queryAll(YxStoreProductQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxStoreProductDto.class)); + map.put("totalElements", page.getTotal()); return map; } + + @Override - public List queryAll(YxStoreProductQueryCriteria criteria){ - return yxStoreProductMapper.toDto(yxStoreProductRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + //@Cacheable + public List queryAll(YxStoreProductQueryCriteria criteria){ + List yxStoreProductList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProduct.class, criteria)); + List storeProductList = yxStoreProductList.stream().map(i ->{ + YxStoreProduct yxStoreProduct = new YxStoreProduct(); + BeanUtils.copyProperties(i,yxStoreProduct); + yxStoreProduct.setStoreCategory(yxStoreCategoryService.getById(i.getCateId())); + return yxStoreProduct; + }).collect(Collectors.toList()); + return storeProductList; + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreProductDto yxStoreProduct : all) { + Map map = new LinkedHashMap<>(); + map.put("商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", yxStoreProduct.getMerId()); + map.put("商品图片", yxStoreProduct.getImage()); + map.put("轮播图", yxStoreProduct.getSliderImage()); + map.put("商品名称", yxStoreProduct.getStoreName()); + map.put("商品简介", yxStoreProduct.getStoreInfo()); + map.put("关键字", yxStoreProduct.getKeyword()); + map.put("产品条码(一维码)", yxStoreProduct.getBarCode()); + map.put("分类id", yxStoreProduct.getCateId()); + map.put("商品价格", yxStoreProduct.getPrice()); + map.put("会员价格", yxStoreProduct.getVipPrice()); + map.put("市场价", yxStoreProduct.getOtPrice()); + map.put("邮费", yxStoreProduct.getPostage()); + map.put("单位名", yxStoreProduct.getUnitName()); + map.put("排序", yxStoreProduct.getSort()); + map.put("销量", yxStoreProduct.getSales()); + map.put("库存", yxStoreProduct.getStock()); + map.put("状态(0:未上架,1:上架)", yxStoreProduct.getIsShow()); + map.put("是否热卖", yxStoreProduct.getIsHot()); + map.put("是否优惠", yxStoreProduct.getIsBenefit()); + map.put("是否精品", yxStoreProduct.getIsBest()); + map.put("是否新品", yxStoreProduct.getIsNew()); + map.put("产品描述", yxStoreProduct.getDescription()); + map.put("添加时间", yxStoreProduct.getAddTime()); + map.put("是否包邮", yxStoreProduct.getIsPostage()); + map.put("是否删除", yxStoreProduct.getIsDel()); + map.put("商户是否代理 0不可代理1可代理", yxStoreProduct.getMerUse()); + map.put("获得积分", yxStoreProduct.getGiveIntegral()); + map.put("成本价", yxStoreProduct.getCost()); + map.put("秒杀状态 0 未开启 1已开启", yxStoreProduct.getIsSeckill()); + map.put("砍价状态 0未开启 1开启", yxStoreProduct.getIsBargain()); + map.put("是否优品推荐", yxStoreProduct.getIsGood()); + map.put("虚拟销量", yxStoreProduct.getFicti()); + map.put("浏览量", yxStoreProduct.getBrowse()); + map.put("产品二维码地址(用户小程序海报)", yxStoreProduct.getCodePath()); + map.put("淘宝京东1688类型", yxStoreProduct.getSoureLink()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override - public YxStoreProductDTO findById(Integer id) { - Optional yxStoreProduct = yxStoreProductRepository.findById(id); - ValidationUtil.isNull(yxStoreProduct,"YxStoreProduct","id",id); - return yxStoreProductMapper.toDto(yxStoreProduct.get()); + public YxStoreProduct saveProduct(YxStoreProduct storeProduct) { + storeProduct.setCateId(storeProduct.getStoreCategory().getId().toString()); + this.save(storeProduct); + return storeProduct; } @Override - @Transactional(rollbackFor = Exception.class) - public YxStoreProductDTO create(YxStoreProduct resources) { - return yxStoreProductMapper.toDto(yxStoreProductRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreProduct resources) { - Optional optionalYxStoreProduct = yxStoreProductRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxStoreProduct,"YxStoreProduct","id",resources.getId()); - YxStoreProduct yxStoreProduct = optionalYxStoreProduct.get(); - yxStoreProduct.copy(resources); - yxStoreProductRepository.save(yxStoreProduct); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxStoreProductRepository.updateDel(1,id); - } - - @Override - @Transactional(rollbackFor = Exception.class) public void recovery(Integer id) { - yxStoreProductRepository.updateDel(0,id); - yxStoreProductRepository.updateOnsale(0,id); + storeProductMapper.updateDel(0,id); + storeProductMapper.updateOnsale(0,id); } @Override - @Transactional(rollbackFor = Exception.class) - public void onSale(Integer id, Integer status) { + public void onSale(Integer id, int status) { if(status == 1){ status = 0; }else{ status = 1; } - yxStoreProductRepository.updateOnsale(status,id); + storeProductMapper.updateOnsale(status,id); } @Override - @Transactional(rollbackFor = Exception.class) - public List isFormatAttr(Integer id, String jsonStr) { + public List isFormatAttr(Integer id, String jsonStr) { if(ObjectUtil.isNull(id)) throw new BadRequestException("产品不存在"); - YxStoreProductDTO yxStoreProductDTO = findById(id); - - DetailDTO detailDTO = attrFormat(jsonStr); - - //System.out.println("list:"+detailDTO.getRes()); - List newList = new ArrayList<>(); + YxStoreProductDto yxStoreProductDTO = generator.convert(this.getById(id),YxStoreProductDto.class); + DetailDto detailDTO = attrFormat(jsonStr); + List newList = new ArrayList<>(); for (Map> map : detailDTO.getRes()) { - ProductFormatDTO productFormatDTO = new ProductFormatDTO(); - + ProductFormatDto productFormatDTO = new ProductFormatDto(); productFormatDTO.setDetail(map.get("detail")); productFormatDTO.setCost(yxStoreProductDTO.getCost().doubleValue()); productFormatDTO.setPrice(yxStoreProductDTO.getPrice().doubleValue()); @@ -150,10 +172,7 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { productFormatDTO.setPic(yxStoreProductDTO.getImage()); productFormatDTO.setCheck(false); newList.add(productFormatDTO); - } - - return newList; } @@ -162,16 +181,16 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { public void createProductAttr(Integer id, String jsonStr) { JSONObject jsonObject = JSON.parseObject(jsonStr); //System.out.println(jsonObject); - List attrList = JSON.parseArray( + List attrList = JSON.parseArray( jsonObject.get("items").toString(), - FromatDetailDTO.class); - List valueList = JSON.parseArray( + FromatDetailDto.class); + List valueList = JSON.parseArray( jsonObject.get("attrs").toString(), - ProductFormatDTO.class); + ProductFormatDto.class); List attrGroup = new ArrayList<>(); - for (FromatDetailDTO fromatDetailDTO : attrList) { + for (FromatDetailDto fromatDetailDTO : attrList) { YxStoreProductAttr yxStoreProductAttr = new YxStoreProductAttr(); yxStoreProductAttr.setProductId(id); yxStoreProductAttr.setAttrName(fromatDetailDTO.getValue()); @@ -182,7 +201,7 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { List valueGroup = new ArrayList<>(); - for (ProductFormatDTO productFormatDTO : valueList) { + for (ProductFormatDto productFormatDTO : valueList) { YxStoreProductAttrValue yxStoreProductAttrValue = new YxStoreProductAttrValue(); yxStoreProductAttrValue.setProductId(id); //productFormatDTO.getDetail().values().stream().collect(Collectors.toList()); @@ -209,10 +228,10 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { //保存属性 - yxStoreProductAttrRepository.saveAll(attrGroup); + yxStoreProductAttrService.saveBatch(attrGroup); //保存值 - yxStoreProductAttrValueRepository.saveAll(valueGroup); + yxStoreProductAttrValueService.saveBatch(valueGroup); Map map = new LinkedHashMap<>(); map.put("attr",jsonObject.get("items")); @@ -220,9 +239,7 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { //保存结果 setResult(map,id); - } - @Override @Transactional(rollbackFor = Exception.class) public void setResult(Map map,Integer id) { @@ -231,9 +248,29 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { yxStoreProductAttrResult.setResult(JSON.toJSONString(map)); yxStoreProductAttrResult.setChangeTime(OrderUtil.getSecondTimestampTwo()); - yxStoreProductAttrResultRepository.deleteByProductId(id); + yxStoreProductAttrService.remove(new QueryWrapper().eq("product_id",id)); - yxStoreProductAttrResultRepository.save(yxStoreProductAttrResult); + yxStoreProductAttrResultService.save(yxStoreProductAttrResult); + } + + @Override + public String getStoreProductAttrResult(Integer id) { + YxStoreProductAttrResult yxStoreProductAttrResult = yxStoreProductAttrResultService + .getOne(new QueryWrapper().eq("product_id",id)); + if(ObjectUtil.isNull(yxStoreProductAttrResult)) return ""; + return yxStoreProductAttrResult.getResult(); + } + + @Override + public void updateProduct(YxStoreProduct resources) { + if(resources.getStoreCategory() == null || resources.getStoreCategory().getId() == null) throw new BadRequestException("请选择分类"); + resources.setCateId(resources.getStoreCategory().getId().toString()); + this.saveOrUpdate(resources); + } + + @Override + public void delete(Integer id) { + storeProductMapper.updateDel(1,id); } @Override @@ -241,37 +278,24 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { public void clearProductAttr(Integer id,boolean isActice) { if(ObjectUtil.isNull(id)) throw new BadRequestException("产品不存在"); - yxStoreProductAttrRepository.deleteByProductId(id); - yxStoreProductAttrValueRepository.deleteByProductId(id); + yxStoreProductAttrService.remove(new QueryWrapper().eq("product_id",id)); + yxStoreProductAttrValueService.remove(new QueryWrapper().eq("product_id",id)); if(isActice){ - yxStoreProductAttrResultRepository.deleteByProductId(id); + yxStoreProductAttrResultService.remove(new QueryWrapper().eq("product_id",id)); } } - - @Override - public String getStoreProductAttrResult(Integer id) { - YxStoreProductAttrResult yxStoreProductAttrResult = yxStoreProductAttrResultRepository - .findByProductId(id); - if(ObjectUtil.isNull(yxStoreProductAttrResult)) return ""; - return yxStoreProductAttrResult.getResult(); - } - /** * 组合规则属性算法 * @param jsonStr * @return */ - public DetailDTO attrFormat(String jsonStr){ - // List returnList = new ArrayList<>(); - + public DetailDto attrFormat(String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); - List fromatDetailDTOList = JSON.parseArray(jsonObject.get("items").toString(), - FromatDetailDTO.class); + List fromatDetailDTOList = JSON.parseArray(jsonObject.get("items").toString(), + FromatDetailDto.class); List data = new ArrayList<>(); - //List>>> res =new ArrayList<>(); List>> res =new ArrayList<>(); - if(fromatDetailDTOList.size() > 1){ for (int i=0; i < fromatDetailDTOList.size() - 1;i++){ if(i == 0) data = fromatDetailDTOList.get(i).getDetail(); @@ -286,14 +310,9 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { rep2 = v + "-" + fromatDetailDTOList.get(i+1).getValue() + "_" + g; } - tmp.add(rep2); - if(i == fromatDetailDTOList.size() - 2){ - // Map>> rep4 = new LinkedHashMap<>(); Map> rep4 = new LinkedHashMap<>(); - //List> listMap = new ArrayList<>(); - //Map map1 = new LinkedHashMap<>(); Map reptemp = new LinkedHashMap<>(); for (String h : Arrays.asList(rep2.split("-"))) { List rep3 = Arrays.asList(h.split("_")); @@ -303,19 +322,12 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { }else{ reptemp.put(rep3.get(0),""); } - //listMap.add(reptemp); - } rep4.put("detail",reptemp); - - //rep4.put("detail",listMap); - res.add(rep4); } } - } - //System.out.println("tmp:"+tmp); if(!tmp.isEmpty()){ data = tmp; @@ -324,7 +336,7 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { }else{ List dataArr = new ArrayList<>(); - for (FromatDetailDTO fromatDetailDTO : fromatDetailDTOList) { + for (FromatDetailDto fromatDetailDTO : fromatDetailDTOList) { for (String str : fromatDetailDTO.getDetail()) { Map> map2 = new LinkedHashMap<>(); @@ -337,18 +349,12 @@ public class YxStoreProductServiceImpl implements YxStoreProductService { res.add(map2); } } - String s = StrUtil.join("-",dataArr); data.add(s); } - - - DetailDTO detailDTO = new DetailDTO(); + DetailDto detailDTO = new DetailDto(); detailDTO.setData(data); detailDTO.setRes(res); - - return detailDTO; } - -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java index 3588e3e1..bd319157 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java @@ -1,85 +1,85 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemConfig; -import co.yixiang.modules.shop.repository.YxSystemConfigRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.utils.*; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.modules.shop.service.YxSystemConfigService; -import co.yixiang.modules.shop.service.dto.YxSystemConfigDTO; +import co.yixiang.modules.shop.service.dto.YxSystemConfigDto; import co.yixiang.modules.shop.service.dto.YxSystemConfigQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemConfigMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.SystemConfigMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-10-10 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxSystemConfig") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemConfigServiceImpl implements YxSystemConfigService { +public class YxSystemConfigServiceImpl extends BaseServiceImpl implements YxSystemConfigService { - private final YxSystemConfigRepository yxSystemConfigRepository; + private final IGenerator generator; - private final YxSystemConfigMapper yxSystemConfigMapper; + @Override + //@Cacheable + public Map queryAll(YxSystemConfigQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxSystemConfigDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } - public YxSystemConfigServiceImpl(YxSystemConfigRepository yxSystemConfigRepository, YxSystemConfigMapper yxSystemConfigMapper) { - this.yxSystemConfigRepository = yxSystemConfigRepository; - this.yxSystemConfigMapper = yxSystemConfigMapper; + + @Override + //@Cacheable + public List queryAll(YxSystemConfigQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemConfig.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxSystemConfigDto yxSystemConfig : all) { + Map map = new LinkedHashMap<>(); + map.put("字段名称", yxSystemConfig.getMenuName()); + map.put("默认值", yxSystemConfig.getValue()); + map.put("排序", yxSystemConfig.getSort()); + map.put("是否隐藏", yxSystemConfig.getStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override - public Map queryAll(YxSystemConfigQueryCriteria criteria, Pageable pageable){ - Page page = yxSystemConfigRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxSystemConfigMapper::toDto)); + public YxSystemConfig findByKey(String key) { + return this.getOne(new QueryWrapper().eq("menu_name",key)); } - - @Override - public List queryAll(YxSystemConfigQueryCriteria criteria){ - return yxSystemConfigMapper.toDto(yxSystemConfigRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxSystemConfigDTO findById(Integer id) { - Optional yxSystemConfig = yxSystemConfigRepository.findById(id); - ValidationUtil.isNull(yxSystemConfig,"YxSystemConfig","id",id); - return yxSystemConfigMapper.toDto(yxSystemConfig.get()); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxSystemConfigDTO create(YxSystemConfig resources) { - return yxSystemConfigMapper.toDto(yxSystemConfigRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemConfig resources) { - Optional optionalYxSystemConfig = yxSystemConfigRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxSystemConfig,"YxSystemConfig","id",resources.getId()); - YxSystemConfig yxSystemConfig = optionalYxSystemConfig.get(); - yxSystemConfig.copy(resources); - yxSystemConfigRepository.save(yxSystemConfig); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxSystemConfigRepository.deleteById(id); - } - - @Override - public YxSystemConfig findByKey(String str) { - return yxSystemConfigRepository.findByMenuName(str); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java index 3e711981..3f936745 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java @@ -1,93 +1,88 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemGroupData; -import co.yixiang.modules.shop.repository.YxSystemGroupDataRepository; -import co.yixiang.modules.shop.service.YxSystemGroupDataService; -import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDTO; -import co.yixiang.modules.shop.service.dto.YxSystemGroupDataQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemGroupDataMapper; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; import com.alibaba.fastjson.JSON; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxSystemGroupDataService; +import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDto; +import co.yixiang.modules.shop.service.dto.YxSystemGroupDataQueryCriteria; +import co.yixiang.modules.shop.service.mapper.SystemGroupDataMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.*; +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 hupeng -* @date 2019-10-18 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxSystemGroupData") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemGroupDataServiceImpl implements YxSystemGroupDataService { +public class YxSystemGroupDataServiceImpl extends BaseServiceImpl implements YxSystemGroupDataService { - private final YxSystemGroupDataRepository yxSystemGroupDataRepository; - - private final YxSystemGroupDataMapper yxSystemGroupDataMapper; - - public YxSystemGroupDataServiceImpl(YxSystemGroupDataRepository yxSystemGroupDataRepository, YxSystemGroupDataMapper yxSystemGroupDataMapper) { - this.yxSystemGroupDataRepository = yxSystemGroupDataRepository; - this.yxSystemGroupDataMapper = yxSystemGroupDataMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable){ - Page page = yxSystemGroupDataRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder) - ,pageable); - List systemGroupDataDTOS = new ArrayList<>(); - for (YxSystemGroupData systemGroupData : page.getContent()) { + //@Cacheable + public Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + List systemGroupDataDTOS = new ArrayList<>(); + for (YxSystemGroupData systemGroupData : page.getList()) { - YxSystemGroupDataDTO systemGroupDataDTO = yxSystemGroupDataMapper - .toDto(systemGroupData); + YxSystemGroupDataDto systemGroupDataDTO = generator.convert(systemGroupData,YxSystemGroupDataDto.class); systemGroupDataDTO.setMap(JSON.parseObject(systemGroupData.getValue())); systemGroupDataDTOS.add(systemGroupDataDTO); } - Map map = new LinkedHashMap<>(2); map.put("content",systemGroupDataDTOS); - map.put("totalElements",page.getTotalElements()); + map.put("totalElements",page.getTotal()); return map; } - @Override - public List queryAll(YxSystemGroupDataQueryCriteria criteria){ - return yxSystemGroupDataMapper.toDto(yxSystemGroupDataRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxSystemGroupDataDTO findById(Integer id) { - Optional yxSystemGroupData = yxSystemGroupDataRepository.findById(id); - ValidationUtil.isNull(yxSystemGroupData,"YxSystemGroupData","id",id); - return yxSystemGroupDataMapper.toDto(yxSystemGroupData.get()); + //@Cacheable + public List queryAll(YxSystemGroupDataQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemGroupData.class, criteria)); } + @Override - @Transactional(rollbackFor = Exception.class) - public YxSystemGroupDataDTO create(YxSystemGroupData resources) { - if(resources.getStatus() == null){ - resources.setStatus(1); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxSystemGroupDataDto yxSystemGroupData : all) { + Map map = new LinkedHashMap<>(); + map.put("对应的数据名称", yxSystemGroupData.getGroupName()); + map.put("数据组对应的数据值(json数据)", yxSystemGroupData.getValue()); + map.put("添加数据时间", yxSystemGroupData.getAddTime()); + map.put("数据排序", yxSystemGroupData.getSort()); + map.put("状态(1:开启;2:关闭;)", yxSystemGroupData.getStatus()); + list.add(map); } - return yxSystemGroupDataMapper.toDto(yxSystemGroupDataRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemGroupData resources) { - Optional optionalYxSystemGroupData = yxSystemGroupDataRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxSystemGroupData,"YxSystemGroupData","id",resources.getId()); - YxSystemGroupData yxSystemGroupData = optionalYxSystemGroupData.get(); - yxSystemGroupData.copy(resources); - yxSystemGroupDataRepository.save(yxSystemGroupData); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxSystemGroupDataRepository.deleteById(id); + FileUtil.downloadExcel(list, response); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java index 84cbfe31..6c63a8ad 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java @@ -1,13 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemStore; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.utils.FileUtil; -import co.yixiang.modules.shop.repository.YxSystemStoreRepository; import co.yixiang.modules.shop.service.YxSystemStoreService; import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemStoreMapper; +import co.yixiang.modules.shop.service.mapper.SystemStoreMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -15,10 +23,8 @@ import org.springframework.transaction.annotation.Transactional; //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; @@ -28,67 +34,34 @@ import java.util.LinkedHashMap; /** * @author hupeng -* @date 2020-03-03 +* @date 2020-05-12 */ @Service +@AllArgsConstructor //@CacheConfig(cacheNames = "yxSystemStore") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemStoreServiceImpl implements YxSystemStoreService { +public class YxSystemStoreServiceImpl extends BaseServiceImpl implements YxSystemStoreService { - private final YxSystemStoreRepository yxSystemStoreRepository; - - private final YxSystemStoreMapper yxSystemStoreMapper; - - public YxSystemStoreServiceImpl(YxSystemStoreRepository yxSystemStoreRepository, YxSystemStoreMapper yxSystemStoreMapper) { - this.yxSystemStoreRepository = yxSystemStoreRepository; - this.yxSystemStoreMapper = yxSystemStoreMapper; - } + private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxSystemStoreQueryCriteria criteria, Pageable pageable){ - Page page = yxSystemStoreRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxSystemStoreMapper::toDto)); + public Map queryAll(YxSystemStoreQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxSystemStoreDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + @Override //@Cacheable - public List queryAll(YxSystemStoreQueryCriteria criteria){ - return yxSystemStoreMapper.toDto(yxSystemStoreRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public List queryAll(YxSystemStoreQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemStore.class, criteria)); } - @Override - //@Cacheable(key = "#p0") - public YxSystemStoreDto findById(Integer id) { - YxSystemStore yxSystemStore = yxSystemStoreRepository.findById(id).orElseGet(YxSystemStore::new); - ValidationUtil.isNull(yxSystemStore.getId(),"YxSystemStore","id",id); - return yxSystemStoreMapper.toDto(yxSystemStore); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public YxSystemStoreDto create(YxSystemStore resources) { - return yxSystemStoreMapper.toDto(yxSystemStoreRepository.save(resources)); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemStore resources) { - YxSystemStore yxSystemStore = yxSystemStoreRepository.findById(resources.getId()).orElseGet(YxSystemStore::new); - ValidationUtil.isNull( yxSystemStore.getId(),"YxSystemStore","id",resources.getId()); - yxSystemStore.copy(resources); - yxSystemStoreRepository.save(yxSystemStore); - } - - @Override - //@CacheEvict(allEntries = true) - public void deleteAll(Integer[] ids) { - for (Integer id : ids) { - yxSystemStoreRepository.deleteById(id); - } - } @Override public void download(List all, HttpServletResponse response) throws IOException { @@ -112,4 +85,4 @@ public class YxSystemStoreServiceImpl implements YxSystemStoreService { } FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java index a1ba489f..4e9e73f3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java @@ -1,14 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemStoreStaff; -import co.yixiang.modules.shop.service.YxSystemStoreService; -import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; -import co.yixiang.utils.*; -import co.yixiang.modules.shop.repository.YxSystemStoreStaffRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxSystemStoreStaffService; import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemStoreStaffMapper; +import co.yixiang.modules.shop.service.mapper.SystemStoreStaffMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -16,7 +23,6 @@ import org.springframework.transaction.annotation.Transactional; //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 java.util.List; @@ -28,77 +34,34 @@ import java.util.LinkedHashMap; /** * @author hupeng -* @date 2020-03-22 +* @date 2020-05-12 */ @Service +@AllArgsConstructor //@CacheConfig(cacheNames = "yxSystemStoreStaff") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemStoreStaffServiceImpl implements YxSystemStoreStaffService { +public class YxSystemStoreStaffServiceImpl extends BaseServiceImpl implements YxSystemStoreStaffService { - private final YxSystemStoreStaffRepository yxSystemStoreStaffRepository; - - private final YxSystemStoreStaffMapper yxSystemStoreStaffMapper; - - private final YxSystemStoreService systemStoreService; - - public YxSystemStoreStaffServiceImpl(YxSystemStoreStaffRepository yxSystemStoreStaffRepository, - YxSystemStoreStaffMapper yxSystemStoreStaffMapper, - YxSystemStoreService systemStoreService) { - this.yxSystemStoreStaffRepository = yxSystemStoreStaffRepository; - this.yxSystemStoreStaffMapper = yxSystemStoreStaffMapper; - this.systemStoreService = systemStoreService; - } + private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable){ - Page page = yxSystemStoreStaffRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxSystemStoreStaffMapper::toDto)); + public Map queryAll(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxSystemStoreStaffDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + @Override //@Cacheable - public List queryAll(YxSystemStoreStaffQueryCriteria criteria){ - return yxSystemStoreStaffMapper.toDto(yxSystemStoreStaffRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public List queryAll(YxSystemStoreStaffQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemStoreStaff.class, criteria)); } - @Override - //@Cacheable(key = "#p0") - public YxSystemStoreStaffDto findById(Integer id) { - YxSystemStoreStaff yxSystemStoreStaff = yxSystemStoreStaffRepository.findById(id).orElseGet(YxSystemStoreStaff::new); - ValidationUtil.isNull(yxSystemStoreStaff.getId(),"YxSystemStoreStaff","id",id); - return yxSystemStoreStaffMapper.toDto(yxSystemStoreStaff); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public YxSystemStoreStaffDto create(YxSystemStoreStaff resources) { - YxSystemStoreDto systemStoreDto = systemStoreService.findById(resources.getStoreId()); - resources.setStoreName(systemStoreDto.getName()); - resources.setAddTime(OrderUtil.getSecondTimestampTwo()); - return yxSystemStoreStaffMapper.toDto(yxSystemStoreStaffRepository.save(resources)); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemStoreStaff resources) { - YxSystemStoreDto systemStoreDto = systemStoreService.findById(resources.getStoreId()); - resources.setStoreName(systemStoreDto.getName()); - YxSystemStoreStaff yxSystemStoreStaff = yxSystemStoreStaffRepository.findById(resources.getId()).orElseGet(YxSystemStoreStaff::new); - ValidationUtil.isNull( yxSystemStoreStaff.getId(),"YxSystemStoreStaff","id",resources.getId()); - yxSystemStoreStaff.copy(resources); - yxSystemStoreStaffRepository.save(yxSystemStoreStaff); - } - - @Override - //@CacheEvict(allEntries = true) - public void deleteAll(Integer[] ids) { - for (Integer id : ids) { - yxSystemStoreStaffRepository.deleteById(id); - } - } @Override public void download(List all, HttpServletResponse response) throws IOException { @@ -119,4 +82,4 @@ public class YxSystemStoreStaffServiceImpl implements YxSystemStoreStaffService } FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java index 9a3d27a6..1f51ea9b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java @@ -1,79 +1,89 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import co.yixiang.modules.shop.repository.YxSystemUserLevelRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxSystemUserLevelService; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDTO; +import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDto; import co.yixiang.modules.shop.service.dto.YxSystemUserLevelQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemUserLevelMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.SystemUserLevelMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxSystemUserLevel") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemUserLevelServiceImpl implements YxSystemUserLevelService { +public class YxSystemUserLevelServiceImpl extends BaseServiceImpl implements YxSystemUserLevelService { - private final YxSystemUserLevelRepository yxSystemUserLevelRepository; - - private final YxSystemUserLevelMapper yxSystemUserLevelMapper; - - public YxSystemUserLevelServiceImpl(YxSystemUserLevelRepository yxSystemUserLevelRepository, YxSystemUserLevelMapper yxSystemUserLevelMapper) { - this.yxSystemUserLevelRepository = yxSystemUserLevelRepository; - this.yxSystemUserLevelMapper = yxSystemUserLevelMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxSystemUserLevelQueryCriteria criteria, Pageable pageable){ - Page page = yxSystemUserLevelRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxSystemUserLevelMapper::toDto)); + //@Cacheable + public Map queryAll(YxSystemUserLevelQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxSystemUserLevelDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxSystemUserLevelQueryCriteria criteria){ - return yxSystemUserLevelMapper.toDto(yxSystemUserLevelRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxSystemUserLevelDTO findById(Integer id) { - Optional yxSystemUserLevel = yxSystemUserLevelRepository.findById(id); - ValidationUtil.isNull(yxSystemUserLevel,"YxSystemUserLevel","id",id); - return yxSystemUserLevelMapper.toDto(yxSystemUserLevel.get()); + //@Cacheable + public List queryAll(YxSystemUserLevelQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemUserLevel.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxSystemUserLevelDTO create(YxSystemUserLevel resources) { - return yxSystemUserLevelMapper.toDto(yxSystemUserLevelRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemUserLevel resources) { - Optional optionalYxSystemUserLevel = yxSystemUserLevelRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxSystemUserLevel,"YxSystemUserLevel","id",resources.getId()); - YxSystemUserLevel yxSystemUserLevel = optionalYxSystemUserLevel.get(); - yxSystemUserLevel.copy(resources); - yxSystemUserLevelRepository.save(yxSystemUserLevel); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxSystemUserLevelDto yxSystemUserLevel : all) { + Map map = new LinkedHashMap<>(); + map.put("商户id", yxSystemUserLevel.getMerId()); + map.put("会员名称", yxSystemUserLevel.getName()); + map.put("购买金额", yxSystemUserLevel.getMoney()); + map.put("有效时间", yxSystemUserLevel.getValidDate()); + map.put("是否为永久会员", yxSystemUserLevel.getIsForever()); + map.put("是否购买,1=购买,0=不购买", yxSystemUserLevel.getIsPay()); + map.put("是否显示 1=显示,0=隐藏", yxSystemUserLevel.getIsShow()); + map.put("会员等级", yxSystemUserLevel.getGrade()); + map.put("享受折扣", yxSystemUserLevel.getDiscount()); + map.put("会员卡背景", yxSystemUserLevel.getImage()); + map.put("会员图标", yxSystemUserLevel.getIcon()); + map.put("说明", yxSystemUserLevel.getExplain()); + map.put("添加时间", yxSystemUserLevel.getAddTime()); + map.put("是否删除.1=删除,0=未删除", yxSystemUserLevel.getIsDel()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxSystemUserLevelRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserTaskServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserTaskServiceImpl.java index ec3ddaaa..2766b4c6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserTaskServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserTaskServiceImpl.java @@ -1,115 +1,90 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxSystemUserTask; -import co.yixiang.modules.shop.repository.YxSystemUserTaskRepository; -import co.yixiang.modules.shop.service.YxSystemUserLevelService; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxSystemUserTaskService; -import co.yixiang.modules.shop.service.dto.YxSystemUserTaskDTO; +import co.yixiang.modules.shop.service.dto.YxSystemUserTaskDto; import co.yixiang.modules.shop.service.dto.YxSystemUserTaskQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxSystemUserTaskMapper; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.SystemUserTaskMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-12-04 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxSystemUserTask") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxSystemUserTaskServiceImpl implements YxSystemUserTaskService { +public class YxSystemUserTaskServiceImpl extends BaseServiceImpl implements YxSystemUserTaskService { - private final YxSystemUserTaskRepository yxSystemUserTaskRepository; - - private final YxSystemUserTaskMapper yxSystemUserTaskMapper; - - private final YxSystemUserLevelService systemUserLevelService; - - public YxSystemUserTaskServiceImpl(YxSystemUserTaskRepository yxSystemUserTaskRepository, YxSystemUserTaskMapper yxSystemUserTaskMapper, YxSystemUserLevelService systemUserLevelService) { - this.yxSystemUserTaskRepository = yxSystemUserTaskRepository; - this.yxSystemUserTaskMapper = yxSystemUserTaskMapper; - this.systemUserLevelService = systemUserLevelService; - } + private final IGenerator generator; @Override - public Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable){ - - Page page = yxSystemUserTaskRepository - .findAll((root, criteriaQuery, criteriaBuilder) - -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - - List systemUserTaskDTOS = yxSystemUserTaskMapper - .toDto(page.getContent()); - for (YxSystemUserTaskDTO systemUserTaskDTO : systemUserTaskDTOS) { - systemUserTaskDTO.setLevalName(systemUserLevelService - .findById(systemUserTaskDTO.getLevelId()).getName()); + //@Cacheable + public Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List systemUserTaskDTOS = generator.convert(page.getList(),YxSystemUserTaskDto.class); + for (YxSystemUserTaskDto systemUserTaskDTO : systemUserTaskDTOS) { + systemUserTaskDTO.setLevalName(this + .getById(systemUserTaskDTO.getLevelId()).getName()); } - - Map map = new LinkedHashMap<>(2); - map.put("content",systemUserTaskDTOS); - map.put("totalElements",page.getTotalElements()); - + Map map = new LinkedHashMap<>(2); + map.put("content", systemUserTaskDTOS); + map.put("totalElements", page.getTotal()); return map; - } + @Override - public List queryAll(YxSystemUserTaskQueryCriteria criteria){ - return yxSystemUserTaskMapper.toDto(yxSystemUserTaskRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + //@Cacheable + public List queryAll(YxSystemUserTaskQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemUserTask.class, criteria)); } - @Override - public YxSystemUserTaskDTO findById(Integer id) { - Optional yxSystemUserTask = yxSystemUserTaskRepository.findById(id); - ValidationUtil.isNull(yxSystemUserTask,"YxSystemUserTask","id",id); - return yxSystemUserTaskMapper.toDto(yxSystemUserTask.get()); - } @Override - @Transactional(rollbackFor = Exception.class) - public YxSystemUserTaskDTO create(YxSystemUserTask resources) { - return yxSystemUserTaskMapper.toDto(yxSystemUserTaskRepository.save(resources)); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxSystemUserTaskDto yxSystemUserTask : all) { + Map map = new LinkedHashMap<>(); + map.put("任务名称", yxSystemUserTask.getName()); + map.put("配置原名", yxSystemUserTask.getRealName()); + map.put("任务类型", yxSystemUserTask.getTaskType()); + map.put("限定数", yxSystemUserTask.getNumber()); + map.put("等级id", yxSystemUserTask.getLevelId()); + map.put("排序", yxSystemUserTask.getSort()); + map.put("是否显示", yxSystemUserTask.getIsShow()); + map.put("是否务必达成任务,1务必达成,0=满足其一", yxSystemUserTask.getIsMust()); + map.put("任务说明", yxSystemUserTask.getIllustrate()); + map.put("新增时间", yxSystemUserTask.getAddTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxSystemUserTask resources) { - Optional optionalYxSystemUserTask = yxSystemUserTaskRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxSystemUserTask,"YxSystemUserTask","id",resources.getId()); - YxSystemUserTask yxSystemUserTask = optionalYxSystemUserTask.get(); - yxSystemUserTask.copy(resources); - yxSystemUserTaskRepository.save(yxSystemUserTask); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxSystemUserTaskRepository.deleteById(id); - } - - /** - * 任务类型 - * @return - */ - @Override - public List> getTaskType() { - List> list = null; - Map map = new LinkedHashMap<>(); - map.put("type","SatisfactionIntegral"); - map.put("type","SatisfactionIntegral"); - map.put("type","SatisfactionIntegral"); - map.put("type","SatisfactionIntegral"); - map.put("type","SatisfactionIntegral"); - map.put("type","SatisfactionIntegral"); - return null; - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserBillServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserBillServiceImpl.java index 994d8f4c..8b23a276 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserBillServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserBillServiceImpl.java @@ -1,82 +1,88 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.repository.YxUserBillRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxUserBillService; -import co.yixiang.modules.shop.service.dto.YxUserBillDTO; +import co.yixiang.modules.shop.service.dto.YxUserBillDto; import co.yixiang.modules.shop.service.dto.YxUserBillQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxUserBillMapper; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.UserBillMapper; +import org.apache.xmlbeans.impl.xb.xmlconfig.Qnametargetlist; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-11-06 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxUserBill") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserBillServiceImpl implements YxUserBillService { +public class YxUserBillServiceImpl extends BaseServiceImpl implements YxUserBillService { - private final YxUserBillRepository yxUserBillRepository; - - private final YxUserBillMapper yxUserBillMapper; - - public YxUserBillServiceImpl(YxUserBillRepository yxUserBillRepository, YxUserBillMapper yxUserBillMapper) { - this.yxUserBillRepository = yxUserBillRepository; - this.yxUserBillMapper = yxUserBillMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxUserBillQueryCriteria criteria, Pageable pageable){ - Page page = yxUserBillRepository.findAllByPageable(criteria.getCategory() - ,criteria.getType(),criteria.getNickname(),pageable); - Map map = new LinkedHashMap<>(2); - map.put("content",page.getContent()); - map.put("totalElements",page.getTotalElements()); + //@Cacheable + public Map queryAll(YxUserBillQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", page.getList()); + map.put("totalElements", page.getTotal()); return map; } - @Override - public List queryAll(YxUserBillQueryCriteria criteria){ - return yxUserBillMapper.toDto(yxUserBillRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxUserBillDTO findById(Integer id) { - Optional yxUserBill = yxUserBillRepository.findById(id); - ValidationUtil.isNull(yxUserBill,"YxUserBill","id",id); - return yxUserBillMapper.toDto(yxUserBill.get()); + //@Cacheable + public List queryAll(YxUserBillQueryCriteria criteria){ + + return baseMapper.findAllByQueryCriteria(criteria.getCategory(),criteria.getType(),criteria.getNickname()); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxUserBillDTO create(YxUserBill resources) { - return yxUserBillMapper.toDto(yxUserBillRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxUserBill resources) { - Optional optionalYxUserBill = yxUserBillRepository.findById(resources.getId()); - ValidationUtil.isNull( optionalYxUserBill,"YxUserBill","id",resources.getId()); - YxUserBill yxUserBill = optionalYxUserBill.get(); - yxUserBill.copy(resources); - yxUserBillRepository.save(yxUserBill); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxUserBillDto yxUserBill : all) { + Map map = new LinkedHashMap<>(); + map.put("用户uid", yxUserBill.getUid()); + map.put("关联id", yxUserBill.getLinkId()); + map.put("0 = 支出 1 = 获得", yxUserBill.getPm()); + map.put("账单标题", yxUserBill.getTitle()); + map.put("明细种类", yxUserBill.getCategory()); + map.put("明细类型", yxUserBill.getType()); + map.put("明细数字", yxUserBill.getNumber()); + map.put("剩余", yxUserBill.getBalance()); + map.put("备注", yxUserBill.getMark()); + map.put("添加时间", yxUserBill.getAddTime()); + map.put("0 = 带确定 1 = 有效 -1 = 无效", yxUserBill.getStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer id) { - yxUserBillRepository.deleteById(id); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java index 8a50b417..6aef02f3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java @@ -1,25 +1,30 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxUserRecharge; -import co.yixiang.utils.ValidationUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.utils.FileUtil; -import co.yixiang.modules.shop.repository.YxUserRechargeRepository; import co.yixiang.modules.shop.service.YxUserRechargeService; import co.yixiang.modules.shop.service.dto.YxUserRechargeDto; import co.yixiang.modules.shop.service.dto.YxUserRechargeQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxUserRechargeMapper; +import co.yixiang.modules.shop.service.mapper.UserRechargeMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import co.yixiang.exception.EntityExistException; // 默认不使用缓存 //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; @@ -29,61 +34,34 @@ import java.util.LinkedHashMap; /** * @author hupeng -* @date 2020-03-02 +* @date 2020-05-12 */ @Service +@AllArgsConstructor //@CacheConfig(cacheNames = "yxUserRecharge") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserRechargeServiceImpl implements YxUserRechargeService { +public class YxUserRechargeServiceImpl extends BaseServiceImpl implements YxUserRechargeService { - private final YxUserRechargeRepository yxUserRechargeRepository; - - private final YxUserRechargeMapper yxUserRechargeMapper; - - public YxUserRechargeServiceImpl(YxUserRechargeRepository yxUserRechargeRepository, YxUserRechargeMapper yxUserRechargeMapper) { - this.yxUserRechargeRepository = yxUserRechargeRepository; - this.yxUserRechargeMapper = yxUserRechargeMapper; - } + private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxUserRechargeQueryCriteria criteria, Pageable pageable){ - Page page = yxUserRechargeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxUserRechargeMapper::toDto)); + public Map queryAll(YxUserRechargeQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxUserRechargeDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + @Override //@Cacheable - public List queryAll(YxUserRechargeQueryCriteria criteria){ - return yxUserRechargeMapper.toDto(yxUserRechargeRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public List queryAll(YxUserRechargeQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserRecharge.class, criteria)); } - @Override - //@Cacheable(key = "#p0") - public YxUserRechargeDto findById(Integer id) { - YxUserRecharge yxUserRecharge = yxUserRechargeRepository.findById(id).orElseGet(YxUserRecharge::new); - ValidationUtil.isNull(yxUserRecharge.getId(),"YxUserRecharge","id",id); - return yxUserRechargeMapper.toDto(yxUserRecharge); - } - - @Override - //@CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public YxUserRechargeDto create(YxUserRecharge resources) { - if(yxUserRechargeRepository.findByOrderId(resources.getOrderId()) != null){ - throw new EntityExistException(YxUserRecharge.class,"order_id",resources.getOrderId()); - } - return yxUserRechargeMapper.toDto(yxUserRechargeRepository.save(resources)); - } - - - @Override - //@CacheEvict(allEntries = true) - public void deleteAll(Integer[] ids) { - for (Integer id : ids) { - yxUserRechargeRepository.deleteById(id); - } - } @Override public void download(List all, HttpServletResponse response) throws IOException { @@ -103,4 +81,4 @@ public class YxUserRechargeServiceImpl implements YxUserRechargeService { } FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserServiceImpl.java index 8619c11e..7b09ac5a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserServiceImpl.java @@ -1,54 +1,137 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import cn.hutool.core.util.NumberUtil; import co.yixiang.modules.shop.domain.YxUser; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.repository.YxUserRepository; import co.yixiang.modules.shop.service.YxUserBillService; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.UserMoneyDTO; -import co.yixiang.modules.shop.service.dto.YxUserDTO; -import co.yixiang.modules.shop.service.dto.YxUserQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxUserMapper; +import co.yixiang.modules.shop.service.dto.UserMoneyDto; import co.yixiang.utils.OrderUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxUserService; +import co.yixiang.modules.shop.service.dto.YxUserDto; +import co.yixiang.modules.shop.service.dto.YxUserQueryCriteria; +import co.yixiang.modules.shop.service.mapper.UserMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.math.BigDecimal; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-10-06 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserServiceImpl implements YxUserService { +public class YxUserServiceImpl extends BaseServiceImpl implements YxUserService { - private final YxUserRepository yxUserRepository; + private final IGenerator generator; - private final YxUserMapper yxUserMapper; + private final UserMapper yxUserMapper; private final YxUserBillService yxUserBillService; - public YxUserServiceImpl(YxUserRepository yxUserRepository, YxUserMapper yxUserMapper, YxUserBillService yxUserBillService) { - this.yxUserRepository = yxUserRepository; - this.yxUserMapper = yxUserMapper; - this.yxUserBillService = yxUserBillService; + @Override + //@Cacheable + public Map queryAll(YxUserQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxUserDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxUserQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUser.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxUserDto yxUser : all) { + Map map = new LinkedHashMap<>(); + map.put("用户账户(跟accout一样)", yxUser.getUsername()); + map.put("用户账号", yxUser.getAccount()); + map.put("用户密码(跟pwd)", yxUser.getPassword()); + map.put("用户密码", yxUser.getPwd()); + map.put("真实姓名", yxUser.getRealName()); + map.put("生日", yxUser.getBirthday()); + map.put("身份证号码", yxUser.getCardId()); + map.put("用户备注", yxUser.getMark()); + map.put("合伙人id", yxUser.getPartnerId()); + map.put("用户分组id", yxUser.getGroupId()); + map.put("用户昵称", yxUser.getNickname()); + map.put("用户头像", yxUser.getAvatar()); + map.put("手机号码", yxUser.getPhone()); + map.put("添加时间", yxUser.getAddTime()); + map.put("添加ip", yxUser.getAddIp()); + map.put("最后一次登录时间", yxUser.getLastTime()); + map.put("最后一次登录ip", yxUser.getLastIp()); + map.put("用户余额", yxUser.getNowMoney()); + map.put("佣金金额", yxUser.getBrokeragePrice()); + map.put("用户剩余积分", yxUser.getIntegral()); + map.put("连续签到天数", yxUser.getSignNum()); + map.put("1为正常,0为禁止", yxUser.getStatus()); + map.put("等级", yxUser.getLevel()); + map.put("推广元id", yxUser.getSpreadUid()); + map.put("推广员关联时间", yxUser.getSpreadTime()); + map.put("用户类型", yxUser.getUserType()); + map.put("是否为推广员", yxUser.getIsPromoter()); + map.put("用户购买次数", yxUser.getPayCount()); + map.put("下级人数", yxUser.getSpreadCount()); + map.put("清理会员时间", yxUser.getCleanTime()); + map.put("详细地址", yxUser.getAddres()); + map.put("管理员编号 ", yxUser.getAdminid()); + map.put("用户登陆类型,h5,wechat,routine", yxUser.getLoginType()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } @Override @Transactional(rollbackFor = Exception.class) - public void updateMoney(UserMoneyDTO param) { - YxUserDTO userDTO = findById(param.getUid()); + public void onStatus(Integer uid, int status) { + if(status == 1){ + status = 0; + }else{ + status = 1; + } + + yxUserMapper.updateOnstatus(status,uid); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateMoney(UserMoneyDto param) { + YxUserDto userDTO = generator.convert(getById(param.getUid()),YxUserDto.class); Double newMoney = 0d; String mark = ""; String type = "system_add"; @@ -69,7 +152,7 @@ public class YxUserServiceImpl implements YxUserService { YxUser user = new YxUser(); user.setUid(userDTO.getUid()); user.setNowMoney(BigDecimal.valueOf(newMoney)); - update(user); + saveOrUpdate(user); YxUserBill userBill = new YxUserBill(); userBill.setUid(userDTO.getUid()); @@ -83,68 +166,11 @@ public class YxUserServiceImpl implements YxUserService { userBill.setMark(mark); userBill.setAddTime(OrderUtil.getSecondTimestampTwo()); userBill.setStatus(1); - yxUserBillService.create(userBill); + yxUserBillService.save(userBill); } @Override - public Map queryAll(YxUserQueryCriteria criteria, Pageable pageable){ - Page page = yxUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxUserMapper::toDto)); - } - - @Override - public List queryAll(YxUserQueryCriteria criteria){ - return yxUserMapper.toDto(yxUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public YxUserDTO findById(Integer uid) { - Optional yxUser = yxUserRepository.findById(uid); -// ValidationUtil.isNull(yxUser,"YxUser","uid",uid); - if(yxUser.isPresent()){ - return yxUserMapper.toDto(yxUser.get()); - } - return new YxUserDTO(); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public YxUserDTO create(YxUser resources) { - return yxUserMapper.toDto(yxUserRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxUser resources) { - Optional optionalYxUser = yxUserRepository.findById(resources.getUid()); - ValidationUtil.isNull( optionalYxUser,"YxUser","id",resources.getUid()); - YxUser yxUser = optionalYxUser.get(); - yxUser.copy(resources); - yxUserRepository.save(yxUser); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer uid) { - yxUserRepository.deleteById(uid); - } - - - @Override - @Transactional(rollbackFor = Exception.class) - public void onStatus(Integer uid, Integer status) { - if(status == 1){ - status = 0; - }else{ - status = 1; - } - - yxUserRepository.updateOnstatus(status,uid); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void incBrokeragePrice(double price, int uid) { - yxUserRepository.incBrokeragePrice(price,uid); + public void incBrokeragePrice(double price, Integer uid) { + yxUserMapper.incBrokeragePrice(price,uid); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxWechatUserServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxWechatUserServiceImpl.java index 68fdda5f..1e2d113a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxWechatUserServiceImpl.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxWechatUserServiceImpl.java @@ -1,78 +1,98 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.impl; import co.yixiang.modules.shop.domain.YxWechatUser; -import co.yixiang.modules.shop.repository.YxWechatUserRepository; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.shop.service.YxWechatUserService; -import co.yixiang.modules.shop.service.dto.YxWechatUserDTO; +import co.yixiang.modules.shop.service.dto.YxWechatUserDto; import co.yixiang.modules.shop.service.dto.YxWechatUserQueryCriteria; -import co.yixiang.modules.shop.service.mapper.YxWechatUserMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.shop.service.mapper.WechatUserMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import java.util.List; import java.util.Map; -import java.util.Optional; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** * @author hupeng -* @date 2019-12-13 +* @date 2020-05-12 */ @Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxWechatUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxWechatUserServiceImpl implements YxWechatUserService { +public class YxWechatUserServiceImpl extends BaseServiceImpl implements YxWechatUserService { - private final YxWechatUserRepository yxWechatUserRepository; - - private final YxWechatUserMapper yxWechatUserMapper; - - public YxWechatUserServiceImpl(YxWechatUserRepository yxWechatUserRepository, YxWechatUserMapper yxWechatUserMapper) { - this.yxWechatUserRepository = yxWechatUserRepository; - this.yxWechatUserMapper = yxWechatUserMapper; - } + private final IGenerator generator; @Override - public Map queryAll(YxWechatUserQueryCriteria criteria, Pageable pageable){ - Page page = yxWechatUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(yxWechatUserMapper::toDto)); + //@Cacheable + public Map queryAll(YxWechatUserQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxWechatUserDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(YxWechatUserQueryCriteria criteria){ - return yxWechatUserMapper.toDto(yxWechatUserRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - public YxWechatUserDTO findById(Integer uid) { - Optional yxWechatUser = yxWechatUserRepository.findById(uid); - ValidationUtil.isNull(yxWechatUser,"YxWechatUser","uid",uid); - return yxWechatUserMapper.toDto(yxWechatUser.get()); + //@Cacheable + public List queryAll(YxWechatUserQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatUser.class, criteria)); } - @Override - @Transactional(rollbackFor = Exception.class) - public YxWechatUserDTO create(YxWechatUser resources) { - return yxWechatUserMapper.toDto(yxWechatUserRepository.save(resources)); - } @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxWechatUser resources) { - Optional optionalYxWechatUser = yxWechatUserRepository.findById(resources.getUid()); - ValidationUtil.isNull( optionalYxWechatUser,"YxWechatUser","id",resources.getUid()); - YxWechatUser yxWechatUser = optionalYxWechatUser.get(); - yxWechatUser.copy(resources); - yxWechatUserRepository.save(yxWechatUser); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatUserDto yxWechatUser : all) { + Map map = new LinkedHashMap<>(); + map.put("只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段", yxWechatUser.getUnionid()); + map.put("用户的标识,对当前公众号唯一", yxWechatUser.getOpenid()); + map.put("小程序唯一身份ID", yxWechatUser.getRoutineOpenid()); + map.put("用户的昵称", yxWechatUser.getNickname()); + map.put("用户头像", yxWechatUser.getHeadimgurl()); + map.put("用户的性别,值为1时是男性,值为2时是女性,值为0时是未知", yxWechatUser.getSex()); + map.put("用户所在城市", yxWechatUser.getCity()); + map.put("用户的语言,简体中文为zh_CN", yxWechatUser.getLanguage()); + map.put("用户所在省份", yxWechatUser.getProvince()); + map.put("用户所在国家", yxWechatUser.getCountry()); + map.put("公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注", yxWechatUser.getRemark()); + map.put("用户所在的分组ID(兼容旧的用户分组接口)", yxWechatUser.getGroupid()); + map.put("用户被打上的标签ID列表", yxWechatUser.getTagidList()); + map.put("用户是否订阅该公众号标识", yxWechatUser.getSubscribe()); + map.put("关注公众号时间", yxWechatUser.getSubscribeTime()); + map.put("添加时间", yxWechatUser.getAddTime()); + map.put("一级推荐人", yxWechatUser.getStair()); + map.put("二级推荐人", yxWechatUser.getSecond()); + map.put("一级推荐人订单", yxWechatUser.getOrderStair()); + map.put("二级推荐人订单", yxWechatUser.getOrderSecond()); + map.put("佣金", yxWechatUser.getNowMoney()); + map.put("小程序用户会话密匙", yxWechatUser.getSessionKey()); + map.put("用户类型", yxWechatUser.getUserType()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Integer uid) { - yxWechatUserRepository.deleteById(uid); - } -} \ No newline at end of file +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java new file mode 100644 index 00000000..7437983e --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxExpress; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface ExpressMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java new file mode 100644 index 00000000..82a858b4 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxMaterialGroup; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface MaterialGroupMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java new file mode 100644 index 00000000..4822b66e --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxMaterial; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface MaterialMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java new file mode 100644 index 00000000..6dbb8900 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java @@ -0,0 +1,30 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreCart; +import co.yixiang.modules.shop.service.dto.CountDto; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreCartMapper extends CoreMapper { + @Select("SELECT t.cate_name as catename from yx_store_cart c " + + "LEFT JOIN yx_store_product p on c.product_id = p.id " + + "LEFT JOIN yx_store_category t on p.cate_id = t.id " + + "WHERE c.is_pay = 1") + List findCateName(); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java new file mode 100644 index 00000000..17bd39a4 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreCategory; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreCategoryMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderCartInfoMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderCartInfoMapper.java new file mode 100644 index 00000000..e6098c6f --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderCartInfoMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreOrderCartInfo; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreOrderCartInfoMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderMapper.java new file mode 100644 index 00000000..6132a4bd --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderMapper.java @@ -0,0 +1,46 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreOrder; +import co.yixiang.modules.shop.service.dto.ChartDataDto; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreOrderMapper extends CoreMapper { + + @Select("SELECT COUNT(*) FROM yx_store_order WHERE pay_time >= ${today}") + Integer countByPayTimeGreaterThanEqual(@Param("today")int today); + @Select("SELECT COUNT(*) FROM yx_store_order WHERE pay_time < ${today} and pay_time >= ${yesterday}") + Integer countByPayTimeLessThanAndPayTimeGreaterThanEqual(@Param("today")int today, @Param("yesterday")int yesterday); + @Select( "select IFNULL(sum(pay_price),0) from yx_store_order " + + "where refund_status=0 and is_del=0 and paid=1") + Double sumTotalPrice(); + + @Select("SELECT IFNULL(sum(pay_price),0) as num," + + "FROM_UNIXTIME(add_time, '%m-%d') as time " + + " FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= ${time}" + + " GROUP BY FROM_UNIXTIME(add_time,'%Y-%m-%d') " + + " ORDER BY add_time ASC") + List chartList(@Param("time") int time); + @Select("SELECT count(id) as num," + + "FROM_UNIXTIME(add_time, '%m-%d') as time " + + " FROM yx_store_order where refund_status=0 and is_del=0 and paid=1 and pay_time >= ${time}" + + " GROUP BY FROM_UNIXTIME(add_time,'%Y-%m-%d') " + + " ORDER BY add_time ASC") + List chartListT(@Param("time")int time); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java new file mode 100644 index 00000000..b3a728c4 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreOrderStatus; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreOrderStatusMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java new file mode 100644 index 00000000..d0c02f77 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreProductAttr; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreProductAttrMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrResultMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrResultMapper.java new file mode 100644 index 00000000..ccd73bdd --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrResultMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreProductAttrResultMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrValueMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrValueMapper.java new file mode 100644 index 00000000..241c0584 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrValueMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreProductAttrValueMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductMapper.java new file mode 100644 index 00000000..3e4dd6e0 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductMapper.java @@ -0,0 +1,29 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreProduct; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreProductMapper extends CoreMapper { + + + @Update("update yx_store_product set is_del = #{status} where id = #{id}") + void updateDel(@Param("status")int status,@Param("id") Integer id); + @Update("update yx_store_product set is_show = #{status} where id = #{id}") + void updateOnsale(@Param("status")int status, @Param("id")Integer id); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductReplyMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductReplyMapper.java new file mode 100644 index 00000000..0c526be6 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductReplyMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxStoreProductReply; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface StoreProductReplyMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java new file mode 100644 index 00000000..dd6cc7de --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemConfig; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemConfigMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java new file mode 100644 index 00000000..f7eca6d8 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemGroupData; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemGroupDataMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java new file mode 100644 index 00000000..fbccf964 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemStore; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemStoreMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java new file mode 100644 index 00000000..e6deb9e1 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemStoreStaff; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemStoreStaffMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java new file mode 100644 index 00000000..625912a1 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemUserLevel; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemUserLevelMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserTaskMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserTaskMapper.java new file mode 100644 index 00000000..0bcc804c --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserTaskMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemUserTask; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface SystemUserTaskMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserBillMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserBillMapper.java new file mode 100644 index 00000000..e00272f0 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserBillMapper.java @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxUserBill; +import co.yixiang.modules.shop.service.dto.YxUserBillDto; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.ResultType; +import org.apache.ibatis.annotations.Select; +import org.springframework.security.core.parameters.P; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface UserBillMapper extends CoreMapper { + + @Select(" ") + List findAllByQueryCriteria(@Param("category") String category, @Param("type") String type, @Param("nickname") String nickname); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserMapper.java new file mode 100644 index 00000000..09646297 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserMapper.java @@ -0,0 +1,34 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxUser; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.data.jpa.repository.Modifying; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface UserMapper extends CoreMapper { + + @Update( "update yx_user set status = #{status} where uid = #{id}") + void updateOnstatus(@Param("status") int status, @Param("id") int id); + + @Update( "update yx_user set now_money = now_money + ${money} where uid = #{id}") + void updateMoney(@Param("money") double money, @Param("id")int id); + + @Update("update yx_user set brokerage_price = brokerage_price+ ${price} where uid = #{id}") + void incBrokeragePrice(@Param("price")double price,@Param("id") int id); + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java new file mode 100644 index 00000000..a237a019 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxUserRecharge; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface UserRechargeMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/WechatUserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/WechatUserMapper.java new file mode 100644 index 00000000..d6d3f988 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/WechatUserMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxWechatUser; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +@Mapper +public interface WechatUserMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxExpressMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxExpressMapper.java deleted file mode 100644 index 13bb1c8b..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxExpressMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxExpress; -import co.yixiang.modules.shop.service.dto.YxExpressDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-12-12 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxExpressMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialGroupMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialGroupMapper.java deleted file mode 100644 index 7c193c62..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialGroupMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.shop.domain.YxMaterialGroup; -import co.yixiang.modules.shop.service.dto.YxMaterialGroupDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2020-01-09 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxMaterialGroupMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialMapper.java deleted file mode 100644 index f91d1e88..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxMaterialMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.shop.domain.YxMaterial; -import co.yixiang.modules.shop.service.dto.YxMaterialDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2020-01-09 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxMaterialMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreCategoryMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreCategoryMapper.java deleted file mode 100644 index 16598d5e..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreCategoryMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxStoreCategory; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-03 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreCategoryMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderMapper.java deleted file mode 100644 index a81b6bd8..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxStoreOrder; -import co.yixiang.modules.shop.service.dto.YxStoreOrderDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-14 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreOrderMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderStatusMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderStatusMapper.java deleted file mode 100644 index 17ffa234..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreOrderStatusMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-11-02 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreOrderStatusMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductMapper.java deleted file mode 100644 index 35a2709e..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxStoreProduct; -import co.yixiang.modules.shop.service.dto.YxStoreProductDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - - -/** -* @author hupeng -* @date 2019-10-04 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreProductMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductReplyMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductReplyMapper.java deleted file mode 100644 index dd07d295..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxStoreProductReplyMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxStoreProductReply; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-11-03 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxStoreProductReplyMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemConfigMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemConfigMapper.java deleted file mode 100644 index 4ccd302f..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemConfigMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxSystemConfig; -import co.yixiang.modules.shop.service.dto.YxSystemConfigDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-10 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemConfigMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemGroupDataMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemGroupDataMapper.java deleted file mode 100644 index ba1a8112..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemGroupDataMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxSystemGroupData; -import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-18 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemGroupDataMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreMapper.java deleted file mode 100644 index b8d2d837..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.shop.domain.YxSystemStore; -import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2020-03-03 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemStoreMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreStaffMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreStaffMapper.java deleted file mode 100644 index 205d5249..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemStoreStaffMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.shop.domain.YxSystemStoreStaff; -import co.yixiang.modules.shop.service.dto.YxSystemStoreStaffDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2020-03-22 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemStoreStaffMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserLevelMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserLevelMapper.java deleted file mode 100644 index 11432b16..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserLevelMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-12-04 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemUserLevelMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserTaskMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserTaskMapper.java deleted file mode 100644 index 74d4ec32..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemUserTaskMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxSystemUserTask; -import co.yixiang.modules.shop.service.dto.YxSystemUserTaskDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-12-04 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxSystemUserTaskMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserBillMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserBillMapper.java deleted file mode 100644 index 8eedb2b5..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserBillMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.service.dto.YxUserBillDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-11-06 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxUserBillMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserMapper.java deleted file mode 100644 index 474a605b..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxUser; -import co.yixiang.modules.shop.service.dto.YxUserDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-10-06 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxUserMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserRechargeMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserRechargeMapper.java deleted file mode 100644 index 6ab8ae4f..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxUserRechargeMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.shop.domain.YxUserRecharge; -import co.yixiang.modules.shop.service.dto.YxUserRechargeDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2020-03-02 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxUserRechargeMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxWechatUserMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxWechatUserMapper.java deleted file mode 100644 index d294c4a7..00000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/YxWechatUserMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.shop.service.mapper; - -import co.yixiang.mapper.EntityMapper; -import co.yixiang.modules.shop.domain.YxWechatUser; -import co.yixiang.modules.shop.service.dto.YxWechatUserDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author hupeng -* @date 2019-12-13 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface YxWechatUserMapper extends EntityMapper { - -} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java index 9aceb031..b9e72d2f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.shop.service.param; import lombok.Data; @@ -11,7 +16,7 @@ import java.io.Serializable; **/ @Data public class ExpressParam implements Serializable { - //@NotBlank() + ////@NotBlank() private String orderCode; private String shipperCode; private String logisticCode; diff --git a/yshop-system/pom.xml b/yshop-system/pom.xml index f28dc126..9aacbc86 100644 --- a/yshop-system/pom.xml +++ b/yshop-system/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.1 + 2.2 4.0.0 @@ -21,7 +21,7 @@ co.yixiang yshop-generator - 2.1 + 2.2 co.yixiang @@ -29,18 +29,20 @@ - - co.yixiang yshop-shop - 2.1 + 2.2 + + + co.yixiang + yshop-mproot + 2.2 - co.yixiang yshop-mp - 2.1 + 2.2 co.yixiang diff --git a/yshop-system/src/main/java/co/yixiang/AppRun.java b/yshop-system/src/main/java/co/yixiang/AppRun.java index 5330a719..a802a395 100644 --- a/yshop-system/src/main/java/co/yixiang/AppRun.java +++ b/yshop-system/src/main/java/co/yixiang/AppRun.java @@ -1,7 +1,13 @@ -package co.yixiang; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + */ +package co.yixiang; +import co.yixiang.modules.activity.service.YxStoreCouponUserService; import co.yixiang.annotation.AnonymousAccess; import co.yixiang.utils.SpringContextHolder; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; @@ -13,13 +19,14 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; /** - * @author Zheng Jie + * @author hupeng * @date 2018/11/15 9:20:19 */ @EnableAsync @RestController @SpringBootApplication @EnableTransactionManagement +@MapperScan(basePackages = "co.yixiang.*.mapper") public class AppRun { public static void main(String[] args) { diff --git a/yshop-system/src/main/java/co/yixiang/config/ConfigurerAdapter.java b/yshop-system/src/main/java/co/yixiang/config/ConfigurerAdapter.java index 456a903d..dac18a80 100644 --- a/yshop-system/src/main/java/co/yixiang/config/ConfigurerAdapter.java +++ b/yshop-system/src/main/java/co/yixiang/config/ConfigurerAdapter.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config; import org.springframework.beans.factory.annotation.Value; @@ -13,7 +18,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; /** * WebMvcConfigurer * - * @author Zheng Jie + * @author hupeng * @date 2018-11-30 */ @Configuration diff --git a/yshop-system/src/main/java/co/yixiang/config/DataScope.java b/yshop-system/src/main/java/co/yixiang/config/DataScope.java index 3eb65d8e..41912a1b 100644 --- a/yshop-system/src/main/java/co/yixiang/config/DataScope.java +++ b/yshop-system/src/main/java/co/yixiang/config/DataScope.java @@ -1,8 +1,13 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config; import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import co.yixiang.modules.system.service.dto.UserDto; import co.yixiang.utils.SecurityUtils; import co.yixiang.modules.system.domain.Dept; import co.yixiang.modules.system.service.DeptService; @@ -15,7 +20,7 @@ import java.util.Set; /** * 数据权限配置 - * @author Zheng Jie + * @author hupeng * @date 2019-4-1 */ @Component @@ -37,15 +42,15 @@ public class DataScope { public Set getDeptIds() { - UserDTO user = userService.findByName(SecurityUtils.getUsername()); + UserDto user = userService.findByName(SecurityUtils.getUsername()); // 用于存储部门id Set deptIds = new HashSet<>(); // 查询用户角色 - List roleSet = roleService.findByUsersId(user.getId()); + List roleSet = roleService.findByUsersId(user.getId()); - for (RoleSmallDTO role : roleSet) { + for (RoleSmallDto role : roleSet) { if (scopeType[0].equals(role.getDataScope())) { return new HashSet<>() ; diff --git a/yshop-system/src/main/java/co/yixiang/config/WebSocketConfig.java b/yshop-system/src/main/java/co/yixiang/config/WebSocketConfig.java index 321171f9..72fb36b2 100644 --- a/yshop-system/src/main/java/co/yixiang/config/WebSocketConfig.java +++ b/yshop-system/src/main/java/co/yixiang/config/WebSocketConfig.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config; import org.springframework.context.annotation.Bean; diff --git a/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java b/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java index 291447b8..03eb5e24 100644 --- a/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java +++ b/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config.thread; import lombok.extern.slf4j.Slf4j; diff --git a/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java b/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java index 1f3a29f6..6cfdb346 100644 --- a/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java +++ b/yshop-system/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config.thread; import lombok.Data; diff --git a/yshop-system/src/main/java/co/yixiang/config/thread/TheadFactoryName.java b/yshop-system/src/main/java/co/yixiang/config/thread/TheadFactoryName.java index 69d26da3..7074a867 100644 --- a/yshop-system/src/main/java/co/yixiang/config/thread/TheadFactoryName.java +++ b/yshop-system/src/main/java/co/yixiang/config/thread/TheadFactoryName.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config.thread; import org.springframework.stereotype.Component; @@ -7,7 +12,7 @@ import java.util.concurrent.atomic.AtomicInteger; /** * 自定义线程名称 - * @author Zheng Jie + * @author hupeng * @date 2019年10月31日17:49:55 */ @Component diff --git a/yshop-system/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java b/yshop-system/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java index 13fe761c..c978017e 100644 --- a/yshop-system/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java +++ b/yshop-system/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.config.thread; import co.yixiang.utils.SpringContextHolder; @@ -8,7 +13,7 @@ import java.util.concurrent.TimeUnit; /** * 用于获取自定义线程池 - * @author Zheng Jie + * @author hupeng * @date 2019年10月31日18:16:47 */ public class ThreadPoolExecutorUtil { diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/App.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/App.java deleted file mode 100644 index 887e0216..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/App.java +++ /dev/null @@ -1,76 +0,0 @@ -package co.yixiang.modules.mnt.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Entity -@Data -@Table(name="mnt_app") -public class App implements Serializable { - - /** - * 应用编号 - */ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - /** - * 应用名称 - */ - @Column(name = "name") - private String name; - - /** - * 端口 - */ - @Column(name = "port") - private int port; - - /** - * 上传目录 - */ - @Column(name = "upload_path") - private String uploadPath; - - /** - * 部署目录 - */ - @Column(name = "deploy_path") - private String deployPath; - - /** - * 备份目录 - */ - @Column(name = "backup_path") - private String backupPath; - - /** - * 启动脚本 - */ - @Column(name = "start_script") - private String startScript; - - /** - * 部署脚本 - */ - @Column(name = "deploy_script") - private String deployScript; - - @CreationTimestamp - private Timestamp createTime; - - public void copy(App source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Database.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Database.java deleted file mode 100644 index 40fb7566..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Database.java +++ /dev/null @@ -1,58 +0,0 @@ -package co.yixiang.modules.mnt.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Entity -@Data -@Table(name="mnt_database") -public class Database implements Serializable { - - /** - * id - */ - @Id - @Column(name = "id") - private String id; - - /** - * 数据库名称 - */ - @Column(name = "name",nullable = false) - private String name; - - /** - * 数据库连接地址 - */ - @Column(name = "jdbc_url",nullable = false) - private String jdbcUrl; - - /** - * 数据库密码 - */ - @Column(name = "pwd",nullable = false) - private String pwd; - - /** - * 用户名 - */ - @Column(name = "user_name",nullable = false) - private String userName; - - @CreationTimestamp - private Timestamp createTime; - - public void copy(Database source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Deploy.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Deploy.java deleted file mode 100644 index c1dda681..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/Deploy.java +++ /dev/null @@ -1,49 +0,0 @@ -package co.yixiang.modules.mnt.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Entity -@Data -@Table(name="mnt_deploy") -public class Deploy implements Serializable { - - /** - * 部署编号 - */ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - /** - * 应用编号 - */ - @ManyToOne - @JoinColumn(name = "app_id") - private App app; - - /** - * 服务器 - */ - @ManyToMany - @JoinTable(name = "mnt_deploy_server", joinColumns = {@JoinColumn(name = "deploy_id",referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "server_id",referencedColumnName = "id")}) - private Set deploys; - - @CreationTimestamp - private Timestamp createTime; - - public void copy(Deploy source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/DeployHistory.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/DeployHistory.java deleted file mode 100644 index da7cdc0c..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/DeployHistory.java +++ /dev/null @@ -1,62 +0,0 @@ -package co.yixiang.modules.mnt.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Entity -@Data -@Table(name="mnt_deploy_history") -public class DeployHistory implements Serializable { - - /** - * 编号 - */ - @Id - @Column(name = "id") - private String id; - - /** - * 应用名称 - */ - @Column(name = "app_name",nullable = false) - private String appName; - - /** - * 部署IP - */ - @Column(name = "ip",nullable = false) - private String ip; - - /** - * 部署时间 - */ - @Column(name = "deploy_date") - @CreationTimestamp - private Timestamp deployDate; - - /** - * 部署人员 - */ - @Column(name = "deploy_user",nullable = false) - private String deployUser; - - /** - * 部署编号 - */ - @Column(name = "deploy_id",nullable = false) - private Long deployId; - - public void copy(DeployHistory source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/ServerDeploy.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/ServerDeploy.java deleted file mode 100644 index 6c3e46d4..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/domain/ServerDeploy.java +++ /dev/null @@ -1,41 +0,0 @@ -package co.yixiang.modules.mnt.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; -import java.sql.Timestamp; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Entity -@Data -@Table(name="mnt_server") -public class ServerDeploy implements Serializable { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - private String name; - - private String ip; - - private Integer port; - - private String account; - - private String password; - - @CreationTimestamp - private Timestamp createTime; - - public void copy(ServerDeploy source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/AppRepository.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/AppRepository.java deleted file mode 100644 index 1de47046..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/AppRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.mnt.repository; - -import co.yixiang.modules.mnt.domain.App; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface AppRepository extends JpaRepository, JpaSpecificationExecutor { -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DatabaseRepository.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DatabaseRepository.java deleted file mode 100644 index 28be2b2c..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DatabaseRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.mnt.repository; - -import co.yixiang.modules.mnt.domain.Database; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface DatabaseRepository extends JpaRepository, JpaSpecificationExecutor { -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployHistoryRepository.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployHistoryRepository.java deleted file mode 100644 index bdffa1c8..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployHistoryRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.mnt.repository; - -import co.yixiang.modules.mnt.domain.DeployHistory; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface DeployHistoryRepository extends JpaRepository, JpaSpecificationExecutor { -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployRepository.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployRepository.java deleted file mode 100644 index 694bf884..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/DeployRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.mnt.repository; - -import co.yixiang.modules.mnt.domain.Deploy; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface DeployRepository extends JpaRepository, JpaSpecificationExecutor { -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/ServerDeployRepository.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/ServerDeployRepository.java deleted file mode 100644 index 44eb846e..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/repository/ServerDeployRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.modules.mnt.repository; - -import co.yixiang.modules.mnt.domain.ServerDeploy; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface ServerDeployRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 根据IP查询 - * @param ip / - * @return / - */ - ServerDeploy findByIp(String ip); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/AppController.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/AppController.java deleted file mode 100644 index ebcc40f9..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/AppController.java +++ /dev/null @@ -1,75 +0,0 @@ -package co.yixiang.modules.mnt.rest; - -import co.yixiang.aop.log.Log; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import co.yixiang.modules.mnt.domain.App; -import co.yixiang.modules.mnt.service.AppService; -import co.yixiang.modules.mnt.service.dto.AppQueryCriteria; -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 javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "应用管理") -@RestController -@RequestMapping("/api/app") -public class AppController { - - private final AppService appService; - - public AppController(AppService appService){ - this.appService = appService; - } - - @Log("导出应用数据") - @ApiOperation("导出应用数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','app:list')") - public void download(HttpServletResponse response, AppQueryCriteria criteria) throws IOException { - appService.download(appService.queryAll(criteria), response); - } - - @Log("查询应用") - @ApiOperation(value = "查询应用") - @GetMapping - @PreAuthorize("@el.check('admin','app:list')") - public ResponseEntity getApps(AppQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(appService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @Log("新增应用") - @ApiOperation(value = "新增应用") - @PostMapping - @PreAuthorize("@el.check('admin','app:add')") - public ResponseEntity create(@Validated @RequestBody App resources){ - return new ResponseEntity<>(appService.create(resources),HttpStatus.CREATED); - } - - @Log("修改应用") - @ApiOperation(value = "修改应用") - @PutMapping - @PreAuthorize("@el.check('admin','app:edit')") - public ResponseEntity update(@Validated @RequestBody App resources){ - appService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除应用") - @ApiOperation(value = "删除应用") - @DeleteMapping - @PreAuthorize("@el.check('admin','app:del')") - public ResponseEntity delete(@RequestBody Set ids){ - appService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DatabaseController.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DatabaseController.java deleted file mode 100644 index dc6c21f7..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DatabaseController.java +++ /dev/null @@ -1,112 +0,0 @@ -package co.yixiang.modules.mnt.rest; - -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; -import co.yixiang.utils.FileUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import co.yixiang.modules.mnt.domain.Database; -import co.yixiang.modules.mnt.service.DatabaseService; -import co.yixiang.modules.mnt.service.dto.DatabaseDto; -import co.yixiang.modules.mnt.service.dto.DatabaseQueryCriteria; -import co.yixiang.modules.mnt.util.SqlUtils; -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 org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "数据库管理") -@RestController -@RequestMapping("/api/database") -public class DatabaseController { - - private String fileSavePath = System.getProperty("java.io.tmpdir"); - - private final DatabaseService databaseService; - - public DatabaseController(DatabaseService databaseService) { - this.databaseService = databaseService; - } - - @Log("导出数据库数据") - @ApiOperation("导出数据库数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','database:list')") - public void download(HttpServletResponse response, DatabaseQueryCriteria criteria) throws IOException { - databaseService.download(databaseService.queryAll(criteria), response); - } - - @Log("查询数据库") - @ApiOperation(value = "查询数据库") - @GetMapping - @PreAuthorize("@el.check('admin','database:list')") - public ResponseEntity getDatabases(DatabaseQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(databaseService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @Log("新增数据库") - @ApiOperation(value = "新增数据库") - @PostMapping - @PreAuthorize("@el.check('admin','database:add')") - public ResponseEntity create(@Validated @RequestBody Database resources){ - return new ResponseEntity<>(databaseService.create(resources),HttpStatus.CREATED); - } - - @Log("修改数据库") - @ApiOperation(value = "修改数据库") - @PutMapping - @PreAuthorize("@el.check('admin','database:edit')") - public ResponseEntity update(@Validated @RequestBody Database resources){ - databaseService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除数据库") - @ApiOperation(value = "删除数据库") - @DeleteMapping - @PreAuthorize("@el.check('admin','database:del')") - public ResponseEntity delete(@RequestBody Set ids){ - databaseService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("测试数据库链接") - @ApiOperation(value = "测试数据库链接") - @PostMapping("/testConnect") - @PreAuthorize("@el.check('admin','database:testConnect')") - public ResponseEntity testConnect(@Validated @RequestBody Database resources){ - return new ResponseEntity<>(databaseService.testConnection(resources),HttpStatus.CREATED); - } - - @Log("执行SQL脚本") - @ApiOperation(value = "执行SQL脚本") - @PostMapping(value = "/upload") - @PreAuthorize("@el.check('admin','database:add')") - public ResponseEntity upload(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ - String id = request.getParameter("id"); - DatabaseDto database = databaseService.findById(id); - String fileName; - if(database != null){ - fileName = file.getOriginalFilename(); - File executeFile = new File(fileSavePath+fileName); - FileUtil.del(executeFile); - file.transferTo(executeFile); - String result = SqlUtils.executeFile(database.getJdbcUrl(), database.getUserName(), database.getPwd(), executeFile); - return new ResponseEntity<>(result,HttpStatus.OK); - }else{ - throw new BadRequestException("Database not exist"); - } - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployController.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployController.java deleted file mode 100644 index 5ca8cc66..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployController.java +++ /dev/null @@ -1,141 +0,0 @@ -package co.yixiang.modules.mnt.rest; - -import co.yixiang.aop.log.Log; -import co.yixiang.utils.FileUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import co.yixiang.modules.mnt.domain.Deploy; -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.service.DeployService; -import co.yixiang.modules.mnt.service.dto.DeployQueryCriteria; -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 org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "部署管理") -@RestController -@RequestMapping("/api/deploy") -public class DeployController { - - private String fileSavePath = System.getProperty("java.io.tmpdir"); - - private final DeployService deployService; - - public DeployController(DeployService deployService) { - this.deployService = deployService; - } - - @Log("导出部署数据") - @ApiOperation("导出部署数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','database:list')") - public void download(HttpServletResponse response, DeployQueryCriteria criteria) throws IOException { - deployService.download(deployService.queryAll(criteria), response); - } - - @Log("查询部署") - @ApiOperation(value = "查询部署") - @GetMapping - @PreAuthorize("@el.check('admin','deploy:list')") - public ResponseEntity getDeploys(DeployQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(deployService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @Log("新增部署") - @ApiOperation(value = "新增部署") - @PostMapping - @PreAuthorize("@el.check('admin','deploy:add')") - public ResponseEntity create(@Validated @RequestBody Deploy resources){ - return new ResponseEntity<>(deployService.create(resources),HttpStatus.CREATED); - } - - @Log("修改部署") - @ApiOperation(value = "修改部署") - @PutMapping - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity update(@Validated @RequestBody Deploy resources){ - deployService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除部署") - @ApiOperation(value = "删除部署") - @DeleteMapping - @PreAuthorize("@el.check('admin','deploy:del')") - public ResponseEntity delete(@RequestBody Set ids){ - deployService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("上传文件部署") - @ApiOperation(value = "上传文件部署") - @PostMapping(value = "/upload") - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity upload(@RequestBody MultipartFile file, HttpServletRequest request)throws Exception{ - Long id = Long.valueOf(request.getParameter("id")); - String fileName = ""; - if(file != null){ - fileName = file.getOriginalFilename(); - File deployFile = new File(fileSavePath+fileName); - FileUtil.del(deployFile); - file.transferTo(deployFile); - //文件下一步要根据文件名字来 - deployService.deploy(fileSavePath+fileName ,id); - }else{ - System.out.println("没有找到相对应的文件"); - } - System.out.println("文件上传的原名称为:"+ Objects.requireNonNull(file).getOriginalFilename()); - Map map = new HashMap<>(2); - map.put("errno",0); - map.put("id",fileName); - return new ResponseEntity<>(map,HttpStatus.OK); - } - @Log("系统还原") - @ApiOperation(value = "系统还原") - @PostMapping(value = "/serverReduction") - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity serverReduction(@Validated @RequestBody DeployHistory resources){ - String result = deployService.serverReduction(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - @Log("服务运行状态") - @ApiOperation(value = "服务运行状态") - @PostMapping(value = "/serverStatus") - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity serverStatus(@Validated @RequestBody Deploy resources){ - String result = deployService.serverStatus(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - @Log("启动服务") - @ApiOperation(value = "启动服务") - @PostMapping(value = "/startServer") - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity startServer(@Validated @RequestBody Deploy resources){ - String result = deployService.startServer(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } - @Log("停止服务") - @ApiOperation(value = "停止服务") - @PostMapping(value = "/stopServer") - @PreAuthorize("@el.check('admin','deploy:edit')") - public ResponseEntity stopServer(@Validated @RequestBody Deploy resources){ - String result = deployService.stopServer(resources); - return new ResponseEntity<>(result,HttpStatus.OK); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployHistoryController.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployHistoryController.java deleted file mode 100644 index 55562159..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/DeployHistoryController.java +++ /dev/null @@ -1,56 +0,0 @@ -package co.yixiang.modules.mnt.rest; - -import co.yixiang.aop.log.Log; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import co.yixiang.modules.mnt.service.DeployHistoryService; -import co.yixiang.modules.mnt.service.dto.DeployHistoryQueryCriteria; -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.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "部署历史管理") -@RestController -@RequestMapping("/api/deployHistory") -public class DeployHistoryController { - - private final DeployHistoryService deployhistoryService; - - public DeployHistoryController(DeployHistoryService deployhistoryService) { - this.deployhistoryService = deployhistoryService; - } - - @Log("导出部署历史数据") - @ApiOperation("导出部署历史数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','deployHistory:list')") - public void download(HttpServletResponse response, DeployHistoryQueryCriteria criteria) throws IOException { - deployhistoryService.download(deployhistoryService.queryAll(criteria), response); - } - - @Log("查询部署历史") - @ApiOperation(value = "查询部署历史") - @GetMapping - @PreAuthorize("@el.check('admin','deployHistory:list')") - public ResponseEntity getDeployHistorys(DeployHistoryQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(deployhistoryService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @Log("删除DeployHistory") - @ApiOperation(value = "删除部署历史") - @DeleteMapping - @PreAuthorize("@el.check('admin','deployHistory:del')") - public ResponseEntity delete(@RequestBody Set ids){ - deployhistoryService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/ServerDeployController.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/ServerDeployController.java deleted file mode 100644 index 95160253..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/rest/ServerDeployController.java +++ /dev/null @@ -1,83 +0,0 @@ -package co.yixiang.modules.mnt.rest; - -import co.yixiang.aop.log.Log; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import co.yixiang.modules.mnt.domain.ServerDeploy; -import co.yixiang.modules.mnt.service.ServerDeployService; -import co.yixiang.modules.mnt.service.dto.ServerDeployQueryCriteria; -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 javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Api(tags = "服务器管理") -@RestController -@RequestMapping("/api/serverDeploy") -public class ServerDeployController { - - private final ServerDeployService serverDeployService; - - public ServerDeployController(ServerDeployService serverDeployService) { - this.serverDeployService = serverDeployService; - } - - @Log("导出服务器数据") - @ApiOperation("导出服务器数据") - @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','serverDeploy:list')") - public void download(HttpServletResponse response, ServerDeployQueryCriteria criteria) throws IOException { - serverDeployService.download(serverDeployService.queryAll(criteria), response); - } - - @Log("查询服务器") - @ApiOperation(value = "查询服务器") - @GetMapping - @PreAuthorize("@el.check('admin','serverDeploy:list')") - public ResponseEntity getServers(ServerDeployQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(serverDeployService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @Log("新增服务器") - @ApiOperation(value = "新增服务器") - @PostMapping - @PreAuthorize("@el.check('admin','serverDeploy:add')") - public ResponseEntity create(@Validated @RequestBody ServerDeploy resources){ - return new ResponseEntity<>(serverDeployService.create(resources),HttpStatus.CREATED); - } - - @Log("修改服务器") - @ApiOperation(value = "修改服务器") - @PutMapping - @PreAuthorize("@el.check('admin','serverDeploy:edit')") - public ResponseEntity update(@Validated @RequestBody ServerDeploy resources){ - serverDeployService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @Log("删除服务器") - @ApiOperation(value = "删除Server") - @DeleteMapping - @PreAuthorize("@el.check('admin','serverDeploy:del')") - public ResponseEntity delete(@RequestBody Set ids){ - serverDeployService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - - @Log("测试连接服务器") - @ApiOperation(value = "测试连接服务器") - @PostMapping("/testConnect") - @PreAuthorize("@el.check('admin','serverDeploy:add')") - public ResponseEntity testConnect(@Validated @RequestBody ServerDeploy resources){ - return new ResponseEntity<>(serverDeployService.testConnect(resources),HttpStatus.CREATED); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/AppService.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/AppService.java deleted file mode 100644 index adf4089d..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/AppService.java +++ /dev/null @@ -1,67 +0,0 @@ -package co.yixiang.modules.mnt.service; - -import co.yixiang.modules.mnt.domain.App; -import co.yixiang.modules.mnt.service.dto.AppDto; -import co.yixiang.modules.mnt.service.dto.AppQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface AppService { - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(AppQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部数据 - * @param criteria 条件 - * @return / - */ - List queryAll(AppQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - AppDto findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - AppDto create(App resources); - - /** - * 编辑 - * @param resources / - */ - void update(App resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DatabaseService.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DatabaseService.java deleted file mode 100644 index 366b6bd9..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DatabaseService.java +++ /dev/null @@ -1,74 +0,0 @@ -package co.yixiang.modules.mnt.service; - -import co.yixiang.modules.mnt.domain.Database; -import co.yixiang.modules.mnt.service.dto.DatabaseDto; -import co.yixiang.modules.mnt.service.dto.DatabaseQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** - * @author ZhangHouYing - * @date 2019-08-24 - */ -public interface DatabaseService { - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(DatabaseQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAll(DatabaseQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - DatabaseDto findById(String id); - - /** - * 创建 - * @param resources / - * @return / - */ - DatabaseDto create(Database resources); - - /** - * 编辑 - * @param resources / - */ - void update(Database resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 测试连接数据库 - * @param resources / - * @return / - */ - boolean testConnection(Database resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException e - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployHistoryService.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployHistoryService.java deleted file mode 100644 index e3fa09f4..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployHistoryService.java +++ /dev/null @@ -1,60 +0,0 @@ -package co.yixiang.modules.mnt.service; - -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.service.dto.DeployHistoryDto; -import co.yixiang.modules.mnt.service.dto.DeployHistoryQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** - * @author zhanghouying - */ -public interface DeployHistoryService { - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(DeployHistoryQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAll(DeployHistoryQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - DeployHistoryDto findById(String id); - - /** - * 创建 - * @param resources / - * @return / - */ - DeployHistoryDto create(DeployHistory resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployService.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployService.java deleted file mode 100644 index df34d0d6..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/DeployService.java +++ /dev/null @@ -1,102 +0,0 @@ -package co.yixiang.modules.mnt.service; - -import co.yixiang.modules.mnt.domain.Deploy; -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.service.dto.DeployDto; -import co.yixiang.modules.mnt.service.dto.DeployQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface DeployService { - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(DeployQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部数据 - * @param criteria 条件 - * @return / - */ - List queryAll(DeployQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - DeployDto findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - DeployDto create(Deploy resources); - - - /** - * 编辑 - * @param resources / - */ - void update(Deploy resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 部署文件到服务器 - * @param fileSavePath 文件路径 - * @param appId 应用ID - */ - void deploy(String fileSavePath, Long appId); - - /** - * 查询部署状态 - * @param resources / - * @return / - */ - String serverStatus(Deploy resources); - /** - * 启动服务 - * @param resources / - * @return / - */ - String startServer(Deploy resources); - /** - * 停止服务 - * @param resources / - * @return / - */ - String stopServer(Deploy resources); - - /** - * 停止服务 - * @param resources / - * @return / - */ - String serverReduction(DeployHistory resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/ServerDeployService.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/ServerDeployService.java deleted file mode 100644 index 4d336bae..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/ServerDeployService.java +++ /dev/null @@ -1,81 +0,0 @@ -package co.yixiang.modules.mnt.service; - -import co.yixiang.modules.mnt.domain.ServerDeploy; -import co.yixiang.modules.mnt.service.dto.ServerDeployDto; -import co.yixiang.modules.mnt.service.dto.ServerDeployQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Set; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -public interface ServerDeployService { - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(ServerDeployQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部数据 - * @param criteria 条件 - * @return / - */ - List queryAll(ServerDeployQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - ServerDeployDto findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - ServerDeployDto create(ServerDeploy resources); - - /** - * 编辑 - * @param resources / - */ - void update(ServerDeploy resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 根据IP查询 - * @param ip / - * @return / - */ - ServerDeployDto findByIp(String ip); - - /** - * 测试登录服务器 - * @param resources / - * @return / - */ - Boolean testConnect(ServerDeploy resources); - - /** - * 导出数据 - * @param queryAll / - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppDto.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppDto.java deleted file mode 100644 index 109e3403..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppDto.java +++ /dev/null @@ -1,58 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import lombok.Data; - -import java.io.Serializable; -import java.sql.Timestamp; - - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class AppDto implements Serializable { - - /** - * 应用编号 - */ - private Long id; - - /** - * 应用名称 - */ - private String name; - - /** - * 端口 - */ - private Integer port; - - /** - * 上传目录 - */ - private String uploadPath; - - /** - * 部署目录 - */ - private String deployPath; - - /** - * 备份目录 - */ - private String backupPath; - - /** - * 启动脚本 - */ - private String startScript; - - /** - * 部署脚本 - */ - private String deployScript; - - private Timestamp createTime; - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppQueryCriteria.java deleted file mode 100644 index 235583fe..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/AppQueryCriteria.java +++ /dev/null @@ -1,24 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class AppQueryCriteria{ - - /** - * 模糊 - */ - @Query(type = Query.Type.INNER_LIKE) - private String name; - - @Query(type = Query.Type.BETWEEN) - private List createTime; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseDto.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseDto.java deleted file mode 100644 index 2d8a9df1..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseDto.java +++ /dev/null @@ -1,41 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import lombok.Data; -import java.io.Serializable; -import java.sql.Timestamp; - - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DatabaseDto implements Serializable { - - /** - * id - */ - private String id; - - /** - * 数据库名称 - */ - private String name; - - /** - * 数据库连接地址 - */ - private String jdbcUrl; - - /** - * 数据库密码 - */ - private String pwd; - - /** - * 用户名 - */ - private String userName; - - private Timestamp createTime; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseQueryCriteria.java deleted file mode 100644 index 0099914d..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DatabaseQueryCriteria.java +++ /dev/null @@ -1,30 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DatabaseQueryCriteria{ - - /** - * 模糊 - */ - @Query(type = Query.Type.INNER_LIKE) - private String name; - - /** - * 精确 - */ - @Query - private String jdbcUrl; - - @Query(type = Query.Type.BETWEEN) - private List createTime; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployDto.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployDto.java deleted file mode 100644 index 9a799079..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployDto.java +++ /dev/null @@ -1,45 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import cn.hutool.core.collection.CollectionUtil; -import lombok.Data; -import java.io.Serializable; -import java.sql.Timestamp; -import java.util.Set; -import java.util.stream.Collectors; - - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployDto implements Serializable { - - /** - * 部署编号 - */ - private String id; - - private AppDto app; - - /** - * 服务器 - */ - private Set deploys; - - private String servers; - - /** - * 服务状态 - */ - private String status; - - private Timestamp createTime; - - public String getServers() { - if(CollectionUtil.isNotEmpty(deploys)){ - return deploys.stream().map(ServerDeployDto::getName).collect(Collectors.joining(",")); - } - return servers; - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryDto.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryDto.java deleted file mode 100644 index 5b6e1fe5..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryDto.java +++ /dev/null @@ -1,44 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import lombok.Data; -import java.io.Serializable; -import java.sql.Timestamp; - - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployHistoryDto implements Serializable { - - /** - * 编号 - */ - private String id; - - /** - * 应用名称 - */ - private String appName; - - /** - * 部署IP - */ - private String ip; - - /** - * 部署时间 - */ - private Timestamp deployDate; - - /** - * 部署人员 - */ - private String deployUser; - - /** - * 部署编号 - */ - private Long deployId; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryQueryCriteria.java deleted file mode 100644 index 808f36df..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployHistoryQueryCriteria.java +++ /dev/null @@ -1,27 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployHistoryQueryCriteria{ - - /** - * 精确 - */ - @Query(blurry = "appName,ip,deployUser") - private String blurry; - - @Query - private Long deployId; - - @Query(type = Query.Type.BETWEEN) - private List deployDate; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployQueryCriteria.java deleted file mode 100644 index 2651cdae..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/DeployQueryCriteria.java +++ /dev/null @@ -1,25 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class DeployQueryCriteria{ - - /** - * 模糊 - */ - @Query(type = Query.Type.INNER_LIKE, propName = "name", joinName = "app") - private String appName; - - @Query(type = Query.Type.BETWEEN) - private List createTime; - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployDto.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployDto.java deleted file mode 100644 index b09b9a10..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployDto.java +++ /dev/null @@ -1,28 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import lombok.Data; -import java.io.Serializable; -import java.sql.Timestamp; - - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class ServerDeployDto implements Serializable { - - private Long id; - - private String name; - - private String ip; - - private Integer port; - - private String account; - - private String password; - - private Timestamp createTime; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployQueryCriteria.java deleted file mode 100644 index 5bfc2f9d..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/dto/ServerDeployQueryCriteria.java +++ /dev/null @@ -1,24 +0,0 @@ -package co.yixiang.modules.mnt.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -import java.sql.Timestamp; -import java.util.List; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Data -public class ServerDeployQueryCriteria{ - - /** - * 模糊 - */ - @Query(blurry = "name,ip,account") - private String blurry; - - @Query(type = Query.Type.BETWEEN) - private List createTime; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/AppServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/AppServiceImpl.java deleted file mode 100644 index 495ff824..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/AppServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -package co.yixiang.modules.mnt.service.impl; - -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.mnt.domain.App; -import co.yixiang.modules.mnt.service.AppService; -import co.yixiang.modules.mnt.service.dto.AppDto; -import co.yixiang.modules.mnt.service.dto.AppQueryCriteria; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.modules.mnt.repository.AppRepository; -import co.yixiang.modules.mnt.service.mapper.AppMapper; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class AppServiceImpl implements AppService { - - private AppRepository appRepository; - - private AppMapper appMapper; - - public AppServiceImpl(AppRepository appRepository, AppMapper appMapper) { - this.appMapper = appMapper; - this.appRepository = appRepository; - } - - @Override - public Object queryAll(AppQueryCriteria criteria, Pageable pageable){ - Page page = appRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(appMapper::toDto)); - } - - @Override - public List queryAll(AppQueryCriteria criteria){ - return appMapper.toDto(appRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public AppDto findById(Long id) { - App app = appRepository.findById(id).orElseGet(App::new); - ValidationUtil.isNull(app.getId(),"App","id",id); - return appMapper.toDto(app); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public AppDto create(App resources) { - verification(resources); - return appMapper.toDto(appRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(App resources) { - verification(resources); - App app = appRepository.findById(resources.getId()).orElseGet(App::new); - ValidationUtil.isNull(app.getId(),"App","id",resources.getId()); - app.copy(resources); - appRepository.save(app); - } - - private void verification(App resources){ - String opt = "/opt"; - String home = "/home"; - if (!(resources.getUploadPath().startsWith(opt) || resources.getUploadPath().startsWith(home))) { - throw new BadRequestException("文件只能上传在opt目录或者home目录 "); - } - if (!(resources.getDeployPath().startsWith(opt) || resources.getDeployPath().startsWith(home))) { - throw new BadRequestException("文件只能部署在opt目录或者home目录 "); - } - if (!(resources.getBackupPath().startsWith(opt) || resources.getBackupPath().startsWith(home))) { - throw new BadRequestException("文件只能备份在opt目录或者home目录 "); - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - appRepository.deleteById(id); - } - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (AppDto appDto : queryAll) { - Map map = new LinkedHashMap<>(); - map.put("应用名称", appDto.getName()); - map.put("端口", appDto.getPort()); - map.put("上传目录", appDto.getUploadPath()); - map.put("部署目录", appDto.getDeployPath()); - map.put("备份目录", appDto.getBackupPath()); - map.put("启动脚本", appDto.getStartScript()); - map.put("部署脚本", appDto.getDeployScript()); - map.put("创建日期", appDto.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DatabaseServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DatabaseServiceImpl.java deleted file mode 100644 index 839c88dd..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DatabaseServiceImpl.java +++ /dev/null @@ -1,109 +0,0 @@ -package co.yixiang.modules.mnt.service.impl; - -import cn.hutool.core.util.IdUtil; -import co.yixiang.modules.mnt.domain.Database; -import co.yixiang.modules.mnt.service.DatabaseService; -import co.yixiang.modules.mnt.service.dto.DatabaseDto; -import co.yixiang.modules.mnt.service.dto.DatabaseQueryCriteria; -import co.yixiang.modules.mnt.util.SqlUtils; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import lombok.extern.slf4j.Slf4j; -import co.yixiang.modules.mnt.repository.DatabaseRepository; -import co.yixiang.modules.mnt.service.mapper.DatabaseMapper; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@Slf4j -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DatabaseServiceImpl implements DatabaseService { - - private DatabaseRepository databaseRepository; - - private DatabaseMapper databaseMapper; - - public DatabaseServiceImpl(DatabaseRepository databaseRepository,DatabaseMapper databaseMapper){ - this.databaseMapper = databaseMapper; - this.databaseRepository = databaseRepository; - } - - @Override - public Object queryAll(DatabaseQueryCriteria criteria, Pageable pageable){ - Page page = databaseRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(databaseMapper::toDto)); - } - - @Override - public List queryAll(DatabaseQueryCriteria criteria){ - return databaseMapper.toDto(databaseRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public DatabaseDto findById(String id) { - Database database = databaseRepository.findById(id).orElseGet(Database::new); - ValidationUtil.isNull(database.getId(),"Database","id",id); - return databaseMapper.toDto(database); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public DatabaseDto create(Database resources) { - resources.setId(IdUtil.simpleUUID()); - return databaseMapper.toDto(databaseRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Database resources) { - Database database = databaseRepository.findById(resources.getId()).orElseGet(Database::new); - ValidationUtil.isNull(database.getId(),"Database","id",resources.getId()); - database.copy(resources); - databaseRepository.save(database); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (String id : ids) { - databaseRepository.deleteById(id); - } - } - - @Override - public boolean testConnection(Database resources) { - try { - return SqlUtils.testConnection(resources.getJdbcUrl(), resources.getUserName(), resources.getPwd()); - } catch (Exception e) { - log.error(e.getMessage()); - return false; - } - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DatabaseDto databaseDto : queryAll) { - Map map = new LinkedHashMap<>(); - map.put("数据库名称", databaseDto.getName()); - map.put("数据库连接地址", databaseDto.getJdbcUrl()); - map.put("用户名", databaseDto.getUserName()); - map.put("创建日期", databaseDto.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployHistoryServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployHistoryServiceImpl.java deleted file mode 100644 index d196c3a5..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployHistoryServiceImpl.java +++ /dev/null @@ -1,88 +0,0 @@ -package co.yixiang.modules.mnt.service.impl; - -import cn.hutool.core.util.IdUtil; -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.service.DeployHistoryService; -import co.yixiang.modules.mnt.service.dto.DeployHistoryDto; -import co.yixiang.modules.mnt.service.dto.DeployHistoryQueryCriteria; -import co.yixiang.modules.mnt.service.mapper.DeployHistoryMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.modules.mnt.repository.DeployHistoryRepository; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DeployHistoryServiceImpl implements DeployHistoryService { - - private final DeployHistoryRepository deployhistoryRepository; - - private final DeployHistoryMapper deployhistoryMapper; - - public DeployHistoryServiceImpl(DeployHistoryRepository deployhistoryRepository, DeployHistoryMapper deployhistoryMapper) { - this.deployhistoryRepository = deployhistoryRepository; - this.deployhistoryMapper = deployhistoryMapper; - } - - @Override - public Object queryAll(DeployHistoryQueryCriteria criteria, Pageable pageable){ - Page page = deployhistoryRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(deployhistoryMapper::toDto)); - } - - @Override - public List queryAll(DeployHistoryQueryCriteria criteria){ - return deployhistoryMapper.toDto(deployhistoryRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public DeployHistoryDto findById(String id) { - DeployHistory deployhistory = deployhistoryRepository.findById(id).orElseGet(DeployHistory::new); - ValidationUtil.isNull(deployhistory.getId(),"DeployHistory","id",id); - return deployhistoryMapper.toDto(deployhistory); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public DeployHistoryDto create(DeployHistory resources) { - resources.setId(IdUtil.simpleUUID()); - return deployhistoryMapper.toDto(deployhistoryRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (String id : ids) { - deployhistoryRepository.deleteById(id); - } - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DeployHistoryDto deployHistoryDto : queryAll) { - Map map = new LinkedHashMap<>(); - map.put("部署编号", deployHistoryDto.getDeployId()); - map.put("应用名称", deployHistoryDto.getAppName()); - map.put("部署IP", deployHistoryDto.getIp()); - map.put("部署时间", deployHistoryDto.getDeployDate()); - map.put("部署人员", deployHistoryDto.getDeployUser()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployServiceImpl.java deleted file mode 100644 index 3d0bb510..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/DeployServiceImpl.java +++ /dev/null @@ -1,435 +0,0 @@ -package co.yixiang.modules.mnt.service.impl; - -import cn.hutool.core.date.DatePattern; -import cn.hutool.core.date.DateUtil; -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.mnt.domain.App; -import co.yixiang.modules.mnt.domain.Deploy; -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.domain.ServerDeploy; -import co.yixiang.modules.mnt.service.DeployHistoryService; -import co.yixiang.modules.mnt.service.DeployService; -import co.yixiang.modules.mnt.service.ServerDeployService; -import co.yixiang.modules.mnt.service.dto.AppDto; -import co.yixiang.modules.mnt.service.dto.DeployDto; -import co.yixiang.modules.mnt.service.dto.DeployQueryCriteria; -import co.yixiang.modules.mnt.service.dto.ServerDeployDto; -import co.yixiang.modules.mnt.util.ExecuteShellUtil; -import co.yixiang.modules.mnt.util.ScpClientUtil; -import co.yixiang.utils.*; -import lombok.extern.slf4j.Slf4j; -import co.yixiang.modules.mnt.repository.DeployRepository; -import co.yixiang.modules.mnt.service.mapper.DeployMapper; -import co.yixiang.modules.mnt.websocket.MsgType; -import co.yixiang.modules.mnt.websocket.SocketMsg; -import co.yixiang.modules.mnt.websocket.WebSocketServer; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** - * @author zhanghouying - * @date 2019-08-24 - */ -@Slf4j -@Service -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DeployServiceImpl implements DeployService { - - private final String FILE_SEPARATOR = "/"; - - private final DeployRepository deployRepository; - - private final DeployMapper deployMapper; - - private final ServerDeployService serverDeployService; - - private final DeployHistoryService deployHistoryService; - - // 循环次数 - private final Integer count = 30; - - public DeployServiceImpl(DeployRepository deployRepository, DeployMapper deployMapper, ServerDeployService serverDeployService, DeployHistoryService deployHistoryService) { - this.deployRepository = deployRepository; - this.deployMapper = deployMapper; - this.serverDeployService = serverDeployService; - this.deployHistoryService = deployHistoryService; - } - - - @Override - public Object queryAll(DeployQueryCriteria criteria, Pageable pageable) { - Page page = deployRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable); - return PageUtil.toPage(page.map(deployMapper::toDto)); - } - - @Override - public List queryAll(DeployQueryCriteria criteria) { - return deployMapper.toDto(deployRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder))); - } - - @Override - public DeployDto findById(Long id) { - Deploy deploy = deployRepository.findById(id).orElseGet(Deploy::new); - ValidationUtil.isNull(deploy.getId(), "Deploy", "id", id); - return deployMapper.toDto(deploy); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public DeployDto create(Deploy resources) { - return deployMapper.toDto(deployRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Deploy resources) { - Deploy deploy = deployRepository.findById(resources.getId()).orElseGet(Deploy::new); - ValidationUtil.isNull(deploy.getId(), "Deploy", "id", resources.getId()); - deploy.copy(resources); - deployRepository.save(deploy); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - deployRepository.deleteById(id); - } - } - - @Override - public void deploy(String fileSavePath, Long id) { - deployApp(fileSavePath, id); - } - - /** - * @param fileSavePath 本机路径 - * @param id ID - */ - private void deployApp(String fileSavePath, Long id) { - - DeployDto deploy = findById(id); - if (deploy == null) { - sendMsg("部署信息不存在", MsgType.ERROR); - throw new BadRequestException("部署信息不存在"); - } - AppDto app = deploy.getApp(); - if (app == null) { - sendMsg("包对应应用信息不存在", MsgType.ERROR); - throw new BadRequestException("包对应应用信息不存在"); - } - int port = app.getPort(); - //这个是服务器部署路径 - String uploadPath = app.getUploadPath(); - StringBuilder sb = new StringBuilder(); - String msg; - Set deploys = deploy.getDeploys(); - for (ServerDeployDto deployDTO : deploys) { - String ip = deployDTO.getIp(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); - //判断是否第一次部署 - boolean flag = checkFile(executeShellUtil, app); - //第一步要确认服务器上有这个目录 - executeShellUtil.execute("mkdir -p " + app.getUploadPath()); - executeShellUtil.execute("mkdir -p " + app.getBackupPath()); - executeShellUtil.execute("mkdir -p " + app.getDeployPath()); - //上传文件 - msg = String.format("登陆到服务器:%s", ip); - ScpClientUtil scpClientUtil = getScpClientUtil(ip); - log.info(msg); - sendMsg(msg, MsgType.INFO); - msg = String.format("上传文件到服务器:%s
目录:%s下,请稍等...", ip, uploadPath); - sendMsg(msg, MsgType.INFO); - scpClientUtil.putFile(fileSavePath, uploadPath); - if (flag) { - sendMsg("停止原来应用", MsgType.INFO); - //停止应用 - stopApp(port, executeShellUtil); - sendMsg("备份原来应用", MsgType.INFO); - //备份应用 - backupApp(executeShellUtil, ip, app.getDeployPath(), app.getName(), app.getBackupPath(), id); - } - sendMsg("部署应用", MsgType.INFO); - //部署文件,并启动应用 - String deployScript = app.getDeployScript(); - executeShellUtil.execute(deployScript); - sleep(3); - sendMsg("应用部署中,请耐心等待部署结果,或者稍后手动查看部署状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(port, executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - sb.append("服务器:").append(deployDTO.getName()).append("
应用:").append(app.getName()); - sendResultMsg(result, sb); - executeShellUtil.close(); - } - } - - private void sleep(int second) { - try { - Thread.sleep(second * 1000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - - private void backupApp(ExecuteShellUtil executeShellUtil, String ip, String fileSavePath, String appName, String backupPath, Long id) { - String deployDate = DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN); - StringBuilder sb = new StringBuilder(); - String endsWith = "\\"; - if (!backupPath.endsWith(FILE_SEPARATOR)&&!backupPath.endsWith(endsWith)) { - backupPath += FILE_SEPARATOR; - } - backupPath += appName + FILE_SEPARATOR + deployDate + "\n"; - sb.append("mkdir -p ").append(backupPath); - sb.append("mv -f ").append(fileSavePath); - if (!fileSavePath.endsWith(FILE_SEPARATOR)) { - sb.append(FILE_SEPARATOR); - } - sb.append(appName).append(" ").append(backupPath); - log.info("备份应用脚本:" + sb.toString()); - executeShellUtil.execute(sb.toString()); - //还原信息入库 - DeployHistory deployHistory = new DeployHistory(); - deployHistory.setAppName(appName); - deployHistory.setDeployUser(SecurityUtils.getUsername()); - deployHistory.setIp(ip); - deployHistory.setDeployId(id); - deployHistoryService.create(deployHistory); - } - - /** - * 停App - * - * @param port 端口 - * @param executeShellUtil / - */ - private void stopApp(int port, ExecuteShellUtil executeShellUtil) { - //发送停止命令 - executeShellUtil.execute(String.format("lsof -i :%d|grep -v \"PID\"|awk '{print \"kill -9\",$2}'|sh", port)); - - } - - /** - * 指定端口程序是否在运行 - * - * @param port 端口 - * @param executeShellUtil / - * @return true 正在运行 false 已经停止 - */ - private boolean checkIsRunningStatus(int port, ExecuteShellUtil executeShellUtil) { - String result = executeShellUtil.executeForResult(String.format("fuser -n tcp %d", port)); - return result.indexOf("/tcp:")>0; - } - - private void sendMsg(String msg, MsgType msgType) { - try { - WebSocketServer.sendInfo(new SocketMsg(msg, msgType), "deploy"); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Override - public String serverStatus(Deploy resources) { - Set serverDeploys = resources.getDeploys(); - App app = resources.getApp(); - for (ServerDeploy serverDeploy : serverDeploys) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(serverDeploy.getIp()); - sb.append("服务器:").append(serverDeploy.getName()).append("
应用:").append(app.getName()); - boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if (result) { - sb.append("
正在运行"); - sendMsg(sb.toString(), MsgType.INFO); - } else { - sb.append("
已停止!"); - sendMsg(sb.toString(), MsgType.ERROR); - } - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - private boolean checkFile(ExecuteShellUtil executeShellUtil, AppDto appDTO) { - String result = executeShellUtil.executeForResult("find " + appDTO.getDeployPath() + " -name " + appDTO.getName()); - return result.indexOf(appDTO.getName())>0; - } - - /** - * 启动服务 - * @param resources / - * @return / - */ - @Override - public String startServer(Deploy resources) { - Set deploys = resources.getDeploys(); - App app = resources.getApp(); - for (ServerDeploy deploy : deploys) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); - //为了防止重复启动,这里先停止应用 - stopApp(app.getPort(), executeShellUtil); - sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); - sendMsg("下发启动命令", MsgType.INFO); - executeShellUtil.execute(app.getStartScript()); - sleep(3); - sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看运行状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - sendResultMsg(result, sb); - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - /** - * 停止服务 - * @param resources / - * @return / - */ - @Override - public String stopServer(Deploy resources) { - Set deploys = resources.getDeploys(); - App app = resources.getApp(); - for (ServerDeploy deploy : deploys) { - StringBuilder sb = new StringBuilder(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(deploy.getIp()); - sb.append("服务器:").append(deploy.getName()).append("
应用:").append(app.getName()); - sendMsg("下发停止命令", MsgType.INFO); - //停止应用 - stopApp(app.getPort(), executeShellUtil); - sleep(1); - boolean result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if (result) { - sb.append("
关闭失败!"); - sendMsg(sb.toString(), MsgType.ERROR); - } else { - sb.append("
关闭成功!"); - sendMsg(sb.toString(), MsgType.INFO); - } - log.info(sb.toString()); - executeShellUtil.close(); - } - return "执行完毕"; - } - - @Override - public String serverReduction(DeployHistory resources) { - Long deployId = resources.getDeployId(); - Deploy deployInfo = deployRepository.findById(deployId).orElseGet(Deploy::new); - String deployDate = DateUtil.format(resources.getDeployDate(), DatePattern.PURE_DATETIME_PATTERN); - App app = deployInfo.getApp(); - if (app == null) { - sendMsg("应用信息不存在:" + resources.getAppName(), MsgType.ERROR); - throw new BadRequestException("应用信息不存在:" + resources.getAppName()); - } - String backupPath = app.getBackupPath(); - if (!backupPath.endsWith(FILE_SEPARATOR)) { - backupPath += FILE_SEPARATOR; - } - backupPath += resources.getAppName() + FILE_SEPARATOR + deployDate; - //这个是服务器部署路径 - String deployPath = app.getDeployPath(); - String ip = resources.getIp(); - ExecuteShellUtil executeShellUtil = getExecuteShellUtil(ip); - String msg; - - msg = String.format("登陆到服务器:%s", ip); - log.info(msg); - sendMsg(msg, MsgType.INFO); - sendMsg("停止原来应用", MsgType.INFO); - //停止应用 - stopApp(app.getPort(), executeShellUtil); - //删除原来应用 - sendMsg("删除应用", MsgType.INFO); - executeShellUtil.execute("rm -rf " + deployPath + FILE_SEPARATOR + resources.getAppName()); - //还原应用 - sendMsg("还原应用", MsgType.INFO); - executeShellUtil.execute("cp -r " + backupPath + "/. " + deployPath); - sendMsg("启动应用", MsgType.INFO); - executeShellUtil.execute(app.getStartScript()); - sendMsg("应用启动中,请耐心等待启动结果,或者稍后手动查看启动状态", MsgType.INFO); - int i = 0; - boolean result = false; - // 由于启动应用需要时间,所以需要循环获取状态,如果超过30次,则认为是启动失败 - while (i++ < count){ - result = checkIsRunningStatus(app.getPort(), executeShellUtil); - if(result){ - break; - } - // 休眠6秒 - sleep(6); - } - StringBuilder sb = new StringBuilder(); - sb.append("服务器:").append(ip).append("
应用:").append(resources.getAppName()); - sendResultMsg(result, sb); - executeShellUtil.close(); - return ""; - } - - private ExecuteShellUtil getExecuteShellUtil(String ip) { - ServerDeployDto serverDeployDTO = serverDeployService.findByIp(ip); - if (serverDeployDTO == null) { - sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); - throw new BadRequestException("IP对应服务器信息不存在:" + ip); - } - return new ExecuteShellUtil(ip, serverDeployDTO.getAccount(), serverDeployDTO.getPassword(),serverDeployDTO.getPort()); - } - - private ScpClientUtil getScpClientUtil(String ip) { - ServerDeployDto serverDeployDTO = serverDeployService.findByIp(ip); - if (serverDeployDTO == null) { - sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); - throw new BadRequestException("IP对应服务器信息不存在:" + ip); - } - return ScpClientUtil.getInstance(ip, serverDeployDTO.getPort(), serverDeployDTO.getAccount(), serverDeployDTO.getPassword()); - } - - private void sendResultMsg(boolean result, StringBuilder sb) { - if (result) { - sb.append("
启动成功!"); - sendMsg(sb.toString(), MsgType.INFO); - } else { - sb.append("
启动失败!"); - sendMsg(sb.toString(), MsgType.ERROR); - } - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DeployDto deployDto : queryAll) { - Map map = new LinkedHashMap<>(); - map.put("应用名称", deployDto.getApp().getName()); - map.put("服务器", deployDto.getServers()); - map.put("部署日期", deployDto.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/ServerDeployServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/ServerDeployServiceImpl.java deleted file mode 100644 index 834a7409..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/impl/ServerDeployServiceImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -package co.yixiang.modules.mnt.service.impl; - -import co.yixiang.modules.mnt.domain.ServerDeploy; -import co.yixiang.modules.mnt.service.ServerDeployService; -import co.yixiang.modules.mnt.service.dto.ServerDeployDto; -import co.yixiang.modules.mnt.service.dto.ServerDeployQueryCriteria; -import co.yixiang.modules.mnt.util.ExecuteShellUtil; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.modules.mnt.repository.ServerDeployRepository; -import co.yixiang.modules.mnt.service.mapper.ServerDeployMapper; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.*; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Service -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class ServerDeployServiceImpl implements ServerDeployService { - - private ServerDeployRepository serverDeployRepository; - - private ServerDeployMapper serverDeployMapper; - - public ServerDeployServiceImpl(ServerDeployRepository serverDeployRepository,ServerDeployMapper serverDeployMapper){ - this.serverDeployRepository = serverDeployRepository; - this.serverDeployMapper = serverDeployMapper; - } - - @Override - public Object queryAll(ServerDeployQueryCriteria criteria, Pageable pageable){ - Page page = serverDeployRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(serverDeployMapper::toDto)); - } - - @Override - public List queryAll(ServerDeployQueryCriteria criteria){ - return serverDeployMapper.toDto(serverDeployRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public ServerDeployDto findById(Long id) { - ServerDeploy server = serverDeployRepository.findById(id).orElseGet(ServerDeploy::new); - ValidationUtil.isNull(server.getId(),"ServerDeploy","id",id); - return serverDeployMapper.toDto(server); - } - - @Override - public ServerDeployDto findByIp(String ip) { - ServerDeploy deploy = serverDeployRepository.findByIp(ip); - return serverDeployMapper.toDto(deploy); - } - - @Override - public Boolean testConnect(ServerDeploy resources) { - ExecuteShellUtil executeShellUtil = null; - try { - executeShellUtil = new ExecuteShellUtil(resources.getIp(), resources.getAccount(), resources.getPassword(),resources.getPort()); - return executeShellUtil.execute("ls")==0; - } catch (Exception e) { - return false; - }finally { - if (executeShellUtil != null) { - executeShellUtil.close(); - } - } - } - - @Override - @Transactional(rollbackFor = Exception.class) - public ServerDeployDto create(ServerDeploy resources) { - return serverDeployMapper.toDto(serverDeployRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(ServerDeploy resources) { - ServerDeploy serverDeploy = serverDeployRepository.findById(resources.getId()).orElseGet(ServerDeploy::new); - ValidationUtil.isNull( serverDeploy.getId(),"ServerDeploy","id",resources.getId()); - serverDeploy.copy(resources); - serverDeployRepository.save(serverDeploy); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - serverDeployRepository.deleteById(id); - } - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (ServerDeployDto deployDto : queryAll) { - Map map = new LinkedHashMap<>(); - map.put("服务器名称", deployDto.getName()); - map.put("服务器IP", deployDto.getIp()); - map.put("端口", deployDto.getPort()); - map.put("账号", deployDto.getAccount()); - map.put("创建日期", deployDto.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/AppMapper.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/AppMapper.java deleted file mode 100644 index 85db9d4a..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/AppMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.mnt.domain.App; -import co.yixiang.modules.mnt.service.dto.AppDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface AppMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DatabaseMapper.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DatabaseMapper.java deleted file mode 100644 index 50947a35..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DatabaseMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.mnt.domain.Database; -import co.yixiang.modules.mnt.service.dto.DatabaseDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DatabaseMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployHistoryMapper.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployHistoryMapper.java deleted file mode 100644 index ce5752e1..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployHistoryMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.mnt.domain.DeployHistory; -import co.yixiang.modules.mnt.service.dto.DeployHistoryDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DeployHistoryMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployMapper.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployMapper.java deleted file mode 100644 index a67856aa..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/DeployMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.mnt.domain.Deploy; -import co.yixiang.modules.mnt.service.dto.DeployDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Mapper(componentModel = "spring",uses = {AppMapper.class, ServerDeployMapper.class},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DeployMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/ServerDeployMapper.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/ServerDeployMapper.java deleted file mode 100644 index 4cf5981c..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/service/mapper/ServerDeployMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.mnt.domain.ServerDeploy; -import co.yixiang.modules.mnt.service.dto.ServerDeployDto; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author zhanghouying -* @date 2019-08-24 -*/ -@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface ServerDeployMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/DataTypeEnum.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/util/DataTypeEnum.java deleted file mode 100644 index 2e7fcf80..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/DataTypeEnum.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * << - * Davinci - * == - * Copyright (C) 2016 - 2019 EDP - * == - * 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. - * >> - * - */ - -package co.yixiang.modules.mnt.util; -import lombok.extern.slf4j.Slf4j; - -/** - * @author / - */ -@Slf4j -@SuppressWarnings({"unchecked","all"}) -public enum DataTypeEnum { - - /** mysql */ - MYSQL("mysql", "mysql", "com.mysql.jdbc.Driver", "`", "`", "'", "'"), - - /** oracle */ - ORACLE("oracle", "oracle", "oracle.jdbc.driver.OracleDriver", "\"", "\"", "\"", "\""), - - /** sql server */ - SQLSERVER("sqlserver", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "\"", "\"", "\"", "\""), - - /** h2 */ - H2("h2", "h2", "org.h2.Driver", "`", "`", "\"", "\""), - - /** phoenix */ - PHOENIX("phoenix", "hbase phoenix", "org.apache.phoenix.jdbc.PhoenixDriver", "", "", "\"", "\""), - - /** mongo */ - MONGODB("mongo", "mongodb", "mongodb.jdbc.MongoDriver", "`", "`", "\"", "\""), - - /** sql4es */ - ELASTICSEARCH("sql4es", "elasticsearch", "nl.anchormen.sql4es.jdbc.ESDriver", "", "", "'", "'"), - - /** presto */ - PRESTO("presto", "presto", "com.facebook.presto.jdbc.PrestoDriver", "", "", "\"", "\""), - - /** moonbox */ - MOONBOX("moonbox", "moonbox", "moonbox.jdbc.MbDriver", "`", "`", "`", "`"), - - /** cassandra */ - CASSANDRA("cassandra", "cassandra", "com.github.adejanovski.cassandra.jdbc.CassandraDriver", "", "", "'", "'"), - - /** click house */ - CLICKHOUSE("clickhouse", "clickhouse", "ru.yandex.clickhouse.ClickHouseDriver", "", "", "\"", "\""), - - /** kylin */ - KYLIN("kylin", "kylin", "org.apache.kylin.jdbc.Driver", "\"", "\"", "\"", "\""), - - /** vertica */ - VERTICA("vertica", "vertica", "com.vertica.jdbc.Driver", "", "", "'", "'"), - - /** sap */ - HANA("sap", "sap hana", "com.sap.db.jdbc.Driver", "", "", "'", "'"), - - /** impala */ - IMPALA("impala", "impala", "com.cloudera.impala.jdbc41.Driver", "", "", "'", "'"); - - private String feature; - private String desc; - private String driver; - private String keywordPrefix; - private String keywordSuffix; - private String aliasPrefix; - private String aliasSuffix; - - private static final String JDBC_URL_PREFIX = "jdbc:"; - - DataTypeEnum(String feature, String desc, String driver, String keywordPrefix, String keywordSuffix, String aliasPrefix, String aliasSuffix) { - this.feature = feature; - this.desc = desc; - this.driver = driver; - this.keywordPrefix = keywordPrefix; - this.keywordSuffix = keywordSuffix; - this.aliasPrefix = aliasPrefix; - this.aliasSuffix = aliasSuffix; - } - - public static DataTypeEnum urlOf(String jdbcUrl) { - String url = jdbcUrl.toLowerCase().trim(); - for (DataTypeEnum dataTypeEnum : values()) { - if (url.startsWith(JDBC_URL_PREFIX + dataTypeEnum.feature)) { - try { - Class aClass = Class.forName(dataTypeEnum.getDriver()); - if (null == aClass) { - throw new RuntimeException("Unable to get driver instance for jdbcUrl: " + jdbcUrl); - } - } catch (ClassNotFoundException e) { - throw new RuntimeException("Unable to get driver instance: " + jdbcUrl); - } - return dataTypeEnum; - } - } - return null; - } - - public String getFeature() { - return feature; - } - - public String getDesc() { - return desc; - } - - public String getDriver() { - return driver; - } - - public String getKeywordPrefix() { - return keywordPrefix; - } - - public String getKeywordSuffix() { - return keywordSuffix; - } - - public String getAliasPrefix() { - return aliasPrefix; - } - - public String getAliasSuffix() { - return aliasSuffix; - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ExecuteShellUtil.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ExecuteShellUtil.java deleted file mode 100644 index 4fe3c016..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ExecuteShellUtil.java +++ /dev/null @@ -1,86 +0,0 @@ -package co.yixiang.modules.mnt.util; - -import cn.hutool.core.io.IoUtil; -import com.jcraft.jsch.ChannelShell; -import com.jcraft.jsch.JSch; -import com.jcraft.jsch.Session; -import lombok.extern.slf4j.Slf4j; - -import java.io.*; -import java.util.Vector; - -/** - * 执行shell命令 - * - * @author: ZhangHouYing - * @date: 2019/8/10 - */ -@Slf4j -public class ExecuteShellUtil { - - private Vector stdout; - - Session session; - - public ExecuteShellUtil(final String ipAddress, final String username, final String password,int port) { - try { - JSch jsch = new JSch(); - session = jsch.getSession(username, ipAddress, port); - session.setPassword(password); - session.setConfig("StrictHostKeyChecking", "no"); - session.connect(3000); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - public int execute(final String command) { - int returnCode = 0; - ChannelShell channel = null; - PrintWriter printWriter = null; - BufferedReader input = null; - stdout = new Vector(); - try { - channel = (ChannelShell) session.openChannel("shell"); - channel.connect(); - input = new BufferedReader(new InputStreamReader(channel.getInputStream())); - printWriter = new PrintWriter(channel.getOutputStream()); - printWriter.println(command); - printWriter.println("exit"); - printWriter.flush(); - log.info("The remote command is: "); - String line; - while ((line = input.readLine()) != null) { - stdout.add(line); - System.out.println(line); - } - } catch (Exception e) { - e.printStackTrace(); - return -1; - }finally { - IoUtil.close(printWriter); - IoUtil.close(input); - if (channel != null) { - channel.disconnect(); - } - } - return returnCode; - } - - public void close(){ - if (session != null) { - session.disconnect(); - } - } - - public String executeForResult(String command) { - execute(command); - StringBuilder sb = new StringBuilder(); - for (String str : stdout) { - sb.append(str); - } - return sb.toString(); - } - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ScpClientUtil.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ScpClientUtil.java deleted file mode 100644 index 0e52b123..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ScpClientUtil.java +++ /dev/null @@ -1,88 +0,0 @@ -package co.yixiang.modules.mnt.util; - -import ch.ethz.ssh2.Connection; -import ch.ethz.ssh2.SCPClient; - -import java.io.IOException; -import java.util.logging.Level; -import java.util.logging.Logger; - -/** - * 远程执行linux命令 - * @author: ZhangHouYing - * @date: 2019-08-10 10:06 - */ -public class ScpClientUtil { - - static private ScpClientUtil instance; - - static synchronized public ScpClientUtil getInstance(String ip, int port, String username, String passward) { - if (instance == null) { - instance = new ScpClientUtil(ip, port, username, passward); - } - return instance; - } - - public ScpClientUtil(String ip, int port, String username, String passward) { - this.ip = ip; - this.port = port; - this.username = username; - this.password = passward; - } - - public void getFile(String remoteFile, String localTargetDirectory) { - Connection conn = new Connection(ip, port); - try { - conn.connect(); - boolean isAuthenticated = conn.authenticateWithPassword(username, password); - if (!isAuthenticated) { - System.err.println("authentication failed"); - } - SCPClient client = new SCPClient(conn); - client.get(remoteFile, localTargetDirectory); - } catch (IOException ex) { - Logger.getLogger(SCPClient.class.getName()).log(Level.SEVERE, null, ex); - }finally{ - conn.close(); - } - } - - public void putFile(String localFile, String remoteTargetDirectory) { - putFile(localFile, null, remoteTargetDirectory); - } - - public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory) { - putFile(localFile, remoteFileName, remoteTargetDirectory,null); - } - - public void putFile(String localFile, String remoteFileName, String remoteTargetDirectory, String mode) { - Connection conn = new Connection(ip, port); - try { - conn.connect(); - boolean isAuthenticated = conn.authenticateWithPassword(username, password); - if (!isAuthenticated) { - System.err.println("authentication failed"); - } - SCPClient client = new SCPClient(conn); - if ((mode == null) || (mode.length() == 0)) { - mode = "0600"; - } - if (remoteFileName == null) { - client.put(localFile, remoteTargetDirectory); - } else { - client.put(localFile, remoteFileName, remoteTargetDirectory, mode); - } - } catch (IOException ex) { - Logger.getLogger(ScpClientUtil.class.getName()).log(Level.SEVERE, null, ex); - }finally{ - conn.close(); - } - } - - private String ip; - private int port; - private String username; - private String password; - - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/SqlUtils.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/util/SqlUtils.java deleted file mode 100644 index b4fbe274..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/SqlUtils.java +++ /dev/null @@ -1,215 +0,0 @@ -package co.yixiang.modules.mnt.util; - -import cn.hutool.crypto.SecureUtil; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.util.StringUtils; -import com.google.common.collect.Lists; -import lombok.extern.slf4j.Slf4j; -import javax.sql.DataSource; -import java.io.*; -import java.nio.charset.StandardCharsets; -import java.sql.*; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * @author / - */ -@Slf4j -public class SqlUtils { - - public static final String COLON = ":"; - - private static volatile Map map = new HashMap<>(); - - private static String getKey(String jdbcUrl, String username, String password) { - StringBuilder sb = new StringBuilder(); - if (!StringUtils.isEmpty(username)) { - sb.append(username); - } - if (!StringUtils.isEmpty(password)) { - sb.append(COLON).append(password); - } - sb.append(COLON).append(jdbcUrl.trim()); - - return SecureUtil.md5(sb.toString()); - } - - /** - * 获取数据源 - * - * @param jdbcUrl / - * @param userName / - * @param password / - * @return DataSource - */ - private static DataSource getDataSource(String jdbcUrl, String userName, String password) { - String key = getKey(jdbcUrl, userName, password); - if (!map.containsKey(key) || null == map.get(key)) { - DruidDataSource druidDataSource = new DruidDataSource(); - - String className; - try { - className = DriverManager.getDriver(jdbcUrl.trim()).getClass().getName(); - } catch (SQLException e) { - throw new RuntimeException("Get class name error: =" + jdbcUrl); - } - if (StringUtils.isEmpty(className)) { - DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(jdbcUrl); - if (null == dataTypeEnum) { - throw new RuntimeException("Not supported data type: jdbcUrl=" + jdbcUrl); - } - druidDataSource.setDriverClassName(dataTypeEnum.getDriver()); - } else { - druidDataSource.setDriverClassName(className); - } - - - druidDataSource.setUrl(jdbcUrl); - druidDataSource.setUsername(userName); - druidDataSource.setPassword(password); - // 配置获取连接等待超时的时间 - druidDataSource.setMaxWait(3000); - // 配置初始化大小、最小、最大 - druidDataSource.setInitialSize(1); - druidDataSource.setMinIdle(1); - druidDataSource.setMaxActive(1); - - // 配置间隔多久才进行一次检测需要关闭的空闲连接,单位是毫秒 - druidDataSource.setTimeBetweenEvictionRunsMillis(50000); - // 配置一旦重试多次失败后等待多久再继续重试连接,单位是毫秒 - druidDataSource.setTimeBetweenConnectErrorMillis(18000); - // 配置一个连接在池中最小生存的时间,单位是毫秒 - druidDataSource.setMinEvictableIdleTimeMillis(300000); - // 这个特性能解决 MySQL 服务器8小时关闭连接的问题 - druidDataSource.setMaxEvictableIdleTimeMillis(25200000); - - try { - druidDataSource.init(); - } catch (SQLException e) { - log.error("Exception during pool initialization", e); - throw new RuntimeException(e.getMessage()); - } - map.put(key, druidDataSource); - } - return map.get(key); - } - - private static Connection getConnection(String jdbcUrl, String userName, String password) { - DataSource dataSource = getDataSource(jdbcUrl, userName, password); - Connection connection = null; - try { - connection = dataSource.getConnection(); - } catch (Exception ignored) {} - try { - int timeOut = 5; - if (null == connection || connection.isClosed() || !connection.isValid(timeOut)) { - log.info("connection is closed or invalid, retry get connection!"); - connection = dataSource.getConnection(); - } - } catch (Exception e) { - log.error("create connection error, jdbcUrl: {}", jdbcUrl); - throw new RuntimeException("create connection error, jdbcUrl: " + jdbcUrl); - } - return connection; - } - - private static void releaseConnection(Connection connection) { - if (null != connection) { - try { - connection.close(); - } catch (Exception e) { - e.printStackTrace(); - log.error("connection close error:" + e.getMessage()); - } - } - } - - - public static void closeResult(ResultSet rs) { - if (rs != null) { - try { - rs.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - public static boolean testConnection(String jdbcUrl, String userName, String password) { - Connection connection = null; - try { - connection = getConnection(jdbcUrl, userName, password); - if (null != connection) { - return true; - } - } catch (Exception e) { - log.info("Get connection failed:" + e.getMessage()); - } finally { - releaseConnection(connection); - } - return false; - } - - public static String executeFile(String jdbcUrl, String userName, String password, File sqlFile) { - Connection connection = getConnection(jdbcUrl, userName, password); - try { - batchExecute(connection, readSqlList(sqlFile)); - } catch (Exception e) { - log.error("sql脚本执行发生异常:{}",e.getMessage()); - return e.getMessage(); - }finally { - releaseConnection(connection); - } - return "success"; - } - - - /** - * 批量执行sql - * @param connection / - * @param sqlList / - */ - public static void batchExecute(Connection connection, List sqlList) throws SQLException { - Statement st = connection.createStatement(); - for (String sql : sqlList) { - if (sql.endsWith(";")) { - sql = sql.substring(0, sql.length() - 1); - } - st.addBatch(sql); - } - st.executeBatch(); - } - - /** - * 将文件中的sql语句以;为单位读取到列表中 - * @param sqlFile / - * @return / - * @throws Exception e - */ - private static List readSqlList(File sqlFile) throws Exception { - List sqlList = Lists.newArrayList(); - StringBuilder sb = new StringBuilder(); - try (BufferedReader reader = new BufferedReader(new InputStreamReader( - new FileInputStream(sqlFile), StandardCharsets.UTF_8))) { - String tmp; - while ((tmp = reader.readLine()) != null) { - log.info("line:{}", tmp); - if (tmp.endsWith(";")) { - sb.append(tmp); - sqlList.add(sb.toString()); - sb.delete(0, sb.length()); - } else { - sb.append(tmp); - } - } - if (!"".endsWith(sb.toString().trim())) { - sqlList.add(sb.toString()); - } - } - - return sqlList; - } - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ZipUtils.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ZipUtils.java deleted file mode 100644 index a56e83a2..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/util/ZipUtils.java +++ /dev/null @@ -1,132 +0,0 @@ -package co.yixiang.modules.mnt.util; - -import java.io.*; -import java.util.Enumeration; -import java.util.zip.ZipEntry; -import java.util.zip.ZipException; -import java.util.zip.ZipFile; -import java.util.zip.ZipInputStream; - -/** - * @author: ZhangHouYing - * @date: 2019-08-10 13:34 - */ -public class ZipUtils { - /** - * 解压文件 - * - * @param zipFilePath 解压文件路径 - * @param outputFolder 输出解压文件路径 - */ - public static void unZipIt(String zipFilePath, String outputFolder) { - byte[] buffer = new byte[1024]; - - File folder = new File(outputFolder); - if (!folder.exists()) { - folder.mkdir(); - } - try { - //get the zip file content - ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFilePath)); - ZipEntry ze = zis.getNextEntry(); - while (ze != null) { - String fileName = ze.getName(); - File newFile = new File(outputFolder + File.separator + fileName); - System.out.println("file unzip : " + newFile.getAbsoluteFile()); - //大部分网络上的源码,这里没有判断子目录 - if (ze.isDirectory()) { - newFile.mkdirs(); - } else { - new File(newFile.getParent()).mkdirs(); - FileOutputStream fos = new FileOutputStream(newFile); - int len; - while ((len = zis.read(buffer)) != -1) { - fos.write(buffer, 0, len); - } - fos.close(); - } - ze = zis.getNextEntry(); - } - zis.closeEntry(); - zis.close(); - System.out.println("Done"); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static void unzip(File source, String out) throws IOException { - try (ZipInputStream zis = new ZipInputStream(new FileInputStream(source))) { - - ZipEntry entry = zis.getNextEntry(); - - while (entry != null) { - - File file = new File(out, entry.getName()); - - if (entry.isDirectory()) { - file.mkdirs(); - } else { - File parent = file.getParentFile(); - - if (!parent.exists()) { - parent.mkdirs(); - } - - try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(file))) { - - byte[] buffer = new byte[Math.toIntExact(entry.getSize())]; - - int location; - - while ((location = zis.read(buffer)) != -1) { - bos.write(buffer, 0, location); - } - } - } - entry = zis.getNextEntry(); - } - } - } - - /** - * 把所有文件都直接解压到指定目录(忽略子文件夹) - * - * @param zipFile - * @param folderPath - * @throws ZipException - * @throws IOException - */ - public static void upZipFile(File zipFile, String folderPath) throws ZipException, IOException { - File desDir = new File(folderPath); - if (!desDir.exists()) { - desDir.mkdirs(); - } - ZipFile zf = new ZipFile(zipFile); - for (Enumeration entries = zf.entries(); entries.hasMoreElements(); ) { - ZipEntry entry = ((ZipEntry) entries.nextElement()); - InputStream in = zf.getInputStream(entry); - String str = folderPath; - File desFile = new File(str, java.net.URLEncoder.encode(entry.getName(), "UTF-8")); - - if (!desFile.exists()) { - File fileParentDir = desFile.getParentFile(); - if (!fileParentDir.exists()) { - fileParentDir.mkdirs(); - } - } - - OutputStream out = new FileOutputStream(desFile); - byte[] buffer = new byte[1024 * 1024]; - int realLength = in.read(buffer); - while (realLength != -1) { - out.write(buffer, 0, realLength); - realLength = in.read(buffer); - } - - out.close(); - in.close(); - - } - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/MsgType.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/MsgType.java deleted file mode 100644 index 3f598c43..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/MsgType.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.mnt.websocket; - -/** - * @author: ZhangHouYing - * @date: 2019-08-10 9:56 - */ -public enum MsgType { - /** 连接 */ - CONNECT, - /** 关闭 */ - CLOSE, - /** 信息 */ - INFO, - /** 错误 */ - ERROR -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/SocketMsg.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/SocketMsg.java deleted file mode 100644 index a6ab2427..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/SocketMsg.java +++ /dev/null @@ -1,18 +0,0 @@ -package co.yixiang.modules.mnt.websocket; - -import lombok.Data; - -/** - * @author: ZhangHouYing - * @date: 2019-08-10 9:55 - */ -@Data -public class SocketMsg { - private String msg; - private MsgType msgType; - - public SocketMsg(String msg, MsgType msgType) { - this.msg = msg; - this.msgType = msgType; - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/WebSocketServer.java b/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/WebSocketServer.java deleted file mode 100644 index 5bb0279e..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/mnt/websocket/WebSocketServer.java +++ /dev/null @@ -1,124 +0,0 @@ -package co.yixiang.modules.mnt.websocket; - -import com.alibaba.fastjson.JSONObject; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; -import java.io.IOException; -import java.util.Objects; -import java.util.concurrent.CopyOnWriteArraySet; -/** - * @author: ZhangHouYing - * @date: 2019-08-10 15:46 - */ -@ServerEndpoint("/webSocket/{sid}") -@Slf4j -@Component -public class WebSocketServer { - - /** - * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 - */ - private static CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet(); - - /** - * 与某个客户端的连接会话,需要通过它来给客户端发送数据 - */ - private Session session; - - /** - * 接收sid - */ - private String sid=""; - /** - * 连接建立成功调用的方法 - * */ - @OnOpen - public void onOpen(Session session,@PathParam("sid") String sid) { - this.session = session; - //如果存在就先删除一个,防止重复推送消息 - for (WebSocketServer webSocket:webSocketSet) { - if (webSocket.sid.equals(sid)) { - webSocketSet.remove(webSocket); - } - } - webSocketSet.add(this); - this.sid=sid; - } - - /** - * 连接关闭调用的方法 - */ - @OnClose - public void onClose() { - webSocketSet.remove(this); - } - - /** - * 收到客户端消息后调用的方法 - * @param message 客户端发送过来的消息*/ - @OnMessage - public void onMessage(String message, Session session) { - log.info("收到来"+sid+"的信息:"+message); - //群发消息 - for (WebSocketServer item : webSocketSet) { - try { - item.sendMessage(message); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - @OnError - public void onError(Session session, Throwable error) { - log.error("发生错误"); - error.printStackTrace(); - } - /** - * 实现服务器主动推送 - */ - private void sendMessage(String message) throws IOException { - this.session.getBasicRemote().sendText(message); - } - - - /** - * 群发自定义消息 - * */ - public static void sendInfo(SocketMsg socketMsg,@PathParam("sid") String sid) throws IOException { - String message = JSONObject.toJSONString(socketMsg); - log.info("推送消息到"+sid+",推送内容:"+message); - for (WebSocketServer item : webSocketSet) { - try { - //这里可以设定只推送给这个sid的,为null则全部推送 - if(sid==null) { - item.sendMessage(message); - }else if(item.sid.equals(sid)){ - item.sendMessage(message); - } - } catch (IOException ignored) { } - } - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - WebSocketServer that = (WebSocketServer) o; - return Objects.equals(session, that.session) && - Objects.equals(sid, that.sid); - } - - @Override - public int hashCode() { - return Objects.hash(session, sid); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Server.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Server.java deleted file mode 100644 index 33556060..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Server.java +++ /dev/null @@ -1,107 +0,0 @@ -package co.yixiang.modules.monitor.domain; - -import lombok.Data; -import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.bean.copier.CopyOptions; -import javax.persistence.*; -import java.io.Serializable; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Entity -@Data -@Table(name="monitor_server") -public class Server implements Serializable { - - /** - * 编号 - */ - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - private Integer id; - - /** - * 名称 - */ - @Column(name = "name") - private String name; - - /** - * IP地址 - */ - @Column(name = "address",nullable = false) - private String address; - - /** - * 访问端口 - */ - @Column(name = "port") - private Integer port; - - /** - * 状态 - */ - @Column(name = "state") - private String state; - - /** - * CPU使用率 - */ - @Column(name = "cpu_rate") - private Double cpuRate; - - /** - * CPU内核数 - */ - @Column(name = "cpu_core") - private Integer cpuCore; - - /** - * 内存总数 - */ - @Column(name = "mem_total") - private Double memTotal; - - /** - * 内存使用量 - */ - @Column(name = "mem_used") - private Double memUsed; - - /** - * 磁盘总量 - */ - @Column(name = "disk_total") - private Double diskTotal; - - /** - * 磁盘使用量 - */ - @Column(name = "disk_used") - private Double diskUsed; - - /** - * 交换区总量 - */ - @Column(name = "swap_total") - private Double swapTotal; - - /** - * 交换区使用量 - */ - @Column(name = "swap_used") - private Double swapUsed; - - /** - * 排序 - */ - @Column(name = "sort") - private Integer sort; - - public void copy(Server source){ - BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Visits.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Visits.java index e7b5e6f8..467d8aa5 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Visits.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/domain/Visits.java @@ -1,9 +1,10 @@ package co.yixiang.modules.monitor.domain; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; import java.io.Serializable; import java.sql.Timestamp; @@ -13,28 +14,21 @@ import java.sql.Timestamp; * @author Zheng Jie * @date 2018-12-13 */ -@Entity @Data -@Table(name = "visits") +@TableName( "visits") public class Visits implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @TableId private Long id; - @Column(unique = true) private String date; - @Column(name = "pv_counts") private Long pvCounts; - @Column(name = "ip_counts") private Long ipCounts; - @CreationTimestamp - @Column(name = "create_time") + @TableField(fill = FieldFill.INSERT) private Timestamp createTime; - @Column(name = "week_day") private String weekDay; } diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/ServerRepository.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/ServerRepository.java deleted file mode 100644 index 70ff5649..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/ServerRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.monitor.repository; - -import co.yixiang.modules.monitor.domain.Server; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -public interface ServerRepository extends JpaRepository, JpaSpecificationExecutor { -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/VisitsRepository.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/VisitsRepository.java deleted file mode 100644 index 8112d23d..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/repository/VisitsRepository.java +++ /dev/null @@ -1,31 +0,0 @@ -package co.yixiang.modules.monitor.repository; - -import co.yixiang.modules.monitor.domain.Visits; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import org.springframework.stereotype.Repository; -import java.util.List; - -/** - * @author Zheng Jie - * @date 2018-12-13 - */ -@Repository -public interface VisitsRepository extends JpaRepository { - - /** - * findByDate - * @param date 日期 - * @return Visits - */ - Visits findByDate(String date); - - /** - * 获得一个时间段的记录 - * @param date1 日期1 - * @param date2 日期2 - * @return List - */ - @Query(value = "select * FROM visits where create_time between ?1 and ?2",nativeQuery = true) - List findAllVisits(String date1, String date2); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java index 2cd4b23b..d81a0386 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/LimitController.java @@ -1,12 +1,13 @@ package co.yixiang.modules.monitor.rest; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; import co.yixiang.annotation.AnonymousAccess; import co.yixiang.annotation.Limit; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; + import java.util.concurrent.atomic.AtomicInteger; /** diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java index 65fe9bf7..862bd22d 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java @@ -1,11 +1,8 @@ package co.yixiang.modules.monitor.rest; -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.monitor.service.RedisService; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.monitor.domain.vo.RedisVo; +import co.yixiang.modules.monitor.service.RedisService; import io.swagger.annotations.Api; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/ServerController.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/ServerController.java deleted file mode 100644 index 763d4ab5..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/ServerController.java +++ /dev/null @@ -1,71 +0,0 @@ -package co.yixiang.modules.monitor.rest; - -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.monitor.domain.Server; -import co.yixiang.modules.monitor.service.ServerService; -import co.yixiang.modules.monitor.service.dto.ServerQueryCriteria; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -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 java.util.Set; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Api(tags = "服务监控管理") -@RestController -@RequestMapping("/api/server") -public class ServerController { - - private final ServerService serverService; - - public ServerController(ServerService serverService) { - this.serverService = serverService; - } - - @GetMapping - @Log("查询服务监控") - @ApiOperation("查询服务监控") - @PreAuthorize("@el.check('admin','server:list')") - public ResponseEntity getServers(ServerQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(serverService.queryAll(criteria,pageable),HttpStatus.OK); - } - - @PostMapping - @Log("新增服务监控") - @ApiOperation("新增服务监控") - @PreAuthorize("@el.check('admin','server:add')") - public ResponseEntity create(@Validated @RequestBody Server resources){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - return new ResponseEntity<>(serverService.create(resources),HttpStatus.CREATED); - } - - @PutMapping - @Log("修改服务监控") - @ApiOperation("修改服务监控") - @PreAuthorize("@el.check('admin','server:edit')") - public ResponseEntity update(@Validated @RequestBody Server resources){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - serverService.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } - - @DeleteMapping - @Log("删除服务监控") - @ApiOperation("删除服务监控") - @PreAuthorize("@el.check('admin','server:del')") - public ResponseEntity delete(@RequestBody Set ids){ - //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - serverService.delete(ids); - return new ResponseEntity<>(HttpStatus.OK); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java index b0e3f05a..6ce3a612 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java @@ -1,9 +1,9 @@ package co.yixiang.modules.monitor.rest; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; import co.yixiang.modules.monitor.service.VisitsService; import co.yixiang.utils.RequestHolder; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/ServerService.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/ServerService.java deleted file mode 100644 index f44d69e3..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/ServerService.java +++ /dev/null @@ -1,59 +0,0 @@ -package co.yixiang.modules.monitor.service; - -import co.yixiang.modules.monitor.domain.Server; -import co.yixiang.modules.monitor.service.dto.ServerDTO; -import co.yixiang.modules.monitor.service.dto.ServerQueryCriteria; -import org.springframework.data.domain.Pageable; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -public interface ServerService { - - /** - * 查询数据分页 - * @param criteria 条件参数 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(ServerQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(ServerQueryCriteria criteria); - - /** - * 根据ID查询 - * @param id ID - * @return ServerDTO - */ - ServerDTO findById(Integer id); - - /** - * 创建服务监控 - * @param resources / - * @return / - */ - ServerDTO create(Server resources); - - /** - * 编辑服务监控 - * @param resources / - */ - void update(Server resources); - - /** - * 删除 - * @param id / - */ - void delete(Set id); - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java index 635bd4e5..74ebb415 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java @@ -1,13 +1,16 @@ package co.yixiang.modules.monitor.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.monitor.domain.Visits; import org.springframework.scheduling.annotation.Async; + import javax.servlet.http.HttpServletRequest; /** * @author Zheng Jie * @date 2018-12-13 */ -public interface VisitsService { +public interface VisitsService extends BaseService { /** * 提供给定时任务,每天0点执行 diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerDTO.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerDTO.java deleted file mode 100644 index e9c99b5a..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerDTO.java +++ /dev/null @@ -1,49 +0,0 @@ -package co.yixiang.modules.monitor.service.dto; - -import lombok.Data; -import java.io.Serializable; - - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Data -public class ServerDTO implements Serializable { - - private Integer id; - - private String name; - - private String address; - - private Integer port; - - private String state; - - /** CPU使用率 */ - private Float cpuRate; - - /** CPU内核数 */ - private Integer cpuCore; - - /** 内存总数 */ - private Float memTotal; - - /** 内存使用量 */ - private Float memUsed; - - /** 磁盘总量 */ - private Float diskTotal; - - /** 磁盘使用量 */ - private Float diskUsed; - - /** 交换区总量 */ - private Float swapTotal; - - /** 交换区使用量 */ - private Float swapUsed; - - private Integer sort; -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerQueryCriteria.java deleted file mode 100644 index 5a1c1399..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/dto/ServerQueryCriteria.java +++ /dev/null @@ -1,15 +0,0 @@ -package co.yixiang.modules.monitor.service.dto; - -import lombok.Data; -import co.yixiang.annotation.Query; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Data -public class ServerQueryCriteria{ - - @Query(blurry = "name,address") - private String blurry; -} \ No newline at end of file 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..8d654fe9 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 @@ -1,8 +1,8 @@ package co.yixiang.modules.monitor.service.impl; -import co.yixiang.utils.PageUtil; import co.yixiang.modules.monitor.domain.vo.RedisVo; import co.yixiang.modules.monitor.service.RedisService; +import co.yixiang.utils.PageUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; @@ -11,6 +11,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.redis.connection.DataType; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; + import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/ServerServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/ServerServiceImpl.java deleted file mode 100644 index 1afbca65..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/ServerServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package co.yixiang.modules.monitor.service.impl; - -import cn.hutool.http.HttpUtil; -import co.yixiang.modules.monitor.domain.Server; -import co.yixiang.modules.monitor.service.ServerService; -import com.alibaba.fastjson.JSONObject; -import co.yixiang.modules.monitor.repository.ServerRepository; -import co.yixiang.modules.monitor.service.dto.ServerDTO; -import co.yixiang.modules.monitor.service.dto.ServerQueryCriteria; -import co.yixiang.modules.monitor.service.mapper.ServerMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Service -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class ServerServiceImpl implements ServerService { - - private final ServerRepository serverRepository; - - private final ServerMapper serverMapper; - - public ServerServiceImpl(ServerRepository serverRepository, ServerMapper serverMapper) { - this.serverRepository = serverRepository; - this.serverMapper = serverMapper; - } - - @Override - public Map queryAll(ServerQueryCriteria criteria, Pageable pageable){ - Page page = serverRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - page.forEach(server -> { - try { - server.setState("1"); - String url = String.format("http://%s:%d/api/serverMonitor",server.getAddress(),server.getPort()); - String res = HttpUtil.get(url,1000); - JSONObject obj = JSONObject.parseObject(res); - server.setCpuRate(obj.getDouble("cpuRate")); - server.setCpuCore(obj.getInteger("cpuCore")); - server.setMemTotal(obj.getDouble("memTotal")); - server.setMemUsed(obj.getDouble("memUsed")); - server.setDiskTotal(obj.getDouble("diskTotal")); - server.setDiskUsed(obj.getDouble("diskUsed")); - server.setSwapTotal(obj.getDouble("swapTotal")); - server.setSwapUsed(obj.getDouble("swapUsed")); - } catch (Exception e) { - server.setState("0"); - e.printStackTrace(); - } - }); - - return PageUtil.toPage(page.map(serverMapper::toDto)); - } - - @Override - public List queryAll(ServerQueryCriteria criteria){ - return serverMapper.toDto(serverRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } - - @Override - public ServerDTO findById(Integer id) { - Server server = serverRepository.findById(id).orElseGet(Server::new); - ValidationUtil.isNull(server.getId(),"Server","id",id); - return serverMapper.toDto(server); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public ServerDTO create(Server resources) { - return serverMapper.toDto(serverRepository.save(resources)); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(Server resources) { - Server server = serverRepository.findById(resources.getId()).orElseGet(Server::new); - ValidationUtil.isNull( server.getId(),"Server","id",resources.getId()); - server.copy(resources); - serverRepository.save(server); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Integer id : ids) { - serverRepository.deleteById(id); - } - } - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java index 96dd5fff..ec213473 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java @@ -1,69 +1,76 @@ package co.yixiang.modules.monitor.service.impl; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.logging.service.mapper.LogMapper; import co.yixiang.modules.monitor.domain.Visits; -import lombok.extern.slf4j.Slf4j; -import co.yixiang.modules.monitor.repository.VisitsRepository; import co.yixiang.modules.monitor.service.VisitsService; -import co.yixiang.repository.LogRepository; +import co.yixiang.modules.monitor.service.mapper.VisitsMapper; import co.yixiang.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; + import javax.servlet.http.HttpServletRequest; import java.time.LocalDate; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** - * @author Zheng Jie + * @author hupeng * @date 2018-12-13 */ @Slf4j @Service @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class VisitsServiceImpl implements VisitsService { +public class VisitsServiceImpl extends BaseServiceImpl implements VisitsService { - private final VisitsRepository visitsRepository; - private final LogRepository logRepository; + private final LogMapper logMapper; - public VisitsServiceImpl(VisitsRepository visitsRepository, LogRepository logRepository) { - this.visitsRepository = visitsRepository; - this.logRepository = logRepository; + private final VisitsMapper visitsMapper; + + public VisitsServiceImpl(LogMapper logMapper, VisitsMapper visitsMapper) { + this.logMapper = logMapper; + this.visitsMapper = visitsMapper; } + @Override public void save() { LocalDate localDate = LocalDate.now(); - Visits visits = visitsRepository.findByDate(localDate.toString()); + Visits visits = this.getOne(new QueryWrapper().lambda() + .eq(Visits::getDate,localDate.toString())); if(visits == null){ visits = new Visits(); visits.setWeekDay(StringUtils.getWeekDay()); visits.setPvCounts(1L); visits.setIpCounts(1L); visits.setDate(localDate.toString()); - visitsRepository.save(visits); + this.save(visits); } } @Override public void count(HttpServletRequest request) { LocalDate localDate = LocalDate.now(); - Visits visits = visitsRepository.findByDate(localDate.toString()); + Visits visits = this.getOne(new QueryWrapper().lambda() + .eq(Visits::getDate,localDate.toString())); visits.setPvCounts(visits.getPvCounts()+1); - long ipCounts = logRepository.findIp(localDate.toString(), localDate.plusDays(1).toString()); + long ipCounts = logMapper.findIp(localDate.toString(), localDate.plusDays(1).toString()); visits.setIpCounts(ipCounts); - visitsRepository.save(visits); + this.save(visits); } @Override public Object get() { Map map = new HashMap<>(4); LocalDate localDate = LocalDate.now(); - Visits visits = visitsRepository.findByDate(localDate.toString()); - List list = visitsRepository.findAllVisits(localDate.minusDays(6).toString(),localDate.plusDays(1).toString()); + Visits visits = this.getOne(new QueryWrapper().lambda() + .eq(Visits::getDate,localDate.toString())); + List list = visitsMapper.findAllVisits(localDate.minusDays(6).toString(),localDate.plusDays(1).toString()); long recentVisits = 0, recentIp = 0; for (Visits data : list) { @@ -80,11 +87,11 @@ public class VisitsServiceImpl implements VisitsService { @Override public Object getChartData() { Map map = new HashMap<>(3); - LocalDate localDate = LocalDate.now(); - List list = visitsRepository.findAllVisits(localDate.minusDays(6).toString(),localDate.plusDays(1).toString()); - map.put("weekDays",list.stream().map(Visits::getWeekDay).collect(Collectors.toList())); - map.put("visitsData",list.stream().map(Visits::getPvCounts).collect(Collectors.toList())); - map.put("ipData",list.stream().map(Visits::getIpCounts).collect(Collectors.toList())); +// LocalDate localDate = LocalDate.now(); +// List list = visitsRepository.findAllVisits(localDate.minusDays(6).toString(),localDate.plusDays(1).toString()); +// map.put("weekDays",list.stream().map(Visits::getWeekDay).collect(Collectors.toList())); +// map.put("visitsData",list.stream().map(Visits::getPvCounts).collect(Collectors.toList())); +// map.put("ipData",list.stream().map(Visits::getIpCounts).collect(Collectors.toList())); return map; } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/ServerMapper.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/ServerMapper.java deleted file mode 100644 index 63fe5047..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/ServerMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.monitor.service.mapper; - -import co.yixiang.modules.monitor.domain.Server; -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.monitor.service.dto.ServerDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author Zhang houying -* @date 2019-11-03 -*/ -@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface ServerMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java new file mode 100644 index 00000000..9d8e304e --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java @@ -0,0 +1,18 @@ +package co.yixiang.modules.monitor.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.monitor.domain.Visits; +import co.yixiang.modules.system.domain.Dept; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +@Mapper +public interface VisitsMapper extends CoreMapper { + @Select("select * FROM visits where create_time between #{time1} and #{time2}") + List findAllVisits(@Param("time1") String time1, @Param("time2")String time2); +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java index 7da2d9f3..5874a923 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java @@ -1,8 +1,13 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.config; -import co.yixiang.modules.quartz.utils.QuartzManage; import co.yixiang.modules.quartz.domain.QuartzJob; -import co.yixiang.modules.quartz.repository.QuartzJobRepository; +import co.yixiang.modules.quartz.service.QuartzJobService; +import co.yixiang.modules.quartz.utils.QuartzManage; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; import org.springframework.stereotype.Component; @@ -10,18 +15,18 @@ import org.springframework.stereotype.Component; import java.util.List; /** - * @author Zheng Jie + * @author hupeng * @date 2019-01-07 */ @Component public class JobRunner implements ApplicationRunner { - private final QuartzJobRepository quartzJobRepository; + private final QuartzJobService quartzJobService; private final QuartzManage quartzManage; - public JobRunner(QuartzJobRepository quartzJobRepository, QuartzManage quartzManage) { - this.quartzJobRepository = quartzJobRepository; + public JobRunner(QuartzJobService quartzJobService, QuartzManage quartzManage) { + this.quartzJobService = quartzJobService; this.quartzManage = quartzManage; } @@ -32,7 +37,7 @@ public class JobRunner implements ApplicationRunner { @Override public void run(ApplicationArguments applicationArguments){ System.out.println("--------------------注入定时任务---------------------"); - List quartzJobs = quartzJobRepository.findByIsPauseIsFalse(); + List quartzJobs = quartzJobService.findByIsPauseIsFalse(); quartzJobs.forEach(quartzManage::addJob); System.out.println("--------------------定时任务注入完成---------------------"); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java index 4f0a1920..cec469b1 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.config; import org.quartz.Scheduler; diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java index bbfd64bb..fe3734b4 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java @@ -1,66 +1,68 @@ -package co.yixiang.modules.quartz.domain; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; + */ +package co.yixiang.modules.quartz.domain; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; import java.sql.Timestamp; +import java.io.Serializable; /** - * @author Zheng Jie - * @date 2019-01-07 - */ -@Getter -@Setter -@Entity -@Table(name = "quartz_job") -public class QuartzJob implements Serializable { +* @author hupeng +* @date 2020-05-13 +*/ + +@Data +@TableName("quartz_job") +public class QuartzJob implements Serializable { public static final String JOB_KEY = "JOB_KEY"; - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @NotNull(groups = {Update.class}) + /** 定时任务ID */ + @TableId private Long id; - /** 定时器名称 */ - @Column(name = "job_name") - private String jobName; - /** Bean名称 */ - @Column(name = "bean_name") - @NotBlank + /** Spring Bean名称 */ private String beanName; - /** 方法名称 */ - @Column(name = "method_name") - @NotBlank - private String methodName; - /** 参数 */ - @Column(name = "params") - private String params; - - /** cron表达式 */ - @Column(name = "cron_expression") - @NotBlank + /** cron 表达式 */ private String cronExpression; - /** 状态 */ - @Column(name = "is_pause") - private Boolean isPause = false; + + /** 状态:1暂停、0启用 */ + private Boolean isPause; + + + /** 任务名称 */ + private String jobName; + + + /** 方法名称 */ + private String methodName; + + + /** 参数 */ + private String params; + /** 备注 */ - @Column(name = "remark") - @NotBlank private String remark; - @Column(name = "create_time") - @CreationTimestamp + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} -} \ No newline at end of file + public void copy(QuartzJob source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java index 91b36cbf..67c3b1d7 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java @@ -1,58 +1,71 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.domain; - +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; import java.sql.Timestamp; +import java.io.Serializable; /** - * @author Zheng Jie - * @date 2019-01-07 - */ -@Entity +* @author hupeng +* @date 2020-05-13 +*/ + @Data -@Table(name = "quartz_log") +@TableName("quartz_log") public class QuartzLog implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + /** 任务日志ID */ + @TableId private Long id; + /** 任务名称 */ - @Column(name = "job_name") - private String jobName; + private String baenName; - /** Bean名称 */ - @Column(name = "baen_name") - private String beanName; - /** 方法名称 */ - @Column(name = "method_name") - private String methodName; + /** 创建时间 */ + @TableField(fill= FieldFill.INSERT) + private Timestamp createTime; - /** 参数 */ - @Column(name = "params") - private String params; /** cron表达式 */ - @Column(name = "cron_expression") private String cronExpression; + + /** 异常详细 */ + private String exceptionDetail; + + /** 状态 */ - @Column(name = "is_success") private Boolean isSuccess; - /** 异常详细 */ - @Column(name = "exception_detail",columnDefinition = "text") - private String exceptionDetail; + + /** 任务名称 */ + private String jobName; + + + /** 方法名称 */ + private String methodName; + + + /** 参数 */ + private String params; + /** 耗时(毫秒) */ private Long time; - /** 创建日期 */ - @CreationTimestamp - @Column(name = "create_time") - private Timestamp createTime; + + public void copy(QuartzLog source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzJobRepository.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzJobRepository.java deleted file mode 100644 index 39b8eacd..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzJobRepository.java +++ /dev/null @@ -1,19 +0,0 @@ -package co.yixiang.modules.quartz.repository; - -import co.yixiang.modules.quartz.domain.QuartzJob; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import java.util.List; - -/** - * @author Zheng Jie - * @date 2019-01-07 - */ -public interface QuartzJobRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 查询启用的任务 - * @return List - */ - List findByIsPauseIsFalse(); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzLogRepository.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzLogRepository.java deleted file mode 100644 index 44ac0588..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/repository/QuartzLogRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.modules.quartz.repository; - -import co.yixiang.modules.quartz.domain.QuartzLog; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** - * @author Zheng Jie - * @date 2019-01-07 - */ -public interface QuartzLogRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java index 69e47862..7c970252 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java @@ -1,11 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.quartz.domain.QuartzJob; import co.yixiang.modules.quartz.service.QuartzJobService; -import co.yixiang.modules.quartz.service.dto.JobQueryCriteria; +import co.yixiang.modules.quartz.service.QuartzLogService; +import co.yixiang.modules.quartz.service.dto.QuartzJobDto; +import co.yixiang.modules.quartz.service.dto.QuartzJobQueryCriteria; +import co.yixiang.modules.quartz.service.dto.QuartzLogDto; +import co.yixiang.modules.quartz.service.dto.QuartzLogQueryCriteria; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -18,10 +28,11 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.Set; +import java.util.ArrayList; +import java.util.Arrays; /** - * @author Zheng Jie + * @author hupeng * @date 2019-01-07 */ @Slf4j @@ -33,16 +44,22 @@ public class QuartzJobController { private static final String ENTITY_NAME = "quartzJob"; private final QuartzJobService quartzJobService; + private final IGenerator generator; + private final QuartzLogService quartzLogService; - public QuartzJobController(QuartzJobService quartzJobService) { + + + public QuartzJobController(QuartzJobService quartzJobService, IGenerator generator, QuartzLogService quartzLogService) { this.quartzJobService = quartzJobService; + this.generator = generator; + this.quartzLogService = quartzLogService; } @Log("查询定时任务") @ApiOperation("查询定时任务") @GetMapping @PreAuthorize("@el.check('admin','timing:list')") - public ResponseEntity getJobs(JobQueryCriteria criteria, Pageable pageable){ + public ResponseEntity getJobs(QuartzJobQueryCriteria criteria, Pageable pageable){ return new ResponseEntity<>(quartzJobService.queryAll(criteria,pageable), HttpStatus.OK); } @@ -50,23 +67,23 @@ public class QuartzJobController { @ApiOperation("导出任务数据") @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','timing:list')") - public void download(HttpServletResponse response, JobQueryCriteria criteria) throws IOException { - quartzJobService.download(quartzJobService.queryAll(criteria), response); + public void download(HttpServletResponse response, QuartzJobQueryCriteria criteria) throws IOException { + quartzJobService.download(generator.convert(quartzJobService.queryAll(criteria),QuartzJobDto.class), response); } @Log("导出日志数据") @ApiOperation("导出日志数据") @GetMapping(value = "/logs/download") @PreAuthorize("@el.check('admin','timing:list')") - public void downloadLog(HttpServletResponse response, JobQueryCriteria criteria) throws IOException { - quartzJobService.downloadLog(quartzJobService.queryAllLog(criteria), response); + public void downloadLog(HttpServletResponse response, QuartzLogQueryCriteria criteria) throws IOException { + quartzLogService.download(generator.convert(quartzLogService.queryAll(criteria), QuartzLogDto.class), response); } @ApiOperation("查询任务执行日志") @GetMapping(value = "/logs") @PreAuthorize("@el.check('admin','timing:list')") - public ResponseEntity getJobLogs(JobQueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(quartzJobService.queryAllLog(criteria,pageable), HttpStatus.OK); + public ResponseEntity getJobLogs(QuartzLogQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(quartzLogService.queryAll(criteria,pageable), HttpStatus.OK); } @Log("新增定时任务") @@ -78,16 +95,16 @@ public class QuartzJobController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(quartzJobService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(quartzJobService.save(resources),HttpStatus.CREATED); } @Log("修改定时任务") @ApiOperation("修改定时任务") @PutMapping @PreAuthorize("@el.check('admin','timing:edit')") - public ResponseEntity update(@Validated(QuartzJob.Update.class) @RequestBody QuartzJob resources){ + public ResponseEntity update(@Validated @RequestBody QuartzJob resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - quartzJobService.update(resources); + quartzJobService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -97,7 +114,7 @@ public class QuartzJobController { @PreAuthorize("@el.check('admin','timing:edit')") public ResponseEntity updateIsPause(@PathVariable Long id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - quartzJobService.updateIsPause(quartzJobService.findById(id)); + quartzJobService.updateIsPause(quartzJobService.getOne(new QueryWrapper().eq("uid",id))); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -107,7 +124,7 @@ public class QuartzJobController { @PreAuthorize("@el.check('admin','timing:edit')") public ResponseEntity execution(@PathVariable Long id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - quartzJobService.execution(quartzJobService.findById(id)); + quartzJobService.execution(quartzJobService.getOne(new QueryWrapper().eq("id",id))); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -115,9 +132,9 @@ public class QuartzJobController { @ApiOperation("删除定时任务") @DeleteMapping @PreAuthorize("@el.check('admin','timing:del')") - public ResponseEntity delete(@RequestBody Set ids){ + public ResponseEntity delete(@RequestBody Integer[] ids){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - quartzJobService.delete(ids); + quartzJobService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java index 29ed4bba..7164f786 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java @@ -1,76 +1,48 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.quartz.domain.QuartzJob; -import co.yixiang.modules.quartz.domain.QuartzLog; -import co.yixiang.modules.quartz.service.dto.JobQueryCriteria; +import co.yixiang.modules.quartz.service.dto.QuartzJobDto; +import co.yixiang.modules.quartz.service.dto.QuartzJobQueryCriteria; import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import java.util.Map; import java.util.List; -import java.util.Set; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** - * @author Zheng Jie - * @date 2019-01-07 - */ -public interface QuartzJobService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface QuartzJobService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(QuartzJobQueryCriteria criteria, Pageable pageable); /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAll(JobQueryCriteria criteria, Pageable pageable); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(QuartzJobQueryCriteria criteria); /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAll(JobQueryCriteria criteria); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; - /** - * 分页查询日志 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ - Object queryAllLog(JobQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAllLog(JobQueryCriteria criteria); - - /** - * 创建 - * @param resources / - * @return / - */ - QuartzJob create(QuartzJob resources); - - /** - * 编辑 - * @param resources / - */ - void update(QuartzJob resources); - - /** - * 删除任务 - * @param ids / - */ - void delete(Set ids); - - /** - * 根据ID查询 - * @param id ID - * @return / - */ - QuartzJob findById(Long id); /** * 更改定时任务状态 @@ -85,18 +57,8 @@ public interface QuartzJobService { void execution(QuartzJob quartzJob); /** - * 导出定时任务 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / + * 查询启用的任务 + * @return List */ - void download(List queryAll, HttpServletResponse response) throws IOException; - - /** - * 导出定时任务日志 - * @param queryAllLog 待导出的数据 - * @param response / - * @throws IOException / - */ - void downloadLog(List queryAllLog, HttpServletResponse response) throws IOException; + List findByIsPauseIsFalse(); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java new file mode 100644 index 00000000..38d7318f --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.quartz.domain.QuartzLog; +import co.yixiang.modules.quartz.service.dto.QuartzLogDto; +import co.yixiang.modules.quartz.service.dto.QuartzLogQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +public interface QuartzLogService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(QuartzLogQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(QuartzLogQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java new file mode 100644 index 00000000..0d330abe --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java @@ -0,0 +1,46 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Data +public class QuartzJobDto implements Serializable { + + /** 定时任务ID */ + private Long id; + + /** Bean名称 */ + private String beanName; + + /** cron 表达式 */ + private String cronExpression; + + /** 状态:1暂停、0启用 */ + private Boolean isPause; + + /** 任务名称 */ + private String jobName; + + /** 方法名称 */ + private String methodName; + + /** 参数 */ + private String params; + + /** 备注 */ + private String remark; + + /** 创建日期 */ + private Timestamp createTime; + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/JobQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java similarity index 64% rename from yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/JobQueryCriteria.java rename to yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java index 5783d48b..6f4ea941 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/JobQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java @@ -1,17 +1,22 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.service.dto; -import co.yixiang.annotation.Query; import lombok.Data; import java.sql.Timestamp; import java.util.List; +import co.yixiang.annotation.Query; /** - * @author Zheng Jie - * @date 2019-6-4 10:33:02 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class JobQueryCriteria { +public class QuartzJobQueryCriteria{ @Query(type = Query.Type.INNER_LIKE) private String jobName; @@ -19,6 +24,9 @@ public class JobQueryCriteria { @Query private Boolean isSuccess; + @Query + private Boolean isPause; + @Query(type = Query.Type.BETWEEN) private List createTime; } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java new file mode 100644 index 00000000..7b9887a0 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Data +public class QuartzLogDto implements Serializable { + + /** 定时任务名称 */ + private String baenName; + + /** Bean名称 */ + private Timestamp createTime; + + /** cron表达式 */ + private String cronExpression; + + /** 异常详细 */ + private String exceptionDetail; + + /** 状态 */ + private Boolean isSuccess; + + /** 任务名称 */ + private String jobName; + + /** 方法名称 */ + private String methodName; + + /** 参数 */ + private String params; + + /** 耗时(毫秒) */ + private Long time; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java new file mode 100644 index 00000000..11202d41 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java @@ -0,0 +1,18 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Data +public class QuartzLogQueryCriteria{ +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java index adf5a7f5..11dae829 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java @@ -1,108 +1,110 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.service.impl; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.quartz.domain.QuartzJob; -import co.yixiang.modules.quartz.domain.QuartzLog; -import co.yixiang.modules.quartz.service.QuartzJobService; -import co.yixiang.modules.quartz.service.dto.JobQueryCriteria; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.modules.quartz.utils.QuartzManage; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.modules.quartz.repository.QuartzJobRepository; -import co.yixiang.modules.quartz.repository.QuartzLogRepository; -import org.quartz.CronExpression; -import org.springframework.cache.annotation.CacheConfig; -import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; -import org.springframework.data.domain.Pageable; +import co.yixiang.modules.quartz.service.QuartzJobService; +import co.yixiang.modules.quartz.service.dto.QuartzJobDto; +import co.yixiang.modules.quartz.service.dto.QuartzJobQueryCriteria; +import co.yixiang.modules.quartz.service.mapper.QuartzJobMapper; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; +import java.util.List; +import java.util.Map; import java.io.IOException; -import java.util.*; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** - * @author Zheng Jie - * @date 2019-01-07 - */ -@Service(value = "quartzJobService") -@CacheConfig(cacheNames = "quartzJob") +* @author hupeng +* @date 2020-05-13 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "quartzJob") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class QuartzJobServiceImpl implements QuartzJobService { - - private final QuartzJobRepository quartzJobRepository; - - private final QuartzLogRepository quartzLogRepository; +public class QuartzJobServiceImpl extends BaseServiceImpl implements QuartzJobService { + private final IGenerator generator; private final QuartzManage quartzManage; - public QuartzJobServiceImpl(QuartzJobRepository quartzJobRepository, QuartzLogRepository quartzLogRepository, QuartzManage quartzManage) { - this.quartzJobRepository = quartzJobRepository; - this.quartzLogRepository = quartzLogRepository; - this.quartzManage = quartzManage; + @Override + //@Cacheable + public Map queryAll(QuartzJobQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), QuartzJobDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - @Cacheable - public Object queryAll(JobQueryCriteria criteria, Pageable pageable){ - return PageUtil.toPage(quartzJobRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable)); - } @Override - public Object queryAllLog(JobQueryCriteria criteria, Pageable pageable){ - return PageUtil.toPage(quartzLogRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable)); + //@Cacheable + public List queryAll(QuartzJobQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(QuartzJob.class, criteria)); } - @Override - public List queryAll(JobQueryCriteria criteria) { - return quartzJobRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); - } @Override - public List queryAllLog(JobQueryCriteria criteria) { - return quartzLogRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); - } - - @Override - @Cacheable(key = "#p0") - public QuartzJob findById(Long id) { - QuartzJob quartzJob = quartzJobRepository.findById(id).orElseGet(QuartzJob::new); - ValidationUtil.isNull(quartzJob.getId(),"QuartzJob","id",id); - return quartzJob; - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public QuartzJob create(QuartzJob resources) { - if (!CronExpression.isValidExpression(resources.getCronExpression())){ - throw new BadRequestException("cron表达式格式错误"); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (QuartzJobDto quartzJob : all) { + Map map = new LinkedHashMap<>(); + map.put("Spring Bean名称", quartzJob.getBeanName()); + map.put("cron 表达式", quartzJob.getCronExpression()); + map.put("状态:1暂停、0启用", quartzJob.getIsPause()); + map.put("任务名称", quartzJob.getJobName()); + map.put("方法名称", quartzJob.getMethodName()); + map.put("参数", quartzJob.getParams()); + map.put("备注", quartzJob.getRemark()); + map.put("创建日期", quartzJob.getCreateTime()); + map.put("Spring Bean名称", quartzJob.getBeanName()); + map.put("cron 表达式", quartzJob.getCronExpression()); + map.put("状态:1暂停、0启用", quartzJob.getIsPause()); + map.put("任务名称", quartzJob.getJobName()); + map.put("方法名称", quartzJob.getMethodName()); + map.put("参数", quartzJob.getParams()); + map.put("备注", quartzJob.getRemark()); + map.put("创建日期", quartzJob.getCreateTime()); + map.put("Spring Bean名称", quartzJob.getBeanName()); + map.put("cron 表达式", quartzJob.getCronExpression()); + map.put("状态:1暂停、0启用", quartzJob.getIsPause()); + map.put("任务名称", quartzJob.getJobName()); + map.put("方法名称", quartzJob.getMethodName()); + map.put("参数", quartzJob.getParams()); + map.put("备注", quartzJob.getRemark()); + map.put("创建日期", quartzJob.getCreateTime()); + list.add(map); } - resources = quartzJobRepository.save(resources); - quartzManage.addJob(resources); - return resources; + FileUtil.downloadExcel(list, response); } + /** + * 更改定时任务状态 + * + * @param quartzJob / + */ @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(QuartzJob resources) { - if(resources.getId().equals(1L)){ - throw new BadRequestException("该任务不可操作"); - } - if (!CronExpression.isValidExpression(resources.getCronExpression())){ - throw new BadRequestException("cron表达式格式错误"); - } - resources = quartzJobRepository.save(resources); - quartzManage.updateJobCron(resources); - } - - @Override - @CacheEvict(allEntries = true) public void updateIsPause(QuartzJob quartzJob) { if(quartzJob.getId().equals(1L)){ throw new BadRequestException("该任务不可操作"); @@ -114,9 +116,14 @@ public class QuartzJobServiceImpl implements QuartzJobService { quartzManage.pauseJob(quartzJob); quartzJob.setIsPause(true); } - quartzJobRepository.save(quartzJob); + this.save(quartzJob); } + /** + * 立即执行定时任务 + * + * @param quartzJob / + */ @Override public void execution(QuartzJob quartzJob) { if(quartzJob.getId().equals(1L)){ @@ -125,54 +132,15 @@ public class QuartzJobServiceImpl implements QuartzJobService { quartzManage.runJobNow(quartzJob); } + /** + * 查询启用的任务 + * + * @return List + */ @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - if(id.equals(1L)){ - throw new BadRequestException("更新访客记录不可删除,你可以在后台代码中取消该限制"); - } - QuartzJob quartzJob = findById(id); - quartzManage.deleteJob(quartzJob); - quartzJobRepository.delete(quartzJob); - } - } - - @Override - public void download(List quartzJobs, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (QuartzJob quartzJob : quartzJobs) { - Map map = new LinkedHashMap<>(); - map.put("任务名称", quartzJob.getJobName()); - map.put("Bean名称", quartzJob.getBeanName()); - map.put("执行方法", quartzJob.getMethodName()); - map.put("参数", quartzJob.getParams()); - map.put("表达式", quartzJob.getCronExpression()); - map.put("状态", quartzJob.getIsPause() ? "暂停中" : "运行中"); - map.put("描述", quartzJob.getRemark()); - map.put("创建日期", quartzJob.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - - @Override - public void downloadLog(List queryAllLog, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (QuartzLog quartzLog : queryAllLog) { - Map map = new LinkedHashMap<>(); - map.put("任务名称", quartzLog.getJobName()); - map.put("Bean名称", quartzLog.getBeanName()); - map.put("执行方法", quartzLog.getMethodName()); - map.put("参数", quartzLog.getParams()); - map.put("表达式", quartzLog.getCronExpression()); - map.put("异常详情", quartzLog.getExceptionDetail()); - map.put("耗时/毫秒", quartzLog.getTime()); - map.put("状态", quartzLog.getIsSuccess() ? "成功" : "失败"); - map.put("创建日期", quartzLog.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); + public List findByIsPauseIsFalse() { + QuartzJobQueryCriteria criteria = new QuartzJobQueryCriteria(); + criteria.setIsPause(false); + return baseMapper.selectList(QueryHelpPlus.getPredicate(QuartzJob.class, criteria)); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzLogServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzLogServiceImpl.java new file mode 100644 index 00000000..8e9090e3 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzLogServiceImpl.java @@ -0,0 +1,98 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.impl; + +import co.yixiang.modules.quartz.domain.QuartzLog; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.quartz.service.QuartzLogService; +import co.yixiang.modules.quartz.service.dto.QuartzLogDto; +import co.yixiang.modules.quartz.service.dto.QuartzLogQueryCriteria; +import co.yixiang.modules.quartz.service.mapper.QuartzLogMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; +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 hupeng +* @date 2020-05-13 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "quartzLog") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class QuartzLogServiceImpl extends BaseServiceImpl implements QuartzLogService { + + private final IGenerator generator; + + @Override + //@Cacheable + public Map queryAll(QuartzLogQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), QuartzLogDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(QuartzLogQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(QuartzLog.class, criteria)); + } + + /** + * 导出数据 + * + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (QuartzLogDto quartzLog : all) { + Map map = new LinkedHashMap<>(); + map.put(" baenName", quartzLog.getBaenName()); + map.put(" createTime", quartzLog.getCreateTime()); + map.put(" cronExpression", quartzLog.getCronExpression()); + map.put(" exceptionDetail", quartzLog.getExceptionDetail()); + map.put(" isSuccess", quartzLog.getIsSuccess()); + map.put(" jobName", quartzLog.getJobName()); + map.put(" methodName", quartzLog.getMethodName()); + map.put(" params", quartzLog.getParams()); + map.put(" time", quartzLog.getTime()); + map.put("任务名称", quartzLog.getBaenName()); + map.put("Bean名称 ", quartzLog.getCreateTime()); + map.put("cron表达式", quartzLog.getCronExpression()); + map.put("异常详细 ", quartzLog.getExceptionDetail()); + map.put("状态", quartzLog.getIsSuccess()); + map.put("任务名称", quartzLog.getJobName()); + map.put("方法名称", quartzLog.getMethodName()); + map.put("参数", quartzLog.getParams()); + map.put("耗时(毫秒)", quartzLog.getTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java new file mode 100644 index 00000000..c9fa09ef --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.quartz.domain.QuartzJob; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +@Mapper +public interface QuartzJobMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java new file mode 100644 index 00000000..85c2ee50 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.quartz.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.quartz.domain.QuartzLog; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +@Mapper +public interface QuartzLogMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/task/TestTask.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/task/TestTask.java index 3c485440..bde81cd1 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/task/TestTask.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/task/TestTask.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.task; import lombok.extern.slf4j.Slf4j; @@ -5,7 +10,7 @@ import org.springframework.stereotype.Component; /** * 测试用 - * @author Zheng Jie + * @author hupeng * @date 2019-01-08 */ @Slf4j diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java deleted file mode 100644 index 52a3a424..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java +++ /dev/null @@ -1,22 +0,0 @@ -package co.yixiang.modules.quartz.task; - -import co.yixiang.modules.monitor.service.VisitsService; -import org.springframework.stereotype.Component; - -/** - * @author Zheng Jie - * @date 2018-12-25 - */ -@Component -public class VisitsTask { - - private final VisitsService visitsService; - - public VisitsTask(VisitsService visitsService) { - this.visitsService = visitsService; - } - - public void run(){ - visitsService.save(); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java index 37949f35..b7ba4faf 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java @@ -1,11 +1,16 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.utils; import co.yixiang.config.thread.ThreadPoolExecutorUtil; +import co.yixiang.modules.quartz.domain.QuartzJob; +import co.yixiang.modules.quartz.service.QuartzLogService; import co.yixiang.utils.SpringContextHolder; import co.yixiang.utils.ThrowableUtil; -import co.yixiang.modules.quartz.domain.QuartzJob; import co.yixiang.modules.quartz.domain.QuartzLog; -import co.yixiang.modules.quartz.repository.QuartzLogRepository; import co.yixiang.modules.quartz.service.QuartzJobService; import org.quartz.JobExecutionContext; import org.slf4j.Logger; @@ -32,12 +37,12 @@ public class ExecutionJob extends QuartzJobBean { protected void executeInternal(JobExecutionContext context) { QuartzJob quartzJob = (QuartzJob) context.getMergedJobDataMap().get(QuartzJob.JOB_KEY); // 获取spring bean - QuartzLogRepository quartzLogRepository = SpringContextHolder.getBean(QuartzLogRepository.class); + QuartzLogService quartzLogService = SpringContextHolder.getBean(QuartzLogService.class); QuartzJobService quartzJobService = SpringContextHolder.getBean(QuartzJobService.class); QuartzLog log = new QuartzLog(); log.setJobName(quartzJob.getJobName()); - log.setBeanName(quartzJob.getBeanName()); + log.setBaenName(quartzJob.getBeanName()); log.setMethodName(quartzJob.getMethodName()); log.setParams(quartzJob.getParams()); long startTime = System.currentTimeMillis(); @@ -65,7 +70,7 @@ public class ExecutionJob extends QuartzJobBean { //更新状态 quartzJobService.updateIsPause(quartzJob); } finally { - quartzLogRepository.save(log); + quartzLogService.save(log); } } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java index 43b692b4..4d574de9 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java @@ -1,8 +1,13 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.utils; import co.yixiang.exception.BadRequestException; -import lombok.extern.slf4j.Slf4j; import co.yixiang.modules.quartz.domain.QuartzJob; +import lombok.extern.slf4j.Slf4j; import org.quartz.*; import org.quartz.impl.triggers.CronTriggerImpl; import org.springframework.stereotype.Component; @@ -11,7 +16,7 @@ import java.util.Date; import static org.quartz.TriggerBuilder.newTrigger; /** - * @author Zheng Jie + * @author hupeng * @date 2019-01-07 */ @Slf4j diff --git a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java index 5afd752c..b3723e76 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java +++ b/yshop-system/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.quartz.utils; import co.yixiang.utils.SpringContextHolder; 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..7ad64013 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 @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.config; import co.yixiang.annotation.AnonymousAccess; @@ -28,7 +33,7 @@ import java.util.Map; import java.util.Set; /** - * @author Zheng Jie + * @author hupeng */ @Configuration @EnableWebSecurity @@ -109,6 +114,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/config/SecurityProperties.java b/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java index 0b34cf8f..8616f2c1 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.config; import lombok.Data; @@ -7,7 +12,7 @@ import org.springframework.stereotype.Component; /** * Jwt参数配置 - * @author Zheng Jie + * @author hupeng * @date 2019年11月28日 */ @Data 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..1385dd2b 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 @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.rest; import cn.hutool.core.util.IdUtil; @@ -8,7 +13,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import co.yixiang.annotation.AnonymousAccess; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.security.config.SecurityProperties; import co.yixiang.modules.security.security.TokenProvider; @@ -34,7 +39,7 @@ import java.util.Map; import java.util.concurrent.TimeUnit; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-23 * 授权、根据token获取用户详细信息 */ @@ -122,7 +127,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/java/co/yixiang/modules/security/rest/OnlineController.java b/yshop-system/src/main/java/co/yixiang/modules/security/rest/OnlineController.java index 9a227c6c..8b1c2426 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/rest/OnlineController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/rest/OnlineController.java @@ -1,8 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; -import co.yixiang.exception.BadRequestException; +import co.yixiang.logging.aop.log.Log; import co.yixiang.modules.security.service.OnlineUserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -17,7 +20,7 @@ import java.io.IOException; import java.util.Set; /** - * @author Zheng Jie + * @author hupeng */ @RestController @RequestMapping("/auth/online") diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java index 619d93d4..8ee9a208 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security; import org.springframework.security.access.AccessDeniedException; @@ -9,7 +14,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** - * @author Zheng Jie + * @author hupeng */ @Component public class JwtAccessDeniedHandler implements AccessDeniedHandler { diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java index 3ec24972..007f1de0 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security; import org.springframework.security.core.AuthenticationException; @@ -9,7 +14,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** - * @author Zheng Jie + * @author hupeng */ @Component public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java index cb493db9..6faa24d1 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security; import org.springframework.security.config.annotation.SecurityConfigurerAdapter; diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenFilter.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenFilter.java index 2e5d3200..4b0d7bb5 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenFilter.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenFilter.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security; import co.yixiang.modules.security.config.SecurityProperties; diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenProvider.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenProvider.java index 9cfe3ab0..b8b3e995 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenProvider.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/TokenProvider.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security; import io.jsonwebtoken.*; diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java index 904c02fd..26c4412a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security.vo; import lombok.Getter; @@ -6,7 +11,7 @@ import lombok.Setter; import javax.validation.constraints.NotBlank; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-30 */ @Getter diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java index 5d0a2a2b..010b7646 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security.vo; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -11,7 +16,7 @@ import java.util.Date; import java.util.stream.Collectors; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-23 */ @Getter diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java index 977c4184..9c09702a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.security.vo; import lombok.AllArgsConstructor; @@ -7,7 +12,7 @@ import lombok.NoArgsConstructor; import java.util.Date; /** - * @author Zheng Jie + * @author hupeng */ @Data @AllArgsConstructor diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java b/yshop-system/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java index a2b40037..b36a2a30 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.service; import co.yixiang.modules.security.config.SecurityProperties; @@ -14,7 +19,7 @@ import java.io.IOException; import java.util.*; /** - * @author Zheng Jie + * @author hupeng * @Date 2019年10月26日21:56:27 */ @Service diff --git a/yshop-system/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java index 77c69762..062c2b78 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java @@ -1,12 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.security.service; import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.DeptSmallDTO; -import co.yixiang.modules.system.service.dto.JobSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.DeptSmallDto; +import co.yixiang.modules.system.service.dto.JobSmallDto; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.security.security.vo.JwtUser; import co.yixiang.modules.system.service.RoleService; +import co.yixiang.modules.system.service.dto.UserDto; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.stereotype.Service; @@ -15,7 +20,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Optional; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-22 */ @Service("userDetailsService") @@ -33,7 +38,7 @@ public class UserDetailsServiceImpl implements UserDetailsService { @Override public UserDetails loadUserByUsername(String username){ - UserDTO user = userService.findByName(username); + UserDto user = userService.findByName(username); if (user == null) { throw new BadRequestException("账号不存在"); } else { @@ -44,7 +49,7 @@ public class UserDetailsServiceImpl implements UserDetailsService { } } - private UserDetails createJwtUser(UserDTO user) { + private UserDetails createJwtUser(UserDto user) { return new JwtUser( user.getId(), user.getUsername(), @@ -54,8 +59,8 @@ public class UserDetailsServiceImpl implements UserDetailsService { user.getAvatar(), user.getEmail(), user.getPhone(), - Optional.ofNullable(user.getDept()).map(DeptSmallDTO::getName).orElse(null), - Optional.ofNullable(user.getJob()).map(JobSmallDTO::getName).orElse(null), + Optional.ofNullable(user.getDept()).map(DeptSmallDto::getName).orElse(null), + Optional.ofNullable(user.getJob()).map(JobSmallDto::getName).orElse(null), roleService.mapToGrantedAuthorities(user), user.getEnabled(), user.getCreateTime(), diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dept.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dept.java index 5563aece..b7a78367 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dept.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dept.java @@ -1,69 +1,55 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.sql.Timestamp; -import java.util.Objects; -import java.util.Set; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ -@Entity -@Getter -@Setter -@Table(name="dept") +@Data +@TableName("dept") public class Dept implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - @NotNull(groups = Update.class) + /** ID */ + @TableId(value = "id",type= IdType.AUTO) private Long id; - @Column(name = "name",nullable = false) - @NotBlank + + /** 名称 */ + @NotBlank(message = "部门名称不能为空") private String name; - @NotNull - private Boolean enabled; - @Column(name = "pid",nullable = false) - @NotNull + /** 上级部门 */ + @NotNull(message = "上级部门不能为空") private Long pid; - @JsonIgnore - @ManyToMany(mappedBy = "depts") - private Set roles; - @Column(name = "create_time") - @CreationTimestamp + /** 状态 */ + private Boolean enabled; + + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dept dept = (Dept) o; - return Objects.equals(id, dept.id) && - Objects.equals(name, dept.name); + public void copy(Dept source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } - - @Override - public int hashCode() { - return Objects.hash(id, name); - } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dict.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dict.java index 00484616..9c5a3c0f 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dict.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Dict.java @@ -1,44 +1,52 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.sql.Timestamp; -import java.util.List; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Entity -@Getter -@Setter -@Table(name="dict") +@Data +@TableName("dict") public class Dict implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - @NotNull(groups = Update.class) + /** 字典ID */ + @TableId private Long id; - @Column(name = "name",nullable = false,unique = true) - @NotBlank + + /** 字典名称 */ + @NotBlank(message = "字典名称不能为空") private String name; - @Column(name = "remark") + + /** 描述 */ private String remark; - @Column(name = "create_time") - @CreationTimestamp + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - @OneToMany(mappedBy = "dict",cascade={CascadeType.PERSIST,CascadeType.REMOVE}) - private List dictDetails; - public @interface Update {} -} \ No newline at end of file + public void copy(Dict source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/DictDetail.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/DictDetail.java index 6ad235a7..656b1ed1 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/DictDetail.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/DictDetail.java @@ -1,48 +1,60 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; - -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 java.sql.Timestamp; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Entity -@Getter -@Setter -@Table(name="dict_detail") +@Data +@TableName("dict_detail") public class DictDetail implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - @NotNull(groups = Update.class) + /** 字典详细 */ + @TableId private Long id; + /** 字典标签 */ - @Column(name = "label",nullable = false) private String label; + /** 字典值 */ - @Column(name = "value",nullable = false) private String value; - /** 排序 */ - @Column(name = "sort") - private String sort = "999"; - @ManyToOne(fetch=FetchType.LAZY) - @JoinColumn(name = "dict_id") + /** 排序 */ + private String sort; + + + /** 字典id */ + private Long dictId; + + @TableField(exist = false) private Dict dict; - @Column(name = "create_time") - @CreationTimestamp + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} -} \ No newline at end of file + + public void copy(DictDetail source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Job.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Job.java index ed854f03..db697416 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Job.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Job.java @@ -1,51 +1,61 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.persistence.Entity; -import javax.persistence.Table; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.sql.Timestamp; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-03-29 +* @author hupeng +* @date 2020-05-14 */ -@Entity -@Getter -@Setter -@Table(name="job") +@Data +@TableName("job") public class Job implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - @NotNull(groups = Update.class) + /** 岗位ID */ + @TableId private Long id; - @Column(name = "name",nullable = false) - @NotBlank + /** 岗位名称 */ + @NotBlank(message = "岗位名称不能为空") private String name; - @Column(unique = true) - @NotNull - private Long sort; - @Column(name = "enabled",nullable = false) - @NotNull + /** 岗位状态 */ private Boolean enabled; - @OneToOne - @JoinColumn(name = "dept_id") + @TableField(exist = false) private Dept dept; - @Column(name = "create_time") - @CreationTimestamp + /** 岗位排序 */ + private Long sort; + + + /** 部门ID */ + private Long deptId; + + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} -} \ No newline at end of file + + public void copy(Job source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Menu.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Menu.java index 2a9421e2..bbb3abd4 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Menu.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Menu.java @@ -1,94 +1,93 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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.validation.constraints.*; import java.sql.Timestamp; -import java.util.Objects; -import java.util.Set; +import java.io.Serializable; /** - * @author Zheng Jie - * @date 2018-12-17 - */ -@Entity -@Getter -@Setter -@Table(name = "menu") +* @author hupeng +* @date 2020-05-14 +*/ +@Data +@TableName("menu") public class Menu implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @NotNull(groups = {Update.class}) + /** ID */ + @TableId private Long id; - @NotBlank - private String name; - @Column(unique = true) - private Long sort = 999L; - - @Column(name = "path") - private String path; - - private String component; - - /** 类型,目录、菜单、按钮 */ - @Column(name = "type") - private Integer type; - - /** 权限 */ - @Column(name = "permission") - private String permission; - - @Column(unique = true,name = "component_name") - private String componentName; - - private String icon; - - @Column(columnDefinition = "bit(1) default 0") - private Boolean cache; - - @Column(columnDefinition = "bit(1) default 0") - private Boolean hidden; - - /** 上级菜单ID */ - @Column(name = "pid",nullable = false) - private Long pid; - - /** 是否为外链 true/false */ - @Column(name = "i_frame") + /** 是否外链 */ private Boolean iFrame; - @ManyToMany(mappedBy = "menus") - @JsonIgnore - private Set roles; - @Column(name = "create_time") - @CreationTimestamp + /** 菜单名称 */ + @NotBlank(message = "请填写菜单名称") + private String name; + + + /** 组件 */ + private String component; + + + /** 上级菜单ID */ + @NotNull(message = "上级菜单ID不能为空") + private Long pid; + + + /** 排序 */ + @NotNull(message = "排序不能为空") + private Long sort; + + + /** 图标 */ + private String icon; + + + /** 链接地址 */ + private String path; + + + /** 缓存 */ + private Boolean cache; + + + /** 是否隐藏 */ + private Boolean hidden; + + + /** 组件名称 */ + private String componentName; + + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Menu menu = (Menu) o; - return Objects.equals(id, menu.id); - } + /** 权限 */ + private String permission; - @Override - public int hashCode() { - return Objects.hash(id); + + /** 类型,目录、菜单、按钮 */ + private Integer type; + + + public void copy(Menu source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Role.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Role.java index 44cf4844..ad8dc30a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/Role.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/Role.java @@ -1,84 +1,69 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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.validation.constraints.*; import java.sql.Timestamp; -import java.util.Objects; +import java.io.Serializable; import java.util.Set; /** - * 角色 - * @author Zheng Jie - * @date 2018-11-22 - */ -@Entity -@Table(name = "role") -@Getter -@Setter +* @author hupeng +* @date 2020-05-14 +*/ +@Data +@TableName("role") public class Role implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @NotNull(groups = {Update.class}) + /** ID */ + @TableId private Long id; - @Column(nullable = false) - @NotBlank + + /** 名称 */ + @NotBlank(message = "请填写角色名称") private String name; - /** 数据权限类型 全部 、 本级 、 自定义 */ - @Column(name = "data_scope") - private String dataScope = "本级"; - /** 数值越小,级别越大 */ - @Column(name = "level") - private Integer level = 3; - - @Column + /** 备注 */ private String remark; - /** 权限 */ - @Column(name = "permission") - private String permission; - @JsonIgnore - @ManyToMany(mappedBy = "roles") - private Set users; + /** 数据权限 */ + private String dataScope; - @ManyToMany - @JoinTable(name = "roles_menus", joinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "menu_id",referencedColumnName = "id")}) + + /** 角色级别 */ + private Integer level; + + @TableField(exist = false) private Set menus; - @ManyToMany - @JoinTable(name = "roles_depts", joinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "dept_id",referencedColumnName = "id")}) + @TableField(exist = false) private Set depts; - @Column(name = "create_time") - @CreationTimestamp + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public @interface Update {} - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Role role = (Role) o; - return Objects.equals(id, role.id); - } + /** 功能权限 */ + private String permission; - @Override - public int hashCode() { - return Objects.hash(id); + + public void copy(Role source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java new file mode 100644 index 00000000..7b5ba95f --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java @@ -0,0 +1,34 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.domain; +import lombok.Data; +import com.baomidou.mybatisplus.annotation.TableName; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Data +@TableName("roles_depts") +public class RolesDepts implements Serializable { + + /** 角色ID */ + private Long roleId; + + /** 部门ID */ + private Long deptId; + + + public void copy(RolesDepts source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java new file mode 100644 index 00000000..2afce733 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java @@ -0,0 +1,34 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.domain; +import lombok.Data; +import com.baomidou.mybatisplus.annotation.TableName; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Data +@TableName("roles_menus") +public class RolesMenus implements Serializable { + + /** 菜单ID */ + private Long menuId; + + + /** 角色ID */ + private Long roleId; + + public void copy(RolesMenus source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/User.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/User.java index bb95c1df..46ff2278 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/User.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/User.java @@ -1,96 +1,105 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 lombok.Getter; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; -import javax.persistence.*; -import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.sql.Timestamp; -import java.util.Date; -import java.util.Objects; +import java.io.Serializable; import java.util.Set; /** - * @author Zheng Jie - * @date 2018-11-22 - */ -@Entity -@Getter -@Setter -@Table(name="user") +* @author hupeng +* @date 2020-05-14 +*/ +@Data +@TableName("user") public class User implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @NotNull(groups = Update.class) + /** 系统用户ID */ + @TableId private Long id; - @NotBlank - @Column(unique = true) + + /** 头像 */ + private Long avatarId; + + + /** 邮箱 */ + private String email; + + + /** 状态:1启用、0禁用 */ + private Boolean enabled; + + /** 用户头像 */ + @TableField(exist = false) + private UserAvatar userAvatar; + + /** 用户角色 */ + @TableField(exist = false) + private Set roles; + + /** 用户职位*/ + @TableField(exist = false) + private Job job; + + /** 用户部门*/ + @TableField(exist = false) + private Dept dept; + + /** 密码 */ + private String password; + + + /** 用户名 */ + @NotBlank(message = "请填写用户名称") private String username; - /** 用户昵称 */ - @NotBlank + + /** 部门名称 */ + private Long deptId; + + + /** 手机号码 */ + @NotBlank(message = "请输入手机号码") + private String phone; + + + /** 岗位名称 */ + private Long jobId; + + + /** 创建日期 */ + @TableField(fill= FieldFill.INSERT) + private Timestamp createTime; + + + /** 最后修改密码的日期 */ + private Timestamp lastPasswordResetTime; + + + /** 昵称 */ private String nickName; + /** 性别 */ private String sex; - @OneToOne - @JoinColumn(name = "avatar_id") - private UserAvatar userAvatar; - @NotBlank - @Email - private String email; - - @NotBlank - private String phone; - - @NotNull - private Boolean enabled; - - private String password; - - @Column(name = "create_time") - @CreationTimestamp - private Timestamp createTime; - - @Column(name = "last_password_reset_time") - private Date lastPasswordResetTime; - - @ManyToMany - @JoinTable(name = "users_roles", joinColumns = {@JoinColumn(name = "user_id",referencedColumnName = "id")}, inverseJoinColumns = {@JoinColumn(name = "role_id",referencedColumnName = "id")}) - private Set roles; - - @OneToOne - @JoinColumn(name = "job_id") - private Job job; - - @OneToOne - @JoinColumn(name = "dept_id") - private Dept dept; - - public @interface Update {} - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(id, user.id) && - Objects.equals(username, user.username); + public void copy(User source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } - - @Override - public int hashCode() { - return Objects.hash(id, username); - } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java index 114f57f7..7b249364 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java @@ -1,38 +1,49 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; - import cn.hutool.core.util.ObjectUtil; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import org.hibernate.annotations.CreationTimestamp; - -import javax.persistence.*; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +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 java.sql.Timestamp; +import java.io.Serializable; /** - * @author Zheng Jie - * @date 2019年9月7日 16:16:59 - */ -@Entity -@Getter -@Setter -@NoArgsConstructor -@Table(name = "user_avatar") +* @author hupeng +* @date 2020-05-14 +*/ +@Data +@TableName("user_avatar") public class UserAvatar implements Serializable { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) + @TableId private Long id; + + /** 真实文件名 */ private String realName; + + /** 路径 */ private String path; + + /** 大小 */ private String size; - @Column(name = "create_time") - @CreationTimestamp + + /** 创建时间 */ + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; public UserAvatar(UserAvatar userAvatar,String realName, String path, String size) { @@ -41,4 +52,9 @@ public class UserAvatar implements Serializable { this.path = path; this.size = size; } + + + public void copy(UserAvatar source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java new file mode 100644 index 00000000..1924cc95 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java @@ -0,0 +1,34 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.domain; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Data +@TableName("users_roles") +public class UsersRoles implements Serializable { + + /** 用户ID */ + private Long userId; + + + /** 角色ID */ + private Long roleId; + + public void copy(UsersRoles source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java index 71027856..945ec222 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.domain.vo; import lombok.AllArgsConstructor; @@ -5,7 +10,7 @@ import lombok.Data; import java.io.Serializable; /** - * @author Zheng Jie + * @author hupeng * @date 2018-12-20 */ @Data diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java index 95031514..6cdbb72d 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.domain.vo; import com.fasterxml.jackson.annotation.JsonInclude; @@ -8,7 +13,7 @@ import java.util.List; /** * 构建前端路由时用到 - * @author Zheng Jie + * @author hupeng * @date 2018-12-20 */ @Data diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java index 035caac4..3376229a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java @@ -1,10 +1,15 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.domain.vo; import lombok.Data; /** * 修改密码的 Vo 类 - * @author Zheng Jie + * @author hupeng * @date 2019年7月11日13:59:49 */ @Data diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DeptRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/DeptRepository.java deleted file mode 100644 index c6c07c0b..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DeptRepository.java +++ /dev/null @@ -1,38 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.Dept; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Query; -import java.util.List; -import java.util.Set; - -/** -* @author Zheng Jie -* @date 2019-03-25 -*/ -@SuppressWarnings("all") -public interface DeptRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 根据 PID 查询 - * @param id pid - * @return / - */ - List findByPid(Long id); - - /** - * 根据ID查询名称 - * @param id ID - * @return / - */ - @Query(value = "select name from dept where id = ?1",nativeQuery = true) - String findNameById(Long id); - - /** - * 根据角色ID 查询 - * @param id 角色ID - * @return / - */ - Set findByRoles_Id(Long id); -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictDetailRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictDetailRepository.java deleted file mode 100644 index 299ad6bf..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictDetailRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.DictDetail; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -public interface DictDetailRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictRepository.java deleted file mode 100644 index c9e9eae6..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/DictRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.Dict; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -public interface DictRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/JobRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/JobRepository.java deleted file mode 100644 index 976a1c7c..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/JobRepository.java +++ /dev/null @@ -1,12 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.Job; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** -* @author Zheng Jie -* @date 2019-03-29 -*/ -public interface JobRepository extends JpaRepository, JpaSpecificationExecutor { -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/MenuRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/MenuRepository.java deleted file mode 100644 index 25b394d5..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/MenuRepository.java +++ /dev/null @@ -1,45 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.Menu; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -/** - * @author Zheng Jie - * @date 2018-12-17 - */ -@SuppressWarnings("all") -public interface MenuRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 根据菜单名称查询 - * @param name 菜单名称 - * @return / - */ - Menu findByName(String name); - - /** - * 根据组件名称查询 - * @param name 组件名称 - * @return / - */ - Menu findByComponentName(String name); - - /** - * 根据菜单的 PID 查询 - * @param pid / - * @return / - */ - List findByPid(long pid); - - /** - * 根据角色ID与菜单类型查询菜单 - * @param roleIds roleIDs - * @param type 类型 - * @return / - */ - LinkedHashSet findByRoles_IdInAndTypeNotOrderBySortAsc(Set roleIds, int type); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/RoleRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/RoleRepository.java deleted file mode 100644 index a108c735..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/RoleRepository.java +++ /dev/null @@ -1,45 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.Role; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; -import java.util.Set; - -/** - * @author Zheng Jie - * @date 2018-12-03 - */ -@SuppressWarnings("all") -public interface RoleRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 根据名称查询 - * @param name / - * @return / - */ - Role findByName(String name); - - /** - * 根据用户ID查询 - * @param id 用户ID - * @return - */ - Set findByUsers_Id(Long id); - - /** - * 解绑角色菜单 - * @param id 菜单ID - */ - @Modifying - @Query(value = "delete from roles_menus where menu_id = ?1",nativeQuery = true) - void untiedMenu(Long id); - - /** - * 根据角色权限查询 - * @param permission / - * @return / - */ - Role findByPermission(String permission); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserAvatarRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserAvatarRepository.java deleted file mode 100644 index bf3e177e..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserAvatarRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.UserAvatar; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; - -/** - * @author Zheng Jie - * @date 2018-11-22 - */ -public interface UserAvatarRepository extends JpaRepository, JpaSpecificationExecutor { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserRepository.java b/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserRepository.java deleted file mode 100644 index 060f738a..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/repository/UserRepository.java +++ /dev/null @@ -1,48 +0,0 @@ -package co.yixiang.modules.system.repository; - -import co.yixiang.modules.system.domain.User; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; -import org.springframework.data.jpa.repository.Query; -import java.util.Date; - -/** - * @author Zheng Jie - * @date 2018-11-22 - */ -public interface UserRepository extends JpaRepository, JpaSpecificationExecutor { - - /** - * 根据用户名查询 - * @param username 用户名 - * @return / - */ - User findByUsername(String username); - - /** - * 根据邮箱查询 - * @param email 邮箱 - * @return / - */ - User findByEmail(String email); - - /** - * 修改密码 - * @param username 用户名 - * @param pass 密码 - * @param lastPasswordResetTime / - */ - @Modifying - @Query(value = "update user set password = ?2 , last_password_reset_time = ?3 where username = ?1",nativeQuery = true) - void updatePass(String username, String pass, Date lastPasswordResetTime); - - /** - * 修改邮箱 - * @param username 用户名 - * @param email 邮箱 - */ - @Modifying - @Query(value = "update user set email = ?2 where username = ?1",nativeQuery = true) - void updateEmail(String username, String email); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DeptController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DeptController.java index 5cf55187..7a5856f8 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DeptController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DeptController.java @@ -1,15 +1,22 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.config.DataScope; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.Dept; import co.yixiang.modules.system.service.DeptService; -import co.yixiang.modules.system.service.dto.DeptDTO; +import co.yixiang.modules.system.service.dto.DeptDto; import co.yixiang.modules.system.service.dto.DeptQueryCriteria; import co.yixiang.utils.ThrowableUtil; +import co.yixiang.utils.ValidationUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; @@ -20,12 +27,13 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; /** -* @author Zheng Jie +* @author hupeng * @date 2019-03-25 */ @RestController @@ -37,11 +45,14 @@ public class DeptController { private final DataScope dataScope; + private final IGenerator generator; + private static final String ENTITY_NAME = "dept"; - public DeptController(DeptService deptService, DataScope dataScope) { + public DeptController(DeptService deptService, DataScope dataScope, IGenerator generator) { this.deptService = deptService; this.dataScope = dataScope; + this.generator = generator; } @Log("导出部门数据") @@ -49,7 +60,7 @@ public class DeptController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','dept:list')") public void download(HttpServletResponse response, DeptQueryCriteria criteria) throws IOException { - deptService.download(deptService.queryAll(criteria), response); + deptService.download(generator.convert(deptService.queryAll(criteria), DeptDto.class), response); } @Log("查询部门") @@ -59,7 +70,7 @@ public class DeptController { public ResponseEntity getDepts(DeptQueryCriteria criteria){ // 数据权限 criteria.setIds(dataScope.getDeptIds()); - List deptDtos = deptService.queryAll(criteria); + List deptDtos = generator.convert(deptService.queryAll(criteria),DeptDto.class); return new ResponseEntity<>(deptService.buildTree(deptDtos),HttpStatus.OK); } @@ -71,15 +82,22 @@ public class DeptController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(deptService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(deptService.save(resources),HttpStatus.CREATED); } @Log("修改部门") @ApiOperation("修改部门") @PutMapping @PreAuthorize("@el.check('admin','dept:edit')") - public ResponseEntity update(@Validated(Dept.Update.class) @RequestBody Dept resources){ - deptService.update(resources); + public ResponseEntity update(@Validated @RequestBody Dept resources){ + if(resources.getId().equals(resources.getPid())) { + throw new BadRequestException("上级不能为自己"); + } + Dept dept = deptService.getOne(new QueryWrapper().lambda() + .eq(Dept::getId,resources.getId())); + ValidationUtil.isNull( dept.getId(),"Dept","id",resources.getId()); + resources.setId(dept.getId()); + deptService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -89,19 +107,24 @@ public class DeptController { @PreAuthorize("@el.check('admin','dept:del')") public ResponseEntity delete(@RequestBody Set ids){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - Set deptDtos = new HashSet<>(); + List deptIds = new ArrayList<>(); for (Long id : ids) { List deptList = deptService.findByPid(id); - deptDtos.add(deptService.findById(id)); + Dept dept = deptService.getOne(new QueryWrapper().eq("id",id)); + if(null!=dept){ + deptIds.add(dept.getId()); + } if(CollectionUtil.isNotEmpty(deptList)){ - deptDtos = deptService.getDeleteDepts(deptList, deptDtos); + for(Dept d:deptList){ + deptIds.add(d.getId()); + } } } try { - deptService.delete(deptDtos); + deptService.removeByIds(deptIds); }catch (Throwable e){ ThrowableUtil.throwForeignKeyException(e, "所选部门中存在岗位或者角色关联,请取消关联后再试"); } return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictController.java index b5d8a5ed..e04cdd98 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictController.java @@ -1,10 +1,15 @@ -package co.yixiang.modules.system.rest; +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; + */ +package co.yixiang.modules.system.rest; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.Dict; import co.yixiang.modules.system.service.DictService; +import co.yixiang.modules.system.service.dto.DictDto; import co.yixiang.modules.system.service.dto.DictQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -19,7 +24,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** -* @author Zheng Jie +* @author hupeng * @date 2019-04-10 */ @Api(tags = "系统:字典管理") @@ -28,11 +33,13 @@ import java.io.IOException; public class DictController { private final DictService dictService; + private final IGenerator generator; private static final String ENTITY_NAME = "dict"; - public DictController(DictService dictService) { + public DictController(DictService dictService, IGenerator generator) { this.dictService = dictService; + this.generator = generator; } @Log("导出字典数据") @@ -40,7 +47,7 @@ public class DictController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','dict:list')") public void download(HttpServletResponse response, DictQueryCriteria criteria) throws IOException { - dictService.download(dictService.queryAll(criteria), response); + dictService.download(generator.convert(dictService.queryAll(criteria), DictDto.class), response); } @Log("查询字典") @@ -67,16 +74,16 @@ public class DictController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(dictService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(dictService.save(resources),HttpStatus.CREATED); } @Log("修改字典") @ApiOperation("修改字典") @PutMapping @PreAuthorize("@el.check('admin','dict:edit')") - public ResponseEntity update(@Validated(Dict.Update.class) @RequestBody Dict resources){ + public ResponseEntity update(@Validated @RequestBody Dict resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - dictService.update(resources); + dictService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -86,7 +93,7 @@ public class DictController { @PreAuthorize("@el.check('admin','dict:del')") public ResponseEntity delete(@PathVariable Long id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - dictService.delete(id); + dictService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java index 60b82bb7..f94fc6da 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java @@ -1,7 +1,11 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.DictDetail; import co.yixiang.modules.system.service.DictDetailService; @@ -21,7 +25,7 @@ import java.util.HashMap; import java.util.Map; /** -* @author Zheng Jie +* @author hupeng * @date 2019-04-10 */ @RestController @@ -30,7 +34,6 @@ import java.util.Map; public class DictDetailController { private final DictDetailService dictDetailService; - private static final String ENTITY_NAME = "dictDetail"; public DictDetailController(DictDetailService dictDetailService) { @@ -67,16 +70,17 @@ public class DictDetailController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(dictDetailService.create(resources),HttpStatus.CREATED); + resources.setDictId(resources.getDict().getId()); + return new ResponseEntity<>(dictDetailService.save(resources),HttpStatus.CREATED); } @Log("修改字典详情") @ApiOperation("修改字典详情") @PutMapping @PreAuthorize("@el.check('admin','dict:edit')") - public ResponseEntity update(@Validated(DictDetail.Update.class) @RequestBody DictDetail resources){ + public ResponseEntity update(@Validated @RequestBody DictDetail resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - dictDetailService.update(resources); + dictDetailService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -86,7 +90,7 @@ public class DictDetailController { @PreAuthorize("@el.check('admin','dict:del')") public ResponseEntity delete(@PathVariable Long id){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - dictDetailService.delete(id); + dictDetailService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/JobController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/JobController.java index a13a4a17..0cdada8c 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/JobController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/JobController.java @@ -1,11 +1,17 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.config.DataScope; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.Job; import co.yixiang.modules.system.service.JobService; +import co.yixiang.modules.system.service.dto.JobDto; import co.yixiang.modules.system.service.dto.JobQueryCriteria; import co.yixiang.utils.ThrowableUtil; import io.swagger.annotations.Api; @@ -22,7 +28,7 @@ import java.io.IOException; import java.util.Set; /** -* @author Zheng Jie +* @author hupeng * @date 2019-03-29 */ @Api(tags = "系统:岗位管理") @@ -34,11 +40,14 @@ public class JobController { private final DataScope dataScope; + private final IGenerator generator; + private static final String ENTITY_NAME = "job"; - public JobController(JobService jobService, DataScope dataScope) { + public JobController(JobService jobService, DataScope dataScope, IGenerator generator) { this.jobService = jobService; this.dataScope = dataScope; + this.generator = generator; } @Log("导出岗位数据") @@ -46,7 +55,7 @@ public class JobController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','job:list')") public void download(HttpServletResponse response, JobQueryCriteria criteria) throws IOException { - jobService.download(jobService.queryAll(criteria), response); + jobService.download(generator.convert(jobService.queryAll(criteria), JobDto.class), response); } @Log("查询岗位") @@ -67,16 +76,16 @@ public class JobController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(jobService.create(resources),HttpStatus.CREATED); + return new ResponseEntity<>(jobService.save(resources),HttpStatus.CREATED); } @Log("修改岗位") @ApiOperation("修改岗位") @PutMapping @PreAuthorize("@el.check('admin','job:edit')") - public ResponseEntity update(@Validated(Job.Update.class) @RequestBody Job resources){ + public ResponseEntity update(@Validated @RequestBody Job resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - jobService.update(resources); + jobService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -87,10 +96,10 @@ public class JobController { public ResponseEntity delete(@RequestBody Set ids){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); try { - jobService.delete(ids); + jobService.removeByIds(ids); }catch (Throwable e){ ThrowableUtil.throwForeignKeyException(e, "所选岗位存在用户关联,请取消关联后再试"); } return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/MenuController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/MenuController.java index df3d6809..76eb8b6e 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/MenuController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/MenuController.java @@ -1,16 +1,25 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.exception.EntityExistException; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.shop.domain.YxSystemConfig; import co.yixiang.modules.system.domain.Menu; import co.yixiang.modules.system.service.MenuService; import co.yixiang.modules.system.service.RoleService; import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.MenuDTO; +import co.yixiang.modules.system.service.dto.MenuDto; import co.yixiang.modules.system.service.dto.MenuQueryCriteria; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.UserDto; import co.yixiang.utils.SecurityUtils; +import co.yixiang.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; @@ -26,7 +35,7 @@ import java.util.List; import java.util.Set; /** - * @author Zheng Jie + * @author hupeng * @date 2018-12-03 */ @Api(tags = "系统:菜单管理") @@ -41,12 +50,15 @@ public class MenuController { private final RoleService roleService; + private final IGenerator generator; + private static final String ENTITY_NAME = "menu"; - public MenuController(MenuService menuService, UserService userService, RoleService roleService) { + public MenuController(MenuService menuService, UserService userService, RoleService roleService, IGenerator generator) { this.menuService = menuService; this.userService = userService; this.roleService = roleService; + this.generator = generator; } @Log("导出菜单数据") @@ -55,15 +67,15 @@ public class MenuController { @PreAuthorize("@el.check('menu:list')") public void download(HttpServletResponse response, MenuQueryCriteria criteria) throws IOException { //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - menuService.download(menuService.queryAll(criteria), response); + menuService.download(generator.convert(menuService.queryAll(criteria),MenuDto.class), response); } @ApiOperation("获取前端所需菜单") @GetMapping(value = "/build") public ResponseEntity buildMenus(){ - UserDTO user = userService.findByName(SecurityUtils.getUsername()); - List menuDtoList = menuService.findByRoles(roleService.findByUsersId(user.getId())); - List menuDtos = (List) menuService.buildTree(menuDtoList).get("content"); + UserDto user = userService.findByName(SecurityUtils.getUsername()); + List menuDtoList = menuService.findByRoles(roleService.findByUsersId(user.getId())); + List menuDtos = (List) menuService.buildTree(menuDtoList).get("content"); return new ResponseEntity<>(menuService.buildMenus(menuDtos),HttpStatus.OK); } @@ -79,7 +91,7 @@ public class MenuController { @GetMapping @PreAuthorize("@el.check('menu:list')") public ResponseEntity getMenus(MenuQueryCriteria criteria){ - List menuDtoList = menuService.queryAll(criteria); + List menuDtoList = generator.convert(menuService.queryAll(criteria),MenuDto.class); return new ResponseEntity<>(menuService.buildTree(menuDtoList),HttpStatus.OK); } @@ -92,14 +104,30 @@ public class MenuController { if (resources.getId() != null) { throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(menuService.create(resources),HttpStatus.CREATED); + Menu menu = menuService.getOne(new QueryWrapper().eq("name",resources.getName())); + if(menu != null){ + throw new EntityExistException(Menu.class,"name",resources.getName()); + } + if(StringUtils.isNotBlank(resources.getComponentName())){ + menu = menuService.getOne(new QueryWrapper().eq("component_name",resources.getComponentName())); + if(menu != null){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); + } + } + if(resources.getIFrame()){ + String http = "http://", https = "https://"; + if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { + throw new BadRequestException("外链必须以http://或者https://开头"); + } + } + return new ResponseEntity<>(menuService.save(resources),HttpStatus.CREATED); } @Log("修改菜单") @ApiOperation("修改菜单") @PutMapping @PreAuthorize("@el.check('menu:edit')") - public ResponseEntity update(@Validated(Menu.Update.class) @RequestBody Menu resources){ + public ResponseEntity update(@Validated @RequestBody Menu resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); menuService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -114,7 +142,7 @@ public class MenuController { Set menuSet = new HashSet<>(); for (Long id : ids) { List menuList = menuService.findByPid(id); - menuSet.add(menuService.findOne(id)); + menuSet.add(menuService.getOne(new QueryWrapper().eq("id",id))); menuSet = menuService.getDeleteMenus(menuList, menuSet); } menuService.delete(menuSet); diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/RoleController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/RoleController.java index d2e70082..ff322ea9 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/RoleController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/RoleController.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; import cn.hutool.core.lang.Dict; -import cn.hutool.core.util.StrUtil; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; +import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.Role; import co.yixiang.modules.system.service.RoleService; import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.RoleDTO; +import co.yixiang.modules.system.service.dto.RoleDto; import co.yixiang.modules.system.service.dto.RoleQueryCriteria; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import co.yixiang.modules.system.service.dto.UserDto; import co.yixiang.utils.SecurityUtils; import co.yixiang.utils.ThrowableUtil; import io.swagger.annotations.Api; @@ -32,7 +37,7 @@ import java.util.Set; import java.util.stream.Collectors; /** - * @author Zheng Jie + * @author hupeng * @date 2018-12-03 */ @Api(tags = "系统:角色管理") @@ -42,12 +47,14 @@ public class RoleController { private final RoleService roleService; private final UserService userService; + private final IGenerator generator; private static final String ENTITY_NAME = "role"; - public RoleController(RoleService roleService, UserService userService) { + public RoleController(RoleService roleService, UserService userService, IGenerator generator) { this.roleService = roleService; this.userService = userService; + this.generator = generator; } @ApiOperation("获取单个role") @@ -62,14 +69,14 @@ public class RoleController { @GetMapping(value = "/download") @PreAuthorize("@el.check('role:list')") public void download(HttpServletResponse response, RoleQueryCriteria criteria) throws IOException { - roleService.download(roleService.queryAll(criteria), response); + roleService.download(generator.convert(roleService.queryAll(criteria),RoleDto.class), response); } @ApiOperation("返回全部的角色") @GetMapping(value = "/all") @PreAuthorize("@el.check('roles:list','user:add','user:edit')") - public ResponseEntity getAll(@PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable){ - return new ResponseEntity<>(roleService.queryAll(pageable),HttpStatus.OK); + public ResponseEntity getAll(RoleQueryCriteria criteria ,@PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable){ + return new ResponseEntity<>(roleService.queryAlls(criteria,pageable),HttpStatus.OK); } @Log("查询角色") @@ -103,7 +110,7 @@ public class RoleController { @ApiOperation("修改角色") @PutMapping @PreAuthorize("@el.check('roles:edit')") - public ResponseEntity update(@Validated(Role.Update.class) @RequestBody Role resources){ + public ResponseEntity update(@Validated @RequestBody Role resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); getLevels(resources.getLevel()); roleService.update(resources); @@ -116,7 +123,7 @@ public class RoleController { @PreAuthorize("@el.check('roles:edit')") public ResponseEntity updateMenu(@RequestBody Role resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - RoleDTO role = roleService.findById(resources.getId()); + RoleDto role = roleService.findById(resources.getId()); getLevels(role.getLevel()); roleService.updateMenu(resources,role); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -129,11 +136,11 @@ public class RoleController { public ResponseEntity delete(@RequestBody Set ids){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); for (Long id : ids) { - RoleDTO role = roleService.findById(id); + RoleDto role = roleService.findById(id); getLevels(role.getLevel()); } try { - roleService.delete(ids); + roleService.removeByIds(ids); } catch (Throwable e){ ThrowableUtil.throwForeignKeyException(e, "所选角色存在用户关联,请取消关联后再试"); } @@ -145,8 +152,8 @@ public class RoleController { * @return / */ private int getLevels(Integer level){ - UserDTO user = userService.findByName(SecurityUtils.getUsername()); - List levels = roleService.findByUsersId(user.getId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList()); + UserDto user = userService.findByName(SecurityUtils.getUsername()); + List levels = roleService.findByUsersId(user.getId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()); int min = Collections.min(levels); if(level != null){ if(level < min){ diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/rest/UserController.java b/yshop-system/src/main/java/co/yixiang/modules/system/rest/SysUserController.java similarity index 84% rename from yshop-system/src/main/java/co/yixiang/modules/system/rest/UserController.java rename to yshop-system/src/main/java/co/yixiang/modules/system/rest/SysUserController.java index c24d1c5d..2d5a7456 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/rest/UserController.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/rest/SysUserController.java @@ -1,21 +1,26 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.rest; -import cn.hutool.core.util.StrUtil; import cn.hutool.crypto.asymmetric.KeyType; import cn.hutool.crypto.asymmetric.RSA; -import co.yixiang.aop.log.Log; +import co.yixiang.logging.aop.log.Log; import co.yixiang.config.DataScope; -import co.yixiang.domain.VerificationCode; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.system.service.dto.UserDto; +import co.yixiang.tools.domain.VerificationCode; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.system.domain.User; import co.yixiang.modules.system.domain.vo.UserPassVo; import co.yixiang.modules.system.service.DeptService; import co.yixiang.modules.system.service.RoleService; import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.RoleSmallDto; import co.yixiang.modules.system.service.dto.UserQueryCriteria; -import co.yixiang.service.VerificationCodeService; +import co.yixiang.tools.service.VerificationCodeService; import co.yixiang.utils.PageUtil; import co.yixiang.utils.SecurityUtils; import co.yixiang.utils.YshopConstant; @@ -41,13 +46,13 @@ import java.util.Set; import java.util.stream.Collectors; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-23 */ @Api(tags = "系统:用户管理") @RestController @RequestMapping("/api/users") -public class UserController { +public class SysUserController { @Value("${rsa.private_key}") private String privateKey; @@ -57,14 +62,16 @@ public class UserController { private final DeptService deptService; private final RoleService roleService; private final VerificationCodeService verificationCodeService; + private final IGenerator generator; - public UserController(PasswordEncoder passwordEncoder, UserService userService, DataScope dataScope, DeptService deptService, RoleService roleService, VerificationCodeService verificationCodeService) { + public SysUserController(PasswordEncoder passwordEncoder, UserService userService, DataScope dataScope, DeptService deptService, RoleService roleService, VerificationCodeService verificationCodeService, IGenerator generator) { this.passwordEncoder = passwordEncoder; this.userService = userService; this.dataScope = dataScope; this.deptService = deptService; this.roleService = roleService; this.verificationCodeService = verificationCodeService; + this.generator = generator; } @Log("导出用户数据") @@ -72,7 +79,7 @@ public class UserController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','user:list')") public void download(HttpServletResponse response, UserQueryCriteria criteria) throws IOException { - userService.download(userService.queryAll(criteria), response); + userService.download(generator.convert(userService.queryAll(criteria), UserDto.class), response); } @Log("查询用户") @@ -125,7 +132,7 @@ public class UserController { @ApiOperation("修改用户") @PutMapping @PreAuthorize("@el.check('admin','user:edit')") - public ResponseEntity update(@Validated(User.Update.class) @RequestBody User resources){ + public ResponseEntity update(@Validated @RequestBody User resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); checkLevel(resources); userService.update(resources); @@ -135,13 +142,13 @@ public class UserController { @Log("修改用户:个人中心") @ApiOperation("修改用户:个人中心") @PutMapping(value = "center") - public ResponseEntity center(@Validated(User.Update.class) @RequestBody User resources){ + public ResponseEntity center(@Validated @RequestBody User resources){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - UserDTO userDto = userService.findByName(SecurityUtils.getUsername()); + UserDto userDto = userService.findByName(SecurityUtils.getUsername()); if(!resources.getId().equals(userDto.getId())){ throw new BadRequestException("不能修改他人资料"); } - userService.updateCenter(resources); + userService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -151,15 +158,15 @@ public class UserController { @PreAuthorize("@el.check('admin','user:del')") public ResponseEntity delete(@RequestBody Set ids){ //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); - UserDTO user = userService.findByName(SecurityUtils.getUsername()); + UserDto user = userService.findByName(SecurityUtils.getUsername()); for (Long id : ids) { - Integer currentLevel = Collections.min(roleService.findByUsersId(user.getId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList())); - Integer optLevel = Collections.min(roleService.findByUsersId(id).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList())); + Integer currentLevel = Collections.min(roleService.findByUsersId(user.getId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList())); + Integer optLevel = Collections.min(roleService.findByUsersId(id).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList())); if (currentLevel > optLevel) { throw new BadRequestException("角色权限不足,不能删除:" + userService.findByName(SecurityUtils.getUsername()).getUsername()); } } - userService.delete(ids); + userService.removeByIds(ids); return new ResponseEntity<>(HttpStatus.OK); } @@ -171,7 +178,7 @@ public class UserController { RSA rsa = new RSA(privateKey, null); String oldPass = new String(rsa.decrypt(passVo.getOldPass(), KeyType.PrivateKey)); String newPass = new String(rsa.decrypt(passVo.getNewPass(), KeyType.PrivateKey)); - UserDTO user = userService.findByName(SecurityUtils.getUsername()); + UserDto user = userService.findByName(SecurityUtils.getUsername()); if(!passwordEncoder.matches(oldPass, user.getPassword())){ throw new BadRequestException("修改失败,旧密码错误"); } @@ -198,7 +205,7 @@ public class UserController { // 密码解密 RSA rsa = new RSA(privateKey, null); String password = new String(rsa.decrypt(user.getPassword(), KeyType.PrivateKey)); - UserDTO userDto = userService.findByName(SecurityUtils.getUsername()); + UserDto userDto = userService.findByName(SecurityUtils.getUsername()); if(!passwordEncoder.matches(password, userDto.getPassword())){ throw new BadRequestException("密码错误"); } @@ -213,8 +220,8 @@ public class UserController { * @param resources / */ private void checkLevel(User resources) { - UserDTO user = userService.findByName(SecurityUtils.getUsername()); - Integer currentLevel = Collections.min(roleService.findByUsersId(user.getId()).stream().map(RoleSmallDTO::getLevel).collect(Collectors.toList())); + UserDto user = userService.findByName(SecurityUtils.getUsername()); + Integer currentLevel = Collections.min(roleService.findByUsersId(user.getId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList())); Integer optLevel = roleService.findByRoles(resources.getRoles()); if (currentLevel > optLevel) { throw new BadRequestException("角色权限不足"); diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/DeptService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/DeptService.java index f255f82e..95af37b9 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/DeptService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/DeptService.java @@ -1,60 +1,51 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.Dept; -import co.yixiang.modules.system.service.dto.DeptDTO; +import co.yixiang.modules.system.service.dto.DeptDto; import co.yixiang.modules.system.service.dto.DeptQueryCriteria; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import org.springframework.data.domain.Pageable; +import java.util.Map; import java.util.List; +import java.io.IOException; import java.util.Set; +import javax.servlet.http.HttpServletResponse; /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ -public interface DeptService { +public interface DeptService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(DeptQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据 - * @param criteria 条件 - * @return / - */ - List queryAll(DeptQueryCriteria criteria); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(DeptQueryCriteria criteria); /** - * 根据ID查询 - * @param id / - * @return / - */ - DeptDTO findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - DeptDTO create(Dept resources); - - /** - * 编辑 - * @param resources / - */ - void update(Dept resources); - - /** - * 删除 - * @param deptDtos / - * - */ - void delete(Set deptDtos); - - /** - * 构建树形数据 - * @param deptDtos 原始数据 - * @return / - */ - Object buildTree(List deptDtos); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; /** * 根据PID查询 @@ -64,19 +55,11 @@ public interface DeptService { List findByPid(long pid); /** - * 根据角色ID查询 - * @param id / + * 构建树形数据 + * @param deptDtos 原始数据 * @return / */ - Set findByRoleIds(Long id); - - /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; + Object buildTree(List deptDtos); /** * 获取待删除的部门 @@ -84,5 +67,12 @@ public interface DeptService { * @param deptDtos / * @return / */ - Set getDeleteDepts(List deptList, Set deptDtos); -} \ No newline at end of file + /*Set getDeleteDepts(List deptList, Set deptDtos);*/ + + /** + * 根据角色ID查询 + * @param id / + * @return / + */ + Set findByRoleIds(Long id); +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/DictDetailService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/DictDetailService.java index 5c90b934..b321b947 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/DictDetailService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/DictDetailService.java @@ -1,48 +1,48 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.DictDetail; -import co.yixiang.modules.system.service.dto.DictDetailDTO; +import co.yixiang.modules.system.service.dto.DictDetailDto; import co.yixiang.modules.system.service.dto.DictDetailQueryCriteria; import org.springframework.data.domain.Pageable; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -public interface DictDetailService { +public interface DictDetailService extends BaseService{ - /** - * 根据ID查询 - * @param id / - * @return / - */ - DictDetailDTO findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - DictDetailDTO create(DictDetail resources); - - /** - * 编辑 - * @param resources / - */ - void update(DictDetail resources); - - /** - * 删除 - * @param id / - */ - void delete(Long id); - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable); -} \ No newline at end of file + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(DictDetailQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/DictService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/DictService.java index 2bdb6ae5..c8ea206a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/DictService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/DictService.java @@ -1,67 +1,48 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.Dict; -import co.yixiang.modules.system.service.dto.DictDTO; +import co.yixiang.modules.system.service.dto.DictDto; import co.yixiang.modules.system.service.dto.DictQueryCriteria; import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -public interface DictService { +public interface DictService extends BaseService{ - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ Map queryAll(DictQueryCriteria criteria, Pageable pageable); /** - * 查询全部数据 - * @param dict / - * @return / - */ - List queryAll(DictQueryCriteria dict); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(DictQueryCriteria criteria); /** - * 根据ID查询 - * @param id / - * @return / - */ - DictDTO findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - DictDTO create(Dict resources); - - /** - * 编辑 - * @param resources / - */ - void update(Dict resources); - - /** - * 删除 - * @param id / - */ - void delete(Long id); - - /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/JobService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/JobService.java index 81184008..5f3f351d 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/JobService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/JobService.java @@ -1,68 +1,48 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.Job; -import co.yixiang.modules.system.service.dto.JobDTO; +import co.yixiang.modules.system.service.dto.JobDto; import co.yixiang.modules.system.service.dto.JobQueryCriteria; import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; import java.util.Map; -import java.util.Set; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** -* @author Zheng Jie -* @date 2019-03-29 +* @author hupeng +* @date 2020-05-14 */ -public interface JobService { +public interface JobService extends BaseService{ - /** - * 根据ID查询 - * @param id / - * @return / - */ - JobDTO findById(Long id); - - /** - * 创建 - * @param resources / - * @return / - */ - JobDTO create(Job resources); - - /** - * 编辑 - * @param resources / - */ - void update(Job resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); - - /** - * 分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / - */ +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ Map queryAll(JobQueryCriteria criteria, Pageable pageable); /** - * 查询全部数据 - * @param criteria / - * @return / - */ - List queryAll(JobQueryCriteria criteria); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(JobQueryCriteria criteria); /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; -} \ No newline at end of file + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/MenuService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/MenuService.java index 0855fff2..e7ec977b 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/MenuService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/MenuService.java @@ -1,48 +1,75 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - -import co.yixiang.modules.system.service.dto.MenuDTO; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.Menu; +import co.yixiang.modules.system.domain.vo.MenuVo; +import co.yixiang.modules.system.service.dto.MenuDto; import co.yixiang.modules.system.service.dto.MenuQueryCriteria; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import org.springframework.data.domain.Pageable; import java.util.Map; +import java.util.List; +import java.io.IOException; import java.util.Set; +import javax.servlet.http.HttpServletResponse; /** - * @author Zheng Jie - * @date 2018-12-17 - */ -public interface MenuService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface MenuService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(MenuQueryCriteria criteria, Pageable pageable); /** - * 查询全部数据 - * @param criteria 条件 + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(MenuQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 构建菜单树 + * @param menuDtos 原始数据 * @return / */ - List queryAll(MenuQueryCriteria criteria); + Map buildTree(List menuDtos); /** - * 根据ID查询 - * @param id / + * 构建菜单树 + * @param menuDtos / * @return / */ - MenuDTO findById(long id); + List buildMenus(List menuDtos); /** - * 创建 - * @param resources / + * 获取菜单树 + * @param menus / * @return / */ - MenuDTO create(Menu resources); + Object getMenuTree(List menus); - /** - * 编辑 - * @param resources / - */ - void update(Menu resources); /** * 获取待删除的菜单 @@ -52,13 +79,6 @@ public interface MenuService { */ Set getDeleteMenus(List menuList, Set menuSet); - /** - * 获取菜单树 - * @param menus / - * @return / - */ - Object getMenuTree(List menus); - /** * 根据pid查询 * @param pid / @@ -66,33 +86,12 @@ public interface MenuService { */ List findByPid(long pid); - /** - * 构建菜单树 - * @param menuDtos 原始数据 - * @return / - */ - Map buildTree(List menuDtos); - /** * 根据角色查询 * @param roles / * @return / */ - List findByRoles(List roles); - - /** - * 构建菜单树 - * @param menuDtos / - * @return / - */ - Object buildMenus(List menuDtos); - - /** - * 根据ID查询 - * @param id / - * @return / - */ - Menu findOne(Long id); + List findByRoles(List roles); /** * 删除 @@ -101,10 +100,8 @@ public interface MenuService { void delete(Set menuSet); /** - * 导出 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / + * 编辑 + * @param resources / */ - void download(List queryAll, HttpServletResponse response) throws IOException; + void update(Menu resources); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/RoleService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/RoleService.java index 97ba6901..40d9e81a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/RoleService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/RoleService.java @@ -1,57 +1,71 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.Role; -import co.yixiang.modules.system.service.dto.RoleDTO; +import co.yixiang.modules.system.service.dto.RoleDto; import co.yixiang.modules.system.service.dto.RoleQueryCriteria; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import co.yixiang.modules.system.service.dto.UserDto; import org.springframework.data.domain.Pageable; import org.springframework.security.core.GrantedAuthority; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.Collection; +import java.util.Map; import java.util.List; +import java.io.IOException; import java.util.Set; +import javax.servlet.http.HttpServletResponse; /** - * @author Zheng Jie - * @date 2018-12-03 - */ -public interface RoleService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface RoleService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(RoleQueryCriteria criteria, Pageable pageable); + /** - * 根据ID查询 - * @param id / - * @return / + * 查询数据分页 + * @param pageable 分页参数 + * @return Map */ - RoleDTO findById(long id); + Object queryAlls(RoleQueryCriteria criteria, Pageable pageable); /** - * 创建 - * @param resources / - * @return / - */ - RoleDTO create(Role resources); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(RoleQueryCriteria criteria); /** - * 编辑 - * @param resources / - */ - void update(Role resources); - - /** - * 删除 - * @param ids / - */ - void delete(Set ids); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; /** * 根据用户ID查询 * @param id 用户ID * @return / */ - List findByUsersId(Long id); + List findByUsersId(Long id); /** * 根据角色查询角色级别 @@ -60,53 +74,37 @@ public interface RoleService { */ Integer findByRoles(Set roles); + /** + * 根据ID查询 + * @param id / + * @return / + */ + RoleDto findById(long id); + /** * 修改绑定的菜单 * @param resources / - * @param roleDTO / + * @param roleDto / */ - void updateMenu(Role resources, RoleDTO roleDTO); + void updateMenu(Role resources, RoleDto roleDto); /** - * 解绑菜单 - * @param id / - */ - void untiedMenu(Long id); - - /** - * 不带条件分页查询 - * @param pageable 分页参数 + * 创建 + * @param resources / * @return / */ - Object queryAll(Pageable pageable); + RoleDto create(Role resources); /** - * 待条件分页查询 - * @param criteria 条件 - * @param pageable 分页参数 - * @return / + * 编辑 + * @param resources / */ - Object queryAll(RoleQueryCriteria criteria, Pageable pageable); - - /** - * 查询全部 - * @param criteria 条件 - * @return / - */ - List queryAll(RoleQueryCriteria criteria); - - /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; + void update(Role resources); /** * 获取用户权限信息 * @param user 用户信息 * @return 权限信息 */ - Collection mapToGrantedAuthorities(UserDTO user); + Collection mapToGrantedAuthorities(UserDto user); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java new file mode 100644 index 00000000..870becb9 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.system.domain.RolesDepts; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +public interface RolesDeptsService extends BaseService{ + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java new file mode 100644 index 00000000..ae2255a8 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.system.domain.RolesMenus; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +public interface RolesMenusService extends BaseService{ + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java new file mode 100644 index 00000000..b8151886 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.system.domain.UserAvatar; +import co.yixiang.modules.system.service.dto.UserAvatarDto; +import co.yixiang.modules.system.service.dto.UserAvatarQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +public interface UserAvatarService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(UserAvatarQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(UserAvatarQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + UserAvatar saveFile(UserAvatar userAvatar); +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/UserService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/UserService.java index cb39a51e..eff85e40 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/UserService.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/UserService.java @@ -1,53 +1,59 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; - -import co.yixiang.modules.system.service.dto.UserDTO; +import co.yixiang.common.service.BaseService; import co.yixiang.modules.system.domain.User; +import co.yixiang.modules.system.service.dto.UserDto; import co.yixiang.modules.system.service.dto.UserQueryCriteria; import org.springframework.data.domain.Pageable; import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; + +import java.util.Map; import java.util.List; -import java.util.Set; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; /** - * @author Zheng Jie - * @date 2018-11-23 - */ -public interface UserService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface UserService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(UserQueryCriteria criteria, Pageable pageable); /** - * 根据ID查询 - * @param id ID - * @return / - */ - UserDTO findById(long id); + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(UserQueryCriteria criteria); /** - * 新增用户 - * @param resources / - * @return / - */ - UserDTO create(User resources); - - /** - * 编辑用户 - * @param resources / - */ - void update(User resources); - - /** - * 删除用户 - * @param ids / - */ - void delete(Set ids); + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; /** * 根据用户名查询 * @param userName / * @return / */ - UserDTO findByName(String userName); + UserDto findByName(String userName); /** * 修改密码 @@ -58,9 +64,9 @@ public interface UserService { /** * 修改头像 - * @param file 文件 + * @param multipartFile 文件 */ - void updateAvatar(MultipartFile file); + void updateAvatar(MultipartFile multipartFile); /** * 修改邮箱 @@ -70,31 +76,16 @@ public interface UserService { void updateEmail(String username, String email); /** - * 查询全部 - * @param criteria 条件 - * @param pageable 分页参数 + * 新增用户 + * @param resources / * @return / */ - Object queryAll(UserQueryCriteria criteria, Pageable pageable); + boolean create(User resources); /** - * 查询全部不分页 - * @param criteria 条件 - * @return / - */ - List queryAll(UserQueryCriteria criteria); - - /** - * 导出数据 - * @param queryAll 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List queryAll, HttpServletResponse response) throws IOException; - - /** - * 用户自助修改资料 + * 编辑用户 * @param resources / */ - void updateCenter(User resources); + void update(User resources); + } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java new file mode 100644 index 00000000..1cd4c938 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.system.domain.UsersRoles; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +public interface UsersRolesService extends BaseService{ + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptDTO.java index 9d14bbf0..a933b18a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptDTO.java @@ -1,35 +1,43 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; -import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; - -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.sql.Timestamp; +import java.io.Serializable; import java.util.List; /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ @Data -public class DeptDTO implements Serializable { +public class DeptDto implements Serializable { + /** ID */ private Long id; + /** 名称 */ private String name; - @NotNull - private Boolean enabled; - + /** 上级部门 */ private Long pid; - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; + /** 状态 */ + private Boolean enabled; + private List children; + + /** 创建日期 */ private Timestamp createTime; public String getLabel() { return name; } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java index cd86bf46..179848df 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java @@ -1,15 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; -import co.yixiang.annotation.Query; import java.sql.Timestamp; import java.util.List; import java.util.Set; +import co.yixiang.annotation.Query; + /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ @Data public class DeptQueryCriteria{ @@ -28,4 +37,4 @@ public class DeptQueryCriteria{ @Query(type = Query.Type.BETWEEN) private List createTime; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDTO.java index 0e85cedf..c3a10d3e 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDTO.java @@ -1,16 +1,21 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Data; import java.io.Serializable; /** -* @author Zheng Jie +* @author hupeng * @date 2019-6-10 16:32:18 */ @Data -public class DeptSmallDTO implements Serializable { +public class DeptSmallDto implements Serializable { private Long id; private String name; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDTO.java index 4eb90d24..2fd26ff9 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDTO.java @@ -1,27 +1,36 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; +import lombok.Data; import java.sql.Timestamp; +import java.io.Serializable; import java.util.List; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Getter -@Setter -public class DictDTO implements Serializable { +@Data +public class DictDto implements Serializable { + /** 字典ID */ private Long id; + /** 字典名称 */ private String name; + private List dictDetails; + + /** 描述 */ private String remark; - private List dictDetails; - + /** 创建日期 */ private Timestamp createTime; } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDTO.java index 8f045bac..ae886f44 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDTO.java @@ -1,28 +1,39 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; +import lombok.Data; import java.sql.Timestamp; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Getter -@Setter -public class DictDetailDTO implements Serializable { +@Data +public class DictDetailDto implements Serializable { + /** 字典详细 */ private Long id; + /** 字典标签 */ private String label; + /** 字典值 */ private String value; + /** 排序 */ private String sort; - private DictSmallDto dict; + /** 字典id */ + private Long dictId; + /** 创建日期 */ private Timestamp createTime; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java index 3e69d8c0..c0997da4 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java @@ -1,18 +1,25 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; import co.yixiang.annotation.Query; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ @Data -public class DictDetailQueryCriteria { +public class DictDetailQueryCriteria{ @Query(type = Query.Type.INNER_LIKE) private String label; - @Query(propName = "name",joinName = "dict") private String dictName; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java index 7ea9a09b..f63b1544 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java @@ -1,14 +1,23 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; +import java.util.List; import co.yixiang.annotation.Query; /** - * @author Zheng Jie - * 公共查询类 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class DictQueryCriteria { +public class DictQueryCriteria{ @Query(blurry = "name,remark") private String blurry; diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java index 8e1da98d..8d595fa4 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Getter; @@ -5,7 +10,7 @@ import lombok.Setter; import java.io.Serializable; /** -* @author Zheng Jie +* @author hupeng * @date 2019-04-10 */ @Getter diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobDTO.java index ea584a99..2529d1e6 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobDTO.java @@ -1,20 +1,23 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import java.io.Serializable; +import lombok.Data; import java.sql.Timestamp; +import java.io.Serializable; /** -* @author Zheng Jie -* @date 2019-03-29 +* @author hupeng +* @date 2020-05-14 */ -@Getter -@Setter -@NoArgsConstructor -public class JobDTO implements Serializable { +@Data +public class JobDto implements Serializable { private Long id; @@ -24,14 +27,14 @@ public class JobDTO implements Serializable { private Boolean enabled; - private DeptDTO dept; + private DeptDto dept; private String deptSuperiorName; private Timestamp createTime; - public JobDTO(String name, Boolean enabled) { - this.name = name; - this.enabled = enabled; - } -} \ No newline at end of file +// public JobDto(String name, Boolean enabled) { +// this.name = name; +// this.enabled = enabled; +// } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java index b285f265..e66e6084 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -8,7 +13,7 @@ import java.util.List; import java.util.Set; /** -* @author Zheng Jie +* @author hupeng * @date 2019-6-4 14:49:34 */ @Data @@ -29,4 +34,4 @@ public class JobQueryCriteria { @Query(type = Query.Type.BETWEEN) private List createTime; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDTO.java index cbba2103..c1b84105 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -5,14 +10,14 @@ import lombok.NoArgsConstructor; import java.io.Serializable; /** -* @author Zheng Jie +* @author hupeng * @date 2019-6-10 16:32:18 */ @Data @NoArgsConstructor -public class JobSmallDTO implements Serializable { +public class JobSmallDto implements Serializable { private Long id; private String name; -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuDTO.java index a4eee314..18b61f76 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuDTO.java @@ -1,16 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; -import java.io.Serializable; import java.sql.Timestamp; +import java.io.Serializable; import java.util.List; /** - * @author Zheng Jie - * @date 2018-12-17 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class MenuDTO implements Serializable { +public class MenuDto implements Serializable { private Long id; @@ -38,7 +46,7 @@ public class MenuDTO implements Serializable { private String icon; - private List children; + private List children; private Timestamp createTime; } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java index d48b2e8c..10e268bb 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java @@ -1,21 +1,21 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; +import java.util.List; import co.yixiang.annotation.Query; -import java.sql.Timestamp; -import java.util.List; - /** - * @author Zheng Jie - * 公共查询类 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class MenuQueryCriteria { - - @Query(blurry = "name,path,component") - private String blurry; - - @Query(type = Query.Type.BETWEEN) - private List createTime; +public class MenuQueryCriteria{ } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionDTO.java index eef9a973..bea2991a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionDTO.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -7,11 +12,11 @@ import java.sql.Timestamp; import java.util.List; /** - * @author Zheng Jie + * @author hupeng * @date 2018-12-03 */ @Data -public class PermissionDTO implements Serializable{ +public class PermissionDto implements Serializable{ private Long id; @@ -23,7 +28,7 @@ public class PermissionDTO implements Serializable{ private Timestamp createTime; - private List children; + private List children; @Override public String toString() { diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java index a88b319f..d43c6dbf 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java @@ -1,3 +1,8 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import co.yixiang.annotation.Query; diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleDTO.java index 2e67e351..7c6f5b42 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleDTO.java @@ -1,32 +1,46 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; +import co.yixiang.modules.system.domain.Menu; import lombok.Data; -import java.io.Serializable; import java.sql.Timestamp; +import java.io.Serializable; import java.util.Set; /** - * @author Zheng Jie - * @date 2018-11-23 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class RoleDTO implements Serializable { +public class RoleDto implements Serializable { + /** ID */ private Long id; + /** 名称 */ private String name; - private String dataScope; - - private Integer level; - + /** 备注 */ private String remark; - private String permission; + /** 数据权限 */ + private String dataScope; - private Set menus; + /** 角色级别 */ + private Integer level; - private Set depts; + private Set menus; + /** 创建日期 */ private Timestamp createTime; + + /** 功能权限 */ + private String permission; } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java index a34815cc..8569c8e6 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java @@ -1,21 +1,21 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; +import java.util.List; import co.yixiang.annotation.Query; -import java.sql.Timestamp; -import java.util.List; - /** - * @author Zheng Jie - * 公共查询类 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class RoleQueryCriteria { - - @Query(blurry = "name,remark") - private String blurry; - - @Query(type = Query.Type.BETWEEN) - private List createTime; +public class RoleQueryCriteria{ } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDTO.java index cf52b7dc..93400948 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDTO.java @@ -1,14 +1,19 @@ +/** + * Copyright (C) 2018-2020 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.modules.system.service.dto; import lombok.Data; import java.io.Serializable; /** - * @author Zheng Jie + * @author hupeng * @date 2018-11-23 */ @Data -public class RoleSmallDTO implements Serializable { +public class RoleSmallDto implements Serializable { private Long id; diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java new file mode 100644 index 00000000..56afc6ce --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java @@ -0,0 +1,35 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Data +public class UserAvatarDto implements Serializable { + + private Long id; + + /** 真实文件名 */ + private String realName; + + /** 路径 */ + private String path; + + /** 大小 */ + private String size; + + /** 创建时间 */ + private Timestamp createTime; +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java new file mode 100644 index 00000000..34d825e1 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java @@ -0,0 +1,21 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Data +public class UserAvatarQueryCriteria{ +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserDTO.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserDTO.java index 74925cf5..2c0f3b98 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserDTO.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserDTO.java @@ -1,19 +1,28 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.io.Serializable; import java.sql.Timestamp; +import java.io.Serializable; import java.util.Date; import java.util.Set; /** - * @author Zheng Jie - * @date 2018-11-23 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class UserDTO implements Serializable { +public class UserDto implements Serializable { + @ApiModelProperty(hidden = true) private Long id; @@ -35,15 +44,15 @@ public class UserDTO implements Serializable { @JsonIgnore private String password; - private Date lastPasswordResetTime; + private Timestamp lastPasswordResetTime; @ApiModelProperty(hidden = true) - private Set roles; + private Set roles; @ApiModelProperty(hidden = true) - private JobSmallDTO job; + private JobSmallDto job; - private DeptSmallDTO dept; + private DeptSmallDto dept; private Long deptId; diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java index 94763cf3..98d6082c 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java @@ -1,18 +1,27 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; -import co.yixiang.annotation.Query; -import java.io.Serializable; + import java.sql.Timestamp; import java.util.List; import java.util.Set; +import co.yixiang.annotation.Query; + /** - * @author Zheng Jie - * @date 2018-11-23 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class UserQueryCriteria implements Serializable { +public class UserQueryCriteria{ @Query private Long id; diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java index 20eea935..e510620c 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java @@ -1,97 +1,142 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; -import co.yixiang.modules.system.service.dto.DeptDTO; +import co.yixiang.modules.system.domain.Dept; +import co.yixiang.common.service.impl.BaseServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.system.service.DeptService; +import co.yixiang.modules.system.service.dto.DeptDto; import co.yixiang.modules.system.service.dto.DeptQueryCriteria; import co.yixiang.modules.system.service.mapper.DeptMapper; -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.system.domain.Dept; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -import co.yixiang.modules.system.repository.DeptRepository; -import co.yixiang.modules.system.service.DeptService; -import org.springframework.cache.annotation.CacheConfig; -import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; import org.springframework.util.CollectionUtils; -import javax.servlet.http.HttpServletResponse; + +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; import java.io.IOException; -import java.util.*; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Set; import java.util.stream.Collectors; /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ @Service -@CacheConfig(cacheNames = "dept") +@AllArgsConstructor +//@CacheConfig(cacheNames = "dept") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DeptServiceImpl implements DeptService { +public class DeptServiceImpl extends BaseServiceImpl implements DeptService { - private final DeptRepository deptRepository; + private final IGenerator generator; private final DeptMapper deptMapper; - public DeptServiceImpl(DeptRepository deptRepository, DeptMapper deptMapper) { - this.deptRepository = deptRepository; - this.deptMapper = deptMapper; + @Override + //@Cacheable + public Map queryAll(DeptQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), DeptDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - @Cacheable - public List queryAll(DeptQueryCriteria criteria) { - return deptMapper.toDto(deptRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); - } @Override - @Cacheable(key = "#p0") - public DeptDTO findById(Long id) { - Dept dept = deptRepository.findById(id).orElseGet(Dept::new); - ValidationUtil.isNull(dept.getId(),"Dept","id",id); - return deptMapper.toDto(dept); + //@Cacheable + public List queryAll(DeptQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(Dept.class, criteria)); } + @Override - @Cacheable + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (DeptDto dept : all) { + Map map = new LinkedHashMap<>(); + map.put("名称", dept.getName()); + map.put("上级部门", dept.getPid()); + map.put("状态", dept.getEnabled()); + map.put("创建日期", dept.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 根据PID查询 + * + * @param pid / + * @return / + */ + @Override +// @Cacheable(key = "#p0") public List findByPid(long pid) { - return deptRepository.findByPid(pid); + DeptQueryCriteria criteria = new DeptQueryCriteria(); + criteria.setPid(pid); + return baseMapper.selectList(QueryHelpPlus.getPredicate(Dept.class, criteria)); } + /** + * 构建树形数据 + * + * @param deptDtos 原始数据 + * @return / + */ @Override - public Set findByRoleIds(Long id) { - return deptRepository.findByRoles_Id(id); - } - - @Override - @Cacheable - public Object buildTree(List deptDtos) { - Set trees = new LinkedHashSet<>(); - Set depts= new LinkedHashSet<>(); - List deptNames = deptDtos.stream().map(DeptDTO::getName).collect(Collectors.toList()); + public Object buildTree(List deptDtos) { + Set trees = new LinkedHashSet<>(); + Set depts= new LinkedHashSet<>(); + List deptNames = deptDtos.stream().map(DeptDto::getName).collect(Collectors.toList()); boolean isChild; - List deptList = deptRepository.findAll(); - for (DeptDTO deptDTO : deptDtos) { + DeptQueryCriteria criteria = new DeptQueryCriteria(); + List deptList = this.queryAll(criteria); + for (DeptDto deptDto : deptDtos) { isChild = false; - if ("0".equals(deptDTO.getPid().toString())) { - trees.add(deptDTO); + if ("0".equals(deptDto.getPid().toString())) { + trees.add(deptDto); } - for (DeptDTO it : deptDtos) { - if (it.getPid().equals(deptDTO.getId())) { + for (DeptDto it : deptDtos) { + if (it.getPid().equals(deptDto.getId())) { isChild = true; - if (deptDTO.getChildren() == null) { - deptDTO.setChildren(new ArrayList<>()); + if (deptDto.getChildren() == null) { + deptDto.setChildren(new ArrayList<>()); } - deptDTO.getChildren().add(it); + deptDto.getChildren().add(it); } } if(isChild) { - depts.add(deptDTO); + depts.add(deptDto); for (Dept dept : deptList) { - if(dept.getId() == deptDTO.getPid() && !deptNames.contains(dept.getName())){ - depts.add(deptDTO); + if(dept.getId() == deptDto.getPid() && !deptNames.contains(dept.getName())){ + depts.add(deptDto); } } } @@ -109,57 +154,34 @@ public class DeptServiceImpl implements DeptService { return map; } - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public DeptDTO create(Dept resources) { - return deptMapper.toDto(deptRepository.save(resources)); - } + /** + * 获取待删除的部门 + * + * @param deptList / + * @param deptDtos / + * @return / + */ +/* @Override + public Set getDeleteDepts(List deptList, Set deptDtos) { - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(Dept resources) { - if(resources.getId().equals(resources.getPid())) { - throw new BadRequestException("上级不能为自己"); - } - Dept dept = deptRepository.findById(resources.getId()).orElseGet(Dept::new); - ValidationUtil.isNull( dept.getId(),"Dept","id",resources.getId()); - resources.setId(dept.getId()); - deptRepository.save(resources); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set deptDtos) { - for (DeptDTO deptDto : deptDtos) { - deptRepository.deleteById(deptDto.getId()); - } - } - - @Override - public void download(List deptDtos, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (DeptDTO deptDTO : deptDtos) { - Map map = new LinkedHashMap<>(); - map.put("部门名称", deptDTO.getName()); - map.put("部门状态", deptDTO.getEnabled() ? "启用" : "停用"); - map.put("创建日期", deptDTO.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - - @Override - public Set getDeleteDepts(List menuList, Set deptDtos) { - for (Dept dept : menuList) { - deptDtos.add(deptMapper.toDto(dept)); - List depts = deptRepository.findByPid(dept.getId()); + for (Dept dept : deptList) { + deptDtos.add((DeptDto)generator.convert(deptList,DeptDto.class)); + List depts = Collections.singletonList(this.getOne(new QueryWrapper().eq("id", dept.getId()))); if(depts!=null && depts.size()!=0){ getDeleteDepts(depts, deptDtos); } } return deptDtos; + }*/ + + /** + * 根据角色ID查询 + * + * @param id / + * @return / + */ + @Override + public Set findByRoleIds(Long id) { + return deptMapper.findDeptByRoleId(id); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java index 27c7abf1..2c776433 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java @@ -1,79 +1,88 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.modules.system.domain.DictDetail; -import co.yixiang.modules.system.repository.DictDetailRepository; +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 co.yixiang.modules.system.service.DictDetailService; -import co.yixiang.modules.system.service.dto.DictDetailDTO; +import co.yixiang.modules.system.service.dto.DictDetailDto; import co.yixiang.modules.system.service.dto.DictDetailQueryCriteria; import co.yixiang.modules.system.service.mapper.DictDetailMapper; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -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 org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - +// 默认不使用缓存 +//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 Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ @Service -@CacheConfig(cacheNames = "dictDetail") +@AllArgsConstructor +//@CacheConfig(cacheNames = "dictDetail") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DictDetailServiceImpl implements DictDetailService { +public class DictDetailServiceImpl extends BaseServiceImpl implements DictDetailService { - private final DictDetailRepository dictDetailRepository; - - private final DictDetailMapper dictDetailMapper; - - public DictDetailServiceImpl(DictDetailRepository dictDetailRepository, DictDetailMapper dictDetailMapper) { - this.dictDetailRepository = dictDetailRepository; - this.dictDetailMapper = dictDetailMapper; - } + private final IGenerator generator; @Override - @Cacheable - public Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable) { - Page page = dictDetailRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(dictDetailMapper::toDto)); + //@Cacheable + public Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), DictDetailDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - @Cacheable(key = "#p0") - public DictDetailDTO findById(Long id) { - DictDetail dictDetail = dictDetailRepository.findById(id).orElseGet(DictDetail::new); - ValidationUtil.isNull(dictDetail.getId(),"DictDetail","id",id); - return dictDetailMapper.toDto(dictDetail); - } @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public DictDetailDTO create(DictDetail resources) { - return dictDetailMapper.toDto(dictDetailRepository.save(resources)); + //@Cacheable + public List queryAll(DictDetailQueryCriteria criteria){ + List list = baseMapper.selectDictDetailList(criteria.getLabel(),criteria.getDictName()); + return list; } - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(DictDetail resources) { - DictDetail dictDetail = dictDetailRepository.findById(resources.getId()).orElseGet(DictDetail::new); - ValidationUtil.isNull( dictDetail.getId(),"DictDetail","id",resources.getId()); - resources.setId(dictDetail.getId()); - dictDetailRepository.save(resources); - } @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Long id) { - dictDetailRepository.deleteById(id); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (DictDetailDto dictDetail : all) { + Map map = new LinkedHashMap<>(); + map.put("字典标签", dictDetail.getLabel()); + map.put("字典值", dictDetail.getValue()); + map.put("排序", dictDetail.getSort()); + map.put("字典id", dictDetail.getDictId()); + map.put("创建日期", dictDetail.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java index 1081da67..8629f75a 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java @@ -1,120 +1,85 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; -import cn.hutool.core.collection.CollectionUtil; import co.yixiang.modules.system.domain.Dict; -import co.yixiang.modules.system.repository.DictRepository; +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 co.yixiang.modules.system.service.DictService; -import co.yixiang.modules.system.service.dto.DictDTO; -import co.yixiang.modules.system.service.dto.DictDetailDTO; +import co.yixiang.modules.system.service.dto.DictDto; import co.yixiang.modules.system.service.dto.DictQueryCriteria; import co.yixiang.modules.system.service.mapper.DictMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; -import co.yixiang.utils.ValidationUtil; -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 org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.ArrayList; -import java.util.LinkedHashMap; +// 默认不使用缓存 +//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 Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ @Service -@CacheConfig(cacheNames = "dict") +@AllArgsConstructor +//@CacheConfig(cacheNames = "dict") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class DictServiceImpl implements DictService { +public class DictServiceImpl extends BaseServiceImpl implements DictService { - private final DictRepository dictRepository; - - private final DictMapper dictMapper; - - public DictServiceImpl(DictRepository dictRepository, DictMapper dictMapper) { - this.dictRepository = dictRepository; - this.dictMapper = dictMapper; - } + private final IGenerator generator; @Override - @Cacheable - public Map queryAll(DictQueryCriteria dict, Pageable pageable){ - Page page = dictRepository.findAll((root, query, cb) -> QueryHelp.getPredicate(root, dict, cb), pageable); - return PageUtil.toPage(page.map(dictMapper::toDto)); + //@Cacheable + public Map queryAll(DictQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), DictDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - public List queryAll(DictQueryCriteria dict) { - List list = dictRepository.findAll((root, query, cb) -> QueryHelp.getPredicate(root, dict, cb)); - return dictMapper.toDto(list); - } @Override - @Cacheable(key = "#p0") - public DictDTO findById(Long id) { - Dict dict = dictRepository.findById(id).orElseGet(Dict::new); - ValidationUtil.isNull(dict.getId(),"Dict","id",id); - return dictMapper.toDto(dict); + //@Cacheable + public List queryAll(DictQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(Dict.class, criteria)); } - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public DictDTO create(Dict resources) { - return dictMapper.toDto(dictRepository.save(resources)); - } @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(Dict resources) { - Dict dict = dictRepository.findById(resources.getId()).orElseGet(Dict::new); - ValidationUtil.isNull( dict.getId(),"Dict","id",resources.getId()); - resources.setId(dict.getId()); - dictRepository.save(resources); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Long id) { - dictRepository.deleteById(id); - } - - @Override - public void download(List dictDtos, HttpServletResponse response) throws IOException { + public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (DictDTO dictDTO : dictDtos) { - if(CollectionUtil.isNotEmpty(dictDTO.getDictDetails())){ - for (DictDetailDTO dictDetail : dictDTO.getDictDetails()) { - Map map = new LinkedHashMap<>(); - map.put("字典名称", dictDTO.getName()); - map.put("字典描述", dictDTO.getRemark()); - map.put("字典标签", dictDetail.getLabel()); - map.put("字典值", dictDetail.getValue()); - map.put("创建日期", dictDetail.getCreateTime()); - list.add(map); - } - } else { - Map map = new LinkedHashMap<>(); - map.put("字典名称", dictDTO.getName()); - map.put("字典描述", dictDTO.getRemark()); - map.put("字典标签", null); - map.put("字典值", null); - map.put("创建日期", dictDTO.getCreateTime()); - list.add(map); - } + for (DictDto dict : all) { + Map map = new LinkedHashMap<>(); + map.put("字典名称", dict.getName()); + map.put("描述", dict.getRemark()); + map.put("创建日期", dict.getCreateTime()); + list.add(map); } FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java index b860939a..db045803 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java @@ -1,113 +1,107 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; -import co.yixiang.modules.system.service.dto.JobDTO; -import co.yixiang.modules.system.service.dto.JobQueryCriteria; import co.yixiang.modules.system.domain.Job; -import co.yixiang.modules.system.repository.DeptRepository; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.PageUtil; -import co.yixiang.utils.QueryHelp; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.system.service.DeptService; +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.modules.system.repository.JobRepository; +import co.yixiang.utils.FileUtil; import co.yixiang.modules.system.service.JobService; +import co.yixiang.modules.system.service.dto.JobDto; +import co.yixiang.modules.system.service.dto.JobQueryCriteria; import co.yixiang.modules.system.service.mapper.JobMapper; -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 org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletResponse; +// 默认不使用缓存 +//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 java.util.*; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; /** -* @author Zheng Jie -* @date 2019-03-29 +* @author hupeng +* @date 2020-05-14 */ @Service -@CacheConfig(cacheNames = "job") +@AllArgsConstructor +//@CacheConfig(cacheNames = "job") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class JobServiceImpl implements JobService { +public class JobServiceImpl extends BaseServiceImpl implements JobService { - private final JobRepository jobRepository; + private final IGenerator generator; - private final JobMapper jobMapper; - - private final DeptRepository deptRepository; - - public JobServiceImpl(JobRepository jobRepository, JobMapper jobMapper, DeptRepository deptRepository) { - this.jobRepository = jobRepository; - this.jobMapper = jobMapper; - this.deptRepository = deptRepository; - } + private final DeptService deptService; @Override - @Cacheable - public Map queryAll(JobQueryCriteria criteria, Pageable pageable) { - Page page = jobRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - List jobs = new ArrayList<>(); - for (Job job : page.getContent()) { - jobs.add(jobMapper.toDto(job,deptRepository.findNameById(job.getDept().getPid()))); + //@Cacheable + public Map queryAll(JobQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), JobDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(JobQueryCriteria criteria){ + List jobList = baseMapper.selectList(QueryHelpPlus.getPredicate(Job.class, criteria)); + List jobScopeList = new ArrayList<>(); + if(criteria.getDeptIds().size()==0){ + for (Job job : jobList) { + job.setDept(deptService.getById(job.getDeptId())); + jobScopeList.add(job); + } + }else { + //断权限范围 + for (Long deptId : criteria.getDeptIds()) { + for (Job job : jobList) { + if(deptId ==job.getDeptId()){ + job.setDept(deptService.getById(job.getDeptId())); + jobScopeList.add(job); + } + } + } } - return PageUtil.toPage(jobs,page.getTotalElements()); + return jobScopeList; } - @Override - @Cacheable - public List queryAll(JobQueryCriteria criteria) { - List list = jobRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); - return jobMapper.toDto(list); - } @Override - @Cacheable(key = "#p0") - public JobDTO findById(Long id) { - Job job = jobRepository.findById(id).orElseGet(Job::new); - ValidationUtil.isNull(job.getId(),"Job","id",id); - return jobMapper.toDto(job); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public JobDTO create(Job resources) { - return jobMapper.toDto(jobRepository.save(resources)); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(Job resources) { - Job job = jobRepository.findById(resources.getId()).orElseGet(Job::new); - ValidationUtil.isNull( job.getId(),"Job","id",resources.getId()); - resources.setId(job.getId()); - jobRepository.save(resources); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - jobRepository.deleteById(id); - } - } - - @Override - public void download(List jobDtos, HttpServletResponse response) throws IOException { + public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (JobDTO jobDTO : jobDtos) { + for (JobDto job : all) { Map map = new LinkedHashMap<>(); - map.put("岗位名称", jobDTO.getName()); - map.put("所属部门", jobDTO.getDept().getName()); - map.put("岗位状态", jobDTO.getEnabled() ? "启用" : "停用"); - map.put("创建日期", jobDTO.getCreateTime()); + map.put("岗位名称", job.getName()); + map.put("岗位状态", job.getEnabled()); + map.put("岗位排序", job.getSort()); + map.put("创建日期", job.getCreateTime()); list.add(map); } FileUtil.downloadExcel(list, response); } -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java index 90b002b5..4fd7e071 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import cn.hutool.core.util.ObjectUtil; @@ -5,196 +13,121 @@ import cn.hutool.core.util.StrUtil; import co.yixiang.exception.BadRequestException; import co.yixiang.exception.EntityExistException; import co.yixiang.modules.system.domain.Menu; +import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.modules.system.domain.vo.MenuMetaVo; import co.yixiang.modules.system.domain.vo.MenuVo; -import co.yixiang.modules.system.repository.MenuRepository; -import co.yixiang.modules.system.service.MenuService; -import co.yixiang.modules.system.service.RoleService; -import co.yixiang.modules.system.service.dto.*; -import co.yixiang.modules.system.service.mapper.MenuMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.QueryHelp; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import co.yixiang.modules.system.service.mapper.RoleMapper; import co.yixiang.utils.StringUtils; import co.yixiang.utils.ValidationUtil; -import org.springframework.cache.annotation.CacheConfig; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.system.service.MenuService; +import co.yixiang.modules.system.service.dto.MenuDto; +import co.yixiang.modules.system.service.dto.MenuQueryCriteria; +import co.yixiang.modules.system.service.mapper.MenuMapper; import org.springframework.cache.annotation.CacheEvict; -import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; -import javax.servlet.http.HttpServletResponse; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; import java.io.IOException; -import java.util.*; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Set; import java.util.stream.Collectors; /** - * @author Zheng Jie - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service -@CacheConfig(cacheNames = "menu") +@AllArgsConstructor +//@CacheConfig(cacheNames = "menu") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class MenuServiceImpl implements MenuService { - - private final MenuRepository menuRepository; +public class MenuServiceImpl extends BaseServiceImpl implements MenuService { + private final IGenerator generator; private final MenuMapper menuMapper; - - private final RoleService roleService; - - public MenuServiceImpl(MenuRepository menuRepository, MenuMapper menuMapper, RoleService roleService) { - this.menuRepository = menuRepository; - this.menuMapper = menuMapper; - this.roleService = roleService; - } + private final RoleMapper roleMapper; @Override - @Cacheable - public List queryAll(MenuQueryCriteria criteria){ -// Sort sort = new Sort(Sort.Direction.DESC,"id"); - return menuMapper.toDto(menuRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + //@Cacheable + public Map queryAll(MenuQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), MenuDto.class)); + map.put("totalElements", page.getTotal()); + return map; } - @Override - @Cacheable(key = "#p0") - public MenuDTO findById(long id) { - Menu menu = menuRepository.findById(id).orElseGet(Menu::new); - ValidationUtil.isNull(menu.getId(),"Menu","id",id); - return menuMapper.toDto(menu); - } @Override - public List findByRoles(List roles) { - Set roleIds = roles.stream().map(RoleSmallDTO::getId).collect(Collectors.toSet()); - LinkedHashSet menus = menuRepository.findByRoles_IdInAndTypeNotOrderBySortAsc(roleIds, 2); - return menus.stream().map(menuMapper::toDto).collect(Collectors.toList()); + //@Cacheable + public List queryAll(MenuQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(Menu.class, criteria)); } + @Override - @CacheEvict(allEntries = true) - public MenuDTO create(Menu resources) { - if(menuRepository.findByName(resources.getName()) != null){ - throw new EntityExistException(Menu.class,"name",resources.getName()); + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (MenuDto menu : all) { + Map map = new LinkedHashMap<>(); + map.put("是否外链", menu.getIFrame()); + map.put("菜单名称", menu.getName()); + map.put("组件", menu.getComponent()); + map.put("上级菜单ID", menu.getPid()); + map.put("排序", menu.getSort()); + map.put("图标", menu.getIcon()); + map.put("链接地址", menu.getPath()); + map.put("缓存", menu.getCache()); + map.put("是否隐藏", menu.getHidden()); + map.put("组件名称", menu.getComponentName()); + map.put("创建日期", menu.getCreateTime()); + map.put("权限", menu.getPermission()); + map.put("类型", menu.getType()); + list.add(map); } - if(StringUtils.isNotBlank(resources.getComponentName())){ - if(menuRepository.findByComponentName(resources.getComponentName()) != null){ - throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); - } - } - if(resources.getIFrame()){ - String http = "http://", https = "https://"; - if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { - throw new BadRequestException("外链必须以http://或者https://开头"); - } - } - return menuMapper.toDto(menuRepository.save(resources)); + FileUtil.downloadExcel(list, response); } + /** + * 构建菜单树 + * + * @param menuDtos 原始数据 + * @return / + */ @Override - @CacheEvict(allEntries = true) - public void update(Menu resources) { - if(resources.getId().equals(resources.getPid())) { - throw new BadRequestException("上级不能为自己"); - } - Menu menu = menuRepository.findById(resources.getId()).orElseGet(Menu::new); - ValidationUtil.isNull(menu.getId(),"Permission","id",resources.getId()); - - if(resources.getIFrame()){ - String http = "http://", https = "https://"; - if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { - throw new BadRequestException("外链必须以http://或者https://开头"); - } - } - Menu menu1 = menuRepository.findByName(resources.getName()); - - if(menu1 != null && !menu1.getId().equals(menu.getId())){ - throw new EntityExistException(Menu.class,"name",resources.getName()); - } - - if(StringUtils.isNotBlank(resources.getComponentName())){ - menu1 = menuRepository.findByComponentName(resources.getComponentName()); - if(menu1 != null && !menu1.getId().equals(menu.getId())){ - throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); - } - } - menu.setName(resources.getName()); - menu.setComponent(resources.getComponent()); - menu.setPath(resources.getPath()); - menu.setIcon(resources.getIcon()); - menu.setIFrame(resources.getIFrame()); - menu.setPid(resources.getPid()); - menu.setSort(resources.getSort()); - menu.setCache(resources.getCache()); - menu.setHidden(resources.getHidden()); - menu.setComponentName(resources.getComponentName()); - menu.setPermission(resources.getPermission()); - menu.setType(resources.getType()); - menuRepository.save(menu); - } - - @Override - public Set getDeleteMenus(List menuList, Set menuSet) { - // 递归找出待删除的菜单 - for (Menu menu1 : menuList) { - menuSet.add(menu1); - List menus = menuRepository.findByPid(menu1.getId()); - if(menus!=null && menus.size()!=0){ - getDeleteMenus(menus, menuSet); - } - } - return menuSet; - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set menuSet) { - for (Menu menu : menuSet) { - roleService.untiedMenu(menu.getId()); - menuRepository.deleteById(menu.getId()); - } - } - - @Override - @Cacheable(key = "'tree'") - public Object getMenuTree(List menus) { - List> list = new LinkedList<>(); - menus.forEach(menu -> { - if (menu!=null){ - List menuList = menuRepository.findByPid(menu.getId()); - Map map = new HashMap<>(16); - map.put("id",menu.getId()); - map.put("label",menu.getName()); - if(menuList!=null && menuList.size()!=0){ - map.put("children",getMenuTree(menuList)); - } - list.add(map); - } - } - ); - return list; - } - - @Override - @Cacheable(key = "'pid:'+#p0") - public List findByPid(long pid) { - return menuRepository.findByPid(pid); - } - - @Override - public Map buildTree(List menuDtos) { - List trees = new ArrayList<>(); + public Map buildTree(List menuDtos) { + List trees = new ArrayList<>(); Set ids = new HashSet<>(); - for (MenuDTO menuDTO : menuDtos) { - if (menuDTO.getPid() == 0) { - trees.add(menuDTO); + for (MenuDto menuDto : menuDtos) { + if (menuDto.getPid() == 0) { + trees.add(menuDto); } - for (MenuDTO it : menuDtos) { - if (it.getPid().equals(menuDTO.getId())) { - if (menuDTO.getChildren() == null) { - menuDTO.setChildren(new ArrayList<>()); + for (MenuDto it : menuDtos) { + if (it.getPid().equals(menuDto.getId())) { + if (menuDto.getChildren() == null) { + menuDto.setChildren(new ArrayList<>()); } - menuDTO.getChildren().add(it); + menuDto.getChildren().add(it); ids.add(it.getId()); } } @@ -208,77 +141,192 @@ public class MenuServiceImpl implements MenuService { return map; } + /** + * 构建菜单树 + * + * @param menuDtos / + * @return / + */ @Override - public List buildMenus(List menuDtos) { + public List buildMenus(List menuDtos) { List list = new LinkedList<>(); menuDtos.forEach(menuDTO -> { - if (menuDTO!=null){ - List menuDtoList = menuDTO.getChildren(); - MenuVo menuVo = new MenuVo(); - menuVo.setName(ObjectUtil.isNotEmpty(menuDTO.getComponentName()) ? menuDTO.getComponentName() : menuDTO.getName()); - // 一级目录需要加斜杠,不然会报警告 - menuVo.setPath(menuDTO.getPid() == 0 ? "/" + menuDTO.getPath() :menuDTO.getPath()); - menuVo.setHidden(menuDTO.getHidden()); - // 如果不是外链 - if(!menuDTO.getIFrame()){ - if(menuDTO.getPid() == 0){ - menuVo.setComponent(StrUtil.isEmpty(menuDTO.getComponent())?"Layout":menuDTO.getComponent()); - }else if(!StrUtil.isEmpty(menuDTO.getComponent())){ - menuVo.setComponent(menuDTO.getComponent()); + if (menuDTO!=null){ + List menuDtoList = menuDTO.getChildren(); + MenuVo menuVo = new MenuVo(); + menuVo.setName(ObjectUtil.isNotEmpty(menuDTO.getComponentName()) ? menuDTO.getComponentName() : menuDTO.getName()); + // 一级目录需要加斜杠,不然会报警告 + menuVo.setPath(menuDTO.getPid() == 0 ? "/" + menuDTO.getPath() :menuDTO.getPath()); + menuVo.setHidden(menuDTO.getHidden()); + // 如果不是外链 + if(!menuDTO.getIFrame()){ + if(menuDTO.getPid() == 0){ + menuVo.setComponent(StrUtil.isEmpty(menuDTO.getComponent())?"Layout":menuDTO.getComponent()); + }else if(!StrUtil.isEmpty(menuDTO.getComponent())){ + menuVo.setComponent(menuDTO.getComponent()); + } + } + menuVo.setMeta(new MenuMetaVo(menuDTO.getName(),menuDTO.getIcon(),!menuDTO.getCache())); + if(menuDtoList !=null && menuDtoList.size()!=0){ + menuVo.setAlwaysShow(true); + menuVo.setRedirect("noredirect"); + menuVo.setChildren(buildMenus(menuDtoList)); + // 处理是一级菜单并且没有子菜单的情况 + } else if(menuDTO.getPid() == 0){ + MenuVo menuVo1 = new MenuVo(); + menuVo1.setMeta(menuVo.getMeta()); + // 非外链 + if(!menuDTO.getIFrame()){ + menuVo1.setPath("index"); + menuVo1.setName(menuVo.getName()); + menuVo1.setComponent(menuVo.getComponent()); + } else { + menuVo1.setPath(menuDTO.getPath()); + } + menuVo.setName(null); + menuVo.setMeta(null); + menuVo.setComponent("Layout"); + List list1 = new ArrayList<>(); + list1.add(menuVo1); + menuVo.setChildren(list1); + } + list.add(menuVo); } } - menuVo.setMeta(new MenuMetaVo(menuDTO.getName(),menuDTO.getIcon(),!menuDTO.getCache())); - if(menuDtoList !=null && menuDtoList.size()!=0){ - menuVo.setAlwaysShow(true); - menuVo.setRedirect("noredirect"); - menuVo.setChildren(buildMenus(menuDtoList)); - // 处理是一级菜单并且没有子菜单的情况 - } else if(menuDTO.getPid() == 0){ - MenuVo menuVo1 = new MenuVo(); - menuVo1.setMeta(menuVo.getMeta()); - // 非外链 - if(!menuDTO.getIFrame()){ - menuVo1.setPath("index"); - menuVo1.setName(menuVo.getName()); - menuVo1.setComponent(menuVo.getComponent()); - } else { - menuVo1.setPath(menuDTO.getPath()); - } - menuVo.setName(null); - menuVo.setMeta(null); - menuVo.setComponent("Layout"); - List list1 = new ArrayList<>(); - list1.add(menuVo1); - menuVo.setChildren(list1); - } - list.add(menuVo); - } - } ); return list; } + /** + * 获取菜单树 + * + * @param menus / + * @return / + */ @Override - public Menu findOne(Long id) { - Menu menu = menuRepository.findById(id).orElseGet(Menu::new); - ValidationUtil.isNull(menu.getId(),"Menu","id",id); - return menu; + public Object getMenuTree(List menus) { + List> list = new LinkedList<>(); + menus.forEach(menu -> { + if (menu!=null){ + List menuList = menuMapper.findByPid(menu.getId()); + Map map = new HashMap<>(16); + map.put("id",menu.getId()); + map.put("label",menu.getName()); + if(menuList!=null && menuList.size()!=0){ + map.put("children",getMenuTree(menuList)); + } + list.add(map); + } + } + ); + return list; } + /** + * 获取待删除的菜单 + * + * @param menuList / + * @param menuSet / + * @return / + */ @Override - public void download(List menuDtos, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (MenuDTO menuDTO : menuDtos) { - Map map = new LinkedHashMap<>(); - map.put("菜单名称", menuDTO.getName()); - map.put("菜单类型", menuDTO.getType() == 0 ? "目录" : menuDTO.getType() == 1 ? "菜单" : "按钮"); - map.put("权限标识", menuDTO.getPermission()); - map.put("外链菜单", menuDTO.getIFrame() ? "是" : "否"); - map.put("菜单可见", menuDTO.getHidden() ? "否" : "是"); - map.put("是否缓存", menuDTO.getCache() ? "是" : "否"); - map.put("创建日期", menuDTO.getCreateTime()); - list.add(map); + public Set getDeleteMenus(List menuList, Set menuSet) { + // 递归找出待删除的菜单 + for (Menu menu1 : menuList) { + menuSet.add(menu1); + List menus = menuMapper.findByPid(menu1.getId()); + if(menus!=null && menus.size()!=0){ + getDeleteMenus(menus, menuSet); + } } - FileUtil.downloadExcel(list, response); + return menuSet; + } + + /** + * 根据pid查询 + * + * @param pid / + * @return / + */ + @Override + public List findByPid(long pid) { + return menuMapper.findByPid(pid); + } + + /** + * 根据角色查询 + * + * @param roles / + * @return / + */ + @Override + public List findByRoles(List roles) { + List roleIds = roles.stream().map(i ->{ + Long role = i.getId(); + return role; + }).collect(Collectors.toList()); + List list = menuMapper.selectListByRoles(roleIds); + + return generator.convert(list,MenuDto.class); + } + + /** + * 删除 + * + * @param menuSet / + */ + @Override + public void delete(Set menuSet) { + for (Menu menu : menuSet) { + roleMapper.untiedMenu(menu.getId()); + this.removeById(menu.getId()); + } + } + + /** + * 编辑 + * + * @param resources / + */ + @Override + public void update(Menu resources) { + if(resources.getId().equals(resources.getPid())) { + throw new BadRequestException("上级不能为自己"); + } + Menu menu = this.getById(resources.getId()); + ValidationUtil.isNull(menu.getId(),"Permission","id",resources.getId()); + + if(resources.getIFrame()){ + String http = "http://", https = "https://"; + if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { + throw new BadRequestException("外链必须以http://或者https://开头"); + } + } + Menu menu1 = this.getOne(new QueryWrapper().eq("name",resources.getName())); + + if(menu1 != null && !menu1.getId().equals(menu.getId())){ + throw new EntityExistException(Menu.class,"name",resources.getName()); + } + + if(StringUtils.isNotBlank(resources.getComponentName())){ + menu1 = this.getOne(new QueryWrapper().eq("component_name",resources.getComponentName())); + if(menu1 != null && !menu1.getId().equals(menu.getId())){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); + } + } + menu.setId(resources.getId()); + menu.setName(resources.getName()); + menu.setComponent(resources.getComponent()); + menu.setPath(resources.getPath()); + menu.setIcon(resources.getIcon()); + menu.setIFrame(resources.getIFrame()); + menu.setPid(resources.getPid()); + menu.setSort(resources.getSort()); + menu.setCache(resources.getCache()); + menu.setHidden(resources.getHidden()); + menu.setComponentName(resources.getComponentName()); + menu.setPermission(resources.getPermission()); + menu.setType(resources.getType()); + this.saveOrUpdate(menu); } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java index ed51d4ae..7fa7d952 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java @@ -1,161 +1,266 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; -import co.yixiang.modules.system.service.dto.RoleDTO; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; -import co.yixiang.modules.system.domain.Menu; -import co.yixiang.modules.system.domain.Role; import co.yixiang.exception.EntityExistException; -import co.yixiang.modules.system.repository.RoleRepository; -import co.yixiang.modules.system.service.RoleService; +import co.yixiang.modules.system.domain.*; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.system.service.*; +import co.yixiang.modules.system.service.dto.RoleSmallDto; +import co.yixiang.modules.system.service.dto.UserDto; +import co.yixiang.modules.system.service.mapper.DeptMapper; +import co.yixiang.modules.system.service.mapper.MenuMapper; +import co.yixiang.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.api.R; +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 co.yixiang.modules.system.service.dto.RoleDto; import co.yixiang.modules.system.service.dto.RoleQueryCriteria; import co.yixiang.modules.system.service.mapper.RoleMapper; -import co.yixiang.modules.system.service.mapper.RoleSmallMapper; -import co.yixiang.utils.*; - 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 org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//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 javax.servlet.http.HttpServletResponse; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; import java.io.IOException; -import java.util.*; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.Set; import java.util.stream.Collectors; /** - * @author Zheng Jie - * @date 2018-12-03 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service -@CacheConfig(cacheNames = "role") +@AllArgsConstructor @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class RoleServiceImpl implements RoleService { - - private final RoleRepository roleRepository; +public class RoleServiceImpl extends BaseServiceImpl implements RoleService { + private final IGenerator generator; private final RoleMapper roleMapper; - - private final RoleSmallMapper roleSmallMapper; - - public RoleServiceImpl(RoleRepository roleRepository, RoleMapper roleMapper, RoleSmallMapper roleSmallMapper) { - this.roleRepository = roleRepository; - this.roleMapper = roleMapper; - this.roleSmallMapper = roleSmallMapper; - } + private final MenuMapper menuMapper; + private final DeptMapper deptMapper; + private final RolesMenusService rolesMenusService; + private final RolesDeptsService rolesDeptsService; @Override - @Cacheable - public Object queryAll(Pageable pageable) { - return roleMapper.toDto(roleRepository.findAll(pageable).getContent()); + public Map queryAll(RoleQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), RoleDto.class)); + map.put("totalElements", page.getTotal()); + return map; } + /** + * 查询数据分页 + * + * @param pageable 分页参数 + * @return Object + */ @Override - @Cacheable - public List queryAll(RoleQueryCriteria criteria) { - return roleMapper.toDto(roleRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + public Object queryAlls(RoleQueryCriteria criteria,Pageable pageable) { + List roleList = baseMapper.selectList(QueryHelpPlus.getPredicate(Role.class, criteria)); + return roleList; } - @Override - @Cacheable - public Object queryAll(RoleQueryCriteria criteria, Pageable pageable) { - Page page = roleRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(roleMapper::toDto)); - } @Override - @Cacheable(key = "#p0") - public RoleDTO findById(long id) { - Role role = roleRepository.findById(id).orElseGet(Role::new); - ValidationUtil.isNull(role.getId(),"Role","id",id); - return roleMapper.toDto(role); + public List queryAll(RoleQueryCriteria criteria){ + List roleList = baseMapper.selectList(QueryHelpPlus.getPredicate(Role.class, criteria)); + for (Role role : roleList) { + role.setMenus(menuMapper.findMenuByRoleId(role.getId())); + role.setDepts(deptMapper.findDeptByRoleId(role.getId())); + } + return roleList; } + @Override - @CacheEvict(allEntries = true) + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (RoleDto role : all) { + Map map = new LinkedHashMap<>(); + map.put("名称", role.getName()); + map.put("备注", role.getRemark()); + map.put("数据权限", role.getDataScope()); + map.put("角色级别", role.getLevel()); + map.put("创建日期", role.getCreateTime()); + map.put("功能权限", role.getPermission()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 根据用户ID查询 + * + * @param id 用户ID + * @return / + */ +// @Cacheable(key = "'findByUsers_Id:' + #p0") + @Override + public List findByUsersId(Long id) { + List roles = roleMapper.selectListByUserId(id); + return generator.convert(roles,RoleSmallDto.class); + } + + /** + * 根据角色查询角色级别 + * + * @param roles / + * @return / + */ + @Override + public Integer findByRoles(Set roles) { + Set roleDtos = new HashSet<>(); + for (Role role : roles) { + roleDtos.add(findById(role.getId())); + } + return Collections.min(roleDtos.stream().map(RoleDto::getLevel).collect(Collectors.toList())); + } + + /** + * 根据ID查询 + * + * @param id / + * @return / + */ + @Override + public RoleDto findById(long id) { + Role role = this.getById(id); + role.setMenus(menuMapper.findMenuByRoleId(role.getId())); + role.setDepts(deptMapper.findDeptByRoleId(role.getId())); + return generator.convert(role, RoleDto.class); + } + + /** + * 修改绑定的菜单 + * + * @param resources / + * @param roleDto / + */ + @Override +// @CacheEvict(allEntries = true) + public void updateMenu(Role resources, RoleDto roleDto) { + if(resources.getMenus().size()>0){ + List rolesMenusList = resources.getMenus().stream().map(i ->{ + RolesMenus rolesMenus = new RolesMenus(); + rolesMenus.setRoleId(resources.getId()); + rolesMenus.setMenuId(i.getId()); + return rolesMenus; + }).collect(Collectors.toList()); + rolesMenusService.remove(new LambdaQueryWrapper().eq(RolesMenus::getRoleId,resources.getId())); + rolesMenusService.saveBatch(rolesMenusList); + } + } + + + @Override +// @CacheEvict(allEntries = true) @Transactional(rollbackFor = Exception.class) - public RoleDTO create(Role resources) { - if(roleRepository.findByName(resources.getName()) != null){ + public RoleDto create(Role resources) { + if(this.getOne(new QueryWrapper().lambda().eq(Role::getName,resources.getName())) != null){ throw new EntityExistException(Role.class,"username",resources.getName()); } - return roleMapper.toDto(roleRepository.save(resources)); + + if(this.getOne(new QueryWrapper().lambda().eq(Role::getName,resources.getName())) != null){ + throw new EntityExistException(Role.class,"username",resources.getName()); + } + this.save(resources); + if(resources.getDepts().size()>0){ + List rolesDeptsList = resources.getDepts().stream().map(i ->{ + RolesDepts rolesDepts = new RolesDepts(); + rolesDepts.setRoleId(resources.getId()); + rolesDepts.setDeptId(i.getId()); + return rolesDepts; + }).collect(Collectors.toList()); + rolesDeptsService.saveBatch(rolesDeptsList); + } + return generator.convert(resources,RoleDto.class); } @Override - @CacheEvict(allEntries = true) +// @CacheEvict(allEntries = true) @Transactional(rollbackFor = Exception.class) public void update(Role resources) { - Role role = roleRepository.findById(resources.getId()).orElseGet(Role::new); - ValidationUtil.isNull(role.getId(),"Role","id",resources.getId()); + Role role = this.getById(resources.getId()); - Role role1 = roleRepository.findByName(resources.getName()); + Role role1 = this.getOne(new QueryWrapper().lambda().eq(Role::getName,resources.getName())); if(role1 != null && !role1.getId().equals(role.getId())){ throw new EntityExistException(Role.class,"username",resources.getName()); } - role1 = roleRepository.findByPermission(resources.getPermission()); + role1 = this.getOne(new QueryWrapper().lambda().eq(Role::getPermission,resources.getPermission())); if(role1 != null && !role1.getId().equals(role.getId())){ throw new EntityExistException(Role.class,"permission",resources.getPermission()); } role.setName(resources.getName()); role.setRemark(resources.getRemark()); role.setDataScope(resources.getDataScope()); - role.setDepts(resources.getDepts()); + if(resources.getDepts().size()>0){ + List rolesDeptsList = resources.getDepts().stream().map(i ->{ + RolesDepts rolesDepts = new RolesDepts(); + rolesDepts.setRoleId(resources.getId()); + rolesDepts.setDeptId(i.getId()); + return rolesDepts; + }).collect(Collectors.toList()); + rolesDeptsService.remove(new LambdaQueryWrapper().eq(RolesDepts::getRoleId,resources.getId())); + rolesDeptsService.saveBatch(rolesDeptsList); + } role.setLevel(resources.getLevel()); role.setPermission(resources.getPermission()); - roleRepository.save(role); + this.saveOrUpdate(role); } - + /** + * 获取用户权限信息 + * + * @param user 用户信息 + * @return 权限信息 + */ @Override - @CacheEvict(allEntries = true) - public void updateMenu(Role resources, RoleDTO roleDTO) { - Role role = roleMapper.toEntity(roleDTO); - role.setMenus(resources.getMenus()); - roleRepository.save(role); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void untiedMenu(Long id) { - roleRepository.untiedMenu(id); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - roleRepository.deleteById(id); - } - } - - @Override - @Cacheable(key = "'findByUsers_Id:' + #p0") - public List findByUsersId(Long id) { - return roleSmallMapper.toDto(new ArrayList<>(roleRepository.findByUsers_Id(id))); - } - - @Override - @Cacheable - public Integer findByRoles(Set roles) { - Set roleDtos = new HashSet<>(); +// @Cacheable(key = "'loadPermissionByUser:' + #p0.username") + public Collection mapToGrantedAuthorities(UserDto user) { + Set roles = roleMapper.findByUsers_Id(user.getId()); for (Role role : roles) { - roleDtos.add(findById(role.getId())); + Set menuSet = menuMapper.findMenuByRoleId(role.getId()); + role.setMenus(menuSet); + Set deptSet = deptMapper.findDeptByRoleId(role.getId()); + role.setDepts(deptSet); } - return Collections.min(roleDtos.stream().map(RoleDTO::getLevel).collect(Collectors.toList())); - } - - @Override - @Cacheable(key = "'loadPermissionByUser:' + #p0.username") - public Collection mapToGrantedAuthorities(UserDTO user) { - Set roles = roleRepository.findByUsers_Id(user.getId()); Set permissions = roles.stream().filter(role -> StringUtils.isNotBlank(role.getPermission())).map(Role::getPermission).collect(Collectors.toSet()); permissions.addAll( roles.stream().flatMap(role -> role.getMenus().stream()) @@ -166,18 +271,4 @@ public class RoleServiceImpl implements RoleService { .collect(Collectors.toList()); } - @Override - public void download(List roles, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (RoleDTO role : roles) { - Map map = new LinkedHashMap<>(); - map.put("角色名称", role.getName()); - map.put("默认权限", role.getPermission()); - map.put("角色级别", role.getLevel()); - map.put("描述", role.getRemark()); - map.put("创建日期", role.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java new file mode 100644 index 00000000..ef311391 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java @@ -0,0 +1,31 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.impl; + +import co.yixiang.modules.system.domain.RolesDepts; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.system.service.RolesDeptsService; +import co.yixiang.modules.system.service.mapper.RolesDeptsMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "rolesDepts") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class RolesDeptsServiceImpl extends BaseServiceImpl implements RolesDeptsService { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java new file mode 100644 index 00000000..5004612b --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java @@ -0,0 +1,31 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.impl; + +import co.yixiang.modules.system.domain.RolesMenus; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.system.service.RolesMenusService; +import co.yixiang.modules.system.service.mapper.RolesMenusMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "rolesMenus") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class RolesMenusServiceImpl extends BaseServiceImpl implements RolesMenusService { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java new file mode 100644 index 00000000..41127e8a --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java @@ -0,0 +1,274 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.impl; + +import co.yixiang.exception.EntityExistException; +import co.yixiang.modules.system.domain.Role; +import co.yixiang.modules.system.domain.User; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.system.domain.UserAvatar; +import co.yixiang.modules.system.domain.UsersRoles; +import co.yixiang.modules.system.service.*; +import co.yixiang.modules.system.service.mapper.RoleMapper; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.SecurityUtils; +import co.yixiang.utils.StringUtils; +import co.yixiang.utils.ValidationUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import co.yixiang.dozer.service.IGenerator; +import com.github.pagehelper.PageInfo; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.system.service.dto.UserDto; +import co.yixiang.modules.system.service.dto.UserQueryCriteria; +import co.yixiang.modules.system.service.mapper.SysUserMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//import org.springframework.cache.annotation.CacheConfig; +//import org.springframework.cache.annotation.CacheEvict; +//import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.domain.Pageable; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.Date; +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; +import java.util.Set; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Service +//@AllArgsConstructor +//@CacheConfig(cacheNames = "user") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class SysUserServiceImpl extends BaseServiceImpl implements UserService { + + @Value("${file.avatar}") + private String avatar; + + private final IGenerator generator; + private final SysUserMapper userMapper; + private final UserAvatarService userAvatarService; + private final JobService jobService; + private final DeptService deptService; + private final RoleMapper roleMapper; + private final RedisUtils redisUtils; + private final UsersRolesService usersRolesService; + + public SysUserServiceImpl(IGenerator generator, SysUserMapper userMapper, UserAvatarService userAvatarService, JobService jobService, DeptService deptService, RoleService roleService, RoleMapper roleMapper, RedisUtils redisUtils, UsersRolesService usersRolesService) { + this.generator = generator; + this.userMapper = userMapper; + this.userAvatarService = userAvatarService; + this.jobService = jobService; + this.deptService = deptService; + this.roleMapper = roleMapper; + this.redisUtils = redisUtils; + this.usersRolesService = usersRolesService; + } + + @Override + //@Cacheable + public Map queryAll(UserQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), UserDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(UserQueryCriteria criteria){ + List userList = baseMapper.selectList(QueryHelpPlus.getPredicate(User.class, criteria)); + for (User user : userList) { + user.setJob(jobService.getById(user.getJobId())); + user.setDept(deptService.getById(user.getDeptId())); + user.setRoles(roleMapper.findByUsers_Id(user.getId())); + } + return userList; + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (UserDto user : all) { + Map map = new LinkedHashMap<>(); + map.put("邮箱", user.getEmail()); + map.put("状态:1启用、0禁用", user.getEnabled()); + map.put("密码", user.getPassword()); + map.put("用户名", user.getUsername()); + map.put("部门名称", user.getDeptId()); + map.put("手机号码", user.getPhone()); + map.put("创建日期", user.getCreateTime()); + map.put("最后修改密码的日期", user.getLastPasswordResetTime()); + map.put("昵称", user.getNickName()); + map.put("性别", user.getSex()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 根据用户名查询 + * + * @param userName / + * @return / + */ + @Override + public UserDto findByName(String userName) { + User user = this.getOne(new QueryWrapper().lambda() + .eq(User::getUsername,userName)); + //用户所属岗位 + user.setJob(jobService.getById(user.getJobId())); + //用户所属部门 + user.setDept(deptService.getById(user.getDeptId())); + return generator.convert(user,UserDto.class); + } + + /** + * 修改密码 + * + * @param username 用户名 + * @param encryptPassword 密码 + */ + @Override + public void updatePass(String username, String encryptPassword) { + userMapper.updatePass(encryptPassword,new Date(),username); + } + + /** + * 修改头像 + * + * @param multipartFile 文件 + */ + @Override + public void updateAvatar(MultipartFile multipartFile) { + User user = this.getOne(new QueryWrapper().eq("username",SecurityUtils.getUsername())); + UserAvatar userAvatar = user.getUserAvatar(); + String oldPath = ""; + if(userAvatar != null){ + oldPath = userAvatar.getPath(); + } + File file = FileUtil.upload(multipartFile, avatar); + assert file != null; + UserAvatar saveUserAvatar = new UserAvatar(userAvatar,file.getName(), file.getPath(), FileUtil.getSize(multipartFile.getSize())); + userAvatarService.save(saveUserAvatar); + user.setUserAvatar(saveUserAvatar); + this.save(user); + if(StringUtils.isNotBlank(oldPath)){ + FileUtil.del(oldPath); + } + } + + /** + * 修改邮箱 + * + * @param username 用户名 + * @param email 邮箱 + */ + @Override + public void updateEmail(String username, String email) { + userMapper.updateEmail(email, username); + } + + /** + * 新增用户 + * + * @param resources / + * @return / + */ + @Override + //@CacheEvict(allEntries = true) + @Transactional(rollbackFor = Exception.class) + public boolean create(User resources) { + User userName = this.getOne(new QueryWrapper().lambda() + .eq(User::getUsername,resources.getUsername())); + if(userName != null){ + throw new EntityExistException(User.class,"username",resources.getUsername()); + } + User userEmail = this.getOne(new QueryWrapper().lambda() + .eq(User::getEmail,resources.getEmail())); + if(userEmail != null){ + throw new EntityExistException(User.class,"email",resources.getEmail()); + } + resources.setDeptId(resources.getDept().getId()); + resources.setJobId(resources.getJob().getId()); + boolean result = this.save(resources); + UsersRoles usersRoles = new UsersRoles(); + usersRoles.setUserId(resources.getId()); + Set set = resources.getRoles(); + for (Role roleIds : set ) { + usersRoles.setRoleId(roleIds.getId()); + } + if (result) { + usersRolesService.save(usersRoles); + } + return result; + } + + /** + * 编辑用户 + * + * @param resources / + */ + @Override + //@CacheEvict(allEntries = true) + @Transactional(rollbackFor = Exception.class) + public void update(User resources) { + User user = this.getOne(new QueryWrapper().lambda() + .eq(User::getId,resources.getId())); + ValidationUtil.isNull(user.getId(),"User","id",resources.getId()); + User user1 = this.getOne(new QueryWrapper().lambda() + .eq(User::getUsername,resources.getUsername())); + User user2 = this.getOne(new QueryWrapper().lambda() + .eq(User::getEmail,resources.getEmail())); + + if(user1 !=null&&!user.getId().equals(user1.getId())){ + throw new EntityExistException(User.class,"username",resources.getUsername()); + } + + if(user2!=null&&!user.getId().equals(user2.getId())){ + throw new EntityExistException(User.class,"email",resources.getEmail()); + } + + // 如果用户的角色改变了,需要手动清理下缓存 + if (!resources.getRoles().equals(user.getRoles())) { + String key = "role::loadPermissionByUser:" + user.getUsername(); + redisUtils.del(key); + key = "role::findByUsers_Id:" + user.getId(); + redisUtils.del(key); + } + + user.setUsername(resources.getUsername()); + user.setEmail(resources.getEmail()); + user.setEnabled(resources.getEnabled()); + user.setRoles(resources.getRoles()); + user.setDept(resources.getDept()); + user.setJob(resources.getJob()); + user.setPhone(resources.getPhone()); + user.setNickName(resources.getNickName()); + user.setSex(resources.getSex()); + this.saveOrUpdate(user); + } + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java new file mode 100644 index 00000000..51aefcdd --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java @@ -0,0 +1,96 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.impl; + +import co.yixiang.modules.system.domain.UserAvatar; +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 co.yixiang.modules.system.service.UserAvatarService; +import co.yixiang.modules.system.service.dto.UserAvatarDto; +import co.yixiang.modules.system.service.dto.UserAvatarQueryCriteria; +import co.yixiang.modules.system.service.mapper.UserAvatarMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +// 默认不使用缓存 +//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 hupeng +* @date 2020-05-14 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "userAvatar") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class UserAvatarServiceImpl extends BaseServiceImpl implements UserAvatarService { + + private final IGenerator generator; + + @Override + //@Cacheable + public Map queryAll(UserAvatarQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), UserAvatarDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(UserAvatarQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(UserAvatar.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (UserAvatarDto userAvatar : all) { + Map map = new LinkedHashMap<>(); + map.put("真实文件名", userAvatar.getRealName()); + map.put("路径", userAvatar.getPath()); + map.put("大小", userAvatar.getSize()); + map.put("创建时间", userAvatar.getCreateTime()); + map.put("真实文件名", userAvatar.getRealName()); + map.put("路径", userAvatar.getPath()); + map.put("大小", userAvatar.getSize()); + map.put("创建时间", userAvatar.getCreateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public UserAvatar saveFile(UserAvatar userAvatar) { + //todo + return null; + } +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserServiceImpl.java deleted file mode 100644 index d75fb13a..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UserServiceImpl.java +++ /dev/null @@ -1,218 +0,0 @@ -package co.yixiang.modules.system.service.impl; - -import co.yixiang.modules.system.service.UserService; -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.modules.system.service.dto.UserDTO; -import co.yixiang.modules.system.service.dto.UserQueryCriteria; -import co.yixiang.modules.system.domain.User; -import co.yixiang.exception.EntityExistException; -import co.yixiang.exception.EntityNotFoundException; -import co.yixiang.modules.system.domain.UserAvatar; -import co.yixiang.modules.system.repository.UserAvatarRepository; -import co.yixiang.modules.system.repository.UserRepository; -import co.yixiang.modules.system.service.mapper.UserMapper; -import co.yixiang.utils.*; - -import org.springframework.beans.factory.annotation.Value; -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 org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.multipart.MultipartFile; -import javax.servlet.http.HttpServletResponse; -import java.io.File; -import java.io.IOException; -import java.util.*; -import java.util.stream.Collectors; - -/** - * @author Zheng Jie - * @date 2018-11-23 - */ -@Service -@CacheConfig(cacheNames = "user") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class UserServiceImpl implements UserService { - - private final UserRepository userRepository; - private final UserMapper userMapper; - private final RedisUtils redisUtils; - private final UserAvatarRepository userAvatarRepository; - - @Value("${file.avatar}") - private String avatar; - - public UserServiceImpl(UserRepository userRepository, UserMapper userMapper, RedisUtils redisUtils, UserAvatarRepository userAvatarRepository) { - this.userRepository = userRepository; - this.userMapper = userMapper; - this.redisUtils = redisUtils; - this.userAvatarRepository = userAvatarRepository; - } - - @Override - @Cacheable - public Object queryAll(UserQueryCriteria criteria, Pageable pageable) { - Page page = userRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); - return PageUtil.toPage(page.map(userMapper::toDto)); - } - - @Override - @Cacheable - public List queryAll(UserQueryCriteria criteria) { - List users = userRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)); - return userMapper.toDto(users); - } - - @Override - @Cacheable(key = "#p0") - public UserDTO findById(long id) { - User user = userRepository.findById(id).orElseGet(User::new); - ValidationUtil.isNull(user.getId(),"User","id",id); - return userMapper.toDto(user); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public UserDTO create(User resources) { - if(userRepository.findByUsername(resources.getUsername())!=null){ - throw new EntityExistException(User.class,"username",resources.getUsername()); - } - if(userRepository.findByEmail(resources.getEmail())!=null){ - throw new EntityExistException(User.class,"email",resources.getEmail()); - } - return userMapper.toDto(userRepository.save(resources)); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void update(User resources) { - User user = userRepository.findById(resources.getId()).orElseGet(User::new); - ValidationUtil.isNull(user.getId(),"User","id",resources.getId()); - User user1 = userRepository.findByUsername(user.getUsername()); - User user2 = userRepository.findByEmail(user.getEmail()); - - if(user1 !=null&&!user.getId().equals(user1.getId())){ - throw new EntityExistException(User.class,"username",resources.getUsername()); - } - - if(user2!=null&&!user.getId().equals(user2.getId())){ - throw new EntityExistException(User.class,"email",resources.getEmail()); - } - - // 如果用户的角色改变了,需要手动清理下缓存 - if (!resources.getRoles().equals(user.getRoles())) { - String key = "role::loadPermissionByUser:" + user.getUsername(); - redisUtils.del(key); - key = "role::findByUsers_Id:" + user.getId(); - redisUtils.del(key); - } - - user.setUsername(resources.getUsername()); - user.setEmail(resources.getEmail()); - user.setEnabled(resources.getEnabled()); - user.setRoles(resources.getRoles()); - user.setDept(resources.getDept()); - user.setJob(resources.getJob()); - user.setPhone(resources.getPhone()); - user.setNickName(resources.getNickName()); - user.setSex(resources.getSex()); - userRepository.save(user); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void updateCenter(User resources) { - User user = userRepository.findById(resources.getId()).orElseGet(User::new); - user.setNickName(resources.getNickName()); - user.setPhone(resources.getPhone()); - user.setSex(resources.getSex()); - userRepository.save(user); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void delete(Set ids) { - for (Long id : ids) { - userRepository.deleteById(id); - } - } - - @Override - @Cacheable(key = "'loadUserByUsername:'+#p0") - public UserDTO findByName(String userName) { - User user; - if(ValidationUtil.isEmail(userName)){ - user = userRepository.findByEmail(userName); - } else { - user = userRepository.findByUsername(userName); - } - if (user == null) { - throw new EntityNotFoundException(User.class, "name", userName); - } else { - return userMapper.toDto(user); - } - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void updatePass(String username, String pass) { - userRepository.updatePass(username,pass,new Date()); - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void updateAvatar(MultipartFile multipartFile) { - User user = userRepository.findByUsername(SecurityUtils.getUsername()); - UserAvatar userAvatar = user.getUserAvatar(); - String oldPath = ""; - if(userAvatar != null){ - oldPath = userAvatar.getPath(); - } - File file = FileUtil.upload(multipartFile, avatar); - assert file != null; - userAvatar = userAvatarRepository.save(new UserAvatar(userAvatar,file.getName(), file.getPath(), FileUtil.getSize(multipartFile.getSize()))); - user.setUserAvatar(userAvatar); - userRepository.save(user); - if(StringUtils.isNotBlank(oldPath)){ - FileUtil.del(oldPath); - } - } - - @Override - @CacheEvict(allEntries = true) - @Transactional(rollbackFor = Exception.class) - public void updateEmail(String username, String email) { - userRepository.updateEmail(username,email); - } - - @Override - public void download(List queryAll, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (UserDTO userDTO : queryAll) { - List roles = userDTO.getRoles().stream().map(RoleSmallDTO::getName).collect(Collectors.toList()); - Map map = new LinkedHashMap<>(); - map.put("用户名", userDTO.getUsername()); - map.put("头像", userDTO.getAvatar()); - map.put("邮箱", userDTO.getEmail()); - map.put("状态", userDTO.getEnabled() ? "启用" : "禁用"); - map.put("手机号码", userDTO.getPhone()); - map.put("角色", roles); - map.put("部门", userDTO.getDept().getName()); - map.put("岗位", userDTO.getJob().getName()); - map.put("最后修改密码的时间", userDTO.getLastPasswordResetTime()); - map.put("创建日期", userDTO.getCreateTime()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java new file mode 100644 index 00000000..f45f108d --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java @@ -0,0 +1,30 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.impl; + +import co.yixiang.modules.system.domain.UsersRoles; +import co.yixiang.common.service.impl.BaseServiceImpl; +import lombok.AllArgsConstructor; +import co.yixiang.modules.system.service.UsersRolesService; +import co.yixiang.modules.system.service.mapper.UsersRolesMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "usersRoles") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class UsersRolesServiceImpl extends BaseServiceImpl implements UsersRolesService { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java index d94d99a2..9c42db33 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java @@ -1,16 +1,34 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.modules.system.service.dto.DeptDTO; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.Dept; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.security.core.parameters.P; +import org.springframework.stereotype.Repository; + +import java.util.Set; /** -* @author Zheng Jie -* @date 2019-03-25 +* @author hupeng +* @date 2020-05-14 */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DeptMapper extends BaseMapper { +@Repository +@Mapper +public interface DeptMapper extends CoreMapper { -} \ No newline at end of file + @Select("select m.* from dept m LEFT JOIN roles_depts t on m.id= t.dept_id LEFT JOIN role r on r.id = t.role_id where r.id = ${roleId}") + Set findDeptByRoleId(@Param("roleId") Long roleId); + + @Select("select * from dept m LEFT JOIN roles_depts t on m.id= t.dept_id LEFT JOIN role r on r.id = t.role_id where r.id = #{roleId}") + Set findDeptByRoleIds(@Param("roleIds") Set roleId); +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptSmallMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptSmallMapper.java deleted file mode 100644 index cb154414..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DeptSmallMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.system.service.mapper; - -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.system.domain.Dept; -import co.yixiang.modules.system.service.dto.DeptSmallDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author Zheng Jie -* @date 2019-03-25 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DeptSmallMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java index c6bb6526..7a776f43 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java @@ -1,16 +1,31 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.DictDetail; -import co.yixiang.modules.system.service.dto.DictDetailDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import co.yixiang.modules.system.service.dto.DictDetailQueryCriteria; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Mapper(componentModel = "spring", uses = {DictSmallMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictDetailMapper extends BaseMapper { +@Repository +@Mapper +public interface DictDetailMapper extends CoreMapper { -} \ No newline at end of file + @Select("") + List selectDictDetailList(@Param("label") String label,@Param("dictName") String dictName); +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java index 3dc6ae6c..1ddb63aa 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java @@ -1,16 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.modules.system.service.dto.DictDTO; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.Dict; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** -* @author Zheng Jie -* @date 2019-04-10 +* @author hupeng +* @date 2020-05-14 */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictMapper extends BaseMapper { +@Repository +@Mapper +public interface DictMapper extends CoreMapper { -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictSmallMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictSmallMapper.java deleted file mode 100644 index 9976a7a5..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/DictSmallMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.system.service.mapper; - -import co.yixiang.modules.system.service.dto.DictSmallDto; -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.system.domain.Dict; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author Zheng Jie -* @date 2019-04-10 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface DictSmallMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java index 47ce84b0..d38780b0 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java @@ -1,25 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.Job; -import co.yixiang.modules.system.service.dto.JobDTO; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; /** -* @author Zheng Jie -* @date 2019-03-29 +* @author hupeng +* @date 2020-05-14 */ -@Mapper(componentModel = "spring",uses = {DeptMapper.class},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface JobMapper extends BaseMapper { +@Repository +@Mapper +public interface JobMapper extends CoreMapper { - /** - * 转Dto - * @param job 原始数据 - * @param deptSuperiorName / - * @return / - */ - @Mapping(source = "deptSuperiorName", target = "deptSuperiorName") - JobDTO toDto(Job job, String deptSuperiorName); -} \ No newline at end of file +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobSmallMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobSmallMapper.java deleted file mode 100644 index 22fc89f7..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/JobSmallMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.system.service.mapper; - -import co.yixiang.modules.system.service.dto.JobSmallDTO; -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.system.domain.Job; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** -* @author Zheng Jie -* @date 2019-03-29 -*/ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface JobSmallMapper extends BaseMapper { - -} \ No newline at end of file diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java index 76ad0084..abef3bd0 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java @@ -1,16 +1,42 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.Menu; -import co.yixiang.modules.system.service.dto.MenuDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Set; /** - * @author Zheng Jie - * @date 2018-12-17 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface MenuMapper extends BaseMapper { +* @author hupeng +* @date 2020-05-14 +*/ +@Repository +@Mapper +public interface MenuMapper extends CoreMapper { + + /** + * 根据菜单的 PID 查询 + * @param pid / + * @return / + */ + @Select("SELECT * from menu m where m.pid = #{pid} ") + List findByPid(@Param("pid") long pid); + + @Select("select m.* from menu m LEFT JOIN roles_menus t on m.id= t.menu_id LEFT JOIN role r on r.id = t.role_id where r.id = #{roleId}") + Set findMenuByRoleId(@Param("roleId") Long roleId); + @Select("") + List selectListByRoles(@Param("roleIds") List roleIds); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java index e2b9c3f8..4ab6486c 100644 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java @@ -1,16 +1,57 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.mapper; -import co.yixiang.base.BaseMapper; +import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.system.domain.Role; -import co.yixiang.modules.system.service.dto.RoleDTO; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; +import org.apache.ibatis.annotations.Delete; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Set; /** - * @author Zheng Jie - * @date 2018-11-23 - */ -@Mapper(componentModel = "spring", uses = {MenuMapper.class, DeptMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface RoleMapper extends BaseMapper { +* @author hupeng +* @date 2020-05-14 +*/ +@Repository +@Mapper +public interface RoleMapper extends CoreMapper { + + /** + * 根据用户ID查询 + * @param id 用户ID + * @return + */ + @Select( "SELECT r.id,r.create_time,r.data_scope,r.`level`,r.`name`,r.permission,r.remark " + + "FROM role r LEFT OUTER JOIN users_roles u1 ON r.id = u1.role_id " + + "LEFT OUTER JOIN user u2 ON u1.user_id = u2.id "+ + "WHERE u2.id = #{id}") + Set findByUsers_Id(@Param("id") Long id); + + /** + * 解绑角色菜单 + * @param id 菜单ID + */ + @Delete("delete from roles_menus where menu_id = #{id}") + void untiedMenu(@Param("id") Long id); + + /** + * 根据用户ID查询 + * + * @param id 用户ID + * @return + */ + @Select("select m.* from role m LEFT JOIN users_roles t on m.id= t.role_id LEFT JOIN `user` r on r.id = t.user_id where r.id = #{id}") + List selectListByUserId(@Param("id") Long id); } diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleSmallMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleSmallMapper.java deleted file mode 100644 index 6894769a..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RoleSmallMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package co.yixiang.modules.system.service.mapper; - -import co.yixiang.modules.system.service.dto.RoleSmallDTO; -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.system.domain.Role; -import org.mapstruct.Mapper; -import org.mapstruct.ReportingPolicy; - -/** - * @author Zheng Jie - * @date 2019-5-23 - */ -@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface RoleSmallMapper extends BaseMapper { - -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java new file mode 100644 index 00000000..11050caf --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.system.domain.RolesDepts; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Repository +@Mapper +public interface RolesDeptsMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java new file mode 100644 index 00000000..5559cf88 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.system.domain.RolesMenus; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Repository +@Mapper +public interface RolesMenusMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java new file mode 100644 index 00000000..b61f2aa0 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java @@ -0,0 +1,45 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.system.domain.User; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.Date; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Repository +@Mapper +public interface SysUserMapper extends CoreMapper { + + /** + * 修改密码 + * @param username 用户名 + * @param password 密码 + * @param lastPasswordResetTime / + */ + @Update("update `user` set password = password+${password} , last_password_reset_time = lastPasswordResetTime+${lastPasswordResetTime} where username = #{username}") + void updatePass( @Param("password") String password,@Param("lastPasswordResetTime") Date lastPasswordResetTime, @Param("username") String username); + + /** + * 修改邮箱 + * @param username 用户名 + * @param email 邮箱 + */ + @Update("update `user` set email = email+ ${email} where username = #{username}") + void updateEmail(@Param("email") String email, @Param("username") String username); + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java new file mode 100644 index 00000000..5f2c5215 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.system.domain.UserAvatar; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Repository +@Mapper +public interface UserAvatarMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserMapper.java deleted file mode 100644 index 23715cb6..00000000 --- a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UserMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package co.yixiang.modules.system.service.mapper; - -import co.yixiang.modules.system.service.dto.UserDTO; -import co.yixiang.base.BaseMapper; -import co.yixiang.modules.system.domain.User; -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; -import org.mapstruct.ReportingPolicy; - -/** - * @author Zheng Jie - * @date 2018-11-23 - */ -@Mapper(componentModel = "spring",uses = {RoleMapper.class, DeptMapper.class, JobMapper.class},unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface UserMapper extends BaseMapper { - - /** - * 转换 - * @param user 原始数据 - * @return / - */ - @Override - @Mapping(source = "user.userAvatar.realName",target = "avatar") - UserDTO toDto(User user); -} diff --git a/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java new file mode 100644 index 00000000..6cc25339 --- /dev/null +++ b/yshop-system/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.system.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.system.domain.UsersRoles; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-16 +*/ +@Repository +@Mapper +public interface UsersRolesMapper extends CoreMapper { + +} diff --git a/yshop-system/src/main/resources/config/application-dev.yml b/yshop-system/src/main/resources/config/application-dev.yml index 655187ac..670a0191 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 @@ -49,7 +51,7 @@ spring: database: 0 host: 127.0.0.1 port: 6379 - password: root + password: #连接超时时间 timeout: 5000 @@ -77,14 +79,24 @@ 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: E:\yshop\file\ + avatar: E:\yshop\avatar\ # 文件大小 /M maxSize: 100 avatarMaxSize: 5 - localUrl: http://localhost:8000 + localUrl: http://127.0.0.1:8000 + +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 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..cc58e477 100644 --- a/yshop-system/src/main/resources/config/application.yml +++ b/yshop-system/src/main/resources/config/application.yml @@ -13,12 +13,6 @@ spring: repositories: enabled: false - #配置 Jpa - jpa: - properties: - hibernate: - dialect: org.hibernate.dialect.MySQL5InnoDBDialect - open-in-view: true task: pool: @@ -58,4 +52,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: http://127.0.0.1:8009/api + + +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/yshop-system/src/main/resources/logback.xml b/yshop-system/src/main/resources/logback.xml index f8639eb5..ba3e1ee2 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 + + + + + + @@ -42,4 +93,4 @@ - \ No newline at end of file + diff --git a/yshop-system/src/main/resources/template/generator/admin/Controller.ftl b/yshop-system/src/main/resources/template/generator/admin/Controller.ftl index 28fbdb82..1b0ca785 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Controller.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Controller.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.rest; import co.yixiang.aop.log.Log; @@ -70,4 +78,4 @@ public class ${className}Controller { ${changeClassName}Service.deleteAll(ids); return new ResponseEntity<>(HttpStatus.OK); } -} \ No newline at end of file +} 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..ef11f71b --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/ControllerP.ftl @@ -0,0 +1,85 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package ${package}.rest; +import java.util.Arrays; +import co.yixiang.dozer.service.IGenerator; +import lombok.AllArgsConstructor; +import co.yixiang.logging.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); + } +} diff --git a/yshop-system/src/main/resources/template/generator/admin/Dto.ftl b/yshop-system/src/main/resources/template/generator/admin/Dto.ftl index dc478f5e..de74ea19 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Dto.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Dto.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.service.dto; import lombok.Data; @@ -34,4 +42,4 @@ public class ${className}Dto implements Serializable { private ${column.columnType} ${column.changeColumnName}; -} \ 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..0473058e --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/DtoP.ftl @@ -0,0 +1,47 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package ${package}.service.dto; + +import lombok.Data; +<#if hasTimestamp> +import java.sql.Timestamp; + +<#if hasBigDecimal> +import java.math.BigDecimal; + +import java.io.Serializable; +<#if !auto && pkColumnType == 'Long'> +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; + + +/** +* @author ${author} +* @date ${date} +*/ +@Data +public class ${className}Dto implements Serializable { +<#if columns??> + <#list columns as column> + + <#if column.remark != ''> + /** ${column.remark} */ + + <#if column.columnKey = 'PRI'> + <#if !auto && pkColumnType = 'Long'> + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + + + <#if column.changeColumnName != 'delFlag'> + private ${column.columnType} ${column.changeColumnName}; + + + +} diff --git a/yshop-system/src/main/resources/template/generator/admin/Entity.ftl b/yshop-system/src/main/resources/template/generator/admin/Entity.ftl index 34d18934..743e6255 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Entity.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Entity.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.domain; import lombok.Data; @@ -62,4 +70,4 @@ public class ${className} implements Serializable { 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/EntityP.ftl b/yshop-system/src/main/resources/template/generator/admin/EntityP.ftl new file mode 100644 index 00000000..41d7ddd1 --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/EntityP.ftl @@ -0,0 +1,78 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package ${package}.domain; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; +import com.baomidou.mybatisplus.annotation.TableName; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +<#if isNotNullColumns??> +import javax.validation.constraints.*; + +<#if hasDateAnnotation> + +<#if hasTimestamp> +import java.sql.Timestamp; + +<#if hasBigDecimal> +import java.math.BigDecimal; + +import java.io.Serializable; + +/** +* @author ${author} +* @date ${date} +*/ +@Data +@TableName("${tableName}") +public class ${className} implements Serializable { +<#if columns??> + <#list columns as column> + + <#if column.remark != ''> + /** ${column.remark} */ + + <#if column.columnKey = 'PRI'> + @TableId + + <#if column.istNotNull && column.columnKey != 'PRI'> + <#if column.columnType = 'String'> + @NotBlank + <#else> + @NotNull + + + <#if column.dateAnnotation??> + <#if column.dateAnnotation = 'CreationTimestamp'> + @CreationTimestamp + <#else> + @UpdateTimestamp + + + <#if column.changeColumnName = 'updateTime'|| column.changeColumnName = 'updateDate'> + @TableField(fill= FieldFill.INSERT_UPDATE) + + <#if column.changeColumnName = 'createTime' || column.changeColumnName = 'createDate'> + @TableField(fill= FieldFill.INSERT) + + <#if column.changeColumnName = 'delFlag'> + @TableLogic + @TableField(fill=FieldFill.INSERT_UPDATE) + private Boolean ${column.changeColumnName}; + <#else> + private ${column.columnType} ${column.changeColumnName}; + + + + + + public void copy(${className} source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-system/src/main/resources/template/generator/admin/Mapper.ftl b/yshop-system/src/main/resources/template/generator/admin/Mapper.ftl index bf4538a9..17b2418c 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Mapper.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Mapper.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.service.mapper; import co.yixiang.base.BaseMapper; @@ -13,4 +21,4 @@ import org.mapstruct.ReportingPolicy; @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) public interface ${className}Mapper extends BaseMapper<${className}Dto, ${className}> { -} \ 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..29d24c4e --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/MapperP.ftl @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +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}> { + +} diff --git a/yshop-system/src/main/resources/template/generator/admin/QueryCriteria.ftl b/yshop-system/src/main/resources/template/generator/admin/QueryCriteria.ftl index 20d5f854..1206846e 100644 --- a/yshop-system/src/main/resources/template/generator/admin/QueryCriteria.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/QueryCriteria.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.service.dto; import lombok.Data; @@ -62,4 +70,4 @@ public class ${className}QueryCriteria{ private List<${column.columnType}> createTime; -} \ 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..1206846e --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/QueryCriteriaP.ftl @@ -0,0 +1,73 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package ${package}.service.dto; + +import lombok.Data; +<#if queryHasTimestamp> +import java.sql.Timestamp; + +<#if queryHasBigDecimal> +import java.math.BigDecimal; + +<#if betweens??> +import java.util.List; + +<#if queryColumns??> +import co.yixiang.annotation.Query; + + +/** +* @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 column.queryType = 'Like'> + /** 模糊 */ + @Query(type = Query.Type.INNER_LIKE) + private ${column.columnType} ${column.changeColumnName}; + +<#if column.queryType = '!='> + /** 不等于 */ + @Query(type = Query.Type.NOT_EQUAL) + private ${column.columnType} ${column.changeColumnName}; + +<#if column.queryType = 'NotNull'> + /** 不为空 */ + @Query(type = Query.Type.NOT_NULL) + private ${column.columnType} ${column.changeColumnName}; + +<#if column.queryType = '>='> + /** 大于等于 */ + @Query(type = Query.Type.GREATER_THAN) + private ${column.columnType} ${column.changeColumnName}; + +<#if column.queryType = '<='> + /** 小于等于 */ + @Query(type = Query.Type.LESS_THAN) + private ${column.columnType} ${column.changeColumnName}; + + + +<#if betweens??> + <#list betweens as column> + /** BETWEEN */ + @Query(type = Query.Type.BETWEEN) + private List<${column.columnType}> createTime; + + +} diff --git a/yshop-system/src/main/resources/template/generator/admin/Repository.ftl b/yshop-system/src/main/resources/template/generator/admin/Repository.ftl index e1b7f28f..bd33fc8f 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Repository.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Repository.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.repository; import ${package}.domain.${className}; @@ -21,4 +29,4 @@ public interface ${className}Repository extends JpaRepository<${className}, ${pk -} \ No newline at end of file +} diff --git a/yshop-system/src/main/resources/template/generator/admin/Service.ftl b/yshop-system/src/main/resources/template/generator/admin/Service.ftl index 4ba4a0e7..d2288339 100644 --- a/yshop-system/src/main/resources/template/generator/admin/Service.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/Service.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.service; import ${package}.domain.${className}; @@ -63,4 +71,4 @@ public interface ${className}Service { * @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/admin/ServiceImpl.ftl b/yshop-system/src/main/resources/template/generator/admin/ServiceImpl.ftl index c8982f4c..eddabeee 100644 --- a/yshop-system/src/main/resources/template/generator/admin/ServiceImpl.ftl +++ b/yshop-system/src/main/resources/template/generator/admin/ServiceImpl.ftl @@ -1,3 +1,11 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package ${package}.service.impl; import ${package}.domain.${className}; @@ -87,10 +95,10 @@ public class ${className}ServiceImpl implements ${className}Service { public ${className}Dto create(${className} resources) { <#if !auto && pkColumnType = 'Long'> Snowflake snowflake = IdUtil.createSnowflake(1, 1); - resources.set${pkCapitalColName}(snowflake.nextId()); + resources.set${pkCapitalColName}(snowflake.nextId()); <#if !auto && pkColumnType = 'String'> - resources.set${pkCapitalColName}(IdUtil.simpleUUID()); + resources.set${pkCapitalColName}(IdUtil.simpleUUID()); <#if columns??> <#list columns as column> @@ -153,4 +161,4 @@ public class ${className}ServiceImpl implements ${className}Service { } FileUtil.downloadExcel(list, response); } -} \ 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..541473c8 --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/ServiceImplP.ftl @@ -0,0 +1,107 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +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; + + + + +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 !auto && pkColumnType = 'String'> +import cn.hutool.core.util.IdUtil; + +// 默认不使用缓存 +//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}()); + + + + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} 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..24c5c81c --- /dev/null +++ b/yshop-system/src/main/resources/template/generator/admin/ServiceP.ftl @@ -0,0 +1,48 @@ +/** +* Copyright (C) 2018-2020 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +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; +} 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 + <#elseif column.formType = 'Imges'> + <#else> @@ -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??> - <#elseif column.columnType != 'Timestamp'> + <#elseif column.formType = 'Imges'> + + + + <#elseif column.columnType != 'Timestamp'> - <#else> + <#else> - - - + + +